Language: English | 中文
Read mode: Quick Overview | Full Guide
A Codex skill for advanced LaTeX presentation design. It helps users choose a visual direction first, then generates reusable package stacks, preamble definitions, body examples, and compilation notes for papers, reports, course notes, Chinese documents, code handouts, and other long-form writing.
This skill is not a full .tex project repair tool. It is a typesetting advisor and snippet generator.
| Need | What the skill provides |
|---|---|
| Better visual style | Concrete design options such as academic calm, modern technical report, teaching notes, code showcase, and Chinese formal report. |
| Reusable LaTeX snippets | Packages, preamble code, minimal body usage, and notes for common conflicts. |
| Academic readability | Safer layouts for theorem boxes, tables, figures, headings, references, code blocks, and page styles. |
| Chinese documents | ctex, XeLaTeX/LuaLaTeX, Chinese headings, Chinese reference names, and CJK typography notes. |
| Source awareness | Local source categories and public CTAN/GitHub reference links in references/source-map.md. |
git clone https://github.com/<your-name>/latex-typesetting-advisor.git "$HOME/.codex/skills/latex-typesetting-advisor"Windows PowerShell:
git clone https://github.com/<your-name>/latex-typesetting-advisor.git "$env:USERPROFILE/.codex/skills/latex-typesetting-advisor"Replace <your-name> with the actual GitHub user or organization.
Use $latex-typesetting-advisor to improve the visual presentation of my LaTeX document.
Chinese prompt:
使用 $latex-typesetting-advisor,帮我的中文课程论文设计更高级但适合学术场景的排版方案。
- Chinese documents default to XeLaTeX.
- Code listings default to
listingswhen shell escape is unavailable or unsafe. mintedis treated as an advanced option because it usually needs-shell-escapeplus helper tools.- Links in
references/source-map.mdare source pointers, not automatic download steps.
- Status: early public-ready source release.
- Primary host: Codex skills.
- Main explanation language inside the skill: Chinese, with LaTeX package names and commands preserved in English.
- Other agent hosts may still use the Markdown references, but compatibility is not guaranteed.
The skill supports a decision-first workflow:
- Understand the document type and constraints.
- Offer 2-4 concrete visual directions when the user has not chosen one.
- Generate a small, composable LaTeX pattern rather than a heavy full template.
- Explain dependencies, compiler requirements, conflicts, and safer alternatives.
- Preserve strict journal or university class requirements when they exist.
Typical output from the skill follows this order:
- Design choice: selected visual style and fit.
- Dependencies: package and compiler requirements.
- Preamble code: complete reusable definitions.
- Usage code: minimal realistic body example.
- Notes: conflicts, alternatives, and strict-template adjustments.
| Area | Reference file |
|---|---|
| Visual style choices | references/visual-choice-menu.md |
| Recipe routing | references/recipe-index.md |
| Boxes, callouts, theorem environments | references/boxes-highlights-theorems.md |
| Tables, figures, floats | references/tables-figures-floats.md |
| Headings, TOC, page style | references/headings-toc-page-style.md |
| Math numbering and cross-references | references/math-references-numbering.md |
| Code listings | references/code-listings.md |
| Chinese typography | references/chinese-typesetting.md |
| Source map | references/source-map.md |
Academic paper:
Use $latex-typesetting-advisor to make my paper more polished, but still conservative enough for an academic submission.
Expected response shape:
- Offer restrained styles such as Academic Calm or Chinese Formal Report.
- Prefer
booktabs,hyperref,cleveref, and localtcolorboxenvironments. - Avoid decorative page-wide effects unless the document is not bound by a strict class.
Teaching notes:
Use $latex-typesetting-advisor to design theorem, definition, note, and warning boxes for lecture notes.
Expected response shape:
- Select a teaching-note style.
- Use
tcolorboxwithskinsandbreakable. - Provide theorem-like boxes and short body examples.
- Mention that journal classes may prefer simpler
amsthmformatting.
Code-heavy document:
Use $latex-typesetting-advisor. I need Python code blocks in a paper, but Overleaf shell escape is disabled.
Expected response shape:
- Choose
listings, notminted. - Provide
xcolorandlistingsconfiguration. - Mention wrapping, line numbers, and no shell escape requirement.
Chinese report:
使用 $latex-typesetting-advisor,为中文实验报告设计章节标题、提示框、表格和公式引用格式。
Expected response shape:
- Assume
ctexartorctexrepand XeLaTeX unless the user says otherwise. - Provide Chinese labels for theorem/callout/reference names.
- Keep typography formal and print-friendly.
The repository should live directly under a Codex skills directory:
~/.codex/skills/latex-typesetting-advisor/
Expected structure:
latex-typesetting-advisor/
SKILL.md
agents/
openai.yaml
references/
examples/
docs/
.github/
README.md
README.zh-CN.md
LICENSE
SECURITY.md
CONTRIBUTING.md
CHANGELOG.md
After installation, invoke it by name:
Use $latex-typesetting-advisor ...
references/source-map.md is an attribution and verification index. The skill should not browse those links during ordinary use.
Open source links only when:
- the user asks for sources, citations, or latest package behavior,
- a package option or compilation requirement may have changed,
- the user is preparing a public template or release and wants traceable references.
If network access is unavailable, the skill continues from bundled references and states that source links are static pointers.
This repository contains Markdown, YAML, license text, and configuration text only. It does not include executable scripts, binaries, installers, runtime services, or automatic LaTeX compilation.
Important LaTeX safety notes:
- Do not enable
-shell-escapefor untrusted.texprojects. - Use
mintedonly for trusted documents and trusted code snippets. - Prefer
listingsin restricted, shared, journal, classroom, or unknown environments. - Review generated snippets before copying them into production thesis, paper, or template projects.
See SECURITY.md for reporting guidance.
The repository includes:
README.mdandREADME.zh-CN.mdfor bilingual documentation.LICENSEfor open-source reuse.CONTRIBUTING.mdfor contribution rules.SECURITY.mdfor private security reporting guidance..gitignoreand.gitattributesfor clean publishing..github/ISSUE_TEMPLATE/for bug, feature, and documentation issues..github/PULL_REQUEST_TEMPLATE.mdfor contribution review..github/CODEOWNERSfor maintainer review ownership.docs/release-checklist.mdanddocs/publish-to-github.mdfor release operations.
Run from the repository root:
python "<skill-creator>/scripts/quick_validate.py" .
git diff --check
git status --short
git ls-filesExpected:
quick_validate.pyreportsSkill is valid!.git diff --checkproduces no output.git status --shortis empty before tagging or publishing.git ls-filescontains only intended source files.
Use docs/publish-to-github.md for the complete upload flow.
Short version:
git remote add origin https://github.com/<your-name>/latex-typesetting-advisor.git
git push -u origin main
git tag v0.1.0
git push origin v0.1.0After publishing, configure secret scanning, push protection, main branch protection, repository topics, and release notes as described in docs/github-settings.md.
MIT License. See LICENSE.