Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Could you tell us which OS you use? –  Joseph Wright Aug 20 '10 at 21:54
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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