%---------------------------------------------------------
% Chapter: A chapter about citations
%----------------------------------------------------------
\chapter{Citations}
\label{sec:CITATIONS}

Scholarly citations can be a bit of an ugly issue, in that different
disciplines have different ideas about how references should appear
both in the body of a document as well as in its bibliography.  And,
for that matter, whether there should be one bibliography at the end
of the document, or whether there should be one at the end of each
section or chapter.

% This depends upon the nicelist environment defined in lists.tex.

Here are some reference styles you may come across; there are many more.
\begin{nicelist}
\item {[12]}
\item Aardvark et al.\ [12]
\item Aardvark et al.\ (2007)
\item (Aardvark et al.\ 2007)
\item Aardvark et al.\ (2007, Chap. 22)
\item Aardvark, Bloggins, Crumpet and Domingo [12]
\item {[ABCD07]}
\item (Zhang 1990, Zhu 1991, Zhao and Zou 1992, and Zhong, Zheng and
Zeng 2001)
\end{nicelist}

You could just type the citation reference in the body of your thesis
wherever you want it, but there are two problems with that.  First, if
you use ``[12]'' and later introduce another citation which comes
before that one in the bibliography, you will have to re-number
everything.  Second, if you wish to submit your work to a journal or
conference, changing all of the references by hand is tedious and
error-prone.

To help deal with this, we can use a tool called \textsc{Bib}\TeX\ to
manage the complexity.  This thesis template is set up to use this
tool is a fairly simple way; if, in the future, you start publishing
many documents with the use of \textsc{Bib}\TeX, you will want to
spend a few minutes learning more of its capabilities.

To get going quickly, you can put your cited works in the file
\verb|thesisbib.bib|; the format of this file is somewhat strict, and
you might need to do an on-line search to see how to format a citation
for a particular document type, if you can't work your situation out
from any of the examples found therein.

This file is searched when \LaTeX\ looks for a citation.  (Actually,
it is processed when the \verb|bibtex| command is run, but that's a
fine point you probably don't need to worry about.)  You may keep all
of your bibliographic entries in this file, even if you aren't using
them for your thesis; unused entries will be silently ignored.

The ``normal'' citation capabilities of \LaTeX\ can be lacking in
functionality.  For instance, \cite[TEST]{COOKIE} doesn't tell us
anything about the ``cookie'' article within the paper and we have to
manually track authors, etc.  To deal with this, this thesis template
uses the \verb|natbib| citation package, combined with the
\verb|plainnat| style.  (Do a search for \verb|natbib.pdf| to find out
more information on this package.)

%Using this, we can cite the same
%paper in many different ways: \cite{HHG2TG}, \citet{HHG2TG},
%\citep{HHG2TG}, \citep[before][after]{HHG2TG}, \citep[see][]{HHG2TG},
%\citep[see][chapter 1]{HHG2TG}, \citep[chapter 1]{HHG2TG},
%\citealt{HHG2TG}, \citealt*{HHG2TG}.

By default, \LaTeX\ uses \verb|\cite| to put a citation into the body
of the document, but \verb|natbib| also provides
\verb|\citep| (parenthetical) and \verb|\citet| (textual).  Some
variations on these are shown in Table~\ref{citation-table}.  In
Table~\ref{mult-cits-table} examples of citing multiple references (in
the same place) is shown.  In
Table~\ref{cits+options-table} we show how the citations can be
``dressed up'' with some surrounding commentary.

			
\begin{table}[ht]
    \footnotesize
    \centering
    \caption{Citation commands and results, in parenthetical or textual style.}
    \begin{tabular}[ht]{llll}
	\hline
	Command & Result \\
	\hline
	\verb|\cite{Purchase}| & \cite{Purchase}\\
	\verb|\citep{Purchase}| & \citep{Purchase}\\
	\verb|\citep[chap. 2]{Purchase}| & \citep[chap. 2]{Purchase}\\
	\verb|\citep[see][]{Purchase}| & \citep[see][]{Purchase}\\
	\verb|\citep[see][chap. 2]{Purchase}| & \citep[see][chap. 2]{Purchase}\\
	\verb|\citep*{Purchase}| & \citep*{Purchase}\\
	\verb|\citet{Purchase}| & \citet{Purchase}\\
	\verb|\citet[chap. 2]{Purchase}| & \citet[chap. 2]{Purchase}\\
	\verb|\citet*{Purchase}| & \citet*{Purchase}\\
	\hline
    \end{tabular}
    \label{citation-table}
\end{table}

\begin{table}[ht]
    \footnotesize
    \centering
    \caption{Multiple citations.}
    \begin{tabular}[ht]{llll}
	\hline
	Command & Result \\
	\hline
	\verb|\cite{Purchase,HHG2TG}| & \cite{Purchase,HHG2TG} \\
	\verb|\citep{Purchase,HHG2TG}| & \citep{Purchase,HHG2TG} \\
	\verb|\citep{Purchase,Kaufmann}| & \citep{Purchase,Kaufmann} \\
	\verb|\citep{Purchase,Purchase2}| & \citep{Purchase,Purchase2} \\
	\verb|\citet{Purchase,HHG2TG}| & \citet{Purchase,HHG2TG} \\
	\verb|\citet{Purchase,Kaufmann}| & \citet{Purchase,Kaufmann} \\
	\verb|\citet{Purchase,Purchase2}| & \citet{Purchase,Purchase2} \\
	\hline
    \end{tabular}
    \label{mult-cits-table}
\end{table}

\begin{table}[ht]
    \footnotesize
    \centering
    \caption{Citations with Optional Text.}
    \begin{tabular}[ht]{llll}
	\hline
	Command & Result \\
	\hline
	\verb|\cite[chap. 2]{Purchase}| & \cite[chap. 2]{Purchase} \\
	\verb|\cite[see][chap. 2]{Purchase}|&\cite[see][chap. 2]{Purchase}\\
	\verb|\citep[chap. 2]{Purchase}| & \citep[chap. 2]{Purchase} \\
	\verb|\citep[see][]{Purchase}| & \citep[see][]{Purchase} \\
	\verb|\citep[see][chap. 2]{Purchase}|&\citep[see][chap. 2]{Purchase}\\
	\verb|\citet[chap. 2]{Purchase}| & \citet[chap. 2]{Purchase} \\
	\verb|\citet[see][chap. 2]{Purchase}|&\citet[see][chap. 2]{Purchase}\\
	\hline
    \end{tabular}
    \label{cits+options-table}
\end{table}

With the reference style used by this sample thesis, the items in the
bibliography are given meaningless numbers and show up in your text
like ``[42]'', which probably tells the reader nothing, forcing him or
her to look to the back, should they want to see whose work is being
referenced.  However, by changing
``\verb|\bibliographystyle{plaintat}|'' to
``\verb|\bibliographystyle{alpha}|'' the above reference might show up
as ``[Ada79]''.  If you want to experiment with different styles, just
change the settings in \verb|header.tex| and recompile the document.

Normally with \LaTeX\ when you use citations such as these, in the PDF
output you will see green boxes around links to the bibliography, red
boxes around other ``internal'' links and blue (or is it cyan?\null)
boxes around external links.  Jim Diamond thinks these are horribly
ugly and turned this mis-feature off in the Acadia thesis styles.
Notice that you can discover whether something which looks like it
could be a link is, indeed, a link, by hovering the mouse cursor over
the text for a second or two.  If for some reason you wish to uglify
your PDF output by including these, you can change it to look how you
like.  Since that is such a bad idea, we are not going to tell you how
to do it.

