4

For my bibliography, it is demanded, that I separate books from articles but have a continuous numbering throughout the bibliography. But I'm just not able how to archive the desired formation. Here is my Tex document:

\documentclass[12pt,a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,
style=numeric,
]{biblatex}

\addbibresource{sample.bib}

\textwidth138mm

\begin{document}

text \cite{bookAaa} more text \cite{articleAaa}
even more text \cite{bookBbb} ...text \cite{articleBbb}

\printbibheading [title={Bibliography}]
\printbibliography[heading=subbibintoc,type=book,title={books}]
\printbibliography[heading=subbibintoc,type=article,title={articles}]

\end{document}

This is what I get right now: right now

And this is what my desired formation is: desired

Thanks for helping!

Juli0s
  • 43
  • 2
  • Welcome to tex.sx. – barbara beeton May 05 '20 at 15:10
  • See also https://tex.stackexchange.com/q/271751/35864, https://tex.stackexchange.com/q/333493/35864, https://tex.stackexchange.com/q/450614/35864. But as so often with LaTeX, you kind of needed to know the answer to find these questions in the sea of similar search results. – moewe May 05 '20 at 16:08

1 Answers1

2

With split numeric bibliographies you almost always want the option defernumbers=true,. That option makes sure that your entries are numbered sequentially in the order they appear in your bibliographies and not according to the global sorting (i.e. the number they would get if all entries were in the same global bibliography).

\documentclass[12pt,a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,
  style=numeric,
  defernumbers=true,
]{biblatex}

\addbibresource{biblatex-examples.bib}


\begin{document}

text \cite{worman} more text \cite{sigfridsson}
even more text \cite{nussbaum} ...text \cite{aksin}

\printbibheading [title={Bibliography}]
\printbibliography[heading=subbibintoc,type=book,title={books}]
\printbibliography[heading=subbibintoc,type=article,title={articles}]

\end{document}

Sequentially numbered bibliography.


Note that defernumbers can be a bit tricky at times. If you switch the option on or off or there are other large bibliography-related changes in your document, the numbering can get stuck in an undesirable state. In that case just delete the temporary files (.aux, .bbl and .bcf) and compile again with the sequence LaTeX, Biber, LaTeX, LaTeX.

moewe
  • 175,683