Skip to content

compiler: \pagestyle, \thispagestyle and \pagenumbering are accepted in the preamble (#321) - #322

Merged
GoKubar merged 1 commit into
mainfrom
agent/daniel-vpclaude/preamble-pagestyle
Sep 14, 2026
Merged

GoKubar merged 1 commit into
mainfrom
agent/daniel-vpclaude/preamble-pagestyle

Conversation

@d-q222

@d-q222 d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Closes #321, the unowned remainder of #258 ranked finding 11 (probe min2-pagestyle). Lane daniel-vpclaude (Claude Pro), announced on #2 first.

Cause: the three commands' body arms, honest no-ops since there's no header or footer rendering, sat after the _ if has_document && !in_body => unsupported_preamble catch-all. So \pagestyle{empty} in the preamble, where documents usually put it, was an error.

Fix: move the arms, unchanged, next to the other preamble-or-body arms (\numberwithin, \sisetup, \graphicspath).

Evidence

  • tests/preamble_page_commands.rs: all four preamble spellings report nothing and lay out identically to a bare preamble; the committed min2-pagestyle probe compiles with no errors. Both fail against main's parser.rs and pass with this change.
  • cargo test --no-fail-fast for the compiler: green.

Rest of rank 11: \lstset → #261; \hypersetup → #131; \small/\bfseries in a preamble macro already work on main; \baselinestretch → #292.

🤖 Generated with Claude Code

https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ

…in the preamble (GH#321)

The remainder of #258's ranked finding 11. Probe min2-pagestyle declares
\pagestyle{empty} in the preamble, and the compiler rejected it with "\pagestyle
is not supported in the document preamble".

The three commands already had body arms that are honest no-ops (there is no
header or footer rendering yet), but those arms came after the
`_ if has_document && !in_body => unsupported_preamble` catch-all. They now
sit with the other preamble-or-body arms (\numberwithin, \sisetup,
\graphicspath), unchanged.

tests/preamble_page_commands.rs: all four preamble spellings report nothing
and lay out identically to a preamble without them, and the committed
min2-pagestyle probe compiles with no errors. Both tests fail against main's
parser.rs and pass with this change.

Implementation-Agent: daniel-vpclaude (Claude Code, Claude Pro plan)
Commit-Executor: daniel-vpclaude, direct git (Cursor-limit fallback)
Co-authored-by: d-q222 <[email protected]>

Claude-Session: https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ
@GoKubar
GoKubar merged commit 8a625f8 into main Sep 14, 2026
17 of 20 checks passed
@GoKubar
GoKubar deleted the agent/daniel-vpclaude/preamble-pagestyle branch September 14, 2026 14:48
d-q222 added a commit that referenced this pull request Sep 14, 2026
) and \pagestyle family (#322) parser arms

parser.rs conflict: #322 added the pagestyle/thispagestyle/pagenumbering arms
where this branch (carrying #276's commit) added allowdisplaybreaks; kept both.
Regenerated supported-LaTeX artefacts and synced the Mac copy.

Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
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.

compiler: \pagestyle / \thispagestyle / \pagenumbering in the preamble are errors (#258 rank 11)

2 participants