biblatex:同一文档中两个具有不同行为的 .bib 文件

biblatex:同一文档中两个具有不同行为的 .bib 文件

biblatex我在使用两个参考书目时遇到了一些麻烦。

我正在使用以下选项:

\usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt, bibstyle=ieee, maxnames=5]{biblatex}
\nocite{*}
\addbibresource{bib1.bib}
\addbibresource{bib2.bib}

我想在文档中间插入一个参考书目,并带有特殊的子参考书目标题和特殊编号。我实际上已经弄清楚了如何做到这一点,而且效果很好。例如,

\printbibliography[heading=subbibliography,title={{\small Book Chapters}},type=incollection, keyword=DZ, prefixnumbers={B}]

\printbibliography[heading=subbibliography,title={{\small Journals}},type=article, keyword=DZ, prefixnumbers={J}]

给了我两个子标题(书籍章节和期刊),每个标题下的参考文献都以特殊编号列出(即 B1、B2 和 J1、J2 等...)。它使用 bib1.bib(关键字为 DZ 的 bib)中的所有参考文献。这正是我想要的。

我还想使用不同的 .bib 文件在文档末尾包含“标准”参考书目。我添加了关键字 (keywords=noDZ) 以尝试简化操作,然后添加了\printbibliography[keyword=noDZ]我希望参考书目出现的行。

当我引用该文章时,它现在显示整个 bib2 参考书目,并且编号不从 1 开始。我怀疑我使用不\nocite正确。我希望第二个参考书目以 [1] 开头,并且仅打印文中引用的参考文献。

任何帮助都将非常有帮助!

[编辑] 根据要求,这里有一个示例文件,与我上面描述的内容非常相似(尽管现在内联引用的内容是[2]而不是名字)。

\documentclass{article}

\usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt, bibstyle=ieee, maxnames=5]{biblatex}
\nocite{*}

\begin{filecontents}{\jobname-bib1.bib}
@BOOK{hectic2000,
  AUTHOR    = {Henry Hectic},
  TITLE     = {How Horticulturalists Howl},
  PUBLISHER = {Honorary Books: Henage},
  YEAR      = {2000},
  keywords={DZ}
}
@BOOK{hectic2001,
  AUTHOR    = {Henry Hectic},
  TITLE     = {How Horticulturalists Howl},
  PUBLISHER = {Honorary Books 2: Henage},
  YEAR      = {2001},
  keywords={DZ}
}
@ARTICLE{Doe2009,
author = {Jon Doe},
journal = {Transactions on Stuff},
month = 03,
number = {3},
pages = {1--11},
title = {{Example 1}},
volume = {5},
year = {2009},
keywords={DZ}
}
\end{filecontents}

\begin{filecontents}{\jobname-bib2.bib}

@ARTICLE{Kim2012,
author = {Y Kim},
journal = {Transactions on Other Stuff},
month = 01,
number = {1},
pages = {1--11},
title = {{Example 3}},
volume = {5},
year = {2012},
keywords={noDZ}
}

@ARTICLE{Jane2010,
author = {Jane Doe},
journal = {Transactions on Stuff},
month = 01,
number = {1},
pages = {1--11},
title = {{Example 2}},
volume = {5},
year = {2010},
keywords={noDZ}
}
\end{filecontents}

\addbibresource{\jobname-bib1.bib}
\addbibresource{\jobname-bib2.bib}

\begin{document}
\section{My Bib}

\printbibliography[heading=subbibliography,title={{\small Book Chapters}},type=book, keyword=DZ, prefixnumbers={B}]
\printbibliography[heading=subbibliography,title={{\small Journals}},type=article, keyword=DZ, prefixnumbers={J}]


\section{Main Text}

Now I am citing \cite{Jane2010}.  I want new references.

\printbibheading


\printbibliography[keyword=noDZ]

\end{document}

答案1

在您的示例以及我尝试的解决方案中,biblatex/biber 并不稳定(latexmk 在第 5 次编译运行后停止);尽管如此,输出似乎是您想要的:

  • 用于\addsectionbib第一个书目资源;

  • 将第一部分封闭在refsection环境中,并将第一个资源指定为环境的可选参数;

  • \nocite{*}在 内使用refsection

编辑:解决方案不依赖于关键字,所以我省略了它们。

\documentclass{article}

\usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt, bibstyle=ieee, maxnames=5]{biblatex}

\begin{filecontents}{\jobname-bib1.bib}
@BOOK{hectic2000,
  AUTHOR= {Henry Hectic},
  TITLE = {How Horticulturalists Howl},
  PUBLISHER = {Honorary Books: Henage},
  YEAR  = {2000},
}
@BOOK{hectic2001,
  AUTHOR= {Henry Hectic},
  TITLE = {How Horticulturalists Howl},
  PUBLISHER = {Honorary Books 2: Henage},
  YEAR  = {2001},
}
@ARTICLE{Doe2009,
author = {Jon Doe},
journal = {Transactions on Stuff},
month = 03,
number = {3},
pages = {1--11},
title = {{Example 1}},
volume = {5},
year = {2009},
}
\end{filecontents}

\begin{filecontents}{\jobname-bib2.bib}
@ARTICLE{Kim2012,
author = {Y Kim},
journal = {Transactions on Other Stuff},
month = 01,
number = {1},
pages = {1--11},
title = {{Example 3}},
volume = {5},
year = {2012},
}
@ARTICLE{Jane2010,
author = {Jane Doe},
journal = {Transactions on Stuff},
month = 01,
number = {1},
pages = {1--11},
title = {{Example 2}},
volume = {5},
year = {2010},
}
\end{filecontents}

\addsectionbib{\jobname-bib1.bib}
\addbibresource{\jobname-bib2.bib}

\begin{document}

\begin{refsection}[\jobname-bib1.bib]

\nocite{*}

\section{My Bib}

\printbibliography[heading=subbibliography,title={{\small Book Chapters}},type=book,prefixnumbers={B}]
\printbibliography[heading=subbibliography,title={{\small Journals}},type=article,prefixnumbers={J}]

\end{refsection}

\section{Main Text}

Now I am citing \cite{Jane2010}.  I want new references.

\printbibliography

\end{document}

在此处输入图片描述

相关内容