Fall back to the current heading for fancy marks

Running heads expanded \leftmark/\rightmark only from explicit
\markboth/\markright, so a fancy header using \rightmark stayed empty when the
document never set a mark. Document now exposes the per-page heading list from
the previous increment, and running_head_text falls back to the current numbered
heading (uppercased) when no explicit left/right mark is configured.

A two-page test with \rhead{\rightmark} and a section checks "1 INTRODUCTION"
appears in the header with no warnings.
This commit is contained in:
gloamxun committed 2026-10-27 02:46:34 +08:00
1 parent 9da0f136a4
commit 1e4eb2d5ab
4 files changed
+41 -9

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 **1033 tests**:
The workspace currently passes **1034 tests**:
| Suite | Tests |
| --- | --- |
| route-D unit (engine) | 437 |
| engine binary unit | 404 |
| engine binary unit | 405 |
| server integration | 63 |
| v1 integration | 71 |
| pdfLaTeX oracle | 42 |