问题描述
我已经设置了一个LaTeX项目:
I have a LaTeX project set up:
tex/
- documents/
- some_file.tex
- support/
- todonotes.sty
其中some_file.tex
使用todonotes
:
\usepackage[colorinlistoftodos,textwidth=0.9\marginparwidth]{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文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!