Convert documents between formats using Pandoc 3.10. Use when the user mentions pandoc, document conversion, format transformation, or needs to convert between Markdown, HTML, LaTeX, PDF, Word (docx), OpenDocument (odt), PowerPoint (pptx), Excel (xlsx), CSV, TSV, EPUB, reStructuredText, Org mode, AsciiDoc, RTF, Textile, CommonMark, GFM, or any markup/format conversion task. Also use when user asks about pandoc filters, templates, defaults files, citeproc, or Lua filters.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Convert documents between formats using Pandoc 3.10. Use when the user mentions pandoc, document conversion, format transformation, or needs to convert between Markdown, HTML, LaTeX, PDF, Word (docx), OpenDocument (odt), PowerPoint (pptx), Excel (xlsx), CSV, TSV, EPUB, reStructuredText, Org mode, AsciiDoc, RTF, Textile, CommonMark, GFM, or any markup/format conversion task. Also use when user asks about pandoc filters, templates, defaults files, citeproc, or Lua filters.
Pandoc is a universal document converter that transforms content between over 50 markup and word processing formats. It parses input into an abstract syntax tree (AST), then renders it to the target format. Conversions from pandoc's Markdown to any format are high-fidelity; conversions from more expressive formats (LaTeX, docx) to simpler ones may be lossy.
Formats auto-detect from file extensions when -f/-t are omitted. List available formats with pandoc --list-input-formats and pandoc --list-output-formats.
Usage
Basic Conversions
# Markdown to HTML (auto-detected from extensions)
pandoc -o output.html input.md
# Explicit format specification
pandoc -f markdown -t latex hello.txt
# Multiple input files concatenated
pandoc -o combined.pdf chapter1.md chapter2.md chapter3.md
# Pipe through stdin/stdout
notes.md | pandoc -t html | less
cat
PDF Output
Pandoc produces PDFs via intermediate formats. Specify .pdf output and optionally choose an engine:
# Default: Markdown → LaTeX → PDF (pdflatex)
pandoc -o report.pdf report.md
# Use xelatex for full Unicode/font support
pandoc -o report.pdf report.md --pdf-engine=xelatex
# HTML → PDF via weasyprint (no LaTeX needed)
pandoc -t html -o report.pdf report.md --pdf-engine=weasyprint
# Debug: inspect the intermediate LaTeX
pandoc -s -o report.tex report.md
pdflatex report.tex
xlsx, csv, tsv are input-only — you can read them but cannot write to these formats. Use markdown tables or HTML tables as intermediate output instead.
xlsx converts all sheets — no built-in option to select individual sheets. Each sheet becomes ## <sheet-name> + table. Use a Lua filter (--lua-filter) to extract specific sheets by name or filter empty ones.
xlsx sheet path bug — the xlsx reader may fail with Entry not found: xl//xl/worksheets/sheet1.xml on files created by some tools (e.g., openpyxl) that use absolute paths in workbook relationships. Files from Excel/LibreOffice work correctly.
pptx round-trip loses list markers — bullet points become plain paragraphs when converting pptx → markdown. Tables and headings are preserved.
docx YAML front matter is lost — metadata becomes heading + paragraph text on docx → markdown round-trip.
Binary formats (docx, odt, epub, pdf) cannot output to stdout unless forced with -o -. They always write to a file.
PDF requires an external engine: pdflatex needs TeX Live installed. For no-LaTeX PDF, use --pdf-engine=weasyprint (requires weasyprint) or --pdf-engine=typst.
Conversions are not perfectly lossless. Complex LaTeX tables, advanced docx formatting, and custom styles may degrade through the AST. Pandoc preserves structure, not presentation details like margin sizes.
File extension auto-detection can mislead. Always specify -f and -t explicitly when the extension doesn't match the actual format (e.g., .txt containing LaTeX).
Math rendering differs by output format. LaTeX math passes through verbatim to LaTeX output, renders as OMML in docx, MathML in ODT, and requires --mathjax, --katex, or --webtex for HTML.
Reference docs must be pandoc-compatible. Custom reference.docx/reference.odt should start from pandoc's default template (extracted via --print-default-data-file), not arbitrary Word/LibreOffice files.
Slide formats need structure. For pptx, beamer, and HTML slide decks, headings at the --slide-level create slides. Horizontal rules (---) manually split slides when --slide-level=0.