This project is open-sourced on github and gitlink (China-network friendly).
A Chinese Markdown-to-PDF project based on Pandoc + LuaLaTeX.
This project is derived from and heavily adapted for Chinese from Eisvogel.
It supports a graded six-level heading scale, Chinese fake-bold / fake-italic, colorful emoji and special symbols, GitHub-style admonitions, code highlighting, tables and math formulas — ideal for turning course notes, lab reports and documents into polished, good-looking PDFs.
Features
Graded six-level heading scale: # to ###### step down in size, with a clear hierarchy.
Chinese bold / italic: AutoFakeBold / AutoFakeSlant allow synthesizing bold and italic even for fonts that lack them.
Colorful emoji and special symbols: uses lualatex + mainfontfallback to render Unicode characters and colorful emojis.
GitHub-style admonitions: the alerts.lua filter renders five colored callout blocks — note / tip / important / warning / caution.
Code highlighting, tables, math formulas: native Pandoc support, with the idiomatic syntax-highlighting style.
Title page / TOC / colored links: controlled via YAML Front Matter switches.
SimSun, Source Sans 3, Noto Color Emoji, FreeSans, DejaVu Sans
Font notes: SimSun is used for Chinese body text; Source Sans 3 is the Latin main font; Noto Color Emoji / FreeSans / DejaVu Sans form the emoji and special-symbol fallback chain.
Usage
One-shot build
Put your Markdown files into src/, then run the build script:
.\build.ps1
The script iterates over every *.md in src/ and produces a matching build/<name>.pdf for each.
Build script parameters:
Input format: markdown+alerts
Template: resources/latex/eisvogel.latex
Engine: lualatex
Filter: resources/alerts.lua
Syntax highlighting: idiomatic
Chinese main font: SimSun; Latin main font: Source Sans 3
emoji / symbol fallback chain: Noto Color Emoji → FreeSans → DejaVu Sans
Set the title, author, table of contents, title page, etc. with a YAML block at the top of your .md file:
---
title: "标题"
author: [你的名字]
date: "2026-09-12"
subject: "Markdown"
keywords: [关键词, markdown]
subtitle: "副标题"
titlepage: true # Enable the cover page
titlepage-rule-color: "00727c"
titlepage-background: "<absolute path>" # Title-page background
page-background: "<absolute path>" # Body-page background
colorlinks: true # Color hyperlinks
block-headings: true # Headings occupy their own line
toc: true # Table of contents
toc-own-page: true # TOC on its own page
---
[!NOTE]
During testing we found that using an absolute path for the background prevents a successful build. For any other questions, feel free to discuss them in the Issues section.
GitHub-style admonitions
Use the GitHub-style > [!TYPE] blockquote syntax; alerts.lua renders it as a colored block:
mdToPDF
A Chinese Markdown-to-PDF project based on Pandoc + LuaLaTeX.
This project is derived from and heavily adapted for Chinese from Eisvogel.
It supports a graded six-level heading scale, Chinese fake-bold / fake-italic, colorful emoji and special symbols, GitHub-style admonitions, code highlighting, tables and math formulas — ideal for turning course notes, lab reports and documents into polished, good-looking PDFs.
Features
#to######step down in size, with a clear hierarchy.AutoFakeBold/AutoFakeSlantallow synthesizing bold and italic even for fonts that lack them.lualatex+mainfontfallbackto render Unicode characters and colorful emojis.alerts.luafilter renders five colored callout blocks —note / tip / important / warning / caution.idiomaticsyntax-highlighting style.Directory Structure
Requirements
SimSun,Source Sans 3,Noto Color Emoji,FreeSans,DejaVu SansFont notes:
SimSunis used for Chinese body text;Source Sans 3is the Latin main font;Noto Color Emoji / FreeSans / DejaVu Sansform the emoji and special-symbol fallback chain.Usage
One-shot build
Put your Markdown files into
src/, then run the build script:The script iterates over every
*.mdinsrc/and produces a matchingbuild/<name>.pdffor each.Build script parameters:
markdown+alertsresources/latex/eisvogel.latexlualatexresources/alerts.luaidiomaticSimSun; Latin main font:Source Sans 3Noto Color Emoji→FreeSans→DejaVu SansSingle-file build
Writing Markdown
Front Matter
Set the title, author, table of contents, title page, etc. with a YAML block at the top of your
.mdfile:GitHub-style admonitions
Use the GitHub-style
> [!TYPE]blockquote syntax;alerts.luarenders it as a colored block:Customization
resources/latex/eisvogel.latex(heading sizes, fonts, colors, headers/footers, etc.).resources/alerts.lua(colors, borders, title text).build.ps1.LICENSE
This project is released under the PolyForm Noncommercial License 1.0.0.
Noncommercial use is free to use, modify and distribute; for commercial use, please contact the author.