Skip to main content
Master professional bibliography management in LaTeX using BibTeX. This comprehensive guide covers everything from basic citations to advanced bibliography customization for academic papers, theses, and publications.
Quick start: BibTeX automates bibliography formatting in LaTeX. Create a .bib file with your references, cite them with \cite{key}, and LaTeX handles the formatting based on your chosen style.Prerequisites: Basic LaTeX knowledge. For citations basics, see Bibliography & Citations.

What You’ll Learn

  • ✅ How BibTeX works with LaTeX
  • ✅ Creating and managing .bib files
  • ✅ Citation commands and variations
  • ✅ Bibliography styles (plain, alpha, abbrv, etc.)
  • ✅ Advanced customization techniques
  • ✅ Best practices for reference management
  • ✅ Troubleshooting common issues

How BibTeX Works

BibTeX is a bibliography management tool that works alongside LaTeX to handle citations and references automatically. Here’s the workflow:
BibTeX Workflow
1
Create .bib file
Store references
2
Cite in .tex
Use \cite commands
3
Compile
LaTeX + BibTeX
4
Output
Formatted bibliography

Basic Setup

Step 1: Create Your Main Document

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Sample Article with Bibliography}
\author{Your Name}
\date{\today}

\begin{document}
\maketitle

\section{Introduction}
According to \cite{einstein1905}, the theory of special relativity 
revolutionized physics. Later work by \cite{hawking1988} expanded 
our understanding of the universe.

% Bibliography
\bibliographystyle{plain}  % Choose citation style
\bibliography{references}   % Link to .bib file (without extension)

\end{document}

Step 2: Create Your Bibliography File

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

@book{hawking1988,
    author = {Hawking, Stephen},
    title = {A Brief History of Time},
    publisher = {Bantam Books},
    year = {1988},
    address = {New York},
    isbn = {978-0553380163}
}

Step 3: Compile Your Document

Compilation sequence:
  1. pdflatex main.tex (first pass)
  2. bibtex main (process bibliography)
  3. pdflatex main.tex (incorporate citations)
  4. pdflatex main.tex (finalize references)
Rendered output:

Sample Article with Bibliography

Your Name
November 28, 2024

1 Introduction

According to [1], the theory of special relativity revolutionized physics. Later work by [2] expanded our understanding of the universe.

References

[1] Albert Einstein. On the electrodynamics of moving bodies. Annalen der Physik, 17:891–921, 1905.

[2] Stephen Hawking. A Brief History of Time. Bantam Books, New York, 1988.

BibTeX Entry Types

Common Entry Types

@article

Journal articles, magazine articles
@article{key,
  author = {Author Name},
  title = {Article Title},
  journal = {Journal Name},
  year = {2023}
}

@book

Books with publisher
@book{key,
  author = {Author Name},
  title = {Book Title},
  publisher = {Publisher Name},
  year = {2023}
}

@inproceedings

Conference papers
@inproceedings{key,
  author = {Author Name},
  title = {Paper Title},
  booktitle = {Conference Name},
  year = {2023}
}

@phdthesis

PhD dissertations
@phdthesis{key,
  author = {Author Name},
  title = {Thesis Title},
  school = {University Name},
  year = {2023}
}

Complete Entry Types Reference

@article

Required: author, title, journal, year
Optional: volume, number, pages, month, doi, note

@book

Required: author/editor, title, publisher, year
Optional: volume/number, series, address, edition, month, isbn, note

@booklet

Required: title
Optional: author, howpublished, address, month, year, note

@inbook

Required: author/editor, title, chapter/pages, publisher, year
Optional: volume/number, series, type, address, edition, month, note

@incollection

Required: author, title, booktitle, publisher, year
Optional: editor, volume/number, series, type, chapter, pages, address, edition, month, note

@inproceedings / @conference

Required: author, title, booktitle, year
Optional: editor, volume/number, series, pages, address, month, organization, publisher, note

@manual

Required: title
Optional: author, organization, address, edition, month, year, note

@mastersthesis

Required: author, title, school, year
Optional: type, address, month, note

@misc

Required: none
Optional: author, title, howpublished, month, year, note, url

@phdthesis

Required: author, title, school, year
Optional: type, address, month, note

@proceedings

Required: title, year
Optional: editor, volume/number, series, address, month, publisher, organization, note

@techreport

Required: author, title, institution, year
Optional: type, number, address, month, note

@unpublished

Required: author, title, note
Optional: month, year

Citation Commands

Basic Citation Commands

% Basic citation
\cite{einstein1905}                    % Output: [1]

% Multiple citations
\cite{einstein1905,hawking1988}        % Output: [1, 2]

% Citation with page number
\cite[p.~42]{hawking1988}              % Output: [2, p. 42]

% Citation with prefix
\cite[see][]{einstein1905}             % Output: [see 1]

% Citation with prefix and page
\cite[see][p.~15]{einstein1905}        % Output: [see 1, p. 15]

% Textual citations (with natbib package)
\usepackage{natbib}
\citet{einstein1905}                   % Output: Einstein (1905)
\citep{einstein1905}                   % Output: (Einstein, 1905)
\citeauthor{einstein1905}              % Output: Einstein
\citeyear{einstein1905}                % Output: 1905
Rendered output examples:
CommandOutput (plain style)Output (author-year)
\cite[1](Einstein, 1905)
\cite[1, 2](Einstein, 1905; Hawking, 1988)
\cite[p.~42][2, p. 42](Hawking, 1988, p. 42)
\citetEinstein (1905)
\citep(Einstein, 1905)

Bibliography Styles

Standard BibTeX Styles

plain

\bibliographystyle

Entries sorted alphabetically by author, numbered [1], [2], [3]…

[1] A. Einstein. On the electrodynamics…
[2] S. Hawking. A Brief History of Time…

alpha

\bibliographystyle

Labels like [Ein05], [Haw88] based on author and year

[Ein05] A. Einstein. On the electrodynamics…
[Haw88] S. Hawking. A Brief History of Time…

abbrv

\bibliographystyle

Like plain but with abbreviated first names, journal names

[1] A. Einstein. On the electrodynamics… Ann. Phys.
[2] S. Hawking. A Brief History of Time…

unsrt

\bibliographystyle

Entries in order of citation, not alphabetically

[1] S. Hawking. A Brief History of Time…
[2] A. Einstein. On the electrodynamics…

Author-Year Styles (natbib)

\usepackage{natbib}

% Choose one of these styles:
\bibliographystyle{plainnat}    % Author-year version of plain
\bibliographystyle{abbrvnat}    % Author-year version of abbrv
\bibliographystyle{unsrtnat}    % Author-year version of unsrt

% Popular journal styles:
\bibliographystyle{apalike}     % APA-like style
\bibliographystyle{chicago}     % Chicago Manual of Style
\bibliographystyle{harvard}     % Harvard citation style
\bibliographystyle{agsm}        % Australian Government Style Manual

Custom Bibliography Styles

Many journals and institutions provide their own .bst files. Common examples:
  • IEEEtran.bst - IEEE Transactions
  • ACM-Reference-Format.bst - ACM publications
  • apa.bst - American Psychological Association
  • vancouver.bst - Biomedical journals
  • nature.bst - Nature journals

Managing Large Bibliographies

Organizing Your .bib File

% ==========================================
% BOOKS
% ==========================================

@book{knuth1984tex,
    author = {Knuth, Donald E.},
    title = {The {\TeX}book},
    publisher = {Addison-Wesley},
    year = {1984},
    address = {Reading, Massachusetts},
    isbn = {0-201-13447-0},
    keywords = {tex, typography, typesetting}
}

@book{lamport1994latex,
    author = {Lamport, Leslie},
    title = {{\LaTeX}: A Document Preparation System},
    publisher = {Addison-Wesley},
    year = {1994},
    edition = {2nd},
    isbn = {0-201-52983-1},
    keywords = {latex, documentation}
}

% ==========================================
% JOURNAL ARTICLES
% ==========================================

@article{shannon1948mathematical,
    author = {Shannon, Claude E.},
    title = {A Mathematical Theory of Communication},
    journal = {Bell System Technical Journal},
    year = {1948},
    volume = {27},
    number = {3},
    pages = {379--423},
    month = jul,
    doi = {10.1002/j.1538-7305.1948.tb01338.x},
    keywords = {information theory, communication}
}

% ==========================================
% CONFERENCE PAPERS
% ==========================================

@inproceedings{turing1950computing,
    author = {Turing, Alan M.},
    title = {Computing Machinery and Intelligence},
    booktitle = {Mind},
    year = {1950},
    volume = {59},
    number = {236},
    pages = {433--460},
    keywords = {artificial intelligence, turing test}
}

Using Multiple .bib Files

% You can use multiple bibliography files
\bibliography{books,articles,conferences}

% Or keep project-specific references separate
\bibliography{general-refs,project-specific-refs}

String Definitions for Consistency

% Define common strings to ensure consistency
@string{ieee = "IEEE Transactions on"}
@string{acm = "ACM Computing Surveys"}
@string{springer = "Springer-Verlag"}
@string{mit = "MIT Press"}

% Use the strings in entries
@article{example2023,
    author = {Example, Author},
    title = {Example Article},
    journal = ieee # " Software Engineering",  % String concatenation
    year = {2023},
    publisher = springer
}

Advanced Features

Cross-References

@book{edited-volume2023,
    editor = {Smith, Jane and Doe, John},
    title = {Advances in Computer Science},
    publisher = {Academic Press},
    year = {2023}
}

@incollection{chapter2023,
    author = {Johnson, Alice},
    title = {Machine Learning Applications},
    pages = {45--67},
    crossref = {edited-volume2023}  % Inherits book details
}

Custom Fields and Notes

@article{example2023custom,
    author = {Author, Example},
    title = {Article with Custom Fields},
    journal = {Example Journal},
    year = {2023},
    % Standard optional fields
    note = {Forthcoming},
    abstract = {This article discusses...},
    keywords = {keyword1, keyword2, keyword3},
    % URL and access information
    url = {https://example.com/article},
    urldate = {2023-11-28},
    % Modern identifiers
    doi = {10.1234/example.2023},
    eprint = {2301.00000},
    archivePrefix = {arXiv}
}

Special Characters and Formatting

@article{special-chars2023,
    % Preserving capitalization
    title = {The {NASA} {M}ars {R}over: A Study of {AI} in Space},
    
    % Special characters
    author = {M{\"u}ller, Hans and Garc{\'\i}a, Jos{\'e}},
    
    % Math in titles
    title = {On the $\mathcal{O}(n\log n)$ Complexity of Sorting},
    
    % Preserving spaces and formatting
    title = {The {{\TeX}} and {{\LaTeX}} Companion},
    
    % Corporate authors
    author = {{Microsoft Corporation}},
    
    % Multiple authors with "and others"
    author = {First, A. and Second, B. and Third, C. and others},
    
    journal = {Example Journal},
    year = {2023}
}

Best Practices

1. Consistent Key Naming

✅ Good Key Naming Conventions

  • author2023keyword - e.g., einstein1905relativity
  • author2023a, author2023b - for multiple papers same year
  • conference2023author - e.g., icml2023smith

❌ Poor Key Names

  • paper1, paper2 - not descriptive
  • my-favorite-paper - too subjective
  • ref:2023/05/28 - uses special characters

2. Complete Information

Always include:
  • DOI when available - for reliable access
  • URL for online resources
  • ISBN for books
  • Abstract for searchability
  • Keywords for organization

3. Version Control

# Track your bibliography files
git add references.bib
git commit -m "Add quantum computing references"

# Create backups before major changes
cp references.bib references.bib.backup

# Use meaningful commit messages
git commit -m "Update author names to include middle initials"

Troubleshooting

Common causes:
  1. Missing \bibliography{filename} command
  2. Incorrect filename (don’t include .bib extension)
  3. Didn’t run BibTeX: bibtex main
  4. Need additional LaTeX passes
Solution:
pdflatex main
bibtex main
pdflatex main
pdflatex main
Common causes:
  1. Typo in citation key
  2. Entry not in .bib file
  3. BibTeX compilation failed
  4. Multiple .bib files not all included
Debugging:
% Check the .blg file for errors
% Look for "Warning--I didn't find a database entry for..."
Common causes:
  1. Wrong bibliography style
  2. Missing required fields
  3. Special characters not escaped
Solutions:
  • Verify all required fields are present
  • Use {} to preserve capitalization
  • Check .bst file compatibility
For UTF-8 support:
\usepackage[utf8]{inputenc}  % For pdfLaTeX
% or use XeLaTeX/LuaLaTeX for native UTF-8
For special characters:
author = {M{\"u}ller, J{\"o}rg}  % ü, ö
author = {Garc{\'\i}a, Jos{\'e}}   % í, é

Modern Alternatives

BibLaTeX (Advanced Users)

BibLaTeX is a modern replacement for BibTeX with more features:
  • Better Unicode support
  • More entry types and fields
  • Customizable citation styles
  • Multiple bibliographies in one document
Learn more: BibLaTeX Guide

Reference Managers

Popular tools that export to BibTeX:
  • Zotero - Free, open-source
  • Mendeley - Free with Elsevier account
  • JabRef - BibTeX-specific manager
  • EndNote - Commercial, widely used
  • Paperpile - Modern web-based

Quick Reference Card

BibTeX Quick Reference

Essential Commands

\bibliographystyle{style}\bibliography{bibfile}\cite{key}\nocite{key}\nocite{*}

Compilation Order

  1. pdflatex main.tex
  2. bibtex main
  3. pdflatex main.tex
  4. pdflatex main.tex

Common Styles

  • plain - Numbered, alphabetical
  • alpha - Author-year labels
  • abbrv - Abbreviated names
  • unsrt - Citation order
  • apalike - APA style

Next Steps

LaTeX Cloud Studio handles BibTeX compilation automatically! Simply upload your .bib file and cite your references - we take care of the compilation sequence for you.
I