9

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.

1
  • Could you tell us which OS you use?
    – Joseph Wright
    Commented Aug 20, 2010 at 21:54

3 Answers 3

3

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.

3
  • 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. Commented Aug 20, 2010 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. Commented Aug 20, 2010 at 23:27
  • @Geoffry: I intended this question to be os neutral.
    – Caramdir
    Commented Aug 21, 2010 at 9:28
3

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....

2

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
  • 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.
    Commented Aug 20, 2010 at 23:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .