多个参考书目同一个 bib 文件

多个参考书目同一个 bib 文件

我正在写一篇文档,其中引用了所有参考文献,然后在下一章中,我想引用其中一些参考文献,但它们的编号应从 [1] 开始。我尝试了选项“ resetnumbers=true”,但它会再次打印所有参考文献,如下面的 MWE 所示

\documentclass[12pt,headsepline,a4paper,BCOR=10mm,twoside,titlepage,pdftex,cleardoubleplain]{scrbook}%abstracton
\usepackage[style=ieee,backend=bibtex8,,dashed=false,defernumbers=true]{biblatex}
\bibliography{References.bib}
\begin{document}
\chapter{chapter 1}
bla bla bla \cite{A}, \cite{B}, ..., \cite{Z}

\printbibliography
\chapter{chapter 2}
%% Here I need to reset the bibliography to include references only starting from this point
bla bla bla \cite{B}, \cite{C}

\printbibliography{resetnumbers=true} %only print references B and C with numbers [1] and [2]

\chapter{chapter 3}
%% Here I need to reset the bibliography to include references only starting from this point
bla bla bla \cite{D}, \cite{E}

\printbibliography{resetnumbers=true}%only print references D and E with numbers [1] and [2]

\end{document}

请注意,由于文档已经写好,我需要在任何地方使用相同的命令\cite。即我不想用\cite\citeA像对库“ multibib”那样替换

答案1

您需要使用refsections 将文档中的章节分开。使用refsections,每章中的引文与其他章节中的引文和参考书目无关。特别是,\printbibliography引用将仅列出其编号从 1 开始引用的作品refsection。(这意味着同一来源在引用的每一章中可能具有不同的编号。)

您可以使用在每一章之前\newrefsection开始新的一章refsection。这可以refsection=chapter在加载时间选项中自动完成。如果您希望在结尾处\begin{refsection}...\end{refsection}返回周围环境,也可以使用此选项。refsection

如果你坚持使用,backend=bibtex8你必须编译几个辅助文件才能获得正确的引文,这可能会有点麻烦。所以我建议你改用 Biber。看看bibtex 与 biber 以及 biblatex 与 natbib 的比较使用问号或粗体引用关键字代替引用编号有关 BibTeX 和 Biber 的背景信息。

你必须backend=bibtex8改为backend=biber 你必须运行 Biber 而不是 BibTeX 或者告诉你的编辑器这样做,参见Biblatex 与 Biber:配置我的编辑器以避免未定义的引用

从 BibTeX 到 Biber 的转变不会改变您使用的样式,它只是允许您使用 的所有biblatex功能,而不仅仅是其中有限的子集。如果您在使用 Biber 时遇到问题,请查看biber 故障排除用于急救。

\documentclass{scrbook}
\usepackage[style=ieee, backend=biber, dashed=false, defernumbers=true]{biblatex}
\bibliography{biblatex-examples.bib}

\begin{document}
\newrefsection
\chapter{chapter 1}
Lorem ipsum \cite{sigfridsson,nussbaum,knuth:ct:a}
\printbibliography

\newrefsection
\chapter{chapter 2}
Dolor sit \cite{nussbaum,worman}
\printbibliography

\newrefsection
\chapter{chapter 3}
Amet consectur \cite{geer,cicero}
\printbibliography
\end{document}

编译为

pdflatex smrdoc
biber smrdoc
pdflatex smrdoc
pdflatex smrdoc

将输出

在此处输入图片描述

参见第二章的参考书目。

相关内容