Text Poured into Columns

A newsletter, a leaflet, the terms on the back of an order form: as soon as a page holds more words than one column can carry comfortably, the text has to run from the foot of one into the head of the next. It is a common layout, and the answer changes the moment a single word does.

Here the passage is measured once and then poured: the first column takes as many lines as its height allows, hands the rest to the second, and the second to the third. A break written into the text ends a column early, as the second one ends here, and what follows starts at the head of the next. Add a sentence at the top and everything below it shuffles down of its own accord, across all three. A thin rule is drawn round each column on this page, so the text can be seen reaching the foot of one and carrying on at the head of the next.

What This Example Shows

  • One passage running from the foot of a column into the head of the next.
  • Three columns on one page, each with a rule drawn round it.
  • Each column taking the lines its own height allows, or stopping at a break written into the text.

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

Text Poured into Columns, first page

The Same Document in Other Languages

This document weighs 14.5 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.

Every example, by subject