A docdesigner style is one file, format.yml, that lists
design decisions as tokens: color.accent,
typography.base_size, headings.h1.scale, and
so on. The engine turns those tokens into LaTeX. You never write LaTeX,
and a style cannot break a document: every token is checked against a
schema with fixed types, bounds and named steps.
This guide covers the workflow, the rules for setting tokens, the principles that separate a good style from a merely valid one, and closes with the full token reference, generated from the schema itself.
The workflow
- Scaffold a style from the existing style nearest to what you want.
- Edit only the tokens that differ.
- Validate it against the schema.
- Render a realistic document and look at the pages.
- Repeat 2 to 4. Then share it, as a folder or inside a set.
# 1. A new folder my-brief/ with format.yml, seeded from `policy`.
# complete = FALSE copies only the tokens policy declares;
# complete = TRUE (the default) writes every token at its value, as a reference.
designer_new_style("my-brief", from = "policy", path = ".", complete = FALSE)
# 3. Errors must be fixed. Warnings flag risky combinations.
designer_validate_style("my-brief")
# 4. Render any document in the draft by pointing at the folder.
rmarkdown::render("paper.Rmd", output_format = docdesigner::pdf(style = "my-brief"))Inside a document’s YAML header the same thing reads:
output:
docdesigner::pdf:
style: "path/to/my-brief"
title_layout: page # optional: override the style's title.layoutFor step 4, use a document that looks like your real work: figures,
tables of different shapes, a long title, an abstract, footnotes, a
block quote and references. The package’s specimen document,
examples/gallery-document.Rmd in the source repository,
carries all of these and is a good default.
Setting tokens
The format
Keys are flat and dotted, one per line. Comments are encouraged; record why a value was chosen, not what it is.
id: my-brief # required; lowercase letters, digits, hyphens
label: "My Brief" # required; how the style is listed
description: > # recommended; what it is for and what it imitates
A two-page policy brief with a sans kicker and a tinted callout.
inherits: policy # optional; see below
color.accent: "#0B5E55"
typography.base_size: 10.5pt
title.layout: page
callout.style: boxedEach key appears once. To change a value the scaffold already declares, edit that line; adding the same key again further down is a YAML error.
Six rules
- Declare only what differs. Every token has a default. A style that restates defaults freezes them: when the engine’s default improves, your style will not follow.
-
Hex colours live only under
color.*. Everywhere else a token names a colour role:accent,accent2,text,muted,rule,background,code_bgorknockout. Change the palette in one place and every element that uses a role follows. Quote hex values ("#0B5E55"); unquoted, YAML can read some of them as numbers. -
Lengths are named steps, not dimensions.
quote.indent: md, notquote.indent: 1em. The steps are fixed scales (space, indent, rule weight, gutter, margin, width), so styles stay consistent with one another and cannot produce invalid LaTeX. Margins are the exception:page.margins.*take inches, because a page design needs asymmetric margins. -
Sizes are multiples. Heading, title, caption and
table sizes are set relative to
typography.base_size, so changing the body size rescales the whole hierarchy. -
Use
inheritsfor families of styles.inherits: policystarts from policy’s declared tokens and applies yours on top. Chains resolve from the root, and a cycle or missing parent is an error. -
Check a token’s status before relying on it.
impltokens render.newtokens validate and are ignored until the engine implements them;designer_validate_style()lists them.deprecatedtokens still work and name their replacement.
The validator also applies cross-token rules:
| Rule | Meaning |
|---|---|
| indent-and-spacing | A style should separate paragraphs by indent OR by vertical space, not both. |
| dropcap-twocolumn | lettrine drop caps are unreliable in two-column bodies. |
| span-columns-single | figure.span_columns has no effect in a single-column body. |
| markup-no-columns | Margin markup (line and paragraph numbers, flags, changebars) needs a single-column page. |
| margins-override | page.margins overrides page.margin; setting both is redundant. |
| margin-cap | No margin wider than 1.25in. The thesis title layout is exempt (college binding margins). |
| bar-and-rule | A heading bar already carries its own edge; a rule on the same level reads as an error. |
Structure versus look
Two kinds of decision go into a page, and docdesigner keeps them apart.
Structure is what goes where.
title.layout is the main structural token:
header sets the title block at the head of the first page,
and page gives the title and abstract a page of their own.
page.columns (one or two) is the other. Because structure
varies by occasion as much as by style, the title layout can also be
chosen per document with pdf(title_layout = "page").
Look is everything else: faces, sizes, colours, rules, spacing, and how each element (title, abstract, headings, quotes, callouts, tables, captions, running heads) is treated. Look tokens apply in every layout. A centred small-caps title with a short rule is centred, small-caps and ruled whether it opens page 1 or stands on a title page.
Design the look once and check it in both layouts.
Block elements
Three elements set text apart from the body, and a style should make them distinguishable at a glance.
| Element | Written as | Tokens | Use it for |
|---|---|---|---|
| Block quote | > text |
quote.* |
Someone else’s words |
| Callout | ::: {.callout title="..."} |
callout.* |
The author’s own key point |
| Abstract |
abstract: in the YAML header |
title.abstract.* |
The summary |
callout.style takes filled (a tinted
panel), ruled (a bar at the left), boxed (a
border round a tint) or plain (indented text under a
title). If the style’s quotes already carry a left bar, do not give
callouts one too: readers will take the two for the same thing. The
shipped styles show the pattern. atlantic, economist, modern and nature
rule their quotes and fill their callouts; methods, which boxes its
abstract, boxes its callouts to match.
Principles of good style
A style passes validation the moment its keys and values are legal. These principles decide whether it is any good. Each comes with the check that tells you whether you have met it.
Measure: 45 to 75 characters per line
Line length governs reading comfort more than any other single choice. Below about 45 characters the eye jumps lines too often; above about 75 it loses its place on the return sweep. Aim for 60 to 72 in a single column and 40 to 55 in each of two.
Estimate it before you render. For a typical book serif, a line holds about
An 8.5-inch page with 1.85-inch side margins leaves 4.8 inches (346 pt); at 10.5 pt that is about 70 characters. Then count a few full lines on the rendered page.
Wide margins look generous on screen and wasteful in print. If a comfortable measure leaves the margins too wide, raise the body size by half a point, or use two columns, before you shrink the margins.
Leading: open enough to track, tight enough to hold
typography.line_height multiplies LaTeX’s own leading,
which is already about 1.2 times the type size. Values from 1.1 to 1.25
suit most text faces. Open the leading as the measure lengthens; tighten
it for short lines and large type. Display text (titles, headings,
captions, tables, footnotes) keeps its own spacing whatever this token
says.
Hierarchy: few signals, used consistently
A reader should be able to tell a section from a subsection without reading the words. Use the fewest signals that achieve it: size, weight, case, colour, rules, numbering. Two or three distinct heading levels are enough for almost any paper.
- Keep the size steps modest.
h1at 1.3 to 1.5 times the body,h2at 1.1 to 1.2,h3at the body size. Large jumps look like a poster. - Change one signal per level where possible. If
h2is bold,h3can be bold italic or small capitals at the same size. - Do not repeat a signal for two different jobs. If the accent colour marks headings, a link in the same colour reads as a heading fragment.
Colour: one accent, used sparingly
Most good document designs use near-black text, one grey for
secondary material, and a single accent. The accent carries meaning only
while it is rare: put it on the title rule, the section numbers or
headings, links, and callouts, and nowhere else. A second accent
(color.accent2) is for data graphics that need two series,
not for decoration.
Check contrast. Body text needs a contrast ratio of at least 4.5 to 1
against the page (WCAG AA), and so does any coloured text a reader must
read, such as captions in muted or links in
accent. A light grey that looks refined on a screen often
fails on paper.
contrast <- function(fg, bg = "#FFFFFF") {
lum <- function(hex) {
c <- grDevices::col2rgb(hex)[, 1] / 255
c <- ifelse(c <= 0.03928, c / 12.92, ((c + 0.055) / 1.055)^2.4)
sum(c(0.2126, 0.7152, 0.0722) * c)
}
l <- sort(c(lum(fg), lum(bg)), decreasing = TRUE)
round((l[1] + 0.05) / (l[2] + 0.05), 1)
}
pal <- designer_style("modern")$color
sapply(pal[c("text", "accent", "muted")], contrast)
#> text accent muted
#> 17.4 9.0 5.3Paragraphs: indent or space, never both
Separate paragraphs with a first-line indent
(paragraph.indent) or with vertical space
(paragraph.spacing), not both. Indents suit continuous
argument and long reading; space suits reports that a reader scans. The
validator warns if you set both.
Tables: let the data carry the structure
Horizontal rules at the top, under the header and at the bottom
(table.style: booktabs) suit nearly every research table.
Vertical rules and full grids add noise without helping the eye along a
row. Set tables slightly smaller than the body (table.size
about 0.9) and keep their leading close (table.row_stretch
1.1 to 1.25). Right-align numbers; that is the author’s job (in
knitr::kable, align = "lrr"), not the
style’s.
Faces: open, legible, and few
Use one family for text and at most one more for contrast, typically
a sans for labels, kickers and table headers
(typography.label). Never name a proprietary face: a style
that imitates a publication uses an open substitute with similar
proportions and records the original in description. The
bundled families are Source Serif 4, EB Garamond, XITS and Fira Code; a
style can ship others under
fonts.<Family>.<face>.
Fit the occasion
A style is for a kind of document read by a kind of reader. A journal
manuscript under review wants plain structure, a header title, wide
spacing (pdf(doublespace = TRUE)) and no ornament. A policy
brief wants a kicker, a strong title, a callout for the finding, and a
page a busy reader can scan. A long essay wants a book face, indented
paragraphs, and quiet headings. Decide who reads the document and how,
then choose.
Only the page is evidence
A token can be correct in format.yml, correct in the
resolved spec, and still wrong on the page. Look at every page of a
realistic render, in both title layouts, before you share a style. In
particular check:
- a two-line title, and a long author line;
- a table wider than half the measure, in a two-column style;
- the last page, which often carries only a few references;
- the first page of the body when
title.layoutispage.
Sharing a style
The simplest way to share a style is the folder: anyone can render
with pdf(style = "path/to/folder"). To ship several styles
together, put them in a set: a folder holding set.yml and
styles/<id>/format.yml for each style. Fonts a style
needs go in styles/<id>/assets/fonts/ or the set’s
own assets/fonts/.
# set.yml
id: my-house
title: "My house styles"
version: 1.0.0
format_version: 2
styles: [my-brief, my-paper]designer_install_set() installs a set from a GitHub
repository, and designer_update_sets() refreshes installed
sets. A style in an installed set with the same id as a core style takes
precedence, with a warning.
Token reference
Every token the engine knows, generated from the schema when this page was built. Allowed gives the legal values: a list of names, a numeric range, a colour role, or a hex colour. Status says whether the engine renders it today.
identity
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
id |
impl | Unique style id. Keys resolution, not the folder name. | ||
label |
impl | Human-readable name. | ||
description |
impl | One line. Note the original typefaces here if imitating a publication. | ||
inherits |
impl | Style id to inherit from. Resolves a full chain, root-first. |
page
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
page.papersize |
letter | a4 | letter | impl | |
page.margin |
narrow | normal | wide | normal | impl | Shorthand for all four sides. |
page.margins.top |
0.4 to 2 | impl | Overrides page.margin when set. | |
page.margins.bottom |
0.4 to 2 | impl | ||
page.margins.inner |
0.4 to 2 | impl | Binding edge when twoside; else left. | |
page.margins.outer |
0.4 to 3.5 | impl | Over 1.25in only for a markup style (markup.*), whose outer margin is a workspace for handwritten notes. | |
page.twoside |
true | false | FALSE | impl | Mirror margins, alternate running heads. |
page.columns |
1 | 2 | 1 | impl | |
page.gutter |
sm | md | lg | impl | Space between columns under columns: 2. Unset: LaTeX’s 10pt. | |
page.column_rule |
true | false | FALSE | impl | Hairline between columns under columns: 2. |
typography
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
typography.body |
Source Serif 4 | impl | ||
typography.heading |
Source Serif 4 | impl | ||
typography.mono |
Fira Code | impl | ||
typography.display |
impl | Display face for titles and headings that set family: display. Unset: the heading face. | ||
typography.label |
impl | Sans furniture face for kickers, callout titles, table headers. Loaded by name via ; falls back to body if the named font is absent. | ||
typography.base_size |
8pt | 8.5pt | 9pt | 9.5pt | 10pt | 10.5pt | 11pt | 11.5pt | 12pt | 10pt | impl | |
typography.line_height |
1 to 2 | 1.3 | impl | |
typography.mono_scale |
0.6 to 1 | 0.82 | impl | |
typography.numbers |
lining | oldstyle | lining | impl | |
typography.justification |
justified | ragged-right | justified | impl | |
typography.hyphenation |
true | false | TRUE | impl | false: no word is broken at a line end. |
typography.microtype |
true | false | TRUE | impl |
color
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
color.accent |
6-digit hex | 333333 | impl | |
color.accent2 |
6-digit hex | impl | ||
color.text |
6-digit hex | 000000 | impl | |
color.muted |
6-digit hex | 5B6470 | impl | |
color.rule |
6-digit hex | 333333 | impl | |
color.background |
6-digit hex | impl | A fill role, for panels such as a boxed abstract. | |
color.code_bg |
6-digit hex | impl | ||
color.knockout |
6-digit hex | FFFFFF | impl | Text drawn on a filled bar or band. |
headings
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
headings.number_sections |
true | false | FALSE | impl | |
headings.numbering |
arabic | roman | alpha | arabic | impl | How h1 numbers are written when number_sections is true: 1, I or A. |
headings.run_in |
h2 | h3 | h4 | impl | Levels typeset run-in with the paragraph. | |
headings.h1.family |
body | heading | display | mono | heading | impl | |
headings.h2.family |
body | heading | display | mono | heading | impl | |
headings.h3.family |
body | heading | display | mono | heading | impl | |
headings.h4.family |
body | heading | display | mono | heading | impl | |
headings.h1.scale |
0.5 to 4 | 1.35 | impl | |
headings.h2.scale |
0.5 to 4 | 1.15 | impl | |
headings.h3.scale |
0.5 to 4 | 1 | impl | |
headings.h4.scale |
0.5 to 4 | 1 | impl | |
headings.h1.weight |
light | regular | bold | bold | impl | |
headings.h2.weight |
light | regular | bold | bold | impl | |
headings.h3.weight |
light | regular | bold | bold | impl | |
headings.h4.weight |
light | regular | bold | regular | impl | |
headings.h1.style |
normal | italic | normal | impl | |
headings.h2.style |
normal | italic | normal | impl | |
headings.h3.style |
normal | italic | normal | impl | |
headings.h4.style |
normal | italic | italic | impl | |
headings.h1.case |
none | upper | lower | smallcaps | none | impl | |
headings.h2.case |
none | upper | lower | smallcaps | none | impl | |
headings.h3.case |
none | upper | lower | smallcaps | none | impl | |
headings.h4.case |
none | upper | lower | smallcaps | none | impl | |
headings.h1.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | |
headings.h2.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | |
headings.h3.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | |
headings.h4.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | |
headings.h1.align |
left | center | right | left | impl | |
headings.h2.align |
left | center | right | left | impl | |
headings.h3.align |
left | center | right | left | impl | |
headings.h4.align |
left | center | right | left | impl | |
headings.h1.space_before |
none | xs | sm | md | lg | xl | lg | impl | |
headings.h2.space_before |
none | xs | sm | md | lg | xl | md | impl | |
headings.h3.space_before |
none | xs | sm | md | lg | xl | md | impl | |
headings.h4.space_before |
none | xs | sm | md | lg | xl | md | impl | |
headings.h1.space_after |
none | xs | sm | md | lg | xl | sm | impl | |
headings.h2.space_after |
none | xs | sm | md | lg | xl | xs | impl | |
headings.h3.space_after |
none | xs | sm | md | lg | xl | xs | impl | |
headings.h4.space_after |
none | xs | sm | md | lg | xl | xs | impl | |
headings.h1.rule.position |
above | below | none | none | impl | above: a rule over the heading. below: under it. |
headings.h2.rule.position |
above | below | none | none | impl | above: a rule over the heading. below: under it. |
headings.h3.rule.position |
above | below | none | none | impl | above: a rule over the heading. below: under it. |
headings.h4.rule.position |
above | below | none | none | impl | |
headings.h1.rule.weight |
hairline | thin | medium | thick | heavy | medium | impl | |
headings.h2.rule.weight |
hairline | thin | medium | thick | heavy | medium | impl | |
headings.h3.rule.weight |
hairline | thin | medium | thick | heavy | medium | impl | |
headings.h4.rule.weight |
hairline | thin | medium | thick | heavy | medium | impl | |
headings.h1.rule.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | rule | impl | |
headings.h2.rule.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | rule | impl | |
headings.h3.rule.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | rule | impl | |
headings.h4.rule.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | rule | impl | |
headings.h1.bar.fill |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Set to render the heading as a filled bar across the measure. | |
headings.h2.bar.fill |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Set to render the heading as a filled bar across the measure. | |
headings.h3.bar.fill |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Set to render the heading as a filled bar across the measure. | |
headings.h4.bar.fill |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Set to render the heading as a filled bar across the measure. | |
headings.h1.new_page |
true | false | FALSE | impl | Start every heading of this level on a new page (thesis chapters). |
headings.h2.new_page |
true | false | FALSE | impl | Start every heading of this level on a new page (thesis chapters). |
headings.h3.new_page |
true | false | FALSE | impl | Start every heading of this level on a new page (thesis chapters). |
headings.h4.new_page |
true | false | FALSE | impl | Start every heading of this level on a new page (thesis chapters). |
headings.h1.bar.text |
accent | accent2 | text | muted | rule | background | code_bg | knockout | knockout | impl | |
headings.h2.bar.text |
accent | accent2 | text | muted | rule | background | code_bg | knockout | knockout | impl | |
headings.h3.bar.text |
accent | accent2 | text | muted | rule | background | code_bg | knockout | knockout | impl | |
headings.h4.bar.text |
accent | accent2 | text | muted | rule | background | code_bg | knockout | knockout | impl |
title
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
title.layout |
header | page | thesis | header | impl | Structure, not look. header: the title block sits at the top of the first body page. page: the title block and abstract take a page of their own and the body starts on the next. thesis: a thesis title page (degree statement, optional signature block), an optional copyright page, then front matter (contents, acknowledgements, abstract) before the body. Alignment, case, rules, kicker, subtitle and abstract treatment are separate tokens and apply to every layout. pdf(title_layout = ) overrides it per document. |
title.page.offset |
0 to 0.4 | 0.25 | impl | layout: page only. Space above the title block, as a fraction of the text height. The default sets the title about a third of the way down a letter page. |
title.page.abstract |
title | next | title | impl | layout: page only. title: the abstract sits on the title page. next: it opens the first body page. |
title.align |
left | center | left | impl | |
title.scale |
1 to 5 | 2.6 | impl | |
title.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | text | impl | Near-black is what every design-sets mockup specifies; accent titles are the exception, not the rule. |
title.family |
body | heading | display | heading | impl | |
title.case |
none | upper | smallcaps | none | impl | |
title.weight |
bold | regular | bold | impl | regular is LaTeX’s own unbolded title. |
title.rule.position |
above | below | both | none | none | impl | above: over the kicker and title. below: under the title block. both: both. |
title.rule.weight |
hairline | thin | medium | thick | heavy | thick | impl | |
title.rule.length |
0.3 to 8 | impl | Rule width in inches; omit for the full measure. | |
title.rule.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | rule | impl | |
title.page_break_after |
true | false | FALSE | deprecated | Superseded by title.layout: page, which it now maps to. |
title.kicker.text |
impl | Eyebrow label above the title. Unset = no kicker. | ||
title.kicker.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | |
title.kicker.case |
none | upper | lower | smallcaps | upper | impl | |
title.kicker.scale |
0.5 to 1.5 | 0.8 | impl | Multiple of typography.base_size. |
title.kicker.font |
label | heading | body | label | impl | |
title.subtitle.scale |
0.8 to 2.5 | 1.3 | impl | |
title.subtitle.style |
normal | italic | italic | impl | |
title.subtitle.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | muted | impl | |
title.byline.position |
above | below | below | impl | |
title.byline.case |
none | upper | smallcaps | none | impl | |
title.byline.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | muted | impl | |
title.date.show |
true | false | TRUE | impl | |
title.date.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | muted | impl | |
title.abstract.width |
half | text | full | impl | Narrow the abstract to this width, centred. Overrides indent. | |
title.abstract.size |
0.7 to 1.2 | 0.95 | impl | |
title.abstract.label |
Abstract | impl | ||
title.abstract.rule |
true | false | FALSE | impl | |
title.abstract.show |
true | false | TRUE | impl | false suppresses it entirely — a magazine feature has a deck, not an abstract. |
title.abstract.label_style |
heading | runin | none | heading | impl | heading: centred bold over the block. runin: small-caps label inline with the first line. none: no label. |
title.abstract.indent |
none | sm | md | lg | none | impl | Inset from BOTH margins. |
title.abstract.weight |
regular | bold | regular | impl | bold gives a standfirst rather than an abstract. |
title.abstract.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | text | impl | |
title.abstract.box |
true | false | FALSE | impl | Wrap the abstract in a filled/bordered panel. |
title.abstract.background |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Panel fill when box is true; defaults to code_bg. | |
title.abstract.label_color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | text | impl | |
title.abstract.label_align |
left | center | right | center | impl | |
title.abstract.label_case |
none | upper | smallcaps | none | impl | |
title.keywords.show |
true | false | TRUE | impl | Print the document’s keywords: field under the abstract. |
title.keywords.label |
Keywords | impl | ||
title.warning.auto |
true | false | FALSE | impl | With no warning: in the document, print a stamped draft line (version, date, do not circulate). warning: auto does the same in any style. |
paragraph
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
paragraph.indent |
none | sm | md | lg | none | impl | |
paragraph.spacing |
none | xs | sm | md | lg | xl | sm | impl | |
paragraph.indent_after_heading |
true | false | FALSE | impl | |
paragraph.drop_cap.lines |
2 to 4 | impl | Set to enable a drop cap. | |
paragraph.drop_cap.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | lettrine; unreliable under columns: 2. |
figure
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
figure.style |
plain | ruled | inset | plain | impl | ruled: rules above and below. inset: a light frame. |
figure.width |
half | text | full | impl | Default image width. A width set in the document (out.width) wins. | |
figure.placement |
here | top | bottom | page | impl | Preferred float position. Unset: LaTeX chooses (here, top, bottom or page). | |
figure.caption.position |
above | below | below | impl | |
figure.caption.family |
body | heading | mono | body | impl | |
figure.caption.size |
0.6 to 1 | 0.85 | impl | |
figure.caption.align |
left | center | left | impl | |
figure.caption.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | muted | impl | |
figure.caption.label_style |
bold | italic | smallcaps | plain | none | bold | impl | plain: an unstyled “Figure 1:” label, as LaTeX sets it. none: no label. |
table
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
table.style |
booktabs | grid | zebra | minimal | booktabs | impl | booktabs: three rules. grid: every cell ruled. zebra: shaded alternate rows. minimal: one rule under the header. |
table.row_stretch |
1 to 2 | 1.2 | impl | |
table.size |
0.7 to 1.1 | 0.9 | impl | |
table.zebra_color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | ||
table.header.weight |
regular | bold | bold | impl | |
table.header.case |
none | upper | smallcaps | none | impl | |
table.header.rule_below |
true | false | TRUE | impl | |
table.caption.position |
above | below | above | impl | Only above is achievable: pandoc renders
tables as longtable, which is not a float, so the caption cannot be
relocated from the preamble. above is pandoc’s own default
and every shipped style wants it. |
code
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
code.highlight |
pygments | tango | espresso | zenburn | kate | monochrome | breezedark | haddock | none | tango | impl | |
code.background |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | ||
code.border |
true | false | FALSE | impl | |
code.line_numbers |
true | false | FALSE | impl |
quote
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
quote.indent |
none | sm | md | lg | md | impl | |
quote.style |
normal | italic | normal | impl | |
quote.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | text | impl | |
quote.rule |
true | false | FALSE | impl | Vertical accent rule at the left. |
callout
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
callout.style |
filled | ruled | boxed | plain | filled | impl | filled: tinted panel, no border. ruled: a left bar, no fill. boxed: a border round a tinted panel. plain: indented text with the title, no ornament. |
callout.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | The bar, border and title colour, and the base of the fill tint. |
callout.tint |
0 to 40 | 8 | impl | Fill strength: percent of callout.color mixed into white. filled and boxed only; 0 = no fill. |
callout.rule |
hairline | thin | medium | thick | heavy | thick | impl | ruled: the bar. boxed: the border, where hairline or thin is usual. |
callout.size |
0.8 to 1.1 | 0.95 | impl | Text size, as a multiple of typography.base_size. |
callout.title.case |
none | upper | smallcaps | upper | impl | |
callout.title.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Defaults to callout.color. |
footnotes
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
footnotes.size |
0.6 to 1 | 0.8 | impl | |
footnotes.numbering |
arabic | symbol | arabic | impl |
header_footer
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
header_footer.header.left |
none | title | runningtitle | author | surname | section | page | folio | stamp | none | impl | |
header_footer.header.center |
none | title | runningtitle | author | surname | section | page | folio | stamp | none | impl | |
header_footer.header.right |
none | title | runningtitle | author | surname | section | page | folio | stamp | none | impl | |
header_footer.header.rule |
true | false | FALSE | impl | |
header_footer.header.fill |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Fill the running head with a full-bleed colour band spanning the whole paper width, not just the text block. The Economist flag and a government masthead. Suppresses header.rule, which a filled band does not want. | |
header_footer.header.bleed |
true | false | TRUE | impl | With header.fill: true runs the band to the paper edges; false keeps it to the text measure, aligned with the body. |
header_footer.header.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Ink used inside the running head. Unset: muted for a plain head, text inside a band. With header.fill set this is the knockout colour – white-on-red is fill: accent, color: knockout. | |
header_footer.footer.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | impl | Ink used in the running foot. Unset: muted. | |
header_footer.footer.left |
none | title | runningtitle | author | surname | section | page | folio | stamp | none | impl | |
header_footer.footer.center |
none | title | runningtitle | author | surname | section | page | folio | stamp | none | impl | |
header_footer.footer.right |
none | title | runningtitle | author | surname | section | page | folio | stamp | page | impl | |
header_footer.footer.rule |
true | false | TRUE | impl | |
header_footer.alternate |
true | false | FALSE | impl | Under page.twoside: mirror the left and right slots on
even pages, so right is always the outer edge and
left the inner. Slot values: folio is page/pages; stamp is
the running title, version and date (see pdf(version = )). |
header_footer.section_chars |
20 to 120 | impl | Set: section in a running head shows the
first level-1 heading on the page, numbered and cut at this many
characters. Unset: LaTeX’s own . |
|
header_footer.page_number.format |
arabic | roman | arabic | impl | Front-matter page numbers in the thesis layout. roman: i, ii, …; the body starts again at 1. |
header_footer.first_page |
plain | none | header | folio | plain | impl | plain: LaTeX default (centred footer folio, no running head on page 1). none: nothing on page 1. header: carry the running head onto page 1 too. folio: page 1 keeps the band and the folio slots, but drops the running title. |
links
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
links.color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl |
thesis
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
thesis.statement |
A thesis submitted in partial fulfillment of the requirements for the degree of | impl | ||
thesis.degree |
impl | e.g. Master of Arts in Sociology. YAML: degree. | ||
thesis.institution |
impl | One line per line of text. YAML: institution. | ||
thesis.signatures |
true | false | FALSE | impl | Signature lines for the committee on the title page. YAML: signatures. |
markup
| Token | Allowed | Default | Status | Notes |
|---|---|---|---|---|
markup.line_numbers |
0 to 10 | 0 | impl | Number every nth line in the outer margin, restarting on each page. 0: off. |
markup.paragraph_numbers |
true | false | FALSE | impl | Number body paragraphs continuously in the inner margin (¶n), so a note made on one printout finds its paragraph in the next. |
markup.flags |
true | false | FALSE | impl | [[TODO]], [[CITE]], [[WEAK]], [[CUT]], [[CHECK]], [[FIX]] in the text print as margin tags; [[TAG: words]] also keeps the words inline in markup.flag_color. |
markup.flag_color |
accent | accent2 | text | muted | rule | background | code_bg | knockout | accent | impl | |
markup.cite_keys |
true | false | FALSE | impl | Print each citation’s bibliography key in small muted type after it. |
markup.map |
0 to 3 | 0 | impl | Open the body with a map of the argument: each heading to this depth, with its words and starting page. 0: off. |
markup.claim_check |
true | false | FALSE | impl | Flag [[LABEL?]] beside a heading of fewer than four words: a label where a claim belongs. Advisory. |
markup.changebars |
true | false | FALSE | impl | Rule beside each paragraph changed since a reference version: pdf(changes_since = ), else the latest git tag. |
markup.floats |
true | false | TRUE | impl | false: tables and figures stay exactly where they are written; nothing floats. |