Installation
SKILL.md
PDF Processing Guide
Mandatory: LaTeX-First Workflow
[!IMPORTANT] ALL new PDF generation MUST follow a LaTeX-first workflow. Directly creating structured documents using libraries like
reportlaborfpdfis discouraged for new content. This ensures maximum structural integrity, professional typography, and consistent styling for both scientific articles and premium educational materials.
The Standard Workflow
- Draft LaTeX Source: Generate a valid
.texfile with the desired content and layout. - Compile to PDF: Use a LaTeX engine (e.g.,
tectonicorpdflatex) to synthesize the final document.
Example: Python LaTeX Orchestration
import subprocess
def create_pdf_from_latex(tex_content, output_name="document.tex"):
# 1. Write the LaTeX source
with open(output_name, "w") as f:
f.write(tex_content)