ts-paper-latex

Assemble LaTeX section bodies, bibliography, and blueprint into a compiled template-driven paper PDF.

1.1k|19|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/Spark-To-Paper-Skills/spark-to-paper-skills --skill ts-paper-latex-spark-to-paper-skills
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ts-paper-latex
Source: https://github.com/Spark-To-Paper-Skills/spark-to-paper-skills/tree/main/skills/ts-paper-latex
Command: npx skills add https://github.com/Spark-To-Paper-Skills/spark-to-paper-skills --skill ts-paper-latex-spark-to-paper-skills

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and assets (resource) components.

What problem does it solve? Turning drafted LaTeX section files, a BibTeX bibliography, and a paper blueprint into a correctly formatted, compiled PDF requires many repetitive formatting fixes (caption placement, citation merging, heading normalization) and manual compile-error debugging. This Skill automates that final assembly and compilation stage deterministically. ## Core Features & Use Cases - Template-driven assembly: Reads a template.json spec to control section order, canonical headings, caption position, keyword caps, citation merging, and preamble generation, with bundled ts_iieta and neurips templates. - Deterministic post-processing: Moves table captions above tables, merges adjacent \cite commands for numeric styles, strips manual heading numbers, wraps wide tables in \adjustbox, and formats keywords — all without altering content. - Compile with structured diagnostics: Runs latexmk once per call and reports a JSON status with compiled, error_count, and error_tail, supporting a bounded agent-driven fix loop with --backup snapshots. - Use Case: After drafting all sections of a research paper and building refs.bib, run the assembler to produce main.pdf in the target venue's format, then fix only syntax-level compile errors within three attempts. ## Quick Start Assemble and compile my paper by running the assemble script on my working directory containing blueprint.json, sections, and refs.bib.

Frequently Asked Questions about ts-paper-latex

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

FAQPage Schema
How do I compile LaTeX sections into a paper PDF?

Run `python scripts/assemble_paper.py <workdir>` where the workdir contains blueprint.json, a sections/ directory of .tex bodies, and refs.bib. The script assembles main.tex from the template and runs latexmk, printing a JSON status with compiled state and error count.

How do I use a custom LaTeX template for paper assembly?

Place a template.json spec in the working directory defining section order, caption position, citation merging, keyword cap, and the template's main.tex.tmpl plus .sty/.cls assets. The script threads that spec through assembly; without it, it falls back to the bundled ts_iieta template.

Does the assembler modify my paper's content?

No. It only applies formatting post-processes: moving table captions above tables, merging adjacent \cite commands, stripping manual heading numbers, wrapping wide tables in adjustbox, and formatting keywords. It never rewrites prose, math, citations, or results.

Why does my LaTeX compile fail with error_count above zero?

The script trusts the latexmk log rather than the exit code, counting lines starting with '!' as errors. Read the error_tail field, apply minimal syntax-only fixes to the offending sections/*.tex file, and re-run; restore from sections.bak if errors increase.

Can I use official conference style files like NeurIPS with this?

Yes, but official .sty/.cls files must come from the venue's official source or be user-provided, copied unchanged. The bundled ts_iieta and neurips styles are unofficial approximations marked demo-only and should be replaced before real submission.