[pdftex] kpathsea environment variables

Geoffrey Alan Washburn geoffw at cis.upenn.edu
Wed Sep 7 15:45:14 CEST 2005

Karl Berry wrote:

>    > that it doesn't have some way of listing/querying which environment
>    > variables it is currently configured to examine.  
>As Thomas mentioned, it is an open-ended list.
>If you run kpsewhich --debug somefile.someext you will see exactly what
>it searches for, although admittedly that's not a user-friendly list of
>environment variables.
>It would not be hard to add some kind of option to list the envvars
>searched for a given (or all) file types, or perhaps include the info in
>the --help output.  (A related suggestion, from Nelson Beebe, is to be
>able to show the variables/config values/etc. when a search fails.  I
>guess they didn't make it into this year's code, unless I'm missing it.)
>Anyway, before actually making changes, I'm not sure environment
>variables are enough (as I believe Thomas also mentioned).  In practice,
>most values are set in the texmf.cnf config file, not via environment
>So, Geoff, what are you really trying to do?  Can you give any more
    There are a couple things I am working on where this comes up. 

The first is a tool I maintain for generating shell scripts that manage 
a user's environment.  If a configuration file says to extend 
environment variable FOO, it will output the appropriate to do so 
(export FOO=bar or whatnot).  However, if FOO is a kpathsea environment 
variable, the tool should make sure that it includes the empty extension 
(export FOO=:bar) to make sure that the default search path isn't lost.  
The question is how should this tool decide what is a kpathsea variable 
and what is not?  Right now it is hardcoded, and there is a mechanism 
that authors of configuration files can declare a variable as a kpathsea 

The second is a replacement for make that I use/work with, omake.  It is 
sufficiently programmable that it provides as part of its standard 
library a function for building a LaTeX document from a specified source 
file (calculating the appropriate dependencies along the way).   This 
function, as currently written, knows to take the omake arrays TEXINPUTS 
and BIBINPUTS and convert them environment variables before invoking 
latex.  However, it doesn't know about BIBINPUTS, T1FONTS, etc. The 
developers think that hardcoding all kpathsea environment variables 
isn't a viable solution, so it would be better if it they could instead 
query kpathsea to find out which language level arrays should be 
interpreted as kpathsea environment variables.

[Geoff Washburn|geoffw at cis.upenn.edu|http://www.cis.upenn.edu/~geoffw/]

More information about the pdftex mailing list