Plan the remaining arXiv alignment work

This commit is contained in:
gloamxun committed 2026-10-19 19:10:42 +08:00
1 parent f167b4f4d1
commit aed9b5bb5f
1 file changed
+35
+35
View File
@@ -45,3 +45,38 @@ captions with the insertion area reserved on the caption page.
paragraphs) and splice it into the surrounding column. A fully independent
VBox still needs its own natural width, baseline, and nested line/box
children in the positioned renderer.
## 4. Remaining arXiv alignment work
These are the three items still visible when the arXiv fixture is compared with
the XeLaTeX/Overleaf reference.
### PDF link annotations
`printpdf 0.3.4` has no annotation API. The implementation path is to vendor
`printpdf`, add a `LinkAnnotation { rect, url }` list to `PdfPage`, and write
`/Annots` arrays plus `/Type /Annot`, `/Subtype /Link`, `/A << /S /URI /URI (...) >>`
dictionaries when `PdfDocument::save` builds each page object. On the engine
side, `Run`/`LineItem::Glyph`/`PositionedSpan` need a `link_url: Option<String>`
in addition to the existing `link: bool`; `PositionedPages::render` can then
collect absolute rectangles (page index, x, y, width, height) and hand them to
the printpdf writer.
### ORCID author icon
`orcid.pdf` is an image inside `\author`, but metadata currently keeps text
only. The title author-row renderer needs a positioned-image item that accepts an
x offset (the current `PositionedPageItem::Image` is pinned to x = 0) and a
small PNG/vector badge loaded from repository assets. The textual green `iD`
badge is the fallback until that image path exists.
### First-page paragraph break
The section-2 paragraph stops roughly two lines earlier than the reference
because `position_box` sees the reduced page goal used for the title-footnote
reserve, while the paragraph's post-reserve kern is added only after the whole
paragraph is placed. The fix is to split the page builder's notion of
"usable height for the current paragraph" from "height reserved after the
paragraph": the paragraph should be allowed to use the full body goal, and only
following blocks should see the reduced goal. Add a regression test comparing
the number of section-2 lines on page 1 with the reference fixture.