Converts markdown to professional PDFs using Pandoc with the Eisvogel template and EB Garamond fonts for Russian text. Ships with preset color themes for white papers, marketing docs, research, and technical documentation. The mobile layout option (6x9 inches) is smart, defaulting for Telegram bot contexts where people actually read on phones, while A4 stays available for print. Includes a preprocessing script that fixes Claude's tendency to write lists after colons without proper spacing, which would otherwise break PDF rendering. Honestly solves a real friction point if you're generating documentation or reports from markdown regularly.
npx -y skills add glebis/claude-skills --skill pdf-generation --agent claude-codeInstalls into .claude/skills of the current project.
Generate professional PDFs from markdown files using Pandoc with Eisvogel template styling. Supports English and Russian documents with customizable themes, table of contents, and professional typography including EB Garamond font for Russian text.
Basic commands:
# Desktop/Print PDF (A4 format)
pandoc doc.md -o doc.pdf --pdf-engine=xelatex --toc --toc-depth=2 -V geometry:margin=2.5cm -V fontsize=11pt -V documentclass=article
# Mobile-friendly PDF (6x9 phone screen optimized)
pandoc doc.md -o doc-mobile.pdf --pdf-engine=xelatex --toc --toc-depth=2 -V geometry:paperwidth=6in -V geometry:paperheight=9in -V geometry:margin=0.5in -V fontsize=10pt -V linestretch=1.2
# Russian PDF with EB Garamond
pandoc doc-ru.md -o doc.pdf --pdf-engine=xelatex --toc --toc-depth=2 -V geometry:margin=2.5cm -V fontsize=11pt -V documentclass=article -V mainfont="EB Garamond"
# Russian Mobile PDF
pandoc doc-ru.md -o doc-mobile.pdf --pdf-engine=xelatex --toc --toc-depth=2 -V geometry:paperwidth=6in -V geometry:paperheight=9in -V geometry:margin=0.5in -V fontsize=10pt -V linestretch=1.2 -V mainfont="EB Garamond"
---
title: "Document Title"
subtitle: "Subtitle"
author: "Author"
date: "2025-11-18"
titlepage: true
titlepage-color: "1e3a8a"
titlepage-text-color: "ffffff"
book: true
---
See references/frontmatter_templates.md for complete templates.
For optimal PDF rendering, ensure:
Lists after colons need blank lines:
Your data spans 9 years with complete tracking:
- Item 1
- Item 2
Without blank line after colon, renders as inline text.
Use preprocessing script:
scripts/fix_markdown.py input.md output.md
Automatically detects and fixes:
Default for Telegram Bot: Use mobile layout for all PDFs sent via Telegram unless user explicitly requests print/desktop version.
scripts/generate_pdf.py doc.md -t white-paper
scripts/generate_pdf.py doc.md -t marketing --russian
scripts/generate_pdf.py doc.md --mobile # Mobile layout
Install pandoc: brew install pandoc
Install LaTeX: brew install --cask mactex
For phone and tablet reading, use the mobile layout option:
# Using script (recommended)
scripts/generate_pdf.py doc.md --mobile
# Direct pandoc command
pandoc doc.md -o doc-mobile.pdf \
--pdf-engine=xelatex \
--toc --toc-depth=2 \
-V geometry:paperwidth=6in \
-V geometry:paperheight=9in \
-V geometry:margin=0.5in \
-V fontsize=10pt \
-V linestretch=1.2 \
-V colorlinks=true \
-V linkcolor=blue \
-V urlcolor=blue
Mobile layout features:
-mobile.pdf filename suffixWhen to use mobile layout:
Default context: Mobile layout is used by default when generating PDFs through the Telegram bot for optimal mobile reading experience.
larksuite/cli
googleworkspace/cli
googleworkspace/cli
googleworkspace/cli