Skip to main content
skill CX Codex

latex-tables · terrylica — Claude Code skill: LaTeX tables with tabularray

Teaches the agent to build LaTeX tables with tabularray: fixed column widths, alignment, rule lines. Useful when a tblr has to be written from scratch or an old table rewritten.

MIT 242 installs ★ 3 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add terrylica/cc-skills --skill latex-tables -a claude-code
Open on GitHub

What latex-tables does

The skill hands the agent a working tblr syntax. Widths are pinned with Q[2cm], stretchy columns use X, a bold first row comes from row{1}={font=\bfseries}, and rules switch on through hlines and vlines inside colspec. Five reference files sit beside the main instructions: table patterns, column specs, lines and borders, troubleshooting, and migration away from tabular and tabularx.

The package has to be there first. Run kpsewhich tabularray.sty to see whether it is, and sudo tlmgr install tabularray to add it. Nothing gets installed behind your back, so on a TeX Live tree missing the package the document fails at compile time regardless of what the agent writes.

This one also edits itself. When an instruction turns out wrong, or a workaround was needed, the agent is told to patch SKILL.md right away instead of leaving it for later, and to review the file once the job is done. It has Read, Edit and Bash for that.

What it helps with

  • build a table with fixed-width columns
  • migrate a longtable or tabularx layout to tblr
  • stop a table from running past the page margin
  • get long text wrapping inside cells
  • trace a compile error back to the colspec

Example prompts for the agent

  • Build a tblr table with Q[2cm] columns and rules on every side.
  • Move the longtable in report.tex over to tabularray, keeping the current column widths.
  • The table runs past the right margin — fix the colspec and get the text wrapping.

How to install latex-tables

1Skills CLI (Vercel)

npx skills add terrylica/cc-skills --skill latex-tables -a claude-code

2Manually: put the files in place

~/.claude/skills/latex-tables/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/latex-tables/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about latex-tables

How do I install latex-tables in Claude Code?

Run npx skills add terrylica/cc-skills --skill latex-tables -a claude-code. The skill file lands at ~/.claude/skills/latex-tables/SKILL.md.

What does latex-tables do?

It gives the agent the tabularray syntax for widths, alignment, rules and header styling. It also covers common compile errors and moving off the older table packages.

What do I need before the tables compile?

The tabularray package. Check with kpsewhich tabularray.sty and install with sudo tlmgr install tabularray.

Source text

SKILL.md · MIT
---
name: latex-tables
description: LaTeX tables with tabularray package. TRIGGERS - LaTeX table, tabularray, fixed-width columns, table alignment.
allowed-tools: Read, Edit, Bash
---

# LaTeX Tables with tabularray

> **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

## When to Use This Skill

Use this skill when:

- Creating tables with fixed-width columns
- Formatting complex table layouts
- Need precise column alignment
- Migrating from tabular/tabularx/longtable/booktabs
- Troubleshooting table overflow issues

## Quick Reference

## Why tabularray?

Modern LaTeX3 package (replaces old solutions):

- Fixed-width columns with proper alignment
- Clean, consistent syntax
- Replaces: `tabular`, `tabularx`, `longtable`, `booktabs`
- Better performance than legacy packages
- Part of TeX Live 2025

---

## Installation

```bash
# Check if installed
kpsewhich tabularray.sty

# If not found, install:
sudo tlmgr install tabularray
```

## Basic Usage

```latex
\documentclass{article}
\usepackage{tabularray}  % Modern table package

\begin{document}
% Simple table
\begin{tblr}{colspec={ccc}, hlines, vlines}
  Header 1 & Header 2 & Header 3 \\
  Data 1   & Data 2   & Data 3   \\
\end{tblr}
\end{document}
```

---

## Quick Reference Card

```latex
% Minimal table
\begin{tblr}{colspec={ccc}}
  A & B & C \\
\end{tblr}

% With all lines
\begin{tblr}{colspec={ccc}, hlines, vlines}
  A & B & C \\
\end{tblr}

% Fixed widths
\begin{tblr}{colspec={Q[2cm] Q[3cm] Q[2cm]}, hlines}
  A & B & C \\
\end{tblr}

% Bold header
\begin{tblr}{
  colspec={ccc},
  row{1}={font=\bfseries}
}
  Header & Header & Header \\
  Data   & Data   & Data   \\
\end{tblr}
```

---

## Best Practices

1. Use Q[width] for fixed columns instead of p{width}
2. Specify widths explicitly when text might overflow
3. Use X for flexible columns that should expand
4. Style headers with row{1} instead of manual formatting
5. Use colspec for column properties, not inline commands
6. Check package version: `kpsewhich tabularray.sty` (should be recent)

---

## Reference Documentation

For detailed information, see:

- [Table Patterns](./references/table-patterns.md) - 5 common table patterns with examples
- [Column Specification](./references/column-spec.md) - Alignment options and width control
- [Lines and Borders](./references/lines-borders.md) - All lines, selective lines, thick lines
- [Troubleshooting](./references/troubleshooting.md) - Table too wide, text not wrapping, alignment issues
- [Migration](./references/migration.md) - Migrating from tabular and tabularx

**Official Docs**: Run `texdoc tabularray` for complete package documentation

**See Also**:

- Use `latex/setup` skill for installing tabularray package
- Use `latex/build` skill for compilation workflows

---

## Troubleshooting

| Issue                    | Cause                     | Solution                                            |
| ------------------------ | ------------------------- | --------------------------------------------------- |
| Package not found        | tabularray not installed  | `sudo tlmgr install tabularray`                     |
| Table too wide           | Fixed widths exceed page  | Use smaller Q[width] values or X for flexible       |
| Text not wrapping        | Column spec missing width | Use Q[width] instead of c/l/r for wrapping          |
| Alignment issues         | Mixed column types        | Ensure all columns have consistent spec             |
| Compile error on colspec | Invalid syntax            | Check for missing commas or typos in column spec    |
| hlines not appearing     | Missing from spec         | Add `hlines` to the spec: `{colspec={...}, hlines}` |
| Row style not applied    | Wrong row index           | Remember row{1} is first row (1-indexed)            |
| Package version too old  | TeX Live outdated         | `sudo tlmgr update --self --all`                    |


## Post-Execution Reflection

After this skill completes, check before closing:

1. **Did the command succeed?** — If not, fix the instruction or error table that caused the failure.
2. **Did parameters or output change?** — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
3. **Was a workaround needed?** — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

© terrylica · MIT · terrylica/cc-skills

Similar skills

All skills for Writing and docs →

latex-tables by other authors comes first.

latex-tables Awesome Econ AI Community Creates clean LaTeX tables for regression results and summary statistics using academic formatting standards. Use it when you need to format statistical output for journal submission. CX Codex +1 128installs latex-writing NeverSight The latex-writing skill reviews LaTeX documents for best practices: correct list environments for key-value pairs, csquotes for quotation marks, cleveref for cross-references. CX Codex +1 2installs typst lucifer1004 Helps write and compile Typst documents, build custom templates, and migrate Markdown or LaTeX files. Useful when formatting papers, reports, and packages. CX Codex +1 2,200installs extract-tables franklee16 extract-tables is a Claude Code skill that turns Word tables into one Markdown file while preserving merged-cell structure. It extracts tables for analysis or slides. CX Codex +1 ★ 240repo stars MagicTeX ZoeLinUTS MagicTeX is an MCP server for Claude Code that opens a LaTeX workspace with live PDF rendering. Review comments placed on the compiled pages turn into edit instructions for the agent. CX Codex +1 ★ 5repo stars latex-paper-en bahayonghang latex-paper-en — a skill for an existing English .tex paper: repairs the build, checks venue formatting, bibliography and language. Useful when the draft exists and the deadline is close. CX Codex +1 6,200installs latex-posters K-Dense-AI latex-posters creates research posters with three LaTeX packages, compiles PDF, and checks fonts before print. CX Codex +1 2,300installs

From the same set79

The whole set →
python-logging-best-practices python-logging-best-practices is a Claude Code skill for choosing and configuring Python logging, from journald messages to structured JSONL events. CX Codex +1 408installs gdrive-access The gdrive-access skill gives your agent Google Drive from the command line: list files, download them, sync whole folders. OAuth credentials come from 1Password. CX Codex +1 357installs chezmoi-workflows chezmoi-workflows runs dotfiles through chezmoi: adds configs to a Git repo, pulls them onto other machines, renders templates. Useful when shell and editor settings drift apart. CX Codex +1 308installs disk-hygiene disk-hygiene audits macOS disk usage, clears bloated developer caches, and flags forgotten large files without automated accidental deletions. CX Codex +1 273installs latex-build latex-build is a Claude Code skill that builds LaTeX documents with latexmk, watches files for changes, and helps diagnose compilation errors. CX Codex +1 236installs ascii-diagram-validator The ascii-diagram-validator skill finds structural alignment problems in Markdown box diagrams and reports where they occur. Run it after editing architecture docs or README files. CX Codex +1 217installs calendar-event-manager calendar-event-manager builds macOS Calendar events with layered sound alarms and matching Reminders, so a meeting does not slip past you. CX Codex +1 214installs agent-reach The agent-reach skill equips your agent with web search and reading capabilities across 17 platforms: social networks (Twitter, Reddit, Weibo, Xiaohongshu, Douyin, Bilibili, V2EX), job boards (LinkedIn), GitHub, YouTube, podcasts. CX Codex +1 195installs

Project sponsors

Companies that keep this analytics open