
Latex Tables
- 214 installs
- 62 repo stars
- Updated August 3, 2026
- terrylica/cc-skills
Use latex-tables for development tasks
About
latex-tables: A skill for development. This provides functionality for development workflows.
- latex-tables
Latex Tables by the numbers
- 214 all-time installs (skills.sh)
- +2 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #1,833 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/terrylica/cc-skills --skill latex-tablesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 214 |
|---|---|
| repo stars | ★ 62 |
| Last updated | August 3, 2026 |
| Repository | terrylica/cc-skills ↗ |
What it does
Use latex-tables for development tasks
Files
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
# Check if installed
kpsewhich tabularray.sty
# If not found, install:
sudo tlmgr install tabularrayBasic 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
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 - 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
---
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.
Skill: LaTeX Tables with tabularray
Column Specification (colspec)
Alignment Options
| Code | Meaning |
|---|---|
l | Left-aligned |
c | Centered |
r | Right-aligned |
X | Flexible width (expands to fill) |
Q[width] | Fixed width with wrapping |
Examples
% 3 centered columns
colspec = {ccc}
% Left, center, right
colspec = {lcr}
% Fixed widths
colspec = {Q[2cm] Q[3cm] Q[1.5cm]}
% Mixed: fixed left, flexible middle, fixed right
colspec = {Q[2cm] X Q[2cm]}
% With alignment in fixed-width
colspec = {Q[2cm,l] Q[3cm,c] Q[2cm,r]}Evolution Log
Convention: Reverse chronological order (newest on top, oldest at bottom). Prepend new entries.
---
2026-02-26: Initial Evolution Log
Status: Skill is in use and maintained. Track improvements here.
Purpose
This evolution log tracks updates to the skill. Each entry should note:
- What changed (content, structure, tooling)
- Why it changed (bug fix, feature request, best practice)
- Files affected
How to Use
1. When updating SKILL.md or references, add an entry here with the date 2. Keep entries reverse-chronological (newest first) 3. Link to ADRs or GitHub issues when relevant 4. Reference specific line changes when helpful
---
Skill: LaTeX Tables with tabularray
Lines and Borders
All Lines
\begin{tblr}{
colspec = {ccc},
hlines, % All horizontal lines
vlines % All vertical lines
}Selective Lines
\begin{tblr}{
colspec = {ccc},
hline{1,2,Z} = {solid}, % Top, after header, bottom
vline{2} = {dashed} % Dashed line after column 1
}Thick Lines
\begin{tblr}{
colspec = {ccc},
hline{1,Z} = {2pt}, % Thick top/bottom
hline{2} = {1pt} % Thinner after header
}Skill: LaTeX Tables with tabularray
Migration from Old Packages
From tabular
% Old:
\begin{tabular}{|c|c|c|}
\hline
A & B & C \\
\hline
\end{tabular}
% New:
\begin{tblr}{
colspec = {ccc},
hlines, vlines
}
A & B & C \\
\end{tblr}From tabularx
% Old:
\begin{tabularx}{\textwidth}{|l|X|r|}
\hline
Left & Middle & Right \\
\hline
\end{tabularx}
% New:
\begin{tblr}{
width = \textwidth,
colspec = {lXr},
hlines
}
Left & Middle & Right \\
\end{tblr}Skill: LaTeX Tables with tabularray
Common Table Patterns
1. Simple Table with Lines
\begin{table}[h]
\centering
\begin{tblr}{
colspec = {ccc}, % 3 centered columns
hlines, % Horizontal lines
vlines % Vertical lines
}
Header 1 & Header 2 & Header 3 \\
Data 1 & Data 2 & Data 3 \\
More 1 & More 2 & More 3 \\
\end{tblr}
\caption{My table}
\end{table}2. Fixed-Width Columns
\begin{table}[h]
\centering
\begin{tblr}{
colspec = {Q[2cm] Q[4cm] Q[2cm]}, % Fixed widths: 2cm, 4cm, 2cm
hlines, vlines
}
Short & This is longer text that wraps & Data \\
A & More wrapping content here & B \\
\end{tblr}
\end{table}3. Mixed Column Types
\begin{tblr}{
colspec = {l Q[3cm,c] r}, % Left, centered fixed-width, right
hlines
}
Left-aligned & Centered in 3cm & Right-aligned \\
Text & More text & 123 \\
\end{tblr}4. No Lines (Minimal Style)
\begin{tblr}{
colspec = {lcc},
row{1} = {font=\bfseries} % Bold first row (header)
}
Name & Age & City \\
Alice & 25 & Boston \\
Bob & 30 & Seattle \\
\end{tblr}5. Colored Rows/Columns
\usepackage{xcolor}
\begin{tblr}{
colspec = {ccc},
row{1} = {bg=blue!20}, % Light blue header
row{even} = {bg=gray!10} % Alternate row colors
}
Header 1 & Header 2 & Header 3 \\
Data 1 & Data 2 & Data 3 \\
Data 4 & Data 5 & Data 6 \\
\end{tblr}Skill: LaTeX Tables with tabularray
Common Issues
Issue: Table Too Wide
Solution 1: Fixed-width columns
% Instead of:
colspec = {ccc}
% Use fixed widths that fit:
colspec = {Q[2cm] Q[3cm] Q[2cm]}Solution 2: Flexible columns
colspec = {XXX} % All columns expand equallySolution 3: Scale table
\usepackage{graphicx}
\begin{table}[h]
\resizebox{\textwidth}{!}{%
\begin{tblr}{...}
% table content
\end{tblr}
}
\end{table}Issue: Text Not Wrapping
Problem: Using c or l or r doesn't wrap
Solution: Use Q[width] for wrapping
% ❌ Won't wrap:
colspec = {ccc}
% ✅ Will wrap:
colspec = {Q[3cm] Q[4cm] Q[3cm]}Issue: Alignment in Fixed-Width Column
% Left-aligned in fixed width
Q[3cm, l]
% Centered in fixed width
Q[3cm, c]
% Right-aligned in fixed width
Q[3cm, r]