![](https://secure.gravatar.com/avatar/4ef22a1266a5927ed03d35e073127820.jpg?s=120&d=mm&r=g)
Is it possible to specify an external graphics directory either as an
environment variable, or as a command line option to `context', instead
of writing `\setupexternalfigures [directory=../../foo]'? I tried the
environment variable setting
TEXINPUTS=../../foo::
as in http://www.tex.ac.uk/FAQ-graphicspath.html, and the command line
option
--path=../../foo
for `context', but neither works in my Linux environment. I would like
to avoid cluttering ConTeXt files with system paths.
Thanks and regards,
Raghu.
--
N. Raghavendra
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Thu, Oct 19 2017, N. Raghavendra wrote:
Is it possible to specify an external graphics directory either as an environment variable, or as a command line option to `context', instead of writing `\setupexternalfigures [directory=../../foo]'?
Yes. Command: "context --arguments=imagedir=../../foo file" File: "\setupexternalfigures[directory=\env{imagedir}]" -- Peter
![](https://secure.gravatar.com/avatar/4ef22a1266a5927ed03d35e073127820.jpg?s=120&d=mm&r=g)
At 2017-10-23T17:45:05+02:00, Peter Münster wrote:
Yes. Command: "context --arguments=imagedir=../../foo file" File: "\setupexternalfigures[directory=\env{imagedir}]"
Thank you, this works perfectly. It led me also to the
\getvariable{environment}{...}, \getdocumentargument, and
\do*documentargument commands, which may be useful later on.
Regards,
Raghu.
--
N. Raghavendra
participants (2)
-
N. Raghavendra
-
Peter Münster