[NTG-context] Using command line values in a TeX document; writing a script?

Taco Hoekwater taco at elvenkind.com
Tue Apr 14 11:52:30 CEST 2020

> On 14 Apr 2020, at 11:25, Gerben Wierda <gerben.wierda at rna.nl> 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').

When processing XML, I normally use 
   context —environment=whatever.tex file.xml

with whatever.tex being a mix of tex and lua to setup and process the XML directly,
perhaps including other XML files as needed.

But when you need to extract stuff and rename files, a Makefile or shell script
comes more naturally (at least for me).


More information about the ntg-context mailing list