ich benutze biblatex und habe bei meinem Layout ein Problem was ich nicht in den Griff bekomme.
Zitatstil ist authoryear. Funktioniert ohne extras so wie es soll. Reproduzierbar durch auskommentieren des markierten Makros. Per default ist dann aber nur das Jahr als Link ausgeführt.
Also habe ich mich schlau gemacht und das unten eingefügte Makro gefunden. Auch das funktioniert (fast): Der gesamte Name wird verlinkt.
Wenn jedoch mit Verlinkung (Makro nicht kommentiert) per \textcite mehrere Referenzen des gleichen Autors aufgerufen werden, klappt die Klammersetzung nicht mehr. Ich steige leider nicht komplett durch das Makro durch...kann da jemand helfen?
Grüße
MWE
\documentclass{article} \usepackage[ngerman]{babel} \usepackage{csquotes} \usepackage{hyperref} \usepackage[backend=biber, style=authoryear-comp, sorting=nyt, date=year, dashed=false,]{biblatex} \addbibresource{testbib.bib} %%%set up links for the full citation %%%start %%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareFieldFormat{citehyperref}{% \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links \bibhyperref{#1}} \DeclareFieldFormat{textcitehyperref}{% \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links \bibhyperref{% #1% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}}} \savebibmacro{cite} \savebibmacro{textcite} \renewbibmacro*{cite}{% \printtext[citehyperref]{% \restorebibmacro{cite}% \usebibmacro{cite}}} %%%%%comment the following to remove links and error %%%start comment \renewbibmacro*{textcite}{% \ifboolexpr{ ( not test {\iffieldundef{prenote}} and test {\ifnumequal{\value{citecount}}{1}} ) or ( not test {\iffieldundef{postnote}} and test {\ifnumequal{\value{citecount}}{\value{citetotal}}} ) } {\DeclareFieldAlias{textcitehyperref}{noformat}} {}% \printtext[textcitehyperref]{% \restorebibmacro{textcite}% \usebibmacro{textcite}}} %%%end comment %%%%%%%%%%%%%%%%%%%%%%%%% %%%finish \begin{document} First, single cites which are working: \textcite{AuthorA2000} and so on \textcite{AuthorB2001} and so on \textcite{AuthorC2002a} and so on \textcite{AuthorC2002b} and so on \textcite{AuthorC2002c}. This works! \par Now combined: Different Authors \\ Two: \textcite{AuthorA2000,AuthorB2001}\\ Three: \textcite{AuthorA2000,AuthorB2001,AuthorC2002a}\\ Works again! \par Now combined, single author same year The problem if linking is on: \textcite{AuthorC2002a,AuthorC2002b,AuthorC2002c} \par Same Author, diff year: Same problem: \textcite{AuthorC2002a,AuthorC2003} \printbibliography \end{document}
@article{AuthorA2000, author = {AuthorA}, title = {{TitleA}}, year = {2000} } @article{AuthorB2001, author = {AuthorB}, title = {{TitleB}}, year = {2001} } @article{AuthorC2002a, author = {AuthorC}, title = {{TitleCa}}, year = {2002} } @article{AuthorC2002b, author = {AuthorC}, title = {{TitleCb}}, year = {2002} } @article{AuthorC2002c, author = {AuthorC}, title = {{TitleCc}}, year = {2002} } @article{AuthorC2003, author = {AuthorC}, title = {{TitleC3}}, year = {2003} }