Re: [possible bug] kpsewhich gets confused by trailing slash
Olaf Weber <[email protected]> Tue, 01 Nov 2005 14:28:46 +0100
| Newsgroups | gmane.comp.tex.tetex.general |
|---|---|
| Message-ID | <[email protected]> |
Thomas Esser writes:
>> My $HOME env var was set to "/home/thomas/". Running "kpsewhich
> Any search path that uses $HOME/something ends up with a
> double shash if $HOME ends with a slash. So, what you observe
> is the documented behaviour. Read about the special meaning
> of double slashes in the kpathsea manual (texdoc kpathsea or
> http://tug.org/teTeX/tetex-texmfdist/doc/programs/kpathsea.pdf).
> Moral: don't use a trailing slash in $HOME (unless $HOME == / which is
> handled as a special case in kpathsea).
Actually, it would help to systematically replace `$HOME' with `~' in
texmf.cnf, e.g, from
TEXMFHOME = $HOME/texmf
to
TEXMFHOME = ~/texmf
In the first case, the generic variable-expanding code is invoked,
which doesn't try to eliminate spurious slashes. In contrast, if the
code that expands a `~' uses the value of `$HOME' it knows it is a
special case and will strip a trailing slash.
--
Olaf Weber
(This space left blank for technical reasons.)