14
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill terrylica/cc-skills --skill pandoc-pdf-generation- SKILL.md8.1 KB
Overview
This skill generates professional PDFs from Markdown using Pandoc with the XeLaTeX engine. It automates section numbering, table of contents, bibliography detection, page breaks, and applies a production-proven LaTeX preamble for reliable output. The skill includes a universal build script and helpers for landscape/portrait output and hiding HTML details blocks from printed PDFs.
How this skill works
A build script auto-detects a single Markdown input, finds references.bib and CSL files, and runs pandoc with xelatex using a tuned LaTeX preamble. Options control orientation, monospace fonts for ASCII diagrams, and stripping of <details> blocks via a Lua filter. Pre-flight checks confirm pandoc/xelatex are present and post-build validation checks file size and page count.
When to use it
- Convert technical Markdown documents into print-ready PDFs with consistent styling
- Produce documents that require automatic section numbering and an accurate table of contents
- Manage citations and bibliographies without duplicate manual edits
- Generate landscape output for wide tables, diagrams, or comparison matrices
- Automate PDF production in CI/CD or developer workflows before printing
Best practices
- Keep section headings unnumbered in Markdown and use --number-sections to auto-number
- Generate ASCII diagrams with the graph-easy skill instead of hand-typing box art
- Place annotations outside code blocks; inline comments inside code blocks break layout
- Use the supplied LaTeX preamble file for table spacing and ToC fixes to avoid table breaks
- Always preview the generated PDF and confirm orientation and duplex settings before printing
Example use cases
- Produce an ADR or architecture document with numbered sections, TOC, and embedded diagrams
- Create landscape PDFs for large tables and technical handouts for distribution
- Build automated documentation artifacts in CI that include bibliography rendering
- Strip implementation-only <!-- details --> blocks from printed material while keeping them online
- Quickly generate a printable report from a single Markdown file with a single script
FAQ
Install required dependencies (e.g., Homebrew: brew install --cask mactex and brew install font-dejavu) or adjust mainfont to an available system font.
How do I hide collapsible details from the PDF but keep them in HTML?
Use the --hide-details flag; a Lua filter strips <details> blocks from the pandoc pipeline while leaving source Markdown unchanged.