1

I would like to know how the author in the citation label can be part of the hyperlink as well. I changed the style of the reference by hand. The following MWE shows the package I used.

\begin{filecontents}{\jobname.bib}
    @book{Labov1972,
        Address = {Philadelphia},
        Author = {William Labov},
        Publisher = {University of Pennsylvania Press},
        Title = {Sociolinguistic Patterns},
        Year = {1972}}

    @book{Chomsky1957,
        Address = {The Hague},
        Author = {Noam Chomsky},
        Publisher = {Mouton},
        Title = {Syntactic Structures},
        Year = {1957}}
\end{filecontents}
\documentclass[]{scrreprt}
\usepackage{hyperref}
\usepackage[ngerman]{babel} 
%----------------------------------------------------------------------
% Bibliothek
%----------------------------------------------------------------------
% style einstellen
\usepackage[
backend=biber,
style=ext-authoryear,
backref=true,
doi=false,
isbn=false,
url=false,
articlein=false,
dashed=false,
introcite=plain,
labelalpha=true
]{biblatex}


%% Style Schriftum direkt aus dem Manual kopiert
\DeclareFieldFormat{bbx@introcite}{\mkbibbrackets{#1}}
\DeclareDelimFormat[bbx@introcite]{nameyeardelim}{\addcomma\space}
\UndeclareInnerCiteDelims{bbx@introcite}
\renewcommand*{\introcitepunct}{\quad}
\setlength\bibitemsep{1.5\itemsep}


% Bei mehreren Autoren et al.
\DefineBibliographyStrings{ngerman}{ 
    andothers = {{et\,al\adddot}},             
} 

% Keine Anführungszeichen beim Titel
\DeclareFieldFormat[article]{title}{{#1}}

%% Style des Verweises im Text
% Eckige Klammern um Autor Jahr
\DeclareOuterCiteDelims{cite}{[}{]}
% [Autor Jahr] -> [Autor, Jahr]
\renewcommand*{\nameyeardelim}{\addcomma\space}

\DefineBibliographyStrings{german}{
    backrefpage={zitiert auf Seite:},
    backrefpages={zitiert auf Seiten:}
}

%% Laden der Bibliothek
\addbibresource{\jobname.bib}
%----------------------------------------------------------------------
% Ende Bibliothek
%----------------------------------------------------------------------

\begin{document}

    Text text \cite{Chomsky1957}
\printbibliography

\end{document}          

In the Screenshot you can see that only the year is included in the link.

enter image description here

moewe
  • 175,683

1 Answers1

1

Using a similar strategy as in hyperlink name with biblatex authoryear (biblatex 1.4b), but with the new \letbibmacro instead of \restorebibmacro we can come up with the following MWE.

Note that we also need to stop the introcite output from reproducing the link. With a sufficiently up-to-date version of biblatex-ext, we can use \AtIntrocite{\DeclareFieldFormat{linkallcite}{#1}} for that.

(I removed the comments to make the example more compact and changed one or two small details.)

\documentclass{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[
  backend=biber,
  style=ext-authoryear,
  backref=true,
  doi=false,
  isbn=false,
  url=false,
  articlein=false,
  dashed=false,
  introcite=plain,
]{biblatex}
\usepackage{hyperref}

\DeclareFieldFormat{bbx@introcite}{\mkbibbrackets{#1}} \DeclareDelimFormat[bbx@introcite]{nameyeardelim}{\addcomma\space} \UndeclareInnerCiteDelims{bbx@introcite} \renewcommand*{\introcitepunct}{\quad} \setlength\bibitemsep{1.5\itemsep}

\DeclareFieldFormat[article]{title}{#1}

\DeclareOuterCiteDelims{cite}{\bibopenbracket}{\bibclosebracket}

\DeclareFieldFormat{linkallcite}{% \DeclareFieldFormat{bibhyperref}{##1}% \bibhyperref{#1}% } \AtIntrocite{\DeclareFieldFormat{linkallcite}{#1}}

\letbibmacro{cite:orig}{cite} \renewbibmacro{cite}{% \printtext[linkallcite]{% \usebibmacro{cite:orig}}}

\DeclareDelimFormat{nameyeardelim}{\addcomma\space}

\DefineBibliographyStrings{german}{ andothers = {{et,al\adddot}}, backrefpage = {zitiert auf Seite:}, backrefpages = {zitiert auf Seiten:}, }

\addbibresource{biblatex-examples.bib}

\begin{document} Text text \cite{sigfridsson}

\printbibliography \end{document}

Fully linked "Sigfridsson und Ryde, 1998" citation label.

moewe
  • 175,683