On 4/14/2020 11:25 AM, Gerben Wierda wrote:
This helps for adding information to my processing.

What I was also looking for is that I don’t have a test.tex anymore, just the 
XML file I am parsing and a command line action.

So, I use mtxrun, give it the name of an XML. lua code (using a ’script’ 
somewhere?) reads the XML, extracts a name (e.g. ‘foo’) from it, creates a .tex 
file (e.g. ‘foo.tex’), produces a .pdf file from that .tex file (e.g. 
‘foo.pdf').

G

On 14 Apr 2020, at 09:16, Taco Hoekwater <t...@elvenkind.com> wrote:

Hi Gerben,

What you want is quite easy to do since you are using lua already. Try this:

  % context --whatever=green test

with test.tex:

  \starttext
  \startluacode
  table.print(environment.arguments)
  \stopluacode
  \stoptext

everything from the command line ends up in environment.arguments.
\doifdocumentargument {whatever} {
    ... \getdocumentargument{whatever} ...
}


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to