latex-build by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill latex-build在以下情况下使用此技能:
行业标准构建工具:
latexmk -pdf document.tex
# 结果:创建 document.pdf
latexmk -pvc -pdf document.tex
# 会发生什么:
# - 初始编译文档
# - 监视文件更改
# - 文件更改时自动重新编译
# - 在 Skim 查看器中自动重载 PDF
停止监视: 按 Ctrl+C
# 构建一次
latexmk -pdf document.tex
# 实时预览(监视模式)
latexmk -pvc -pdf document.tex
# 使用 SyncTeX 构建
latexmk -pdf -synctex=1 document.tex
# 清理产物
latexmk -c # 保留 PDF
latexmk -C # 同时移除 PDF
# 强制重建
latexmk -gg -pdf document.tex
# 非交互式(用于 CI)
latexmk -pdf -interaction=nonstopmode document.tex
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
which latexmklatexmk -pdf document.tex-synctex=1 标志latexmk -pvc -pdf document.texlatexmk -c 移除产物详细信息请参阅:
官方文档 :运行 man latexmk 或 latexmk -help 获取完整参考
另请参阅:
latex/setup 技能安装 LaTeX 和配置环境latex/tables 技能通过 tabularray 创建表格| 问题 | 原因 | 解决方案 |
|---|---|---|
| 未找到 latexmk | 不在 PATH 中 | 将 /Library/TeX/texbin 添加到 PATH |
| 未定义的命令序列 | 缺少宏包 | 检查 \usepackage 语句中是否包含所需宏包 |
| 引用显示 ?? | 需要多次运行 | latexmk 会自动处理此问题;确保没有错误 |
| 实时预览未更新 | Skim 自动重载已禁用 | Skim 偏好设置 → Sync → 检查文件更改 |
| 构建挂起 | 非停止模式下的输入提示 | 使用 -interaction=nonstopmode 标志 |
| PDF 未更新 | 构建错误阻止输出 | 检查 .log 文件中的具体错误 |
| SyncTeX 不工作 | 缺少 -synctex=1 标志 | 在构建命令中添加 -synctex=1 |
| aux 文件过多 | 正常的构建产物 | 运行 latexmk -c 进行清理(保留 PDF) |
每周安装次数
98
仓库
GitHub 星标数
26
首次出现
2026 年 1 月 24 日
安全审计
安装于
opencode92
gemini-cli92
codex90
cursor89
github-copilot88
amp87
Use this skill when:
Industry standard build tool:
latexmk -pdf document.tex
# Result: document.pdf created
latexmk -pvc -pdf document.tex
# What happens:
# - Compiles document initially
# - Watches for file changes
# - Auto-recompiles when files change
# - Auto-reloads PDF in Skim viewer
Stop watching: Press Ctrl+C
# Build once
latexmk -pdf document.tex
# Live preview (watch mode)
latexmk -pvc -pdf document.tex
# Build with SyncTeX
latexmk -pdf -synctex=1 document.tex
# Clean artifacts
latexmk -c # Keep PDF
latexmk -C # Remove PDF too
# Force rebuild
latexmk -gg -pdf document.tex
# Non-interactive (for CI)
latexmk -pdf -interaction=nonstopmode document.tex
which latexmklatexmk -pdf document.tex-synctex=1 flaglatexmk -pvc -pdf document.texlatexmk -c removes artifactsFor detailed information, see:
Official Docs : Run man latexmk or latexmk -help for complete reference
See Also :
latex/setup skill for installing LaTeX and configuring environmentlatex/tables skill for creating tables with tabularray| Issue | Cause | Solution |
|---|---|---|
| latexmk not found | Not in PATH | Add /Library/TeX/texbin to PATH |
| Undefined control sequence | Missing package | Check \usepackage statements for required packages |
| References show ?? | Need multiple runs | latexmk handles this automatically; ensure no errors |
| Live preview not updating | Skim auto-reload disabled | Skim Preferences → Sync → Check for file changes |
| Build hangs | Input prompt in nonstop mode | Use -interaction=nonstopmode flag |
| PDF not updating | Build error preventing output |
Weekly Installs
98
Repository
GitHub Stars
26
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode92
gemini-cli92
codex90
cursor89
github-copilot88
amp87
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
40,000 周安装
| Check .log file for specific error |
| SyncTeX not working | Missing -synctex=1 flag | Add -synctex=1 to build command |
| Too many aux files | Normal build artifacts | Run latexmk -c to clean (keeps PDF) |