ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using command line values in a TeX document; writing a script?
Date: Tue, 14 Apr 2020 09:16:33 +0200	[thread overview]
Message-ID: <F1341124-BDB2-4A6D-A4EF-E50925BEEA2B@elvenkind.com> (raw)
In-Reply-To: <FA34B6AE-B896-439C-8DE4-1FBEF0A36820@rna.nl>

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.

Best wishes,
Taco
___________________________________________________________________________________
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	other threads:[~2020-04-14  7:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13  8:29 Gerben Wierda
2020-04-14  7:16 ` Taco Hoekwater [this message]
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=F1341124-BDB2-4A6D-A4EF-E50925BEEA2B@elvenkind.com \
    --to=taco@elvenkind.com \
    --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).