1

In my MWE below, I sort my bibliography with the nyt option (name-year-title), cf. the biblatex manual under 3.1.2.1 General. Then I also include sortcites = true, which according to the manual will "sort citations if multiple entry keys are passed to a citation command. If this option is enabled, citations are sorted according to the global sorting order of the bibliography."

Since the "global sorting order of the bibliography" in my case is name-year-title, I'd expect my citations to be sorted first by name, then by year, and finally by title. But as the MWE below demonstrates, my citations are simply printed in the order given in the cite command. I was expecting "Lennon" to appear before "McCartney" since l preceeds m, but this does not happen. I am either not understanding what sortcites is supposed to do, or I am setting the options incorrectly. What do I need to do to automatically sort my citations by name?

\documentclass{article}
\usepackage[style = authoryear-comp, sorting = nyt, sortcites = true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{mccartney1965,
    author = "Paul McCartney",
    title = "Yesterday",
    year = "1965"}
@book{lennon1967,
    author = "John Lennon",
    title = "Lucy in the sky with diamonds",
    year = "1967"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cites{mccartney1965}{lennon1967}
\printbibliography
\end{document}

enter image description here

marked as duplicate by Sverre, moewe, user31729, Andrew Swann, Gonzalo Medina Feb 17 '15 at 16:26

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.

  • The \cites multicite commands are not designed to sort their arguments, but Audrey has found a way to make them do it anyway Sorting citations using \cites command in biblatex. BTW: Didn't you ask this before? – moewe Feb 17 '15 at 15:23
  • I have tried, and I obtained "Lennon" before McCartney. Did you run biber after changing the option? it's biber which make the sorting. So must run. – Maïeul Feb 17 '15 at 15:24
  • @moewe But aren't multicite commands the only command where "multiple entry keys are passed to a citation command"? Does this mean that sortcites is simply an vacant command? – Sverre Feb 17 '15 at 15:25
  • 1
    sortcites is not vacant, you can use \cite{mccartney1965,lennon1967} where the citations are then sorted accordingly, but you will lose the possibility to specify a post/pre-note for each citation separately. For \cites commands though sortcites does nothing. – moewe Feb 17 '15 at 15:26
  • 1
    Mhhhh.... I get McCartney before Lennon in the citation as well. Just as one would expect knowing that \cites does not support sortcites. – moewe Feb 17 '15 at 15:32

Browse other questions tagged or ask your own question.