[NTG-context] LMTX incompatibility in \meaning breaks TikZ, other minor issues

Leah Neukirchen leah at vuxu.org
Thu Sep 22 14:23:48 CEST 2022


I'm trying to get tikz-cd to run on LMTX and some examples already
work fine, but I had a problem with text on arrows.

To reproduce:


A \arrow{r}{A} \NC B \NR

This builds fine on MkIV from TeXLive 2022 with LuaTeX, but on LMTX I get:

system          > ConTeXt  ver: 2022.09.11 20:44 LMTX  fmt: 2022.9.20  int: english/english
close source    > level 2, order 63, name 'tikzlibrarycd.code.tex'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
tex error       > tex error on line 8 in file ./tik.tex: Package pgfkeys Error: I do not know the key '/tikz/"{A}"{}' and I am going to ignore it. Perhaps you misspelled it.^^J...^^Jl.7 I think the culprit is a tikzcd arrow in cell 1-1

After a bunch of debugging, it turns out that LMTX breaks the TikZ 'quotes'
library, which works using code ala:

\def\tikz at enable@node at quotes{%
  \pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz at quote@parser}%
  \let\tikz at quotes@as\tikz at node@quotes at as%

The last part of the /-key is derived from \meaning, but in LMTX,
\meaning" is "the character U+0022 'quotation mark'"
and thus the key cannot be found.

I have patched TikZ for now to match for this alternate string too.

But perhaps it would be better for compatibility to agree with the
original TeX \meaning strings for the 7-bit ASCII subset at least.

I found another minor nit that's not really triggering a bug but still a
difference to LuaTeX: \eTeXrevision should expand to .2, but it
expands to 2 in MkIX.  There is some code out there which uses
constructions like
or even
\ifdim 0\XeTeXrevision pt > 0.9996pt

As LMTX doesn't care about this macro, this should be easy to adjust.

Leah Neukirchen  <leah at vuxu.org>  https://leahneukirchen.org/

More information about the ntg-context mailing list