Skip to content

Pages

Use page blocks to divide a document into pages, add a cover or contents page, and control headers, footers, and numbering.

AI-assisted, human-approvednovem uses AI to review and keep our documentation up to date.

Available in: documents only.

{{ page orientation: landscape, cols: 2, column-fill: auto }}

Page breaks

{{ page }} starts a new page. {{ frontpage }} starts a cover, and {{ tocpage }} starts a contents page. Place the content for each page after its declaration.

Frontmatter supplies metadata and defaults; it does not create a cover, even if it contains type: cover. When the file has explicit page declarations, content before the first declaration is ignored apart from global headers and footers. Put those before the first page with cascade: true.

A file with no page declarations renders as one continuous body that is automatically divided into pages. E-mails have a single flow and do not use page declarations.

The page block is a leaf with no closing tag. Both inline config and multiline YAML work:

{{ page
  orientation: landscape
  cols: "2 1"
  footer: "Example Research — {meta.date}"
}}

Covers, contents pages and page types

{{ frontpage }} renders a cover from the frontmatter's title, subtitle, author and date. Explicit fields override the corresponding frontmatter values:

{{ frontpage title: "Example report", subtitle: "Quarterly review" }}

{{ tocpage depth: 2 }}{{ /tocpage }} renders a dedicated contents page with the page numbers filled in after pagination; {{ toc levels: 2, leader: dots }} places a contents list inside the current page instead. include_pagenum: false drops the numbers; leader is dots, line or none.

type: on a page is a hook for the theme. The page gets the class novem--doc--page--type-<type> and the attribute data-page-type, so a theme can style a type: feature or type: back page, or lay it out as a grid in which every block names its area:; see layout pages. type: cover is the one value with built-in behaviour: it renders the same cover as {{ frontpage }}. A type adds no content and chooses no layout on its own.

Orientation and size

Use orientation: portrait or orientation: landscape on a page. orient is an alias. Document-wide geometry belongs in frontmatter:

---
title: Example report
size: letter
orientation: portrait
margins: 20mm
---

{{ frontpage }}

{{ page }}
# Results

Sizes are a4, letter, legal, or custom dimensions such as 210x280mm. Set a uniform margin with a value such as 20mm. For different margins on each side, use spacing tokens, such as t4 b2 x3. Omit margins to use the theme defaults. Presentations have a fixed 16:9 aspect ratio and reject size.

Columns

cols accepts an integer from 1 to 12 for equal columns, or a quoted string of positive ratios such as "2 1". column-fill: balance balances equal text columns; auto fills each column in order. Use {{ colbreak }} to advance a column and colspan: all on a heading or styled block to span them.

{{ page cols: 2, column-fill: auto }}
## Results {colspan: all}

The example equity allocation returned 5% this quarter.

{{ colbreak }}

The example bond allocation returned 2% this quarter.

Page columns, colspan: all, the cols/col and box containers and layout pages with area: are covered together on the Layout page.

Headers, footers, and numbering

Non-cover pages provide header and footer bands. The default footer shows a small, muted page number aligned right. Set footer: false in frontmatter to suppress it. String-valued header and footer in frontmatter or page config can interpolate metadata with {meta.key}.

To format a header or footer, use a block:

{{ header cascade: true }}
Example Research — $date
{{ /header }}
{{ footer cascade: true, al: right, sz: s }}
$page / $pagecount
{{ /footer }}

cascade: true repeats the header or footer on subsequent non-cover pages until another cascading block of the same kind replaces it. Without cascade: true, an override applies only to its authored page and that page's continuations. The previous cascading header or footer resumes on the next authored page.

Inside these blocks, $page and $pagecount insert page numbers, $section inserts the running section label, and a frontmatter key such as $title or $date inserts its value.

This example uses a different footer on the Methodology page. Results returns to the original footer:

{{ footer cascade: true, al: right }}
Example Research · $page
{{ /footer }}

{{ page }}
# Overview

{{ page }}
{{ footer al: right }}
Methodology · $page
{{ /footer }}
# Methodology

{{ page }}
# Results

An empty block, such as {{ header }}{{ /header }}, removes the inherited header content for that authored page. Theme styling on the header area still applies.

A running section label lets one cascading header serve every page. Set section: on the page where a section starts; $section prints the latest one at or before the page it appears on:

{{ header cascade: true }}
$section
{{ /header }}

{{ page section: Markets }}
# Where the returns came from

{{ page }}
# This page still reads Markets

Frontmatter section: sets the label for pages before the first one that names its own.

Start or restart numbering with {{ startpagination numbering: 1 }}. The numbering value selects the style: 1 for Arabic, i for lowercase Roman, or I for uppercase Roman numerals. Each new numbering sequence starts at one; this option does not set an arbitrary starting value.

To hide the default page number on a page, set footer: false on its page block. To keep footer text without a number, supply a footer block that omits $page.

Automatic pagination

Content flows onto continuation pages when it exceeds the available space. Continuations inherit orientation, columns, headers, and footers. Lists retain numbering; tables repeat headers and column widths; footnotes follow their references. Headings stay with following content. Tables and KPI groups stay together when they fit on one page; oversized content can split.

Set keep: together or keep: with-next on a block to control this behaviour. Set autopaginate: false on a page for a deliberately fixed layout.

{{ box keep: together, p: a3, bg: gray-100 }}
## Summary
The example portfolio holds 40% in equities, 40% in fixed income,
15% in alternatives, and 5% in cash.
{{ /box }}

Continuation wrappers carry data-auto-cont and data-auto-seq. The data-page-num attribute counts physical pages from one, while data-page-index identifies the authored page from zero. Use these hooks instead of nth-child when styling a particular page.

A single indivisible element taller than the page can still overflow. Preview exports when using large images, long paragraphs, or fixed-height content.

Full-page visualisations

Start a page and follow it with a visualisation whose height is fill. The example below gives a demo grid the available page height. You can also embed another document; its content pages are inserted in sequence. See Layout.

{{ page orientation: landscape }}
{{ vis ref: /u/novem_demo/g/nei_rgn_dash, width: 100%, height: fill }}