\par in macro definition (mkii issue)
Hi, It seems that with the recent updates, I found that the following minimal example does not work in mkii, while it does in mkiv: \define[1]\MyTest{The test variable is #1.\par} \starttext Is this a bug in mkii? \MyTest{3} \stoptext Am I doing something wrong, or mkii has changed despite being officially « frozen », a side effect of the global warming…? :-) Best regards: OK PS: the version I am using is ConTeXt ver: 2012.01.16 18:33 MKII, and the error message says: (/context-minimal/tex/texmf-context/tex/context/base/spec-fdf.mkii)) Runaway argument? {The test variable is ##1. ! Paragraph ended before \complexdefine was complete. <to be read again> \par l.1 \define[1]\MyTest{The test variable is #1.\par } ? Process aborted
Am 18.01.2012 um 22:59 schrieb Otared Kavian:
Hi,
It seems that with the recent updates, I found that the following minimal example does not work in mkii, while it does in mkiv:
\define[1]\MyTest{The test variable is #1.\par}
\starttext Is this a bug in mkii? \MyTest{3} \stoptext
Am I doing something wrong, or mkii has changed despite being officially « frozen », a side effect of the global warming…? :-)
This is a limitation of the MkII version of the \define command, you can’t use \par in the replacement text but you can use \endgraf which does also end a paragraph. Wolfgang
On 18 janv. 2012, at 23:07, Wolfgang Schuster wrote:
[…] This is a limitation of the MkII version of the \define command, you can’t use \par in the replacement text but you can use \endgraf which does also end a paragraph.
Wolfgang
Thanks Wolfgang: indeed \def\MyTest#1{The test variable is #1.\par} works both in mkii and mkiv. There must be a reason for the behavior of \define in mkii, but that's fine: I'll use \endgraf, when I have to use mkii. Best regards: OK
participants (2)
-
Otared Kavian
-
Wolfgang Schuster