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.

  • Your personal tree is searched first and once it finds the first handout.sty it quits searching further. Commented May 20, 2016 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 tex.stackexchange.com/questions/79968/… Commented May 20, 2016 at 20:05
  • Thank you, Ulrike; that fixed it. (So what is it that kpsewhich is doing then?)
    – Janet
    Commented May 20, 2016 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. Commented May 20, 2016 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
    Commented May 21, 2016 at 0:49


You must log in to answer this question.

Browse other questions tagged .