[tex-k] Kpathsearch tilde expansion bug

Reinhard Kotucha reinhard.kotucha at web.de
Fri Nov 28 23:25:22 CET 2008

Ajit Thakkar writes:
 > On WinXP, tilde expansion does not work as expected with kpathsea v3.57 and
 > v3.56.
 > ~ is expanded to $HOMEDRIVE$HOMEPATH _even_ if $HOME has been set.
 > A work around is to use $HOME instead of ~ in texmf.cnf

Hi Ajit,
it works as specified.  ~ expands to $HOME on Unix and to
%USERPROFILE% on Windows.  If you prefer %HOME% on Windows it's
necessary to replace ~ by $HOME in texmf.cnf.  The current behavior is
desired because otherwise there cannot be a single texmf.cnf file for
all platforms.  Note that %HOME% is usually undefined on Windows.

I doubt that it is very safe to replace ~ by %HOME% by default if it
exists.  Such intelligence is often more confusing then helpful.  I
encountered some conflicts between MSYS and Cygwin files sharing the
same $HOME directory.  They had been caused by different line-break
conventions and maybe other things too.  Thus, it makes more sense to
me that people who prefer %HOME% on Windows maintain things like this


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-k mailing list