50 Citations. 50 Minutes. 50 Headaches.
You've written a great paper. Now the journal wants APA format. You spend an hour reformatting. Paper gets rejected. Next journal wants IEEE. Start over.
Sound familiar? According to a 2019 study in PLOS ONE, researchers spend an average of 52 hours per year on citation formatting alone. That's more than a full work week—every year—on something a computer should do for you.
BibTeX eliminates this entirely. One database. Infinite styles. Change formats with a single line of code. Try our BibTeX generator to create entries from DOIs automatically.
Here's how to set it up right—and never format a citation by hand again.
BibTeX Fundamentals
The Basic Workflow
- Create a
.bibfile with your references - Cite sources in your
.texfile - Choose a bibliography style
- Compile (LaTeX → BibTeX → LaTeX → LaTeX)
Entry Structure
Every BibTeX entry follows this pattern:
@type{citekey,
field1 = {value1},
field2 = {value2},
...
}Example:
@article{shannon1948,
author = {Claude E. Shannon},
title = {A Mathematical Theory of Communication},
journal = {Bell System Technical Journal},
year = {1948},
volume = {27},
number = {3},
pages = {379--423}
}Entry Types
Journal Articles (@article)
The most common entry type:
@article{einstein1905,
author = {Albert Einstein},
title = {On the Electrodynamics of Moving Bodies},
journal = {Annalen der Physik},
year = {1905},
volume = {322},
number = {10},
pages = {891--921},
doi = {10.1002/andp.19053221004}
}Required fields: author, title, journal, year
Conference Papers (@inproceedings)
@inproceedings{vaswani2017,
author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and others},
title = {Attention Is All You Need},
booktitle = {Advances in Neural Information Processing Systems},
year = {2017},
pages = {5998--6008}
}Required fields: author, title, booktitle, year
Books (@book)
@book{knuth1984,
author = {Donald E. Knuth},
title = {The {\TeX}book},
publisher = {Addison-Wesley},
year = {1984},
address = {Reading, MA}
}Required fields: author/editor, title, publisher, year
Book Chapters (@incollection)
@incollection{rumelhart1986,
author = {David E. Rumelhart and Geoffrey E. Hinton and Ronald J. Williams},
title = {Learning Representations by Back-propagating Errors},
booktitle = {Parallel Distributed Processing},
editor = {Rumelhart, David E. and McClelland, James L.},
publisher = {MIT Press},
year = {1986},
pages = {318--362}
}Theses (@phdthesis, @mastersthesis)
@phdthesis{lamport1978,
author = {Leslie Lamport},
title = {The Implementation of Reliable Distributed Multiprocess Systems},
school = {Massachusetts Institute of Technology},
year = {1978}
}Miscellaneous (@misc)
For everything else—preprints, websites, software:
@misc{openai2023,
author = {OpenAI},
title = {GPT-4 Technical Report},
year = {2023},
eprint = {2303.08774},
archivePrefix = {arXiv}
}Citing in Your Document
Basic Setup
In your LaTeX document:
\documentclass{article}
\begin{document}
Shannon's foundational work \cite{shannon1948} established...
\bibliographystyle{plain}
\bibliography{references} % references.bib
\end{document}Citation Commands
| Command | Output (plain style) |
|---------|---------------------|
| \cite{key} | [1] |
| \cite{key1,key2} | [1, 2] |
| \cite[p.~5]{key} | [1, p. 5] |
Using natbib
The natbib package provides more citation styles:
\usepackage[round]{natbib}
\citet{shannon1948} % Shannon (1948)
\citep{shannon1948} % (Shannon, 1948)
\citet*{shannon1948} % Full author list
\citeauthor{shannon1948} % Shannon
\citeyear{shannon1948} % 1948Using biblatex
For maximum flexibility, biblatex offers extensive customization:
\usepackage[style=apa, backend=biber]{biblatex}
\addbibresource{references.bib}
\begin{document}
\textcite{shannon1948} % Shannon (1948)
\parencite{shannon1948} % (Shannon, 1948)
\printbibliography
\end{document}Note: biblatex uses biber instead of bibtex for processing.
Bibliography Styles
Common Built-in Styles
| Style | Description |
|-------|-------------|
| plain | Numbered, alphabetical by author |
| unsrt | Numbered, order of citation |
| alpha | Labels like [Ein05] |
| abbrv | Abbreviated names |
| ieeetr | IEEE Transactions |
| acm | ACM format |
Journal-Specific Styles
Most journals provide their own style files:
\bibliographystyle{naturemag} % Nature
\bibliographystyle{science} % Science
\bibliographystyle{apalike} % APA-ishDownload these from the journal's author guidelines.
Author Name Formatting
Basic Format
author = {First Last}
% or
author = {Last, First}Multiple Authors
Use and between authors:
author = {John Smith and Jane Doe and Bob Wilson}
% or
author = {Smith, John and Doe, Jane and Wilson, Bob}Corporate Authors
Use braces to prevent name parsing:
author = {{World Health Organization}}
author = {{National Academy of Sciences}}Many Authors
For papers with many authors, list the first few and use "and others":
author = {First Author and Second Author and Third Author and others}Some styles render this as "et al."
Handling Special Characters
Accented Characters
author = {M{\"u}ller, Hans} % Müller
author = {Gonz{\'a}lez, Maria} % González
author = {Bj{\"o}rk, Anders} % BjörkSpecial Symbols
title = {The \$100 Algorithm} % Dollar sign
title = {50\% Improvement} % Percent
title = {Black \& White} % Ampersand
title = {The {\TeX} System} % TeX logoPreserving Capitalization
BibTeX may lowercase titles. Protect important words:
title = {Introduction to {Bayesian} Statistics}
title = {The {United States} Constitution}
title = {{DNA} Sequencing Methods}Organizing Your Bibliography
One File or Many?
Per-project files:
- Self-contained projects
- Easy to share
- May have duplicates across projects
Master bibliography:
- Single source of truth
- No duplicates
- Must share separately
Most researchers benefit from per-project files.
Consistent Citation Keys
Develop a convention:
authorYear → shannon1948
authorYearWord → shannon1948information
firstAuthorEtAl → vaswani2017attentionWhatever you choose, be consistent.
Alphabetize Entries
Keep your .bib file alphabetized by citation key. It makes finding and updating entries much easier.
Common Problems and Solutions
"Citation undefined"
Symptom: [?] in your document
Causes:
- Typo in citation key
- Entry not in
.bibfile - Didn't run BibTeX
Solution: Check keys match exactly, run the full compile sequence.
Missing Fields
Symptom: Warning about missing author/title/year
Solution: Add the required fields. Check the entry type requirements.
Encoding Issues
Symptom: Garbled characters in output
Solution: Save your .bib file as UTF-8, or use LaTeX escapes for special characters.
Style Not Found
Symptom: "I couldn't open style file X.bst"
Solution: Download the style file and place it in your project folder.
Tools That Help
Reference Managers
Zotero:
- Free and open source
- Browser extension captures references
- Better BibTeX plugin for export
Mendeley:
- Good PDF organization
- BibTeX export built in
Online Tools
doi2bib.org:
- Paste a DOI, get BibTeX
- Fast and accurate
Semantic Scholar:
- Search by title
- Clean BibTeX export
Google Scholar:
- Wide coverage
- Often needs cleanup
Validation Tools
bibclean:
- Checks for common errors
- Normalizes formatting
bibtool:
- Sorts and formats entries
- Removes duplicates
Best Practices
1. Capture References Early
Add papers to your .bib file as you read them, not when writing.
2. Include DOIs
DOIs make your references findable and verifiable:
doi = {10.1000/xyz123}3. Use Consistent Abbreviations
Define journal abbreviations once:
@string{prl = "Physical Review Letters"}
@string{jcp = "Journal of Chemical Physics"}
@article{...,
journal = prl,
...
}4. Keep Original Entries
When you modify an entry, keep the original in a comment:
% Original from Google Scholar:
% @article{...}
@article{smith2020,
% cleaned up entry
}5. Verify Before Submission
Before submitting a paper:
- Check all citations resolve
- Verify author names are correct
- Ensure page numbers are complete
- Confirm DOIs work
Quick Reference
Essential Entry Types
| Type | Use For |
|------|---------|
| @article | Journal papers |
| @inproceedings | Conference papers |
| @book | Books |
| @incollection | Book chapters |
| @phdthesis | Dissertations |
| @misc | Preprints, websites |
Essential Fields
| Field | Description |
|-------|-------------|
| author | Author names (and-separated) |
| title | Work title |
| year | Publication year |
| journal | Journal name (articles) |
| booktitle | Conference name (proceedings) |
| doi | Digital Object Identifier |
| url | Web address |
| pages | Page range (use -- for range) |
Conclusion
BibTeX transforms bibliography management from tedious formatting to simple data entry. Invest time in learning it properly, and you'll save hours on every paper you write.
Start with a clean .bib file, develop consistent habits, and let the tools handle the formatting. Your future self—facing a journal that wants a completely different citation style—will thank you.