I have tried the following ways to change the style: \bibliographystyle
! Missing $ inserted.
\mskip
\thinmuskip
l.440 . of Florida Current transport at 27\,\$>
^\circN>>,
\usepackage
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:53Thank 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.
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
apsr
dcu
jmr
jphysicsB
kluwer
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.
\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