Hi all,
this is the most bizarre bug I've ever seen in context. I would be
grateful if others could try to replicate it. Test file:
\startbuffer[test]
<document>
<hskip width="1em"/>Materiam vati da Venus alma tuo.
</document>
\stopbuffer
\startxmlsetups xml:testsetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|
hskip}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:document
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:hskip
\hskip\xmlatt{#1}{width}
\stopxmlsetups
\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext
This gives an error with the latest lmtx (2020.11.19 11:28, linux 64 bit):
tex error > tex error on line 10 in file ./xmltest.tex: Valid
keyword expected, likely 'minus'
<lua output> Ma
teriam vati da Venus alma tuo.
<macro> \22>:xml:document #1->\xmlflush {#1}
<lua output> }
<macro> \22>:xml:process #1->\xmlregistereddocumentsetups
{#1}{#1}\xmlmain {#1}
<macro> \lxml_process ...ocument {#3}#2{#3}{#4}\setcatcodetable
\notcatcodes \doifelsenothing {#5}{\xmlsetup
{#3}{xml:process}}{\xmlsetup {#3}{#5}}
\endgroup
Thomas A. Schmitz schrieb am 20.11.2020 um 22:44:
Hi all,
this is the most bizarre bug I've ever seen in context. I would be grateful if others could try to replicate it. Test file:
\startbuffer[test] <document> <hskip width="1em"/>Materiam vati da Venus alma tuo. </document> \stopbuffer
\startxmlsetups xml:testsetups \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{document| hskip}{xml:*} \stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups
\startxmlsetups xml:hskip \hskip\xmlatt{#1}{width}
\hskip\xmlatt{#1}{width}\relax
The file compiles cleanly if I give the --luatex switch.
Now for the bizarre part: if you delete the capital M of "Materiam" or replace it by any other capital letter, the file compiles. What's going on here?
Optional arguments (e.g. plus/minus values for \hskip) for commands are handled different in LMTX but it was always recommended to add \relax after the last value. Wolfgang
On 11/20/20 10:52 PM, Wolfgang Schuster wrote:
[...] Optional arguments (e.g. plus/minus values for \hskip) for commands are handled different in LMTX but it was always recommended to add \relax after the last value.
Hi Wolfgang, the same would apply to \vskip, wouldn’t it? Many thanks for your help, Pablo -- http://www.ousia.tk
On 11/20/20 10:52 PM, Wolfgang Schuster wrote:
[...] Optional arguments (e.g. plus/minus values for \hskip) for commands are handled different in LMTX but it was always recommended to add \relax after the last value.
Hi Wolfgang,
the same would apply to \vskip, wouldn’t it? also for \hrule and \vrule (and in pdftex/luatex some backend related
On 11/21/2020 2:09 AM, Pablo Rodriguez wrote: primitives); primitives like \hbox have their keyword scan terminated by a leftbrace token Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Pablo Rodriguez
-
Thomas A. Schmitz
-
Wolfgang Schuster