From: Henning Hraban Ramm <texml@fiee.net>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: using command line arguments
Date: Mon, 28 Oct 2024 13:41:03 +0100 [thread overview]
Message-ID: <8ed465bc-e5a4-4900-bd83-d4e5018b29dc@fiee.net> (raw)
In-Reply-To: <ea384520-7385-41e9-a3d6-d4de98d80e34@uni-bonn.de>
Am 28.10.24 um 13:01 schrieb Thomas A. Schmitz:
> On 28.10.24 12:18, Henning Hraban Ramm wrote:
>> Hi, I’m trying to use a command line argument in parameter names –
>> color name in the example below, variable namespace in my actual project.
>> I guess I need more expansion, but where?
>> Or what’s the problem here?
>
> Perhaps my approach is too simplistic, but if I had to do something like
> that, I would use modes:
>
> \startmode [fiee]
> \definecolor [OEM] [c=1]
> \def{OEM}{fiee}
> \stopmode
>
> and for the fallback, use
>
> \startnotallmodes [...]
>
> then you can call from the command line with --mode=fiee and write
>
> \color[OEM]{Company: \OEM}
>
> But maybe your needs are more complex...
Yes, I have several arguments that I don’t want to mix into modes.
In the end, I’ll need to process some files with Lua, but for the
prototype I’m defining groups of variables and would like to use one of
the parameters as variable namespace. I just tried to keep the example
simple.
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-10-28 12:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 11:18 [NTG-context] " Henning Hraban Ramm
2024-10-28 12:01 ` [NTG-context] " Thomas A. Schmitz
2024-10-28 12:41 ` Henning Hraban Ramm [this message]
2024-10-28 15:18 ` Wolfgang Schuster
2024-10-28 15:26 ` Henning Hraban Ramm
2024-10-28 17:54 ` Wolfgang Schuster
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=8ed465bc-e5a4-4900-bd83-d4e5018b29dc@fiee.net \
--to=texml@fiee.net \
--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).