polish-tables-figures
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePolish Tables & Figures
打磨表格与图表
Turn draft-quality LaTeX floats into the tables and figures reviewers expect
to see at ACM / IEEE / NeurIPS-style / LNCS venues: booktabs rules, columns
that fit the page budget, clean subfigure layouts, venue-correct captions,
consistent references, and colorblind-safe colors. Every change is
presentation-only; the numbers are sacred.
\cref将草稿级别的LaTeX浮动元素转换为ACM/IEEE/NeurIPS风格/LNCS等会议审稿人期望的表格和图表:采用booktabs线条样式、列宽适配页面、简洁的子图布局、符合会议规范的标题、统一的引用,以及色弱友好配色。所有修改仅涉及呈现形式;数据内容绝对不可更改。
\\crefWhen to use
使用场景
- "Make my tables/figures look professional" / "polish for camera-ready"
- "Convert this table to booktabs" / "my table is too wide" / "overfull hbox"
- "Lay these plots out as subfigures" / "fix my captions"
- "Are my figure colors colorblind-safe?" / "pick a palette for this plot"
- "Fix my \ref/\cref mess"
- After , before
tailor-to-venue.preflight-check
- "让我的表格/图表看起来更专业" / "打磨至终稿状态"
- "将此表格转换为booktabs样式" / "我的表格太宽了" / "overfull hbox"
- "将这些图表布局为子图" / "修复我的标题"
- "我的图表配色对色弱人群友好吗?" / "为这个图表选择调色板"
- "修复我的 \ref/\cref 混乱问题"
- 在之后,
tailor-to-venue之前使用。preflight-check
Inputs
输入内容
- The main file (the one with
.tex);\documentclass/\inputfiles are followed automatically.\include - Optional: a venue profile (schema in
venues/conferences/<venue>-<year>.yml) — sets column count and caption conventions. Without one, conventions are inferred from the documentclass.venues/schema.yml - Strongly recommended: a compiled next to the
.logso the column-sizing (overfull box) check can run..tex
- 主文件(包含
.tex的文件);会自动追踪\\documentclass/\\input引用的文件。\\include - 可选:会议配置文件(配置格式见
venues/conferences/<venue>-<year>.yml)——用于设置列数和标题规范。若未提供,则根据文档类推断规范。venues/schema.yml - 强烈推荐:在文件旁放置编译生成的
.tex文件,以便运行列宽调整(溢出框)检查。.log
Process
处理流程
-
Resolve venue conventions. If a venue is named, load its profile (sanity-check with). Re-verify format-critical facts against the live
python3 scripts/venueyaml.py venues/conferences/<venue>.ymlbefore relying on them: template/documentclass, column count, any stated figure/table rules (minimum font sizes, color/grayscale requirements, accessibility requirements). Profiles are a starting point, never ground truth.cfp_url -
Lint everything first:
python3 scripts/check_floats.py paper.tex \ --venue venues/conferences/<venue>-<year>.ymlFlags:,--json(warnings also fail),--strict,--log <file>,--overfull-threshold <pt>. Exit codes: 0 clean, 1 findings, 2 bad arguments. The linter covers: booktabs style (--no-inputs,\hline, vertical rules, double rules, missing package),\cline/tiny-font scaling, caption position per family, missing\resizebox/\caption/\label/ACM\centering, label-before-caption, deprecated\Descriptionpackage,subfigurein a one-column float at a two-column venue, raster graphics,width=\textwidth/[h]placement, undefined and unreferenced labels, mixed[H]vsFigure~\refstyles, "Figure \cref" double prefixes, cleveref load order, lowercase\crefat sentence start, and Overfull\crefentries from the\hbox..log -
Fix tables — work through findings using references/tables.md: the mechanical booktabs conversion recipe (it preserves cell content byte-for-byte), then column sizing within the page budget (cut → abbreviate → align numbers →→
\tabcolsep→tabularx— nevertable*).\resizebox -
Fix figures — references/figures.md: width discipline (/
\columnwidth,\linewidthfor spans), subfigure layout withfigure*, vector formats, font sizes inside plots, float placement.subcaption -
Fix captions and cross-references — references/captions-crossrefs.md: per-family caption position/style table, self-contained caption writing, and the cleveref setup (load last,,
capitalisevs\cref, one style everywhere).\Cref -
Fix color — references/color-accessibility.md. Check the colors actually used in the paper (hex values from TikZ/pgfplots definitions, or sampled from included plots):
python3 scripts/palettes.py check 4477AA EE6677 ... # arbitrary colors python3 scripts/palettes.py show okabe-ito --format latex|pgfplots|matplotlibsimulates protanopia/deuteranopia/tritanopia and grayscale print, flags confusable pairs (exit 1), and the references file explains redundant encoding (markers + line styles, not color alone). If plots are generated by user scripts (matplotlib/pgfplots), edit the plotting source and ask the user to regenerate — never claim recolored results.check -
Recompile and re-run the linter until the verdict is PASS (or every remaining WARN is a deliberate, user-approved choice). Then hand off tofor the full desk-reject lint.
preflight-check
-
确定会议规范:若指定了会议名称,加载对应的配置文件(可通过进行合理性检查)。在依赖这些规范前,需通过实时
python3 scripts/venueyaml.py venues/conferences/<venue>.yml重新验证格式关键信息:模板/文档类、列数、任何明确的图表规则(最小字体大小、颜色/灰度要求、无障碍要求)。配置文件仅作为起点,绝非绝对标准。cfp_url -
先全面检查:
python3 scripts/check_floats.py paper.tex \ --venue venues/conferences/<venue>-<year>.yml参数:、--json(警告也视为错误)、--strict、--log <file>、--overfull-threshold <pt>。退出码:0表示无问题,1表示存在待处理项,2表示参数错误。检查器涵盖以下内容:booktabs样式(--no-inputs、\\hline、竖线、双线、缺失包)、\\cline/小字体缩放、对应体系的标题位置、缺失\\resizebox/\\caption/\\label/ACM的\\centering、标签在标题之前、已弃用的\\Description包、双栏会议中单栏浮动元素使用subfigure、光栅图形、width=\\textwidth/[h]位置参数、未定义和未引用的标签、[H]与Figure~\\ref混合使用、“Figure \cref”重复前缀、cleveref加载顺序、句首使用小写\\cref,以及\\cref文件中的Overfull.log条目。\\hbox -
修复表格——根据references/tables.md中的检查结果处理:按照机械的booktabs转换步骤(逐字节保留单元格内容),然后在页面限制内调整列宽(裁剪→缩写→数字对齐→→
\\tabcolsep→tabularx——绝不使用table*)。\\resizebox -
修复图表——参考references/figures.md:宽度规范(/
\\columnwidth,跨栏使用\\linewidth)、使用figure*布局子图、矢量格式、图表内的字体大小、浮动元素位置。subcaption -
修复标题与交叉引用——参考references/captions-crossrefs.md:不同体系的标题位置/样式表、独立完整的标题撰写方式,以及cleveref设置(最后加载、、
capitalise与\\cref、全局统一风格)。\\Cref -
修复配色——参考references/color-accessibility.md。检查论文中实际使用的颜色(从TikZ/pgfplots定义中提取十六进制值,或从嵌入的图表中采样):
python3 scripts/palettes.py check 4477AA EE6677 ... # 任意颜色 python3 scripts/palettes.py show okabe-ito --format latex|pgfplots|matplotlib命令模拟红色盲/绿色盲/蓝色盲和灰度打印效果,标记易混淆的颜色对(退出码1),参考文档解释了冗余编码方式(同时使用标记和线条样式,而非仅依赖颜色)。若图表由用户脚本(matplotlib/pgfplots)生成,则编辑用户的绘图源代码并让用户重新生成——绝不自行修改图表颜色并提交结果。check -
重新编译并再次运行检查器,直到结果为PASS(或剩余的WARN均为用户认可的 deliberate选择)。然后将文件移交至进行全面的拒稿前检查。
preflight-check
Output
输出内容
Edited (and plotting-script) changes applied in place with a short
change log per float: what changed and why, citing the venue convention.
Plus the final linter report (PASS / PASS-WITH-WARNINGS / FAIL). No new
files unless the user asks for extracted style snippets (e.g. a
palette preamble).
.texcolors.tex已编辑的(及绘图脚本)修改会直接应用到原文件中,并为每个浮动元素生成简短的变更日志:说明修改内容及原因,并引用对应的会议规范。同时提供最终的检查器报告(PASS / PASS-WITH-WARNINGS / FAIL)。除非用户要求提取样式片段(例如调色板前置代码),否则不会生成新文件。
.texcolors.texAdapt to your discipline
适配不同学科
Conventions here target CS venues (ACM/IEEE/ML/LNCS). Forking for another
field: adjust the caption-position conventions in
and the family mapping in
(); the booktabs, sizing, and
color guidance is field-agnostic.
references/captions-crossrefs.mdscripts/check_floats.pyconvention_label此处的规范针对计算机科学领域的会议(ACM/IEEE/ML/LNCS)。若要适配其他领域:修改中的标题位置规范,以及中的体系映射();booktabs、列宽调整和配色指南适用于所有领域。
references/captions-crossrefs.mdscripts/check_floats.pyconvention_labelGuardrails
约束规则
- Never change data: cell values, units, significant digits, axis scales, error bars, and legends' meanings are untouchable. Reformatting only. If a value looks wrong, tell the user — do not "fix" it.
- Never fabricate venue rules. The profile and the live CFP are the only sources; when neither states a rule, label advice as general convention.
- Do not regenerate or recolor result plots yourself; edit the user's plotting source and let them re-run it.
- Bold-best-result formatting must come from the user's stated criterion, not your reading of which number "looks best".
- Citation issues found along the way go to ; submission readiness goes to
verify-citations. Never submit anything on the user's behalf.preflight-check
- 绝不修改数据:单元格值、单位、有效数字、坐标轴刻度、误差线和图例含义均不可更改。仅进行格式调整。若发现数据值疑似错误,需告知用户——不可自行“修复”。
- 绝不编造会议规则。仅可使用配置文件和实时CFP作为来源;若两者均未明确规则,则标注建议为通用规范。
- 不可自行重新生成或修改结果图表的颜色;仅可编辑用户的绘图源代码,由用户重新运行生成。
- 加粗标注最佳结果的格式必须遵循用户明确指定的标准,不可根据自己对“最优”数字的判断进行操作。
- 过程中发现的引用问题需移交至;提交就绪检查需移交至
verify-citations。绝不可代表用户提交任何内容。preflight-check