Re: environment variable
Thomas Esser <[email protected]>
| Newsgroups | gmane.comp.tex.tetex.general |
|---|---|
| Message-ID | <[email protected]> |
> Some years ago I had been experimenting with things like this and it
> worked indeed. It didn't work with arbitrary variables, but in this
> case $HOME is part of the filename.
It works up to teTeX-2.0.2. Variables which the kpathsea library expands
correctly can be used.
$ cd /tmp
$ mkdir TEST
$ echo 'foo=/tmp/TEST' > /tmp/texmf.cnf
$ echo '\input $foo/test.tex\bye' > x.tex
$ echo hi > /tmp/TEST/test.tex
$ TEXMFCNF=.: /t/2.0.2/i/bin/i686-pc-linux-gnu/tex x
This is TeX, Version 3.14159 (Web2C 7.4.5)
(./x.tex (/tmp/TEST/test.tex) [1] )
Output written on x.dvi (1 page, 208 bytes).
Transcript written on x.log.
> I suppose that formerly the filename had been passed to a shell (which
> expanded $HOME) and nowadays a system call is used instead.
No, it is not the shell but the kpathsea library. Olaf Weber says about it:
Well, as far as I'm concerned the old implementation allowed this
by accident, rather than design. It should be an explicit feature,
and (IMO) possible to turn it on and off.
Thomas