latex-compiler
GitHub将LaTeX文档编译为PDF,支持多种引擎、参考文献处理及模板管理。用于生成学术文档或排版内容。
Trigger Scenarios
Install
npx skills add Prismer-AI/Prismer --skill latex-compiler -g -y
SKILL.md
Frontmatter
{
"name": "latex-compiler",
"description": "Compile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support. Use when the user asks to compile .tex files, build a LaTeX document, generate PDF from LaTeX, or typeset an academic paper."
}
latex-compiler
Compile LaTeX documents to PDF directly from the workspace. Supports multiple engines, bibliography processing, and starter templates.
Description
This skill wraps the container's LaTeX server (port 8080) which provides pdflatex, xelatex, and lualatex compilation. It supports bibliography processing via biber, multi-pass compilation for cross-references, and includes starter templates for common document types.
Usage Examples
- "Compile this LaTeX document to PDF"
- "Preview the PDF output of my paper"
- "What LaTeX templates are available?"
- "Give me the IEEE template"
- "Compile this with xelatex for Chinese support"
Process
- Choose template — Use
latex_templatesto see available templates, thenlatex_get_templateto get starter content - Write LaTeX — Edit the source document
- Compile — Use
latex_compileto generate the PDF (saved in container). If compilation fails, check theerrorsfield in the response for line numbers and fix LaTeX syntax issues before recompiling - Preview — Use
latex_previewto get an inline base64 PDF for display
Tools
latex_compile
Compile LaTeX source to PDF. The PDF is saved inside the container.
Parameters:
content(string, required): Full LaTeX source codefilename(string, optional): Output filename stem (default:document)engine(string, optional):pdflatex|xelatex|lualatex(default:pdflatex)bibliography(string, optional): BibTeX/BibLaTeX content (triggers biber)runs(number, optional): Compilation passes (default: 2 for cross-references)
Returns: { success, pdf_path, log, errors, warnings, compile_id }
Example:
{ "content": "\\documentclass{article}\\begin{document}Hello\\end{document}", "engine": "pdflatex" }
latex_preview
Compile LaTeX source and return the PDF as base64 for inline preview.
Parameters:
content(string, required): Full LaTeX source codefilename(string, optional): Output filename stem (default:document)engine(string, optional):pdflatex|xelatex|lualatex(default:pdflatex)bibliography(string, optional): BibTeX/BibLaTeX content (triggers biber)
Returns: { success, pdf_base64, pdf_path, log, errors, warnings, compile_id }
Example:
{ "content": "\\documentclass{article}\\begin{document}Hello\\end{document}" }
latex_templates
List available LaTeX templates and supported engines.
Parameters: None
Returns: { templates: string[], engines: string[] }
latex_get_template
Get the LaTeX source of a starter template.
Parameters:
name(string, required): Template name —article,article-zh,beamer,ieee
Returns: { name, content }
Example:
{ "name": "ieee" }
Notes
- Chinese documents (
article-zh) requirexelatexorlualatexengine - Compilation timeout is 120 seconds per run
- Multi-pass compilation (default 2 runs) resolves cross-references and TOC
- If
bibliographyis provided, biber runs automatically between passes - PDFs are saved to
/home/user/output/reports/inside the container
Version History
- 2dbe71f Current 2026-08-20 10:22


