I am trying to get internal hyperrefs from citation to the bibliography page.
I am using BiBTeX, the harvard package, the hyperref package with optional [hidelinks].
The latter works fine to me on the TOC and sections refs.
I read in hyperref package help that it is designed to work with the harvard package. Yet, there is no further explanation on how to make it work.
Here is a MWE:
\documentclass[a4paper,11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fullpage}
\usepackage[frenchb]{babel}
\usepackage{cite}
\usepackage[abbr]{harvard}
\citationstyle{dcu}
\usepackage[hidelinks]{hyperref}
\begin{document}
This is a test \cite{test}
\clearpage
\bibliographystyle{dcu}
\bibliography{test}
\end{document}
with test.bib being :
@article{test,
title = "Testing and tests",
author = "Test {Tester}",
journal = "Journal of tests",
volume = "1",
pages = "1",
year = "2012",
}
I am using an up to date Texmaker editor, running on an up to date TeX Live 2011 distribution, on MS Win7.
Best Answer
The
hyperref
package is known for not being entirely compatible with many citation manager packages, with the main exception ofnatbib
. (I.e.,hyperref
is fully compatible withnatbib
.) While it's true that the user guide to thehyperref
package notes that theharvard
package is "supported", the next sentence in the same paragraph of the user guide states that "the recommended package is Patrick Daly'snatbib
package".Fortunately, you need not change your
harvard
-style citation commands to equivalentnatbib
-style commands in order to get full interoperability with thehyperref
package: there is a nifty little package called har2nat that performs these translations for you. Thus, if you replace the instructionsin your MWE with
the hyperlinks from the citation call-outs to the corresponding entries in the bibliography are formed correctly. Observe that you should not load the
harvard
package with this setup.