Layout

This page is a workbench for the blog’s layout. Its paragraphs have different lengths and different kinds of punctuation, because a typesetting experiment should encounter more than the easiest possible input. Resize the window to change the measure: the words stay the same while Knuth–Plass adjusts their spacing, line breaks, and occasional hyphenation.

Paragraphs

A browser usually fills a line until the next word no longer fits, then starts another. Knuth–Plass considers the paragraph as a whole. Words behave like solid boxes, while the spaces between them can stretch or shrink. The compositor searches for a sequence of breaks with a low total cost, rather than accepting the first arrangement that happens to fit.

Long words such as approximation, interconnectedness, and typographical experimentation give the compositor more choices to make. English words can break at discretionary hyphens when that improves the paragraph. Those visible hyphens are not added to the underlying text: selecting and copying a sentence preserves its words.

Mixed formatting

An italic phrase has different proportions from its upright neighbors, and a bold phrase changes the visual weight of a line. An ordinary hyperlink remains selectable and keyboard-accessible. These changes in type are measured as part of the sentence, rather than forcing the whole paragraph back to browser layout.

The final line ends naturally instead of stretching across the page. Short paragraphs keep their own rhythm too:

One sentence.

Two words.

Blockquotes

The interesting unit is not always the word or the line. Sometimes it is the paragraph: a small collection of decisions whose consequences are easier to see together.

A normal blockquote stays in the main flow. To place a quotation beside the discussion instead, use an inset.

Images

An ordinary Markdown image uses the full content width:

An illustrated sun above two layers of green hills.

An image inset

The landscape sits beside this short paragraph. There is room for a little breathing space between the picture and the words.

This paragraph begins beside the same image. Its lines remain narrow while the picture occupies the right column, then widen when they pass its lower edge. That change should happen within the paragraph, not wait for a new one. A bold phrase, an italic observation, and a link to paragraph composition still belong to the sentence. They remain selectable text rather than becoming a collection of positioned pictures. As the discussion continues, the page returns to its ordinary measure. The image has made its contribution and the writing can use the whole width again, with no empty column reserved beneath the hills.

Quote insets

A quotation uses the same inset as an image.

This matters when the window changes size or a different font arrives. The quotation might gain a line, and the surrounding discussion must make room for it. The compositor works through the paragraphs in reading order, choosing narrower lines alongside the quote and wider ones below. On a small screen there is no useful second column, so the quotation simply appears before this discussion. Nothing needs to be hidden, and the underlying reading order remains the order in which the post was written.

Writing an inset

Place the directive between paragraphs. Keep blank lines around its contents so Markdown formatters preserve the closing marker.

:::inset

![Describe the image](/images/photo.jpg)

:::

For a quote, replace the image with a Markdown blockquote. A separate paragraph inside the inset can serve as an image caption.

Lists

Lists use the same type size and line height as ordinary paragraphs. Each level reserves 28px for its bullet or number, and wrapped lines align with the text rather than the marker. Knuth–Plass composes list paragraphs just like the rest of the page.

Bullet lists

  • A longer item shows how the compositor distributes space across several lines. The bullet stays beside the first line while the text continues at the same inset, with no extra indentation on subsequent lines.

  • List items can include bold text, emphasis, and ordinary links. A nested list adds another 28px of indentation without making its text smaller.

    1. Nested items use the same paragraph composition as their parents. Their numbers remain native list markers, so the document keeps its structure without JavaScript.

    2. Short items stay short.

Numbered lists

  1. An item can contain more than one paragraph. Its number belongs to the whole item, while each paragraph gets its own line breaks and spacing.

    This second paragraph aligns with the first paragraph’s text, not with its number. A 28px gap separates the paragraphs, just as it separates neighboring list items.

  2. Resize the window to see the list reflow, or print the page to let the browser choose line breaks for the paper. The marker column stays 28px wide in either case.

Code

Paragraphs with inline code, such as const measure = 640, deliberately keep ordinary browser wrapping. Code blocks preserve whitespace and scroll when needed:

const words = ["A", "paragraph", "is", "a", "small", "design."];
const measure = 640;

Explicit breaks and browser flow

A manual break should also remain explicit:
this line starts where the author asked it to start.

This paragraph opts out with the data-no-typeset attribute. It is an escape hatch for content whose layout should stay entirely with the browser, even when paragraph composition is enabled for the rest of the page.

Tables

ContentWide screensSmall screens
Ordinary textFull measureFull measure
Inset image or quoteRight column, with text beside itA block before the following text
Code and tablesBrowser layoutBrowser layout

Reading, copying, and printing

The page remains ordinary HTML: searchable, selectable, and readable without JavaScript. Links and emphasis survive reflow, and copying composed text removes the typesetter’s extra line breaks and visible hyphens.

Try printing the page. Insets return to the main flow, and the browser chooses fresh line breaks for the paper’s width. If the custom compositor cannot fit a paragraph on screen, that paragraph also keeps browser layout rather than forcing an unsuitable arrangement.