简体   繁体   中英

BasicTex on Mac OS X: How do I install IEEEtrantools.sty?

I've searched everywhere, and it doesn't look like this particular issue is well covered. I'm new to LaTeX so please forgive my naivety.

I installed BasicTex using homebrew (I didn't want to install MacTex because it's 2GB). Afterwards, I used the following command to install the titlesec package:

sudo tlmgr install titlesec

I thought this would solve my problem, as hinted elsewhere... but I still get the following error when I try to compile my TeX within eMacs:

ERROR: LaTeX Error: File `IEEEtrantools.sty' not found.

Any help would be greatly appreciated.

PS I know that .sty files are generally easily available online... but where do I insert this .sty file to have BasicTex work nicely?

First of all, you can put the file in the same folder of your document tex and LaTeX will find it. You don't necessary needs to install it. That's for the fast way.

However, it means that each time you're doing a new document using this template, you'll have to copy it. It could be useful with colleagues because you don't have to assume they install it on their system but if you're mainly working alone, there is no point, you probably better try to install it on your system.

Now, to install it, you usually need 2 steps. First, you need to copy it in a folder that LaTeX will see. For that, you can probably look for other sty files on your system and just put in here or in a subfolder. The drawback is that it might disappear when there is updates of your LaTeX system. There is also a local folder specifically designed to extend the system but if I recall well, it depends on the LaTeX distribution (in your case BasicTeX) and your OS. For example, on Texlive distribution on a Linux system, you can create ~/texmf/tex/latex/ in your home directory and put packages and classes inside because ~/texmf is the folder that is written in the configuration as an extension point (of course you can also change the configuration but I'm always having problem to identify where is the configuration file).

The second step is about updating the index of LaTeX. Indeed, LaTeX has an index of all the files it can use. If you just copy the file in the right folder, LaTeX will still be unaware of its presence. On Linux, you can use the texhash command in the terminal to update this index. It's been a long time I dealt with Mac but I'm betting that you can do the same than on Linux in the terminal. Note that you'll probably need administrator rights to make it work so you may need to prefix with sudo texhash .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM