Add inline framed fbox

This commit is contained in:
gloamxun committed 2026-10-19 13:03:05 +08:00
1 parent 32b0064e5f
commit 2552008d4b
11 files changed
+273 -28

No files matched your search

+4 -8
View File
@@ -6,15 +6,11 @@ are still missing. Each item names the files/functions to touch.
Completed: paragraph indentation (`\parindent`) and `\hfill`/`\hfil`; sans
family and true scaled small caps (see `docs/STATUS.md`).
## 1. Inline framed `\fbox`
## 1. `\minipage` and VBox
- Add `y_offset: Mm` to `PositionedSpan` and `PositionedRule`; PDF/SVG painters
add it to the baseline.
- Represent inline boxes as a nested `LineItem::Box { items, width, ascent,
depth, inset, raise, frame }`; the line breaker measures the content once and
advances by its width.
- Paint child items at `x + inset`, baseline `- raise`; draw frame rules at the
box rectangle when `frame` is set.
- Reuse the block `FramedBox` measurement with an explicit width and vertical
stacking; add `\begin{minipage}{width}` environment parsing.
- Add VBox material for `\vbox`/`\vtop` and nested vertical lists.
## 2. Footnotes
+5 -6
View File
@@ -12,9 +12,9 @@ the source changes; the SVG preview is refreshed per page.
- Headings: numbered `\section`/`\subsection`/`\subsubsection` and starred
`\section*` variants (starred headings do not advance the counter).
- Box material: `\rule` (raise/width/height), block `\fbox`, `\parbox`,
inline `\mbox`, `\makebox[width][align]`, `\raisebox`, `center`, `\hrule`
with `width`/`height`.
- Box material: `\rule` (raise/width/height), inline framed `\fbox`, block
`\parbox`, inline `\mbox`, `\makebox[width][align]`, `\raisebox`, `center`,
`\hrule` with `width`/`height`.
- Fonts: Liberation Serif/Sans/Mono faces, bold/italic/monospace/sans
declarations with group scoping, grouped text-style commands, true small caps
(lowercase uppercase glyphs at 80% size), and sans/serif/mono small caps.
@@ -37,8 +37,7 @@ See `docs/ROADMAP.md` for concrete implementation plans.
## Known approximations / gaps
- Boxes: `\fbox`/`\parbox` are block-level (an inline `\fbox` starts a block);
`\minipage` and VBox material are missing.
- Boxes: `\parbox` is block-level; `\minipage` and VBox material are missing.
- Pages: no footnote insertion area, no floats, no headers/footers (fancyhdr
commands are accepted as no-ops), planner and renderer are separate.
- Lengths: `\textwidth`/`\textheight`/`\linewidth`/`\columnwidth` are fixed
@@ -51,7 +50,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 --workspace` (19 tests) covers the three
- `cargo fmt --check` passes; `cargo test --workspace` (20 tests) covers the three
examples, the arXiv fixture, SVG/PDF output, project API, static frontend
assets, path traversal, the legacy `/texrra` endpoint, and page-hash cache
stability.