A whole novel in French

A hundred and sixty-nine pages of a French novel, and not one of them placed by hand. This is Jules Verne's Le tour du monde en quatre-vingts jours, published in 1873 and long out of copyright, laid out by the same short program that laid out the English book beside it. Neither novel is a translation of the other: they come out looking alike because one program lays them both out. Thirty-seven chapters over that many pages is roughly where a layout stops being a demonstration and starts being a test — a chapter that opens in the wrong place, or a running head left on a page it does not belong to, shows on the page. A chapter is marked differently here: a line carrying the number alone, where the English book writes the word CHAPTER before it. That is the only thing said about it, and the chapter openings and the running heads follow from it in both books.

What makes it harder is the alphabet. A French text draws the accented letters as well as the plain ones, so the font kept inside the file carries more letter shapes than an English text asks for. Only the shapes the book actually draws are kept, never the whole font, which is why a hundred and sixty-nine pages of prose still fit into about five hundred thousand bytes — the weight of one photograph. The chapter names are set the way French sets them rather than in the capitals the text came in, because capitals in French lose the accents that tell two words apart.

What this example shows

  • A French text with all its accented letters, from one carried font.
  • The same program as the English book, set in another language.
  • Thirty-seven chapters over a hundred and sixty-nine numbered pages.

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

Examples near this one

Breaking an overlong word

A word longer than the column that holds it: the library leaves it whole, or cuts it at the column's edge.

Break points after a slash or a hyphen

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.

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