![](https://secure.gravatar.com/avatar/be49110e195f5eac47c04570251121c1.jpg?s=120&d=mm&r=g)
The code below seems ok in \startsection[title=] but not when I program the parameter collection with \def\setupparameters{\getparameters[prefix]} In that case even [title={enclosed value}] crashes with error message: Use of \doMacro doesn't match its definition. Obviously I am missing something here. What? \def\Macro{\dosingleargument\doMacro} \def\doMacro[#1]#2{#1X#2} The code below shows that it should be possible. \startsection[title=\Macro{arg} no braces needed]\stopsection \startsection[title={\Macro[arg1]{arg2} enclosed in braces}]\stopsection \stoptext dr. Hans van der Meer
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 6/7/2021 6:17 PM, Hans van der Meer wrote:
The code below seems ok in \startsection[title=] but not when I program the parameter collection with \def\setupparameters{\getparameters[prefix]} In that case even [title={enclosed value}] crashes with error message: Use of \doMacro doesn't match its definition. Obviously I am missing something here. What?
\def\Macro{\dosingleargument\doMacro} \def\doMacro[#1]#2{#1X#2}
The code below shows that it should be possible. \startsection[title=\Macro{arg} no braces needed]\stopsection \startsection[title={\Macro[arg1]{arg2} enclosed in braces}]\stopsection \stoptext
just prevent expansion: \protected\def\Macro{\dosingleargument\doMacro} \def\doMacro[#1]#2{#1X#2} and when you're in adventurous mode (which i know you are) try this: \protected\tolerant\def\Macro[#1]#;#2% {\ifparameter#1\or#1:\fi#2} and when you for some reason do wan tto expand then, as in, do: \edef\foo{\expand\Macro[arg1]{arg2}} etc etc Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Hans van der Meer