LaTeX工具
从官方或内置模板创建、编译和校验数学建模 LaTeX 论文项目,并可配合 DOCX 工具把完整 LaTeX 论文转换为 Word。
npx skills add XiaoMaColtAI/math-modeling-skill --skill latex --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# LaTeX 工具 ## 路径与写入 - 当前目录为 `LATEX_TOOL_ROOT`,只读。 - 模板和脚本从本目录读取;论文项目只写入 `PROJECT_ROOT`。 - 官方模板、题目附件和 Skill 文件保持只读;先复制,再填充。 - 默认不覆盖已有输出目录。 - 初始化生成 `latex-project.json`,记录主入口、竞赛配置、模板来源、版本、哈希与资源绑定;不要手工删除或伪造。 ## 环境诊断 开始初始化和写作前,按官方模板选择引擎与参考文献后端并执行: ```powershell python "<SKILL_ROOT>/tools/latex/scripts/latex_paper.py" doctor ` --engine xelatex ` --bibliography-backend biber ` --need-pandoc ``` 仅生成 LaTeX/PDF 时省略 `--need-pandoc`。诊断会检查 `latexmk`、所选引擎、BibTeX/Biber、`pypdf`、`pdfimages`、`pdftoppm`,需要生成 Word 时再检查 Pandoc。任一必需项缺失都先报告阻塞,不要写完整论文后才发现无法编译或校验。 ## 模板优先级 1. 用户提供的当届官方 LaTeX 模板项目。 2. 从目标竞赛官方网站取得的当届 LaTeX 模板项目。 3. `assets/templates/cumcm/` 或 `assets/templates/mcm-icm/` 构建基线。 内置模板只在没有官方 LaTeX 模板时使用,不替代当届官方规则。复制官方模板目录时保留其 `.cls`、`.sty`、`.bst`、字体和图片资源,不重写导言区或文档类。 ## 初始化 ```powershell python "<SKILL_ROOT>/tools/latex/scripts/latex_paper.py" init ` "<PROJECT_ROOT>/完整论文-LaTeX" ` --contest cumcm ` --template "<PROJECT_ROOT>/当届官方LaTeX模板" ` --main "src/paper.tex" ` --template-source "<官方模板页面URL>" ` --template-version "<适用届次或版本>" ``` 没有官方模板时同时省略 `--template`、`--main` 和模板元数据。官方模板入口为 `main.tex` 或只有一个顶层 `.tex` 时可省略 `--main`;入口位于子目录或存在多个候选文件时必须按官方说明显式指定,不能猜测。CUMCM、MCM/ICM 以外的竞赛使用 `--contest generic`,且必须
- 路径与写入
- 环境诊断
- 模板优先级
- 初始化
- 绑定代码与图表资源
- 编译
- 校验
- 转换为 DOCX
What does the LaTeX工具 skill do?
从官方或内置模板创建、编译和校验数学建模 LaTeX 论文项目,并可配合 DOCX 工具把完整 LaTeX 论文转换为 Word。
How do I install it?
Run `npx skills add XiaoMaColtAI/math-modeling-skill --skill latex --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From XiaoMaColtAI/math-modeling-skill, a repository with 590 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
