2

I am writing my dissertation and I must use a Harvard style bibliography.

I am using natbib and agsm. The problem I have is the following: if I want to cite a book that has only 2 authors either I do not get an & between the authors or I do not get a comma between the authors and the date.

I get (author1 and author2, year) if I use

\usepackage{natbib}
\bibliographystyle{agsm}
\citestyle{aysep{char}}

or (author1 & author2 year) if I use

\usepackage[style=authoryear]{natbib}
\bibliographystyle{agsm}

What do I have to do to get (author1 & author2, year)? What am I doing wrong?

6
  • Welcome to TeX.SX!. Please always show a minimal but working example with Bibliography (MWEB) instead of a code snippet only. This would help us to reproduce the problem and to test our own suggestions. Commented May 8, 2017 at 14:12
  • There are lots and lots of bibliography styles out there that generate harvard-style -- also known as authoryear-style -- citation call-outs. Why did you choose the agsm style? It's known to make some, shall we say, idiosyncratic design choices.
    – Mico
    Commented May 8, 2017 at 14:41
  • 1
    Incidentally, doesn't the instruction \usepackage[style=authoryear]{natbib} generate an error message. I'd write \usepackage[authoryear]{natbib} instead. Similarly, does \citestyle{aysep{char}} work? Writing \setcitestyle{aysep={char}} is more likely to succeed...
    – Mico
    Commented May 8, 2017 at 14:42
  • @Schweinebacke next time I'll provide a MWEB Commented May 9, 2017 at 9:58
  • 1
    @AgneseSonego - As I have no knowledge of your future bibliographic formatting needs, I don't think it would be useful for me to make any specific recommendations. For submissions to journals, the choice of bibliography style is generally already made for you.
    – Mico
    Commented May 9, 2017 at 11:00

1 Answer 1

5

Not sure where the problem is:

\begin{filecontents*}{\jobname.bib}
@book{test,
  author={First, A. and Second, B.},
  title={Title},
  publisher={Publisher},
  year=2017,
}
\end{filecontents*}

\documentclass{article}
\usepackage[authoryear]{natbib}

\citestyle{aysep={,}}

\begin{document}

\citet{test}

\citep{test}

\bibliographystyle{agsm}
\bibliography{\jobname}

\end{document}

I used the filecontents* environment just to make the example self-contained. Use your own file, instead.

enter image description here

If you want & between names (I hope not or that's an imposition by the publisher), do as follows

\begin{filecontents*}{\jobname.bib}
@book{test,
  author={First, A. and Second, B.},
  title={Title},
  publisher={Publisher},
  year=2017,
}
\end{filecontents*}

\documentclass{article}
\usepackage[authoryear]{natbib}

\citestyle{aysep={,}}
\AtBeginDocument{\renewcommand{\harvardand}{\&}}

\begin{document}

\citet{test}

\citep{test}

\bibliographystyle{agsm}
\bibliography{\jobname}

\end{document}

enter image description here

1
  • I am not sure why but yesterday every time I used aysep the program signaled 17 errors and no & showed up (unfortunately it is a requirement). Thank you so much for the tips. Now everything works. Commented May 9, 2017 at 9:54

You must log in to answer this question.

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