Paint rules and frames as native PDF rectangles

This commit is contained in:
gloamxun committed 2026-10-19 14:04:02 +08:00
1 parent 4aa1714923
commit be6f8859c2
36 files changed
+8967 -53

No files matched your search

+3 -3
View File
@@ -8,7 +8,9 @@ family and true scaled small caps; inline box geometry (`\fbox`, `\makebox`,
`\raisebox`), `\minipage`, `\vbox`/`\vtop` block approximations;
footnotes/`\thanks`; figure/table `[htbp]` placement approximations; page
styles (plain/fancy, `\thispagestyle`, fancyhdr headers/footers, `\thepage`);
and geometry-aware `\textwidth`/`\textheight` named length registers.
geometry-aware `\textwidth`/`\textheight` named length registers; table of
contents and figure/table lists; and native PDF rectangles for rules and
frames (vendored genpdf `fill_rect`/`draw_rect`, no image XObjects).
## 1. Unified pagination
@@ -34,7 +36,5 @@ and geometry-aware `\textwidth`/`\textheight` named length registers.
## 4. PDF painting and title blocks (remaining)
- Paint rules and frames as native PDF rectangles (`printpdf` operators)
instead of 1x1 image XObjects.
- Let a document-level `\renewcommand{\maketitle}` contribute a real title
block once the engine's title model can run box material.
+3 -3
View File
@@ -63,14 +63,14 @@ See `docs/ROADMAP.md` for concrete implementation plans.
- Contents: entries use infinite glue instead of dotted leaders and only
numbered headings plus captions are listed; per-chapter contents in
book/report are not distinguished.
- Miscellaneous: rules are painted with 1x1 images in PDF; a document-level
\renewcommand{\maketitle} is ignored in favor of the engine title block.
- Miscellaneous: a document-level `\renewcommand{\maketitle}` is ignored in
favor of the engine title block.
## Verification
- `examples/hello.tex`, `examples/boxes.tex`, `examples/compat.tex` compile to
one A4 page each; the arXiv template project compiles to 3 Letter pages.
- `cargo fmt --check` passes; `cargo test --offline` (32 tests: 28 compiler
- `cargo fmt --check` passes; `cargo test --offline` (33 tests: 29 compiler
integration tests + 4 server tests) covers the three examples, the arXiv
fixture, floats/newpage, page styles and `\thispagestyle`, SVG/PDF output,
project API, static frontend assets, path traversal, the legacy