obsidian-pdf
复现Obsidian渲染与排版细节,适合笔记与稿件美观导出。
把Markdown渲染为与Obsidian导出视觉一致的PDF文件。
把 Markdown 渲染成和 Obsidian 导出几乎一模一样的 PDF(A4、Arial、MathJax 数学公式、缩进列表等),用到 pandoc + headless Chromium 而不是 LaTeX。在你编辑了 .md 文件后,需要生成与 Obsidian 导出视觉一致的 PDF,或者要重新导出笔记、论文、封面信时用。特点是复刻 Obsidian 的渲染样式和打印引擎,保证公式和样式长得一样。
▸ 展开 SKILL.md 英文原文
Render Markdown (.md) files to PDF that visually matches Obsidian's "Export to PDF" (A4, Arial, MathJax-rendered equations, indented bullet lists). Use when the user wants to generate, export, or regenerate a PDF from Markdown — e.g. a paper, cover letter, highlights, notes — and the output must look like an Obsidian export, especially after editing the .md. Triggers include "generate/export PDF", "PDF from markdown", "和 Obsidian 一致的 PDF", "生成 PDF", "导出 PDF". Uses pandoc + headless Chromium (the same rendering engine Obsidian uses), NOT LaTeX or weasyprint.
帮我安装这个 skill:https://raw.githubusercontent.com/zhangys11/agent-skills/main/skills/obsidian-pdf/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/zhangys11/agent-skills/main/skills/obsidian-pdf/SKILL.md"# Obsidian-styled PDF from Markdown
Produce a PDF from a `.md` file that looks like Obsidian's **Export to PDF**.
Obsidian renders Markdown to HTML with its own CSS and prints it with the
bundled Chromium. This skill reproduces that with:
```
pandoc (Obsidian-compatible flags) -> standalone HTML (+ MathJax + Obsidian CSS)
-> headless Chromium -> PDF
```
Do **not** use a LaTeX engine (`pandoc -> pdf`) or weasyprint: LaTeX looks
nothing like Obsidian, and weasyprint cannot run MathJax so equations break.
## Quick start
```bash
# one or more .md files; each produces <name>.pdf next to it
bash scripts/make_pdf.sh path/to/paper.md
bash scripts/make_pd