AGENT SKILL

latex-pro

LaTeX authoring and automation — documents, templates, and programmatic generation — use for academic papers, reports, and math-heavy docs.

License 许可
MIT
所属仓库
TanNhatCMS/jarvis
最近更新
2026-11-07
Stars
★ 0
Forks
1

01 前言 Front Matter

name
latex-pro
category
document-processing
description
LaTeX authoring and automation — documents, templates, and programmatic generation — use for academic papers, reports, and math-heavy docs.

03 SKILL.md 正文

Overview

LaTeX remains the gold standard for math-heavy documents, theses, and publication-quality typesetting. Beyond authoring, LaTeX is automatable: generate reports from data, manage bibliographies programmatically, and build reproducible document pipelines. This skill covers both craft and automation.

When to use

  • Writing papers, theses, or technical reports with mathematics
  • Creating reusable templates (letterheads, invoices, certificates, CVs)
  • Managing bibliographies (BibTeX/BibLaTeX) at scale
  • Generating LaTeX documents programmatically from data
  • Debugging compilation errors and package conflicts

Core concepts

Structure with semantics. \section, \label/\ref, \cite, and environments (theorem, figure, table) — not manual numbering or hardcoded "see page 12". Semantic markup is what makes cross-references, TOCs, and bibliographies maintain themselves.

Preamble discipline. Load packages once, in a sensible order, with a commented preamble or a shared .sty file for projects. Package conflicts (fontenc/inputenc ordering, hyperref loaded last-ish) cause the most mysterious errors; a curated preamble prevents them.

BibLaTeX + Biber for bibliographies. The modern stack handles Unicode, complex entry types, and per-chapter bibliographies far better than legacy BibTeX. Keep one curated .bib file; use a reference manager or consistent citation keys (author:year:keyword).

Compilation is a pipeline. pdflatex → biber → pdflatex → pdflatex (or latexmk, which automates the dance). Build with latexmk -pdf and let it resolve the multi-pass requirements; in CI, pin the TeX distribution version for reproducible builds.

Programmatic generation. Templates with placeholders filled from data (CSV, JSON, databases) produce invoices, certificates, and reports with typeset quality. Escape LaTeX special characters (& % $ # _ { } ~ ^ \) in data — unescaped input is the #1 generation bug.

Practical workflow

  1. Start from a template (article, report, beamer, or your org's class) — don't build a preamble from scratch for each document.
  2. Write with labels from day one: \label{sec:method} on everything you'll reference; \cite{} as you write, not at the end.
  3. Manage figures properly: vector formats (PDF) for plots and diagrams, sensible DPI for raster images, \includegraphics with relative widths, captions that actually explain the figure.
  4. For math: amsmath environments (align, gather), numbered only equations you'll reference; define macros for repeated notation (\newcommand{\R}{\mathbb{R}}).
  5. Automate builds: latexmk locally, CI job for the final artifact; check in the .tex, .bib, and figures — never the generated PDF as source of truth.
  6. For generated documents: template + data + escaping + a compile check in the pipeline; render a sample and visually inspect before bulk runs.

Common pitfalls

  • Ignoring compilation warnings — undefined references and multiply defined labels compound; fix them as they appear.
  • Manual bibliography formatting — hand-typed reference lists drift and misformat; use BibLaTeX always.
  • Special characters in generated content — % in data comments out the rest of the line; escape everything from untrusted data.
  • Huge monolithic .tex files — split chapters into \input files; giant files are unmergeable and slow to navigate.
  • Package soup — loading dozens of packages "just in case" invites conflicts; load what you use, in documented order.
  • Committing build artifacts (.aux, .log, .pdf) — .gitignore them; only sources and the build recipe belong in version control.

04 同仓库更多 Skills

TanNhatCMS
TanNhatCMS/jarvis

web-scrape

Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open/fetch fails on JS-heavy pages, or when you need clean markdown/structured extraction from a site. Requires FIRECRAWL_API_KEY.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

design-taste-frontend

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

★ 0
TanNhatCMS
TanNhatCMS/jarvis

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

★ 0
TanNhatCMS
TanNhatCMS/jarvis

requesting-code-review

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

★ 0
TanNhatCMS
TanNhatCMS/jarvis

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

★ 0