parse: add AMS lowercase-greek variants \varkappa and \digamma - #4
Merged
Conversation
An unknown control sequence in the math layer drops the WHOLE equation group, so a single missing symbol silently deletes real content. \varkappa was absent from the greek table though \kappa and every other var-variant (\varphi, \varrho, \vartheta, \varpi, \varsigma, \varepsilon) were present; on one arXiv article (2606.18084) it occurs 12 times and dropped two display groups. amssymb defines exactly two lowercase-greek variants beyond the standard block: \varkappa (ϰ U+03F0) and \digamma (ϝ U+03DD). Add both as clsOrd. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tannevaled
added a commit
that referenced
this pull request
Aug 31, 2026
Three of the commands the go-tex/engine corpus reports as dropped formulas live
here, not in the engine.
\triangleleft and \triangleright were missing. They are BINARY operators at U+25C1
and U+25B7 — unicode-math-table.tex:704/694, and fontmath.ltx:264-265 declares both
\mathbin — and they are not the ⊲ ⊳ of \vartriangleleft/right already in the table,
which amssymb makes relations: the two pairs differ in glyph and in spacing. 98
dropped formulas over the arXiv corpus.
\genfrac{left}{right}{thickness}{style}{num}{den} is amsmath's generalised
fraction (amsmath.sty:245-250):
\edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
\csname @@\ifx @#3@over\else above\fi
\ifx\@tempa\@empty \else withdelims\fi\endcsname}
so an EMPTY thickness means \over — the font's own rule — and any other means
\above that thickness, 0pt being no rule at all. That is how \binom itself is
defined: \genfrac()\z@{} (amsmath.sty:240). The style argument is TeX's digit: 0
display, 1 text, 2 script, 3 scriptscript, empty keeping the style in force. Both
real uses in the corpus are the delimited no-rule form — a q-binomial written
\genfrac[]{0pt}{}{n}{k} and \genfrac{\{}{\}}{0pt}{} — and 88 formulas were dropped
for it. The delimiters arrive UNBRACED there, as TeX takes single tokens for
arguments, which readOptionalDelim handles beside {} for "no delimiter this side".
\z@ needs its own note: this parser has no catcodes, so amsmath's own spelling of
zero arrives as \z and @, and read as \z alone it would draw a rule where the
binomial wants none. The @ that follows a control word is absorbed with it.
Documented reduction: a non-zero explicit thickness draws the font's rule rather
than that exact width, since fraction() takes its thickness from the font's MATH
table.
tannevaled
added a commit
that referenced
this pull request
Aug 31, 2026
Three of the commands the go-tex/engine corpus reports as dropped formulas live
here, not in the engine.
\triangleleft and \triangleright were missing. They are BINARY operators at U+25C1
and U+25B7 — unicode-math-table.tex:704/694, and fontmath.ltx:264-265 declares both
\mathbin — and they are not the ⊲ ⊳ of \vartriangleleft/right already in the table,
which amssymb makes relations: the two pairs differ in glyph and in spacing. 98
dropped formulas over the arXiv corpus.
\genfrac{left}{right}{thickness}{style}{num}{den} is amsmath's generalised
fraction (amsmath.sty:245-250):
\edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
\csname @@\ifx @#3@over\else above\fi
\ifx\@tempa\@empty \else withdelims\fi\endcsname}
so an EMPTY thickness means \over — the font's own rule — and any other means
\above that thickness, 0pt being no rule at all. That is how \binom itself is
defined: \genfrac()\z@{} (amsmath.sty:240). The style argument is TeX's digit: 0
display, 1 text, 2 script, 3 scriptscript, empty keeping the style in force. Both
real uses in the corpus are the delimited no-rule form — a q-binomial written
\genfrac[]{0pt}{}{n}{k} and \genfrac{\{}{\}}{0pt}{} — and 88 formulas were dropped
for it. The delimiters arrive UNBRACED there, as TeX takes single tokens for
arguments, which readOptionalDelim handles beside {} for "no delimiter this side".
\z@ needs its own note: this parser has no catcodes, so amsmath's own spelling of
zero arrives as \z and @, and read as \z alone it would draw a rule where the
binomial wants none. The @ that follows a control word is absorbed with it.
Documented reduction: a non-zero explicit thickness draws the font's rule rather
than that exact width, since fraction() takes its thickness from the font's MATH
table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An unknown control sequence in the math layer drops the whole equation group, so a single missing symbol silently deletes real content.
\varkappawas absent from the greek table even though\kappaand every other var-variant (\varphi,\varrho,\vartheta,\varpi,\varsigma,\varepsilon) were present. On one arXiv article (2606.18084)\varkappaoccurs 12 times and dropped two display groups.amssymbdefines exactly two lowercase-greek variants beyond the standard block:\varkappa(ϰ U+03F0) and\digamma(ϝ U+03DD). Both added asclsOrd.TestAddedSymbolsgains\varkappa,\digamma, and combinations; full suite green.