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
  • 上游:paper-writing-sectiontable-generation
  • 下游:paper-compilation
  • 另见:citation-management