| name | latex-workflow |
| description | Write, compile, and submit LaTeX papers: IMRaD structure, key packages, bibliography management, arXiv preparation, and common error fixes.
|
| tags | ["latex","academic-writing","bibliography","arxiv","research-workflow","manuscript"] |
| version | 1.0.0 |
| authors | [{"name":"awesome-rosetta-skills contributors","github":"@awesome-rosetta-skills"}] |
| license | MIT |
| platforms | ["claude-code","codex","gemini-cli","cursor"] |
| dependencies | {"python":["pylatexenc>=2.10"]} |
| last_updated | 2026-03-17 |
LaTeX Workflow
A complete guide for writing research papers in LaTeX: document structure,
essential packages, bibliography management, figure inclusion, table formatting,
arXiv submission, and a rebuttal letter template.
Prerequisites
sudo apt-get install texlive-full latexmk biber
brew install --cask mactex
brew install latexmk
latexmk --version
pdflatex --version
biber --version
Minimal Working Example — Full Paper Structure
% main.tex — IMRaD structure with common packages
\documentclass[11pt, a4paper]{article}
% ── Encoding & language ───────────────────────────────────────────────────
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
% ── Math ──────────────────────────────────────────────────────────────────
\usepackage{amsmath, amssymb, amsthm}
\usepackage{mathtools} % fixes and extensions to amsmath
% ── Graphics & figures ───────────────────────────────────────────────────
\usepackage{graphicx} % \includegraphics
\usepackage{float} % [H] placement option
\usepackage{caption} % caption formatting
\usepackage{subcaption} % subfigures
\graphicspath{{figures/}} % default figure directory
% ── Tables ────────────────────────────────────────────────────────────────
\usepackage{booktabs} % \toprule, \midrule, \bottomrule
\usepackage{tabularx} % auto-width columns
\usepackage{multirow} % multi-row cells
\usepackage{siunitx} % aligned numeric columns via S
% ── Layout ────────────────────────────────────────────────────────────────
\usepackage[margin=2.5cm]{geometry}
\usepackage{setspace}
\usepackage{parskip} % no indent, space between paragraphs
\usepackage{microtype} % better typography (microtypography)
\usepackage{lineno} % line numbers for review
% \linenumbers % uncomment for submission
% ── Hyperlinks ────────────────────────────────────────────────────────────
\usepackage[
colorlinks = true,
linkcolor = blue!70!black,
citecolor = blue!70!black,
urlcolor = blue!70!black,
pdftitle = {Your Paper Title},
pdfauthor = {Author Name},
]{hyperref}
\usepackage{cleveref} % \cref{fig:results} → "Figure 1"
% ── Bibliography (biblatex + biber) ──────────────────────────────────────
\usepackage[
backend = biber,
style = nature, % or: authoryear, apa, ieee, vancouver
sorting = none,
maxcitenames = 2,
doi = true,
url = false,
]{biblatex}
\addbibresource{references.bib}
% ── Algorithms ────────────────────────────────────────────────────────────
\usepackage[ruled, vlined, linesnumbered]{algorithm2e}
% ── Code listings ────────────────────────────────────────────────────────
\usepackage{listings}
\lstset{
basicstyle = \small\ttfamily,
breaklines = true,
frame = single,
numbers = left,
numberstyle = \tiny,
language = Python,
}
% ── Custom commands ───────────────────────────────────────────────────────
\newcommand{\eg}{\textit{e.g.,}\xspace}
\newcommand{\ie}{\textit{i.e.,}\xspace}
\newcommand{\etal}{\textit{et al.}\xspace}
\newcommand{\TODO}[1]{\textbf{\textcolor{red}{[TODO: #1]}}}
% ─────────────────────────────────────────────────────────────────────────
\title{Your Paper Title: A Study of Something Important}
\author{
First Author\textsuperscript{1}\thanks{Corresponding author:
\href{mailto:first@university.edu}{first@university.edu}} \and
Second Author\textsuperscript{1,2} \and
Third Author\textsuperscript{2}
}
\date{
\textsuperscript{1}Department of Something, University One, City, Country \\
\textsuperscript{2}Institute of Things, University Two, City, Country \\[6pt]
\today
}
% ─────────────────────────────────────────────────────────────────────────
\begin{document}
\maketitle
\begin{abstract}
\noindent
\textbf{Background:} One to two sentences stating the research problem.
\textbf{Methods:} Brief description of design and main methods.
\textbf{Results:} Key quantitative findings ($n = 120$; $p < 0.001$).
\textbf{Conclusion:} One sentence on the main implication.
\end{abstract}
\noindent\textbf{Keywords:} keyword one; keyword two; keyword three; keyword four
\tableofcontents % remove for journal submissions
% ── 1. Introduction ───────────────────────────────────────────────────────
\section{Introduction}
\label{sec:intro}
Background and motivation \cite{Smith2023}.
The specific gap in knowledge addressed by this work.
Our main contributions are: (i) ...; (ii) ...; (iii) ...
% ── 2. Methods ────────────────────────────────────────────────────────────
\section{Methods}
\label{sec:methods}
\subsection{Study Design}
Describe the experimental design (see \cref{sec:intro}).
\subsection{Statistical Analysis}
All tests were two-tailed with $\alpha = 0.05$.
Multiple comparisons were corrected using the Benjamini--Hochberg procedure~\cite{Benjamini1995}.
% ── 3. Results ────────────────────────────────────────────────────────────
\section{Results}
\label{sec:results}
\subsection{Primary Outcome}
As shown in \cref{fig:main}, the treatment group showed a significant improvement
($t(58) = 3.24$, $p = 0.002$, Cohen's $d = 0.83$, 95\% CI [0.31, 1.35]).
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\linewidth]{figure1_main.pdf}
\caption{
\textbf{Primary outcome by treatment arm.}
Violin plots show the full distribution; diamonds indicate group medians.
Whiskers extend to 1.5$\times$IQR. $n = 30$ per group.
$^{***}p < 0.001$ (Mann--Whitney U test).
}
\label{fig:main}
\end{figure}
\subsection{Summary Statistics}
\Cref{tab:demographics} summarises participant characteristics at baseline.
\begin{table}[htbp]
\centering
\caption{Baseline characteristics of participants (mean $\pm$ SD unless stated).}
\label{tab:demographics}
\begin{tabular}{lSSS}
\toprule
Characteristic &
{Control ($n=60$)} &
{Intervention ($n=60$)} &
{$p$-value} \\
\midrule
Age (years) & 34.2 \pm 8.1 & 33.8 \pm 7.6 & 0.79 \\
Sex (female, \%) & 55 & 52 & 0.72 \\
BMI (kg/m²) & 24.1 \pm 3.2 & 24.5 \pm 3.1 & 0.48 \\
Baseline score & 48.3 \pm 10.2 & 47.9 \pm 9.8 & 0.83 \\
\bottomrule
\end{tabular}
\end{table}
% ── 4. Discussion ─────────────────────────────────────────────────────────
\section{Discussion}
\label{sec:discussion}
Summary of main findings in context of prior work.
Strengths and limitations.
Future directions.
% ── 5. Conclusion ─────────────────────────────────────────────────────────
\section{Conclusion}
\label{sec:conclusion}
One paragraph restating the main contribution and its implications.
% ── Acknowledgements ─────────────────────────────────────────────────────
\section*{Acknowledgements}
This work was supported by Grant XYZ-1234 from Funding Agency.
The authors thank ... for helpful discussions.
% ── Author contributions (CRediT) ────────────────────────────────────────
\section*{Author Contributions}
\textbf{FA}: conceptualisation, methodology, writing—original draft.
\textbf{SA}: data curation, formal analysis.
\textbf{TA}: supervision, writing—review and editing.
% ── Data availability ─────────────────────────────────────────────────────
\section*{Data Availability}
Data and analysis code are available at \url{https://github.com/username/repo}.
% ── References ────────────────────────────────────────────────────────────
\printbibliography
% ── Supplementary (optional) ─────────────────────────────────────────────
\appendix
\section{Supplementary Methods}
\label{sec:supp}
Additional methodological details.
\end{document}