Write a complete academic paper in LaTeX format (.tex + .bib) from research project files. Use when the user asks to write, draft, or generate an academic paper, research paper, scientific paper, or LaTeX document based on project data, computational results, figures, derivations, or discussion files. Supports theoretical, computational, experimental, and review paper types with auto-detection of project structure and research type.
Generate a publication-ready LaTeX academic paper by analyzing project result files (data, figures, logs), loading background documents (derivations, discussions), searching for references, classifying research type, and generating section-by-section content with proper math typesetting, figure references, and BibTeX bibliography.
project/
├── docs/
│ ├── derivations/
│ │ └── detailed_derivations_*.md
│ ├── discussions/
│ │ └── discussion_*.md
│ └── brainstorms/
├── results/ (or output/, data/, figures/, plots/)
│ ├── *.csv, *.json, *.xlsx (data files)
│ ├── *.png, *.jpg, *.pdf (figures)
│ └── *.txt, *.log (text/logs)
├── code/
└── paper/ (OUTPUT)
├── paper_[topic]_[date].tex
├── paper_[topic]_[date].bib
└── figures/
Scan the project directory for standard subdirectories:
results/, output/, data/, figures/, plots/docs/, docs/derivations/, docs/discussions/detailed_derivations_*.md and discussion_*.md in docs directories or project rootIf project_path is not provided, default to current working directory.
Classify all files in result directories by type and analyze:
| File Type | Extensions | Analysis Method | Size Limit |
|---|---|---|---|
| Data | CSV, JSON, Excel | Read content, extract headers, row counts, statistics | CSV: 1000 rows, JSON: 50000 chars |
| Image | PNG, JPG, PDF | AI Vision analysis, generate academic figure captions | — |
| Text | TXT, LOG, MD | Read content, extract key information | 8000 chars |
For each file, record: name, type, analysis summary, and path.
detailed_derivations_*.md) for theoretical foundations, mathematical proofs, derivation stepsdiscussion_*.md) for research motivation, key questions, research directionderivation_plan_*.md) for logical structure of theoretical frameworkIf knowledge base is available:
[1], [2], ... for easy citation in section generationClassify the research into: theoretical, computational, experimental, review, case_study, or mixed. Select appropriate section template based on classification.
See references/research-types.md for classification criteria and section templates for each research type.
Generate each section individually with full context. For each section, provide:
See references/writing-guidelines.md for detailed per-section writing standards, information integration guidance, and quality criteria.
After generating all sections, review for citation completeness:
\cite{} markers or numbered references at appropriate locationspaper/figures/ directorypaper/figures/\includegraphics, captions from vision analysis, and \label for cross-referencing:\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/filename.png}
\caption{Descriptive caption from vision analysis.}
\label{fig:unique_label}
\end{figure}
Assemble the complete document:
\section{} / \begin{abstract} wrappers\begin{thebibliography} from collected referencespaper/paper_[topic]_[date].texpaper/paper_[topic]_[date].bib with BibTeX entriesSee references/latex-formatting.md for LaTeX syntax rules, formula standards, and post-processing rules.
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\usepackage{caption}
\usepackage{booktabs}
\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
\title{Paper Title}
\author{Author Name}
\date{\today}
\begin{document}
\maketitle
\textbf{} not **, \textit{} not *, proper \section{} not #.\section{} or \subsection{} titles.[1], [2] format in text, compiled to BibTeX in output.Edit PDFs with natural-language instructions using the nano-pdf CLI.