Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recognize \bgroup as an opener for readBalanced #2342

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

dginev
Copy link
Collaborator

@dginev dginev commented Apr 1, 2024

Fixes #2335

Based on a small pdftex test, the current latexml behavior is correct.
We are just emitting an extra error for the case where \bgroup was used as the opener for a balanced read with $require_open set to true.

\def\foo#1{bar #1 baz}

% does NOT treat \bgroup as {
\foo\bgroup hello}

% treats \bgroup as {
T5.8:
\expanded\bgroup\meaning\egroup}

% also treats \bgroup as {
\lowercase\bgroup SMALL}

\bye

Recognizing tokens that were \let to { seems to be appropriate, even if I am not sure it matches 100% the original implementation.

I also updated the POD with slightly more recent information.

@dginev
Copy link
Collaborator Author

dginev commented Apr 1, 2024

Background: I freshly reproduced this error in the Rust port, so decided to come back and understand the root cause better.

@dginev dginev changed the title recognize \bgroup as an opener for readBalanced $require_open=true recognize \bgroup as an opener for readBalanced Apr 1, 2024
@brucemiller brucemiller merged commit a189c60 into brucemiller:master Apr 2, 2024
13 checks passed
@brucemiller brucemiller deleted the expanded-egroup-patch branch April 2, 2024 00:03
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.

pdftex_expanded test regression
2 participants