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 got a very peculiar question I'd like to ask about my latex processor:

  • In my school we are using the pdfTeXk backend. At some point there was a need to make a few configuration changes within the /usr/share/texmf/web2c/texmf.cnf configuration file (essentially set some values).

  • However since it's the school server I'm working on, I don't have root access to modify that file. Instead, we were told to create a texmf folder ~/texmf under our home directory and put any additional packages and configuration files in there should we needed to. And so I did by creating ~/texmf/texmf.cnf and placing my custom settings in it.

Now, the system is set to look for its configuration files using an environmental variable called TEXMFCNF. The default configuration location can be checked by issuing kpsewhich texmf.cnf. The problem is that if I set it to point to my custom configuration folder at ~/texmf it will ignore the default one in /usr/share/texmf/web2c (which contains many other settings I need) and only fetch mine. The same happens the other way around.

Eventually the question is: How do I make latex fetch both of the texmf.cnf files?


(This question is an exact replica of this one: http://stackoverflow.com/questions/11854289/how-does-latex-source-multiple-configuration-files and is posted here after suggestion of the user Andrea Bergia)

share|improve this question

1 Answer 1

According to the Kpathsea manual,

Kpathsea reads all 'texmf.cnf' files in the search path, not just the first one found; definitions in earlier files override those in later files. Thus, if the search path is '.:$TEXMF', values from './texmf.cnf' override those from '$TEXMF/texmf.cnf'.

In the TEXMFCNF variable you can use colons to separate several paths to search for texmf.cnf files in. An empty path entry should correspond to searching the system paths. Thus, you should be able to set TEXMFCNF to "~/texmf/:" (with a trailing colon) to have the system use settings from your texmf.cnf, if present, and use the system settings otherwise.

share|improve this answer

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.