FormaTeX

\begin{article}

draft — not published

The latex Claude Code Skill — All LaTeX Tasks in One Install

One install covers every LaTeX task: error fixing, markup generation, math typesetting, document scaffolding, citations, conversion, review, and packages.

The latex Claude Code Skill — All LaTeX Tasks in One Install

If you write LaTeX regularly, you know the tax it extracts on your time. You spend ten minutes hunting down a missing \end{figure}, another twenty wrestling with BibTeX key mismatches, and a full hour trying to remember whether \vspace or \medskip is the right tool for a half-line gap. Multiply that across a dissertation, a conference paper, or a system that generates PDFs on behalf of users, and the overhead becomes significant. The latex Claude Code skill exists to eliminate that overhead — all of it, not just the part that involves error messages.

This post covers what the latex meta-skill is, what it installs, what each workflow does, and why it belongs in your Claude Code setup if you work with LaTeX at any level of the stack.

The Problem: LaTeX Has Too Many Distinct Workflows

LaTeX is not one task. It is at least nine distinct tasks that happen to share a syntax:

  1. Diagnosing and fixing compilation errors
  2. Writing markup from scratch or from a description
  3. Typesetting mathematical expressions
  4. Scaffolding full document structures (articles, books, theses)
  5. Managing citations and bibliographies
  6. Converting content from other formats into LaTeX
  7. Reviewing and editing existing documents
  8. Recommending and configuring packages
  9. Explaining what existing commands and macros do

Each of these is a different kind of problem. Most Claude Code skills cover one workflow. The latex meta-skill covers all nine in a single install, which is what makes it worth talking about.

How to Install

Installing the full latex meta-skill takes one command:

bash
cp -r skills/latex ~/.claude/skills/

If you want only the latex skill without any additional formatex-specific tooling, that same command is the install. If you want the broader FormatEx skill set — which adds API integration workflows for compiling documents via FormatEx — install the formatex meta-skill instead:

bash
cp -r skills/formatex ~/.claude/skills/

To install every available skill at once:

bash
cp -r skills/latex-full ~/.claude/skills/

All skills are available at github.com/formatex/latex-skills. Clone the repo, pick the install command that matches your scope, and you are done.

What latex Does

The latex meta-skill is a routing layer. When you invoke /latex inside Claude Code, it reads your request and delegates to whichever of the nine sub-workflows fits the task. You do not need to know which sub-skill handles what — you describe the problem, and the skill routes it.

The nine workflows it covers:

Error fixing — Parses TeX log output, identifies the root cause (not just the line number), and produces a corrected version. Covered in depth at /blog/latex-skill-fix-errors.

Markup generation — Writes LaTeX from a plain-English description or from structured content. If you say "a two-column ACM-style paper with an abstract and four sections," it produces the scaffold. Covered at /blog/latex-skill-write-markup.

Math typesetting — Converts mathematical notation described in words or written in informal notation into correct LaTeX math mode. Handles display equations, inline expressions, aligned environments, and theorem blocks. See /blog/latex-skill-math-equations.

Document scaffolding — Generates complete document structures for specific document classes: article, book, beamer, memoir, IEEEtran, ACM, and others. Covered at /blog/latex-skill-document-structure.

Citation management — Generates BibTeX or BibLaTeX entries, fixes malformed entries, aligns citation keys with in-text \cite calls, and configures bibliography styles. See /blog/latex-skill-citations-bibliography.

Content conversion — Takes Markdown, HTML, Word-style formatting, or plain text and produces clean LaTeX output, preserving structure and applying appropriate environments.

Document review — Reads an existing .tex file and returns structured feedback on structure, style, package choices, and potential compilation issues.

Package recommendations — Given a description of what you need to achieve, recommends the right packages, explains the tradeoffs between alternatives, and generates the configuration code.

Command explanation — Explains what a command, environment, or macro does in plain language. Covered at /blog/latex-skill-explain-commands.

Before and After: Fixing a Real Error

Here is a concrete example of what changes when you have the skill installed.

Before (without the skill):

You run pdflatex on a document and get this in the log:

text
! Undefined control sequence.
l.47 \maketitle
               
! LaTeX Error: \begin{document} ended by \end{abstract}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...
l.52 \end{abstract}

You open the file, look at line 47, see that \maketitle is before \begin{abstract}, realize the abstract environment was opened before the document preamble ended, scroll up to find where \begin{abstract} appears, fix the ordering, save, recompile, discover a second error about a missing \usepackage{hyperref} reference in the bibliography, look that up, add it, recompile again. That entire loop takes 15 to 25 minutes if you are not already holding the answer in your head.

After (with the /latex skill):

You paste the log output into Claude Code and type /latex fix this. The skill parses the full log, identifies that the abstract environment was opened in the preamble instead of after \begin{document}, produces a corrected version of the affected section, and notes the secondary hyperref issue as a follow-up. You apply the fix, recompile once, done. The loop collapses to under two minutes.

The same pattern applies to every other workflow. The skill does not change what LaTeX is — it removes the lookup, trial-and-error, and memory tax that LaTeX normally imposes.

Common Use Cases

1. Academic paper submission under deadline

You have a conference paper due in 48 hours. The template is IEEEtran, which you use once a year and never fully remember. You use /latex to scaffold the structure, generate the bibliography configuration, fix the two errors the template produces on first compile, and format three equations in the results section. What would have taken the better part of a morning takes about 40 minutes.

2. Building a PDF generation service

You are using FormatEx to compile LaTeX documents via API — see the getting started guide for setup. Your users submit .tex files and expect clean PDFs back. The latex skill helps you write the template documents your users start from, validate that they will compile cleanly before sending them to the FormatEx API, and debug compilation failures when users submit malformed input. If you are using the Go client, the Go client post covers the integration side; the latex skill covers the document side.

3. Converting a legacy document

You have 80 pages of content in a Word document or a Markdown file that needs to become a properly structured LaTeX document for a publisher. The content conversion workflow in /latex handles the mechanical translation — heading levels, bold and italic, lists, tables — so you can focus on the parts that require judgment.

4. Dissertation or thesis work

A PhD student working on a 200-page thesis uses the skill continuously: scaffolding chapters, typesetting equations in the methods section, managing a 300-entry BibTeX file, and reviewing chapter drafts for structural consistency. The skill functions as a persistent LaTeX-aware editor that knows the document class, the style guide, and the citation format.

5. PHP or Ruby applications generating PDFs

If you are integrating FormatEx into a Laravel application (see /blog/latex-api-php-laravel) or a Rails app (see /blog/latex-api-ruby-rails), you need LaTeX templates that compile reliably. The latex skill helps you author and test those templates locally before they go into production. For serverless deployments, the AWS Lambda guide covers the infrastructure; the skill handles the document authoring.

The latex meta-skill routes to these individual skills, each of which can also be installed and used independently:

If your work is narrower — you only ever need error fixing, for example — install just that sub-skill. If you work across the full range of LaTeX tasks, the meta-skill is the right choice because it handles routing automatically.

When to Use the FormatEx Meta-Skill Instead

If your LaTeX work happens inside a pipeline that compiles documents via the FormatEx API, install the formatex meta-skill rather than the standalone latex skill:

bash
cp -r skills/formatex ~/.claude/skills/

The formatex meta-skill includes everything in latex plus skills for constructing API requests, handling compilation responses, managing API keys, and debugging errors returned by the FormatEx compilation service. It is the right install for developers building PDF generation features into applications.

Get Started

The latex skill is a single copy command away. Clone the skills repository, run the install, and every LaTeX task you face has an AI-assisted path through it.

If you are building systems that generate PDFs rather than writing documents yourself, FormatEx handles the compilation infrastructure — TeX Live, engine selection, timeout management, file size limits — so you do not have to. The latex Claude Code skill handles the document authoring side. Together they cover the full stack from LaTeX source to delivered PDF.

\end{article}

Back to blog

\related{posts}

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy