[tex-k] kpsewhich --var-value

jfbu jfbu at free.fr
Fri May 1 19:50:44 CEST 2015


Hi,

the kpathsea manual says 

http://tug.org/texinfohtml/kpathsea.html#Auxiliary-tasks

•  ‘--var-value=variable’ outputs the value of variable, expanding ‘$’ (see Variable expansion and ‘~’ (see Tilde expansion) constructs, but not performing other expansions.

but: 

$ env TEXMFHOME="/tmp" kpsewhich --var-value '$TEXMFHOME'

$ env TEXMFHOME="/tmp" kpsewhich --var-value TEXMFHOME
/tmp

This is a bash shell

Do I do something wrong ? 

$ export TEXMFHOME="/tmp"
$ kpsewhich -var-value TEXMFHOME
/tmp
$ kpsewhich -var-value '$TEXMFHOME'

$ 

Perhaps it is to be understood that if a texmf.cnf defines a variable then if this variable is queried, $ and ~ therein will be expanded ? 

I tried something else: 

$ export TMP1='$TMP2'
$ export TMP2='~'
$ kpsewhich -var-value '$TMP1'

$ kpsewhich -var-value '$TMP2'

$

regards,

Jean-François




More information about the tex-k mailing list