# Citing author name or year without natbib or biblatex

My university's thesis class breaks when using natbib/biblatex. It breaks all \chapter*{name} commands so that they make a chapter called * with text name in their body. Using \bibliography{myRefs} with natbib gives me a screwed up chapter name (*). Using \printbibliography with biblatex does the same.

Is there an easy way to get the author name or year out of a citation without using either of those packages?

I'd happily roll my own \citeauthoryear and \citep commands if it's possible. I don't know TeX well enough to change the class file to avoid that behaviour.

• Hi and welcome, instead of doing a workaround wouldn't it be easier to fix the thesis class? – Johannes_B Mar 17 '15 at 20:09
• I mean, if the car is broken i take it to the shop. I don't get a horse in front of it dragging me and the car. This might be exaggerated, but i am trying to make a point here. – Johannes_B Mar 17 '15 at 20:11
• To answer your question of whether or not it would be easier to fix the class, for me, definitely not. I know enough tex to write a \citep macro, but I poked around the class file and it's totally incomprehensible to me. Would it be better for the next guy to have a fixed template? Yes, absolutely. – Ben Jones Mar 17 '15 at 20:17
• Well, somebody is maintaining the thing, there's gotta be a name, a mail address with the class file. – Johannes_B Mar 17 '15 at 20:21
• I think you give the thesis office too much credit. The last edit in the comments is dated 1998 and the thesis office explicitly states that they won't help with technical problems... – Ben Jones Mar 17 '15 at 20:24

You can copy the code the class uses for the references in a new bibheading style for biblatex:

\documentclass[Chicago]{uuthesis2e}

\usepackage{biblatex}

\newpage
\thispagestyle{empty}%
% Switch singlespace to after the heading gets printed.
\par\removelastskip\singlespace\par\removelastskip% GBG Oct 1993
}

\begin{document}

\chapter{usual chapter}

In \citeyear{companion} some nice guys wrote
\citetitle{companion}~\cite{companion}.
Something else \cite{aristotle:physics}.

\end{document}


Similarly for natbib:

\usepackage{natbib}
\providecommand\newblock{}
\renewcommand{\bibsection}{%
\newpage
\thispagestyle{empty}%
% Switch singlespace to after the heading gets printed.
\par\removelastskip\singlespace\par\removelastskip% GBG Oct 1993
}

• Hah, this worked for me, thanks. The University of Utah thesis office still hasn't fixed the template. :-) – Josephine Moeller Nov 7 '16 at 3:15

The class is pretty old and does not provide unnumbered chapters, which are by default starred chapters. You can somehow workaround the situation by typesetting the bibliography numbered.

\documentclass[Chicago]{uuthesis2e}
\usepackage{biblatex}
\begin{document}
\chapter{usual chapter}
In \citeyear{companion} some nice guys wrote
\citetitle{companion}~\cite{companion}.
\chapter*{starred chapter}
\cite{aristotle:physics}
\end{document}


You can do the same with package natbib, which isn't near as powerful as biblatex. Funny thing is, you need to provide command \newblock as the old class does not provide this command itself.

\documentclass[Chicago]{uuthesis2e}
\providecommand\newblock{}
\usepackage{natbib}
\renewcommand{\bibsection}{\chapter{\bibname}}
\begin{document}
\chapter{usual chapter}
%In \citeyear{companion} some nice guys wrote
%\citetitle{companion}~
\cite{companion}.
\chapter*{starred chapter}
\cite{aristotle:physics}
\bibliographystyle{unsrtnat}
\bibliography{biblatex-examples}
\end{document}


A closer look to the class file just revealed, that the class provides the command \mainheading for some kind of unnumbered chapter. The original bibheading was set this way. The standard output can be seen in the following picture again using natbib. There is no clearpage by default.

\documentclass[Chicago]{uuthesis2e}
\providecommand\newblock{}
\usepackage{natbib}