Possible Duplicate:
How do I install an individual package on a Linux system?

At university we have now been given a bunch of .sty files which fit the university's template.

I got it to work by just throwing all the files in with the document, however this is messy and I can't help thinking there must be a better way.

So far I've tried putting the files in /etc/texmf which I found some references to but I haven't been able to get it to work.

If there is an easier way not using Texmaker - I'm open to suggestions!


Put the file (i.e. foo.sty) into /home/user/texmf/tex/latex/foo/foo.sty

An earlier version of this answer said that you need to run texhash. This is wrong. As explained by egreg. This false information came from this page.

  • 1
    Don't do texhash ~/texmf: it's not necessary. Also, remove any ls-R file from ~/texmf. – egreg Oct 28 '11 at 10:53
  • I'm curious: Why not? Is that page wrong? Can you give a link with a rational? – Unapiedra Oct 28 '11 at 10:55
  • 1
    Yes, that page is wrong. The "personal tree" under ~/texmf (or ~/Library/texmf on Mac OS X) is configured so that TeX programs don't need an ls-R file for it, but they will use one, if present. The idea is that one can put there files and packages for personal use or for experiments without worrying of doing texhash each time the tree is modified. The default setting of TEXMF is TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOC AL,!!$TEXMFDIST}; trees not preceded by !! are those that don't require texhash. – egreg Oct 28 '11 at 11:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.