Multibib reverse label or sort order

by mankoff   Last Updated May 16, 2019 01:23 AM

I'm using multibib. I manually set the order of the bibliography. I would like the order of the numbered items to be reversed. For example, my document has:

\nociteX{Foo}
\nociteX{Bar}

And the document then shows:

[1] Foo
[2] Bar

I would like the document to show:

[2] Foo
[1] Bar

Can anyone explain what to change in my .bst file, or a flag to multibib that I am missing that will achieve this?



Answers 3


I have a possible answer (possible because my installation crashed before I can test all of the features). It is relying, as mentionned, on biblatex, with biber as a backend.

In the preamble, you mention that you want to use biber as a back end (useful for tweaking the sorting), that you want to use the new sorting scheme you devised, and that you are going to play with the prefix in the bibliography.

\usepackage[defernumbers=true,sorting=reverse,backend=biber]{biblatex}

\addbibresource{Yourbibresource}

\DeclareSortingScheme{reverse}{
\sort[direction=descending]{\citeorder}
}

At the end of the document, you are printing the different bibliographies with the help of keyword to differentiate between them.

\printbibliography[keyword=original,prefixnumbers=F,title=Original sources]

\printbibliography[keyword=known,prefixnumbers=B,title=Other sources]

I successfully managed to get the [F1], [F2] and then [B1] and [B2] behavior, but was not able to test the biber tweak due to crashing. However, I am fairly convinced that this is the way to go, due to previous experiments.

I am aware that this answer is not complete as it is not fully tested, but I wanted to launch it out so that people can play with it until I manage to repair my set-up (at work, where I have huge networking trouble, hence possible long duration before repair).

Martigan
Martigan
December 07, 2011 11:15 AM

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}

enter image description here

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.

Audrey
Audrey
December 10, 2011 22:45 PM

raul galora algebra lineal ejerciicos

raul pavlov galora De Mora dr
raul pavlov galora De Mora dr
May 16, 2019 00:41 AM

Related Questions


Updated July 31, 2017 08:23 AM

Updated January 16, 2018 16:23 PM

Updated October 11, 2016 09:09 AM

Updated June 20, 2018 22:23 PM

Updated September 25, 2017 18:23 PM