Skip to content

Markdown Conventions

Typoteka accepts standard Markdown and adds a small set of conventions for book layout.

Standard Markdown

You can use all the usual Markdown: headings, lists, emphasis, links, tables, code, and blockquotes. These work as you would expect.

Fenced divs

A block fenced with ::: becomes a <div> with the classes you specify. This is how you apply a book style's layout features to a region of content.

Use an attribute block with class names prefixed by .:

markdown
::: {.box}
This content is wrapped in a div with class "box".
:::

As a shorthand, you can write bare words instead of the attribute block. A single bare word becomes one class:

markdown
::: box
A bordered box.
:::

Multiple bare words become multiple classes:

markdown
::: span unjustify
Content with classes "span" and "unjustify".
:::

Style-defined classes

The classes only mean something because the active book style styles them. Which classes exist, and how they look, depends on the style you have chosen.

Two common ones:

  • .box: a bordered box.
  • .span: content that spans the full text width across columns.

Headings and structure

Headings drive the document structure and section numbering. The pipeline handles numbering automatically based on your heading levels, so you can focus on the text and let the structure follow from it.