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 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.

share|improve this question
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  topskip Apr 23 '12 at 13:49

1 Answer 1

up vote 10 down vote accepted

The hyperref package is known for not being entirely compatible with many citation manager packages, with the main exception of natbib. (I.e., hyperref is fully compatible with natbib.) It is true that the user guide to the hyperref package notes that the harvard package is "supported"; however, the very next sentence in the same paragraph of the hyperref user guide states that "the recommended package is Patrick Daly's natbib package".

Fortunately, you need not change your harvard-style citation commands to equivalent natbib-style commands in order to get full interoperability with the hyperref package: there is a nice little package called har2nat that performs these translations for you. Thus, if you replace the two instructions

\usepackage[abbr]{harvard}
\citationstyle{dcu}

in your MWE with

\usepackage{natbib}
\setcitestyle{aysep={,}} % needed to fully emulate harvard's "dcu" citation style
\usepackage{har2nat}

the hyperlinks from the citations to the corresponding items in the bibliography are formed correctly.

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.