Am 28.10.24 um 16:18 schrieb Wolfgang Schuster:
Henning Hraban Ramm schrieb am 28.10.2024 um 12:18:
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?
""" \setupbodyfont[plex,18pt]
% set \OEM to the parameter name, fall back to "fiee" \expanded\define\OEM{\expanded\doifelsedocumentargument{OEM} {\expanded\getdocumentargument{OEM}}{fiee}}
\doifelsedocumentargument{OEM} {\def\OEM{\getdocumentargument{OEM}}} {\def\OEM{fiee}}
or
\def\OEM {\ifempty{\getdocumentargument{OEM}}% fiee% \else \getdocumentargument{OEM}% \fi}
Thank you, both works (of course, if you say so…). Also in my actual project. Can you explain why \define\OEM{\doifelsedocumentargument{OEM}{\getdocumentargument{OEM}}{fiee}} doesn’t? Hraban