A Report That Lays Itself Out

Placing a page by hand means knowing, before you write a word, how tall every paragraph will be. Translate one of them and every number below it is wrong; add a line to a table and the footnote lands on top of the page number. That bill arrives months later, when the report has to change and nothing in the code says which of its figures were holding it together.

Where the two pages divide is not chosen by hand either, which is why the French report and the English one below come out of one and the same program: the French runs longer, the break falls somewhere else, and nothing had to be adjusted for it. The only height anybody fixed in this example is the one the page number sits at — and that belongs to the page, not to anything said on it.

What This Example Shows

  • Blocks stacked in reading order: text, a table, rules and gaps.
  • A table cut row by row, its heading row repeated on the next page.
  • A paragraph held together rather than left with one line alone.

The Source Code, Complete

Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.

Read the Rust source Read the Python source Read the JSON source

The Document Itself

Open the document in English Open the document in French Open the document in German Open the document in Spanish Open the document in Italian Open the document in Portuguese

A Report That Lays Itself Out, first page

The Same Document in Other Languages

This document weighs 15.8 kB

Examples Near This One

Breaking an Overlong Word

A word longer than the column that holds it: the library leaves it whole, cuts it at the column's edge, or cuts it and closes the line on a hyphen.

Break Points After a Slash or a Hyphen

A justified column set four times: file paths and compounds running past the edge with no break points, wrapping where a break after a slash or a hyphen is allowed, then wherever their punctuation allows one, and last with no-break hyphens that keep each compound whole.

A Stack Laid out by Hand, One Box at a Time

A delivery slip poured into two boxes, the second taking up where the first stopped, and a poster whose picture no box can hold, each box saying what became of the stack in it.

A Font behind the Font

One line of statuses set twice: in a company font alone, where the characters it has no glyph for come out as empty boxes, then with a second font behind it that draws them.

Every example, by subject