Blocks
Blocks add pages, tables, images, and other elements to novem markdown. This reference describes their syntax, configuration, and shared styling options.
AI-assisted, human-approvednovem uses AI to review and keep our documentation up to date.
Available in: documents and e-mails.
Block format
A block is written as {{ name … }} with its config as key: value pairs.
There are two shapes. Leaf blocks embed a resource or insert a marker
and have no closing tag:
{{ page orientation: landscape, cols: 2 }}
{{ vis ref: /u/novem_demo/p/nei, width: 80%, title: true }}
{{ button href: https://example.com/report, label: "Read the report" }}
Character references decode in config strings as they do in text, so
caption: "at 30 September" keeps its non-breaking space. Only
well-formed references count (&name;, —): R&D stays as written.
Container blocks wrap a body and end with a matching closing tag:
{{ box bg: gray-100, p: a4, id: summary }}
## Quarterly review
Revenue increased **12%**.
{{ button href: https://example.com/report, label: "Open report" }}
{{ /box }}
Config is written either inline, with commas or semicolons between pairs,
or as YAML across several lines. The two forms are equivalent for every
block, including page.
{{ paragraph
fg: blue-700
p: [l2, r4]
b: l3 blue-500
}}
A styled paragraph.
{{ /paragraph }}
# is literal inside configs, so fg: #336699 is a colour. Put comments
outside configs using <!-- a comment --> or {/* a comment */}. Quote text containing commas,
colons, or other YAML punctuation.
What a container may hold depends on the block: box accepts nested
blocks; cols accepts col containers or flows its children across equal
columns; paragraph and callout bodies accept Markdown, including lists and
tables; a table wrapper contains one Markdown table; kpis contains kpi
tiles. The reference tables below list each block, what it can contain,
and where it is available.
Styling
Blocks, heading suffixes, and styled spans
share the styling keys fg bg sz st al m p s b.
# Results {fg: blue-700, id: results}
Revenue [[increased 12%]]{fg: green-600, st: b}.
{{ para m: t4 b2, p: x3 y2, b: [l1 red-500, r1 green-500] }}
The spacing directions are a (all), x (left and right), y (top and bottom),
and t, b, l, r for individual edges.
{{ /para }}
Spacing takes non-negative integer scale units; the default unit is 2px.
Border widths are pixels. sz ranges from xxxs through xxxl; use s
for small. Combine font styles with spaces: st: b i u.
Theme colours adapt to light and dark mode. Use a named token such as
blue-500, a colour alias, or a hex literal. A --light or --dark suffix
pins a token to that mode. See colours.
Widths accept fractions (1/2), percentages (55%), decimals (0.5),
full, or pixels (240px). Column widths accept shares only. Heights
accept intrinsic, fill, or pixels; percentages are not supported.
Default block spacing
Paragraphs and lists normally have 4 units (8px) between them. Charts, images, tables and boxes generally request 8 units (16px).
All heading levels request 4 units (8px) above and keep the following
content close with 2 units (4px) below, equivalent to b2. Consecutive
headings use that same small gap. Explicit margins and blank-line spacing
still follow the collapsing rules below. A heading at a page or column
start has no automatic top gap.
Collapsing vertical margins
Documents and e-mails use the larger of the margins between adjacent blocks. For example:
{{ para m: b5 }}First paragraph.{{ /para }}
{{ para m: t6 }}Second paragraph.{{ /para }}
The gap is 6 units (12px). With b5 and t5, it is 5 units (10px).
An explicit adjoining margin replaces automatic block spacing; b0 or t0
can remove that automatic gap. Margins on the opposite edges do not affect it.
A run of two or more blank lines requests 8 units (16px). That spacing
collapses with the adjoining margins too: b5, blank lines, and t6 give
8 units, while b10 with the same blank lines gives 10 units. Adding more
blank lines does not accumulate more space. A single blank line separates
Markdown blocks and uses their normal spacing.
To add real empty lines, write a paragraph of lone backslashes: each \
on a line of its own is one blank line, so four such lines are four empty
lines between the paragraphs around them. A \\ prints a backslash and
is not a spacer.
Each nested container has its own flow. Padding and horizontal margins remain separate. At the start of a document page or column, only the first block's own top margin remains; the preceding page's bottom margin is dropped.
Hooks and keeping blocks together
Every block accepts id, classlist and keep. An authored id becomes
data-id and classlist adds classes, so a theme can select a particular
block; every rendered block also carries data-kind and its source
data-line. keep: together keeps a block on one page when it fits;
keep: with-next keeps it with the following block. Oversized content can
still split. Headings default to staying with the next block; tables and
KPI rows default to staying together.
Unknown keys, invalid values, unavailable blocks and unclosed containers produce diagnostics with source line numbers. Inspect these before exporting or sending a document or e-mail.
Pages, covers and running bands are on Pages; columns, containers and layout pages on Layout.
Math and equations
Set latex: true in document frontmatter to enable $...$ inline math and
$$...$$ display math starting on its own line. See
Math and equations for syntax and examples.
Grammar reference
The following tables list accepted block names, aliases, and config values.
| Block | Aliases | Body | Available in |
|---|---|---|---|
paragraph | para | markdown | both |
visualisation | vis | none | both |
image | img | none | both |
attachment | attach | none | e-mails |
callout | — | markdown | both |
html | — | raw (sanitized) | both |
table | — | GFM table | both |
kpi | — | none | both |
kpis | — | kpi blocks | both |
toc | — | none | documents |
box | — | flow | both |
button | — | none | both |
cols | — | col blocks / flow | both |
col | — | flow | both |
header | — | flow | documents |
footer | — | flow | documents |
frontpage | — | none | documents |
tocpage | — | optional list | documents |
startpagination | — | none | documents |
page | — | none | documents |
author | auth | none | both |
preview | — | paragraphs | e-mails |
colbreak | — | none | documents |
Config keys
All blocks accept id, classlist, and keep. Styling keys also apply to heading suffixes and styled spans.
| Key | Aliases | Value | Applies to |
|---|---|---|---|
id | — | Identifier: a letter, then letters, digits, - or _; at most 64 characters. | all |
classlist | — | Up to 16 CSS classes, each at most 64 characters. | all |
keep | — | together, with-next | all |
area | — | Grid area name from the page's theme layout: a letter, then letters, digits, - or _. | all |
fg | foreground | Theme token or alias, optional --light/--dark pin, or hex literal. | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
bg | background | Theme token or alias, optional --light/--dark pin, or hex literal. | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
sz | font size, font_size | xxxs, xxs, xs, s, m, l, xl, xxl, xxxl | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
st | font style, font_style | Space-separated b/bold, i/italic, u/underline (s/strong also means bold). | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
al | align, font align, font_align | -, <, >, ^, c, center, j, justify, l, left, r, right, v | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, button, cols, col, header, footer |
m | margin | Scale units: a3, t4 b2, x3 y2. | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
p | padding | Scale units: a3, t4 b2, x3 y2. | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, col, header, footer |
s | space, spacing | integer, ≥ 0 or Scale units. | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
b | border | Side, pixel width, optional colour: l3 red-500; use an array for multiple edges. | paragraph, heading, span, visualisation, image, html, table, kpi, kpis, box, button, cols, col, header, footer |
colspan | span | all | paragraph, heading, span, visualisation, image, callout, html, table, kpi, kpis, box, button, cols, col, header, footer |
height | — | fill, intrinsic, or pixels. or integer, ≥ 0 | paragraph, callout, html, box |
ref | — | string | visualisation, image |
width | — | Fraction, percent, decimal, full, or pixels. or number, ≤ 1 | visualisation, image |
height | — | fill, intrinsic, or pixels. or integer, ≥ 0 | visualisation, image |
title | — | boolean or string | visualisation, image |
caption | — | boolean or string | visualisation, image |
float | — | left, right | visualisation, image |
bleed | — | list of top, right, bottom, left, x, y, all or Page edges to run out to: top, right, bottom, left, x, y or all. | visualisation, image, box |
include_link | include link | boolean | visualisation |
fact | — | integer | visualisation |
cls | class | string | visualisation |
link | — | string | image |
alt | — | string | image |
fit | — | cover, contain | image |
ref | — | string | attachment |
format | — | png, pdf, pptx | attachment |
name | — | string | attachment, author |
disposition | — | attachment, inline | attachment |
mode | — | light, dark | attachment |
size | — | xs, sm, md, lg, xl, xxl, xxxl | attachment |
b | — | Side, pixel width, optional colour: l3 red-500; use an array for multiple edges. | callout |
type | — | alert, danger, err, error, info, succ, success, warn, warning | callout |
title | — | string | callout, frontpage, page |
border | — | boolean | callout |
widths | — | Positive column ratios, percentages, or fr tokens. | table |
density | — | compact, normal, relaxed | table |
sentiment | — | integer, ≥ 1 or list of integer, ≥ 1 or One-based column numbers. | table |
heat | — | integer, ≥ 1 or list of integer, ≥ 1 or string or One-based column numbers or ranges, e.g. 2-11. | table |
heat_max | heat max | number or A positive magnitude, e.g. 6 or 6%. | table |
bars | — | integer, ≥ 1 or list of integer, ≥ 1 or string or One-based column numbers or ranges, e.g. 2-11. | table |
bars_max | bars max | number or A positive magnitude, e.g. 6 or 6%. | table |
bar_color | bar color | integer, ≥ 1, ≤ 64 | table |
waterfall | — | boolean | table |
stack | — | boolean | table |
labels | — | boolean | table |
vertical | — | boolean | table |
steps | — | integer, ≥ 1 or list of integer, ≥ 1 or string or One-based column numbers or ranges, e.g. 2-11. | table |
caption | — | string / number / boolean | table |
source | — | string / number / boolean | table |
value | — | string / number / boolean | kpi |
label | — | string / number / boolean | kpi, button |
desc | — | string / number / boolean | kpi |
sentiment | — | good, bad, auto | kpi |
variant | — | card | kpi |
cols | — | integer, ≥ 1, ≤ 12 | kpis |
levels | — | integer, ≥ 1, ≤ 6 or list of integer, ≥ 1, ≤ 6 or Depth, or explicit heading levels as a list. | toc |
leader | — | dots, line, none | toc, tocpage |
al | — | -, <, >, ^, c, center, j, justify, l, left, r, right, v | box |
width | — | Fraction, percent, decimal, full, or pixels. or number, ≤ 1 | box, button |
align | — | left, center, right | box |
href | — | HTTP(S), mailto, tel, or a relative resource path. | button |
variant | — | primary, secondary, link | button |
p | — | Scale units: a3, t4 b2, x3 y2. | cols |
count | — | integer, ≥ 1, ≤ 12 | cols |
valign | — | top, center, bottom | cols |
separator | — | string | cols |
gap | padding | integer | cols |
width | — | Fraction, percent, or decimal share. or number, ≤ 1 | col |
cascade | — | boolean | header, footer |
orientation | orient | portrait, landscape | frontpage, page |
subtitle | — | string | frontpage, page |
date | — | string | frontpage, page |
author | — | string | frontpage, page |
section | — | string / number / boolean | tocpage, page |
depth | — | integer, ≥ 1, ≤ 6 | tocpage |
include_pagenum | include pagenum | boolean | tocpage |
numbering | — | 1, i, I, 1 | startpagination |
type | — | Page type hook: a letter, then letters, digits, - or _; at most 32 characters (e.g. cover, toc). | page |
autopaginate | — | boolean | page |
latex | — | boolean | page |
cols | — | integer, ≥ 1, ≤ 12 or Positive track ratios, e.g. 2 1. | page |
column_fill | column-fill, column fill | auto, balance | page |
ref | — | string | page |
header | — | boolean or string | page |
footer | — | boolean or string | page |
pnum | — | boolean or integer or string | page |
username | — | string | author |
pfx | — | string | author |
include_picture | include picture | boolean | author |
include_bio | include bio | boolean | author |
override_bio | override bio | string | author |
A visualisation's title defaults to visible in documents and hidden in e-mails; title: true or title: false overrides it.
Required keys: ref for visualisations/images, value for KPI tiles, and href for buttons.
Omitted style values use the theme. Config values are separated by commas on one line or by newlines in YAML.
Hide content with <!-- ... --> or {/* ... */} comments (inline or multiline). Comments are ignored before parsing, including any blocks, references and attachments inside them. Code spans and fenced code blocks keep comment markers literal. Comments do not nest; an unclosed comment hides the remaining content.