I would like to add an [Author(s) Year] block at the beginning of every citation, exactly as described in this question: Adding an [AuthorYear] block at the beginning of bibliography entries.
I used the very code given in the accepted answer to that question. However, in addition, I want my citations to be hyperlinked, and therefore use the package hyperref. The following is a minimal working example which demonstrates my problem:
\documentclass{article}
% Adding a yearauthor block in bibliohraphy: https://tex.stackexchange.com/a/11856/42810
\usepackage[backend=bibtex,citestyle=authoryear,bibstyle=authortitle,sorting=nyt,dashed=false,maxcitenames=2]{biblatex}
\newcounter{mymaxcitenames}
\AtBeginDocument{%
\setcounter{mymaxcitenames}{\value{maxnames}}%
}
\renewbibmacro*{begentry}{%
\printtext[brackets]{%
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames{labelname}%
\setunit{\nameyeardelim}%
\usebibmacro{cite:labelyear+extrayear}%
\endgroup
}%
\addspace%
}
\DeclareNameAlias{sortname}{first-last}
% Use hyperref to hyperlink citations
\usepackage[dvipsnames]{xcolor}
\usepackage[hyperindex=true]{hyperref}
\hypersetup{colorlinks=true,linkcolor=Blue,citecolor=BrickRed}
\begin{filecontents}{\jobname.bib}
@article{foo,
author = {Grace Murray Hopper},
title = {The Education of a Computer},
journal = {{IEEE} Annals of the History of Computing},
volume = {9},
number = {3/4},
pages = {271--281},
year = {1987}
}
\end{filecontents}
\bibliography{\jobname}
\begin{document}
Here is a citation: \cite{foo}.
\printbibliography
\end{document}
As you can see, the authoryear block in the bibliography contains a hyperlink to itself. I do not want this hyperlink, although I do want the hyperlink in the running text (i.e., before the bibliograpy). How can I remove the hyperlink from the authoryear block in the bibliography?


;-)But alas, ... let me see what I can do. – moewe Sep 26 '16 at 19:52