Skip to content

Alignment & columns

Aligning blocks

The align shortcut sets the horizontal alignment of the block it wraps:

::: {.align style="center"}
A centered stanza,\
set apart from the prose.
:::
  • styleleft, center, right, or justified

Use it for verse, signatures, title-page lines, and anything that shouldn't follow the body's default alignment. To position a figure, prefer aligned-figure, which composes alignment with the figure handler.

Forcing a line break

Note the trailing \ in the example. Markdown collapses consecutive lines into one paragraph, so to keep a hard line break — in verse, an address, a signature — end the line with a backslash (or two trailing spaces). Without it, the two lines would render as one.

Body text alignment for the whole document (justified vs. ragged) is a pandoc.yaml setting, not this shortcut — see justify-control.

Multiple columns

The multicol shortcut flows content across columns — useful for glossaries, indexes, or compact reference lists:

::: {.multicol cols="3"}
Content flows across three balanced columns, wrapping from one to the next
automatically.
:::
  • cols2 to 4 (default 2)

PDF uses the LaTeX multicol package; EPUB and HTML use CSS columns. A value outside 2–4 produces a build warning and the block is left as a single column.