[tex-live] texdoc can't find texmf.cnf

Reinhard Kotucha reinhard.kotucha at web.de
Wed Jun 25 23:09:21 CEST 2008

Frank Küster writes:
 > Manuel Pégourié-Gonnard <mpg at elzevir.fr> wrote:
 > > Hmmm... really?  Unless I missed something, kpse takes its values
 > > from all texmf.cnf files (which can be user-specific in
 > > TEXMFCONFIG), and also from environment variables, so on the
 > > contrary this is user-specific if the user wants to.
 > Does it?

Yes and no.  texmf.cnf files are never user-specific and are not
searched in TEXMFCONFIG.  The only exception is if you set the
environment variable TEXMFCNF, but I pray for years not to do this
because it is more confusing than helpful.

A variable in texmf.cnf can be overwritten by an environment variable.
This also works if a perticular variable is not defined in texmf.cnf.
I didn't know this before, but:

   texdoc hyperref

starts xpdf and

   TEXDOC_VIEWER_PDF=acroread texdoc hyperref

starts acroread.

 > I always thought that only one texmf.cnf is read, since it must be
 > read in order to define the paths to look at, and its search path
 > is hardcoded in the binary?

No, the following texmf.cnf files are read (in this order) if they exist: 

(1)  /usr/local/texlive/2008/bin/x86_64-linux/texmf.cnf
(2)  /usr/local/texlive/2008/bin/texmf.cnf
(3)  /usr/local/texlive/2008/texmf.cnf
(4)  /usr/local/texlive/2008/texmf/web2c/texmf.cnf

Variables you set in a particular file are *not* overwritten by files
which are read later.

The default is (4).  If you have to customize texmf.cnf, the best thing
you can do is to put only the variables you want to change into (3).

(1) is quite useful for system dependent configuration.  On
multi-platform installations you could create a file
/usr/local/texlive/2008/bin/win32/texmf.cnf on the server which
contains the single line

  OSFONTDIR = $SystemRoot/Fonts

and this only affects Windows clients, even if (3) contains the line 

  OSFONTDIR = /usr/share/fonts.

 > > Is it that good to take things out of texmf.cnf?  A very handy
 > > thing with kpathsea is that it takes care for us of precedence
 > > when variables are set in multiple config file or environment
 > > variables.
 > >
 > > But of course some things must be moved out of texmf.cnf, like
 > > rm_command, since as Reinhard obeserved those are
 > > system-specific.
 > I don't know whether it is a good idea to have parts of texdoc's
 > configuration in texmf.cnf (except the definition of the doc paths,
 > which are also used by other applications), and parts elsewhere.  

Maybe what you said depends on the expectation that there can be
user-specific texmf.cnf files in TEXMFCONFIG.

I personally prefer a config file, for instance
$TEXMFHOME/texdoc/texdoc.cnf.  texmf.cnf is not very useful for
user-specific stuff.


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the tex-live mailing list