← 返回
内容创作 中文

LaTeX Compiler

Compile LaTeX documents to PDF using pdflatex, xelatex, or lualatex with template support
使用 pdflatex、xelatex 或 lualatex 将 LaTeX 文档编译为 PDF,支持模板。
willamhou
内容创作 clawhub v1.0.6 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,026
下载
💾 452
安装
1
版本
#latest

概述

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)

版本历史

共 1 个版本

  • v1.0.6 当前
    2026-03-29 22:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,513
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,973
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,221