Resolve running marks in fancy headers

\markboth/\markright and the \leftmark/\rightmark placeholders were
unsupported. The page-geometry pass now consumes those mark assignments and
records the last left/right mark; the running-head text expands \leftmark and
\rightmark from that record (document-wide, not per page) before scrubbing, so
a fancy header or footer can carry the current short title.

A test sets \pagestyle{fancy}, \fancyhead[R]{\rightmark} and
\markboth{Left title}{Right title}, then checks the header text is
"Right title" with no warnings and no leaked \rightmark.
This commit is contained in:
gloamxun committed 2026-10-27 02:18:11 +08:00
1 parent 0728d78b29
commit c25c38f16a
4 files changed
+57 -6

No files matched your search

+2 -2
View File
@@ -14,12 +14,12 @@ cargo fmt --all -- --check
cargo test --workspace --offline
```
The workspace currently passes **1025 tests**:
The workspace currently passes **1026 tests**:
| Suite | Tests |
| --- | --- |
| route-D unit (engine) | 437 |
| engine binary unit | 396 |
| engine binary unit | 397 |
| server integration | 63 |
| v1 integration | 71 |
| pdfLaTeX oracle | 42 |