On 11/6/2024 12:37 PM, Vítek Starý Novotný wrote:
Anyway, today I'm not in the mood to ponder semi colons, as it's the least of my worries,
I am very sorry to bother you and other ConTeXt devs with this. If it makes it feel any better, the LaTeX folks seem equally annoyed with me.
I'm not sure what "just %" means here.
These were Joseph Wright's words. I assume Joseph was referring to the fact that in e-TeX and LuaTeX, including a comment after a `\numexpr` causes the comment to be ignored by TeX, similarly to how in LuaLaTeX, including a semicolon causes parts of the following text to be ignored.
Here is an example file named `example.tex`:
``` \starttext \the\numexpr 1 + 2; 3 + 4 \stoptext ```
Well, that's just numexpr then, but how about: \def\fool{\hskip10pt plus 0pt} oeps \fool me oeps \fool minus me This whole lookahead scanning is fragile by design and just like one should define \def\fool{\hskip10pt plus 0pt\relax} one should also make sure an expression doesn't scan ahead, if only because it will expand whats coming next; basically \relax or matching () should have been mandate and it's a design flaw.
Running `context example.tex` produces the text "7". By contrast, running `context --luatex example.tex` produces the text "3; 3 + 4".
Ideally, the two commands would produce the same output.
Sure, but that leaves \hskip \vskip \hrule \vrule and some more.
What does luametatex bring to the latex table?
The expl3 programming language from LaTeX3 can be used in other formats as well, including plain TeX and ConTeXt with LuaTeX, among others. Packages (such as my Markdown package for TeX) use expl3 as a format-independent programming layer.
So maybe it's (at least for now) good to stick to luatex/mkiv, also because if markdown is the input there is not that much to gain from luametatex
However, since TeX Live 2024, expl3 can no longer be loaded, since LuaMetaTeX's `\numexpr` seems incompatible with e-TeX's and LuaTeX's `\numexpr`. This makes such packages unusable with ConTeXt LMTX, since loading expl3 with `\input expl3-generic` produces the following error:
tex error on line 7696 in file expl3-code.tex: Missing number, treated as zero
Joseph and I discuss this in https://github.com/latex3/latex3/issues/1518.
As mentioned there, we also cleaned up some function names (or moved some to another namespace); there's a reason why luatex was frozen and luametatex was the follow up. I can add a \etexexprmode=1 % to please latex but I wonder if it solves all the issues you can run into (for instance what happens when overload protection is active) 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 -----------------------------------------------------------------