Skip to content
Data
Skill

/latex-empirical-tables

Set up, format, fix, and clean up LaTeX regression and estimation tables in empirical economics or finance papers. Use when (a) creating a .tex, results.tex, main.tex, or preamble to display regression or estimation output from Python (pyfixest), Stata, or R — including any

From plugin
applied-micro-skills
2717 skills
Install
$ npx -y skills add kennethkhoocy/applied-micro-skills --skill latex-empirical-tables --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/latex-empirical-tables

Context preview

The summary Claude sees to decide when to auto-load this skill.

Set up, format, fix, and clean up LaTeX regression and estimation tables in empirical economics or finance papers. Use when (a) creating a .tex, results.tex, main.tex, or preamble to display regression or estimation output from Python (pyfixest), Stata, or R — including any

SKILL.md

latex-empirical-tables.SKILL.md
name: latex-empirical-tables
description: >-
  Set up, format, fix, and clean up LaTeX regression and estimation tables in empirical
  economics or finance papers. Use when (a) creating a .tex, results.tex, main.tex, or
  preamble to display regression or estimation output from Python (pyfixest), Stata, or R
  — including any mention of estout, esttab, estauto, estwide, or table fragments;
  (b) formatting or repairing estout-style regression tables that overflow the right margin,
  have cramped or boxed notes, misaligned columns, or poor significance stars, or when asked
  to match a reference paper, make the note fill the table width, or choose among \estwide,
  \estauto, and landscape layouts; (c) diagnosing "Misplaced \omit" errors from \input-ed
  table fragments inside tabular environments. Covers \@@input, \estwide, \estauto, \estautoLT,
  \specialcell, \sym, minipage notes below tabulars, and the convert-and-verify workflow.
  Do NOT trigger for general LaTeX documents like beamer presentations, problem sets, letters,
  or CVs.
metadata:
  author: Claude Code
  version: 1.1.0
  date: 2026-07-20
  consolidates: Merges estout-table-formatting, latex-results-preamble, and latex-input-multicolumn-omit-fix into one skill.

LaTeX Empirical Tables

Empirical economics and finance papers export regression and estimation output as estout/esttab "body fragments" — rows of `\multicolumn` headers, coefficients with `\sym` stars, and parenthesised p-values or SEs, with no `\toprule`/`\bottomrule` — pulled into the manuscript through a wrapper macro (`\estauto`/`\estwide`/`\estautoLT`). Done well this reads like a top-journal table. Done naively it looks broken: wide tables spill past the right margin, the note legend is jammed inside the tabular as a boxed cell, columns sit at uneven widths, and `\input`-ed fragments throw "Misplaced \omit". This skill sets a results `.tex` up from scratch, converts ugly estout tables to the gold-standard pattern, and diagnoses the `\omit` error. The reasoning behind each choice is given so you can adapt rather than copy blindly.

Routing

| You want to... | Go to | |----------------|-------| | Set up `results.tex`/`main.tex` and its preamble from scratch | Section A | | Fix or reformat existing estout tables (overflow, cramped notes, stars, alignment) | Section B | | Diagnose a "Misplaced `\omit`" error from an `\input`-ed fragment | Section C | | Merge several self-compiling block `results.tex` files into one master document | Section D | | Fix skipped table numbers (Table 1, Table 3, ...) when `\captionof` + `longtable` are combined | Section D |

---

Section A — Build a results document from scratch

When producing regression or estimation tables, follow this workflow to create a compilable LaTeX document with a standard empirical-economics preamble and estout macros.

Directory structure

All output lives under `outline/` relative to the project root:

outline/
├── preamble/
│   └── preamble.tex    ← LaTeX preamble (no \begin{document})
├── Tables/
│   ├── table_01.tex    ← table fragments (auto-increment)
│   ├── table_02.tex
│   └── ...
├── Figures/
│   └── ...             ← figures (.pdf, .png, etc.)
└── results.tex         ← master document (created on first table)

Step-by-step workflow

1. Ensure directories exist

Create `outline/preamble/` and `outline/Tables/` if they don't already exist. Also create `outline/Figures/` if figures will be produced.

2. Save the preamble

Copy `references/preamble.tex` from this skill's directory to `outline/preamble/preamble.tex`. This file contains everything up to but NOT including `\begin{document}` — the document class, all packages, and the estout macro definitions (`\estauto`, `\estwide`, `\estautoLT`, `\sym`, `\specialcell`). The macros are defined there in full; Section B lists a minimal subset if you only need to graft them onto an existing preamble.

Do NOT create `outline/results.tex` yet — it gets created automatically when the first table is generated.

3. When producing a table

Each time a regression or summary table is generated:

1. Save the table fragment to `outline/Tables/table_XX.tex` with auto-incrementing numbering (01, 02, 03, ...).

2. If `outline/results.tex` does **not** exist, create it:

   \input{preamble/preamble}

   \begin{document}

   \section{Tables}

   \subsection{Descriptive Title}
   \begin{table}[H]
   \caption{Descriptive Title}
   \centering
   \estauto{Tables/table_01.tex}{N}{D{.}{.}{-1}}
   \end{table}
   \FloatBarrier

   \end{document}

3. If `outline/results.tex` **already exists**, insert the following block BEFORE `\end{document}`:

   \subsection{Descriptive Title}
   \begin{table}[H]
   \caption{Descriptive Title}
   \centering
   \estauto{Tables/table_XX.tex}{N}{D{.}{.}{-1}}
   \end{table}
   \FloatBarrier

Where `N` = number of data columns in the fragment (excluding the label column).

Estout table macros

Three macros are defined in the preamble for including table fragments generated by any tool (pyfixest, esttab, R, etc.). All use the TeX primitive `\@@input` to avoid `\multicolumn`/`\omit` errors (Section C explains why this matters).

| Macro | Use case | Environment | |-------|----------|-------------| | `\estauto{file}{ncols}{colspec}` | Standard-width tables | `tabular` | | `\estwide{file}{ncols}{colspec}` | Full-page-width tables | `tabular*` | | `\estautoLT{file}{ncols}{colspec}` | Multi-page tables | `longtable` |

The default column spec is `D{.}{.}{-1}` (decimal-aligned via `dcolumn`). Use `c` only when columns contain non-numeric content.

Table fragment format

Fragments must follow these conventions — the wrapper macros add `\toprule` and `\bottomrule`, so fragments should NOT include them.

Structure:

  • Column headers: `\multicolumn{1}{c}{(1)}` style
  • Group headers: `\multicolumn{N}{c}{Group Name}` with `\cmidrule(lr){start-end}`
  • Coefficients righ
Read more
Ships withapplied-micro-skills

Claude Code and Codex skills for empirical applied-microeconomics research: reproducibility auditing, LLM-assisted classification methods, event studies, data infrastructure (WRDS, Stata, pyfixest), and publication-grade tables, figures, and documents.

Get the whole plugin

Other skills on applied-micro-skills.