latex-formatting

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LaTeX Formatting

LaTeX格式处理

Set up and manage LaTeX formatting for academic papers.
为学术论文搭建并管理LaTeX格式。

Input

输入

  • $0
    — Action:
    setup
    ,
    fix
    ,
    check
  • $1
    — Venue name (for
    setup
    ) or
    .tex
    file path (for
    fix
    /
    check
    )
  • $0
    — 操作类型:
    setup
    (搭建)、
    fix
    (修复)、
    check
    (检查)
  • $1
    — 会议名称(用于
    setup
    操作)或
    .tex
    文件路径(用于
    fix
    /
    check
    操作)

Scripts

脚本

Pre-submission format checker

提交前格式检查器

bash
python ~/.claude/skills/latex-formatting/scripts/latex_checker.py paper/main.tex --venue neurips --check-anon
Checks: word count, required sections, TODO markers, anonymization, mismatched environments, content stats.
bash
python ~/.claude/skills/latex-formatting/scripts/latex_checker.py paper/main.tex --venue neurips --check-anon
检查内容:字数统计、必填章节、TODO标记、匿名化情况、不匹配的环境、内容统计信息。

Validate citations and references

验证引用与参考文献

bash
python ~/.claude/skills/citation-management/scripts/validate_citations.py \
  --tex paper/main.tex --bib paper/references.bib --check-figures
bash
python ~/.claude/skills/citation-management/scripts/validate_citations.py \
  --tex paper/main.tex --bib paper/references.bib --check-figures

Clean LaTeX text (fix special characters)

清理LaTeX文本(修复特殊字符)

bash
python ~/.claude/skills/latex-formatting/scripts/clean_latex.py \
  --input paper/main.tex --output paper/main_cleaned.tex
Replaces special/non-UTF8 characters with LaTeX equivalents, skips math environments. Key flags:
--dry-run
,
--tables-only
bash
python ~/.claude/skills/latex-formatting/scripts/clean_latex.py \
  --input paper/main.tex --output paper/main_cleaned.tex
将特殊/非UTF8字符替换为LaTeX等效字符,跳过数学环境。关键参数:
--dry-run
(试运行)、
--tables-only
(仅处理表格)

Auto-fix after checking

检查后自动修复

bash
python ~/.claude/skills/latex-formatting/scripts/latex_checker.py paper/main.tex --venue neurips --fix
Runs checks then applies clean_latex.py fixes, writing to
main_fixed.tex
.
bash
python ~/.claude/skills/latex-formatting/scripts/latex_checker.py paper/main.tex --venue neurips --fix
先执行检查,再应用clean_latex.py的修复,结果写入
main_fixed.tex

References

参考资料

  • Venue specs, project structure, packages, commands:
    ~/.claude/skills/latex-formatting/references/venue-templates.md
  • 会议规范、项目结构、宏包、命令:
    ~/.claude/skills/latex-formatting/references/venue-templates.md

Action:
setup

操作:
setup

Create the project directory structure and main.tex for the specified venue. Use the template from
references/venue-templates.md
.
创建指定会议的项目目录结构与主文件main.tex,使用
references/venue-templates.md
中的模板。

Action:
fix

操作:
fix

Fix common LaTeX issues: unescaped special chars, math mode errors, float placement, overfull/underfull boxes, cross-reference issues.
修复常见LaTeX问题:未转义的特殊字符、数学模式错误、浮动体位置问题、过宽/过窄盒子、交叉引用问题。

Action:
check

操作:
check

Run
latex_checker.py
for pre-submission validation. Check page count, anonymization, required sections, TODO markers.
运行
latex_checker.py
进行提交前验证,检查页数、匿名化情况、必填章节、TODO标记。

Related Skills

相关技能

  • Upstream: paper-writing-section, table-generation
  • Downstream: paper-compilation
  • See also: citation-management
  • 上游:论文写作章节表格生成
  • 下游:论文编译
  • 另见:引用管理