markdown-to-pdf

Convert Markdown documents to PDF using Pandoc and LaTeX.

3|Updated Nov 16, 2025
One-click install
npx skills add https://github.com/tnez/agent-skills --skill markdown-to-pdf-tnez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: markdown-to-pdf
Source: https://github.com/tnez/agent-skills/tree/main/documents/markdown-to-pdf
Command: npx skills add https://github.com/tnez/agent-skills --skill markdown-to-pdf-tnez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pandoc, LaTeX, Eisvogel Template (optional), and includes scripts (resource) components.

What problem does it solve? Transforming Markdown into professional, print-ready PDFs with advanced features like syntax highlighting and citations can be complex. This skill automates the entire conversion process, ensuring high-quality output for reports, papers, or documentation.

Core Features & Use Cases:

  • Professional PDF Output: Convert Markdown to PDF with custom templates (e.g., Eisvogel), syntax highlighting, and BibTeX citations.
  • Customizable Styling: Apply themes, variables, and LaTeX headers for tailored document appearance.
  • Use Case: Generate a beautifully formatted academic paper from your Markdown notes, complete with references and a table of contents, ready for submission.

Quick Start: Convert the Markdown file 'report.md' to a PDF named 'report.pdf' using the Eisvogel template.

Frequently Asked Questions about markdown-to-pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Markdown documents to PDF with syntax highlighting and citations?

Convert Markdown to PDF using Pandoc and LaTeX, which process code blocks with syntax highlighting and BibTeX citations. The Eisvogel template provides professional styling; configure YAML variables in your Markdown front matter to control formatting, fonts, and document appearance for academic papers, reports, or technical documentation.

What do I need to install to convert Markdown to PDF?

You need Pandoc for conversion and LaTeX (XeLaTeX preferred) for PDF rendering. The Eisvogel template is optional but recommended for polished output. All three are prerequisites; Pandoc processes your Markdown while LaTeX generates the final PDF with advanced formatting.

Can I generate academic papers with bibliographies from Markdown?

Yes. Use BibTeX citations in your Markdown and reference a .bib file in the YAML header. Pandoc and LaTeX automatically format citations and generate a bibliography. This works for academic papers, technical reports, and documentation requiring formatted references.

Why would I use Pandoc and LaTeX instead of converting Markdown to HTML first?

Pandoc and LaTeX produce print-ready PDFs with precise typographical control, syntax highlighting, and BibTeX support in one step. HTML conversion requires separate PDF rendering and loses formatting control. This approach is ideal for documents needing professional layout, citations, and consistent styling across pages.

What file formats and features does Markdown-to-PDF conversion support?

Supports Markdown input with embedded code blocks, LaTeX math, YAML front matter, and BibTeX citations. Output is a single PDF file. Features include configurable syntax highlighting, custom templates, table of contents generation, and variable-driven styling for headers, fonts, and margins.

Can I customize the appearance of my PDF output?

Yes. Use YAML variables in your Markdown to set fonts, colors, margins, and headers. The Eisvogel template provides built-in styling; you can also write custom LaTeX headers for fine-grained control over layout, page breaks, and document structure.