0

This question already has an answer here:

Using the authoryear style, I want to cite works of two authors as A & B and more as A, et al., while listing authors as a A, b B and c C in the bibliography. Also, the whole citation should be a hyperlink, instead of just the year.

To that end I redefined the cite macro:

\renewbibmacro*{cite}{\printtext[bibhyperref]
    {\iffieldundef{shorthand}
        {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
            {\iffieldundef{label}
                {\printfield[citetitle]{labeltitle}}
                {\printfield{label}}\setunit{\addspace}}
            {\renewcommand*{\finalnamedelim}{ \& }%
             \printnames[][-\ifnumgreater{\value{listtotal}}{2}{1}{2}]{labelname}%
            \setunit{\nameyeardelim}}%
        \iffieldundef{labelyear}{}{\printfield{labelyear}\printfield{extrayear}}}
    {\printfield{shorthand}}}}

Is there a more robust way to do this, some options I missed, or a CBX that does this already?

marked as duplicate by lockstep, Mensch, Andrew Swann, Claudio Fiandrino, mafp Apr 16 '13 at 14:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Your first statement is wrong. For me maxcitenames and maxbibnames work as expected. Please provide a complete minimal working example. – Marco Daniel Apr 6 '13 at 15:16
  • You're right, I wasn't looking at the output of \cite but at \usebibmacro{cite}. – pascal Apr 6 '13 at 15:39
  • 1
    For your other question see: tex.stackexchange.com/questions/15951/… – Marco Daniel Apr 6 '13 at 16:23