Martin Scholz wrote:
Hi List,

is there a way in conTeXt how I can use a filename, so that I can write a text where I can refer to it for using it in the following scenario:

I need 4 documents with nearly the same content. what I like to do is to switch in the document depending on the called filename.

as I got a file called invoice.tex and create some links to this file called delivery.tex order.tex and so on and now call

texexec invoice.tex

or

texexec order.tex

I want the document to recognize in the first case that it is invoice and in the second case that it is order, so that I can use an if then else environment on the different parts where I can define the following

if{filename==invoice} then{print this content} else{}
if{filename==order} then{print this part of content} else{}

why not use modes:

\doifmode{invoice} {
  ...
}

and

texexec whatever.tex --mode=invoice


Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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