Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to get italics for the author name within the citation using natbib with agsm style.

My MWE:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{Smith2011,
  author = {Joe Smith},
  title = {The Lord of the Wings},
  year = {2011},
  publisher = {Amazon},
}
\end{filecontents}
\documentclass{article}
\usepackage[authoryear]{natbib} % natbib used for reference style

\begin{document}
So the following should show the name \citeauthor{Smith2011} in italic \citep{Smith2011}, but it doesn't work?
\bibliographystyle{agsm} % AGSM style matches closely to Brunel style
\bibliography{\jobname}
\end{document}

I have to use Harvard style for my report, though when I tried to replace agsm with harvard, it didn't find the style? I thought it comes with natbib?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Use egreg's answer to How to cite authors in small cap with \citet? and replace \scshape with \itshape:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{Smith2011,
  author = {Joe Smith},
  title = {The Lord of the Wings},
  year = {2011},
  publisher = {Amazon},
}
\end{filecontents}
\documentclass{article}
\usepackage[authoryear]{natbib} % natbib used for reference style

\usepackage{etoolbox}
\makeatletter
\patchcmd{\NAT@test}{\else\NAT@nm}{\else\NAT@nmfmt{\NAT@nm}}{}{}
\let\NAT@up\itshape
\makeatother

\begin{document}
So the following should show the name \citeauthor{Smith2011} in italic \citep{Smith2011}, but it doesn't work?
\bibliographystyle{agsm} % AGSM style matches closely to Brunel style
\bibliography{\jobname}
\end{document}

enter image description here

EDIT: natbib provides the styles plainnat, abbrvnat, and unsrtnat. The harvard package provides additional styles that may be used with natbib, but no "harvard" style .

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.