Definition of \doframedparentparameter
Hi, I have a question about \doframedparentparameter from pack-rul.mkiv: \def\doframedparentparameter#1#2{\ifx#1\relax\doframedrootparameter#2\else\doframedparameter#1{#2}\fi} When the else branch is taken, it picks up the second argument, but when the if branch is taken, it just picks up the first letter of the argument (since the braces are missing). Is that intended? When there are braces in the else branch there should also be braces in the if branch. Marco
On 28-5-2012 16:48, Marco wrote:
Hi,
I have a question about \doframedparentparameter from pack-rul.mkiv:
\def\doframedparentparameter#1#2{\ifx#1\relax\doframedrootparameter#2\else\doframedparameter#1{#2}\fi}
When the else branch is taken, it picks up the second argument, but when the if branch is taken, it just picks up the first letter of the argument (since the braces are missing). Is that intended? When there are braces in the else branch there should also be braces in the if branch.
normally #1 is a \cs and helpers like \doframedparentparameter are not user commands (in the commandhandler variant {#1} is used but \framed is not yet using that code) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2012-05-28 Hans Hagen
\def\doframedparentparameter#1#2{\ifx#1\relax\doframedrootparameter#2\else\doframedparameter#1{#2}\fi}
normally #1 is a \cs and helpers like \doframedparentparameter are not user commands
I was talking about the second argument #2. If #2 is always a command, then you can write \def\doframedparentparameter#1#2{\ifx#1\relax\doframedrootparameter#2\else\doframedparameter#1#2\fi} if not, then \def\doframedparentparameter#1#2{\ifx#1\relax\doframedrootparameter{#2}\else\doframedparameter#1{#2}\fi} but the actual definition is neither of them, that is what confused me. Marco
participants (2)
-
Hans Hagen
-
Marco