Sorting citations using \cites command in biblatex with Sorting citations using \cites command in biblatex worked fine but doesn't work anymore with TexLive 2016.

Error produced with the minimal example of the above link:
! Undefined control sequence.
<argument> \cbx@sortkeys 

l.49 ...mpanion}{ctan}{markey}[10--11]{vangennep} \\

Its's not just a wrong error message by running first time biber. There is no output for the intended sorted \Cites and \cites commands.

Anybody knows how to adjust the code for new TexLive 2016?

  • In which version did it work? With TL 2015 I get the same error as with 2016. Commented Jun 11, 2016 at 10:54
  • I guess it was with biblatex version pre-march 2016, however the proposed code should work with TeXLive 2016 or would need some changes. The problem stays the same: how can I sort multiple bib-entries with biblatex and biber and the cited comands?
    – Michael
    Commented Jun 12, 2016 at 13:30

1 Answer 1


I had the same problem and searched in the old and new biblatex.sty and related files. I found where the definition of

     {blx@slists@\the\c@refsection @entry@\blx@sorting}}% Biber

in Audray's solution (Sorting citations using \cites command in biblatex) came from. This does not work with the actual biblatex, because some of the arguments used here are not defined anymore. I had to replace these lines with the definition found in the actual biblatex:

    {blx@slist@centry@\the\c@refsection @\blx@refcontext@context}}% Biber

It is still not the cleanest solution using the deep internals of biblatex, but it woks for me ...

Here a MWE. It is a patch of the MWE in Audrey's brilliant answer (so the credits still belong to him):


% original definition of \cites

% new definition

% first pass saves keys, prenotes, postnotes

% second pass outputs sorted citation list

% internal list of saved keys => sorted argument list

% internal list of sorted entry keys [patched to the original answer, new biblatex!]
  \ifcsundef{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}
    {\global\letcs{\cbx@sortkeys}{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}}}

\cmd{cite}: \cite{companion,ctan,vangennep,markey} \\
\cmd{cites}: \cites[e.g.][10]{companion}{ctan}{markey}[10--11]{vangennep} \\
\cmd{Cites}: \Cites{ctan}{markey}[e.g.][5--10]{companion}[10--11]{vangennep}
  • OK, I did some more digging, it should work perfectly if you replace the definition of \cbx@sortkeysinit by \def\cbx@sortkeysinit{% \ifcsdef{blx@slist@centry@\the\c@refsection @\blx@refcontext@context} {\global\letcs{\cbx@sortkeys}{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}} {}} (mod line breaks). In version 3.5 this works for both biblatex and Biber from the first run without any errors. If you include that in your answer and write a full MWE I'd be more than happy to up-vote it.
    – moewe
    Commented Sep 15, 2016 at 12:38
  • @Michael: I must say that this was a little bit try and error, due to my medium LaTeX fu. I use this citation sorting in a different way. But I will adapt an example, and extend my answer.
    – Michael P
    Commented Sep 15, 2016 at 19:00
  • I have modified the code a tiny bit to be a bit shorter. In all my tests it still behaved as expected. But if you find a problem with it, give me a shout and change it back.
    – moewe
    Commented Sep 16, 2016 at 14:17
  • Ah, and thank you for the MWE (+1)!
    – moewe
    Commented Sep 16, 2016 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .