latex-scaffold
21
总安装量
17
周安装量
#17652
全站排名
安装命令
npx skills add https://github.com/willoscar/research-units-pipeline-skills --skill latex-scaffold
Agent 安装分布
claude-code
13
gemini-cli
12
codex
11
opencode
10
cursor
10
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.
Inputs
output/DRAFT.md(or another approved draft)citations/ref.bib
Outputs
latex/main.tex(and any required LaTeX support files)
Workflow
- Create
latex/directory if missing. - Create
latex/main.texwith sections matching the outline. - Wire bibliography to
citations/ref.bib.
Quality checklist
-
latex/main.texexists and referencescitations/ref.bib.
Script
Quick Start
python .codex/skills/latex-scaffold/scripts/run.py --helppython .codex/skills/latex-scaffold/scripts/run.py --workspace <workspace_dir>
All Options
- See
--help(inputs/outputs are taken from the unit runner when used via pipeline)
Examples
- Build
latex/main.texfromoutput/DRAFT.md:python .codex/skills/latex-scaffold/scripts/run.py --workspace <ws>
Notes
- The generated
latex/main.texincludes a table of contents (tocdepth=2) for readability. - Language default: the scaffold uses
article(English-looking front matter). If the draft contains CJK characters, it switches toctexartso the PDF renders correctly. - Conversion rules (high level):
- Headings
##/###/####â\section/\subsection/\subsubsection(strips leading numeric prefixes like1.2). - Headings starting with
Appendix/éå½trigger\appendixonce, then render as appendix sections. - Bold caption lines like
**Table 1. ...**/**Appendix Table A1. ...**immediately before a Markdown table become a LaTeXtablefloat with\caption{...}and a stable\label{tab:...}. ## Abstractâabstractenvironment.[@Key]or[@Key1; @Key2]â\citep{Key}/\citep{Key1,Key2}.- Inline markdown
**bold**/*italic*/`code`â\textbf{}/\emph{}/\texttt{}.
- Headings
Troubleshooting
Issue: the generated latex/main.tex still contains Markdown markers
Fix:
- Re-run
latex-scaffoldand ensure the inputoutput/DRAFT.mdis clean (no##, no**, no[@...]syntax that isn””t handled).
Issue: citations are missing in LaTeX
Fix:
- Ensure
citations/ref.bibexists and the scaffold points bibliography to it; then compile withlatex-compile-qa.