LaTeX and tools
LaTeX for Academic Writing: A Practical Guide for Researchers
LaTeX is the typesetting system most math-heavy fields default to for a reason: it produces publication-quality output, keeps equations and cross references stable across a long revision cycle, and separates what you say from how it looks. This is a hands-on guide to the parts you actually use, from a minimal document skeleton to figures, references, and the errors that trip up newcomers. You do not have to draft in LaTeX from the first word; you can write the argument in plain prose and convert the structure later.
11 min read · Updated August 21, 2026
Why LaTeX earns its place in research writing
LaTeX is a markup language on top of the TeX engine. You write plain text with commands, and a compiler renders a PDF. That indirection is exactly the point: the source is content plus intent, and the layout is computed. For the kinds of documents researchers produce, four properties matter more than anything a word processor offers.
- Typesetting quality. TeX's line-breaking and math layout are still the standard against which everything else is measured. Equations, subscripts, integrals, and matrices come out looking like a printed journal because that is precisely what the algorithm was built to do.
- Stable cross references. You label a figure, equation, or section once, then refer to it by name. If you insert a new figure at the front, every downstream number updates on the next compile. Nothing is hand-numbered, so nothing drifts out of sync during revision.
- Separation of content and style. A single command switches you from a preprint class to a journal class, and the same source recompiles into that journal's layout. Your prose does not change; only the class and a few packages do.
- Multi-author friendliness. LaTeX source is plain text, so it diffs and merges in Git like code. Two coauthors editing different sections produce a clean three-way merge instead of a tangle of tracked changes.
The promise is simple: describe the structure of the argument once, and let the machine handle numbering, layout, and formatting consistently across two hundred pages and a dozen revisions.
The cost is a learning curve and a compile step. For a two-page memo with no math, that cost is not worth paying. For a thesis, a proof-heavy paper, or a multi-author manuscript headed to a specific journal, it pays for itself the first time a reviewer asks you to move Section 4 ahead of Section 3.
The minimal document skeleton
Every LaTeX document has a preamble (settings and packages) and a body (the content) between a document environment. Here is a skeleton that compiles to a titled article with sensible math and graphics support. Each line below is one line of the source file.
- \documentclass[11pt]{article}
- \usepackage{amsmath}
- \usepackage{graphicx}
- \usepackage{hyperref}
- \title{A Concise, Informative Title}
- \author{Jane Smith \and John Doe}
- \date{August 2026}
- \begin{document}
- \maketitle
- Your prose goes here.
- \end{document}
The class in the first line sets the overall shape: article for papers, report or book for longer work with chapters, beamer for slides. Options in the square brackets tune it, for example a base font size or twocolumn layout. Everything before begin document is the preamble, where packages extend what LaTeX can do. Anything after begin document is typeset. Compile with pdflatex, or better, use latexmk, which reruns the compiler as many times as the cross references need.
Sectioning and stable cross references
Structure comes from sectioning commands, not from manual font changes. In an article class you have section, subsection, and subsubsection; in report and book you also get chapter. Numbering is automatic, and it flows into the table of contents that \tableofcontents generates. To make a heading appear but stay unnumbered (an abstract or acknowledgements), use the starred form, for example a starred section.
Cross references are the feature that repays the effort. Attach a label to anything numbered, then reference it by that key rather than by a literal number.
- \section{Methods}\label{sec:methods}
- As described in Section~\ref{sec:methods}, we ...
- See also \autoref{sec:methods} for the full protocol.
The tilde is a non-breaking space, so the word Section and its number never split across a line. The ref command prints the number; autoref (from hyperref) prints the word and the number and makes it a clickable link. Because the numbers are computed, inserting a new section renumbers everything correctly on the next run. A common surprise: LaTeX needs at least two compile passes to resolve references, because the first pass writes the numbers to an auxiliary file and the second reads them back. If a reference shows up as two question marks, recompile.
Typesetting mathematics: equation and align
Math comes in two flavours. Inline math sits between single dollar signs and flows with the sentence, for example writing the model as a linear form inline. Display math sits on its own line, centred and often numbered. For a single numbered equation, use the equation environment; give it a label so you can reference it.
- \begin{equation}\label{eq:bayes}
- P(H \mid E) = \frac{P(E \mid H)\,P(H)}{P(E)}
- \end{equation}
That renders Bayes' theorem as a centred, numbered display, and Equation~\ref{eq:bayes} will point back to it from anywhere in the text. When you have several related lines that should align on the equals sign, use the align environment from amsmath. The ampersand marks the alignment point, and a double backslash ends each row.
- \begin{align}
- P(H \mid E) &= \frac{P(E \mid H)\,P(H)}{P(E)} \label{eq:post} \\
- &= \frac{P(E \mid H)\,P(H)}{\sum_i P(E \mid H_i)\,P(H_i)}
- \end{align}
Here the second line expands the denominator using the law of total probability, and both rows line up on the equals sign. Give a label only to the rows you actually cite; add a starred align (align with an asterisk) or a nonumber command to suppress numbering on the rest.
Use the amsmath environments (equation, align, gather) and the \[ ... \] display, never the old double-dollar display from plain TeX. The amsmath versions handle spacing and page breaks correctly and integrate with labels; the legacy form does neither and quietly produces worse output.
Figures and tables that keep their numbers
Figures and tables are floats: LaTeX decides where to place them so the page looks right, and you refer to them by label rather than by position. Wrap an image in a figure environment with graphicx doing the import.
- \begin{figure}[htbp]
- \centering
- \includegraphics[width=0.8\linewidth]{results.pdf}
- \caption{Accuracy versus training set size.}
- \label{fig:accuracy}
- \end{figure}
Then in the prose you write that the trend is clear in Figure~\ref{fig:accuracy}. A crucial ordering rule: the label must come after the caption, because ref points at whatever was numbered most recently, and the caption is what creates the number. The placement specifier htbp is a ranked wish list (here, then top, then bottom, then a float page); LaTeX honours it as best it can. Tables follow the same pattern with a table environment wrapping a tabular, and the booktabs package gives you proper rules (\toprule, \midrule, \bottomrule) instead of the cramped default lines.
References: BibTeX and biblatex
You never type formatted references by hand. You keep a plain-text bibliography database with a .bib extension, and the tooling formats every entry to the required style and lists only the works you actually cited. A single entry looks like this.
- @article{smith2020,
- author = {Smith, Jane and Doe, John},
- title = {A Study of Something Specific},
- journal = {Journal of Results},
- year = {2020},
- volume = {12},
- pages = {45--67}
- }
The key smith2020 is how you cite it. There are two toolchains, and it is worth knowing which you are on.
The classic route: BibTeX with natbib
Load the natbib package, point at your database with a bibliography command, and cite with citep for a parenthetical citation and citet for a textual one. So citep gives (Smith and Doe, 2020) and citet gives Smith and Doe (2020). BibTeX is old, universally supported, and what most journal styles still assume.
The modern route: biblatex with biber
Load biblatex with a chosen style, register the database in the preamble with addbibresource, and cite with autocite or textcite. Biblatex handles Unicode, complex author lists, and non-English sources far better, and you configure the style in your own preamble rather than editing a separate style file. It runs on the biber backend instead of the bibtex program. If you are starting fresh and your target class allows it, biblatex is the more capable choice. The distinction between styles, and when each fits, is covered in Citation Styles Explained: APA, MLA, Chicago, BibTeX.
A document with references needs more than one pass: run the LaTeX compiler, then the bibliography program (bibtex or biber), then the LaTeX compiler twice more so citations and the reference list resolve. The tool latexmk automates this whole dance, which is why most people set it and forget it.
Journal and conference templates: IEEE, ACM, Elsevier, Overleaf
Publishers ship document classes so your manuscript matches their layout before you submit. Because content and style are separate, adopting one usually means changing the documentclass line and moving your author metadata into the fields the class expects. The common ones:
- IEEE provides the IEEEtran class for transactions and conference papers, with a two-column conference mode that reviewers expect.
- ACM publishes acmart, a single class with options (for example acmsmall, sigconf) that switch between journal and proceedings formats.
- Elsevier offers elsarticle for its journals, designed for the single-column review stage that later reflows into the published layout.
- Springer distributes sn-jnl and related classes for its Nature and journal families.
- Overleaf hosts a large template gallery for all of the above plus most universities' thesis formats, so you rarely start from a blank file.
Overleaf deserves a specific mention because it removes the biggest barrier for newcomers and collaborators: there is nothing to install. It is a browser-based LaTeX editor that compiles in the cloud, shows the PDF next to the source, and lets multiple authors edit at once with version history. If a coauthor refuses to install a TeX distribution, Overleaf is the path of least resistance, and it keeps the whole project in one shareable place, which fits naturally into a connected modern research workflow.
Packages worth loading, and a note on order
Packages are how LaTeX grows. A small standard set covers most research writing, and you can add these to the preamble as needed.
- amsmath is the mathematics workhorse: align, cases, matrices, well-behaved operators, and proper spacing. Load it in almost every document.
- graphicx imports images and gives you includegraphics with scaling and rotation.
- hyperref turns cross references, citations, and URLs into clickable links and adds PDF bookmarks. Load it last, or nearly last, because it patches many internal commands and must see them first.
- natbib or biblatex drive citations, as described above. Pick one, not both.
- siunitx typesets numbers and physical units consistently: use its num and unit commands so that quantities, uncertainties, and unit spacing follow one rule across the whole document instead of being typed by hand.
- booktabs for readable tables, and microtype for subtle spacing and character protrusion that reduces overfull lines almost for free.
Load order occasionally matters. The reliable rule is to load hyperref near the end and cleveref (if you use it, for smarter references) after hyperref. When two packages clash, the error usually names both; searching the exact message is faster than guessing.
Scaling up, and dodging the classic pitfalls
A thesis in one file becomes unmanageable. Split it. A master file holds the preamble and pulls in each chapter, so you edit small files and keep the whole compilable.
- input drops a file's contents in place, as if you had pasted them. Good for reusable snippets and small fragments.
- include does the same for a chapter but adds a page break and its own auxiliary file, which enables includeonly.
- includeonly in the preamble compiles just the chapters you name while preserving all page and reference numbers, so you can rebuild one chapter in seconds instead of the whole book.
The strategy pairs well with the momentum tactics in Writing a Thesis or Dissertation: one file per chapter, compiled independently, keeps a long document fast to work on. Three errors account for most of the frustration newcomers report.
- 1Undefined references (question marks in the PDF, or a warning about undefined references). Almost always a stale auxiliary file: you have not compiled enough times, or a label is misspelled. Recompile, or run latexmk; if it persists, check the label and ref keys match exactly.
- 2Figures floating far from their text. LaTeX moves floats to balance pages. Give a fuller placement like htbp, avoid the rigid single h, and if a figure must not drift past a point, load the placeins package and drop a FloatBarrier. Never fight it with forced positions; you will lose.
- 3Overfull hbox warnings. A line is slightly too wide, usually a long unhyphenated word, a URL, or an inline formula. Loading microtype fixes many silently; for the rest, allow hyphenation, wrap URLs with the url or hyperref package, or as a last resort rephrase the sentence. A related classic is a missing dollar sign, which throws a Missing dollar inserted error when a math command escapes into text.
LaTeX errors cascade: one real mistake spawns a dozen downstream complaints. Fix the first error in the log and recompile before touching anything else. The line number in the message is where LaTeX noticed the problem, which is often a line or two after where you actually made it.
Draft the argument first, format the structure later
The most freeing thing to internalise is that LaTeX is a layer you add to a finished argument, not the medium you must think in from the first sentence. Write your claims and evidence in plain prose, get the logic right, then convert the structure to sectioning, equations, and references. The intellectual work is the argument; LaTeX is the machine that presents it cleanly and keeps the numbering honest through every revision. This is the same principle that a good research operations platform is built on: the human writes the argument, and the tooling operates everything around it without ever inventing a claim.
That is where a system like Research Woven fits. It carries a project from the first idea to the final submission and, crucially, it keeps every citation connected to the source it came from, so the reference you drop into a .bib file traces back through the note you wrote, the highlighted passage, and the page it sits on. When you export to LaTeX for a specific journal, the bibliography and the provenance travel with you as a maintained chain from source to submission. Format is the last mile; keeping the evidence trustworthy is the whole road, and it is closely tied to the practices in Research Reproducibility: Data Management, Methods, and Archiving.
Frequently asked questions
- Is LaTeX worth learning if I do not write much mathematics?
- It depends on the document. For a short memo or a paper with no equations and no strict template, a word processor is faster and the LaTeX learning curve is not repaid. For a thesis, a multi-author manuscript, or anything with a required journal layout and many cross references, LaTeX's stable numbering, clean version control, and consistent typesetting usually win even without heavy math.
- Do I need to install LaTeX, or can I use Overleaf?
- Both work. A local install (TeX Live, MiKTeX, or MacTeX) compiles offline and integrates with your own editor and Git. Overleaf runs entirely in the browser with nothing to install, compiles in the cloud, and supports real-time coauthoring, which makes it the easiest option for collaborators who do not want to set up a toolchain.
- Why do my references show up as question marks?
- LaTeX resolves cross references over multiple compile passes: the first pass records the numbers in an auxiliary file and later passes read them back. Two question marks mean the numbers are not yet available, either because you have not compiled enough times or because a label and its ref key do not match. Recompile, or run latexmk to automate the passes.
- Should I use BibTeX or biblatex for my bibliography?
- Use whichever your target class requires first. If you have a free choice, biblatex with the biber backend is more capable: better Unicode and multilingual support, flexible styles configured in your own preamble, and cleaner handling of complex author lists. BibTeX with natbib remains the safe default when a journal style explicitly expects it.
- How do I keep a figure from floating away from the text that discusses it?
- Floats move by design so pages stay balanced. Give a generous placement specifier such as htbp rather than a rigid h, and if a figure must not cross a boundary, load the placeins package and insert a FloatBarrier after the relevant section. Forcing an exact position usually causes worse layout downstream.
- Can I write my draft in plain text and convert it to LaTeX later?
- Yes, and it is often the better workflow. Get the argument and evidence right in prose first, then translate the structure into sectioning commands, equation environments, and citation keys. LaTeX formats and numbers a finished argument; it does not need to be the medium you think in from the first sentence.
Bring this into your own research
Research Woven connects your sources, highlights, notes, evidence, and manuscript in one maintained chain, so provenance and citations are computed for you rather than pieced together by hand.
Open Research WovenKeep reading
- The Modern Research Workflow: From First Idea to Published PaperA concrete, end-to-end research workflow: frame questions, read sources, take notes, build evidence, form claims, draft, cite, and submit with provenance intact.
- Citation Styles Explained: APA, MLA, Chicago, and BibTeX for ResearchersA practical guide to APA, MLA, Chicago, Vancouver, and IEEE citation styles, plus BibTeX, DOIs, in-text citations, reference managers, and avoiding citation rot.
- Writing a Thesis or Dissertation: Structure, Workflow, and MomentumA graduate student's guide to thesis structure, IMRaD, chapter word budgets, writing early, version control for prose, feedback loops, and viva prep.
- Research Reproducibility: Data Management, Methods, and ArchivingA practical guide to open, reproducible research: data management plans, FAIR data, method documentation, code versioning, pre-registration, DOIs, and archiving.