Skip to Main Content

BibTeX

This guide provides an overview of using the reference manager, BibTeX.

Citing with BibTeX

The basic command used to cite references stored in .bib files is the \cite{citation_key} command where citation_key is the unique identifier associated with the entry in the .bib file.  To cite the Fenn article noted on the front page of this guide, the command would look like this:

\cite{fenn2006}

The command is placed in the document in the location where the in-text citation is needed. This command will not only add the in-text citation but add the reference list entry as well.

Multiple references can be cited by comma-separating them in the cite command:  \cite{fenn2006,markey2009,daly2010}

If you want to include any bibliography entries that you did not cite in your document, you may add the \nocite{citation_key} for each reference you wish to include. If you want to include all entries, use the \nocite{*} command.

Specifying the .bib File to Use

In order for BibTeX and LaTeX to know from what file to pull the citations indentified in the \cite command, include the \bibliography{file} command where file is the name of the .bib file where the citations are stored.  To pull citations from a reference file called sample.bib, the command would look like this:

\bibliography{sample}

This command is placed between the \begin{document} and \end{document} commands. Place it in the document where the bibliography will start. 

Available BibTeX Styles

BibTeX comes pre-loaded with a number of different citation style files (.bst files).  This guide from Reed College gives examples of each of the pre-loaded citation styles.  Other BibTeX citation styles can be obtained from the CTAN* website.  The Reed College guide provides a nice listing of discipline-specific BibTeX citation styles; always check publisher websites to see which citation style is required by the publication for which you are writing.

*CTAN, the (C)omprehensive (T)eX (A)rchive (N)etwork, is the authoritative collection of materials related to the TeX typesetting system.

Using a Specific Citation Style

In order to display in-text citations and reference list entries is a specific citaiton style, include the \bibliographystyle{style} command where style refers to the citation style needed and calls the citation style file needed.  BibTeX citation style files have the .bst extension  To cite references in the SIAM citation style, the command would look like this:

\bibliographystyle{siam}

Usually the command is placed at the end of the document (after the content) but before the \end{document} command.

Using the natbib Package

The regular \cite command generates numerical citations. The natbib package allows users to include either numerical citations or author-date citations. Natbib must be available in the implementation of LaTeX being used. Get it from CTAN and install it if needed. To use the natbib package, include this in the preamble:

\usepackage[options]{natbib}      

To review some of the "options" available for use with the \usepackage command, see the Options section at the end of this guide.

The natbib package allows for the use of textual (\citet) or parenthetical (\citep) citations (see website for examples).  Revised bibliography styles must also be used and three of the more common are plainnat.bst, abbrvnat.bst and unsrtnat.bst.  They correspond to the standard .bst styles but are configured to work with natbib.