Expand counter formatting commands

\arabic, \roman, \Roman, \alph, \Alph and \value with a counter name were
unsupported and leaked into the text. The body pass now reads the braced counter
name and replaces the command with its stored value in the requested form,
using the same counter table that \setcounter/\stepcounter fill.

A preview test sets section to 4 and checks "4 iv D 4." with no warnings.
This commit is contained in:
gloamxun committed 2026-10-27 03:24:00 +08:00
1 parent 1d1009395b
commit 8a5411af1d
4 files changed
+70 -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 **1045 tests**:
The workspace currently passes **1046 tests**:
| Suite | Tests |
| --- | --- |
| route-D unit (engine) | 439 |
| engine binary unit | 415 |
| engine binary unit | 416 |
| server integration | 63 |
| v1 integration | 71 |
| pdfLaTeX oracle | 42 |