One Prompt, One Complete IEEE Transactions Project with Claude Code

Set up a main manuscript, supplementary materials, a shared author file, and a full revision workflow — using nothing but Claude Code and the tools already inside a TeX distribution.

Writing a paper for an IEEE Transactions journal involves a surprising amount of non-science plumbing: the IEEEtran document class with its journal-mode quirks, a supplementary-materials document whose sections and equations must be S-numbered so the main paper can cite “Fig. S1” unambiguously, author metadata that has to stay consistent across every document, and — the part everyone improvises at the worst possible time — a revision workflow that produces the three artifacts reviewers expect: a marked-up manuscript, a latexdiff PDF, and a point-by-point response letter.

All of this is mechanical, which makes it a perfect job for Claude Code. The whole project can be described in one prompt — a handful of plain-English paragraphs you paste into a single Claude Code session in an empty directory. Claude does the rest with its built-in tools (Write, Edit, Bash, Read — no plugins, no MCP servers) plus command-line tools that ship with any TeX distribution. When I ran it, Claude not only wrote the files but compiled them, hit a real latexdiff pitfall, and fixed it — more on that at the end.

Prerequisites

The whole setup depends on exactly two things: a TeX distribution and make (preinstalled on macOS/Linux). If you don’t have TeX, TinyTeX is the smallest sane option and includes everything used here — pdflatex, latexmk, bibtex, latexdiff, and IEEEtran.cls. The prompt below opens by having Claude check for those tools and install anything missing, so a bare machine is fine.

The prompt

Paste everything in this block, as one message, into a fresh Claude Code session running in an empty directory. It reads as a single multi-paragraph instruction and Claude works through it top to bottom.

First, check whether `pdflatex`, `latexmk`, `latexdiff`, and `IEEEtran.cls` are available on this machine (use `kpsewhich` for the class file). If anything is missing, install TinyTeX with its standalone shell installer and add any missing LaTeX packages with `tlmgr`, installing nothing beyond what those four requirements need. Then set up an IEEE Transactions LaTeX project in this directory.

Next, create `main.tex` as a thin skeleton using `\documentclass[journal]{IEEEtran}` with the standard package set (cite, amsmath, graphicx with a `figures/` graphics path, booktabs, hyperref with hidelinks): preamble, title/author/header, `\maketitle`, abstract, and IEEEkeywords, then it `\input`s one file per section from a `sections/` directory — `sections/01_introduction.tex`, `02_method.tex` (one numbered equation and one citation), `03_results.tex`, `04_conclusion.tex` — followed by the acknowledgments, an IEEEtran-style bibliography backed by `bib/refs.bib` (one example entry), and the biographies. Keep everything compiling from the root with `latexmk` (no `-outdir`; PDFs and aux stay at the root). Put shared preamble files under `preamble/`: critically, do NOT put the title or author information in `main.tex` — create `preamble/authors.tex` that defines commands `\PaperTitle`, `\PaperAuthors` (the full `\author{...}` block with `\IEEEmembership` and `\thanks` affiliations), and `\PaperHeader` (the `\markboth` running header), and have `main.tex` simply `\input{preamble/authors}` and use those commands. That file will be the single source of truth for author info across every document in the project. In `preamble/authors.tex`, give each author a clickable ORCID iD via `\orcidlink{0000-0000-0000-0000}` (install the `orcidlink` package with `tlmgr` if `kpsewhich orcidlink.sty` finds nothing, and `\usepackage{orcidlink}` at the top of the file, since it is input in the preamble), add a funding sentence ("This work was supported in part by XXX under Grant XXXXX.") and a corresponding-author tag to the manuscript-received `\thanks`, and in the `main.tex` preamble set the PDF Info dictionary with `\hypersetup{pdftitle={\PaperTitle}, pdfauthor={...}, pdfkeywords={...}}` so the title, authors, and keywords match the manuscript. Keep tables as one `\input` file per table under `tables/` — e.g. `tables/tab_example.tex`, a small booktabs comparison wrapped in a `table` environment with the caption ABOVE (IEEE style) and a `\label`, `\input` from `sections/03_results.tex` and referenced with `Table~\ref{...}`. Also create `sections/biographies.tex` — one short `IEEEbiographynophoto` block per author, with a commented `IEEEbiography` variant showing the with-photo form (a 1in×1.25in headshot loaded from a `figures/authors/` directory) — and `\input{sections/biographies}` in `main.tex` after the bibliography (main paper only, not the supplementary). Add a `.gitignore` for LaTeX build artifacts, then verify the project compiles with `latexmk -pdf main.tex` and show me any warnings that matter.

Then add a supplementary materials document, `supplementary.tex`. It must reuse `preamble/authors.tex` (title it "Supplementary Material for" followed by the paper title via `\PaperTitle`) and share the same `bib/refs.bib` and `figures/` directory as the main paper; keep its two sections inline but add a comment noting they can `\input` from `sections/` the same way the main paper does. Use the same IEEEtran journal class and package set, but renumber everything with an S prefix by redefining `\thesection` as S-Roman, `\thefigure` and `\theequation` as S-arabic, and `\thetable` as S-Roman, so the document produces Section S-I, Fig. S1, Eq. (S1), and Table S-I. Include placeholder sections for additional derivations and additional experiments, with one S-numbered example equation and one citation — and give the document its own `\bibliographystyle{IEEEtran}` and `\bibliography{bib/refs}` commands — to prove the shared bibliography works. Verify it compiles and that the rendered numbering actually shows the S prefixes.

Next, add revision-process tooling. Create `preamble/revision.tex`, included by both documents, defining four commands: `\rev{...}` for revised text, `\del{...}` for deleted text, `\todo{...}` for margin/inline notes, and `\resp{tag}{...}` which typesets revised text and puts the reviewer-comment tag (like R1.2) in the margin so the response letter can point at it. All four must obey a single switch: in the default "marked" mode, revisions are blue, deletions are red strikeout (ulem with normalem), and todos are orange; in "clean" mode every mark disappears — revisions render as plain text, deletions and todos as nothing — and the switch must be flippable from the command line via `latexmk -usepretex="\def\CleanCopy{1}"` without editing any file. Put the three editor/production letters under `letters/`. Create `letters/response.tex`, a standalone article-class point-by-point response letter with a `\reviewer{N}` sectioning command, auto-numbered comment/answer environments (Comment 1.1, 1.2, ...), and a `\quotepaper{...}` command for quoting revised manuscript text in blue. Add two more standalone article-class letters in the same simple-macro style: `letters/cover_letter.tex`, a short submission cover letter to the Editor-in-Chief stating the contributions and the standard declarations (original work, not under review elsewhere, no conflicts, all authors approved); and `letters/proof_response.tex`, a galley-proof reply that answers the production editor's author queries (AQ1, AQ2, ...) with the corrected text and a page-plus-line reference into the proof, followed by a section for author-spotted typesetting corrections. Then create a `Makefile` with targets: `all`/`main`/`supp`/`response` (latexmk builds `letters/response.tex`, whose PDF lands at the root under the plain jobname), `cleancopy` (the camera-ready main paper under a different jobname), a `letters` target building `letters/cover_letter.tex` and `letters/proof_response.tex` (kept out of `all`), `snapshot` and `diff` for the revision loop, and `clean`/`distclean`. Make `snapshot` produce a self-contained, zippable per-round bundle: parameterize it as `make snapshot ROUND=r1` (default directory `submitted/` when `ROUND` is unset, else `submitted_$(ROUND)/`, e.g. `camera_ready`), copy `main.tex`, `supplementary.tex`, the compiled `main.bbl`, and the whole source tree (`preamble/ sections/ tables/ figures/ bib/`, structure preserved via `cp -R`) into it, and `zip -r` it — the `main.bbl` must be included because submission systems compile your source but never run BibTeX. Have `diff` run `latexdiff --flatten` between the plain `submitted/` snapshot and the current `main.tex` and compile the result; because the snapshot preserves the subfolder tree, `--flatten` resolves each side's `\input` relative to that file's own directory, so verify empirically that an edit made inside `sections/` shows up as a change in `diff.pdf` (add and delete a sentence in `sections/04_conclusion.tex`, confirm `\DIFadd`/`\DIFdel`, then restore). Demonstrate the whole loop end to end: build everything, take a snapshot, make a small marked edit, and produce `diff.pdf`.

Finally, do a full verification pass. Run every Makefile target from a clean state and confirm all PDFs build without errors. Then read the generated PDFs and visually confirm: the main paper shows the author block, running header, blue revised text, red struck-through deletions, and the margin reviewer tag; the supplementary shows S-I/S-II section numbers and an (S1) equation; `diff.pdf` highlights the test edit; and `main-clean.pdf` contains no colored markup at all. Also confirm the author biographies and ORCID icons render, check the embedded PDF metadata with `pdfinfo main.pdf` (title, author, and keywords should match the manuscript), and eyeball the last page for two-column balance — if the final columns are lopsided, note that the `flushend` package or an `\IEEEtriggeratref{n}` before the bibliography will even them out. Fix anything that's off and summarize the final file tree and the make targets I'll use day to day.
TeX

What each paragraph buys you

The author-file paragraph is the quiet hero. Title, author list, memberships, affiliations, and the running header get defined once as commands, and every document — main paper today, supplementary next — just \inputs the file. When a co-author changes affiliation during the (long) review cycle, you edit one file and every PDF stays consistent. The same paragraph folds in the small things that only bite you at the end: ORCID icons and a funding line in the author block, embedded PDF metadata that matches the manuscript, and — easy to forget until a proof reminds you — the author biographies, which are required on IEEE Transactions final pages (the template ships an IEEEbiographynophoto fallback so it compiles before you have headshots).

The layout — entry points (main.tex, supplementary.tex) at the root, the body split one file per section under sections/, shared preamble under preamble/, and one \input file per table under tables/ — is what makes the whole thing survive a real review cycle. latexmk still runs from the root and PDFs land where you expect, but now co-authors can edit different sections in parallel without merge conflicts, tables and figures are reusable drop-ins, and — the payoff at revision time — latexdiff produces clean per-section diffs instead of one giant blob, because the change actually lives in a small file.

The supplementary paragraph’s S-prefix renumbering is four \renewcommand lines, but getting the Roman-vs-arabic conventions right (IEEE style: sections and tables Roman, figures and equations arabic) is exactly the trivia you’d otherwise spend twenty minutes cross-checking against a published supplement.

The revision-tooling paragraph is the densest, because it encodes an actual workflow, not just files. When revision time comes, the loop is: make snapshot the day you submit; edit freely, wrapping reviewer-driven changes in \resp{R2.3}{...}; then make main (marked-up PDF), make diff (latexdiff PDF), make response (the letter) — the three attachments almost every IEEE revision asks for. And when the paper is accepted, make cleancopy produces the camera-ready PDF with every mark stripped, without touching the sources. Two details in this paragraph are pure scar tissue from real submissions. First, snapshot bundles the compiled main.bbl into the zip on purpose: submission systems compile your uploaded source but never run BibTeX, so a snapshot without the .bbl uploads a paper with no references. Second, the process doesn’t end at acceptance — there’s a galley-proof stage where a production editor sends author queries, which is why the template carries a cover_letter.tex for submission and a proof_response.tex (with page-and-line references) for the proofs, both behind a letters target that stays out of the everyday all build.

The verification paragraph is the one not to skip. “It compiles” and “it renders correctly” are different claims, and Claude Code can check the second directly: the Read tool renders PDFs, so Claude actually looks at the output pages the way a human would — which is how it confirmed the margin tags and strikeouts were really there rather than trusting a zero exit code.

What you end up with

.
├── main.tex              # manuscript skeleton — inputs preamble/ + one file per section
├── supplementary.tex     # S-numbered, shares preamble/bib/figures
├── preamble/
│   ├── authors.tex       # single source of truth: \PaperTitle, \PaperAuthors, \PaperHeader, ORCID
│   └── revision.tex      # \rev \del \todo \resp + marked/clean switch
├── sections/
│   ├── 01_introduction.tex
│   ├── 02_method.tex     # numbered equation + citation
│   ├── 03_results.tex    # inputs tables/tab_example, references the table
│   ├── 04_conclusion.tex
│   └── biographies.tex   # per-author bios (IEEEbiographynophoto + photo variant)
├── tables/
│   └── tab_example.tex   # one \input file per table (caption above, booktabs)
├── figures/
│   └── authors/          # author headshots (1in×1.25in JPEGs)
├── bib/
│   └── refs.bib          # one shared bibliography (\bibliography{bib/refs})
├── letters/
│   ├── response.tex      # point-by-point reviewer response letter
│   ├── cover_letter.tex  # submission cover letter to the Editor-in-Chief
│   └── proof_response.tex # galley-proof author-query reply (AQ1, AQ2, …)
├── Makefile              # all · supp · response · letters · cleancopy · snapshot · diff · clean
└── .gitignore
Plaintext

Day to day: make builds everything; make snapshot (or make snapshot ROUND=r1) before you submit; make diff and make response when the reviews land; make cleancopy when the acceptance email does; make letters for the cover letter at submission and the proof reply at the galley stage.

Notes from the actual run

The prompt is replication-tested. Everything above isn’t a transcript of one lucky session: after the template was built and refined, the exact prompt block was pasted into a fresh session pointed at an empty directory, and it independently reproduced the whole project — same tree, all seven PDFs, working snapshot/diff/clean-copy loop — with zero new dependencies. Two small wobbles appeared along the way (a clean-mode macro bug and a missing supplementary \bibliography), and the prompt’s own final verification paragraph caught and fixed both within the same run. That last paragraph is the safety net; keep it.

The one real bug was in the diff pipeline, and it’s worth knowing about. latexdiff --flatten inlines not only \input files but also the compiled bibliography (main.bbl). If the submitted/ snapshot doesn’t include the old .bbl, latexdiff treats the entire bibliography as newly added and wraps its internal \csname url@samestyle\endcsname preamble in markup, which dies with Missing \endcsname inserted. The fix — which Claude found from the log and applied on its own — is to make the snapshot target depend on a fresh build and freeze main.bbl alongside the sources. If your diff ever fails around line “\csname \DIFadd{...“, this is why.

Where the extras came from. The ORCID/funding/metadata touches, the required biographies, the main.bbl-in-the-zip rule, the per-round snapshots, and the cover-letter/proof-response pair were mined from the project folder of a real published Transactions paper that ran the full gauntlet — submission, major revision, camera-ready, and galley proofs. A few field-tested habits from that folder we deliberately left out of the template to keep it minimal: standalone-TikZ figures compiled to their own PDFs (great for big papers, overkill for a starter); cleveref with IEEE-style \crefname settings alongside a house-style checklist; and keeping the iThenticate similarity report and the IEEE electronic copyright receipt in the project folder so the paper trail lives with the sources. Pull any of these in when a specific paper needs them.

On model choice: none of this needs heavyweight reasoning — it’s well-trodden LaTeX. A mid-tier model (Sonnet) handles most of the prompt comfortably, including the scaffolding and the verification pass. The revision tooling and any build debugging benefit from a stronger model, mostly for the log-forensics moment above. If you’re picking one model, pick the stronger one and let the whole prompt run in a single session so each step sees the files the previous one created.

On dependencies: the finished project is deliberately boring. No latexmk wrapper scripts, no Python, no npm, no LaTeX packages outside a base TeX Live/TinyTeX install. Everything Claude used is either an official Claude Code tool or a binary that ships inside the TeX distribution — which means the project builds identically on a colleague’s machine, in CI, or three years from now during the inevitable major revision.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

🧭