Module 5 Β· Intermediate Β· ~45 min
βοΈ Writing, Papers & LaTeX
Use Claude Code to draft paper sections, fix LaTeX, manage references, respond to reviewers, and write better academic prose.
In this module
Writing with full project context
Because Claude Code has access to all your files, it can write with genuine knowledge of your research β not just generic academic prose. This is the key difference from using Claude.ai on the web.
Put your draft in the project folder
Save your paper as a .tex or .md file in your project folder. Then Claude can read your existing
draft, your results tables, and your data summary all at once when writing new sections.
Drafting paper sections
> Read my summary statistics table (output/tables/balance_table.tex)
and my regression results (output/tables/main_results.tex).
Draft a "Data and Empirical Strategy" section for my paper.
The audience is economists at top journals.
Use the variable names from CLAUDE.md to describe the data.
Do not make up numbers β only use what's in the tables.
Length: ~800 words. Style: similar to applied micro papers (AER, QJE).
Improving existing writing
> Read the introduction in paper/draft.tex (lines 1-120).
Rewrite it to be:
- More direct (cut the first 3 sentences β they're too vague)
- Clearer about the contribution vs. existing literature
- Ending with a clear roadmap paragraph
Keep my voice and don't add any claims I didn't make.
LaTeX workflows
What is LaTeX?
LaTeX (pronounced "lah-tech") is a document preparation system used in academia, especially
in economics and mathematics. Instead of clicking formatting buttons like in Word, you write
plain text with commands like \textbf{bold} or \begin{table}. It produces beautiful PDFs
and handles equations, references, and numbering automatically.
Fixing LaTeX errors
> My LaTeX file (paper/draft.tex) won't compile. Here's the error:
"! Undefined control sequence. \hdashline"
Find the error and fix it. Then compile the file and tell me
if there are any other errors.
Converting Word tables to LaTeX
> Convert this table from my Word document to LaTeX tabular format.
Use the booktabs package (toprule, midrule, bottomrule).
Add a caption "Summary Statistics" and label "tab:summary".
[paste your table here]
Managing references
> I have a .bib file (references.bib). I used @Duflo2008 in my text
but it's not in my bib file. Add the correct citation for:
Duflo, Esther and Pande, Rohini (2007). "Dams." Quarterly Journal
of Economics 122(2): 601-646.
Then check if any \cite{} commands in draft.tex are missing from
references.bib and list them.
Converting outputs to LaTeX
> Take the estout table in output/tables/main_results.tex and:
1. Add a table note explaining the standard errors
2. Add \label{tab:main} and a caption
3. Wrap it in a \begin{table}[htbp] environment
4. Make sure it compiles without errors in my paper
> Take my modelsummary output and reformat it:
1. Add stars in the LaTeX note: "* p < 0.1, ** p < 0.05, *** p < 0.01"
2. Make the table fit in a single column (\small font)
3. Add a label and caption matching my paper's table numbering
Responding to referees
Referee responses are time-consuming. Claude Code can help draft structured, professional responses while you focus on the substance.
> I received three referee comments (referee_comments.txt).
Read them, then read my paper (paper/draft.tex) and my results.
Draft a referee response letter that:
- Acknowledges each comment respectfully
- Explains what changes I made (refer to specific sections)
- Provides brief justification for comments I did NOT address
Be polite but direct. Length: ~2 pages.
DO NOT make up any new analysis β only refer to what's in my files.
Literature summaries
> I have 8 paper PDFs in papers/to-read/ that are related to my research.
For each one, write a 3-sentence summary covering:
(1) the research question, (2) the key finding, (3) how it relates to my paper.
Save the summaries to notes/literature_notes.md
A note on academic integrity
Using AI writing ethically in research
- Always disclose AI assistance per your journal's or institution's policy
- Never submit AI-generated text as purely your own without disclosure
- Claude should help you write β not write for you
- Review every sentence Claude produces β you are responsible for accuracy
- Never let Claude generate citations β always verify them independently
- See Module 13 (Mastery & Ethics) for a full discussion of responsible AI use in research
Module 5 Exercise: From results to prose
Take any regression you've run recently (from Module 4 or your own work) and:
- Make sure the output is in a LaTeX table in your project folder
- Ask Claude to write a 300-word "Results" paragraph describing the main findings
- Ask Claude to find and fix any LaTeX formatting issues in the table
- Ask Claude: "What are the three most important limitations of this analysis that I should discuss in the paper?"
LaTeXAny stats tool~30 min