Links and marks on placed text
Links and marks hung on text the engine has already placed: a band behind a line, an underline, a boxed cell — every rectangle taken from what the layout and the table report afterwards, none of it measured by hand.
The hard part of a link on text is not the link: it is knowing where the line ended up. So the text and the table are drawn first and then asked where each line and each cell landed, and the marks are hung on the rectangles they report.
A pale band is painted behind a paragraph's first line, one line is underlined and made clickable, and one table cell is boxed and made clickable. Nothing on the page is measured by hand, which means the marks stay right when the text is edited, translated or set in another font.
What this example shows
- The exact position of every line, reported by the layout once it has run.
- The exact position of a cell, asked for by its row and its column.
- Highlights, underlines and clickable areas built from those positions.
The code, in full
The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.
The document itself
The same document is written in each of these languages. Open the one you want to look at.
Open the document in English
Open the document in French
Read the Rust source
Read the Python source