← All essays

On the Quiet Craft of Typesetting Mathematics

4 min read Download PDF

Abstract

Mathematics on the web is too often an afterthought — a blurry image, a font that fights the body text, a number that drifts out of alignment. This essay argues that equations are prose too, and shows what it takes to set them properly: pre-rendered glyphs, auto-numbered cross-references, and one source of truth shared by the page and the print.

Good typography is invisible. You notice it only by its absence — when a line breaks badly, when a heading crowds the text beneath it, when an equation sits a little too low and a little too pale against the paragraph it belongs to. Mathematics suffers this neglect more than most, because for a long time the web had no good way to set it at all (Bringhurst, 2004).

That has changed. The constraint now is not capability but discipline: deciding that an equation is a sentence, and setting it with the same care.

Equations are prose

Consider the most over-quoted equation in physics, the mass–energy equivalence in Equation 1. Inline, the relation E=mc2E = mc^2 should share the body font's rhythm; set as a display, it earns its own line and a number you can point at later.

E=mc2E = mc^2(1)

A number is not decoration. It is an address. When a later paragraph refers back to Equation 1, the reader should be able to find it without scrolling blindly — and the reference should renumber itself if the manuscript is reordered. Doing this by hand is how errors creep in; doing it in the pipeline is how they stay out.

The same holds for a slightly less familiar friend, the Gaussian in Equation 2, whose normalising constant is easy to misremember and easy to mistype:

f(x)=1σ2πe(xμ)22σ2f(x) = \frac{1}{\sigma\sqrt{2\pi}}\, e^{-\frac{(x-\mu)^2}{2\sigma^2}}(2)

A figure is an argument

Prose persuades in a line; a figure persuades at a glance. Figure 1 is a logarithmic spiral — the curve a nautilus approximates as it grows, and a reminder that the most durable mathematics is often the most ordinary.

A logarithmic spiral, drawn as a single monochrome stroke.
Figure 1. A logarithmic spiral, drawn as a single monochrome stroke.

Figures, like equations, deserve numbers and captions that travel with them. A caption is not an afterthought tacked beneath an image; it is the one piece of text a hurried reader is guaranteed to see.

Tables hold the evidence

Where a figure shows shape, a table holds detail. Table 1 gathers a few faces a mathematical document might lean on, and what each is quietly good at.

Table 1. A handful of typefaces and the work they do well.
Typeface Role Strength
Source Serif 4 Body text Calm, readable at length
KaTeX (Computer Modern) Mathematics Familiar, consistent metrics
Inter Headings, UI Neutral, sharp at small sizes

One source of truth

The deeper point is not about any single glyph but about agreement. The screen, the print preview, and the downloadable PDF must all be produced from the same render, or they will drift — and the drift always surfaces at the worst moment, in someone else's copy.1

How much does that agreement matter in practice? When each surface is built from its own rendering path, small disagreements creep in — a spacing rule here, a glyph substitution there — and they multiply as the document travels from screen to print to PDF. One shared render removes them by construction:

Set the mathematics once, number it once, and let every surface read from that one description. The reward is small and permanent: a document that says the same thing wherever it is read.

References

Bringhurst, R. (2004). The Elements of Typographic Style (3rd ed.). Hartley & Marks.
Knuth, D. E. (1984). The TeXbook. Addison-Wesley.

Footnotes

  1. This is why the pipeline behind this page renders Markdown to HTML exactly once, and feeds that same output to the web view and the PDF. Knuth made the same argument about TeX four decades ago (Knuth, 1984); it has not aged.

Comments

    Leave a comment