Agent SkillsPrismer-AI/Prismer › latex-compiler

latex-compiler

GitHub

将LaTeX文档编译为PDF,支持多种引擎、参考文献处理及模板管理。用于生成学术文档或排版内容。

skills/latex-compiler/SKILL.md Prismer-AI/Prismer

触发场景

编译LaTeX文件 生成PDF 使用LaTeX模板 预览LaTeX输出

安装

npx skills add Prismer-AI/Prismer --skill latex-compiler -g -y
更多选项

不安装直接使用

npx skills use Prismer-AI/Prismer@latex-compiler

指定 Agent (Claude Code)

npx skills add Prismer-AI/Prismer --skill latex-compiler -a claude-code -g -y

安装 repo 全部 skill

npx skills add Prismer-AI/Prismer --all -g -y

预览 repo 内 skill

npx skills add Prismer-AI/Prismer --list

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

  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). If compilation fails, check the errors field in the response for line numbers and fix LaTeX syntax issues before recompiling
  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

版本历史

  • 2dbe71f 当前 2026-08-20 10:22

同 Skill 集合

docker/config/workspace/skills/prismer-workspace/SKILL.md
docker/plugin/prismer-workspace/skills/arxiv-reader/SKILL.md
docker/plugin/prismer-workspace/skills/find-skills/SKILL.md
docker/plugin/prismer-workspace/skills/formal-methods/SKILL.md
docker/plugin/prismer-workspace/skills/hf-papers/SKILL.md
docker/plugin/prismer-workspace/skills/latex-compiler/SKILL.md
docker/templates/academic-researcher/skills/data-analysis/SKILL.md
docker/templates/academic-researcher/skills/latex-writing/SKILL.md
docker/templates/academic-researcher/skills/paper-search/SKILL.md
docker/templates/cs-researcher/skills/ml-experiment/SKILL.md
docker/templates/data-scientist/skills/jupyter/SKILL.md
docker/templates/finance-researcher/skills/quant-analysis/SKILL.md
docker/templates/mathematician/skills/theorem-proving/SKILL.md
docker/templates/paper-reviewer/skills/peer-review/SKILL.md
skills/arxiv-reader/SKILL.md
skills/formal-methods/SKILL.md
skills/hf-papers/SKILL.md

元信息

文件数
0
版本
2dbe71f
Hash
a5e8a235
收录时间
2026-08-20 10:22

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 15:15
浙ICP备14020137号-1 $访客地图$