Expand description
Document style spec.
Loaded either from a TOML file (Style::from_toml_str /
Style::from_toml_file) or built from the in-code Default impl. All
fields are #[serde(default)] so partial overrides are easy: a TOML
file can specify just the page size and inherit everything else.
Structs§
- Callout
Style - Callout
Styles - Code
Highlight Style - Per-token-class colour palette for the built-in syntax highlighter.
Token classes a language doesn’t produce simply go unused; languages
without a recognised name (or
languageattribute) fall back tocode_text_color. - Color
Rgb - Cover
Page Style - Footnote
Style - Per-page footnote pool styling.
- Frontmatter
Column - One column of a
FrontmatterTable. - Frontmatter
Table - One entry of
Style::frontmatter_tables: where the rows of a table come from, its columns, and the heading above it. - Header
Footer Slots - Just the three slot templates — used for even-page variants and
per-chapter overrides. Empty fields fall back to the parent
HeaderFooterStyle’s slot. - Header
Footer Style - Heading
Numbering - Automatic section numbering for headings (
1,1.1,1.1.1, …). - Heading
Style - Heading
Styles - Hyphenation
Style - Word-hyphenation settings. When
enabled, the renderer pre-walks body text and inserts soft hyphens (U+00AD) at every Knuth–Liang hyphenation point for the configured language. parley breaks lines at those points when needed and the hyphens stay invisible otherwise. - Last
Page Qr - A small QR code stamped in a bottom corner of the last page (per
align) that carries content, above a human-readable label.valueandlabelare templates (default"{documentNumber}", resolved against the document’s frontmatter and the usual{page}/{title}/… tokens); avaluethat doesn’t resolve (no such field) skips the stamp entirely, and an empty resolvedlabelhides the caption. A field whose value is one ofmissing_valuescounts as not set. - Link
Style - How
[text](url)links are visually distinguished from body text. The PDF link annotation is created regardless of these settings; these only affect the glyphs underneath so readers spot the link without hovering. - List
Marker Style - Styling for list-item markers. Bullets (unordered lists) are unaffected; these knobs shape ordered-list numbering and the optional circular badge treatment.
- List
Section Style - Generic auto-generated list section: List of Figures, List of
Tables. Same shape as a TOC but flat (no level indenting). The
titlefield is optional so callers can omit it from TOML and let the renderer pick a sensible default per section (“List of Figures” forlof, “List of Tables” forlot). - Logo
Spec - A header/footer logo: an asset URI plus the rendered display size in PDF points. The renderer decodes the asset once per document and caches the result by URI, so repeating the same logo across pages costs the same as decoding it for one page.
- Notice
Banner - A masthead drawn at the top of every page: a logo (with an optional subtitle beneath it) on the left, a wrapping disclaimer paragraph below them, an icon on the right whose label is centred beneath it just above an optional note line + full-width rule closing the band.
- Page
Decoration Style - Page-level header/footer decoration. Both are optional — by default no decoration is drawn, matching the previous behaviour.
- Page
Layout Style - Style
- TocStyle
- Table of contents — generated from the document’s heading outline.
Disabled by default. When enabled, the TOC pages are inserted at
positionand each entry links to its target heading via PDF internal destinations (powered by the same anchor mechanism that{% tagref %}uses, with synthetic anchor ids assigned to every heading). - Watermark
- A page-level watermark. Use the
kindfield to pick image vs text. - Watermark
Image - Watermark
Text
Enums§
- Callout
Decoration - How a callout is framed.
- Caption
Position - Where the visual caption block sits relative to its figure or table.
Applies to both
{% caption %}-attached and alt-derived captions. - Cover
Align - Horizontal alignment of the cover-page text blocks.
- Logo
Position - Synthesised cover/title page placed before any body content. The
renderer pulls title / description / authors / date from
RenderContext(which the CLI populates from frontmatter), plus an optional logo image. Disabled by default — most documents don’t need a cover page. - Marker
Sequence - Ordered-list numbering style for one nesting level. Mirrors the CSS
list-style-typevalues of the same name. - PdfExport
Profile - PDF export profile — selects the krilla validator and provides
document-metadata defaults that the renderer applies via
RenderContext. - Style
Load Error - Table
Borders - Which rules a table draws.
- Table
Column Sizing - Strategy for sizing table columns.
- Text
Align - Horizontal alignment for body prose. Mirrors CSS
text-align. - TocPosition
- Watermark
Kind