harvard style referencing

I have tried the following ways to change the style: \bibliographystyle was changed to \bibliographystyle the style remains the same in the pdf file after rerunning tex file. Rerunning of bib file showed this message:

! Missing $ inserted.
 \mskip 
 \thinmuskip 
l.440 . of Florida Current transport at 27\,
 ^\circN>>, 

\usepackage was changed to \usepackage[comma] . Console output showed the message: [comma] clash with natbib . \cite was changed to \citep. After running the tex file, the style still remains the same (author year). What should I do to show a comma between name and year in citation and to have 'pp.' instead of colon in references? Thank you for your help in advance.

519k 56 56 gold badges 708 708 silver badges 1.3k 1.3k bronze badges asked Aug 16, 2014 at 19:12 61 1 1 gold badge 1 1 silver badge 4 4 bronze badges

Welcome to TeX.SE! You say that "nothing changed" after you switched from the dcu style to the agsm style. Did you rerun LaTeX, BibTeX, and Latex twice more after making the change? It does take two LaTeX runs after re-running BibTeX to fully propagate all changes.

Commented Aug 16, 2014 at 19:32 Is biblatex an option? Commented Aug 16, 2014 at 21:53

Thank you for your tips, Mico. Usually I just rerun the tex file once (I use TeXworks on windows). Then I can see the changes in the Pdf file. As you advised, I also rerun bib file. I am not sure if the rerun is successful as I got this message: 440 Missing $ inserted. $ \mskip \,->\mskip \thinmuskip l.440 . of Florida Current transport at 27\, ^\circN>>,

Commented Aug 17, 2014 at 12:02

1 Answer 1

What should I do to show a comma between name and year in citation?

A: Load the natbib package with the option comma -- \usepackage[comma] -- and use the command \citep to cite the piece in question.

The second question, which bibliography style to use to get the formatting the way you say you want it, is quite a bit harder to answer. As shown below, none of the style files that are belong to the harvard citation management package (two of which are dcu and agsm ) deliver precisely what you say you want. Listed alphabetically by style file (and skipping over the somewhat specialized nederlands style), the formatting produced by the package's style files is as follows:

agsm

enter image description here

apsr

enter image description here

dcu

enter image description here

jmr

enter image description here

jphysicsB

enter image description here

kluwer

enter image description here

I'd say the apsr bibliography style comes closest to delivering the formatting you say you want -- although you'll probably have to enter by hand the comma that appears to be missing between the name of the publisher and the pp string.

Interestingly, all of these styles happen to prefix the string "pp. " before the contents of the pages field -- at least for entries of type @incollection .

Of course, there are many, many bibliography style files out there that can produce authoryear-style citations. You should certainly not feel constrained to choose from the just the half dozen of style files provided by "harvard" package.

Addendum to address some of the OP's follow-up comments:

\setcitestyle> 
Florida Current transport at 27\,$<>^$N 

A fully modified/corrected version of your MWE produces the following output. (Be sure to run LaTeX, BibTeX, and LaTeX twice more on the file.) Note the comma between the author string and the year string in the citation callout.

enter image description here

\documentclass[12pt,a4paper] \usepackage % this was missing in your code \numberwithin \usepackage % no point in loading a package more than once. \setcitestyle> \bibliographystyle \usepackage[colorlinks=true,citecolor=blue]% %% added these two options % hyperref should be loaded _after_ natbib \usepackage \begin @article, title = >, journal = , year = , volume = , pages = > \end \begin \citep %% need at least one \cite, \citet, or \citep command. \bibliography \end

Here's the MWE that was used to create the first set of screen shots shown above.

\documentclass \usepackage[T1] \usepackage[utf8] \usepackage \usepackage[comma] \usepackage \bibliographystyle %% or: apsr, dcu, jmr, jphysicsB, kluwer \usepackage \begin <\jobname.bib>@incollection \end \begin\pagestyle \citep \bibliography <\jobname>\end