Topic 3
BibTeX
In LaTeX, it is convenient to organize references in a .bib file. Sources that are not cited in the .tex file do not appear in the compiled PDF, so one .bib file can be shared across multiple papers.
What citations need
A BibTeX workflow uses two files together.
- The
.bibfile stores reference entries. - The
.texfile cites selected entries with citation keys.
Only the entries cited in the .tex file appear in the compiled PDF. This lets you keep many references in one bibliography file while printing only the sources used in the current manuscript.
Create a .bib file
Create a new file in the project root folder.
Name the file reference.bib.
Keeping the .bib file beside the manuscript makes it easy to track the reference file in Git and reuse it across related papers.
Find a BibTeX entry
Open a bibliographic database such as MathSciNet, Google Scholar, a journal website, or a publisher page.
MathSciNet
Search for the book, article, or paper you want to cite.
Open the record and choose the citation tool.
Select BibTeX, then copy the citation entry.
Add the entry
Paste the copied BibTeX entry into reference.bib.
@book {MR737190,
AUTHOR = {Gilbarg, David and Trudinger, Neil S.},
TITLE = {Elliptic partial differential equations of second order},
SERIES = {Grundlehren der mathematischen Wissenschaften [Fundamental
Principles of Mathematical Sciences]},
VOLUME = {224},
EDITION = {Second},
PUBLISHER = {Springer-Verlag, Berlin},
YEAR = {1983},
PAGES = {xiii+513},
ISBN = {3-540-13025-X},
MRCLASS = {35Jxx (35-01)},
MRNUMBER = {737190},
MRREVIEWER = {O.\ John},
DOI = {10.1007/978-3-642-61798-0},
URL = {https://doi-org.proxy1.cl.msu.edu/10.1007/978-3-642-61798-0},
}
The part after { is the citation key. In this example, the key is MR737190.
Cite the source
In the manuscript, cite the source with the citation key.
\cite{MR737190}
Then tell LaTeX which bibliography file to use.
\bibliographystyle{plain}
\bibliography{reference}
The file name is written without .bib, so reference.bib becomes reference.
Print the bibliography
Compile the manuscript and check the PDF.
The citation appears in the manuscript, and the cited entry appears in the references section. If a reference exists in reference.bib but is never cited in the .tex file, it will not appear in the PDF.
Some templates use biblatex instead of BibTeX. In that case, the project may use commands such as \addbibresource{reference.bib} near the top and \printbibliography near the end. Use the system your template expects.
After adding or changing citations, compile the manuscript again and check the PDF.
If the bibliography does not update immediately, run the build again. Bibliography tools often need more than one build pass before citations and reference lists are fully updated.