Configuration

Two layers: plugin settings (apply to every book) and per-book overrides (defined in the manifest’s frontmatter, override the matching plugin setting).

Plugin settings

Setting Type Default Description
Pandoc path string pandoc Required. Full path or PATH name.
PDF engine path string (empty) Optional full path to the PDF engine binary (typst, xelatex, tectonic, weasyprint). Forwarded as --pdf-engine=<path>, bypassing $PATH. Used only when its basename matches the selected PDF engine — so it works for whichever engine you pick, weasyprint included. Leave empty to rely on $PATH.
Extra PATH directories string (empty) Optional directories prepended to $PATH for the spawned pandoc process (:-separated on macOS/Linux). Lets pandoc find the PDF engine and its helpers without pinning each path. Handy on macOS, where Obsidian starts with a stripped $PATH.
Default output folder string (empty — required) Absolute filesystem path where exported books are written. ~ is expanded to your home directory. The plugin refuses to export until this is set. Examples: ~/Downloads, /home/me/Books.
Default formats comma list epub,pdf Used by Export to all formats when the manifest doesn’t specify any.
PDF engine enum typst typst (recommended) / xelatex / tectonic / weasyprint.
Default language BCP-47 en Used when the manifest doesn’t set language.
Default author(s) comma list (empty) Used when the manifest doesn’t define authors: in its frontmatter. Empty falls back to Anonymous (with a warning).
Cover frontmatter property string cover Frontmatter key read for the book cover image. Set this to cover_image, cover_url, or whatever name fits your frontmatter conventions. The value can be a vault-relative path, an absolute path, an [[wikilink]], or an http(s) URL (downloaded to the temp folder before pandoc runs).
Sections to skip comma list Related, References, Title Options, Target Audience Heading names (case-insensitive). Applied to the manifest body before parsing (drops authoring scaffolding) AND to each linked note when inlining (drops housekeeping sections).
Inlined-note separator enum none Visual cue between successive notes inside the same section. none keeps the legacy run-on layout; rule emits a centred * * * glyph rule; blank adds extra spacing; subheading renders each note’s display title as a heading one level below the section heading. Per-book override: book_export.inlined_note_separator.
Inline note embeds boolean false When on, ![[Note]] embeds inside inlined notes are recursively expanded with the embedded note’s body. Default off — embeds are dropped (only image embeds are kept).
Note embed max depth integer 3 Maximum recursion depth for note-embed expansion. 1 = direct embeds only; 2 = embeds of embeds; etc. Embeds at the depth limit are replaced with their display title.
PDF main font string Liberation Serif Forwarded as -V mainfont=… for PDF. Required by Typst (Pandoc 3.6+ fails with “font fallback list must not be empty” if empty). Use a font reported by typst fonts (e.g. New Computer Modern, Noto Serif). Override per book via pandoc_extra_args.
PDF mono font string Liberation Mono Forwarded as -V monofont=… for code blocks (e.g. DejaVu Sans Mono, JetBrainsMono NF).
Typst image width string 100% Forwarded as #set image(width: <value>) in the Typst preamble. Caps every image when the PDF engine is Typst. Accepts any Typst length (100%, 80%, 15cm). Leave empty to disable.
Page size string (empty) PDF paper size — a4, us-letter, a5, legal, … Translated per engine (Typst/LaTeX papersize, weasyprint CSS @page size). Empty = engine default. Per-book override: book_export.page_size.
Page margin string (empty) Uniform page margin with a unit (2cm, 1in). Typst/LaTeX geometry, weasyprint CSS @page margin. Empty = engine default. Per-book override: book_export.margin.
Line spacing string (empty) Unitless multiple (1.5). LaTeX setspace, Typst par(leading), weasyprint line-height. Empty = single. Per-book override: book_export.line_spacing.
Base font size string (empty) Body font size (11pt; a bare number gets pt appended). Forwarded as -V fontsize=… (Typst/LaTeX) or CSS font-size (weasyprint). Note: standard LaTeX classes only honour 10/11/12pt. Per-book override: book_export.base_font_size.
Number sections boolean false Forwards --number-sections — headings get hierarchical numbers (1, 1.1, 1.1.1, …). Per-book override: book_export.number_sections.
Include TOC by default boolean true Adds --toc to Pandoc.
Auto TOC depth boolean true When on, the TOC depth is derived from the deepest heading level actually present in the manifest (parts + chapters → 3, flat chapters → 2). Disable to use the static fallback. Per-book book_export.toc_depth always wins.
TOC depth (fallback) integer 2 --toc-depth=N. Used only when Auto TOC depth is off, or when the manifest has no parseable heading.
Page break per chapter boolean true Inserts a page break before each top-level section (the lowest-numbered heading level used in the manifest).
Keep temporary files boolean false Debug — keeps the compiled manuscript and resources after export.
Verbose console logging boolean false Debug.

Per-book overrides (book_export)

Add a book_export: block to the manifest’s frontmatter. All keys are optional; missing keys fall back to the plugin setting.

book_export:
    output_dir: '~/Books/The Context Layer'
    pdf_engine: typst
    toc_depth: 3
    include_toc: true
    page_break_per_chapter: true
    formats: [epub, pdf]
    sections_to_skip: [Related, References, Notes]
    inlined_note_separator: rule
    front_matter_sections: [Foreword, Preface]
    page_size: a4
    margin: 2cm
    line_spacing: 1.5
    base_font_size: 11pt
    pandoc_extra_args:
        - --top-level-division=chapter
        - --resource-path=.
Key Type Description
output_dir string Absolute filesystem path for this book’s exports. Supports ~. Overrides the global setting.
pdf_engine enum Overrides the global PDF engine.
toc_depth integer Overrides the global TOC depth.
include_toc boolean Whether to include a TOC for this book.
page_break_per_chapter boolean Page-break behaviour for this book.
number_sections boolean Forwards --number-sections to pandoc for this book.
formats list Formats produced by Export to all formats. Subset of [epub, pdf].
sections_to_skip list Heading names (case-insensitive). Applied to both the manifest body and linked notes. Replaces — does not extend — the global setting.
inlined_note_separator enum none / rule / blank / subheading. Overrides the plugin setting for this book.
front_matter_sections list Top-level section titles (case-insensitive) treated as front matter — pages numbered with lowercase roman numerals (i, ii, …). The first non-matching top-level section starts body matter and resets numbering to arabic (1, 2, …). Applies to the PDF targets (Typst, LaTeX, and weasyprint); EPUB readers ignore print page numbering. Example: [Foreword, Preface, Acknowledgements].
page_size string PDF paper size for this book (a4, us-letter, a5, …). Overrides the Page size setting.
margin string Uniform page margin with a unit (2cm, 1in). Overrides the Page margin setting.
line_spacing string Unitless line-spacing multiple (1.5). Overrides the Line spacing setting.
base_font_size string Body font size (11pt; bare numbers get pt). Overrides the Base font size setting.
pandoc_extra_args list of strings Extra arguments forwarded to Pandoc verbatim. Always win over the plugin’s own page-setup / font args.

Where files go

  • Exports — written to the configured Default output folder (or per-book book_export.output_dir). Absolute filesystem paths only; ~ is expanded. The plugin refuses to export when the folder is not configured.
  • Temp files — created inside the OS temp directory (os.tmpdir(), e.g. /tmp/book-exporter-<book>-<random>/ on Linux). Never inside your vault. Cleaned up automatically after each export unless Keep temporary files is on.

External tools

Tool Required for Install
Pandoc ≥ 3.x EPUB, PDF https://pandoc.org/installing.html
Typst PDF (recommended) https://typst.app — single small binary, beautiful output, fast
xelatex / tectonic PDF (alternatives) only if you already have a TeX setup
weasyprint PDF (alternative) HTML/CSS engine — pip install weasyprint

If a binary is not on $PATH, set its full path in Settings → Book Exporter.

PDF quality notes

The default engine is Typst for one reason: it gives professional book typography (proper page breaks, no split images, hyphenation, widow/orphan control) without the install pain of LaTeX. xelatex / tectonic produce comparable output if you already have them. weasyprint is supported too (HTML/CSS rendering) — the plugin generates a stylesheet so front-matter roman numbering, the main-matter reset to page 1, the full-bleed cover, and page setup all work. (wkhtmltopdf is not supported: its WebKit engine can’t restart page numbering, so it produced silently wrong output.)