| name | pdf |
| type | skill |
| category | instruction |
| description | Convert markdown documents to professionally formatted PDFs with academic-style typography, Roboto fonts, proper page layouts, and styling suitable for research documents, reviews, reports, and academic writing. |
| triggers | ["convert to PDF","make PDF","markdown to PDF"] |
| modifies_files | true |
| needs_task | true |
| mode | batch |
| domain | ["academic"] |
| allowed-tools | Read,Bash |
| version | 2.0.0 |
| permalink | skills-pdf |
PDF Generation Skill
Taxonomy note: This skill provides domain expertise (HOW) for markdown to PDF conversion with academic typography. See [[aops-core/skills/remember/references/TAXONOMY.md]] for the skill/workflow distinction.
Overview
Convert markdown documents to professionally formatted PDFs with appropriate typography. This skill uses pandoc with weasyprint to generate beautiful PDFs with Roboto fonts, proper margins, and styling optimized for different document types:
- Academic documents: Research documents, reviews, reports with formal heading hierarchy
- Letters: Professional correspondence with condensed header spacing, hidden h1 titles, and signature blocks
The skill automatically detects document type based on content structure.
Quick Start
For most PDF generation tasks, use the bundled script:
uv run python scripts/generate_pdf.py <input.md> [output.pdf] [--title "Document Title"] [--type letter|academic]
Examples:
Academic document (auto-detected or explicit):
uv run python scripts/generate_pdf.py reviews/chapter7.md --title "Chapter 7: Moderating Misogyny"
uv run python scripts/generate_pdf.py paper.md --type academic
Letter (auto-detected or explicit):
uv run python scripts/generate_pdf.py reference-letter.md
uv run python scripts/generate_pdf.py letter.md --type letter
The script automatically detects document type:
- Letter: No h1 heading OR contains "Dear", "Re:", "Sincerely", "Best," in first 10 lines
- Academic: Has h1 heading and formal document structure
You can override auto-detection with --type letter or --type academic.
Typography and Styling
Font Stack
The skill bundles professional Roboto fonts:
- Body text and headings: Roboto (Regular, Bold, Italic, Light, Medium)
- Code blocks: RobotoMono Nerd Font
All fonts are embedded in assets/fonts/ and automatically loaded via the CSS stylesheet.
Style Features