ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \par in macro definition (mkii issue)
@ 2012-01-18 21:59 Otared Kavian
  2012-01-18 22:07 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Otared Kavian @ 2012-01-18 21:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \par in macro definition (mkii issue)
  2012-01-18 21:59 \par in macro definition (mkii issue) Otared Kavian
@ 2012-01-18 22:07 ` Wolfgang Schuster
  2012-01-18 22:38   ` Otared Kavian
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2012-01-18 22:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \par in macro definition (mkii issue)
  2012-01-18 22:07 ` Wolfgang Schuster
@ 2012-01-18 22:38   ` Otared Kavian
  0 siblings, 0 replies; 3+ messages in thread
From: Otared Kavian @ 2012-01-18 22:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 493 bytes --]


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

[-- Attachment #1.2: Type: text/html, Size: 885 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-18 22:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-18 21:59 \par in macro definition (mkii issue) Otared Kavian
2012-01-18 22:07 ` Wolfgang Schuster
2012-01-18 22:38   ` Otared Kavian

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).