48 lines
2.0 KiB
Markdown
48 lines
2.0 KiB
Markdown
# Roadmap: remaining structural work
|
|
|
|
This file lists the concrete implementation plans for the foundational items that
|
|
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`
|
|
|
|
- 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.
|
|
|
|
## 2. Footnotes
|
|
|
|
- Parser: capture `\footnote{...}`/`\thanks{...}` into a per-paragraph list
|
|
with a number marker run (superscript approximation via smaller raised text
|
|
once y offsets exist).
|
|
- Page model: add a footnote area to the page goal; the planner must reduce the
|
|
text height and place footnotes with a separator rule at the bottom.
|
|
- Paint footnotes as normal positioned lines after the page's content.
|
|
|
|
## 3. Floats
|
|
|
|
- Classify figure/table blocks as floats with `[htbp]` placement hints.
|
|
- Planner: maintain pending floats and try top/bottom/page placements; keep
|
|
reading order for text and defer floats when they do not fit.
|
|
- Renderer: place deferred floats at the saved slots; page keys must include
|
|
float placement decisions.
|
|
|
|
## 4. Page styles / headers-footers
|
|
|
|
- `DocumentModel` fields for header/footer runs and `\pagestyle`/`\thispagestyle`.
|
|
- Paint headers/footers in the page margins in both PDF and SVG; page numbers
|
|
need a page index placeholder resolved at paint time.
|
|
|
|
## 5. Unified pagination
|
|
|
|
- Extract the current duplicated planner (`build_page_break_plan`) and renderer
|
|
(`build_positioned_pages`) vertical logic into one page builder returning an
|
|
ordered list of placed items, then use it for both page-break decisions and
|
|
final painting.
|