latex-tables
Creates modern LaTeX tables with tabularray package for fixed-width columns, proper alignment, and clean syntax. Use when creating tables or working with column layouts.
When & Why to Use This Skill
This Claude skill streamlines the creation of professional LaTeX tables by leveraging the modern tabularray package. It automates complex formatting tasks such as fixed-width column management, precise text alignment, and clean syntax generation, effectively replacing legacy packages like tabularx and longtable for a more efficient and stable document preparation workflow.
Use Cases
- Case 1: Generating complex academic tables with precise fixed-width columns and automatic text wrapping to prevent layout overflow in research papers.
- Case 2: Migrating legacy LaTeX documents by converting old tabular, tabularx, or booktabs code into the modern and more maintainable tabularray syntax.
- Case 3: Designing multi-page technical reports that require consistent headers, footers, and professional-grade borders across long data sets.
- Case 4: Troubleshooting and resolving common LaTeX table issues such as column misalignment, cell padding problems, or syntax errors in complex layouts.
| name | latex-tables |
|---|---|
| description | Creates modern LaTeX tables with tabularray package for fixed-width columns, proper alignment, and clean syntax. Use when creating tables or working with column layouts. |
| allowed-tools | Read, Edit, Bash |
LaTeX Tables with tabularray
Quick Reference
When to use this skill:
- Creating tables with fixed-width columns
- Formatting complex table layouts
- Need precise column alignment
- Migrating from tabular/tabularx/longtable/booktabs
- Troubleshooting table overflow issues
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
# Check if installed
kpsewhich tabularray.sty
# If not found, install:
sudo tlmgr install tabularray
Basic Usage
\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
% 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
- Use Q[width] for fixed columns instead of p{width}
- Specify widths explicitly when text might overflow
- Use X for flexible columns that should expand
- Style headers with row{1} instead of manual formatting
- Use colspec for column properties, not inline commands
- Check package version:
kpsewhich tabularray.sty(should be recent)
Reference Documentation
For detailed information, see:
- Table Patterns - 5 common table patterns with examples
- Column Specification - Alignment options and width control
- Lines and Borders - All lines, selective lines, thick lines
- Troubleshooting - Table too wide, text not wrapping, alignment issues
- Migration - Migrating from tabular and tabularx
Official Docs: Run texdoc tabularray for complete package documentation
See Also:
- Use
latex/setupskill for installing tabularray package - Use
latex/buildskill for compilation workflows