Back to browse
GitHub Repository

Markdown to PDF via Typst. single binary, LaTeX math, beautiful templates

23 starsRust

Single-Binary Markdown-to-PDF CLI in Rust, Powered by Typst (MDXport)

by ZacharyZZ·Feb 20, 2026·3 points·0 comments

AI Analysis

●●SolidShip ItSolve My ProblemNiche Gem

Typst-powered Markdown-to-PDF beats Pandoc+LaTeX, but Pandoc already owns this niche.

Strengths
  • Single zero-dependency binary eliminates the Pandoc+LaTeX pain point entirely.
  • Proper CJK support with font detection and auto-install—genuine quality-of-life win.
  • Clean CLI design: watch mode, stdin piping, custom templates, and frontmatter metadata all present.
Weaknesses
  • Pandoc is entrenched, battle-tested, and handles edge cases mdxport hasn't seen yet.
  • Only 1 star and minimal community traction—unclear if real-world complexity will surface.
Target Audience

Developers and writers who need fast, offline Markdown-to-PDF conversion without LaTeX overhead.

Similar To

Pandoc · WeasyPrint · Typst CLI (direct)

Post Description

I wanted a fast way to turn Markdown files into good-looking PDFs from the terminal. Pandoc + LaTeX is powerful but heavy. Browser-based tools break my workflow. So I built mdxport: one binary, no dependencies, pipe in Markdown, get a PDF.

Under the hood it parses Markdown with comrak, converts to Typst, and compiles to PDF in-process. No LaTeX installation, no network calls, no temp files flying around.

What it handles: LaTeX math ($E=mc^2$, display blocks), GFM tables, fenced code blocks, YAML frontmatter (title/author/lang/toc), and two built-in templates. You can also pass your own .typ template.

CJK support was a pain point I wanted to solve properly. mdxport fonts install downloads Noto CJK fonts, and the converter auto-detects CJK characters and warns if fonts are missing. Chinese/Japanese/Korean documents just work.

Watch mode (mdxport input.md -w) recompiles on save. Stdin works too: cat notes.md | mdxport -o notes.pdf.

Install: npm install -g @mdxport/cli (ships platform-specific binaries, no Rust toolchain needed) or cargo install mdxport.

https://github.com/cosformula/mdxport-cli (MIT, Rust, 55 tests, CI builds for macOS/Linux/Windows)

There's also a web version at https://mdxport.com if you prefer a browser UI.

Similar Projects