简介
LaTeX Compiler
原始描述
Compile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support
通过你的 Agent 添加
安装目录:latex-compiler/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: latex-compiler
description: Compile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support
metadata:
openclaw:
emoji: 📝
tags: [latex, pdf, academic, writing, compilation]
requires:
bins: []
os: [darwin, linux, win32]
runtime: node
services:
- name: prismer-latex-server
port: 8080
description: Local LaTeX compilation server (bundled in Prismer container)
latex-compiler
Compile LaTeX documents to PDF. Accepts LaTeX source as content strings and returns compiled PDF output.
Description
This skill sends LaTeX source strings to a local LaTeX compilation server (localhost:8080, bundled in the Prismer container). It supports pdflatex, xelatex, and lualatex engines, bibliography processing via biber, multi-pass compilation for cross-references, and starter templates for common document types.
No filesystem access is required — all input is passed as content strings via tool parameters, and output PDFs are saved inside the container only.
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_templates to see available templates, then latex_get_template to get starter content
- Write LaTeX — Edit the source document
- Compile — Use
latex_compile to generate the PDF (saved in container)
- Preview — Use
latex_preview to get an inline base64 PDF for display
Tools
latex_compile
- 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) - 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) require xelatex or lualatex engine
- Compilation timeout is 120 seconds per run
- Multi-pass compilation (default 2 runs) resolves cross-references and TOC
- If
bibliography is provided, biber runs automatically between passes
- PDFs are saved to
/home/user/output/reports/ inside the container
article-zh) require xelatex or lualatex enginebibliography is provided, biber runs automatically between passes/home/user/output/reports/ inside the container正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。