polish-tables-figures

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Polish 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
\cref
references, and colorblind-safe colors. Every change is presentation-only; the numbers are sacred.
将草稿级别的LaTeX浮动元素转换为ACM/IEEE/NeurIPS风格/LNCS等会议审稿人期望的表格和图表:采用booktabs线条样式、列宽适配页面、简洁的子图布局、符合会议规范的标题、统一的
\\cref
引用,以及色弱友好配色。所有修改仅涉及呈现形式;数据内容绝对不可更改。

When 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
    tailor-to-venue
    , before
    preflight-check
    .
  • "让我的表格/图表看起来更专业" / "打磨至终稿状态"
  • "将此表格转换为booktabs样式" / "我的表格太宽了" / "overfull hbox"
  • "将这些图表布局为子图" / "修复我的标题"
  • "我的图表配色对色弱人群友好吗?" / "为这个图表选择调色板"
  • "修复我的 \ref/\cref 混乱问题"
  • tailor-to-venue
    之后,
    preflight-check
    之前使用。

Inputs

输入内容

  1. The main
    .tex
    file (the one with
    \documentclass
    );
    \input
    /
    \include
    files are followed automatically.
  2. Optional: a venue profile
    venues/conferences/<venue>-<year>.yml
    (schema in
    venues/schema.yml
    ) — sets column count and caption conventions. Without one, conventions are inferred from the documentclass.
  3. Strongly recommended: a compiled
    .log
    next to the
    .tex
    so the column-sizing (overfull box) check can run.
  1. .tex
    文件(包含
    \\documentclass
    的文件);会自动追踪
    \\input
    /
    \\include
    引用的文件。
  2. 可选:会议配置文件
    venues/conferences/<venue>-<year>.yml
    (配置格式见
    venues/schema.yml
    )——用于设置列数和标题规范。若未提供,则根据文档类推断规范。
  3. 强烈推荐:在
    .tex
    文件旁放置编译生成的
    .log
    文件,以便运行列宽调整(溢出框)检查。

Process

处理流程

  1. Resolve venue conventions. If a venue is named, load its profile (sanity-check with
    python3 scripts/venueyaml.py venues/conferences/<venue>.yml
    ). Re-verify format-critical facts against the live
    cfp_url
    before 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.
  2. Lint everything first:
    python3 scripts/check_floats.py paper.tex \
        --venue venues/conferences/<venue>-<year>.yml
    Flags:
    --json
    ,
    --strict
    (warnings also fail),
    --log <file>
    ,
    --overfull-threshold <pt>
    ,
    --no-inputs
    . Exit codes: 0 clean, 1 findings, 2 bad arguments. The linter covers: booktabs style (
    \hline
    ,
    \cline
    , vertical rules, double rules, missing package),
    \resizebox
    /tiny-font scaling, caption position per family, missing
    \caption
    /
    \label
    /
    \centering
    /ACM
    \Description
    , label-before-caption, deprecated
    subfigure
    package,
    width=\textwidth
    in a one-column float at a two-column venue, raster graphics,
    [h]
    /
    [H]
    placement, undefined and unreferenced labels, mixed
    Figure~\ref
    vs
    \cref
    styles, "Figure \cref" double prefixes, cleveref load order, lowercase
    \cref
    at sentence start, and Overfull
    \hbox
    entries from the
    .log
    .
  3. 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
    table*
    — never
    \resizebox
    ).
  4. Fix figuresreferences/figures.md: width discipline (
    \columnwidth
    /
    \linewidth
    ,
    figure*
    for spans), subfigure layout with
    subcaption
    , vector formats, font sizes inside plots, float placement.
  5. Fix captions and cross-referencesreferences/captions-crossrefs.md: per-family caption position/style table, self-contained caption writing, and the cleveref setup (load last,
    capitalise
    ,
    \cref
    vs
    \Cref
    , one style everywhere).
  6. Fix colorreferences/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|matplotlib
    check
    simulates 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.
  7. Recompile and re-run the linter until the verdict is PASS (or every remaining WARN is a deliberate, user-approved choice). Then hand off to
    preflight-check
    for the full desk-reject lint.
  1. 确定会议规范:若指定了会议名称,加载对应的配置文件(可通过
    python3 scripts/venueyaml.py venues/conferences/<venue>.yml
    进行合理性检查)。在依赖这些规范前,需通过实时
    cfp_url
    重新验证格式关键信息:模板/文档类、列数、任何明确的图表规则(最小字体大小、颜色/灰度要求、无障碍要求)。配置文件仅作为起点,绝非绝对标准。
  2. 先全面检查
    python3 scripts/check_floats.py paper.tex \
        --venue venues/conferences/<venue>-<year>.yml
    参数:
    --json
    --strict
    (警告也视为错误)、
    --log <file>
    --overfull-threshold <pt>
    --no-inputs
    。退出码:0表示无问题,1表示存在待处理项,2表示参数错误。检查器涵盖以下内容:booktabs样式(
    \\hline
    \\cline
    、竖线、双线、缺失包)、
    \\resizebox
    /小字体缩放、对应体系的标题位置、缺失
    \\caption
    /
    \\label
    /
    \\centering
    /ACM的
    \\Description
    、标签在标题之前、已弃用的
    subfigure
    包、双栏会议中单栏浮动元素使用
    width=\\textwidth
    、光栅图形、
    [h]
    /
    [H]
    位置参数、未定义和未引用的标签、
    Figure~\\ref
    \\cref
    混合使用、“Figure \cref”重复前缀、cleveref加载顺序、句首使用小写
    \\cref
    ,以及
    .log
    文件中的Overfull
    \\hbox
    条目。
  3. 修复表格——根据references/tables.md中的检查结果处理:按照机械的booktabs转换步骤(逐字节保留单元格内容),然后在页面限制内调整列宽(裁剪→缩写→数字对齐→
    \\tabcolsep
    tabularx
    table*
    ——绝不使用
    \\resizebox
    )。
  4. 修复图表——参考references/figures.md:宽度规范(
    \\columnwidth
    /
    \\linewidth
    ,跨栏使用
    figure*
    )、使用
    subcaption
    布局子图、矢量格式、图表内的字体大小、浮动元素位置。
  5. 修复标题与交叉引用——参考references/captions-crossrefs.md:不同体系的标题位置/样式表、独立完整的标题撰写方式,以及cleveref设置(最后加载、
    capitalise
    \\cref
    \\Cref
    、全局统一风格)。
  6. 修复配色——参考references/color-accessibility.md。检查论文中实际使用的颜色(从TikZ/pgfplots定义中提取十六进制值,或从嵌入的图表中采样):
    python3 scripts/palettes.py check 4477AA EE6677 ...   # 任意颜色
    python3 scripts/palettes.py show okabe-ito --format latex|pgfplots|matplotlib
    check
    命令模拟红色盲/绿色盲/蓝色盲和灰度打印效果,标记易混淆的颜色对(退出码1),参考文档解释了冗余编码方式(同时使用标记和线条样式,而非仅依赖颜色)。若图表由用户脚本(matplotlib/pgfplots)生成,则编辑用户的绘图源代码并让用户重新生成——绝不自行修改图表颜色并提交结果。
  7. 重新编译并再次运行检查器,直到结果为PASS(或剩余的WARN均为用户认可的 deliberate选择)。然后将文件移交至
    preflight-check
    进行全面的拒稿前检查。

Output

输出内容

Edited
.tex
(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
colors.tex
palette preamble).
已编辑的
.tex
(及绘图脚本)修改会直接应用到原文件中,并为每个浮动元素生成简短的变更日志:说明修改内容及原因,并引用对应的会议规范。同时提供最终的检查器报告(PASS / PASS-WITH-WARNINGS / FAIL)。除非用户要求提取样式片段(例如
colors.tex
调色板前置代码),否则不会生成新文件。

Adapt to your discipline

适配不同学科

Conventions here target CS venues (ACM/IEEE/ML/LNCS). Forking for another field: adjust the caption-position conventions in
references/captions-crossrefs.md
and the family mapping in
scripts/check_floats.py
(
convention_label
); the booktabs, sizing, and color guidance is field-agnostic.
此处的规范针对计算机科学领域的会议(ACM/IEEE/ML/LNCS)。若要适配其他领域:修改
references/captions-crossrefs.md
中的标题位置规范,以及
scripts/check_floats.py
中的体系映射(
convention_label
);booktabs、列宽调整和配色指南适用于所有领域。

Guardrails

约束规则

  • 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
    verify-citations
    ; submission readiness goes to
    preflight-check
    . Never submit anything on the user's behalf.
  • 绝不修改数据:单元格值、单位、有效数字、坐标轴刻度、误差线和图例含义均不可更改。仅进行格式调整。若发现数据值疑似错误,需告知用户——不可自行“修复”。
  • 绝不编造会议规则。仅可使用配置文件和实时CFP作为来源;若两者均未明确规则,则标注建议为通用规范。
  • 不可自行重新生成或修改结果图表的颜色;仅可编辑用户的绘图源代码,由用户重新运行生成。
  • 加粗标注最佳结果的格式必须遵循用户明确指定的标准,不可根据自己对“最优”数字的判断进行操作。
  • 过程中发现的引用问题需移交至
    verify-citations
    ;提交就绪检查需移交至
    preflight-check
    。绝不可代表用户提交任何内容。