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 have found numerous guides on how to do this (heres a couple):

but I have a different directory structure and none of the places present in the answers are present on my system.

Using locate I have found these locations of existing 'texmf.conf' files:

ben@ben-OptiPlex-9010:~$ locate texmf.cnf
/etc/texmf/web2c/texmf.cnf
/usr/share/doc/texlive-doc/latex/pgfplots/texmf.cnf
/usr/share/doc/texlive-pictures-doc/latex/pgfplots/texmf.cnf
/usr/share/texlive/texmf/web2c/texmf.cnf
/usr/share/texmf/web2c/texmf.cnf

All of the texmf.conf files (I ignore the ones embedded in /usr/share/doccontain lines that say something along the lines of do not edit this file directly). The options provided are:

  • /usr/share/texmf/web2c/texmf.cnf & /usr/share/texlive/texmf/web2c/texmf.cnf: Go and modify the texmf.cnf in ../../ which clearly does not exist. So create it? And in which location, texmf or texlive/texmf?

  • /etc/texmf/web2c/texmf.cnf: PLEASE DO NOT EDIT THIS FILE DIRECTLY. It is meant to be generated from files in /etc/texmf/texmf.d/ which only contains 00debian.cnf & 80tex4ht.cnff. Do I add a new one? Is the name important?

  • Go with what is suggested in some answers and just change the TEXMFHOME variable as I do with any other variable in Ubuntu (~/.pam_environment file these days)?

share|improve this question
add comment

1 Answer

On writing this question, I found a definitive answer in the TEX (Live) on Debian guide on tug.

This part explains the best option and why:

The central configuration file /etc/texmf/texmf. cnf is special, as it defines all search paths for (almost) all programs in the TEX world. All the paths mentioned above are defined in it, but other behaviour (such as various size and security settings) is also controlled via this file. Since many different packages can contribute to the final texmf.cnf, we adopted a method often used in Debian: We install separate parts of the con- figuration file into a special directory /etc/texmf/ texmf.d and generate the final file from these snippets. Therefore, if a system administrator wants to change some setting, he should change the respective file in /etc/texmf/texmf.d and call update-texmf. Take as an example the setting of TEXMFHOME: In /etc/texmf/texmf.d/05TeXMF.cnf one can find TEXMFHOME = $HOME/texmf. However, in my own institution’s installation we had the input files always in $HOME/texlib, which I wanted to preserve. So I change the given line in /etc/texmf/texmf.d/ 05TeXMF.cnf and call (as root) update-texmf. The problem with this approach is that upon upgrade, either I have to reject changes of the file 05TeXMF.cnf, or I have to change the settings after every change of 05TeXMF.cnf in the Debian package. Here a bit of KPSE magic helps: As earlier settings in texmf.cnf override later ones, I can add a file 03local.cnf to /etc/texmf/texmf.d and put the changed TEXMFHOME variable there. Similar changes can be made for all the other settings in texmf.cnf. If you really must change as a user some setting in texmf.cnf, you have to create your own texmf. cnf and override the TEXMFCNF variable

So to answer my question, it seems the best approach in the Debian version of TexLive 2012 is to:

  1. Create a 03local.cnf file in /etc/texmf/texmf.d/ and add my TEXMFHOME assignment to it

  2. Apply the changes by calling sudo update-texmf

share|improve this answer
4  
The answer given here is mostly correct. What is written applies to Debian/TeX Live 2009, but NOT to the Debian/TeX Live 2012 which is shipped in Debian wheezy and I don't know which Ubuntu. In Debian/TL2012 there is no 05TeXMF.cnf anymore, since kpse now reads all texmf.cnf files. That means, the best is to create a 00local.cnf in /etc/texmf/texmf.d and put the appropriate TEXMFHOME=... there. After that call (all written above) update-texmf (as root!) and that is it. –  norbert May 8 '13 at 4:02
    
Thanks, is there any difference between 00local.conf and 03local.conf? Or more significantly, what's the importance of the number and name? –  B T May 8 '13 at 4:17
    
@BT: I guess the names just define some ordering, so you could equally start with 4711foo.conf and continue with 5bar.conf. –  Martin Schröder May 8 '13 at 13:36
1  
The files in the directory are read in order, so using 00 at the beginning puts it in front of all definitions in other files. Other than that the name has no meaning. –  norbert May 13 '13 at 4:59
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.