Sometimes it would be convenient to have several versions of a package installed at once. For example I’d like to have a development version of TikZ for my own work and the current stable version to test whether code I share works with it.

Is there a standard way to do this?

Edit: I’m using Linux and TL 2010.


From texmf/web2c/texmf.cnf, "You can set an environment variable to override TEXMF if you're testing a new TeX tree, without changing anything else."

If you don't want a full TeX tree, you can use the TEXMFHOME environment variable to point that at something other than ~/texmf. For example,

export TEXMFHOME=~/texmf-testing

Then install the testing versions of packages in there.

  • Due to some unfathomable design decisions made back in its MS-DOS days, export TEXMFHOME=~/texmf-testing won't work on Windows systems. If you're not running Windows, all well and good. If you are, then you'll either need to use symlinks or reset your TEXMFHOME in a new command shell then launch latex etc. from that new shell. – Geoffrey Jones Aug 20 '10 at 23:22
  • @Caramdir. Just noted you updated your question for Linux. Although TH's answer involving export is clearly best for you, I'll leave my alternative (symlinks) answer stand for anyone interested in taking a Windows system path. – Geoffrey Jones Aug 20 '10 at 23:27
  • @Geoffry: I intended this question to be os neutral. – Caramdir Aug 21 '10 at 9:28

The only way I can think of right now is to have several local trees with different package versions in them. Then you could hook the trees in your distribution. In e.g. MikTeX it is fairly easy to change the order in which trees are searched. Just make sure that the package you want to use is in the first tree.

This is however by far not an automated process....


I don't think this would be hard to automate at all. Providing your environment exposes symlinks (linux and windows do, mac presumably as well), it should be pretty easy to set up a little script to switch various subtrees in and out. Include a call to texhash or whatever your distro gives you and you should be flying in no time at all. : )

  • 1
    Mac OS X has been a *nix OS for the better part of a decade. It has standard symlinks as well as classic Mac OS aliases. – TH. Aug 20 '10 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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