I am relatively new to Latex and I am trying to write my first project thesis. I am using WriteLatex, which is an online Latex environment. I was successful in obtaining the references from many sites, imported them into a .bib file in Bibtex and cite them in Author Year title format. My problem arises when I cannot see the References at the bottom in Harvard style. What I want to see is this
[Alpaydin,2004] Ethem Alpaydin, Introduction to Machine Learning, MIT Press, 2004.
What I get is just this under the name Bibliography
Ethem Alpaydin, Introduction to Machine Learning, MIT Press, 2004.
I am using the following packages
\documentclass[a4paper]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{natbib}
\begin{document}
\addcontentsline{toc}{subsection}{Bibliography}
\bibliography{Ref} %My .bib file
\bibliographystyle{plainnat}
\end{document}
Edit: The Bibliography files are of the format:
@book{alpaydin2004introduction,
title={Introduction to machine learning},
author={Alpaydin, Ethem},
year={2004},
publisher={MIT press}
}
Can someone please help me get the Harvard style referencing even at the end of the document in the style I mentioned above. Thanks in advance
Best Answer
To get the appearance of the entries in the references, keep using the
plainnat
bibliography style but do not load thenatbib
package. You'll get:If you do not want square brackets surrounding the citation callout, i.e., if you want it to look like
Alpaydin(2004)
, you should also provide the following instructions in the preamble:If you did load
natbib
-- and, of course, didn't load thecite
package as well -- you'd get the following look, which is, I gather, not what you want: