Support explicit footnote numbers

\footnotemark[n] and \footnotetext[n]{...} left the bracket text in the line
and ignored the requested number. The footnote pass now reads an optional
bracketed integer: \footnotemark[n] emits that marker (and advances the counter
to it), while \footnotetext[n] attaches its body to the pending note with that
number, creating the entry when the mark appeared elsewhere in the paragraph.

A test uses mark and text with [7], checks "(7)" and the deferred body render
with no warnings, and that no "[7]" text leaks.
This commit is contained in:
gloamxun committed 2026-10-27 02:30:01 +08:00
1 parent d3baa78e1e
commit f05723808c
4 files changed
+67 -14

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