Text formatting

Paragraphs and line breaks

Paragraphs are blocks of text separated by a blank line. A single newline inside a paragraph does not break the line – the text reflows. To force a line break within a paragraph, end the line with a backslash or two spaces:

First line.\
Second line of the same paragraph.

Emphasis

You writeYou get
**bold**bold
*italic*italic
***bold italic***bold italic
~~strikethrough~~strikethrough
==highlight==highlight
`inline code`inline code

Notes:

  • Strikethrough needs two tildes on each side. A single tilde is subscript.
  • ==highlight== renders as a highlighted run (the HTML <mark> element). It works on plain text runs; it does not span across other formatting.
  • Underscores work as an alternative to asterisks (_italic_, __bold__), but asterisks are the house style and survive intra-word use (un*frigging*believable).

Subscript and superscript

H~2~O, x^2^, CO~2~, m^3^

renders as: H2O, x2, CO2, m3

For anything beyond a short index – expressions, Greek letters, nested scripts – use math instead: $x_{n+1}^2$.

Definition lists

Corollary
: A statement that follows from a theorem with little or no extra proof.
Corollary
A statement that follows from a theorem with little or no extra proof.

A term on its own line, each definition on a following line starting with a colon. Keep definition bodies to plain text and basic emphasis – for entries that need mathematics, use a definition statement instead.

Typography

Double and triple hyphens become typographic dashes:

You writeYou getUse for
pages 3--7pages 3–7ranges (en dash)
thought --- like thisthought — like thisasides (em dash)

Quotes and ellipses are left exactly as typed – smart quotes are not applied, so "quoted" keeps straight quotes.

Escaping

Backslash-escape a character to use it literally where it would otherwise be syntax:

\*not italic\*, price in \$5

This covers CommonMark syntax and math: \$ keeps a dollar sign from starting a math span. Two cases do not respond to a backslash:

  • A paired ==...== on plain text always becomes a highlight. A lone == stays literal; to show the paired form, put it in `inline code`.
  • A line starting with ::: opens a directive; show literal directive syntax inside a code block.

Inside inline code and code blocks nothing is interpreted, so escaping is never needed there.