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.

I would like to know if it's possible to change the default TEXMFHOME location. Partly because I dislike the idea of programs cluttering my home directory with non-hidden files or directories (such as ~/texmf/) and partly because I would like to be able to manually install new LaTeX packages wherever I like, for example in

/software/local-foo/
/software/local-bar/

I know I could change the TEXMFHOME environment variable, but is there also a per-user config file which could change where LaTeX & friends look for files?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

It's not clear from the question whether you have admin access to the master texmf.cnf file. If you do, then this is easier than if you do not!

Admin access available

In the case where for example you have a single-user machine and so write access to texmf.cnf in the installation directory, this is doable with no variable setting. You can find where this is using kpsewhich texmf.cnf: I see

palladium:~ joseph$ kpsewhich texmf.cnf
/usr/local/texlive/2012/texmf.cnf

You can then edit this file (with sudo if needed) and alter the TEXMFHOME line to point to where you want.

Admin access not available

The more common case, I think, if wanting to set things here is when you do not have admin access which is exactly why you want to set on a per user basis. Here, it seems you have to set at least one variable. There are two approaches.

The first is to set TEXMFHOME directly. This is clearly pretty easy, and is the recommended method unless you need to do more complex things.

The second approach is to set your system up to use a per user texmf.cnf file. This can go in a location of your choosing, but you will need to set the TEXMFCNF variable with something like

export TEXMFCNF=~/.texmf-config/web2c:

where the : is important as it makes this an additive change. You can then create a texmf.cnf file in this new location, and add whatever settings you want there (TEXMFHOME is just one possible). There is more detail on this in http://people.debian.org/~preining/TeX/TeX-on-Debian/ch2.html#s-sec-user-config-files.

share|improve this answer
    
How can I point the TEXMFHOME variable to two texmf folders? I came from miktex and was able to keep the default while adding a personal folder (same structure) as root. –  Anh Nov 10 '13 at 2:51
1  
@Anh You can have more than one location in the variable: separate them by colons (as is done for example in tex.stackexchange.com/questions/30494/…). –  Joseph Wright Nov 15 '13 at 18:22

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.