Intermediate 18 min read

LaTeX Bibliography and Citations: BibTeX Complete Guide

Master bibliographies and citations in LaTeX with this comprehensive guide. Learn BibTeX and biblatex, create .bib database files, use various citation styles (APA, IEEE, Harvard, Chicago), and manage references efficiently with practical examples for academic papers and resumes.

Introduction to LaTeX Bibliography

Managing citations and bibliographies is one of LaTeX's strongest features. Instead of manually formatting references, LaTeX automates citation numbering, bibliography generation, and formatting according to your chosen style. This is invaluable for academic papers, theses, research documents, and even professional resumes.

LaTeX offers two main systems for bibliography management:

  • BibTeX - The traditional, widely-supported system (recommended for beginners)
  • biblatex - Modern, more powerful system with additional features
Why Use LaTeX for Bibliographies? Automatic numbering and formatting, consistent citation style throughout document, easy style switching (APA to IEEE with one line), centralized reference database reusable across projects, and automatic sorting of references.

BibTeX Basics

BibTeX is the standard bibliography tool for LaTeX. It uses a separate database file (.bib) to store all your references, which you then cite in your document.

Basic Workflow

1

Create .bib File

Create a file named references.bib containing your references in BibTeX format.

2

Choose Style

Add \bibliographystyle{plain} to your document preamble.

3

Cite in Text

Use \cite{key} to cite references where needed.

4

Generate Bibliography

Add \bibliography{references} where you want the bibliography to appear.

Minimal Example

main.tex
\documentclass{article}

\begin{document}

\section{Introduction}
LaTeX is widely used in academia \cite{lamport1994latex}.
Machine learning has advanced significantly \cite{goodfellow2016deep}.

\bibliographystyle{plain}
\bibliography{references}

\end{document}

Creating a .bib File

A .bib file is a plain text database containing your references in BibTeX format. Each entry has a type, unique key, and required fields.

Basic .bib File Structure

references.bib
@article{einstein1905,
    author  = {Albert Einstein},
    title   = {On the Electrodynamics of Moving Bodies},
    journal = {Annalen der Physik},
    year    = {1905},
    volume  = {17},
    pages   = {891--921}
}

@book{knuth1984texbook,
    author    = {Donald E. Knuth},
    title     = {The TeXbook},
    publisher = {Addison-Wesley},
    year      = {1984},
    address   = {Reading, Massachusetts}
}

@inproceedings{lecun1998mnist,
    author    = {Yann LeCun and Corinna Cortes},
    title     = {The MNIST Database of Handwritten Digits},
    booktitle = {Proceedings of IEEE},
    year      = {1998}
}

Common Entry Types

Type Description Required Fields
@article Journal article author, title, journal, year
@book Published book author/editor, title, publisher, year
@inproceedings Conference paper author, title, booktitle, year
@incollection Book chapter with own title author, title, booktitle, publisher, year
@mastersthesis Master's thesis author, title, school, year
@phdthesis PhD dissertation author, title, school, year
@techreport Technical report author, title, institution, year
@misc Miscellaneous (websites, etc.) author, title, year, howpublished

Common Fields

Field Description Example
author Author name(s) John Doe and Jane Smith
title Publication title Deep Learning Fundamentals
journal Journal name Nature Machine Intelligence
year Publication year 2024
volume Volume number 15
number Issue number 3
pages Page range 123--145
doi Digital Object Identifier 10.1234/example.2024
url Web address https://example.com/paper

Detailed Entry Examples

Various Entry Types
% Journal Article
@article{smith2024ml,
    author  = {John Smith and Mary Johnson},
    title   = {Advances in Machine Learning},
    journal = {Journal of AI Research},
    year    = {2024},
    volume  = {42},
    number  = {3},
    pages   = {123--145},
    doi     = {10.1234/jair.2024.123}
}

% Conference Paper
@inproceedings{brown2023neural,
    author    = {Alice Brown and Bob Wilson},
    title     = {Neural Network Optimization},
    booktitle = {Proceedings of NeurIPS 2023},
    year      = {2023},
    pages     = {1--12},
    address   = {New Orleans, LA}
}

% Book
@book{goodfellow2016deep,
    author    = {Ian Goodfellow and Yoshua Bengio and Aaron Courville},
    title     = {Deep Learning},
    publisher = {MIT Press},
    year      = {2016},
    address   = {Cambridge, MA},
    isbn      = {978-0262035613}
}

% Website
@misc{tensorflow2024,
    author       = {{TensorFlow Team}},
    title        = {TensorFlow: Machine Learning Platform},
    year         = {2024},
    howpublished = {\url{https://www.tensorflow.org}},
    note         = {Accessed: 2024-10-04}
}
Naming Keys: Use descriptive, consistent keys like author-year-keyword (e.g., smith2024ml). Avoid spaces and special characters. Good keys make citations easy to remember and reduce errors.

Citing References

Once you have a .bib file, cite references in your document using various \cite commands:

Basic Citation Commands

Citation Examples
% Basic citation
Deep learning has revolutionized AI \cite{goodfellow2016deep}.

% Multiple citations
Recent studies \cite{smith2024ml,brown2023neural} show promising results.

% Citation with page number
As mentioned by Einstein \cite[p.~23]{einstein1905}...

% Suppress author in citation (number/label only)
The theory of relativity \nocite{einstein1905} is fundamental.

Citation Styles Output

Command Output (Numbered) Output (Author-Year)
\cite{key} [1] (Smith, 2024)
\cite[p.5]{key} [1, p.5] (Smith, 2024, p.5)
\cite{key1,key2} [1, 2] (Smith, 2024; Brown, 2023)
\nocite{key} Adds to bibliography without citation in text
\nocite{*} Include ALL entries from .bib file

Bibliography Styles

LaTeX provides various built-in bibliography styles. Choose one with \bibliographystyle{stylename}:

Common Built-in Styles

Style Format Best For
plain Numbered, sorted alphabetically General academic papers
unsrt Numbered, order of citation Papers with sequential references
alpha Alpha-numeric labels (Smi24) Papers with author-year preference
abbrv Abbreviated first names Space-conscious documents
ieeetr IEEE transactions format Engineering, computer science
apalike APA-like author-year Psychology, social sciences

Style Comparison Example

plain Style

[1] J. Smith and M. Johnson. Advances in machine learning. Journal of AI Research, 42(3):123–145, 2024.

ieeetr Style

[1] J. Smith and M. Johnson, "Advances in machine learning," Journal of AI Research, vol. 42, no. 3, pp. 123–145, 2024.

Using Custom Styles

custom_style.tex
% Place .bst file in same directory as your .tex file
\bibliographystyle{naturemag}  % Nature magazine style
\bibliography{references}

% Or specify full path
\bibliographystyle{./styles/custom}

Compilation Process

BibTeX requires a specific compilation sequence to properly generate citations and bibliography:

1

First LaTeX Compilation

pdflatex main.tex - Creates .aux file with citation information

2

BibTeX Processing

bibtex main - Generates .bbl file with formatted bibliography

3

Second LaTeX Compilation

pdflatex main.tex - Includes bibliography in document

4

Third LaTeX Compilation

pdflatex main.tex - Resolves all cross-references

Command Line Compilation

Terminal/Command Prompt
# Full compilation sequence
pdflatex main.tex
bibtex main
pdflatex main.tex
pdflatex main.tex

# Or use latexmk for automatic compilation
latexmk -pdf main.tex

# With latexmk, it handles the entire sequence automatically
Common Mistake: If your citations show as [?] or bibliography is empty, you haven't completed the full compilation sequence. Run all four commands. Most LaTeX editors have a "Build & View" button that automates this process.

Using natbib Package

The natbib package provides enhanced citation commands, especially useful for author-year citation styles:

Loading natbib

natbib_setup.tex
\documentclass{article}
\usepackage[numbers]{natbib}  % For numbered citations
% \usepackage[authoryear]{natbib}  % For author-year style
% \usepackage[super]{natbib}  % For superscript numbers

\begin{document}

% Your content with citations

\bibliographystyle{plainnat}
\bibliography{references}

\end{document}

natbib Citation Commands

Command Output (Author-Year) Output (Numbered)
\citet{key} Smith (2024) Smith [1]
\citep{key} (Smith, 2024) [1]
\citet*{key} Smith and Johnson (2024) Smith and Johnson [1]
\citealp{key} Smith, 2024 1
\citeauthor{key} Smith Smith
\citeyear{key} 2024 2024

natbib Examples in Context

natbib_examples.tex
% Textual citation (author is part of sentence)
\citet{smith2024ml} showed that machine learning improves accuracy.
% Output: Smith (2024) showed that...

% Parenthetical citation
Recent studies show improved results \citep{smith2024ml,brown2023neural}.
% Output: ... improved results (Smith, 2024; Brown, 2023).

% Author only
The work by \citeauthor{smith2024ml} is significant.
% Output: The work by Smith is significant.

% Year only
The 2024 study \citeyear{smith2024ml} confirms this.
% Output: The 2024 study 2024 confirms this.

Modern Approach: biblatex

biblatex is the modern alternative to BibTeX with more features, better Unicode support, and easier customization:

Basic biblatex Setup

biblatex_example.tex
\documentclass{article}
\usepackage[style=numeric,sorting=nyt,backend=biber]{biblatex}
\addbibresource{references.bib}

\begin{document}

\section{Introduction}
Machine learning \cite{goodfellow2016deep} has transformed AI.

\printbibliography

\end{document}

biblatex Compilation

Terminal
# biblatex uses biber instead of bibtex
pdflatex main.tex
biber main
pdflatex main.tex
pdflatex main.tex

# Or with latexmk
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" main.tex

Popular biblatex Styles

Style Description Use Case
numeric Numbered citations [1] STEM papers
alphabetic Alpha labels [Smi24] Math, CS papers
authoryear (Smith, 2024) Humanities, social sciences
apa APA 7th edition Psychology, education
ieee IEEE format Engineering
chicago Chicago style History, humanities

BibTeX vs. biblatex Comparison

BibTeX

  • ✅ Traditional, widely supported
  • ✅ Works everywhere
  • ✅ Simpler for beginners
  • ❌ Limited customization
  • ❌ Poor Unicode support

biblatex

  • ✅ Modern, powerful
  • ✅ Better Unicode support
  • ✅ Easier customization
  • ❌ Requires biber backend
  • ❌ Some journals don't accept

Reference Management Tools

These tools help you organize references and export to BibTeX format:

Zotero

Free, Open Source

Excellent browser integration, auto-imports citations, exports to BibTeX, supports groups. Perfect for researchers.

Visit Zotero →

Mendeley

Free with Premium Options

PDF annotation, cloud sync, collaboration features. Owned by Elsevier, integrates with their journals.

Visit Mendeley →

JabRef

Free, Open Source

Native BibTeX editor, group management, automatic BibTeX key generation. Ideal for LaTeX users.

Visit JabRef →

Google Scholar

Free

Find papers, export BibTeX directly. Click "Cite" → "BibTeX" to get formatted entries. Quick and easy.

Visit Scholar →

Exporting from Google Scholar

1

Search for Paper

Find your paper on Google Scholar

2

Click "Cite"

Click the quotation marks icon below the paper

3

Get BibTeX

Click "BibTeX" at the bottom of the citation popup

4

Copy to .bib File

Copy the BibTeX entry and paste into your references.bib file

References in Resumes

Adding a publications list to your resume showcases your research contributions. Here's how to format references in LaTeX resumes:

Publications in Resume

resume_publications.tex
\documentclass{article}
\usepackage[style=authoryear,sorting=ydnt]{biblatex}
\addbibresource{my-publications.bib}

\begin{document}

\section*{Publications}
\nocite{*}  % Include all entries from .bib file
\printbibliography[heading=none]

\end{document}

Highlighting Your Name

highlight_name.tex
\usepackage[style=authoryear]{biblatex}
\usepackage{xcolor}

% Highlight your name in bold
\renewcommand*{\mkbibnamefamily}[1]{%
  \ifitemannotation{highlight}
    {\textcolor{blue}{\textbf{#1}}}
    {#1}}

% In .bib file, add:
% options = {dataonly=true},
% annotation = {highlight},
% to your publications

Selected Publications

selected_pubs.tex
\section*{Selected Publications}

% Manually cite specific papers
\begin{itemize}
    \item \fullcite{yourpaper2024}
    \item \fullcite{yourpaper2023}
    \item \fullcite{yourpaper2022}
\end{itemize}

% Or use keywords to filter
\printbibliography[heading=none,keyword=featured]

Academic Resume Templates

Use our LaTeX resume templates with built-in publication sections:

Troubleshooting Common Issues

Citations Show as [?]

Problem: Citations appear as [?] in the document

Solutions:

  • Complete full compilation sequence: LaTeX → BibTeX → LaTeX → LaTeX
  • Check citation key matches exactly what's in .bib file
  • Verify .bib file is in same directory or specified correctly
  • Look for errors in BibTeX log file
Bibliography is Empty

Problem: No references appear in bibliography

Solutions:

  • Ensure you've cited at least one reference with \cite{}
  • Use \nocite{*} to include all references
  • Run BibTeX: bibtex main
  • Check for errors in .bib file syntax
  • Verify \bibliography{filename} matches your .bib filename
BibTeX Parse Errors

Problem: BibTeX compilation fails with syntax errors

Common Causes:

  • Missing commas between fields
  • Unmatched braces { }
  • Special characters not escaped (%, &, #)
  • Missing required fields for entry type

Fix: Check .blg log file for specific error line numbers

Author Names Formatted Incorrectly

Problem: Names appear as "FirstLast" or truncated

Solution: Use correct BibTeX name format:

% Correct formats:
author = {John Smith}
author = {Smith, John}
author = {John Smith and Jane Doe}
author = {Smith, John and Doe, Jane}

% For organization names, use double braces:
author = {{World Health Organization}}
Bibliography Style Not Found

Error: I couldn't open style file plain.bst

Solutions:

  • Check style name is spelled correctly
  • Ensure .bst file is in same directory or TeX path
  • Use full path to custom .bst file
  • Install missing bibliography style packages

Frequently Asked Questions

How do I create a bibliography in LaTeX?

Create a .bib file with your references in BibTeX format, cite them in your document with \cite{key}, add \bibliographystyle{plain} and \bibliography{filename} to your document, then compile with: pdflatex → bibtex → pdflatex → pdflatex sequence.

What is the difference between BibTeX and biblatex?

BibTeX is the traditional bibliography system, widely supported and simpler for beginners. Biblatex is modern with better Unicode support, easier customization, and more features. BibTeX uses bibtex command and .bst files; biblatex uses biber backend and is configured in preamble. For most users, BibTeX is sufficient; use biblatex if you need advanced features or non-Latin scripts.

How do I cite a website in LaTeX?

Use the @misc entry type: @misc{key, author = {Author Name}, title = {Page Title}, year = {2024}, howpublished = {\url{https://example.com}}, note = {Accessed: 2024-10-04}}. Load the url package with \usepackage{url} to properly format URLs. Include access date in the note field for web resources.

Why are my citations showing as question marks [?]?

This means BibTeX hasn't been run or the citation key doesn't match your .bib file. Solutions: (1) Run complete compilation: pdflatex → bibtex → pdflatex → pdflatex, (2) Check citation key spelling matches .bib file exactly, (3) Ensure .bib file is in correct location, (4) Check .blg file for specific errors. Most LaTeX editors automate this with "Build & View" button.

How do I change bibliography style to APA or IEEE?

For APA-like style, use \usepackage{natbib} with \bibliographystyle{apalike}. For IEEE, use \bibliographystyle{ieeetr}. For true APA 7th edition, use biblatex: \usepackage[style=apa]{biblatex}. Change one line to switch styles—LaTeX reformats automatically. Check journal requirements for accepted styles.

How do I get BibTeX entries from Google Scholar?

Search for your paper on Google Scholar, click the quotation marks icon ("Cite") below the result, click "BibTeX" at the bottom of the citation popup, then copy the BibTeX entry and paste it into your .bib file. This is the quickest way to get properly formatted citations for academic papers.

Can I use multiple .bib files in one document?

Yes! Use \bibliography{file1,file2,file3} without spaces or .bib extensions. For biblatex, use: \addbibresource{file1.bib} \addbibresource{file2.bib}. This is useful for organizing references by project or separating personal publications from citations.

What's the best reference manager for LaTeX?

Zotero (free, open-source, excellent browser integration), JabRef (free, native BibTeX editor, LaTeX-focused), or Mendeley (free with premium, PDF annotation, cloud sync). All export perfect BibTeX. Choose Zotero for general research, JabRef for pure LaTeX workflows, Mendeley if you use Elsevier journals frequently.

How do I include all references without citing them?

Use \nocite{*} before \bibliography{} to include all entries from your .bib file in the bibliography without citing them in text. This is useful for CV publications lists or comprehensive reference sections. To include specific uncited entries, use \nocite{key1,key2}.

How do I fix special characters in bibliography?

Escape special characters in .bib files: \% for %, \& for &, \# for #. Protect capitalization with braces: title = {Study of {DNA} Sequences}. For accented characters: use {\"o} for ö, {\'{e}} for é, or use UTF-8 encoding with biblatex and XeLaTeX/LuaLaTeX for direct Unicode support.

Create Academic CVs with Publications

Use our LaTeX academic resume templates with built-in bibliography sections

Browse Academic Templates