[texhax] Local search path

Uwe Lueck uwe.lueck at web.de
Mon Oct 25 12:08:55 CEST 2010

"Steve Schwartz" <s.schwartz at imperial.ac.uk>, 25.10.2010 11:34:38:
> On Mon, 2010-10-25 at 10:08 +0100, Thierry wrote:
>> Is there a way to tell pdflatex to search for files in these
>> directories WITHOUT making explicit reference to 
>> the complete path in the \input, \include and 
>> \usepackage command?
>> I known that for picture files it is possible with the command
>> \graphicspath
>> from the package graphicx
>> What for .sty files and .tex files, and any other files?
>> May be I could play with a texmf.cnf file to add some subdirectories: 
>> "pictures", "styles", "inputs" etc... in the TEXINPUTS variable.
> This is the obvious way to do it, but I guess it depends on your
> operating system as to how you go about setting your personal TEXINPUTS
> variable. You should read the FAQ at
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tempinst
> In my linux system, for example, my .cshrc file sets up my shell
> environment variables something like:
> setenv TEXINPUTS .:/usr/share/latex2html/texinputs:/home/sjs/mylatex//:
> The trailing // will descend recursively into sub-directories of
> mylatex, so I put all my things there (you could have subdirectories of
> styles, inputs, etc.; or you could add specific directories to
> TEXINPUTS. The leading "." ensures tex searches the current working
> directory, although that is probably unnecessary. I'm not 100% sure that
> the graphicx package uses these paths, but you already know how to
> specify the graphicspath.

On the LaTeX level (instead of the system level), Donald Arseneau's 'import' package,


seems to provide at least partial solutions. I expect that achieving the feature with \usepackage is difficult ...

HTH -- Uwe.

More information about the texhax mailing list