Writes and edits scientific and academic papers in LaTeX following rigorous research methodology. Use when the user asks to write, edit, expand, structure, or review any academic paper, research paper, technical report, or LaTeX document. Triggers on mentions of papers, LaTeX, .tex files, abstracts, literature reviews, methodology sections, theorems, proofs, citations, or BibTeX. Covers the full research lifecycle from problem formulation through publication-ready output.
Approach every paper as a PhD-level researcher would:
When asked to write or substantially expand a paper, follow this process:
Phase 1: Problem Formulation
- What is the precise research question?
- Why does it matter? (motivation)
- What would a solution look like? (success criteria)
- What are the boundaries? (scope)
Phase 2: Literature & Prior Art
- What existing work addresses this or related problems?
- What are the gaps in existing approaches?
- How does this work position itself relative to the field?
Phase 3: Methodology & Framework
- What analytical/computational approach will be used?
- Why is this approach appropriate? (justify the choice)
- Define notation, assumptions, and formal setup
Phase 4: Development
- Build the mathematical or analytical framework
- Derive results step by step
- Verify internal consistency
Phase 5: Analysis & Discussion
- What do the results mean?
- What are the limitations?
- What are the practical implications?
Phase 6: Writing & Polish
- Structure for the reader, not the author
- Ensure logical flow between sections
- Verify all cross-references, citations, notation consistency
For detailed guidance on each phase, see references/scientific-method.md.
Always use these baseline packages unless there is a specific reason not to:
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{amsmath,amssymb,amsthm} % Mathematics
\usepackage{hyperref} % Clickable references
\usepackage{cleveref} % Smart cross-refs (\cref)
\usepackage{booktabs} % Professional tables
\usepackage{graphicx} % Figures
\usepackage[backend=biber,style=numeric-comp]{biblatex} % Citations
\operatorname{} or define with \DeclareMathOperator for multi-letter operators (e.g., \operatorname{argmax}, not argmax in math mode)align for multi-line, equation for single-line. Never use eqnarray.\coloneqq (:=) when defining a quantity, = for equalityDefine and use proper theorem environments:
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
Use booktabs rules (\toprule, \midrule, \bottomrule). Never use vertical lines. Example:
\begin{table}[htbp]
\centering
\caption{Description before the table.}
\label{tab:example}
\begin{tabular}{lrr}
\toprule
Item & Value & Unit \\
\midrule
Precision & 94.3 & \% \\
Samples & 1{,}000 & -- \\
\bottomrule
\end{tabular}
\end{table}
For complete LaTeX reference, see references/latex-reference.md.
For detailed style guidelines, see references/writing-style.md.
When asked to work on an existing .tex file:
Before considering a paper section complete:
- [ ] Every claim is substantiated (derivation, citation, or evidence)
- [ ] All notation is defined and used consistently
- [ ] All equations are numbered and referenced in the text
- [ ] Cross-references (\ref, \cref) are correct
- [ ] No undefined terms or unexplained abbreviations
- [ ] Assumptions are explicitly stated
- [ ] Limitations are acknowledged
- [ ] Alternative interpretations or counterarguments are addressed
- [ ] Results are reported separately from interpretation
- [ ] Figures and tables are self-explanatory through their captions
- [ ] Logical flow: each paragraph follows from the previous
- [ ] No filler text or unsupported generalizations