4

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?

1 Answer 1

5

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 .

1
  • is there a way i could just italicise et al part ? Sep 28, 2021 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .