latex-compiling SKILL.md skillA
latex-compiling from black-yt/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add black-yt/skills/latex-compiling@git:20260509.cdf62b1Pins git:20260509.cdf62b1 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- black-yt/skills
- Path
latex-compiling/SKILL.md- Versions recorded
- 2
- Latest version
- git:20260509.cdf62b1, committed May 9, 2026
- First version recorded
- May 9, 2026
- Size
- 2,455 bytes
- Repository stars
- 16
- License
- none declared
当需要用系统级 latexmk 和 pdflatex 编译 LaTeX,并把 PDF、中间文件、TeX 缓存与源码目录隔离时使用。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# LaTeX 编译
## 核心原则
- 使用系统级 TeX 工具链,不优先使用 conda 安装 TeX。
- 用 `latexmk -pdf` 自动处理多轮编译、引用和目录。
- 使用独立 build 目录保存 PDF、中间文件、日志和 TeX 缓存。
- 设置 `TEXMFVAR` 和 `TEXMFCONFIG` 到可写目录,避免 TeX 首次生成字体缓存时写入 `/tmp`、只读目录或不可控位置。
## 安装
Debian/Ubuntu:
```bash
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-latex-extra latexmk ghostscript
apt-get clean
```
如果没有 root 权限,让系统管理员安装,或使用已有系统级 TeX 环境。
检查:
```bash
latexmk -version
pdflatex --version
gs --version
```
## 推荐目录结构
```text
project/
latex/
main.tex
sections/
figures/
latex_build/
texmf-var/
texmf-config/
```
如果项目会和 Overleaf 同步,不要把编译中间文件写进同步目录。
## 标准编译命令
```bash
cd /path/to/project/latex
TEXMFVAR=/path/to/project/latex_build/texmf-var \
TEXMFCONFIG=/path/to/project/latex_build/texmf-config \
latexmk -pdf -interaction=nonstopmode -halt-on-error -outdir=../latex_build main.tex
```
参数要点:
- `-interaction=nonstopmode`:遇到错误时尽量输出完整日志,不进入交互模式。
- `-halt-on-error`:遇到致命错误时停止。
- `-outdir=../latex_build`:把 PDF 和中间文件输出到 build 目录。
- `main.tex`:替换为实际入口文件名。
## 清理
清理中间文件但保留 PDF:
```bash
latexmk -c -outdir=../latex_build main.tex
```
清理中间文件和 PDF:
```bash
latexmk -C -outdir=../latex_build main.tex
```
…Read the whole file at its exact version.
How to install
mdr add black-yt/skills/latex-compiling@sha256:a8ebf6bc049a3e79The line at the top of this page pins the label git:20260509.cdf62b1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_olt36w5ipvit5twd)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, all committed on May 9, 2026.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260509.cdf62b1 latest | 2026-05-09 | cdf62b1 | 2,455 B | A | view · diff |
| git:20260509.e0ce9ca | 2026-05-09 | e0ce9ca | 2,382 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2455 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
black-yt/skills · 16 stars · license none declared · pushed 2026-11-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_olt36w5ipvit5twd GET https://markdownregistry.com/api/v1/resolve?ref=black-yt/skills/latex-compiling GET https://markdownregistry.com/api/v1/blob/a8ebf6bc049a3e7904e5038e614d25d91ccb2b114c757b84a49b7a963f36ab6e
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.