A bare # kept what followed it - #359
Merged
Merged
Conversation
A # that is neither doubled nor followed by a parameter number is legal input
wherever it is an ARGUMENT rather than part of a definition. pgf's parser module
reads a token's category from the first two words of its \meaning, and needs #
itself to ask the question:
\edef\pgfparser@category@vi{\pgfparser@extractmeaning#}
Two defects met on that line.
scanBody consumed whatever followed a #, whatever it was, and stored it as a
parameter marker. Here that was the closing }: the body scan ran past the end of
its own group and absorbed the rest of the FILE into the definition.
pgfmoduleparser.code.tex died on its line 528, and with it \usepgfmodule{parser},
\usetikzlibrary{svg.path} and every document that loads them — including every
paper using the oup-authoring-template class, whose ORCID logo is an svg path.
TeX reports "Illegal parameter number", BACKS THE TOKEN UP and keeps the # as a
macro-parameter token (tex.web §479).
catName knew four of TeX's category names and answered "the character" for the
rest. The missing ones are load-bearing here: with # reported as "the character"
the module equated it with every ordinary character. All nine of print_cmd_chr's
names are now written out (tex.web §298).
Measured on the 154-paper corpus: Sigma 298 -> 298, glyphs +0 — the shape lives
in pgf's own sources, which are still behind GOTEX_PGF, so nothing in the corpus
moves. The expected values in both tests are tectonic's, checked side by side.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 12, 2026
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.
A
#that is neither doubled nor followed by a parameter number is legal input wherever it is an argument rather than part of a definition. pgf's parser module reads a token's category from the first two words of its\meaning, and needs#itself to ask the question:Two defects met on that one line.
scanBodyconsumed whatever followed a#and stored it as a parameter marker — here the closing}. The body scan then ran past the end of its own group and absorbed the rest of the file into the definition.pgfmoduleparser.code.texdied on its line 528, and with it\usepgfmodule{parser},\usetikzlibrary{svg.path}, and every document that loads them — including every paper using theoup-authoring-templateclass, whose ORCID logo is an svg path. TeX reports "Illegal parameter number", backs the token up and keeps the#as a macro-parameter token (tex.web §479).catNameknew four of TeX's nine category names and answered "the character" for the rest — so#compared equal to every ordinary character, which is exactly the comparison that module makes. All nine ofprint_cmd_chr's names are now written out (tex.web §298):\def\m#1{[\meaning#1]}\m#[the character #][macro parameter character #]\def\take#1{[\meaning#1]}\edef\r{\take#}[macro parameter character #]\m$,\m&,\m^,\m_the character …math shift/alignment tab/superscript/subscript character …Measured, 154-paper corpus: Σ 298 → 298, glyphs +0. The shape lives in pgf's own sources, which stay behind
GOTEX_PGF, so nothing in the corpus moves — this is a correctness fix that removes one of the reasons that gate cannot open.Found with the runaway trace from #358, which named the loop in one line.
Expected values in both tests are tectonic's, checked side by side.
🤖 Generated with Claude Code