[Tex/LaTex] Sorting with biblatex using sortname

biblatexsorting

I want to use the firstinits=true option of biblatex, and to disable the abbreviations for specific entries, I use {{authorname}}, as recommended in a previous question. However, biblatex is apparently unable to sort the bibliography in this case. No matter, I thought, I can just provide sortname for the few entries where this is necessary. But biblatex seems to ignore this, i.e. Baltasar appears first in my example.

\documentclass{article}
\usepackage{filecontents}
\usepackage[style=alphabetic,firstinits=true]{biblatex}

\begin{filecontents}{references.bib}
    @report{example1,
        author={Buthor, Baltasar},
        title={Baltie's report}
    }

    @report{example2,
        sortname={Author, Archibald},
        title={Archie's report},
        author={{Archibald Author}}
    }
\end{filecontents}
\bibliography{references.bib}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

How do I use the sortname field properly?

Edit: I’m using an up-to-date TeXLive 2011, compiling with pdflatex and bibtex. Tried under both XP and Ubuntu.

Best Answer

Adding sorting=nyt to the biblatex options will fix it:

\documentclass{article}
\usepackage{filecontents}
\usepackage[
    style=alphabetic,
    sorting=nyt,
    firstinits=true
]{biblatex}

\begin{filecontents}{references.bib}
  @report{example1,
    author={{Archibald Author}},
    title={Archies first report}
    }
  @report{example2,
    author={{Archibald Author}},
    sortname={Author, Archibald},
    title={Archies second report}
    } 
  @report{example3,
    author={Archibald Author},
    sortname={Author, Archibald},
    title={Archies third report}
    }
  @report{example4,
    author={Buthor, Baltasar},
    title={Balties report}
    }
  @report{example5,
    author={Cuthor, Charlie},
    title={Charlies report}
    }   
\end{filecontents}
\bibliography{references.bib}

\begin{document}
  % lorem~\cite{example2}
  \nocite{*}
  \printbibliography
\end{document}

See section 3.3.2 and section 3.1.2.1 of the biblatex documentation:
alphabetic: This style will set the following package options at load time: labelalpha=true, sorting=anyt.

anyt will sort by label, then name, then year, then title, which should be ok, as the label is also in alphabetic order, but for some reason (maybe a bug?) it does not work as expected.