Skip to content

TeX reader: accept empty delimiters in \genfrac - #300

Merged
jgm merged 1 commit into
jgm:masterfrom
Don-Yin:fix-genfrac-empty-delims
Oct 20, 2026
Merged

jgm merged 1 commit into
jgm:masterfrom
Don-Yin:fix-genfrac-empty-delims

Conversation

@Don-Yin

@Don-Yin Don-Yin commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

\genfrac{}{}{0pt}{}{a}{b} currently fails because the delimiter parser consumes the closing } of an empty argument.

I reused one delimiter parser for both arguments and left an unescaped } for the surrounding braces parser. This allows either delimiter to be empty while preserving escaped and unbraced delimiters.

The regression covers both empty delimiters, either side empty, lineless/normal/display fractions, and unbraced nonempty delimiters.

Validation (GHC 9.10.3):

  • Before: cabal test --test-show-details=direct fails only genfrac-empty (1 of 3160 tests).
  • After: the same command passes all 3160 tests.

@jgm
jgm merged commit ddc2530 into jgm:master Oct 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants