[NTG-context] problem in kpse.rb

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Sun Sep 17 05:13:38 CEST 2006

> path = run("--expand-path=\\\$#{varname}") rescue ''
> to
> path = run("--expand-path=\$#{varname}") rescue ''

I also ran into this (a few weeks ago on the list) and the patch I
sent Hans after testing it on my Ubuntu Linux laptop was to use two


so that Unix sees the command as, for example,

  kpsewhich --expand-path=\$TEXMFLOCAL

which prevents the shell from expanding TEXMFLOCAL as a shell or
environment variable, leaving it for kpse to find it in texmf.cnf.
Interesting that \$ also works.  I guess the \ gets passed unchanged,
so the $ still gets procted from the shell.

By the way, the rescue '' doesn't do anything, since a failed run of
kpsewhich doesn't throw an exception.  I think I have a patch for

Hans, should I resend those patches?


`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

More information about the ntg-context mailing list