Convert Markdown files to PDF with full LaTeX math formula rendering and CJK (Chinese/Japanese/Korean) support. Use when the user asks to convert markdown to PDF, render a report as PDF, export notes to PDF, or generate a printable document from markdown. Handles $...$ inline and $$...$$ display math, code blocks, tables, and mixed CJK/Latin text. Requires pandoc + texlive-xetex.
Convert Markdown → PDF via Pandoc + XeLaTeX. Full LaTeX math + CJK support.
System packages (apt):
CODEBLOCK0
CODEBLOCK1
The script auto-detects CJK content, picks suitable fonts, sanitizes emoji, adds TOC, and configures XeLaTeX.
For fine-grained control, run pandoc directly:
CODEBLOCK2
Where header.tex contains:
CODEBLOCK3
$...$ (inline) and $$...$$ (display) to LaTeX math. No MathJax/KaTeX needed.✅ → [Y], ❌ → [N], ⭐ → *) since most LaTeX fonts lack emoji glyphs.-f markdown-smart to avoid curly quote rendering issues.longtable LaTeX package.| Problem | Fix |
|---|---|
| Missing character warnings | Check fc-list :lang=zh for available CJK fonts; install fonts-noto-cjk if needed |
| INLINECODE13 |
texlive-xetex |
| PDF has no math rendering | Ensure markdown uses $...$ / $$...$$ (not HTML math tags) |
| Broken table layout | Simplify table or add -V geometry:margin=15mm for more width |该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 md2pdf-xelatex-1776420079 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 md2pdf-xelatex-1776420079 技能
skillhub install md2pdf-xelatex-1776420079
文件大小: 3.83 KB | 发布时间: 2026-4-17 20:04