打印/提取已编辑卷中引用的所有 bibtex 条目

打印/提取已编辑卷中引用的所有 bibtex 条目

我仍在努力获取多作者卷使用的所有 bibtex 项目的列表。我们正在使用 biber/biblatex 组合,但我找不到一种简单的方法来获取所引用作品的所有 bibtex 项目。我有一些 biber 调用,但它们没有返回交叉引用的项目。另一种尝试是只编译卷并在末尾有一个统一的参考部分。目前我们在各个章节中有参考文献。我正在寻找一种一次性打印参考书目的方法,但 biblatex 似乎只允许

\printbibliography[section=1,heading=subbibliography]       
\printbibliography[section=2,heading=subbibliography]

这是一个 MWE:

\documentclass{scrbook}

\begin{filecontents}{ref.bib}
@book{degroote2000a,
        Address = {Louvain-la-neuve, Belgium},
        Editor = {de Groote, Philippe},
        Publisher = {Academia},
        Series = {Cahiers du Centre de Logique},
        number = 8,
        Title = {Test item The {Curry-Howard} Isomorphism},
        Year = 2000}

@incollection{curry;feys95,
        Author = {Haskell B. Curry and Robert Feys},
        Booktitle = {The {Curry-Howard} Isomorphism},
        Crossref = {degroote95a},
        Key = {curry-howard isomorphism, logic, type theory},
        Pages = {9--13},
        Title = {The Basic Theory of Functionality. Analogies with Propositional Algebra}}

@book{degroote95a,
        Address = {Louvain-la-neuve, Belgium},
        Annote = {13.7.03},
        Editor = {de Groote, Philippe},
        Key = {curry-howard isomorphism, logic, type theory},
        Publisher = {Academia},
        Series = {Cahiers du Centre de Logique},
        number = 8,
        Title = {The {Curry-Howard} Isomorphism},
        Year = 1995}

@book{curry;feys58,
        Address = {Amsterdam},
        Author = {Haskell B. Curry and Robert Feys},
        Key = {curry-howard isomorphism, type theory, logic},
        Publisher = {North-Holland},
        Title = {Combinatory Logic},
        Volume = 1,
        Year = 1958}
\end{filecontents}

\usepackage[
        style=authoryear,
        backend=biber,
]{biblatex}
\addbibresource{ref.bib}

\begin{document}
\chapter{Chapter one}
\begin{refsection}

\cite{curry;feys58}

\printbibliography
\end{refsection}
\chapter{Chapter two}

\begin{refsection}

\cite{curry;feys95}

\printbibliography
\end{refsection}
\printbibheading 

\printbibliography[section=1,heading=subbibliography]
\printbibliography[section=2,heading=subbibliography] 


\printbibliography
\end{document}

我希望看到一个打印所有引用项的参考书目,这样我就可以找到具有不同引用键的重复项等等。否则,一些工具或工具链会提取我实际使用的 bibtex 项(包括 crossref)就太好了。

答案1

refsections 彼此之间是完全分开的,所以不可能打印不同 s 的合并参考书目(合理地),除非您完全重新实现 s 的工作方式refsection的大部分内容。\printbibliographyrefsection

对于一次性健全性检查,最简单的解决方案是将所有refsections 替换为refsegments,将所有章节参考书目从 更改\printbibliography

\printbibliography[segment=\therefsegment]

并使用 打印全球书目\printbibliography

\documentclass{scrbook}

\usepackage[
        style=authoryear,
        backend=biber,
]{biblatex}


\begin{filecontents}{\jobname.bib}
@book{degroote2000a,
  Address   = {Louvain-la-neuve, Belgium},
  Editor    = {de Groote, Philippe},
  Publisher = {Academia},
  Series    = {Cahiers du Centre de Logique},
  number    = 8,
  Title     = {Test item The {Curry-Howard} Isomorphism},
  Year      = 2000,
}
@incollection{curry;feys95,
  Author    = {Haskell B. Curry and Robert Feys},
  Booktitle = {The {Curry-Howard} Isomorphism},
  Crossref  = {degroote95a},
  Key       = {curry-howard isomorphism, logic, type theory},
  Pages     = {9--13},
  Title     = {The Basic Theory of Functionality. Analogies with Propositional Algebra},
}
@book{degroote95a,
  Address   = {Louvain-la-neuve, Belgium},
  Annote    = {13.7.03},
  Editor    = {de Groote, Philippe},
  Key       = {curry-howard isomorphism, logic, type theory},
  Publisher = {Academia},
  Series    = {Cahiers du Centre de Logique},
  number    = 8,
  Title     = {The {Curry-Howard} Isomorphism},
  Year      = 1995,
}
@book{curry;feys58,
  Address   = {Amsterdam},
  Author    = {Haskell B. Curry and Robert Feys},
  Key       = {curry-howard isomorphism, type theory, logic},
  Publisher = {North-Holland},
  Title     = {Combinatory Logic},
  Volume    = 1,
  Year      = 1958,
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\chapter{Chapter one}
\begin{refsegment}

\cite{curry;feys58}

\printbibliography[segment=\therefsegment]
\end{refsegment}
\chapter{Chapter two}

\begin{refsegment}

\cite{curry;feys95}

\printbibliography[segment=\therefsegment]
\end{refsegment}

\printbibliography
\end{document}

包含两个条目的完整参考书目

如果您愿意,您可以通过(临时)添加加载选项来强制将crossref条目出现在参考书目中。mincrossrefs=1,biblatex

但请记住,refsection在消除歧义方面,这可能会导致与原始设置略有不同的结果。我的标准示例在第 1 章和第 2 章中。如果使用biblatex-examples.bibs ,第 1 章和第 2 章是分开的,则两个引文都将显示为“Knuth 1986”,但使用s 时,您会得到“Knuth 1886a”和“Knuth 1986b”。这可能不是问题,如果您正在校对重复的条目,这甚至可能是一件好事,但如果在生产中需要这样的东西,则需要记住这一点。\autocite{knuth:ct:b}\autocite{knuth:ct:c}refsectionrefsegment


Biber 几乎可以帮你实现这个目标

 biber --output_format=bibtex <documentname>.bcf -O citedbibentries.bib

但这不会自动将crossref条目添加到.bib文件中。(我猜这就是你在问题中提到的,但对于有类似目标的人来说,这可能仍然很有趣。)如果你有兴趣将条目添加crossref到文件中,.bib你可以随时在https://github.com/plk/biber/issues并要求这一点。

相关内容