← 返回 Skills 市场
willamhou

LaTeX Compiler

作者 Will.hou · GitHub ↗ · v1.0.6 · MIT-0
cross-platform ⚠ error
369
总下载
0
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install latex-compiler
功能描述
Compile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support
使用说明 (SKILL.md)

latex-compiler

Compile LaTeX documents to PDF. Accepts LaTeX source as content strings and returns compiled PDF via base64 or container-internal path.

Prerequisites

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:

  • No host filesystem volumes are mounted (the dev compose only maps ports)
  • The container runs as a non-root user
  • Only port 16888 (gateway) is exposed to the host

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.

Description

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.

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

  1. Choose template — Use latex_templates to see available templates, then latex_get_template to get starter content
  2. Write LaTeX — Edit the source document
  3. Compile — Use latex_compile to generate the PDF (saved in container)
  4. Preview — Use latex_preview to 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 code
  • filename (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 code
  • filename (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 (not on the host)
  • Use latex_preview to get PDF as base64 without needing host filesystem access
  • No host filesystem mounts are required — all I/O is via HTTP to the container
  • If localhost:8080 is unreachable, tools return a connection error (no fallback to other services)
功能分析
Type: OpenClaw Skill Name: latex-compiler Version: 1.0.6 The latex-compiler skill is a legitimate utility for converting LaTeX source code to PDF via a local server (localhost:8080). The skill's documentation (SKILL.md) and metadata (_meta.json) indicate a transparent data flow that only processes user-provided strings, explicitly avoids host filesystem access, and provides clear security guidance regarding its containerized dependency (Prismer-AI). No indicators of data exfiltration, unauthorized execution, or prompt injection were found.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install latex-compiler
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /latex-compiler 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
Remove auto-install instruction, guide users to review Dockerfile/compose before running, clarify no host mounts
v1.0.5
Add source/homepage, prerequisites with container setup, clarify data flow and filesystem boundaries
v1.0.4
Clarify no filesystem access, declare container service dependency, fix metadata
v1.0.3
Remove executable code to resolve security flags
v1.0.2
- Initial skill implementation with LaTeX compilation features. - Added support for PDF generation using pdflatex, xelatex, or lualatex engines. - Included commands for template retrieval, template listing, document compilation, and PDF preview. - Bibliography processing with biber and multi-pass compilation supported. - Starter templates for common document types available.
v1.0.1
- Internal files index.ts and manifest.json have been removed. - No changes to public commands, features, or documentation.
v1.0.0
Initial release: LaTeX document compilation skill
元数据
Slug latex-compiler
版本 1.0.6
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 7
常见问题

LaTeX Compiler 是什么?

Compile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 369 次。

如何安装 LaTeX Compiler?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install latex-compiler」即可一键安装,无需额外配置。

LaTeX Compiler 是免费的吗?

是的,LaTeX Compiler 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

LaTeX Compiler 支持哪些平台?

LaTeX Compiler 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 LaTeX Compiler?

由 Will.hou(@willamhou)开发并维护,当前版本 v1.0.6。

💬 留言讨论