Converts Markdown files to PDF files using the pandoc command-line utility. Use when a user asks to convert a .md or markdown file to a .pdf file.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install pandic-office或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install pandic-office⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/pandic-office/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: local-pandoc description: Converts Markdown files to PDF files using the pandoc command-line utility. Use when a user asks to convert a .md or markdown file to a .pdf file. ---
This skill uses the pandoc command-line utility to convert documents between numerous markup formats.
The fundamental structure of a pandoc command is:
pandoc [options] [input-file]…
To convert a Markdown file to HTML:
pandoc -o output.html input.md
While pandoc can infer formats from file extensions, you can be explicit with the -f (from) and -t (to) flags.
# Convert HTML to Markdown
pandoc -f html -t markdown input.html
To create a complete document with a proper header and footer (e.g., a full HTML file), use the -s or --standalone flag.
pandoc -s -o output.html input.md
The following examples are extracted from the official Pandoc User's Guide.
To create a PDF, pandoc typically uses a LaTeX engine. Ensure one is installed.
# Basic PDF creation
pandoc input.md -o output.pdf
# Control PDF engine and style via variables
pandoc input.md -o output.pdf --pdf-engine=xelatex -V geometry:margin=1in -V fontsize=12pt
Pandoc can automatically generate a table of contents and use document metadata.
# Create a document with a Table of Contents (up to level 3 headings)
pandoc --toc --toc-depth=3 -o output.docx input.md
# Set metadata fields from the command line
pandoc -M title:"My Report" -M author:"Galactus" -o output.pdf input.md
You can control the final output's structure and style with templates and other options.
# Use a custom template for HTML output
pandoc -s --template=my-template.html -o output.html input.md
# For HTML output, link to a custom CSS file
pandoc -s --css=styles.css -o output.html input.md
# For DOCX output, use a reference document for styling
pandoc --reference-doc=reference.docx -o output.docx input.md
Pandoc can directly fetch and convert content from a URL.
pandoc -f html -t markdown https://www.fsf.org
# Preserve tabs instead of converting them to spaces
pandoc --preserve-tabs ...
# Control line wrapping in the output source code
pandoc --wrap=none ...
# Shift heading levels (e.g., make all H1s into H2s, H2s into H3s)
pandoc --shift-heading-level-by=1 ...
This enhanced documentation provides a more robust foundation for using pandoc.
安装 md-to-office 后,可以对 AI 说这些话来触发它
Help me get started with md-to-office
Explains what md-to-office does, walks through the setup, and runs a quick demo based on your current project
Use md-to-office to converts Markdown files to PDF files using the pandoc command-line ...
Invokes md-to-office with the right parameters and returns the result directly in the conversation
What can I do with md-to-office in my documents & notes workflow?
Lists the top use cases for md-to-office, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/pandic-office/ 目录(个人级,所有项目可用),或 .claude/skills/pandic-office/(项目级)。重启 AI 客户端后,用 /pandic-office 主动调用,或让 AI 根据上下文自动发现并使用。
md-to-office 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
md-to-office 可免费安装使用。请查阅仓库了解许可证信息。
Converts Markdown files to PDF files using the pandoc command-line utility. Use when a user asks to convert a .md or markdown file to a .pdf file.
md-to-office 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using md-to-office
Identifies repetitive steps in your workflow and sets up md-to-office to handle them automatically