如何在 OSX 上安装 LaTeX .sty 文件? [英] How do I install a LaTeX .sty file on OSX?
问题描述
我设置了一个 LaTeX 项目:
I have a LaTeX project set up:
tex/
- documents/
- some_file.tex
- support/
- todonotes.sty
其中 some_file.tex
使用 todonotes
:
usepackage[colorinlistoftodos,textwidth=0.9marginparwidth]{todonotes}
但是当我尝试在 TextMate 中构建 PDF 时,我得到LaTeX 错误:找不到文件 `todonotes.sty'".如何告诉 LaTex 或 TextMate 我的 .sty 文件?
But I get "LaTeX Error: File `todonotes.sty' not found" when I try to build the PDF in TextMate. How do I tell LaTex or TextMate about my .sty file?
稍后
具体来说,我正在使用来自 MacPorts 的 tetex
,尽管到目前为止给出了答案,但我可能会尝试另一个发行版.
To be specific, I'm using tetex
from MacPorts, though given the answers so far, I might try another distribution.
推荐答案
在 Mac OS X (Snow Leopard 10.6.7) 中将 .sty
文件放入
In Mac OS X (Snow Leopard 10.6.7) put your .sty
file in
/usr/local/texlive/2010basic/texmf-dist/tex/latex/base/
然后,运行 texhash
命令.不要忘记保持 root 用户身份(例如 sudo -s
)
Then, run texhash
command. Don't forget to stay as a root user (like sudo -s
)
这篇关于如何在 OSX 上安装 LaTeX .sty 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!