Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Markdown Book BuilderNew to Visual Studio Code? Get it now.
Markdown Book Builder

Markdown Book Builder

Apaya

| (0) | Free
Build PDF and EPUB books from Markdown folders with Mermaid diagram rendering.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Book Builder

Build PDF and EPUB books from a folder of Markdown files.

Features

  • Right-click a folder in the Explorer and build PDF, EPUB, or both
  • Combines .md and .markdown files in natural filename order
  • Supports markdown-book.json and book.order.json
  • Renders Mermaid fenced code blocks through Mermaid CLI before Pandoc runs
  • Uses high-resolution PNG Mermaid diagrams for PDF and SVG Mermaid diagrams for EPUB
  • Saves output to your operating system Downloads folder by default
  • Uses temporary Mermaid and Puppeteer config files only inside .book-build/<build-id>
  • Uses local desktop tools only: Pandoc, Mermaid CLI, Chrome/Chromium, and a PDF engine
  • Works on macOS, Windows, and Linux desktop VS Code

Requirements

  • EPUB builds require Pandoc
  • PDF builds require Pandoc and a PDF engine such as xelatex
  • Mermaid rendering requires Mermaid CLI only when Mermaid code blocks exist
  • Mermaid CLI browser rendering can use detected Google Chrome or a configured Chromium executable

Install the tools with the package manager appropriate for your OS:

  • macOS: official installers, MacTeX, npm, or your preferred package manager
  • Windows: official Pandoc installer, MiKTeX or TeX Live, npm
  • Linux: your distribution packages, TeX Live packages, npm

The extension does not bundle or install these tools.

Usage

Right-click a folder in the VS Code Explorer, then choose Markdown Book Builder.

Commands:

Command Description
Build PDF and EPUB Builds both formats
Build PDF Builds only the PDF
Build EPUB Builds only the EPUB
Validate Build Requirements Checks local tool availability
Open Build Settings Opens extension settings
Reveal Last Output Opens the last output folder

Configuration File

Place markdown-book.json in the selected folder:

{
  "title": "Apaya Quant Learning",
  "author": "Raghav Khunger",
  "outputName": "Apaya-Quant-Learning",
  "outputDirectory": "~/Downloads",
  "recursive": false,
  "toc": true,
  "tocDepth": 3,
  "numberSections": true,
  "chromePath": "",
  "pdf": {
    "pageSize": "a5",
    "fontSize": "12pt",
    "margin": "14mm",
    "lineStretch": 1.15,
    "engine": "xelatex",
    "mermaidFormat": "png",
    "mermaidScale": 2
  },
  "epub": {
    "mermaidFormat": "svg"
  },
  "mermaid": {
    "enabled": true,
    "htmlLabels": false,
    "theme": "default",
    "backgroundColor": "transparent",
    "scale": 2,
    "concurrency": 2
  }
}

Use book.order.json for explicit chapter order:

{
  "files": ["01-introduction.md", "02-market-data.md", "03-backtesting.md"]
}

Remote Workspaces

For Remote SSH, Dev Containers, or WSL, install Pandoc, Mermaid CLI, and the PDF engine in the remote environment where the extension host runs.

Privacy

Markdown Book Builder runs entirely locally. Markdown content is passed only to local Pandoc and Mermaid CLI processes.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft