Skip to content
Content
Command

/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.

From plugin
open-academic-paper-machine
1821 skills4 agents21 commands
Install
> /plugin marketplace add TobiasBlask/open-paper-machine
> /plugin install open-academic-paper-machine@open-paper-machine

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/export-latex

Context preview

What this command does when you run it.

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.

Command definition

export-latex.md
description: >
  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:

1. **Verify prerequisites**: Check that `draft.md` and `references.bib` exist in the working directory. If they don't exist, inform the user they need to run `/write-paper` first.

2. **Install LaTeX if needed**: Check if `pdflatex` is available. If not, install:

   apt-get update && apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-bibtex-extra

3. **Set up the latex/ directory**: Create `latex/` with arxiv.sty, references.bib, and figures/.

4. **Run the converter**: Use `scripts/md_to_latex.py` to generate `paper.tex`.

  • If $ARGUMENTS includes author info, pass it through.
  • If $ARGUMENTS includes a title override, use it.

5. **Compile to PDF**: Run pdflatex → bibtex → pdflatex → pdflatex.

6. **Validate**: Check for undefined citations, missing figures, and remaining TODOs.

7. **Report results**: Present the final package with file list and any issues found.

Do not ask for confirmation to start — execute immediately.

Read more
Ships withopen-academic-paper-machine

A Claude Code plugin that autonomously writes academic papers — from literature search to production-ready LaTeX/PDF. Scope note.

Get the whole plugin

Other commands on open-academic-paper-machine.