I have been working on a custom biblatex style, for which I want the bibliography to display at most 2 authors, meaning that the entries should be either:
- First (single author)
- First & Second (two authors)
- First et al. (three and more)
I came up with the following name format, to which I feed the first three authors using \printnames[][1-3]{author}\space in the \DeclareBibliographyDriver commands.
%%%% authors
\DeclareNameFormat{author}{%
\ifthenelse{\value{listcount}=1}%
{#1 \ifblank{#4}{}{\addcomma\space #4}}%
{%
\ifthenelse{\value{liststop}=2}%
{\space\&\space\ifblank{#4}{}{#4\space}#1}%
{%
\ifthenelse{\value{listcount}=3}%
{\space}%
{, et~al.}%
}%
}%
}%
It's working just fine, but given that I intend to move to biblatex, I'd like to have a very clean code, so the question is basically: how can it be improved?

xpatchpackage. – Audrey Feb 10 '12 at 17:54