[texhax] Access to Windows environment variables from \input

Philip Taylor P.Taylor at Rhul.Ac.Uk
Mon Oct 6 21:15:09 CEST 2014

A TeX source needs to reference images from a location that is
host-dependent, and I had hoped to accomplish this by \inputting a
configuration file partially specified by a Windows environment
variable.  In essence :

D:\>set test=d:\
This is TeX, Version 3.1415926 (TeX Live 2013/W32TeX)
**\catcode `\% = \catcode `\a \input %test%/config.tex

However, not only does TeX (or XeTeX, or PdfTeX) not open the desired
file, the diagnostic is even more confusing :

(d:/TeX/Live/2013/texmf-dist/tex/latex/tools/.tex File ignored)
No pages of output.
Transcript written on texput.log.

Cam anyone explain (a) why the environment variable is not deferenced
when \input passes its parameter to the appropriate system internal, and
(b) why TeX /does/ open (or perhaps only try to open)
d:/TeX/Live/2013/texmf-dist/tex/latex/tools/.tex ?

Philip Taylor

More information about the texhax mailing list