Breaking a paragraph up, and aligning it
A paragraph broken into lines, set four ways: left, right, centred, justified.
Hand over the words; it works out where each line ends, where each column stops and where each page breaks.
You give it a paragraph. It measures every word, decides where each line ends, and pours what is left onto the next line, the next column, the next page. Nobody counts characters and nobody guesses how much will fit.
It also settles the awkward cases a person would otherwise have to notice by hand: a word too long for its column, the places inside a word where it may be split, a pair of words that must not be parted across a line, a heading that has to shrink rather than run off the edge. Two entire novels are laid out this way, chapters and all.
Every one of these is a real PDF this library wrote, with the source that wrote it.
A paragraph broken into lines, set four ways: left, right, centred, justified.
A word too wide for its column: left whole, or cut to the edge.
A justified column set twice: the long words breaking at their soft hyphens with a hyphen shown, or left whole, and a figure a no-break space keeps together.
A justified column set twice: file paths and compounds running past the edge with no break points, then wrapping where a break after a slash or a hyphen is allowed.
One long passage poured into three columns, each fitting the lines its height allows and handing the rest to the next.
The same two paragraphs six ways: the indents, the room around a paragraph, its last line, its first line.
A contents page whose entries are led to their page numbers by dots the layout draws.
A paragraph whose style changes inside it: size, underline, colour.
The same tabulated rows under each of the three methods, then a contents block whose dots run out to a stop on the right. A tabulation can step on from wherever the text stopped, land on the regular grid of a typewriter, or aim at a stop of its own, on which the text that follows starts, centres, or lines up by its decimal point.
Bulleted, numbered and nested lists, each built out of a hanging indent and one tab stop rather than out of list machinery: the marker sits in the room the indent opens, and every line below the first begins where the tabulation put the text.
What a document says about itself — DRAFT, COPY, PAID — laid across boxes of four different shapes and scaled to each.
Headings of different lengths shrunk to share one column, and a label turned a quarter turn up the page's spine.
A public-domain English novel read into its twelve chapters and laid out across sixty numbered pages, behind a contents you can click, each chapter opening a page of its own and the engine choosing every line break.
The same layout on a French text: thirty-seven chapters over a hundred and sixty-nine pages, drawing the accented alphabet, so the font kept inside the file carries every shape a wider alphabet needs.