Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

white-bronco

LaTeX authoring skill and document-creation prompt for Claude Code, synthesized from 13 official LaTeX documentation PDFs.

What's in here

latex.md — Claude Code skill

A comprehensive LaTeX reference loaded as a Claude Code agent skill. Covers:

  • Package load order and compatibility
  • Typography rules (dashes, quotes, ellipsis, URLs, penalties)
  • Tables: booktabs, longtable, tabularx — correct structure
  • Floats and figures
  • Cross-references with hyperref and cleveref
  • Math: amsmath environments, operators, spacing
  • Code listings setup and custom languages
  • Page layout: geometry, fancyhdr, titlesec
  • Colors and tcolorbox custom environments
  • Bibliography with biblatex
  • Beamer presentations
  • TikZ/PGF basics
  • Font selection and encoding
  • Common mistakes and how to avoid them
  • Compilation workflow and error diagnosis

create-latex-document.md — Document creation prompt

A 31-rule system prompt for instructing an LLM to produce correct LaTeX from scratch. Encodes every rule from the skill as a directive. Use it as a system prompt when asking Claude (or any model) to write a .tex file.

Source material

Built from extracted text of these PDFs (789 pages total):

File Description
lshort.pdf The Not So Short Introduction to LaTeX2e (v6.4)
latex2e-reference.pdf LaTeX2e Reference Manual (June 2026)
usrguide.pdf LaTeX2e for Authors
clsguide.pdf LaTeX2e for Class and Package Writers
fntguide.pdf LaTeX2e Font Selection Guide
amsmath.pdf User's Guide for the amsmath Package
hyperref.pdf Hyperref Manual (v7.01r)
geometry.pdf geometry Package Manual
biblatex.pdf BibLaTeX Manual
beameruserguide.pdf Beamer User Guide (v3.78)
pgfmanual.pdf PGF/TikZ Manual
latexsheet.pdf LaTeX2e Cheat Sheet
symbols-comprehensive.pdf Comprehensive LaTeX Symbol List

Usage

As a Claude Code skill

Copy latex.md into your project's .claude/agents/ directory:

mkdir -p .claude/agents
cp latex.md .claude/agents/latex.md

Then invoke it in Claude Code with /latex or reference it in your prompt.

As a system prompt

Paste the contents of create-latex-document.md as the system prompt when starting a conversation about LaTeX document creation.