From: Gerben Wierda <gerben.wierda@rna.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Using command line values in a TeX document; writing a script?
Date: Mon, 13 Apr 2020 10:29:31 +0200 [thread overview]
Message-ID: <FA34B6AE-B896-439C-8DE4-1FBEF0A36820@rna.nl> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1248 bytes --]
Currently, I process a file like this:
mtxrun --autogenerate --script context test12.tex
and in the file test12.tex one sees something like this:
\input archimate-mp
\ctxlua{moduledata.archimate(“myarchimatefile.xml")}
The latter parses the xml file and produces a PDF using generated MP code.
What I would like to do is not have to edit the .tex file when I want to process another .xml file but just pass the name of the xml file on the command line. And I would like to pass on a second filename with some local overrides settings fr my code. All of this needs to be data that I can use in my programming. E.g. something like:
mtxrun --autogenerate --script myscriptname “ myarchimatefile.xml” “myhelper.xml"
It is OK that this would produce a fixed name output file (e.g. myparsedxml.pdf), so it is OK to have some generic myparsedxml.tex (instead of test12.tex as per my example) file that produces a .pdf and more in the current working directory but resides somewhere in a generic place. But preferably, this would produce myarchimatefile.pdf
I’ve read the manual on mtxrun scripts to see if I can make my own, but I’m utterly failing to understand what is written in a way that let me write my own.
G
[-- Attachment #1.2: Type: text/html, Size: 2640 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2020-04-13 8:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 8:29 Gerben Wierda [this message]
2020-04-14 7:16 ` Taco Hoekwater
2020-04-14 9:25 ` Gerben Wierda
2020-04-14 9:52 ` Taco Hoekwater
2020-04-15 10:19 ` Gerben Wierda
2020-04-15 11:54 ` Wolfgang Schuster
2020-04-15 12:13 ` Gerben Wierda
2020-04-15 12:43 ` r.ermers
2020-04-14 10:05 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FA34B6AE-B896-439C-8DE4-1FBEF0A36820@rna.nl \
--to=gerben.wierda@rna.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).