The unsrtnat
style orders the bibliography by citation order. Similar to the example from LaTeX/BibTex not arranging citations by order of appearance:
\documentclass{article}
\usepackage[semicolon]{natbib}
\begin{filecontents}{\jobname.bib}
@book{foo,
author = {Foo},
year = {2002},
title = {Title of Foo},
}
@book{bar,
author = {Bar},
year = {2005},
title = {Title of Bar},
}
@book{baz,
author = {Baz},
year = {2008},
title = {Title of Baz},
}
\end{filecontents}
\begin{document}
\section{The Beginning}
First we cite \citep{foo}.
Now we cite \citep{bar}.
Then we cite \citep{baz}.
Finally, we cite \citep{foo,bar,baz}.
\bibliographystyle{unsrtnat}
\bibliography{\jobname}
\end{document}
I take it that by "Harvard style" you mean a generic author-year style ffor citation call-outs. The harvard
package was among the first to implement such a style for LaTeX users. By now, there are quite a few other packages as well that provide possibilities for generating author-year citation call-outs.
To instruct the natbib citation management package to use an author-year rather than a numeric citation style, it's best to load the package with the authoryear
option:
\usepackage[authoryear]{natbib}
Assuming you have an entry in your bib file with a key of "bloggs:2012" that is authored by "Jane Bloggs", you could issue the command
\citep{bloggs:2012}
to generate a "parenthetical" citation reference of (Bloggs, 2012)
. To get a "textual" citation, viz., Bloggs (2012)
, using the same entry, you'd type
\citet{bloggs:2012}
The precise manner in which the bibliographic entries will be typeset in the References section depends critially on the bibliography style file you use. You may want to start with the plainnat.bst
and see if this meets your needs. I.e., issue a command such as
\bibliographystyle{plainnat}
somewhere in your document.
Finally, to have LaTeX make each citation into a hyperlink to the corresponding item in the bibliography, you need to load the hyperref package, preferably with the options colorlinks=true
and citecolor=<MyColorOfChoice>
.
Addendum, prompted by the OP's provision of an MWE. Alright, I understand now that you aren't using BibTeX for now to construct the bibliography but, instead, are building the bibliography "by hand" by assembling a bunch of \bibitem
entries.
There are two issues with your MWE. First, if you're going to do the \bibitem
s by hand, the \bibitem
in question must look like this:
\bibitem[Bloggs(2012)]{bloggs:2012} Bloggs, J., The Journal of Stuff, 2012.
Without any material in square brackets, LaTeX is going to use the default citation call-out style, i.e., generate numeric labels when it encounters a citation of this bibitem.
Second, don't type
Something is true (Bloggs, 2012)\citep{bloggs:2012}
in the text. Rather, type something like
Something is true \citep{bloggs:2012}.
and let LaTeX provide the text of the citation call-out -- (Bloggs, 2012)
in this case. If the hyperref
package is loaded, the string (Bloggs, 2012)
will automatically be made into a hyperlink to the corresponding entry in the references section.
That said, I would strongly recommend that your learn at least the basics of how to use BibTeX. Doing so will save you a lot of time in the future.
The fully revised MWE would look like this:
\documentclass[11pt]{article}
\usepackage[authoryear,round]{natbib}
\bibliographystyle{plainnat}
\usepackage[colorlinks=true,citecolor=blue]{hyperref}
\begin{document}
\section{First Section}
Something is true \citep{bloggs:2012}. As argued by \citet{bloggs:2012}, \dots
\begin{thebibliography}{99}
\bibitem[Bloggs(2012)]{bloggs:2012} Bloggs, J., The Journal of Stuff, 2012.
\end{thebibliography}
\end{document}
Best Answer
To get citations in author-year format with the natbib package, be sure to load it with the option
authoryear
, as inThe formatting of the entries in the bibliography itself is not governed by
natbib
directly but by the bibliography style file you use. I'm not sure if I understand one of your remarks correctly, but you seem to indicate that you're using theunsrt
bibliography style. As its name suggests, it does not sort the entries in any way, i.e., they're listed in order of the corresponding citation commands. If you want to have the entries in the references section sorted alphabetically, you should use a bibliography style such as plain.bst or plainnat.bst. (Both of these files are included automatically in any reasonably modern TeX distribution.)There are literally hundreds, if not thousands, of BibTeX bibliography style files in existence and available for downloading from either the CTAN or other repositories. Without knowledge of the precise formatting requirements you need to satisfy, I'm afraid it's not possible to give detailed advice on the style file you should choose.
Addendum, posted after the OP added some more information. First, to get a bibliography where the entries are sorted alphabetically by the author's (or authors') surnames, choose any of the many bibliography style files that performs alphabetical sorting; leading candidates for this assignment would be, as noted above,
plain.bst
or its younger relative,plainnat.bst
. You mention that there are fairly strict guidelines for the formatting of your thesis, including the formatting of the bibliography. Please consider posting these guidelines so that people might be in a position to give advice on whether any ready-made bibliography style files could be used.Second, to the best of my knowledge, there are no citation management packages that sort the arguments of a citation command chronologically -- especially if you use an authoryear citation system and the authors can have different surnames. (For numerical citation styles, there is the
cite
package that sorts and compresses citation numbers, but that wouldn't appear to be of relevance for your case.)