Marco Patzer <home...@lavabit.com> writes:

> 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

Hello Marco,

It looks like \usepath is the key to what I want, thank you. I don't
quite understand your overall structure. Is the "*" a literal "*" with
some special meaning, or are you using it as a placeholder for
something? Sorry if I am being dense.

I am not using the project/product/component system, perhaps I should
look into it again.

Hmmm, alpha.tex defines component "a", beta.tex defines "b", is that
right?


-- 

John Devereux
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to