latex-diff
Create a reviewed PDF comparison between two resolved manuscript versions with latexdiff; use for referee updates, revision reviews, and version-to-version .tex diffs.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- latex-diff
- description
- Create a reviewed PDF comparison between two resolved manuscript versions with latexdiff; use for referee updates, revision reviews, and version-to-version .tex diffs.
02 资源文件 1
- 脚本scripts/latex-diff-pdf.sh3.4 KB
03 SKILL.md 正文
LaTeX diff
Use this leaf when a manuscript needs an explicit source comparison. It
produces a disposable .tex source and compiled PDF, and never edits either
input source.
-
Resolve the repository contracts first. Read the nearest
AGENTS.md, the manuscript layout/LaTeX policy, and any local build instructions. Identify the exact old and new sources. If one version is in Git, resolve its commit and path withgit show; do not guess from a filename or working-tree state. Report an ambiguous pair instead of comparing arbitrary files. -
Check that
latexdiffis installed and recordlatexdiff --versionwhen available. The package documentation is https://ctan.org/pkg/latexdiff?lang=en. Do not install software or alter the manuscript repository as part of this leaf. If the command is absent, stop with the dependency and documentation link. -
Materialize historical input only in a temporary location, then run the bundled
scripts/latex-diff-pdf.sh OLD NEW OUTPUT-DIR [BASENAME]helper. It invokeslatexdiff --type=UNDERLINE --graphics-markup=none --flattenand compiles the result withlatexmk.UNDERLINEis explicit: additions render in blue and deletions render in red with strikeout. Graphics markup is disabled so the comparison does not require an\includegraphicsdefinition that may exist only in one source version. Put all generated output under the repository's declared scratch/build directory unless the caller names a different destination. Keep the output names explicit, for examplemanuscript-current-vs-previous.texand.pdf. Preserve the old and new inputs. -
Validate both artifacts: the source is nonempty, contains the expected LaTeX preamble, and contains
\\DIFaddor\\DIFdelwhen the inputs differ; the PDF exists, is nonempty, and renders successfully. Confirm the source contains the red/blue markup definitions and inspect representative rendered pages for red strikeouts and blue additions. If the files are identical, say so rather than fabricating a diff. Report unresolved references or package failures separately from the source comparison. -
Return the exact old source, new source, resolved Git revision if relevant, command/version, both output paths, and validation result. A generated diff is not canonical manuscript source and must not be committed unless the user explicitly requests that disposition.
The diff is a review aid, not mathematical verification. Use the manuscript's referee, citation, and proof-review skills for those obligations.
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code