TeX Live and MacTeXcan't find .sty files

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
Post Reply
apc
Posts: 6
Joined: Tue Mar 24, 2009 4:56 pm

can't find .sty files

Post by apc »

I've recently migrated to texlive from tetex, but I've been having some issues with the installation. For instance, my .sty files are under ~/Library/texmf, and most of the time I can access the files with the usual \usepackage{file} command. However, every once in a while I'll get an error message of the form "can't find *.sty".

From what I can tell, TeX all of a sudden starts looking for .sty files inside the hidden tree. If on the console I enter the specific path to the file in ~/Library/texmf, it will find it, but only to give me the next error message for the rest of the packages I'm using.

I've started to wonder whether the problem is with TeXShop, since after quitting TeXShop things seem to start working again.

I'm using TeXShop 2.25 on a Mac OSX 10.4.11.

Thanks in advance,

A.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: can't find .sty files

Post by kaiserkarl13 »

Try setting the following environment variable:

TEXINPUTS=".:$HOME/Library/texmf:"
apc
Posts: 6
Joined: Tue Mar 24, 2009 4:56 pm

Re: can't find .sty files

Post by apc »

Thanks! I'll try that and see if it works.
apc
Posts: 6
Joined: Tue Mar 24, 2009 4:56 pm

Re: can't find .sty files

Post by apc »

This seems to have worked. Thanks again.

However, I still don't have access to the .sty files that came with tetex. For instance, I used to be able to use txfonts, and other such packages, which came with my distribution.

Thanks!
apc
Posts: 6
Joined: Tue Mar 24, 2009 4:56 pm

Re: can't find .sty files

Post by apc »

A few more details. I have a bunch of .sty files, fonts, etc. in my tetex folder. For example, txfonts.sty (which came with my version of tetex) is here:

/usr/local/teTeX/share/texmf.tetex/tex/latex/txfonts/txfonts.sty

From what I can tell, LaTeX will look for fonts, macros, etc. both in my local tree

ibrary/texmf

and inside the texlive folder

/usr/local/texlive/2008basic/texmf/

I realize I could in principle manually move all the relevant files to the texlive folder, but I'm afraid that might end up in a mess. Is there any way to tell LaTeX to look for files also inside the tetex folder, even though I'm using texlive?

Thanks again..
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: can't find .sty files

Post by kaiserkarl13 »

The tailing colon is important; without it, it doesn't search the "usual" path.
apc
Posts: 6
Joined: Tue Mar 24, 2009 4:56 pm

Re: can't find .sty files

Post by apc »

Thanks again. I double checked, and I don't think I omitted the colon. But maybe I'm missing something.

Following your suggestion, I managed to get LaTeX to search for .sty files in the HOME/library/texmf tree. What I want to know is whether I can have LaTeX *also* search in both

/usr/local/texlive/2008basic/texmf/

(which by default it does) and

/usr/local/teTeX/share/texmf.tetex/

Thanks again for your help.
Post Reply