light-typesetting
Build and preflight submission-ready LaTeX/PDF artifacts for Light stage 11. Use when receiving a paper-writing manuscript, figure delivery, citation delivery.json/references.bib/citekey-audit.json, or a venue/template profile; when selecting pdfLaTeX/XeLaTeX/LuaLaTeX and BibTeX/Biber; when diagnosing LaTeX errors or unresolved references; when checking page limits, double-blind identity, PDF metadata, template, page box, embedded fonts, TODOs, figures, tables, labels and citations; or when producing a reproducible compile manifest, PDF, compliance report, failure bundle and venue-matching handoff. Distinguishes PASS, manuscript ERROR, toolchain UNAVAILABLE and convergence UNRESOLVED without redoing citation authenticity or figure scientific QA.
git clone --depth 1 https://github.com/Light0305/Light-skills /tmp/light-typesetting && cp -r /tmp/light-typesetting/skills/light-typesetting ~/.claude/skills/light-typesettingSKILL.md
# Typesetting · stage 11
Turn approved author artifacts into a reproducible PDF submission bundle. The
job is not merely to make LaTeX compile: preserve provenance, select a coherent
engine/backend, preflight dependencies, compile to convergence, locate the
first root cause, run profile-driven desk-reject checks, and hand exact PDF/page
facts to venue-matching.
Read `typesetting-resource-map.md` before running a real build. Read
`references/build_contract.md` before writing or consuming machine artifacts.
Use `references/latex_errors.md` only after the first source-located error is
known. Use a venue template under `templates/` only when it matches the current
author kit; the bundled copy is a starting point, not current venue truth.
## Non-negotiable boundaries
- Consume citation `delivery.json`, `references.bib` and
`citekey-audit.json`. Require `delivery.status=DELIVERED`, declared
`deliverable_hashes`, empty citation failures and empty claim-review
leftovers. Declared citation deliverables must be relative paths inside the
citation delivery directory, and the build snapshot must preserve the audit,
failure and claim-review sidecars under provenance. Check staged keys and
compilation. Do not re-decide DOI existence, metadata conflicts, retractions
or claim relevance.
- Consume figure files, declared dimensions/DPI and source manifest. Require
the manifest to be `light.figure_delivery.v1` or `light.figure_build.v1` and
require the embedded file hash to match a declared output hash. For empirical
figure deliveries, require confirmed result-analysis evidence binding. Check
presence, embedding, float/layout and compilation. Do not redo visual
honesty, scientific content or publication-size generation.
- Consume the approved paper-writing manuscript. Do not invent claims,
references, experiments or numbers to close a page budget.
- Take page, anonymity, template, font and page-box rules only from user input
or current authoritative instructions with URL/date provenance. Never embed a
universal venue limit.
- Keep tool/resource failure as `UNAVAILABLE`. Never call it manuscript
`ERROR`, never call it `PASS`, and never mark the delivery `DELIVERED`.
- Keep stage-11 critical scope to typesetting. Security/network/tool
unavailability does not enlarge it. `ROUTES` has no key 11; repair failures
inside stage 11 and never invent a back-edge.
## Local LaTeX environment contract
For a real PDF build, detect the local toolchain before claiming success:
- core: Python stdlib plus a LaTeX distribution such as TeX Live, MiKTeX,
MacTeX or TinyTeX;
- compile driver: prefer `latexmk`; use `tectonic` only when its supported
backend matches the manuscript;
- engines: `pdflatex`, `xelatex` and `lualatex` as selected from source/profile
triggers;
- bibliography: `bibtex` for traditional `\bibliography{}` and `biber` for
`biblatex` unless explicitly declared otherwise;
- PDF checks: `pdfinfo` and `pdffonts` when page box, page count or embedded
font facts are required.
If the compiler, engine, backend, package or PDF inspector is missing, mark the
state `UNAVAILABLE`, explain the missing component, and ask the user whether to
install/configure it or switch toolchains. Never silently install system tools,
never call a missing toolchain a manuscript error, and never report a PDF as
delivered unless the build actually produced and checked that PDF.
## Workflow
### 1. Freeze the input contract
Copy `templates/typesetting_input.json`. Record:
- the paper-writing entrypoint plus every required source file;
- each figure source, target relative path, dimensions/DPI and delivery/build
manifest;
- citation `delivery.json` and desired staged BibTeX filename; the delivery
must be regenerated after citation edits so hashes match the referenced
files;
- `light.typesetting_venue_profile.v1`, including source kind, URL if any,
check date and rules.
If a venue rule is unknown, keep it `null`, `0` or absent. Do not infer it from
another venue or last year's template.
### 2. Preflight before compilation
```powershell
python scripts/build_submission.py --spec typesetting-input.json --preflight-only
```
Require a provenance-preserving `source/` snapshot. Check missing inputs,
`\input`/`\include`, graphics, labels/refs, citation-delivery schema/status,
deliverable hashes, delivered citekey audit, empty citation failure/review
handoffs, live staged citekeys, figure manifest output hashes, empirical
figure evidence binding, document class, required packages and local package
availability. Use a new/empty output directory per iteration; the builder
refuses stale run directories.
Classify:
| Evidence | State |
|---|---|
| missing manuscript/figure/BibTeX/key/label, stale upstream hash, open citation review, unconfirmed empirical-figure evidence or backend conflict | `ERROR` |
| required engine/backend/package/tool absent or cannot execute | `UNAVAILABLE` |
| no blocker | `PASS` |
### 3. Select engine and bibliography backend
Detect XeLaTeX for `fontspec`, `xeCJK`, `ctex`, `unicode-math` or
`polyglossia`; LuaLaTeX for Lua triggers; otherwise pdfLaTeX. Detect
traditional `\bibliography` as BibTeX and `biblatex` as Biber unless its
`backend=` option says otherwise.
If the profile engine conflicts with a hard XeLaTeX/LuaLaTeX source trigger,
or its backend differs from the source, stop with a root-cause `ERROR`; do not
mix BibTeX and Biber. A profile may deliberately select XeLaTeX for otherwise
pdfLaTeX-compatible source. Record the absolute executable path, version probe,
working directory, command array and shell rendering.
### 4. Compile and classify convergence
```powershell
python scripts/build_submission.py --spec typesetting-input.json
```
Prefer local `latexmk`; use Tectonic only when its supported backend matches.
Compile from the snapshot's manuscript directory so relative inputs resolve.
Save `latexmk` rule/run records, log/PDF SHA-256 and page coun后端代码编写、逻辑强、安全性高、可读性好、版本控制、代码审查。当任务需要写实验代码、模型代码、数据处理代码、可视化代码、后端接口或系统逻辑时使用。要求逻辑清晰、安全、可读、可维护、便于复现/扩展/部署。支持 Git 版本管理、代码审查、注释规范、README、依赖管理、环境配置、运行说明与项目结构整理。
Verify scholarly references and claim-citation support for Light stage 10. Use when auditing a manuscript, claim map, bibliography, DOI/arXiv/PMID/ISBN/URL, BibTeX/CSL, citekeys, chimeric or fabricated citations, retraction/correction alerts, or preparing a canonical citation registry for typesetting. Builds provenance-preserving inventories, confirms metadata with independent authoritative sources, distinguishes CONFIRMED/CONFIRMED-MISSING/UNAVAILABLE/UNRESOLVED, records Crossref update direction, and emits the citation gate plus delivery artifacts.
竞赛与项目申报材料辅助。当用户做统计建模、数学建模、互联网+、挑战杯、大创、创新创业、科研训练等项目时使用。辅助写申报书、项目计划书、商业计划书、路演 PPT、答辩稿、项目摘要、技术路线、创新点、可行性分析、市场分析、研究基础、预期成果、经费预算、团队分工。用于非论文投稿场景,可与论文/软著/专利/PPT 联动。
>-
>-
从顶会大牛角度进行专业绘图与组图。当用户需要把规划好的图实际画出来时使用。按情况用 Python(matplotlib/seaborn/plotly/altair)、R(ggplot2)、MATLAB、Visio、Origin、LaTeX/TikZ、Illustrator、PowerPoint 等。审美统一、专业清晰、配色合理、字体规范、线条清楚、高分辨率,适合直接投稿。不仅画图,还从论文表达角度判断怎么排、怎么组、怎么标注、怎么突出重点。
根据论文内容规划应该做哪些图、哪些表、插在哪里、各起什么作用。当用户需要论文图表规划时使用。图表不限于统计图,也包括数据集真实效果图、模型输出示例、案例展示、可解释性可视化等。规划框架图、技术路线图、数据集示意图、模型结构图、算法流程图、结果对比/消融/敏感性图、真实效果图、统计表/对比表等,以审稿人标准判断哪些必做、哪些冗余。
>-