3

I want to have three different sections for my references. Lets say Reference1, References2 and References3. A custom ordering of my references. However, I want that the numbering of each Reference continues from the previous list. Lets say References1 contains 1 to 100 reference. I need that References2 that contain 20 references start from 101 to 120 and References3 start from 121 to end. In my LaTeX I use the biblatex package.

Does anyone how to do that.

Reza
  • 31
  • 1
    Welcome to TeX.SX! I think, your question needs some clearification and a working (compilable) document as an example! –  Apr 21 '16 at 16:21

1 Answers1

3

Note: the answer below is valid for Biblatex/Biber as contained in TeX Live 2014 (and maybe some earlier versions as well). Starting with TeX Live 2015 a refsection is treated as a fully independent environment with a counter starting at 1, which is not influenced by resetnumbers=false. However, it does respect resetnumbers=n. Therefore, you can store the last number of a refsection and set the number in a new refsection to the stored number + 1.

Full credits go to @moewe for providing an implementation of this solution on https://github.com/plk/biblatex/issues/1222.

Code (cf. full MWE in original answer below):

\begin{document}
\begin{refsection}
Some text \autocite{B02,A01}.
\printbibliography[title={References1}]
\numgdef\resetnum{\csuse{blx@labelnumber@\therefsection}+1}
\end{refsection}
\begin{refsection}
Some more text \autocite{Z00,C03}
\printbibliography[title={References2}, resetnumbers=\resetnum]
\end{refsection}
\end{document}

Original answer, valid for TeX Live 2014:

This can be done using refsections, each containing a bibliography for the citations used in that refsection. The global option sorting=none for BibLaTeX results in references numbered in the order they appear in the text. The option resetnumbers=false for a printbibliography combined with the global option defernumbers=true results in continous numbering across refsections. You may need to delete the .aux, .bbl, .bcf, .blg files at some point if the result is not as expected.

MWE, adapted from https://tex.stackexchange.com/a/42273/89417:

\documentclass{article}

\usepackage[sorting=none,defernumbers=true]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib} @misc{A01, author = {Author, A.}, year = {2001}, title = {Alpha}, } @misc{B02, author = {Buthor, B.}, year = {2002}, title = {Bravo}, } @misc{C03, keywords = {pub}, author = {Cuthor, C.}, year = {2003}, title = {Charlie}, } @misc{Z00, keywords = {pub}, author = {Zuthor, Z.}, year = {2000}, title = {Zulu}, } \end{filecontents}

\addbibresource{\jobname.bib}

\begin{document} \begin{refsection} Some text \autocite{B02,A01}. \printbibliography[title={References1},resetnumbers=true] \end{refsection} \begin{refsection} Some more text \autocite{Z00,C03} \printbibliography[title={References2},resetnumbers=false] \end{refsection} \end{document}

Result:

enter image description here

Marijn
  • 37,699
  • Is it just me, or does this no longer work in TL 2021? With this MWE, I still get [1] and [2] in both refsections (yes, I have tried removing all temporary files). – Mårten W Mar 27 '22 at 00:32
  • @MårtenW indeed it does not seem to work anymore. resetnumbers=3 in the second bibliography still works for this example, but of course that is not a good solution unless the document is completely finished and you know which number to use. – Marijn Mar 27 '22 at 19:37
  • 1
    @MårtenW I added an issue on https://github.com/plk/biblatex/issues/1222 to find out what is going on. – Marijn Mar 28 '22 at 09:57
  • 1
    @MårtenW moewe kindly provided a solution on Github, see the edit to the answer above. – Marijn Mar 28 '22 at 12:17