Export Latex
Export the current paper draft to production-ready LaTeX (.tex) and PDF using the arxiv-style template. Converts draft.md + references.bib + figures/ into a complete LaTeX project with resolved citations, tables, and figures. Compiles to PDF automatically.
Export LaTeX: $ARGUMENTS
Activate the latex-engine skill. Read skills/latex-engine/SKILL.md in full.
Then execute the full export pipeline:
-
Verify prerequisites: Check that
draft.mdandreferences.bibexist in the working directory. If they don't exist, inform the user they need to run/write-paperfirst. -
Install LaTeX if needed: Check if
pdflatexis available. If not, install:apt-get update && apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-bibtex-extra -
Set up the latex/ directory: Create
latex/with arxiv.sty, references.bib, and figures/. -
Run the converter: Use
scripts/md_to_latex.pyto generatepaper.tex.- If $ARGUMENTS includes author info, pass it through.
- If $ARGUMENTS includes a title override, use it.
-
Compile to PDF: Run pdflatex → bibtex → pdflatex → pdflatex.
-
Validate: Check for undefined citations, missing figures, and remaining TODOs.
-
Report results: Present the final package with file list and any issues found.
Do not ask for confirmation to start — execute immediately.