TeX - LaTeX Asked on July 24, 2021
I have an article which must have two references section. I used biblatex
to do that. In order for the numbered references to continue from one section to the next, I enabled the global option defernumbers=true
, and used resetnumbers=false
for the second reference section.
I also have a third section, with citations that have already appeared in the first or second reference sections. Here’s an MWE:
documentclass{article}
usepackage[defernumbers=true]{biblatex}
usepackage{hyperref}
begin{filecontents*}{mwe.bib}
@misc{paper1,
author={name1},
title={title1},
year={2021}
}
@misc{paper2,
author={name2},
title={title2},
year={2021}
}
@misc{paper3,
author={name3},
title={title3},
year={2021}
}
end{filecontents*}
addbibresource{mwe.bib}
begin{document}
begin{refsection}
section{Section One}
Section one citations: cite{paper1,paper2}
printbibliography
end{refsection}
begin{refsection}
section{Section Two}
Section two citations: cite{paper3}
printbibliography[resetnumbers=false]
end{refsection}
section{Section Three}
Second three citations: cite{paper2}
end{document}
The rendered PDF is shown below:
My questions are:
defernumbers=true
and resetnumbers=false
, and I cleared every temporary file like .aux
and recompiled multiple times.)Edit: This is what I want to achieve (differences from the above image are depicted in red):
refsection
s are always kept completely separate and independent from each other (and so is the numbering in each refsection
), so there is no official way to not reset the count in a new refsection
.
You may want to try refsegment
s, which are not kept separate.
The following gives the desired result in the MWE but may or may not scale well enough for your actual application.
documentclass{article}
usepackage[defernumbers=true]{biblatex}
usepackage{hyperref}
defbibfilter{notsegmentOne}{not segment=1}
begin{filecontents*}{jobname.bib}
@misc{paper1,
author = {name1},
title = {title1},
year = {2021},
}
@misc{paper2,
author = {name2},
title = {title2},
year = {2021},
}
@misc{paper3,
author = {name3},
title = {title3},
year = {2021},
}
end{filecontents*}
addbibresource{jobname.bib}
begin{document}
section{Section One}
Section one citations: cite{paper1,paper2}
printbibliography[filter=notsegmentOne]
begin{refsegment}
section{Section Two}
Section two citations: cite{paper3}
printbibliography[segment=1]
end{refsegment}
section{Section Three}
Second three citations: cite{paper2}
end{document}
Correct answer by moewe on July 24, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP