Multibib reverse label or sort order
The biblatex
package offers features comparable to those of multibib
. References from a single bib
file can be subdivided using various options of \printbibliography
. Examples include type
, keyword
and category
. Refer to the biblatex
manual for details. Prefixes to the labelnumber
are specified with the prefixnumbers
option.
Assuming each sub-bibliography has a unique prefix, descending label numbers can be obtained by altering the labelnumber
field format so that it prints the value given by the total prefix-specific entry count, minus the actual labelnumber
, plus one.
\documentclass{article}
\usepackage[style=numeric-comp,sorting=ydnt,defernumbers]{biblatex}
\AtDataInput{%
\csnumgdef{entrycount:\strfield{prefixnumber}}{%
\csuse{entrycount:\strfield{prefixnumber}}+1}}
\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}
\newrobustcmd*{\mkbibdesc}[1]{%
\number\numexpr\csuse{entrycount:\strfield{prefixnumber}}+1-#1\relax}
\addbibresource{biblatex-examples.bib}
\begin{document}
Filler text \cite{aksin,bertram,angenendt}.
Filler text \cite{chiu,padhye,moraux}.
\printbibheading
\printbibliography[prefixnumbers={A},type=article,title={Articles},heading=subbibliography]
\printbibliography[prefixnumbers={R},type=report,title={Reports},heading=subbibliography]
\printbibliography[prefixnumbers={P},type=inproceedings,title={Presentations},
heading=subbibliography]
\end{document}
This solution works with either backend, though with biber
the "rerun LaTeX" messages in the log may not stabilize. In any case heed the warning; the first time the message disappears after recompiling should give the correct document.