[Tex/LaTex] Purpose of local texmf trees


In Tex Live there are several local texmf trees (TEXMFLOCAL for admin and TEXMFHOME for user, compare comments and answers to What are TeXLive's four different texmf folders?), in MiKTeX I manually can add them, see Create a local TeXMF tree in MiKTeX, but:

What's the purpose of a local texmf directory tree?

Best Answer

There are several reasons:

(In the following sections see “package” in a broader meaning including also scripts, binaries etc.)

  • The TeX distributions do not install all available packages known in the TeX world. TeX Live includes only packages, which come with a free licence; MiKTeX is not that strict about that, but, as far as I see, both distributions do include only packages, which are available on CTAN. Still today an uncountable amount of packages is obtainable only on their own web sites. You could include these packages into the normal tree, but very likely you would lose them on a distribution update. Also they would not automatically be updated by the package managers, you need to do this manually for your own. In a local texmf tree in my humble opinion this is obvious, hidden in the main texmf tree this can easily be forgotten.

  • For a couple of packages you can get test versions. These should in no way go into the normal package tree (with overwriting the stable version!). The local texmf directory is always searched first, and so, if there exist two versions of the same package, the test version ist found before the regular.

  • For some packages and utilities you can configure preferred settings, which will be saved in configuration files and are to be contained on an update of the TeX distribution. So they must be in a local tree. (Note: For this purpose there are special local trees pre-installed.)