table-generation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTable Generation
表格生成
Convert experimental results into publication-ready LaTeX tables.
将实验结果转换为可直接用于出版的LaTeX表格。
Input
输入
- — Table type:
$0,comparison,ablation,descriptivecustom - — Data source: JSON file, CSV file, or inline data
$1
- — 表格类型:
$0(对比表)、comparison(消融实验表)、ablation(描述性表格)、descriptive(自定义表格)custom - — 数据源:JSON文件、CSV文件或内嵌数据
$1
Scripts
脚本
Generate LaTeX table from JSON/CSV
从JSON/CSV生成LaTeX表格
bash
python ~/.claude/skills/table-generation/scripts/results_to_table.py \
--input results.json --type comparison \
--bold-best max --caption "Performance comparison" \
--label tab:main_resultsSupports: , , , table types.
Additional flags: for methods x datasets x metrics layout, for p-value stars, for second-best results.
comparisonablationdescriptivemulti-dataset--type multi-dataset--significance--underline-secondbash
python ~/.claude/skills/table-generation/scripts/results_to_table.py \
--input results.json --type comparison \
--bold-best max --caption "Performance comparison" \
--label tab:main_results支持:、、、(多数据集)表格类型。
额外参数:用于方法×数据集×指标的布局,用于添加p值星号,用于标记次优结果。
comparisonablationdescriptivemulti-dataset--type multi-dataset--significance--underline-secondReferences
参考资料
- LaTeX table templates and examples:
~/.claude/skills/table-generation/references/table-templates.md
- LaTeX表格模板及示例:
~/.claude/skills/table-generation/references/table-templates.md
Table Types
表格类型
comparison
— Main results table
comparisoncomparison
— 主结果表
comparison- Rows = methods (baselines + ours), Columns = metrics/datasets
- Bold the best result in each column
- Include mean +/- std when available
- Use for method categories (Supervised, Self-supervised, etc.)
\multirow
- 行 = 方法(基线方法+我们的方法),列 = 指标/数据集
- 为每列中的最优结果添加加粗格式
- 若有可用数据则包含均值±标准差
- 对方法类别(监督学习、自监督学习等)使用
\multirow
ablation
— Ablation study table
ablationablation
— 消融实验表
ablation- Rows = variants (full model, minus component A, minus component B, ...)
- Columns = metrics
- Bold the full model result
- Use checkmarks for component presence
- 行 = 变体(完整模型、移除组件A、移除组件B……)
- 列 = 指标
- 为完整模型的结果添加加粗格式
- 用勾选标记组件是否存在
descriptive
— Dataset/statistics table
descriptivedescriptive
— 数据集/统计表格
descriptive- Dataset characteristics, hyperparameters, or summary statistics
- Clean formatting with proper units
- 包含数据集特征、超参数或汇总统计信息
- 采用清晰格式并标注正确单位
custom
— Free-form table
customcustom
— 自由格式表格
custom- User specifies layout and content
- 由用户指定布局和内容
Required Packages
所需宏包
latex
\usepackage{booktabs} % \toprule, \midrule, \bottomrule
\usepackage{multirow} % \multirow
\usepackage{multicol} % multi-column layouts
\usepackage{threeparttable} % table noteslatex
\usepackage{booktabs} % \toprule, \midrule, \bottomrule
\usepackage{multirow} % \multirow
\usepackage{multicol} % 多列布局
\usepackage{threeparttable} % 表格注释Output Format
输出格式
Always generate tables with:
- rules (
booktabs,\toprule,\midrule)\bottomrule - and
\caption{}\label{tab:...} - Bold best results using
\textbf{} - Table notes via when needed
threeparttable - Proper alignment (for text,
lorcfor numbers)r
生成的表格需始终满足以下要求:
- 使用规则(
booktabs、\toprule、\midrule)\bottomrule - 包含和
\caption{}\label{tab:...} - 使用为最优结果添加加粗格式
\textbf{} - 必要时通过添加表格注释
threeparttable - 采用合适的对齐方式(文本用,数字用
l或c)r
Rules
规则
- Only include numbers from actual experimental logs — never hallucinate results
- All numbers must match the data source exactly
- Use for standard deviations
$\pm$ - Use for second-best results when appropriate
\underline{} - Keep tables compact — avoid unnecessary columns
- Use for wide tables spanning two columns
table* - Add glossary/notes for abbreviated column headers
- 仅包含来自实际实验日志的数值——绝不能虚构结果
- 所有数值必须与数据源完全一致
- 使用表示标准差
$\pm$ - 必要时用标记次优结果
\underline{} - 保持表格紧凑——避免不必要的列
- 跨双栏的宽表格使用
table* - 为缩写的列标题添加术语表/注释
Related Skills
相关技能
- Upstream: data-analysis, experiment-code
- Downstream: paper-writing-section, paper-compilation
- See also: figure-generation
- 上游:数据分析、实验代码
- 下游:论文写作章节、论文编译
- 另见:图表生成