MkIV: \processbetween and command with optional argument
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
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 -----------------------------------------------------------------
On Feb 13, 2008 4:52 PM, Hans Hagen
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
Wolfgang Schuster wrote:
On Feb 13, 2008 4:52 PM, Hans Hagen
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 -----------------------------------------------------------------
On Feb 13, 2008 6:21 PM, Hans Hagen
Wolfgang Schuster wrote:
On Feb 13, 2008 4:52 PM, Hans Hagen
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
participants (2)
-
Hans Hagen
-
Wolfgang Schuster