pdf-generation by glebis/claude-skills
npx skills add https://github.com/glebis/claude-skills --skill pdf-generation使用 Pandoc 配合 Eisvogel 模板样式,从 Markdown 文件生成专业的 PDF。支持英文和俄语文档,提供可自定义的主题、目录以及专业的排版,包括用于俄语文本的 EB Garamond 字体。
基本命令:
# 桌面/打印 PDF (A4 格式)
pandoc doc.md -o doc.pdf --pdf-engine=xelatex --toc --toc-depth=2 -V geometry:margin=2.5cm -V fontsize=11pt -V documentclass=article
# 移动设备友好的 PDF (针对 6x9 手机屏幕优化)
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
# 使用 EB Garamond 字体的俄语 PDF
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"
# 俄语移动设备 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"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
---
title: "文档标题"
subtitle: "副标题"
author: "作者"
date: "2025-11-18"
titlepage: true
titlepage-color: "1e3a8a"
titlepage-text-color: "ffffff"
book: true
---
完整模板请参阅 references/frontmatter_templates.md。
为确保最佳的 PDF 渲染效果,请遵循:
冒号后的列表需要空行:
您的数据跨越 9 年,具有完整的跟踪记录:
- 项目 1
- 项目 2
冒号后没有空行,会渲染为内联文本。
使用预处理脚本:
scripts/fix_markdown.py input.md output.md
自动检测并修复:
Telegram 机器人默认设置:除非用户明确要求打印/桌面版本,否则通过 Telegram 发送的所有 PDF 均使用移动布局。
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 # 移动布局
安装 pandoc:brew install pandoc
安装 LaTeX:brew install --cask mactex
为手机和平板阅读,使用移动布局选项:
# 使用脚本 (推荐)
scripts/generate_pdf.py doc.md --mobile
# 直接使用 pandoc 命令
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.pdf 文件名后缀何时使用移动布局:
默认上下文:通过 Telegram 机器人生成 PDF 时,默认使用移动布局,以获得最佳的移动阅读体验。
每周安装数
105
代码仓库
GitHub 星标数
64
首次出现
2026 年 1 月 24 日
安全审计
安装于
opencode97
gemini-cli95
cursor95
codex94
github-copilot91
kimi-cli89
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.
Weekly Installs
105
Repository
GitHub Stars
64
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode97
gemini-cli95
cursor95
codex94
github-copilot91
kimi-cli89
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
40,000 周安装