LaTeX
Write LaTeX documents with correct syntax, packages, and compilation workflow.
Iván
@ivangdavila
What This Skill Does
Guides writing LaTeX documents with correct syntax, package usage, and compilation workflow. Covers special characters, math mode, spacing, floats, references, tables, images, and common errors.
Replaces trial-and-error LaTeX debugging by providing a structured reference for syntax, packages, and compilation steps.
When to Use It
- Write a research paper or thesis with proper LaTeX formatting
- Create a professional report with tables, figures, and cross-references
- Typeset mathematical equations and formulas for academic documents
- Set up a LaTeX document from scratch with correct preamble and package order
- Debug common LaTeX errors like overfull hboxes or missing math mode
- Compile a LaTeX document with bibliography using the correct multi-pass workflow
Install
$ openclaw skills install @ivangdavila/latexSpecial Characters
- Reserved chars need escape:
\# \$ \% \& \_ \{ \} \textbackslash - Tilde as character:
\textasciitildenot\~(that's an accent) - Caret:
\textasciicircumnot\^ - Backslash in text:
\textbackslashnot\\(that's line break)
Quotes & Dashes
- Opening quotes:
``not"; closing:''—never use straight"quotes - Hyphen
-, en-dash--(ranges: 1--10), em-dash---(punctuation) - Minus in math mode:
$-1$not-1in text
Math Mode
- Inline:
$...$or\(...\); display:\[...\]orequationenvironment - Text inside math:
$E = mc^2 \text{ where } m \text{ is mass}$ - Multiline equations:
alignenvironment, not multipleequations \left( ... \right)for auto-sizing delimiters—must be paired
Spacing
- Command followed by text needs
{}or\:\LaTeX{}or\LaTeX\ is - Non-breaking space:
~between number and unit:5~km - Force space in math:
\,thin,\:medium,\;thick,\quad\qquad
Packages
\usepackageorder matters—hyperrefalmost always lastinputenc+fontencfor UTF-8:\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}graphicxfor images,booktabsfor professional tables,amsmathfor advanced mathmicrotypefor better typography—load early, subtle but significant improvement
Floats (Figures & Tables)
[htbp]suggests placement: here, top, bottom, page—not commands- LaTeX may move floats far from source—use
[H]fromfloatpackage to force - Always use
\centeringinside float, notcenterenvironment - Caption before
\label—label references the last numbered element
References
- Compile twice to resolve
\refand\pageref—first pass collects, second uses \labelimmediately after\captionor inside environment being labeled- For bibliography: latex → bibtex → latex → latex (4 passes)
hyperrefmakes refs clickable—but can break with some packages
Tables
tabularfor inline,tablefloat for numbered with caption- Use
booktabs:\toprule,\midrule,\bottomrule—no vertical lines @{}removes padding:\begin{tabular}{@{}lll@{}}- Multicolumn:
\multicolumn{2}{c}{Header}; multirow needsmultirowpackage
Images
- Path relative to main file or set with
\graphicspath{{./images/}} - Prefer PDF/EPS for pdflatex/latex; PNG/JPG for photos
\includegraphics[width=0.8\textwidth]{file}—no extension often better
Common Errors
- Overfull hbox: line too long—rephrase, add
\-hyphenation hints, or allow\sloppy - Missing
$: math command used in text mode - Undefined control sequence: typo or missing package
\includeadds page break,\inputdoesn't—use\inputfor fragments
Document Structure
- Preamble before
\begin{document}—all\usepackageand settings \maketitleafter\begin{document}if using\title,\author,\datearticlefor short docs,reportfor chapters without parts,bookfor full books
Top skills in this category
Free Ride - Unlimited free AI
@shaivpidadiManages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates opencla...
Playwright (Automation + MCP + Scraper)
@ivangdavilaAutomates, tests, and debugs browsers with Playwright: locators, auto-waiting, traces, CI runs, and MCP browser control. Use when a test is flaky, times out, or fails only in CI or headless; when a locator matches multiple elements or the wrong one (strict mode violation); when clicks need force, waits become sleeps, or networkidle never settles; for storageState and login setup, request mocking and HAR replay, uploads and downloads, iframes and shadow DOM, popups and dialogs, screenshot diffs that change per machine, trace and report artifacts, sharding a slow suite, device and permission emulation, accessibility checks, driving a real browser through Playwright MCP, extracting data from JS-rendered pages, or porting a Cypress, Puppeteer, or Selenium suite to Playwright. Not for maintaining an existing Cypress or Puppeteer suite (cypress, puppeteer) or for work a plain HTTP request answers (http).
n8n
@thomasansemsManage n8n workflows and automations via API. Use when working with n8n workflows, executions, or automation tasks - listing workflows, activating/deactivating, checking execution status, manually triggering workflows, or debugging automation issues.
Superpowers Dev Workflow
@wlshlad85Spec-first, TDD, subagent-driven software development workflow. Use when: (1) building any new feature or app — triggers brainstorm → plan → subagent executi...
LNBits Wallet wtih QR Code
@jamestsetsekasManage LNbits Lightning Wallet (Balance, Pay, Invoice)