willoscar/latex-scaffold
| Scaffold a LaTeX project (`latex/main.tex`, optional bibliography wiring, structure) from an existing Markdown draft.
npx skills add https://github.com/WILLOSCAR/research-units-pipeline-skills --skill latex-scaffold
Convert the approved Markdown draft into a minimal, buildable LaTeX project.
This is a deterministic conversion step; prose quality should already be addressed in output/DRAFT.md.
output/DRAFT.md or output/TUTORIAL.mdcitations/ref.biblatex/main.tex (and any required LaTeX support files)The machine-readable layout contract lives in assets/layout_profiles.json.
The default profile uses a 1in A4 margin, includes a table of contents, and may
split large tables. The bounded course_paper profile uses a documented 0.9in
A4 margin, omits the table of contents, keeps a compact table whole when
possible, and sets only the bibliography in \small. Body text remains 11pt.
This profile is intended to respect an explicit page range, not to manufacture
substantive completeness by shrinking the paper.
latex/ directory if missing.latex/main.tex with sections matching the outline.citations/ref.bib when that file exists.latex/main.tex exists.citations/ref.bib exists, latex/main.tex references it.uv run python .codex/skills/latex-scaffold/scripts/run.py --helpuv run python .codex/skills/latex-scaffold/scripts/run.py --workspace <workspace>--help (inputs/outputs are taken from the unit runner when used via pipeline)latex/main.tex from output/DRAFT.md or output/TUTORIAL.md:uv run python .codex/skills/latex-scaffold/scripts/run.py --workspace <workspace>latex/main.tex includes a table of contents (tocdepth=2) for readability.course_paper profile omits that table of contents according toassets/layout_profiles.json; other profiles include it by default.
article (English-looking front matter). If the draft contains CJK characters, it switches to ctexart so the PDF renders correctly.##/###/#### → \section/\subsection/\subsubsection (strips leading numeric prefixes like 1.2).Appendix / 附录 trigger \appendix once, then render as appendix sections.Table 1. ... / Appendix Table A1. ... immediately before a Markdown table become a LaTeX table float with \caption{...} and a stable \label{tab:...}.## Abstract → abstract environment.[@Key] or [@Key1; @Key2] → \citep{Key} / \citep{Key1,Key2}.bold / *italic* / code → \textbf{} / \emph{} / \texttt{}.latex/main.tex still contains Markdown markersFix:
latex-scaffold and ensure the input output/DRAFT.md is clean (no ##, no **, no [@...] syntax that isn""t handled).Fix:
citations/ref.bib exists and the scaffold points bibliography to it; then compile with latex-compile-qa.Take willoscar/latex-scaffold from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.