[tex-live] TEXMFCNF variable

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed May 23 22:52:15 CEST 2012


Hello,

I would like to commit a patch for ConTeXt that obeys the built-in
TEXMFCNF variable, used for searching texmf.cnf file that sets all
other variables.


Last year the default value in TeX Live was a bit weird, so ConTeXt
was using the following:

$SELFAUTODIR
$SELFAUTOPARENT
$SELFAUTODIR/share/texmf-local/web2c
$SELFAUTODIR/share/texmf/web2c
$SELFAUTODIR/texmf-local/web2c
$SELFAUTODIR/texmf/web2c
$SELFAUTOPARENT
$SELFAUTOPARENT/share/texmf-local/web2c
$SELFAUTOPARENT/share/texmf/web2c
$SELFAUTOPARENT/texmf-local/web2c
$SELFAUTOPARENT/texmf/web2c

In other words:

2012/bin
2012
2012/bin/share/texmf-local/web2c
2012/bin/share/texmf/web2c
2012/bin/texmf-local/web2c
2012/bin/texmf/web2c
2012
2012/share/texmf-local/web2c
2012/share/texmf/web2c
2012/texmf-local/web2c
2012/texmf/web2c

or, if you want, for a typical linux distribution with binaries in /usr/bin:

/usr/bin
/usr
/usr/bin/share/texmf-local/web2c
/usr/bin/share/texmf/web2c
/usr/bin/texmf-local/web2c
/usr/bin/texmf/web2c
/usr
/usr/share/texmf-local/web2c
/usr/share/texmf/web2c
/usr/texmf-local/web2c
/usr/texmf/web2c

This year TeX Live's default (much better than last year) was set to
the following:

$SELFAUTOLOC
$SELFAUTOLOC/share/texmf-local/web2c
$SELFAUTOLOC/share/texmf/web2c
$SELFAUTOLOC/texmf-local/web2c
$SELFAUTOLOC/texmf/web2c
$SELFAUTODIR
$SELFAUTODIR/share/texmf-local/web2c
$SELFAUTODIR/share/texmf/web2c
$SELFAUTODIR/texmf-local/web2c
$SELFAUTODIR/texmf/web2c
$SELFAUTOPARENT/../texmf-local/web2c
$SELFAUTOPARENT
$SELFAUTOPARENT/share/texmf-local/web2c
$SELFAUTOPARENT/share/texmf/web2c
$SELFAUTOPARENT/texmf-local/web2c
$SELFAUTOPARENT/texmf/web2c

What I don't understand is: why is $SELFAUTOLOC needed at all? With
other words, the search order of texmf.cnf would be the following:

2012/bin/i386-linux,
2012/bin/i386-linux/share/texmf-local/web2c,
2012/bin/i386-linux/share/texmf/web2c,
2012/bin/i386-linux/texmf-local/web2c,
2012/bin/i386-linux/texmf/web2c,
2012/bin,
2012/bin/share/texmf-local/web2c,
2012/bin/share/texmf/web2c,
2012/bin/texmf-local/web2c,
2012/bin/texmf/web2c,
/texmf-local/web2c,
2012,
2012/share/texmf-local/web2c,
2012/share/texmf/web2c,
2012/texmf-local/web2c,
2012/texmf/web2c,

and the values of variables set on top locations win over the ones set
on lower/last ones. In the language of a typical linux distribution it
doesn't get any less weird with the first five:

/usr/bin,
/usr/bin/share/texmf-local/web2c,
/usr/bin/share/texmf/web2c,
/usr/bin/texmf-local/web2c,
/usr/bin/texmf/web2c,
/usr,
/usr/share/texmf-local/web2c,
/usr/share/texmf/web2c,
/usr/texmf-local/web2c,
/usr/texmf/web2c,
/../texmf-local/web2c,
/,
/share/texmf-local/web2c,
/share/texmf/web2c,
/texmf-local/web2c,
/texmf/web2c,

Did anyone actually request adding $SELFAUTOLOC?

On the other hand, it could be handy to have $HOME/texmf/web2c (or
whatever is used as $TEXMFHOME by default on different systems), even
though I'm not aware of implications.

Also, there's always a chicken-and-egg problem. If Richard Koch sets
TEXMFHOME to be $HOME/Library/texmf ... there is no way for TEXMFCNF
to find $HOME/Library/texmf/web2c. The same is true for any weird path
that user wants to choose for TEXMFLOCAL. The above settings for
TEXMFCNF will only work for predictable texmf-local paths anyway.

Mojca


More information about the tex-live mailing list