[texhax] where to put .sty files?

Pierre MacKay mackay at cs.washington.edu
Fri Sep 24 23:07:35 CEST 2004


Not so very incidentally, one of the most important things you can do to
keep the distribution file tree clean (and to keep a lot of bad things from happening)
is to change fstab so that /usr is mounted read-only.  You have to put a link
to /usr/local in there first, but from then on, when risky packages try to alter
your /usr partition, you get a solid warning that they need to be altered before
installing.  Occasional things HAVE to be added to /usr. but very few.

/usr/local will have to be on a distinct partition, of course.
My /usr/local --> /opt/local (which indicates a long past experience with Solaris)

> Your personal additions should go in your local texmf tree, not the main one. 
> You can create your local texmf tree anywhere you want, but a standard place 
> for it (including Debian) is /usr/local/share/texmf. You can organize your 
> local tree as the main one, so duplicate it with, say:
> 
> cd /usr/share/texmf	# or wherever your $TEXMFMAIN is
> find . -type d | cpio -pdv /usr/local/share/texmf
> 
> <*.sty> files can then go in /usr/local/share/texmf/tex/latex/<package>

Copying the entire TEXMFMAIN to /usr/local seems extreme.  That is what
TEXMFCNF is for, and most particularly what SELFAUTOLOC, etc. is for.

The one lot of things you do have to copy out of /usr is the binaries
you actually use, which must be in /usr/local/bin (links won't work).

Remember that when you add something to /usr/local/texmf, you need to run
mktexlsr.  (It will complain that it can't do anyything about the ro /usr
but that is just what you want. 

Pierre MacKay
 



More information about the texhax mailing list