2

I use TeX Live (on a Debian system), and I'm having a new issue with style files. For many years, I've used a style file I've written called handout.sty; it's in my ~/texmf/tex directory, and I've always used \usepackage{handout} successfully.

I just upgraded my texlive distribution to TeX Live 2014; unfortunately, this distribution includes a file also called handout.sty, in /usr/share/texlive/texmf-dist/tex/latex/handout/handout.sty. Is there a way to set things up so that my handout.sty gets precedence? (I could rename it, but I have literally thousands of TeX files that use it, so I'm not eager to do that.)

I thought this was related to kpathsea, but when I run kpsewhich handout.sty, it gives the handout.sty in my ~/texmf/tex directory; nonetheless, when I actually run pdflatex on a TeX file, it tries to include the handout.sty from the texlive distribution.

Any suggestions on how to fix this or how to debug how TeX is looking for the file would be helpful.

cfr
  • 198,882
Janet
  • 421
  • Your personal tree is searched first and once it finds the first handout.sty it quits searching further. – Herb Schulz May 20 '16 at 19:35
  • Put your file in a similar subtree in your local texmf, that means under tex\latex as latex is using a sort of zigzag search path, see http://tex.stackexchange.com/questions/79968/why-isnt-kpathsea-picking-up-my-local-version-of-a-file/79983#79983 – Ulrike Fischer May 20 '16 at 20:05
  • Thank you, Ulrike; that fixed it. (So what is it that kpsewhich is doing then?) – Janet May 20 '16 at 20:45
  • You need to use -progname=latex to see what latex would find first. E.g. kpsewhich -progname=cslatex hyphen.cfg finds something different than kpsewhich -progname=latex hyphen.cfg. – Ulrike Fischer May 20 '16 at 21:14
  • There is no need to put it in the local tree @UlrikeFischer. Moving it to the correct sub-directory within the personal tree would do just as well. (Maybe this is what you meant.) – cfr May 21 '16 at 00:49
  • IIRC it is bad practice to use file names which are already in the texmf tree. You should better call the file Myhandout.sty, that would not get confused and indicate to you and whosoever that is not a file of the texlive. – Bernhard Kleine May 24 '16 at 09:49

0 Answers0