Writing a scientific paper involves more than presenting ideas. The manuscript must have consistent numbering, correctly formatted equations, properly placed figures, and a reference list that matches every citation in the text. Word processors can do this, but the work becomes fragile as a document grows: a figure moves and the numbering breaks, a reference is added and the list falls out of order. LaTeX solves this by separating content from layout. You describe the structure of the document, and the system handles typesetting automatically.
Overleaf is an online LaTeX editor that runs in the browser, so there is nothing to install. It compiles your source into a PDF as you work, lets several authors edit the same project at once, keeps a full version history, and offers thousands of ready-made journal templates. This article follows the life of a single paper, from creating a project to submitting it, and shows how each part of a scientific manuscript (title, abstract, sections, illustrations, tables, and references) is written in LaTeX.
1. Creating and Organizing the Project
After logging in, click New Project. You can start from a Blank Project or choose a Template. If you already know where you will submit, a template from the target publisher (IEEE, Springer, Elsevier, ACM, and others) is the better choice, because it already follows that venue’s rules for margins, fonts, column layout, and reference style.
For anything longer than a few pages, split the project into several files instead of keeping everything in one:
my-paper/
├── main.tex % document skeleton
├── references.bib % bibliography database
├── sections/
│ ├── introduction.tex
│ ├── related-work.tex
│ ├── methods.tex
│ ├── results.tex
│ └── conclusion.tex
└── figures/
├── pipeline.pdf
└── accuracy-plot.pdf
Use the New File and New Folder buttons in the left panel, and the Upload button to add images. This structure makes collaboration easier, because co-authors can work on different sections without overwriting each other, and it keeps the main file readable. In the project Menu, the compiler is set to pdfLaTeX by default, which is fine for most papers. Choose XeLaTeX or LuaLaTeX only if you need custom fonts or extensive Unicode support.
2. The Document Skeleton
The file main.tex holds the preamble (settings and packages) and the order in which the sections appear:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=2.5cm]{geometry}
\usepackage{graphicx} % images
\usepackage{amsmath} % equations
\usepackage{booktabs} % professional tables
\usepackage{subcaption} % side-by-side figures
\usepackage{tikz} % drawing diagrams
\usepackage[numbers]{natbib}
\usepackage{hyperref} % load last
\title{Deep Learning for Crop Disease Detection}
\author{Jane Doe\thanks{University of Example} \and John Smith}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
We present a convolutional model that detects leaf diseases
with 94\% accuracy from smartphone photographs...
\end{abstract}
\input{sections/introduction}
\input{sections/related-work}
\input{sections/methods}
\input{sections/results}
\input{sections/conclusion}
\bibliographystyle{plainnat}
\bibliography{references}
\end{document}
Everything before \begin{document} is the preamble. Each \usepackage line adds a capability, such as images, math, or tables. The \input{} commands insert the section files in order, so reordering the paper means moving a single line.
3. Writing the Sections
Most scientific papers follow the IMRaD structure: Introduction, Methods, Results, and Discussion, with an abstract in front and a conclusion at the end.
Abstract. A single paragraph of roughly 150 to 250 words that states the problem, the approach, the main result, and why it matters. Write it last, because it summarizes the finished paper.
Introduction. Open with the broad context, narrow down to the specific gap in existing knowledge, and finish with your contribution. Many authors end the section with a short roadmap of the paper.
Related Work (literature review). Group earlier studies by theme rather than listing them one by one, and explain how your work differs. This is the section that uses citations most heavily.
Methods. Describe what you did in enough detail that another researcher could repeat it. Equations are numbered automatically and can be referenced by label:
\section{Methods}
Training minimizes the cross-entropy loss
\begin{equation}
\mathcal{L} = -\frac{1}{N}\sum_{i=1}^{N} y_i \log \hat{y}_i ,
\label{eq:loss}
\end{equation}
where $y_i$ is the true label and $\hat{y}_i$ the predicted
probability. We minimize Eq.~\eqref{eq:loss} with the Adam optimizer.
Use \section{}, \subsection{}, and \subsubsection{} for headings, and LaTeX numbers them for you. The tilde in Eq.~\eqref{} is a non-breaking space that prevents “Eq.” and its number from being split across two lines.
Results. Present the findings objectively, using tables and figures, and point the reader to each one in the text. Discussion. Interpret the results, compare them with earlier work, and be honest about limitations. Conclusion. Restate the main contribution briefly and suggest directions for future work. Optional sections such as acknowledgements and appendices can follow, and \section*{Acknowledgements} creates an unnumbered one.
4. Adding Illustrations
Figures turn data into something readers can grasp at a glance. To add one, upload the image to the figures/ folder and insert it inside a figure environment:
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/pipeline.pdf}
\caption{Overview of the proposed detection pipeline.}
\label{fig:pipeline}
\end{figure}
Then refer to it in the text with Figure~\ref{fig:pipeline}. Because the reference is generated from the label, the number updates by itself if you add, remove, or reorder figures. Never type figure numbers by hand.
A few practical rules produce better illustrations:
- Use vector formats (PDF, or SVG converted to PDF) for plots and diagrams, because they stay sharp at any zoom level. Use PNG or JPG for photographs, at 300 dpi or higher.
- Place the caption below a figure and above a table, which is the usual convention.
- Make sure text inside figures is legible at the printed size, and check that colors remain distinguishable in grayscale.
- For two images side by side, use the
subcaptionpackage:
\begin{figure}[htbp]
\centering
\begin{subfigure}{0.48\textwidth}
\includegraphics[width=\linewidth]{figures/healthy.png}
\caption{Healthy leaf}
\end{subfigure}
\hfill
\begin{subfigure}{0.48\textwidth}
\includegraphics[width=\linewidth]{figures/diseased.png}
\caption{Diseased leaf}
\end{subfigure}
\caption{Example input images.}
\label{fig:samples}
\end{figure}
You can also draw diagrams directly in LaTeX with TikZ, which keeps fonts identical to the body text and requires no external image file:
\begin{tikzpicture}[node distance=3cm, auto]
\node[draw, rounded corners] (in) {Input image};
\node[draw, rounded corners, right of=in] (cnn) {CNN};
\node[draw, rounded corners, right of=cnn] (out) {Diagnosis};
\draw[->] (in) -- (cnn);
\draw[->] (cnn) -- (out);
\end{tikzpicture}
Tables are written in the same spirit. The booktabs package gives the clean, rule-based look used in most journals:
\begin{table}[htbp]
\centering
\caption{Classification performance on the test set.}
\label{tab:accuracy}
\begin{tabular}{lcc}
\toprule
Model & Accuracy (\%) & F1-score \\
\midrule
Baseline CNN & 87.2 & 0.85 \\
Proposed & 94.1 & 0.93 \\
\bottomrule
\end{tabular}
\end{table}
5. Managing References with BibTeX
Instead of typing a reference list by hand, you store each source once in a database file, references.bib, and LaTeX builds the formatted list for you:
@inproceedings{he2016deep,
author = {He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
title = {Deep Residual Learning for Image Recognition},
booktitle = {Proceedings of the IEEE Conference on Computer Vision
and Pattern Recognition},
year = {2016},
pages = {770--778}
}
@book{goodfellow2016deep,
author = {Goodfellow, Ian and Bengio, Yoshua and Courville, Aaron},
title = {Deep Learning},
publisher = {MIT Press},
year = {2016}
}
Each entry has a unique key (the text after the entry type, such as he2016deep). In the text, cite with that key:
Residual networks \citep{he2016deep} are now a standard backbone
architecture \citep{goodfellow2016deep}.
With natbib, \citep{} produces a parenthetical citation and \citet{} produces a narrative one (“He et al. (2016) showed…”). Only sources that are actually cited appear in the final reference list, so the .bib file can safely contain extra entries. You rarely need to type entries manually: Google Scholar offers a BibTeX export, publisher pages and DOI services provide one, and managers such as Zotero or Mendeley can export a whole library. Overleaf can sync with these tools on paid plans. To change the citation style, replace the style in \bibliographystyle{}, for example with ieeetr, plain, or apalike, or use the style file supplied by your target journal.
6. Compiling, Debugging, and Collaborating
Press Recompile to produce the PDF preview. If something goes wrong, open the Logs and output files panel, which lists errors with line numbers. The most common problems are:
- Missing
$or unmatched braces, usually in an equation. Check the line the log points to, and the one just before it. - Citations or references shown as
?or[?]. Recompile once or twice, since LaTeX needs several passes, and verify that the key in\cite{}matches the.bibentry exactly. - File not found for an image. Check the folder path, the spelling, and the extension.
For teamwork, use the Share button to invite co-authors as editors or as read-only reviewers. Collaborators see changes live, can leave comments on any line, and can use track changes to propose edits. The History tool lets you compare versions and restore an earlier state, which removes the need for files named final_v3_REAL.tex. When the paper is ready, Menu → Download → Source gives you a zip of the whole project, and for many journals the Submit button sends the manuscript directly.
7. Pre-Submission Checklist
- The abstract, keywords, and every section are complete and in the required order.
- Every figure and table has a caption, a label, and at least one reference in the text.
- No
?marks remain, and the.bibfile has no duplicate or incomplete entries. - The page count, margins, and reference style match the journal’s author guidelines.
- Spelling has been checked, units are consistent, and symbols are defined at first use.
- The project compiles cleanly, and the remaining warnings have been reviewed.
Overleaf removes most of the friction from LaTeX: there is nothing to install, the preview updates instantly, and sharing is a click away. The real advantage, however, is structural. By splitting the paper into section files, keeping all sources in one .bib database, and giving every figure, table, and equation a label, you let the software handle numbering, cross-references, and formatting. What remains is the part only you can do: designing the study, interpreting the results, and writing clearly. That is why LaTeX remains the standard tool for scientific writing in mathematics, computer science, physics, and engineering.