How to install LaTeX.sty file on OSX?

I have a LaTeX project:

tex/ - documents/ - some_file.tex - support/ - todonotes.sty 

where some_file.tex uses todonotes :

 \usepackage[colorinlistoftodos,textwidth=0.9\marginparwidth]{todonotes} 

But I get "LaTeX Error: file" todonotes.sty "not found" when I try to create a PDF in TextMate. How do I tell LaTex or TextMate about my .sty file?

Further

To be specific, I use tetex from MacPorts, although given the answers so far, I could try a different distribution.

+52
latex macos
Sep 07 '09 at 20:17
source share
7 answers

On Mac OS X (Snow Leopard 10.6.7) put your .sty file in

 /usr/local/texlive/2010basic/texmf-dist/tex/latex/base/ 

Then run the texhash command. Remember to remain as root (e.g. sudo -s )

+47
Apr 27 '11 at 3:14
source share

Or you can simply put the style file in the same directory as your document, and not in the "support". now ... if you are on OS X, you should probably use texlive 2008. If you are using texlive 2008, the pop panel will open a terminal and type:

 sudo tlmgr install todonotes 

replace "todonotes" with the name of the package you want to install.

+31
Sep 08 '09 at 16:22
source share

You can put style files in ~/texmf/tex/ , and standard LaTeX distributions should find them. If you want to install them on a system scale, you can put them in the appropriate texmf/tex folder in your LaTeX installation (the location of this installation in OS X depends on which LaTeX distribution you used).

You can use tlmgr conf on the command line to display all distribution configuration information. The TEXMFHOME variable indicates the path to your texmf tree.

+9
Sep 07 '09 at 20:43
source share

As already mentioned, just put the custom .sty in ~/texmf/tex or in /usr/share/texmf-texlive/tex/ , but remember to run mktexlsr or texhash to update the local LaTeX batch database. Otherwise, LaTeX will not find it at all if it is not in the same directory of the processed file.

+3
Oct 02 '09 at 22:45
source share

This page in LaTeX packages says that you need to install the .sty file in the LaTeX installation directory (my Ubuntu installation seems to be /usr/share/texmf-texlive/tex/latex/ ), or you need to have a copy of the .sty file in each file containing the LaTeX source, i.e. in your tex/documents folder, at least.

0
Sep 07 '09 at 20:33
source share

I had this problem using BasicTex 2015 and none of the solutions above resolved it, so I wrote here

In short: sudo tlmgr install preprint fix it, and kpsewhich fullpage.sty confirm the fix

0
Nov 29 '15 at 23:15
source share

I tried this, it works for me:

sudo apt-get install texlive-full .

-2
Apr 13 '16 at 6:42 on
source share



All Articles