### 7.4. The References and Bibliography environments

In most cases, you will use a {References} environment to enclose the list of literature citations used in your thesis. However, if you would like to include useful works that you have not actually cited, you should use a {Bibliography} environment instead.

There are two different ways to cite references:

• Numbered citation style: uses sequential numbers in square brackets, e.g., “[23]”.

For this style, use \cite to cite a reference in the body of the text. To produce the list of references, use this general form of the environment, assuming that you don't have more than 99 references:

  \begin{References}[99]
…
\end{References}


Use argument [9] if you have 9 or fewer references, or [999] if you have fewer than a thousand references.

Also, place this line in your preamble somewhere between the \begin{document} line and the \usepackage{nmtthesis2015} command:

\usepackage[square,numbers]{natbib}


The square option specifies that you want [square brackets] around your citations; use round if you prefer (parentheses).

• Author-year citation style: uses the author's name, the year of publication, and optionally suffix letters to distinguish different works by the same author in the same year. Examples: “[Knuth, 1986]”; “[Statler, 2004c]”. Use this general form:

  \begin{References}
…
\end{References}


Place this line in your preamble somewhere between the \begin{document} line and the \usepackage{nmtthesis2015} command:

\usepackage[square,authoryear]{natbib}


The square option specifies that you want [square brackets] around your citations; use round if you prefer (parentheses).

Citations in the body of the text can use these forms:

\cite{key}

Produces a citation of the form “Author [Year]”.

\citep{key}

Produces a citation of the from “[Author, Year]”.

### Warning

When you import a bibliography package such as natbib or apalike, be sure that the \usepackage command for that package comes before the \usepackage{nmtthesis2015}. Otherwise, your “REFERENCES” page will be incorrectly entitled “BIBLIOGRAPHY” and the entries will be erroneously double-spaced.

#### 7.4.1. Using BibTeX

If you are using BibTeX to extract the references from one or more bibliographic databases, use these commands inside the environment:

\begin{References}
\bibliography{file1, file2, ...}
\bibliographystyle{style}
\end{References}


The arguments file1, file2, ... to the \bibliography command are the names of your bibliographic databases, separated by commas.

The style argument to the \bibliographystyle command specifies how you want to format your references.

Here is an example. Suppose you are writing an article on geopataphysics, and you have two bibliographic database files named georefs.bib and patarefs.bib, and you are using the American Psychology Association style.

\begin{References}
\bibliography{georefs, patarefs}
\bibliographystyle{apalike}
\end{References}


Be sure to use the correct workflow for LaTeX documents using BibTeX: process the document once through pdflatex, then once through bibtex, and then twice more through pdflatex, to be sure the references are correctly linked to the text.

If you want to include works defined in the bibliography that you have not cited, place this command somewhere in the body of your text, and all the works will be displayed in the bibliography:

\nocite{*}


### Warning

You must have at least one \cite or \citep in the body of the text to produce a {References} section, because LaTeX will include only the references from your .bib file that you actually cite. If you don't cite any references, the \bibliography command will produce this error message:

LaTeX Error: Something's wrong--perhaps a missing \item.


#### 7.4.2. Including references directly

An alternative to BibTeX is to place your reference entries directly in the document. Here is the general form:

\begin{References}
\begin{thebibliography}
\bibitem …
\bibitem …
…
\end{thebibliography}
\end{References}


In the text that follows each \bibitem command, any additional formatting must be done with explicit commands. For example, if you prefer to italicize a journal title, you must enclose it in a \textit{…} or similar command.