4

For some reason, the following code always assigns to both references the number [1] in the two bibliographies. From the biblatex manual, I would assume that the default behaviour would be consecutive numbering and that the flag

resetnumbers=false

would be required. However, for some reason, resetting the numbers seems to be the default here and I cannot find a way to switch it off.

Also, if I replace

\newrefsection

with

\newrefsegment

than both references appear in both bibliographies. Any help would be greatly appreciated.

\documentclass[]{article}

\usepackage{filecontents}
\usepackage[backend=biber]{biblatex}

\begin{filecontents}{test.bib}
@article{test1,
        author={Author A},
        title={Test},
        journal={Test},
        year={2016},
}

@article{test2,
        author={Author B},
        title={Test},
        journal={Test},
        year={2016},
}
\end{filecontents}

\addbibresource{test.bib}

\begin{document}

\section*{Section One}
Here is one reference~\cite{test1}
\printbibliography

\newrefsection

\section*{Section Two}
Here is a second reference~\cite{test2}
\printbibliography

\end{document}

1 Answer 1

1

Changing everything from section to segments should work if you put the \printbibliography commands outside the segments, which you have to explicitly delimit with \begin{refsegment} … \end{refsegment}. You also have to manually define which segment to print with which print command.

\documentclass[]{article}

   \usepackage[backend=biber]{biblatex}
   \addbibresource{test.bib}

\begin{document}

\section*{Section One}

\begin{refsegment}
    Here is one reference~\cite{test1}
\end{refsegment}

\printbibliography[segment=1]

\section*{Section Two}

\begin{refsegment}
    Here is a second reference~\cite{test2}
\end{refsegment}
\printbibliography[segment=2]

\end{document}
2
  • 3
    If you use segment=\therefsegment you can get the bibliography of the currently active segment without mentioning it explicitly. You will then have to move the \printbibliography to before the \end{refsegment}, but that shouldn't be a problem.
    – moewe
    Commented Apr 6, 2016 at 14:00
  • Nice, that works, too. Obviously, the crucial missing part in my example above was the explicit reference to a segment in \printbibliography.
    – Daniel
    Commented Apr 6, 2016 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .