TE

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.zip

Installs 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".
304 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

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

You give it
Project content configured with `_config_<lang>.yml` files
You get back
PDF files (e.g., `book/_static/teachbook_es.pdf`, `book/_static/teachbook_en.pdf`)

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

  1. Verifica que LaTeX (Tectonic) esté instalado. Si no, muestra instrucciones.
  2. Detecta los idiomas desde los archivos _config_<lang>.yml.
  3. Para cada idioma, genera los archivos LaTeX, aplica plantillas personalizadas y compila a PDF.
  4. 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):

SistemaComando
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):

SistemaComando
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>.yml sección latex:.

Solución de problemas

ProblemaSolución
"No se detectó un motor LaTeX"Ejecutar python scripts/setup_latex.py primero
Error con videos de YouTubeUsar el patrón dual {raw} html + {raw} latex (ver skill teachbook-multimedia)
Error con imágenes SVGConvertir a PNG; LaTeX no soporta SVG nativamente
Fórmulas mal renderizadasVerificar 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 personalizadosVerificar 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

LaTeX (Tectonic)

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.

SkillInstallsUpdatedSafetyDifficulty
teachbook-export-pdf (this skill)03moReviewIntermediate
nutrient-document-processing14moReviewIntermediate
markdown-to-pdf01moReviewBeginner
book-publishing03moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry