Skip to content

System shortcut reference

Every system shortcut Keystone ships, grouped by purpose and listed alphabetically. This is the lookup reference — the Writing guides teach each one by task. Attributes are shown with their defaults; an attribute with no default takes effect only when you supply it.

Most shortcuts are block-level, written as a fenced div (::: name). A few also work inline as a bracketed span ([text]{.name}): font, dropcap, container, slot, set, ifdef, ifndef, and the four format-only shortcuts (latex-only, epub-only, docx-only, odt-only). The rest are divs only, and the empty-div shortcuts (pagebreak, vspace) take no content.

Callouts

aside

A callout box with a colored left border and tinted background.

  • typetip · warning · note · example (required)
  • title — heading text; defaults to the capitalized type; an empty string removes it
  • color#rrggbb accent color, overriding the type's default
  • bordernone removes the left border
::: {.aside type="warning" title="Before you build"}
Commit your work first.
:::

See Asides & callouts.

Composition primitives

These exist mainly as building blocks for your own shortcuts. You can use them directly, but most authors won't need to.

container

A wrapper with no visual output — EPUB/HTML keeps the element and its classes; LaTeX passes the content through. Useful purely for grouping or nesting.

rule

A conditional horizontal rule — a line when style="ruled", nothing otherwise.

  • styleruled renders the line; any other value or absent renders nothing

slot

A content placeholder used inside a shortcut body, so author content and fixed body elements can sit side by side. An alias for container.

source

An attribution line with an em-dash prefix, right-aligned. Renders nothing when its text is absent.

  • text — the attribution

Conditional content

Gate content by build symbol. Symbols come from two places: the build configurations you declare in project.conf, and the format symbols Keystone defines automatically for every build (latex for PDF, plus epub, docx, odt) — those four are what the *-only shortcuts wrap. They're build config, not document metadata; for the full picture see the Conditional content guide in Writing.

docx-only / epub-only / latex-only / odt-only

Keep content only in one output format. Each build defines a format symbol (pdflatex, plus epub, docx, odt), so these are thin wrappers over ifdef.

  • symbol — defaults to the matching format; override to invert the target
::: latex-only
\begin{center}Raw LaTeX, PDF builds only.\end{center}
:::

ifdef / ifndef

Keep content only when a symbol is (ifdef) or is not (ifndef) defined.

  • symbol — one or more whitespace-separated symbols, OR-combined (required)
::: {.ifdef symbol="personal"}
A dedication only the private edition carries.
:::

Dialogue

dialog

Turn a bullet list into dialogue lines — em-dashes in PDF, plain dashes in EPUB/HTML.

  • stylehanging indents wrapped lines under the speech; omit for the tight (flush) default
::: dialog
- Who's there?
- Just the wind.
- At this hour?
:::

See the Dialogue guide in Writing.

Figures

aligned-figure

A figure with alignment control — the figure wrapped in align.

  • alignleft · center · right · justified (default: center)
  • width — a CSS length
  • caption-widthfull to widen the caption
  • identifier — a cross-reference id (also settable with #id)
::: {.aligned-figure align="left" width="40%" #fig-map}
![Map of the region.](assets/map.png)
:::

figure

Wrap a Markdown image in a styled figure. The caption comes from the image's alt text. width constrains both the image and its caption.

  • width — a CSS length (e.g. 50%, 5cm)
  • caption-widthfull lets the caption span the full text width instead of matching the image
::: {.figure width="60%"}
![A lighthouse at dusk.](assets/lighthouse.jpg)
:::

See Figures & images.

Layout & spacing

multicol

Lay content out in multiple columns.

  • cols2 to 4 (default: 2)
::: {.multicol cols="3"}
Content flowing across three columns.
:::

no-indent

Suppress first-line paragraph indentation within its scope — for dedications, poetry, or title pages.

::: no-indent
For my parents,\
who read to me.
:::

pagebreak

Force a page break. Empty div only.

::: pagebreak
:::

scene-break

A decorative break between scenes. An empty div renders a default * * * ornament; supply content to use your own.

::: scene-break
:::

vspace

Insert explicit vertical space. Empty div only.

  • size — a named size (tiny · small · medium · large · huge) or a CSS length (e.g. 1.5em, 3cm) (required)
::: {.vspace size="large"}
:::

See Breaks & spacing.

Quotations

epigraph

A chapter-opening quotation: narrowed italic text with optional attribution.

  • source — attribution text (rendered with an em-dash prefix)
  • font-style — override the style (default: italic)
  • font-family, font-size — override the face or size
::: {.epigraph source="John Keats"}
A thing of beauty is a joy forever.
:::

pullquote

A mid-chapter quotation: centered, large, italic, with optional rules.

  • alignleft · center · right · justified (default: center)
  • styleplain or ruled (rules above and below; default: plain)
  • source — attribution text
  • font-size — override the size (default: large)
  • font-style — override the style (default: italic)
  • font-family — override the face
::: {.pullquote style="ruled" source="Ursula K. Le Guin"}
The only thing that makes life possible is permanent, intolerable uncertainty.
:::

quote

Wrap content in a narrowed block with left and right indents.

::: quote
A narrowed, indented passage.
:::

See Quotes & epigraphs.

Running-header marks

set

Set an author-declared running-header mark at a point in the flow. No visible output in any format; the effect appears only in PDF running headers. The value persists until the next set for that mark.

  • mark — the declared mark channel (required; declare it under marks: in pandoc.yaml)
[John Keats]{.set mark="poem-author"}

See Running headers & footers.

Text & fonts

align

Set the horizontal alignment of block content.

  • styleleft · center · right · justified
::: {.align style="center"}
Centered text.
:::

See Alignment & columns.

dropcap

Enlarge the opening letter of a passage. As a div, Keystone extracts the first character automatically; as a span ([T]{.dropcap}) you choose the letter.

  • lines — how many lines tall the drop cap is (default: 3)
  • font-family — a registry name for the drop-cap letter only
::: dropcap
Every story begins somewhere, and this one begins here.
:::

font

Apply a font family, size, and/or style. The three are independent and combine.

  • family — a font registry name (e.g. eb-garamond, libertine)
  • sizetiny · scriptsize · footnotesize · small · normalsize · large · Large · LARGE · huge · Huge
  • styleitalic · bold · bold-italic
::: {.font family="eb-garamond" size="large"}
A passage in large EB Garamond.
:::

A [bold aside]{.font style="bold"} inline.

See Typography & fonts.