2012-10-30 John Devereux:
What is the correct way to set or modify the search path for tex files?
I want to make it mode-dependent. For example, for figures I have something like
\doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]}
[...]
\setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}]
I want to be able to do for example
\input disclaimer
You can either trigger on the language or on the mode. The directory structure looks like this text/en/alpha.tex text/en/beta.tex text/de/alpha.tex text/de/beta.tex images/en images/de You can create the individual files as components and create a product file: \startproduct * \mainlanguage [de] \project [project] \component [a] \component [b] \stopproduct and a project file: \startproject * \startmode [*en] \usepath [text/en] \setupexternalfigures [directory={images/en}] \stopmode \startmode [*de] \usepath [text/de] \setupexternalfigures [directory={images/de}] \stopmode \stopproject To trigger by language, you use *en, *de, etc. To trigger by mode, you use the mode name, in that case you can move the \mainlanguage call to the corresponding language setup. Marco