latex-compile

Compile LaTeX papers with xelatex and bibtex, then report the log tail.

6.8k|540|Updated May 6, 2026
One-click install
npx skills add https://github.com/opensquilla/opensquilla --skill latex-compile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: latex-compile
Source: https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/latex-compile
Command: npx skills add https://github.com/opensquilla/opensquilla --skill latex-compile

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manually running the xelatex-bibtex-xelatex-xelatex sequence and debugging noisy LaTeX logs is tedious, especially when assembling a multi-section paper from fragments produced by upstream agent steps. This Skill automates the full compile pipeline and validates the result.

Core Features & Use Cases

  • Full Compile Pipeline: Runs xelatex, bibtex, then xelatex twice more to resolve citations and cross-references.
  • Paper Assembly & Cleanup: Rebuilds paper.tex from clean section fragments (abstract, introduction, method, results, discussion) when agent output contains wrappers or noise, and injects CJK font configuration when needed.
  • Contract Validation: Enforces a minimum of 20 cited references and a 10-page minimum PDF length when a references.bib contract is present.
  • Use Case: An orchestrated meta-skill generates paper sections step by step; this Skill assembles them into paper.tex, compiles the PDF, and reports success with the output file size.

Quick Start

Compile the LaTeX paper at paper/paper.tex into a PDF and show me the result.

Frequently Asked Questions about latex-compile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile a LaTeX paper with bibtex citations from the command line?

Run xelatex once, then bibtex, then xelatex twice more so citations and cross-references resolve. This Skill automates that exact four-pass sequence and prints the log tail for debugging.

How to compile LaTeX documents containing Chinese or CJK characters?

Use xelatex with fontspec and xeCJK, setting a CJK-capable font such as WenQuanYi Zen Hei or Noto Sans CJK. The compile script detects CJK characters automatically and injects the appropriate font configuration into the preamble.

Why does my LaTeX compile fail with undefined citation errors?

Undefined citations occur when \cite keys in the .tex file have no matching entry in the .bib file. The script cross-checks cited keys against references.bib and reports missing keys before compiling.

What are the limitations of this LaTeX compile skill?

It requires xelatex installed and available in PATH, and it is marked demo-only. The citation and page-count contract checks (20 references, 10 pages) only activate when a references.bib file exists alongside the paper.

Why does xelatex return success but produce no PDF?

Some LaTeX errors do not set a nonzero exit code, so the script explicitly verifies the PDF file exists after the final pass and exits with an error showing the log tail if it is missing.