Convert Markdown documents to PDF, with support for automatic illustration.
Features
- 📄 Markdown → PDF conversion
- 🎨 Optional: automatically call illustration-generator to generate illustrations
- 🇨🇳 Chinese font support
- 🎯 New Yorker style layout
Usage
Basic usage
# 仅转换(需要图片已存在)
/md-to-pdf <markdown_file>
Generate illustrations automatically, then convert
/md-to-pdf <markdown_file> --with-illustrations
Specify the output path/md-to-pdf <markdown_file> -o output.pdf
### 工作流程
1. 检查图片是否存在
2. 如果 `--with-illustrations`:调用 illustration-generator
3. 使用 WeasyPrint 转换 MD → PDF
4. 输出 PDF 文件
## 输出
- PDF 文件:与 MD 同名,`.pdf` 后缀
- 包含封面、配图、格式化文本
## 依赖
- WeasyPrint
- illustration-generator (可选)