latex-tables by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill latex-tables在以下情况下使用此技能:
现代 LaTeX3 包(替代旧解决方案):
tabular、tabularx、longtable、booktabs# 检查是否已安装
kpsewhich tabularray.sty
# 如果未找到,则安装:
sudo tlmgr install tabularray
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
\documentclass{article}
\usepackage{tabularray} % 现代表格包
\begin{document}
% 简单表格
\begin{tblr}{colspec={ccc}, hlines, vlines}
Header 1 & Header 2 & Header 3 \\
Data 1 & Data 2 & Data 3 \\
\end{tblr}
\end{document}
% 最小表格
\begin{tblr}{colspec={ccc}}
A & B & C \\
\end{tblr}
% 带所有线条
\begin{tblr}{colspec={ccc}, hlines, vlines}
A & B & C \\
\end{tblr}
% 固定宽度
\begin{tblr}{colspec={Q[2cm] Q[3cm] Q[2cm]}, hlines}
A & B & C \\
\end{tblr}
% 粗体标题
\begin{tblr}{
colspec={ccc},
row{1}={font=\bfseries}
}
Header & Header & Header \\
Data & Data & Data \\
\end{tblr}
Q[width] 替代 p{width} 来定义固定列X 表示应扩展的弹性列row{1} 来设置标题样式,而不是手动格式化colspec 定义列属性,而不是内联命令kpsewhich tabularray.sty(应为最新版本)详细信息请参阅:
官方文档:运行 texdoc tabularray 获取完整的包文档
另请参阅:
latex/setup 技能安装 tabularray 包latex/build 技能进行编译工作流| 问题 | 原因 | 解决方案 |
|---|---|---|
| 未找到包 | tabularray 未安装 | sudo tlmgr install tabularray |
| 表格过宽 | 固定宽度超出页面 | 使用更小的 Q[width] 值或使用 X 作为弹性列 |
| 文本不换行 | 列规范缺少宽度 | 使用 Q[width] 替代 c/l/r 以实现换行 |
| 对齐问题 | 混合列类型 | 确保所有列具有一致的规范 |
| 编译时 colspec 错误 | 语法无效 | 检查列规范中是否缺少逗号或有拼写错误 |
| hlines 未出现 | 规范中缺少 | 在规范中添加 hlines:{colspec={...}, hlines} |
| 行样式未应用 | 行索引错误 | 记住 row{1} 是第一行(索引从 1 开始) |
| 包版本过旧 | TeX Live 版本过时 | sudo tlmgr update --self --all |
每周安装数
92
代码仓库
GitHub 星标数
24
首次出现
2026 年 1 月 24 日
安全审计
已安装于
codex85
opencode85
gemini-cli84
github-copilot81
cursor79
amp79
Use this skill when:
Modern LaTeX3 package (replaces old solutions):
tabular, tabularx, longtable, booktabs# Check if installed
kpsewhich tabularray.sty
# If not found, install:
sudo tlmgr install tabularray
\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}
% 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}
kpsewhich tabularray.sty (should be recent)For detailed information, see:
Official Docs : Run texdoc tabularray for complete package documentation
See Also :
latex/setup skill for installing tabularray packagelatex/build skill for compilation workflows| 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} |
Weekly Installs
92
Repository
GitHub Stars
24
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
codex85
opencode85
gemini-cli84
github-copilot81
cursor79
amp79
Claude技能创建器指南:构建模块化AI技能包,优化工作流与工具集成
5,700 周安装
| 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 |