Overlong text in a narrow cell

Overlong text in a narrow table cell: left to overflow the column, or cut to it.

A table whose column is narrower than some of the words that have to go in it — a dish name, a product description, a customer's company. The same table is laid out twice: above as the names come, below cut to the column.

This is the table-shaped version of the overlong word, and it is the same setting, made per cell. Which answer is right depends on the document: a delivery note would rather overflow than lie, a fixed-width label would rather cut. The engine takes the instruction and never decides on its own.

What this example shows

  • Cell text left to overflow its column, or cut at the edge.
  • The setting made per cell rather than for the whole table.
  • Both outcomes shown on one page, from the same rows.

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

First page of Overlong text in a narrow cell

What this document weighs

Before 112,900 bytes
Now 42,653 bytes
Saved 62.2 %

Not one mark on the page changed. See every document measured.

Examples near this one

A self-paginating table

A long table handed over whole, deciding for itself where the pages break: its heading on top of every page, its footnote under every page, its grey grounds stated once for the whole table, and a note you draw under each page at the exact place the table reports.

Cells merged down the rows

A specification sheet whose cells are merged down the rows: each group named once beside all of its rows, with one note beside them; the thin lines stop at those cells' edges, and a note too long for the rows it covers makes them grow.

Columns measured from their cells

One parts list twice: four columns sharing the width equally, then the reference, the quantity and the price each as wide as their own widest cell and the description given everything they leave.

Every example, by subject