
Ordenar citas usando \cites
el comando en biblatex conOrdenar citas usando el comando \cites en biblatexfuncionó bien pero ya no funciona con 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} \\
No es sólo un mensaje de error incorrecto al ejecutar biber por primera vez. No hay resultados para los comandos ordenados \Cites
y previstos \cites
.
¿Alguien sabe cómo ajustar el código para el nuevo TexLive 2016?
Respuesta1
Tuve el mismo problema y busqué en los biblatex.sty
archivos antiguos, nuevos y relacionados. Encontré donde está la definición de
{\global\letcs{\cbx@sortkeys}
{blx@slists@\the\c@refsection @entry@\blx@sorting}}% Biber
en la solución de Audray (Ordenar citas usando el comando \cites en biblatex) vino de. Esto no funciona con el biblatex real, porque algunos de los argumentos utilizados aquí ya no están definidos. Tuve que reemplazar estas líneas con la definición que se encuentra en el biblatex real:
{\global\letcs{\cbx@sortkeys}
{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}}% Biber
Todavía no es la solución más limpia usando las partes internas profundas de biblatex, pero a mí me funciona...
Aquí un MWE. Es un fragmento del MWE en la brillante respuesta de Audrey (por lo que los créditos aún le pertenecen):
\documentclass{article}
\usepackage[style=authortitle,sorting=ynt,sortcites]{biblatex}
\makeatletter
% original definition of \cites
\DeclareMultiCiteCommand{\cbx@cites}{\cite}{\multicitedelim}
% new definition
\DeclareMultiCiteCommand{\cites}[\cbx@cite@wrapper\cbx@cites]{\cbx@cite}{}
% first pass saves keys, prenotes, postnotes
\DeclareCiteCommand{\cbx@cite}
{\csxdef{prenote:\thefield{entrykey}}{\thefield{prenote}}}
{\listxadd\cbx@savekeys{\thefield{entrykey}}}
{}
{\csxdef{postnote:\thefield{entrykey}}{\thefield{postnote}}}
% second pass outputs sorted citation list
\newrobustcmd{\cbx@cite@wrapper}[2]{%
\def\cbx@savekeys{}%
\def\cbx@citecall{#1}%
#2\cbx@sortkeysinit\cbx@citesort\cbx@citecall}
% internal list of saved keys => sorted argument list
\def\cbx@citesort{%
\def\do##1{%
\ifinlist{##1}{\cbx@savekeys}
{\protected@xappto\cbx@citecall{%
[\csuse{prenote:##1}][\csuse{postnote:##1}]{##1}}}
{}}%
\dolistloop{\cbx@sortkeys}}
% internal list of sorted entry keys [patched to the original answer, new biblatex!]
\def\cbx@sortkeysinit{%
\ifcsundef{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}
{}
{\global\letcs{\cbx@sortkeys}{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}}}
\def\cbx@sortkeys{}
\makeatother
\addbibresource{biblatex-examples.bib}
\newcommand{\cmd}[1]{\textbackslash\texttt{#1}}
\setlength{\parindent}{0pt}
\begin{document}
\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}
\printbibliography
\end{document}