[Tex/LaTex] hyperlink name with biblatex authoryear

biblatexcitinghyperref

I am using biblatex with the authoryear styles.

So far I've been able to find everything I need easily in the excellent documentation, but I'm stuck on one thing.

With my current settings (below) citations only have the year hyperlinked to the bibliography entry. I think prior to using biblatex I would have the whole citation (authors + year) as a reference – I think this is easier to click etc. when browsing.

Is there an easy way to get this (or does it involve creating a new style).

\usepackage[style=authoryear,
            bibstyle=authoryear,
            citestyle=authoryear,
            natbib=true,
            hyperref=true,
            backref=true,
            abbreviate=true]{biblatex}

Best Answer

Add the following to you preamble:

\DeclareCiteCommand{\cite}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand*{\cite}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{citeyear}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
    \printtext[bibhyperref]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand*{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
    \printtext[bibhyperref]{\usebibmacro{citeyear}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
  \printtext[bibhyperref]{ \usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\textcite}
  {\boolfalse{cbx:parens}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{textcite}}}
  {\ifbool{cbx:parens}
     {\bibcloseparen\global\boolfalse{cbx:parens}}
     {}%
   \multicitedelim}
  {\usebibmacro{textcite:postnote}}

Note that this code snipped is basically taken from here and adapted to biblatex v0.9b, i.e. the definitions for \footcitetext and \textcite are added resp. changed. (I also decided not to add hyperlinks for \citeauthor and \citeyear.)