Summary
texmath Typst writer currently emits deprecated Typst symbol names for intersection operators:
\cap -> sect (deprecated; should be inter)
\bigcap -> sect.big (deprecated; should be inter.big)
Pandoc currently carries a downstream compatibility workaround (Issue #11591, PR #11592), but this should be fixed upstream in texmath.
Reproduction
Using texmath directly (REPL, readTeX -> writeTypst):
Expected
\cap emits inter
\bigcap emits inter.big
Root cause
writeTypst builds a map from Typst.Symbols.typstSymbols. That symbol list includes both:
inter / inter.big
- and deprecated aliases
sect / sect.big
When converted with Data.Map.fromList, duplicate-codepoint resolution picks the later entry, resulting in deprecated names being emitted.
Proposed fix
In Text.TeXMath.Writers.Typst, explicitly override the two codepoints after building the symbol map:
U+2229 -> inter
U+22C2 -> inter.big
Also add/update Typst writer tests to lock this behavior.
Summary
texmathTypst writer currently emits deprecated Typst symbol names for intersection operators:\cap->sect(deprecated; should beinter)\bigcap->sect.big(deprecated; should beinter.big)Pandoc currently carries a downstream compatibility workaround (Issue #11591, PR #11592), but this should be fixed upstream in
texmath.Reproduction
Using
texmathdirectly (REPL,readTeX -> writeTypst):Input:
\bigcap_{i=0}^{\infty}{A \cap B}Current output:
sect.big_(i = 0)^oo A sect BInput:
\capCurrent output:
sectExpected
\capemitsinter\bigcapemitsinter.bigRoot cause
writeTypstbuilds a map fromTypst.Symbols.typstSymbols. That symbol list includes both:inter/inter.bigsect/sect.bigWhen converted with
Data.Map.fromList, duplicate-codepoint resolution picks the later entry, resulting in deprecated names being emitted.Proposed fix
In
Text.TeXMath.Writers.Typst, explicitly override the two codepoints after building the symbol map:U+2229->interU+22C2->inter.bigAlso add/update Typst writer tests to lock this behavior.