teachbook-export-pdf
Exports documentation to PDF using LaTeX.
Install
mkdir -p .claude/skills/teachbook-export-pdf && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14951" && unzip -o skill.zip -d .claude/skills/teachbook-export-pdf && rm skill.zipInstalls to .claude/skills/teachbook-export-pdf
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Exporta el libro completo a formato PDF para cada idioma configurado. Genera LaTeX intermedio, aplica plantillas personalizadas y compila con Tectonic. Trigger phrases: "exportar PDF", "genera PDF", "PDF", "imprimible", "versión impresa", "quiero imprimir", "descargar PDF", "export pdf", "generate PDF".Key capabilities
- →Export the complete book to PDF format for each configured language
- →Generate intermediate LaTeX files
- →Apply custom LaTeX templates
- →Compile LaTeX files to PDF using Tectonic
- →Copy resulting PDFs to `book/_static/`
- →Verify Tectonic installation and provide setup instructions
How it works
The skill exports the book to PDF by generating LaTeX files, applying custom templates, and compiling them with Tectonic for each configured language.
Inputs & outputs
When to use teachbook-export-pdf
- →Export to PDF
- →Generate printable book
- →Compile LaTeX
About this skill
Skill: Exportar a PDF
Cuándo usar esta skill
- Cuando se necesita una versión imprimible del libro.
- Para generar el archivo PDF que se descargará desde la web.
- Al finalizar el contenido y querer una copia offline.
Qué hace export_pdf.py
- Verifica que LaTeX (Tectonic) esté instalado. Si no, muestra instrucciones.
- Detecta los idiomas desde los archivos
_config_<lang>.yml. - Para cada idioma, genera los archivos LaTeX, aplica plantillas personalizadas y compila a PDF.
- Copia los PDFs resultantes a
book/_static/.
Ubicación de salida
book/_static/teachbook_es.pdf ← PDF en español
book/_static/teachbook_en.pdf ← PDF en inglés
Requisito previo: LaTeX (Tectonic)
El PDF requiere un motor LaTeX. El proyecto usa Tectonic (ligero, automático, no requiere instalación global de LaTeX).
Verificar si Tectonic está instalado
tectonic --version
Si NO está instalado, ejecutar PRIMERO:
El agente DEBE usar el Python del entorno virtual (.venv):
| Sistema | Comando |
|---|---|
| Linux / macOS | .venv/bin/python scripts/setup_latex.py |
| Windows | .venv\Scripts\python.exe scripts/setup_latex.py |
El script intenta instalar Tectonic primero vía pip, y si falla, descarga el binario directamente.
Para instalación silenciosa (sin prompt interactivo):
python scripts/setup_latex.py --yes
Instrucciones para el agente
Paso 1: Verificar Tectonic
Si Tectonic no está instalado, ejecutar setup_latex.py primero.
Paso 2: Ejecutar la exportación
El agente DEBE usar el Python del entorno virtual (.venv):
| Sistema | Comando |
|---|---|
| Linux / macOS | .venv/bin/python scripts/export_pdf.py |
| Windows | .venv\Scripts\python.exe scripts/export_pdf.py |
Personalización de plantillas LaTeX
Las plantillas están en latex_templates/:
latex_templates/
├── common/ ← Estilos compartidos (jupyterBook.cls, etc.)
├── es/ ← Ajustes para español (language_support.tex)
├── en/ ← Ajustes para inglés
├── latexmkrc ← Configuración para latexmk
└── Makefile
- Los archivos de
common/se aplican a TODOS los idiomas (capa base). - Los archivos de
<lang>/se aplican SOLO a ese idioma (capa de idioma, sobreescribe common). - Los metadatos (título, autor, ISBN, editorial) se leen automáticamente de
_config_<lang>.ymlsecciónlatex:.
Solución de problemas
| Problema | Solución |
|---|---|
| "No se detectó un motor LaTeX" | Ejecutar python scripts/setup_latex.py primero |
| Error con videos de YouTube | Usar el patrón dual {raw} html + {raw} latex (ver skill teachbook-multimedia) |
| Error con imágenes SVG | Convertir a PNG; LaTeX no soporta SVG nativamente |
| Fórmulas mal renderizadas | Verificar que dollarmath está en myst_enable_extensions del config |
| Error "Font not found" | Tectonic descarga fuentes automáticamente; verificar conexión a internet |
| El PDF no tiene estilos personalizados | Verificar que latex_templates/common/ contiene los archivos .cls y .sty |
Flujo completo
# 1. Instalar LaTeX (solo la primera vez)
python scripts/setup_latex.py
# 2. Exportar PDFs para todos los idiomas
python scripts/export_pdf.py
When not to use it
- →When a non-printable version of the book is needed
- →When the content is not finalized
- →When an offline copy is not required
Prerequisites
Limitations
- →LaTeX does not natively support SVG images
- →Tectonic requires an internet connection to download fonts automatically
- →The skill relies on `_config_<lang>.yml` for language detection
How it compares
This skill automates the process of converting book content into multi-language PDFs using Tectonic, unlike manual LaTeX compilation.
Compared to similar skills
teachbook-export-pdf side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| teachbook-export-pdf (this skill) | 0 | 3mo | Review | Intermediate |
| nutrient-document-processing | 1 | 4mo | Review | Intermediate |
| markdown-to-pdf | 0 | 1mo | Review | Beginner |
| book-publishing | 0 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
nutrient-document-processing
affaan-m
Process, convert, OCR, extract, redact, sign, and fill documents using the Nutrient DWS API. Works with PDFs, DOCX, XLSX, PPTX, HTML, and images.
markdown-to-pdf
duc01226
[Document Processing] Use when you need to convert markdown files to PDF with syntax highlighting and custom CSS support.
book-publishing
fabioc-aloha
Markdown-to-PDF pipeline via Pandoc and LuaLaTeX with emoji rendering, dual output, and print-ready formatting
design-system
robonuggets
Extract a brand's design from any reference the user provides (site URL, screenshot, or existing assets) and generate a full design system reference page AND a 1-page A4 brand book PDF. Triggers on "design system", "brand book", "make design assets", "extract design", "brand page", "one page brand".
doc
cdrguru
Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus the bundled `scripts/render_docx.py` for visual checks.
docx
rvdbreemen
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of \"Word doc\", \"word document\", \".docx\", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or let