[Tex/LaTex] Bibliography using the Harvard System

bibliographiesharvard-style

I am using the Harvard System to write my references in my article. So I have the file "test.bib" which is considered a database and contains all my references. I will give you a very simple example in order to get your helps.

Firstly, consider my tex file: my_file.tex

\documentclass[a4paper,twoside]{article}
\usepackage{apalike}
\usepackage{harvard}

\begin{document}

\section{INTRODUCTION}

 author1 et al. (2005) proposed a new algorithm ....
 A new algorithm has been proposed (authors et al., 2005)
 author5 and author6 (2003) proposed a sophisticated algorithm...
 A sophisticated algorithm has been proposed (author5 and author6, 2003) 

\bibliographystyle{apalike}
{\small
\bibliography{test}}

\end{document}

Consider my file: test.bib

@INPROCEEDINGS{ x1,
  AUTHOR =       "  author1, C.  and author2, F. and author3, N. and author4, M.",
  TITLE =        "title1",
  BOOKTITLE =    "IEEE....",
  YEAR =         "2005",
  file = F
}

   @INPROCEEDINGS{ x2,
      AUTHOR =       "  author5, C.  and author6, F.",
      TITLE =        "title2",
      BOOKTITLE =    "IEEE....",
      YEAR =         "2003",
      file = F
    }

Consider the four phrases below and which are added to the article:

1) author1 et al. (2005) proposed a new algorithm ....
2) A new algorithm has been proposed (authors et al., 2005)
3) author5 and author6 (2003) proposed a sophisticated algorithm...
4) A sophisticated algorithm has been proposed (author5 and author6, 2003) 

I know how to add the references manually into the text (such as author1 et al. (2005), etc.), but how can I add them automatically? can I use for \cite{} for example? If yes, so how. Please I want the code in latex which can generate the for examples (the four phrases).

Kindly any help will be very appreciated!

Best Answer

I would not load either the harvard or the apalike citation management package. Instead, I would load the natbib citation management package and use its macros \citet and \citep to generate text-style and parenthetic citation callouts. An important advantage of using natbib is that its fully compatible with the hyperref package.

Do keep loading the apalike bibliography style.

enter image description here

\documentclass[a4paper,twoside]{article}
\bibliographystyle{apalike}
\usepackage{natbib}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
@INPROCEEDINGS{ x1,
  AUTHOR =       "Author1, C.  and Author2, F. and Author3, N. and Author4, M.",
  TITLE =        "Title1",
  BOOKTITLE =    "IEEE....",
  YEAR =         "2005",
  file = F,
}

   @INPROCEEDINGS{ x2,
      AUTHOR =       "Author5, C.  and Author6, F.",
      TITLE =        "Title2",
      BOOKTITLE =    "IEEE....",
      YEAR =         "2003",
      file = F,
    }
\end{filecontents}

\begin{document}
\setlength\parindent{0pt}  %% just for this example

\section{Introduction}

\citet{x1} proposed a new algorithm.

A new algorithm has been proposed \citep{x1}.

\citet{x2} proposed a sophisticated algorithm.

A sophisticated algorithm has been proposed \citep{x2}.


\bibliography{test}
\end{document}