Skip to main content

Layout Keywords

Five keywords for controlling how a document looks when rendered — pagination, headers, footers, watermarks, and print page breaks.

page:

Category: Layout Since: v2.0

Defines the page layout settings for print and PDF output.

Syntax

page: | size: value | orientation: value | margin: value

Properties

PropertyTypeDescription
sizestringPaper size — A4, letter, legal, A3
orientationstringportrait (default) or landscape
marginstringCSS margin value — 1in, 2cm, normal, narrow

Examples

page: | size: A4 | orientation: portrait | margin: 1in
page: | size: letter | orientation: landscape | margin: 2cm

Notes

  • Browser rendering inherits the system default — page: primarily affects PDF export and print
  • Only one page: block per document is valid
  • margin: normal is equivalent to 1in top/bottom, 1.25in left/right (Word defaults)
  • margin: narrow is equivalent to 0.5in on all sides

Category: Layout Since: v2.0 Aliases: running-head:

Defines the running header for multi-page output.

Syntax

header: content | align: value | show-on: value

Properties

PropertyTypeDescription
alignstringleft (default), center, or right
show-onstringall (default), odd, even, after-first

Examples

header: Acme Corporation Confidential
header: | align: right | show-on: all
header: Service Agreement v1.0 | align: center | show-on: after-first

Notes

  • Header is hidden in web rendering — visible in print and PDF only
  • show-on: after-first is standard for formal documents — suppresses the header on the title page
  • Content can include template variables: {{title}}, {{page}}, {{date}}

Category: Layout Since: v2.0

Defines the running footer for multi-page output, including page numbers.

Syntax

footer: content | align: value | show-on: value

Properties

PropertyTypeDescription
alignstringleft, center (default), or right
show-onstringall (default), odd, even, after-first

Examples

footer: Page {{page}} of {{pages}}
footer: Confidential — Acme Corporation | align: center | show-on: all
footer: {{date}} | align: right | show-on: after-first

Template variables

VariableOutput
{{page}}Current page number
{{pages}}Total page count
{{title}}Document title
{{date}}Current date (render time)
{{author}}Author from meta: block

Notes

  • Footer is hidden in web rendering — visible in print and PDF only
  • show-on: after-first is standard practice — suppresses footer on the title/cover page

watermark:

Category: Layout Since: v2.2

Watermark printed diagonally across every page.

Syntax

watermark: text | opacity: value | color: value | angle: degrees

Properties

PropertyTypeDescription
opacitynumber0.0–1.0, default 0.15
colorstringCSS color — default gray
anglenumberRotation in degrees, default 45

Examples

watermark: DRAFT
watermark: CONFIDENTIAL | opacity: 0.2 | color: red
watermark: For Review Only | opacity: 0.1 | angle: 30

Notes

  • Printed diagonally across every page in print/PDF output
  • Visible in web rendering as a CSS background layer
  • Remove by deleting the watermark: block — sealing the document with freeze: prevents removal

break:

Category: Layout Since: v1.0

Page break for print output. Invisible in web rendering — renders as display:none with aria-hidden="true". In print and PDF, forces a page break at the point where break: appears.

Syntax

break:
break: | before: value | keep: value

Properties

PropertyTypeDescription
beforebooleanForce a page break before the following content
keepstringKeep surrounding content together — together or avoid

Examples

section: Chapter One
text: Introduction material...

break:

section: Chapter Two
text: New chapter starts on a fresh page.
break: | before: true | keep: together

break: vs x-layout: divider

break:x-layout: divider
Visible inPrint/PDF onlyBoth web and print
EffectForces page boundaryVisual horizontal rule
PrintNew page<hr> on the page
WebInvisible (display:none)Rendered thematic break

Use break: for structural pagination. Use x-layout: divider for visible section dividers.


Extension keywords

Typography and decorative layout keywords are available in the x-layout: and x-doc: namespaces. These are rendered by the renderer but do not affect the core document model.

ExtensionPurpose
x-layout: fontTypography settings — family, size, line-height
x-layout: dividerVisual horizontal rule, shown in both web and print
x-doc: signlinePhysical signature line for printed/PDF contracts

See Extension Keywords → for full syntax documentation.