2

If I have images, or files that I \input or \include, I know I can use:

TEXINPUTS=/path/to/extra/dir pdflatex myfile.tex

... to allow Latex to find files not present in subdirectories in the current directory.

But, I'd rather not use TEXINPUTS as an environment variable on the command line - I'd prefer if there was something like a \texinputs macro that I could read or append to from inside Latex, so I could write my file as:

\edef\texinputs{\texinputs:/path/to/extra/dir}
\documentclass{...

... and then just run pdflatex myfile.tex on the command line (and have everything work as expected).

Is there a way to do this in Latex (that is, from inside a .tex file being processed by Latex)? (I'm aware that I could write a shell script, but then I have an additional file to think of; I'm also aware I could use something like arara (?) for this, but let's say I don't have the time at the moment to acquaint myself with a new tool).

sdaau
  • 17,079

0 Answers0