md-to-pdf

Featured

Convert Markdown to styled PDFs with Mermaid diagrams, LaTeX/KaTeX math, tables, and code highlighting. Triggers on: "convert markdown to pdf", "make a pdf from this md", "export markdown as pdf", "pdf from markdown with equations".

Data & Documents 313 stars 46 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
83
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Markdown to PDF Converter Converts Markdown files to professionally styled PDFs with full rendering of Mermaid diagrams, LaTeX math (via KaTeX), tables, syntax-highlighted code blocks, and all standard Markdown features. ## Architecture ````text Input .md file │ ├─ Step 1: Extract ```mermaid blocks → render to SVG via mmdc (Mermaid CLI + Puppeteer) │ Replace mermaid code blocks with inline <svg> in the markdown source │ ├─ Step 2: pandoc converts modified markdown → standalone HTML5 │ (--katex flag preserves raw LaTeX in <span class="math ..."> elements) │ ├─ Step 3: Node.js KaTeX server-side rendering │ Replaces math spans with fully rendered KaTeX HTML (no client-side JS needed) │ ├─ Step 4: CSS injection │ KaTeX stylesheet (with local font paths) + professional document styles + optional custom CSS │ └─ Step 5: Playwright (headless Chromium) prints final HTML → PDF ↓ Output .pdf file ```` ## Supported Features | Feature | Rendering Engine | Notes | | -------------------- | -------------------------------- | --------------------------------------------------------------------- | | Mermaid diagrams | mmdc (mermaid-cli) via Puppeteer | flowchart, sequence, class, state, ER, gantt, pie, git, mindmap, etc. | | LaTeX math (inline) | KaTeX serve...

Details

Author
Mathews-Tom
Repository
Mathews-Tom/armory
Created
5 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category