# Referencing (not Bibliography) in Harvard Style using Write Latex

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}

\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

• Welcome to TeX SE! You seem to be using the plainnat style but perhaps that is not what you want and you should choose a different one? Note that your code cannot be used to reproduce the problem you describe since you do not include any bibliography entries in your question. – cfr Aug 22 '14 at 21:51
• Could you kindly suggest what style I should use for that. – Nikki_Champ Aug 22 '14 at 22:08
• @cfr - In the present case, the solution doesn't require using a different bibliography style. Instead, all that's required is not loading the natbib package. – Mico Aug 22 '14 at 22:18
• @Mico Thanks. It is a while since I used natbib... – cfr Aug 22 '14 at 22:33

To get the appearance of the entries in the references, keep using the plainnat bibliography style but do not load the natbib package. You'll get:

\documentclass[a4paper]{article} % to keep output all on one page
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,amsthm,graphicx}
%\usepackage{natbib} %% deliberately commented out
\bibliographystyle{plainnat}
\usepackage{filecontents}
\begin{filecontents*}{Ref.bib}
@book{alp:04,
author   = "Ethem Alpaydin",
title    = "Introduction to Machine Learning",
publisher= "MIT Press",
year     = 2004,
}
\end{filecontents*}
\begin{document}
\cite{alp:04}
\bibliography{Ref}
\end{document}


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:

\usepackage[noadjust]{cite}
\renewcommand\citeleft{}
\renewcommand\citeright{}


If you did load natbib -- and, of course, didn't load the cite package as well -- you'd get the following look, which is, I gather, not what you want:

• Thanks @Mico, it works!I never knew I should change that. – Nikki_Champ Aug 22 '14 at 22:36
• One more question is how did you name the section as 'References', mine shows 'Bibliography' but I don't want that. Thanks in advance – Nikki_Champ Aug 22 '14 at 22:48
• @Nikki_Champ - My code produces the header named "References" because I used the article document class, just to keep the output all on one page. If you switch to the report class, you'll get "Bibliography" as the header. – Mico Aug 22 '14 at 22:57