API Reference Folio v#0.3.0

Copy Markdown View Source

Modules

Print-quality PDF from Markdown + Elixir, powered by Typst.

Error returned when Folio compilation fails.

Typed content nodes that map 1:1 to Typst elements.

Content alignment.

A bibliography listing. Fields: sources, title, full, style.

Block-level container.

Circle shape.

A citation from a bibliography. Fields: key, supplement, form, style.

Column break.

Multi-column layout.

Horizontal divider.

Ellipse shape.

Italic text.

Numbered list item.

Numbered (ordered) list.

A figure with optional caption. Fields: body, caption, placement, numbering.

Grid layout. Fields: columns, rows, gutter, column_gutter, row_gutter, children.

Grid cell. Fields: body, colspan, rowspan, align, fill.

Horizontal spacing.

A section heading. Fields: body, level (1-6).

Hidden content.

Highlighted text.

An image. Fields: src, width, height, fit.

Cross-reference label.

Line shape.

Hyperlink.

Bullet list.

Bullet list item.

Local style overrides for a content block. Mirrors Typst's #set text(...) within a scope.

Math expression.

Table of contents.

Padding around content.

A body paragraph. Field: body.

Paragraph break.

Absolute placement.

Polygon shape.

Block quote.

Raw/code text.

Raw Typst source injected directly into the document. Use when Folio's abstraction isn't enough.

Rectangle shape.

Cross-reference.

Repeating content.

Content sequence.

A show rule that transforms matching content elements before compilation.

Small capitals text.

Inter-word space.

Square shape.

Stacked layout.

Strikethrough text.

Subscript text.

Superscript text.

A table grid. Fields: children, gutter, stroke, align, inset, fill.

Table header row.

Table data row.

Term list item.

Definition/term list.

A plain text run. Fields: text, size, weight, fill, tracking.

Document title.

Underlined text.

Vertical spacing.

Builder functions for Folio content nodes.

A complete document with content, styles, and file attachments.

Error returned when Markdown parsing fails.

Apply show rules to content trees before compilation.

Markdown sigil ~MD for Folio.

Style rules for customizing document appearance.

Enum list body indent. Field: body_indent.

Enum list indent. Field: indent.

Enum list item spacing in em. Field: spacing.

Font stack. Field: families.

Base font size in points. Field: size.

Font weight (100-900). Field: weight.

Include heading in PDF bookmarks. Field: bookmarked.

Heading number format (e.g. "1.", "A.1"). Field: pattern.

Include heading in outline. Field: outlined.

Heading supplement text (e.g. "Chapter"). Field: content.

Enable/disable hyphenation. Field: hyphenate.

Document language (ISO 639-1 code). Field: lang.

Line leading in em units. Field: leading.

Bullet list body indent. Field: body_indent.

Bullet list indent. Field: indent.

Bullet list item spacing in em. Field: spacing.

Page footer content. Field: content.

Page header content. Field: content.

Page margins in points. Fields: top, right, bottom, left.

Page number format (e.g. "1", "i"). Field: pattern.

Page dimensions in points. Fields: width, height.

First-line paragraph indent in points. Fields: indent, all.

Enable justified paragraphs. Field: justify.

Paragraph spacing in em units. Field: spacing.

Text fill color (hex, named, rgb). Field: color.