# Latex PDF To Chinese

> Faithfully translate a complete English LaTeX paper or LaTeX-generated PDF into idiomatic Chinese, preserving document structure, equations, citations, figures, tables, numbering, and formatting, then compile and verify a Chinese LaTeX/PDF deliverable. Use for full-paper translation; do not use for summaries or ordinary PDF extraction.

- Skill: `cosmosmount/latex-pdf-to-chinese` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add cosmosmount/latex-pdf-to-chinese`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cosmosmount/latex-pdf-to-chinese/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: CosmosMount (https://skillmd.com/u/cosmosmount)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/cosmosmount/latex-pdf-to-chinese

---


# LaTeX PDF to Chinese

Produce a complete Chinese edition of an English paper without omissions, summarization, silent correction, or redesign. Preserve the paper's claims, qualifications, terminology distinctions, and visible content while making the prose natural in Chinese.

## Establish the source of truth

1. Inventory every supplied file and identify the main document, included `.tex` files, bibliography, class/style files, figures, and the reference PDF.
2. Prefer editable LaTeX plus its compiled PDF. Work on a copy and leave the source untouched.
3. If only a PDF is available, determine whether it has an extractable text layer or requires OCR, then read [references/pdf-reconstruction.md](references/pdf-reconstruction.md). Do not imply byte-for-byte LaTeX preservation when no source exists; reconstruct the visible structure and report unavoidable uncertainty.
4. If the PDF and LaTeX disagree, use the PDF for visible content and order, and the LaTeX for command structure. Record material discrepancies instead of silently choosing.

## Non-negotiable invariants

- Translate every reader-facing prose segment: title, abstract, headings, paragraphs, list items, captions, table prose, footnotes/endnotes, theorem-like prose, acknowledgements, appendices, and author biographies.
- Retain author names, citation keys, labels, URLs, DOIs, file paths, code, model/dataset identifiers, and bibliography records verbatim by default. Preserve bibliography entries completely; translate publication titles only when the user explicitly requests it, and retain the original title alongside the translation.
- Never translate or rename LaTeX command names, environment names, macro definitions, labels, references, citation keys, counters, graphics paths, or code identifiers.
- Preserve all equations, symbols, operators, indices, delimiters, alignment points, equation numbers, and math environments. Translate reader-facing prose inside `\text{...}`, `\mbox{...}`, or equivalent text-bearing math commands while leaving the surrounding mathematical notation and command topology intact.
- Preserve section hierarchy, command/environment topology, list nesting, theorem structure, figures, tables, captions, footnotes, floats, numbering, cross-references, hyperlinks, spacing directives, and page-size/layout settings. Do not redesign the paper.
- Add only the minimum CJK/font/compiler changes needed to build the Chinese copy. Prefer XeLaTeX or LuaLaTeX for Unicode Chinese. Do not replace the document class or template merely for convenience.
- Do not “improve” scientific content. Preserve uncertainty, modality, negation, comparisons, limitations, and the strength of every claim. Flag a suspected source error in the QA report; do not silently repair it.

“一字不差” means complete semantic and visible-content coverage, not unnatural word-for-word Chinese. Every source segment must have one disposition in the translation ledger: translated, intentionally retained verbatim, or non-reader-facing structure.

## Translation protocol

Read [references/translation-protocol.md](references/translation-protocol.md) before translating. Apply it to all source files, including text in custom macros and included files.

Work in bounded, traceable segments. Assign each segment a stable ID tied to source file and location/page. Maintain a bilingual term glossary before translating repeated technical terms. Keep the same paragraph boundaries unless Chinese grammar requires a local split; never merge away a source segment.

Protect LaTeX first, translate prose second, then restore and inspect the surrounding syntax. Do not use a global regex replacement over raw LaTeX. Treat comments containing author instructions separately from rendered paper content and preserve them unless the user asks to remove them.

## Build and verify

Compile with the original build system where possible. Change the engine or add CJK support minimally, and document those changes. Run bibliography/index/glossary passes as required by the project.

Before declaring completion, satisfy every gate:

1. Translation ledger covers 100% of reader-facing source segments and contains no unresolved or duplicated IDs.
2. Search the deliverable for TODOs, placeholders, untranslated prose, replacement characters, missing-glyph warnings, and accidental machine-generated markers.
3. Run `scripts/check_latex_integrity.py SOURCE.tex TRANSLATED.tex` on each translated main/include pair. Investigate every failure; use `--include-preamble` when the preamble should also be structurally identical.
4. Compile successfully from a clean output directory. No undefined references/citations, missing assets, fatal errors, or missing Chinese glyphs may remain. Review overfull/underfull boxes when they affect visible quality.
5. Render both PDFs and compare every page. Account for every title, heading, paragraph, equation, figure, table, caption, footnote, reference, and appendix. Chinese glyph metrics may change line and page breaks, but content order, hierarchy, numbering, and visual intent must remain.
6. Verify page labels, bookmarks, metadata, selectable Chinese text, links, and embedded fonts when the toolchain exposes them.

If a gate cannot pass, do not label the translation complete. Deliver the best recoverable artifacts with a concise blocker and exact affected locations.


## Isolated outputs and Chinese defaults

Before configuring Chinese fonts, read the Fandol section in [references/formulas-graphics-style-fonts.md](references/formulas-graphics-style-fonts.md). It provides minimal XeLaTeX declarations, an alternative CTEX setup, and font verification steps. Explicitly select Fandol: an unspecified CTEX fontset may choose platform-specific system fonts.

Create a dedicated translation project before the first write. Keep generated TeX, scripts, extracted assets, renders, logs and candidate PDFs inside it; do not scatter them beside the original input. Honor the user's chosen output location. For this user's workflow, prefer a sibling deliverables directory outside the original notes folder. Keep one clearly identified current PDF and source entrypoint, and put earlier candidates in an archive. Move only files whose task ownership has been established; never move a shared tmp/output directory wholesale without inventorying its contents.

When the user requests default LaTeX Chinese fonts, use the portable CTEX Fandol family: FandolSong regular/bold for serif text, FandolHei regular/bold for sans text, FandolKai for emphasis, and FandolFang for monospace. Add XeCJK font declarations to the existing class, or use ctex with scheme=plain,fontset=fandol if it does not change the template. Do not silently substitute Noto or Microsoft YaHei. Preserve Latin and math fonts independently. A Poppler "Missing language pack for Adobe-GB1" error is evidence about that reader's CMap installation, not proof that Fandol makes PDFs unsearchable; cross-check using a second reader with CJK support before changing the document. Avoid variable fonts defaulting to ExtraLight and mappings that erase bold distinctions.

## Visual fidelity, including icons

For PDF-only recognition or style reconstruction, read [references/formulas-graphics-style-fonts.md](references/formulas-graphics-style-fonts.md) before transcribing equations or rebuilding graphics. Use its coordinate inventory, equation ambiguity checks, raster/vector/glyph distinction, style measurements, and render-based acceptance procedure; do not treat extracted text as the complete page.

For PDF-only work, inventory visual elements by page and bounding box before rewriting: diagrams, circuit wires and gates, arrows, icons, logos, colored rules, shaded boxes, title bars, tables, headers and footers. Empty pdfimages output does not mean the document contains no graphics: vector paths and font glyphs may carry them.

Retain original assets or crop original PDF regions as vector PDF where possible. Rebuild simple frames and arrows using native LaTeX/TikZ only after measuring geometry and colors. Translate labels while preserving relationships, positions and symbols; never replace diagrams or concept maps with a prose summary. Record the disposition of every visual region: reused, faithfully reconstructed, translated labels, or unresolved. Do not invent decorative icons absent from the original.

Keep boxed teaching content in its original location and category (overview, local notation, worked example, proof guide, common trap, checkpoint, hints and solutions). Match title bars, color, border width, corner shape, indentation and spacing. Do not append omitted material as a separate "supplement": integrate it at the source location and preserve numbering. Missing editable TeX does not excuse omissions or wholesale restructuring.

Measure category-specific PDF stroke/fill colors and geometry rather than assigning every box one theme. Side-rule notes and closed title-bar boxes are distinct structures; preserve separate adjacent boxes instead of merging a checkpoint answer or interpretation into its preceding box. Infer shared theorem/definition counters from the visible number sequence, and verify the resulting sequence after compilation. For imported vector crops, package the required PDF asset inside the deliverable and use a relative path; do not leave dependencies on the user's original directory. Render crops to ensure that clipping has not removed labels or included adjacent prose. Distinguish invisible figure alternative text from visible paragraphs, retaining it as accessibility metadata or recording its disposition rather than inserting it into the body.

When parallel translation is authorized, give workers disjoint chapter files and one shared macro, counter, terminology, and box contract. Merge only after each chapter has a source-ordered coverage audit; worker completion is not final PDF acceptance. A page-level checklist or count of sections is not a substitute for a completed segment ledger. If index page references cannot be regenerated, identify retained source-page references explicitly and record that fidelity limitation.

Render the original and candidate and inspect corresponding content regions side by side, even when pagination changes. Successful compilation, embedded fonts, a text hash or page count alone cannot establish fidelity. Check overfull boxes for clipped URLs/formulas, exact math accents and conjugation bars, vector assets, and all diagram labels. If image inspection is unavailable, report visual QA as incomplete rather than calling a successful render a visual pass.

## Deliverables

Return a self-contained Chinese source directory and, when compilation is possible:

- the translated main `.tex` and all required included files/assets;
- a compiled Chinese PDF;
- `translation-ledger.tsv` with segment ID, source location/page, source text, Chinese text or retained-verbatim reason, and status;
- `terminology.tsv` with English term, chosen Chinese rendering, and notes;
- `qa-report.md` recording source mode, build command/engine, integrity result, page-by-page visual check, intentional preamble changes, and any residual uncertainty.

Name the primary outputs from the original basename with a `-zh` suffix unless the user specifies another convention.

