Install
openclaw skills install latex-compilerCompile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support
openclaw skills install latex-compilerCompile LaTeX documents to PDF. Accepts LaTeX source as content strings and returns compiled PDF via base64 or container-internal path.
This skill requires a LaTeX compilation server listening on localhost:8080. The Prismer project provides one as part of its container setup.
Source & review: The container source is at github.com/Prismer-AI/Prismer/tree/main/docker/base (Apache-2.0). Before running, review the Dockerfile and docker-compose.dev.yml to verify:
If the container is not running, all tool calls will fail with a connection error. The skill does not fall back to other local services or retry on different ports.
This skill sends LaTeX source strings via HTTP POST to localhost:8080. It supports pdflatex, xelatex, and lualatex engines, bibliography processing via biber, multi-pass compilation for cross-references, and starter templates.
Data flow: The skill sends only LaTeX content strings (from tool parameters) to the container via HTTP. It does not read host files, environment variables, or credentials. Output PDFs are generated inside the container at /home/user/output/reports/ (container-internal path, not host-mounted). Use latex_preview to retrieve PDFs as base64 — no host filesystem mount is involved.
latex_templates to see available templates, then latex_get_template to get starter contentlatex_compile to generate the PDF (saved in container)latex_preview to get an inline base64 PDF for displayCompile 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" }
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}" }
List available LaTeX templates and supported engines.
Parameters: None
Returns: { templates: string[], engines: string[] }
Get the LaTeX source of a starter template.
Parameters:
name (string, required): Template name — article, article-zh, beamer, ieeeReturns: { name, content }
Example:
{ "name": "ieee" }
article-zh) require xelatex or lualatex enginebibliography is provided, biber runs automatically between passes/home/user/output/reports/ inside the container (not on the host)latex_preview to get PDF as base64 without needing host filesystem access