# Undefined control sequence \citeasnoun

I want to use harvard referencing style. I have the following document:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\bibliographystyle{agsm}

\title{test}
\author{ }
\date{February 2016}

\begin{document}

\maketitle

blab \cite{Jensen2007} has done it
\citeasnoun{Jensen2007} blub bla
\citeasnoun{Jensen2007} blub bla blub.

\section{Introduction}
\bibliography{bibliography}

\end{document}


Latex keeps saying ! Undefined control sequence. l.19 \citeasnoun {Jensen2007} blub bla blub.

But I wrote \citeasnoun correctly and followed the instruction on How do I use the Harvard citation style? (using natbib). Why do I get this error all the time?

• On the page you linked i cannot find citeasnoun. Where is it from? – Johannes_B Feb 22 '16 at 17:27
• The \citeasnoun command is from the harvard package, which is pretty outdated. The natbib equivalent is \citet. The natbib documentation is a little confusing in this respect, since the last section describes a bunch of other packages, all of which natbib can replace, although with slightly different commands. – Alan Munn Feb 22 '16 at 17:28

The following basic citation commands are defined in natbib:

\citet{jon90,jam91} ⇒ Jones et al. (1990); James et al. (1991)
\citep{jon90,jam91} ⇒ (Jones et al., 1990; James et al. 1991)
\citep{jon90,jon91} ⇒ (Jones et al., 1990, 1991)
\citep{jon90a,jon90b} ⇒ (Jones et al., 1990a,b)


Additionally there are some extended commands too:

\citealt{jon90} ⇒ Jones et al. 1990
\citealt*{jon90} ⇒ Jones, Baker, and Williams 1990
\citealp{jon90} ⇒ Jones et al., 1990
\citealp*{jon90} ⇒ Jones, Baker, and Williams, 1990
\citealp{jon90,jam91} ⇒ Jones et al., 1990; James et al., 1991
\citealp[pg.~32]{jon90}  ⇒ Jones et al., 1990, pg. 32
\citenum{jon90} ⇒ 11
\citetext{priv.\ comm.} ⇒ (priv. comm.)


To extract just part of a citation, e.g. the author name or year, you can also use:

\citeauthor{jon90} ⇒ Jones et al.
\citeauthor*{jon90} ⇒ Jones, Baker, and Williams
\citeyear{jon90}  ⇒ 1990
\citeyearpar{jon90} ⇒ (1990)


There are also uppercase versions of the citation commands for sentence initial citations of names that have a name prefix such as "de" or "von".

The \citeasnoun command is from a different package. The natbib documentation is a bit confusing in this respect, since the last section describes a bunch of other packages, all of which natbib is intended to replace.

Load both the natbib and the har2nat packages. The latter "translates" macros defined in harvard.sty to expressions understood by natbib.

For instance, the file har2nat.sty contains the instruction

\newcommand{\citeasnoun}{\citet}


Note that har2nat must be loaded after natbib. In any case, the harvard package should not be loaded.

• Of course, this is only advisable for existing code. If one is starting from scratch, it makes more sense to use the natbib commands directly. – Alan Munn Feb 22 '16 at 17:42
• @AlanMunn - I fully agree. The har2nat package is meant to be used with legacy documents that (a) use one of the 7 bibliography styles of the harvard package (agsm being one of them) and (b) use some of the citation-related macros (such as \citeasnoun) of the harvard package. – Mico Feb 22 '16 at 17:47