Add chapter headings and chapter-prefixed numbering

This commit is contained in:
gloamxun committed 2026-10-19 14:23:53 +08:00
1 parent 6d4aa37189
commit a798221817
7 files changed
+68 -11

No files matched your search

+2 -1
View File
@@ -10,7 +10,8 @@ footnotes/`\thanks`; figure/table `[htbp]` placement approximations; page
styles (plain/fancy, `\thispagestyle`, fancyhdr headers/footers, `\thepage`);
geometry-aware `\textwidth`/`\textheight` named length registers; table of
contents and figure/table lists with dotted leaders; native PDF rectangles; unified pagination;
`\centering`/`\raggedright`/`\raggedleft` declarations and environments
`\centering`/`\raggedright`/`\raggedleft` declarations and environments;
chapter headings with chapter-prefixed section numbering
(`build_positioned_pages` is the only page builder and no separate break
planner remains).
+7 -4
View File
@@ -34,9 +34,11 @@ the source changes; the SVG preview is refreshed per page.
- Notes: `\footnote{...}` page-bottom insertion area with separator rule,
superscript markers, and title/author `\thanks`.
- Contents: `\tableofcontents`, `\listoffigures`, and `\listoftables`
generate headings plus entries from numbered sections and captioned
generate headings plus entries from numbered chapters/sections and captioned
figures/tables, with dotted leaders and page numbers resolved after
pagination.
- Chapters: `\chapter` is a level-0 heading; chapter numbers prefix section
numbers (`1.1`, `1.1.1`) and reset lower counters.
- Class sizes: 10pt/11pt/12pt set the body size and propagate through
headings, title material, lists, tables, block boxes, footnotes, and the
default paragraph indent (10/12pt use 15pt; 11pt uses 17pt).
@@ -63,8 +65,9 @@ See `docs/ROADMAP.md` for concrete implementation plans.
- Notes: footnotes inside captions, floats, or arbitrary boxes are not
collected; the insertion area currently follows the page where the paragraph
ends rather than the exact reference line.
- Contents: only numbered headings plus captions are listed; per-chapter
contents in book/report are not distinguished.
- Contents: chapter headings are listed with chapter-prefixed section
numbers, but contents are not split per chapter and `\chapter` does not
force a page break.
- Miscellaneous: a document-level `\renewcommand{\maketitle}` is ignored in
favor of the engine title block.
@@ -72,7 +75,7 @@ See `docs/ROADMAP.md` for concrete implementation plans.
- `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` (36 tests: 32 compiler
- `cargo fmt --check` passes; `cargo test --offline` (37 tests: 33 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