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

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 the redefinition of the introcite:typeset macro to avoid the link in the bibliography label. (In the next version of biblatex-ext this will be much simpler following the changes implemented in https://github.com/moewew/biblatex-ext/commit/4d4e3909f79bc9e6afca8ea2904f7077435d6d4a. You'll then only need \AtIntrocite{\DeclareFieldFormat{linkallcite}{#1}} instead of the whole block redefining introcite:typeset.)

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

\documentclass{scrartcl}
\usepackage[ngerman]{babel}
\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}%
}
\letbibmacro{cite:orig}{cite}
\renewbibmacro{cite}{%
  \printtext[linkallcite]{%
    \usebibmacro{cite:orig}}}

\DeclareDelimFormat{nameyeardelim}{\addcomma\space}

\makeatletter
\renewbibmacro{introcite:typeset}{%
  \begingroup
    \iftoggle{blx@citation}
      {}
      {\togglefalse{blx@bibliography}%
       \toggletrue{blx@citation}}%
    \delimcontext{bbx@introcite}%
    \csuse{blx@hook@cite}%
    \csuse{blx@hook@citekey}%
    \DeclareFieldFormat{bibhyperref}{##1}%
    \DeclareFieldFormat{linkallcite}{##1}%
    \undef\cbx@lasthash
    \undef\cbx@lastyear
    \citetrackerfalse\pagetrackerfalse\backtrackerfalse
    \defcounter{maxnames}{\blx@maxcitenames}%
    \defcounter{minnames}{\blx@mincitenames}%
    \printtext[bbx@introcite]{\usebibmacro{bbx:introcite}}%
  \endgroup
}
\makeatother

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

  • Thank you! Exactly how I want it. Have a nice day! – Henning Jul 13 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.