ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MkIV: \processbetween and command with optional argument
@ 2008-02-13 13:33 Wolfgang Schuster
  2008-02-13 15:52 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2008-02-13 13:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

LuaTeX hangs in the following example, it is related to the optional argument
for \startTEST.


\def\startTEST
  {\dosingleempty\dostartTEST}

\long\def\dostartTEST[#1]#2\stopTEST
  {\bgroup
   \processaction
     [#1]
     [bold=>\bf,
      italic=>\it
      unknown=>\tf]%
   #2%
   \egroup}

\def\TEST#1%
  {\startTEST#1\stopTEST}

\def\defineTEST[#1]%
  {\processbetween{#1}{\TEST}}

\defineTEST[MYTEST]

\starttext

\startMYTEST
text
\stopMYTEST

\startMYTEST[bold]
text
\stopMYTEST

\stoptext


Greetings,

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV: \processbetween and command with optional argument
  2008-02-13 13:33 MkIV: \processbetween and command with optional argument Wolfgang Schuster
@ 2008-02-13 15:52 ` Hans Hagen
  2008-02-13 16:16   ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2008-02-13 15:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> Hi,
> 
> LuaTeX hangs in the following example, it is related to the optional argument
> for \startTEST.

unrelated to luatex ... processbetween takes args one by one


\def\dostartTEST[#1]%
   {\bgroup
    \processaction
      [#1]
      [bold=>\bf,
       italic=>\it,
       unknown=>\tf]}

\def\dostopTEST
   {\egroup}

\def\defineTEST[#1]%
   {\setvalue{start#1}{\dosingleempty\dostartTEST}%
    \setvalue{stop#1}{\dostopTEST}}

\defineTEST[MYTEST]




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV: \processbetween and command with optional argument
  2008-02-13 15:52 ` Hans Hagen
@ 2008-02-13 16:16   ` Wolfgang Schuster
  2008-02-13 17:21     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2008-02-13 16:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Feb 13, 2008 4:52 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Wolfgang Schuster wrote:
> > Hi,
> >
> > LuaTeX hangs in the following example, it is related to the optional argument
> > for \startTEST.
>
> unrelated to luatex ... processbetween takes args one by one

and why did it work with pdfTeX?

> \def\dostartTEST[#1]%
>    {\bgroup
>     \processaction
>       [#1]
>       [bold=>\bf,
>        italic=>\it,
>        unknown=>\tf]}
>
> \def\dostopTEST
>    {\egroup}
>
> \def\defineTEST[#1]%
>    {\setvalue{start#1}{\dosingleempty\dostartTEST}%
>     \setvalue{stop#1}{\dostopTEST}}
>
> \defineTEST[MYTEST]

And can't use this method, I have to read the content between
\startTEST and \stopTEST in my module because the content
is processed twice to get information from the the first pass in
the second pass.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV: \processbetween and command with optional argument
  2008-02-13 16:16   ` Wolfgang Schuster
@ 2008-02-13 17:21     ` Hans Hagen
  2008-02-14  9:36       ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2008-02-13 17:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Feb 13, 2008 4:52 PM, Hans Hagen <pragma@wxs.nl> wrote:
>> Wolfgang Schuster wrote:
>>> Hi,
>>>
>>> LuaTeX hangs in the following example, it is related to the optional argument
>>> for \startTEST.
>> unrelated to luatex ... processbetween takes args one by one
> 
> and why did it work with pdfTeX?

i don't know ... maybe test with \tracingall and compare what happens


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV: \processbetween and command with optional argument
  2008-02-13 17:21     ` Hans Hagen
@ 2008-02-14  9:36       ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2008-02-14  9:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Feb 13, 2008 6:21 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Wolfgang Schuster wrote:
> > On Feb 13, 2008 4:52 PM, Hans Hagen <pragma@wxs.nl> wrote:
> >> Wolfgang Schuster wrote:
> >>> Hi,
> >>>
> >>> LuaTeX hangs in the following example, it is related to the optional argument
> >>> for \startTEST.
> >> unrelated to luatex ... processbetween takes args one by one
> >
> > and why did it work with pdfTeX?
>
> i don't know ... maybe test with \tracingall and compare what happens

done, problem found.

the following command in toks-ini.tex cause the freeze in mkiv:

\def\dograbuntil#1#2%
  {\long\def\next##1#1{#2##1}\next}

the correct definition should be

\def\dograbuntil#1#2%
  {\long\def\next##1#1{#2{##1}}\next}

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2008-02-14  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-13 13:33 MkIV: \processbetween and command with optional argument Wolfgang Schuster
2008-02-13 15:52 ` Hans Hagen
2008-02-13 16:16   ` Wolfgang Schuster
2008-02-13 17:21     ` Hans Hagen
2008-02-14  9:36       ` Wolfgang Schuster

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