This skill should be used when converting documents between formats (Markdown, DOCX, PDF, HTML, LaTeX, etc.) using pandoc. Use for format conversion, document generation, and preparing markdown for Google Docs or other word processors.
View on GitHubplinde/claude-plugins
pandoc
January 14, 2026
Select agents to install to:
npx add-skill https://github.com/plinde/claude-plugins/blob/main/pandoc/skills/pandoc/SKILL.md -a claude-code --skill pandocInstallation paths:
.claude/skills/pandoc/# Pandoc Document Conversion Skill
Convert documents between formats using pandoc, the universal document converter.
## Prerequisites
```bash
# Check if pandoc is installed
pandoc --version
# Install via Homebrew if needed
brew install pandoc
```
## Common Conversions
### Markdown to Word (.docx)
```bash
# Basic conversion
pandoc input.md -o output.docx
# With table of contents
pandoc input.md --toc -o output.docx
# With custom reference doc (for styling)
pandoc input.md --reference-doc=template.docx -o output.docx
# Standalone with metadata
pandoc input.md -s --metadata title="Document Title" -o output.docx
```
### Markdown to PDF
```bash
# Requires LaTeX - install one of:
# brew install --cask basictex # Smaller (~100MB)
# brew install --cask mactex-no-gui # Full (~4GB)
# After install: eval "$(/usr/libexec/path_helper)" or new terminal
# Basic conversion (uses pdflatex)
pandoc input.md -o output.pdf
# With table of contents and custom margins
pandoc input.md -s --toc --toc-depth=2 -V geometry:margin=1in -o output.pdf
# Using xelatex (better Unicode support - box drawings, arrows, etc.)
export PATH="/Library/TeX/texbin:$PATH"
pandoc input.md --pdf-engine=xelatex -V geometry:margin=1in -o output.pdf
```
**PDF Engine Selection:**
| Engine | Use When |
|--------|----------|
| `pdflatex` | Default, ASCII content only |
| `xelatex` | Unicode characters (arrows, box-drawing, emojis) |
| `lualatex` | Complex typography, OpenType fonts |
### Markdown to HTML
```bash
# Basic HTML
pandoc input.md -o output.html
# Standalone HTML with CSS
pandoc input.md -s -c style.css -o output.html
# Self-contained (embeds images/CSS) - note: --self-contained is deprecated
pandoc input.md -s --embed-resources --standalone -o output.html
```
### HTML for Print-to-PDF (No LaTeX Required)
When LaTeX isn't available, create styled HTML and print to PDF from browser:
```bash
# Create inline CSS file
cat > /tmp/print-style.css << 'EOF'
body { font-family: -apple