From \bibitem to BibTeX, \cite to \citet, and \label to \ref — everything you need to handle references correctly in any academic paper.
Updated 2025 — companion to “Writing Papers in LaTeX: The Complete Guide”
Everything you need to know about citations, references, and cross-referencing in LaTeX — with working code snippets for every scenario you’ll actually encounter in academic paper writing.
Of all the LaTeX topics that trip up new researchers, citations and cross-references cause the most frustration. This is partly because LaTeX offers multiple ways to accomplish the same thing (bibitem vs. BibTeX vs. biblatex), and partly because getting references to compile correctly requires understanding the two-pass compilation process.
This article is a complete reference. Bookmark it and use it when you’re stuck.
Table of Contents
- The Three Types of References in LaTeX
- Method 1: Bibliographic Citations with \bibitem
- Method 2: BibTeX (Recommended)
- The BibTeX Compilation Process
- Common BibTeX Entry Types
- Getting BibTeX Entries for Any Paper
- Citation Commands: \cite, \citet, \citep, and More
- Cross-referencing: Sections, Figures, Tables, Equations
- Keyword Shortcuts and Custom Commands
- natbib vs. biblatex: Which to Use
- Common Problems and Fixes
The Three Types of References in LaTeX
| Type | LaTeX command | What it references |
|---|---|---|
| Bibliographic citation | \cite{} | External paper, book, website |
| Cross-reference | \ref{} | Internal element (section, figure, table, equation) |
| Keyword shortcut | \newcommand{} | Repeated terms, model names, abbreviations |
Understanding which type you need for each situation prevents most citation-related confusion.
Method 1: Bibliographic Citations with \bibitem
The simplest approach: define references directly in the .tex file using \bibitem. No separate .bib file required.
% In the text, cite with the label:
As shown in previous work \cite{devlin2019bert}, transformers have achieved...
% At the end of the document, before \end{document}:
\begin{thebibliography}{99}
\bibitem{devlin2019bert}
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.
\newblock {BERT}: Pre-training of deep bidirectional transformers for language
understanding.
\newblock In \emph{Proceedings of NAACL-HLT}, pages 4171--4186, 2019.
\bibitem{roy2025parkinson}
Soumyadeep Roy et al.
\newblock Decision tree-based approach to robust Parkinson's disease subtyping.
\newblock \emph{Frontiers in Artificial Intelligence}, 2025.
\end{thebibliography}
When to use \bibitem: For very short papers with 5–10 references, or when the conference template explicitly uses this format. For anything longer, use BibTeX.
Limitation: Manual formatting. If the conference changes its citation style (e.g., from numbered to author-year), you have to reformat every reference by hand.
Method 2: BibTeX (Recommended)
BibTeX separates reference data from citation formatting. You store all references in a .bib file; LaTeX + the .bst style file handles formatting automatically.
Your .bib file (references.bib):
@inproceedings{devlin2019bert,
title = {{BERT}: Pre-training of Deep Bidirectional Transformers for Language Understanding},
author = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
booktitle = {Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics},
pages = {4171--4186},
year = {2019},
publisher = {Association for Computational Linguistics},
url = {https://aclanthology.org/N19-1423}
}
@article{roy2025parkinson,
title = {Decision tree-based approach to robust {P}arkinson's disease subtyping using clinical data},
author = {Roy, Soumyadeep and others},
journal = {Frontiers in Artificial Intelligence},
year = {2025},
doi = {10.3389/frai.2025.1668206}
}
@book{goodfellow2016deep,
title = {Deep Learning},
author = {Goodfellow, Ian and Bengio, Yoshua and Courville, Aaron},
publisher = {MIT Press},
year = {2016},
url = {https://www.deeplearningbook.org}
}
In your .tex file:
% In the preamble:
\usepackage{natbib} % or just use the .bst file directly
% In the text:
Transformers \cite{devlin2019bert} have become the dominant architecture...
Our work builds on the decision tree approach of \cite{roy2025parkinson}.
For a comprehensive introduction, see \cite{goodfellow2016deep}.
% At the end, before \end{document}:
\bibliographystyle{splncs04} % or acl_natbib, IEEEtran, etc.
\bibliography{references} % references.bib, without the .bib extension
The BibTeX Compilation Process
This is why your references sometimes show as [?]:
BibTeX requires a specific compilation sequence:
1. pdflatex main.tex → produces .aux file with citation keys
2. bibtex main → reads .aux, processes .bib, produces .bbl
3. pdflatex main.tex → incorporates .bbl into document
4. pdflatex main.tex → resolves all references correctly
In Overleaf, this happens automatically. For local compilation, run all four steps or use latexmk:
latexmk -pdf main.tex # handles all passes automatically
Why [?] appears: You ran pdflatex only once, or you have a typo in the citation key.
Common BibTeX Entry Types
| Entry type | Use for | Required fields |
|---|---|---|
@inproceedings | Conference papers | author, title, booktitle, year |
@article | Journal papers | author, title, journal, year |
@book | Books | author, title, publisher, year |
@techreport | Technical reports | author, title, institution, year |
@misc | Websites, preprints | author, title, year, howpublished/url |
@phdthesis | PhD dissertations | author, title, school, year |
@mastersthesis | Master’s theses | author, title, school, year |
For arXiv preprints (commonly used in ML):
@misc{brown2020gpt3,
title = {Language Models are Few-Shot Learners},
author = {Tom Brown and others},
year = {2020},
eprint = {2005.14165},
archivePrefix = {arXiv},
primaryClass = {cs.CL}
}
Getting BibTeX Entries for Any Paper
Google Scholar:
Search for the paper → click “Cite” → click “BibTeX” → copy
ACL Anthology (NLP papers):
Direct BibTeX button on every paper page at aclanthology.org
Semantic Scholar:
Paper page → “Export” → “BibTeX”
arXiv:
Every arXiv paper has a BibTeX export under “Export BibTeX Citation” on the abstract page
IEEE Xplore and ACM Digital Library:
Both have direct BibTeX export buttons
Tip: Always check the BibTeX entry you get for accuracy. Common issues:
- Missing or truncated author names (especially for papers with many authors)
- Inconsistent capitalization in titles (use
{Title Case}to protect capitalization in BibTeX) - Missing page numbers or DOIs
Citation Commands: \cite, \citet, \citep, and More
When using the natbib package (which most conference templates include), you have several citation commands:
% Basic citation (number or author-year depending on style)
\cite{devlin2019bert} → [1] or (Devlin et al., 2019)
% Author as subject (use at beginning of sentence)
\citet{devlin2019bert} → Devlin et al. (2019)
% Citation in parentheses
\citep{devlin2019bert} → (Devlin et al., 2019)
% Multiple citations
\cite{devlin2019bert, brown2020gpt3} → [1, 2] or (Devlin et al., 2019; Brown et al., 2020)
% With extra text
\cite[see][p. 42]{goodfellow2016deep} → [see Goodfellow 2016, p. 42]
% Suppress author name (just year)
\citeyear{devlin2019bert} → 2019
% Just the author
\citeauthor{devlin2019bert} → Devlin et al.
Choosing between \cite and \citet:
- Use
\citetwhen the author is the grammatical subject: “Devlin et al. (2019) showed that…” - Use
\citepwhen the citation is parenthetical: “Transformers have transformed NLP (Devlin et al., 2019).”
Cross-Referencing: Sections, Figures, Tables, Equations
The golden rule: Never type “Section 3” or “Figure 2” manually. Always use \label{} and \ref{}. If the content moves, your text stays correct automatically.
% Assign labels when defining elements:
\section{Methodology}
\label{sec:methodology}
\begin{figure}[h]
\centering
\includegraphics[width=0.9\columnwidth]{figures/pipeline.pdf}
\caption{Overview of the proposed pipeline.}
\label{fig:pipeline}
\end{figure}
\begin{table}[h]
\centering
\caption{Results on the test set.}
\label{tab:results}
...
\end{table}
\begin{equation}
\mathcal{L} = -\sum_{i} y_i \log \hat{y}_i
\label{eq:loss}
\end{equation}
% Reference them anywhere in the document:
As described in Section~\ref{sec:methodology}, our pipeline
(Figure~\ref{fig:pipeline}) achieves the results in Table~\ref{tab:results}.
The loss function (Equation~\ref{eq:loss}) is minimized during training.
The ~ tilde: Use ~ between the word and \ref{} to prevent a line break between “Figure” and “2.” Without it, you might get “Figure\n2” at a line break, which looks wrong.
Prefixes for label names (convention):
sec:for sectionsfig:for figurestab:for tableseq:for equationsalg:for algorithmsapp:for appendices
Keyword Shortcuts and Custom Commands
Use \newcommand for: model names you’ll repeat many times, mathematical notation that’s tedious to type, and abbreviations that might change.
% In the preamble, after \begin{document} — wait, before it:
% Actually, \newcommand goes in the PREAMBLE (before \begin{document})
\newcommand{\ourmodel}{\textsc{ClinBERT}}
\newcommand{\dataset}{\textsc{MIMIC-III}}
\newcommand{\baseline}{\texttt{LR-baseline}}
% Useful mathematical shortcuts:
\newcommand{\R}{\mathbb{R}} % real numbers
\newcommand{\N}{\mathbb{N}} % natural numbers
\newcommand{\E}{\mathbb{E}} % expectation
\newcommand{\bx}{\mathbf{x}} % bold x vector
\newcommand{\by}{\mathbf{y}} % bold y vector
% Usage in the text:
Our model, \ourmodel{}, was evaluated on \dataset{}.
For input $\bx \in \R^d$, the loss is $\E[\mathcal{L}]$.
Pro tip: If you decide to rename your model from “ClinBERT” to “MedBERT” two days before submission, you change one line in the preamble. Without \newcommand, you’d need to find and replace every occurrence.
natbib vs. biblatex: Which to Use
Use what the conference template specifies. This is the most important rule.
If you have a choice:
- natbib — older, simpler, compatible with virtually all conference templates; covers 95% of citation needs
- biblatex — more powerful, better support for complex citation formats, more actively maintained; not compatible with some older templates
For most CS conference papers (ACM, IEEE, Springer, ACL), the template will specify natbib or a specific .bst file. Follow the template.
Common Problems and Fixes
| Problem | Cause | Fix |
|---|---|---|
[?] in output | BibTeX not run, or citation key typo | Run bibtex; check spelling of key |
| References not formatted correctly | Wrong .bst file | Use the .bst from the conference template |
Undefined citation warning | Key in .bib doesn’t match \cite{} key | Check for case sensitivity and typos |
| Extra blank line before References | Known quirk with some templates | Add \vspace{-\baselineskip} before \bibliography{} |
| URL too long, breaks formatting | Long URL in a @misc entry | Wrap URL in \url{} command after adding \usepackage{url} |
| Name not capitalized correctly | BibTeX lowercases titles | Wrap protected text in extra braces: {BERT} not BERT in title |
Conclusion
We cover how to use bibliographic citations, cross-referencing, keyword shortcuts, and footnotes using Latex while writing a research article.
Recommended books from Amazon
I learnt a lot from the free blog-series available here. The author of that series has compiled them together into one book, which could be of value to you.
How to Write a Scientific Paper: An Academic Self-Help Guide for PhD Students
Related articles that may be of interest to you
You can get a comprehensive list of academic conferences in the field of AI and Machine Learning in another article written by me
If you are new to writing papers using Latex for academic conferences, you can visit the following articles:
- I cover how to setup up a Tex environment in your local machine (article link)
- Conference or journal paper template – individual files and how to use them (article link)
Please comment below if you would like to add something.
Discover more from Medical AI Insights
Subscribe to get the latest posts sent to your email.
