Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am getting [?] when citing using harvard. If I use \citeasnoun I get the citation. How do I solve this problem. I am using TeXnicCenter with MikTeX 2.9 and installed the harvard package.

\documentclass[a4paper,12pt]{article}
\usepackage{float,epsfig}
\usepackage{pifont,epsfig}
\usepackage[dvips]{color}
\usepackage{graphicx,color}
%\usepackage{harvard}
\usepackage{natbib}
\usepackage[sort]{cite}
%\usepackage{ifpdf}
\usepackage{cleveref}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\usepackage{amsfonts}
\renewcommand{\baselinestretch}{1.0}
\parindent=0pt                  % Do not indent paragraphs
\setlength{\hoffset}{-0.5cm}
\setlength{\voffset}{-2.0cm}
\setlength{\textheight}{9.3in}
\setlength{\textwidth}{5.8in}
\begin{document}
------
 \bibliographystyle{agsm}
 \bibliography{ref}
%\input{bio_2}
\end{document}

When I use natbib I get it correct. I also wish to replace & with and when I use \citet in natbib.

share|improve this question

2 Answers 2

It seems you want sorted citations and therefore load both the harvard and cite packages, but apparently the latter is not compatible with the former. I suggest that you load just natbib with its sort option, which emulates the sort option of cite .

\documentclass[a4paper,12pt]{article}

% Variant A: Doesn't work
% \usepackage{harvard}
% \usepackage[sort]{cite}

% Variant B: Works
\usepackage[sort]{natbib}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
\end{filecontents}

\begin{document}

\citep{B02,A01}

\bibliographystyle{agsm}
\bibliography{\jobname}

\end{document}

enter image description here

share|improve this answer

You shouldn't load both the harvard and the cite packages (or, for that matter, both the natbib and the cite packages). The cite package is designed for numeric-style citations, whereas the harvard and natbib packages are meant mainly for authoryear-style citations. (OK, the natbib package can be used for numeric-style citations if it is invoked with the numbers option.)

If you're using the agsm bibliography style, which comes with the harvard package but can be along with natbib as well, you can get the conjunction between authors' names to be displayed as and instead of as & by issuing the command

\def\harvardand{and}  % default: "&"

after loading either the harvard or the natbib package.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.