0

I want to create a custom article that will list various references at the end of each section. This reference list needs to be independent of each other although some cited articles may appear in each list in different order. This a MWE of my intended document

\begin{filecontents}{refslist.bib}
    @article{key,
        author = {author1},
        title = {title1}
    }
    @article{key2,
        author = {author2},
        title ={title2}
    }
    @article{key3,
        author = {author3},
        title ={title3}
    }
@article{key4,
    author ={author4},
    title ={title4}
}

\end{filecontents}

\documentclass{article} \usepackage{filecontents} \usepackage[defernumbers=true,style=numeric,backend=bibtex,url=true,isbn=false,sorting=none,citereset=subsection]{biblatex}

\addbibresource{refslist.bib}

\begin{document}

\section{Show} This section will show a list of cited articles \cite{key,key2,key3,key4} \subsection{References in order 1} \printbibliography[heading=none,section=\therefsection, title={References}]

\section{Not Show} This section will not show a list of cited articles \cite{key2,key3,key3,key} \therefsection \newrefsection %\printbibliography[heading=subbibliography] \section{Show Again} \newrefsegment This section will show a list of cited articles in different order \therefsection \cite{key4,key3,key2} \subsection{References in order 2} \printbibliography[heading=none,section=1, title={References}] \end{document}

The output of the file after compiling it is not the desired output.

enter image description here

If I change the backend to biber as suggested on similar questions doesn't work it gets even worse not a single citing label is recognized.

enter image description here

The desired output should be like this (I create this by hand )

enter image description here

According to my log file, after line 39 where I declare a new refsegment all citation keys after that line become undefined. Thus, line 40 \printbibliograph produces an empty bibliography.

Is there a workaround this? I am working on Win TeXstudio 2.10.4 and on Mac TeXshop 3.61 (doesn't make any difference)

Jared Lo
  • 652

1 Answers1

0

Not all advanced features are supported with backend=bibtex,. For full support of all biblatex features you need to use backend=biber,. Note that you then need to compile your document with Biber and not with BibTeX (or you need to tell your editor about it: Biblatex with Biber: Configuring my editor to avoid undefined citations).

Then

\documentclass{article}
\usepackage[
  backend=biber,
  style=numeric,
  sorting=none,
  defernumbers=true,
  citereset=subsection,
  url=true,isbn=false,
]{biblatex}

\begin{filecontents}{\jobname.bib} @article{key, author = {author1}, title = {title1} } @article{key2, author = {author2}, title = {title2} } @article{key3, author = {author3}, title = {title3} } @article{key4, author = {author4}, title = {title4} } \end{filecontents} \addbibresource{\jobname.bib}

\begin{document}

\section{Show} This section will show a list of cited articles \cite{key,key2,key3,key4} \subsection{References in order 1} \printbibliography[heading=none,section=\therefsection, title={References}]

\section{Not Show} This section will not show a list of cited articles \cite{key2,key3,key3,key} \therefsection

\newrefsection \section{Show Again}

This section will show a list of cited articles in different order \therefsection \cite{key4,key3,key2} \subsection{References in order 2} \printbibliography[heading=none,section=1, title={References}] \end{document}

produces

enter image description here

for me, which looks pretty similar to what you want.

(I removed the \newrefsegment. It didn't do anything useful here.)

moewe
  • 175,683
  • Even when backend=biber and manually compiling with biber I am still unable to get the desired output – Jared Lo Jun 29 '23 at 22:28
  • @JaredLo Can you get Biber to compile https://gist.github.com/moewew/3db5241d57a4616580d319d83247cbfe to the expected output? – moewe Jun 30 '23 at 05:02
  • I think this is a particular error on my package installation. Or an outdated version of Biber. But on top on changing to biber my compilation I needed to add an extra \newrefsection at the end of the first \printbibliography to get things working – Jared Lo Jul 03 '23 at 22:28
  • @JaredLo It's possible that older versions of biblatex had a bug there. But if you have to add a \newrefsection at that point, the citations following it are independent from the \printbibliography in the previous section. So you cannot really expect usable output. I strongly suggest you update your system. I just double checked: With a current version of biblatex you get the intended output. – moewe Jul 04 '23 at 05:07