生成紧凑参考书目的最简单方法是什么?

生成紧凑参考书目的最简单方法是什么?

在 Beamer 演示文稿中,我想使用\nocite{*}宏,这样bib文件中的所有条目都将包含在内,无论我是否实际引用了条目。但是,这会产生一个相当长的参考列表,因为每个条目都有很多细节。

生成紧凑参考文献列表的最简单方法是什么。具体来说,每个条目应包含:标题、作者(最多 2 位)、年份。

这听起来像是一件简单的任务,但我找不到正确的解决方案。

编辑:

  1. 我没有特别的理由不使用biblatex。它是一个选择。
  2. 大部分情况下,演示文稿的正文中不会有引文。如果出现少数引文,我希望它们采用数字格式。例如:On Foo Bar, see [1]。尽管如此,参考文献列表将要只要我使用\notice{*}宏。
  3. 在列表本身中,我想要有:标题、作者(最多 2 个,否则为“et al”)、年份。

答案1

另一种biblatex解决方案。

作为基础我们biblatexnumericmaxnames=2

\usepackage[style=numeric,maxnames=2]{biblatex}

我们定义了简短书目驱动程序std,仅打印作者/编辑、标题和日期

\DeclareBibliographyDriver{std}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \usebibmacro{date}%
  \newunit\newblock
  \usebibmacro{finentry}}

然后我们映射所有条目以使用该驱动程序(我真的希望有一个更短、更优雅的方法来做到这一点,但我还没有找到它)

\DeclareBibliographyAlias{article}{std}
\DeclareBibliographyAlias{book}{std}
\DeclareBibliographyAlias{booklet}{std}
\DeclareBibliographyAlias{collection}{std}
\DeclareBibliographyAlias{inbook}{std}
\DeclareBibliographyAlias{incollection}{std}
\DeclareBibliographyAlias{inproceedings}{std}
\DeclareBibliographyAlias{manual}{std}
\DeclareBibliographyAlias{misc}{std}
\DeclareBibliographyAlias{online}{std}
\DeclareBibliographyAlias{patent}{std}
\DeclareBibliographyAlias{periodical}{std}
\DeclareBibliographyAlias{proceedings}{std}
\DeclareBibliographyAlias{report}{std}
\DeclareBibliographyAlias{thesis}{std}
\DeclareBibliographyAlias{unpublished}{std}
\DeclareBibliographyAlias{*}{std}

为了获得引用标签而不是“可爱的小图标”,我们可以使用

\setbeamertemplate{bibliography item}[text]

Beamer-模板/-颜色/-字体bibliography item,第 102 页用户beamer指南

平均能量损失

\documentclass{beamer}
\usepackage[style=numeric,maxnames=2]{biblatex}
\addbibresource{biblatex-examples.bib}

\setbeamertemplate{bibliography item}[text]

\DeclareBibliographyAlias{article}{std}
\DeclareBibliographyAlias{book}{std}
\DeclareBibliographyAlias{booklet}{std}
\DeclareBibliographyAlias{collection}{std}
\DeclareBibliographyAlias{inbook}{std}
\DeclareBibliographyAlias{incollection}{std}
\DeclareBibliographyAlias{inproceedings}{std}
\DeclareBibliographyAlias{manual}{std}
\DeclareBibliographyAlias{misc}{std}
\DeclareBibliographyAlias{online}{std}
\DeclareBibliographyAlias{patent}{std}
\DeclareBibliographyAlias{periodical}{std}
\DeclareBibliographyAlias{proceedings}{std}
\DeclareBibliographyAlias{report}{std}
\DeclareBibliographyAlias{thesis}{std}
\DeclareBibliographyAlias{unpublished}{std}
\DeclareBibliographyAlias{*}{std}

\DeclareBibliographyDriver{std}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \usebibmacro{date}%
  \newunit\newblock
  \usebibmacro{finentry}}

\begin{document}
\begin{frame}
  \cite{wilde,baez/article,cicero,aksin,westfahl:space,westfahl:frontier,gaonkar,britannica}
\end{frame}
\begin{frame}
  \printbibliography
\end{frame}
\end{document}

在此处输入图片描述

答案2

下面我使用biblatex

  • maxnames=2, minnames=2通过将选项传递给包将作者姓名的数量限制为两个biblatex
  • 通过钩子定制书目内容\AtEveryitem。在这个钩子中,我使用\clearfield/name/list{<element>}排除某些字段的打印功能。

对于许多字段,后者也可以通过全局biblatex选项实现,例如doi=false。但是,这并不适用于所有字段。对我来说,钩子还可以通过注释相应的\clearfield行来更轻松地“玩”不同的设置。

\documentclass{beamer}
\usepackage{filecontents}
\usepackage[backend=bibtex,style=numeric,maxnames=2, minnames=2]{biblatex}
\addbibresource{beamer.bib}
\usepackage[utf8]{inputenc}

\begin{filecontents}{beamer.bib}
@article{hoare:69:cacm,
  author = {Hoare, C. A. R.},
  title = {An axiomatic basis for computer programming},
  journal = {Communications of the ACM},
  volume = 12,
  number = 10,
  month = oct,
  year = 1969,
  issn = {0001-0782},
  pages = {576--580},
  doi = {10.1145/363235.363259},
  publisher = {ACM Press},
  address = {New York, NY, USA},
}
@article{dijkstra:68:cacm,
  author = {Edsger Wybe Dijkstra},
  title = {The Structure of the {THE}-Multiprogramming System},
  journal = {Communications of the ACM},
  year = {1968},
  month = may,
  volume = 11,
  number = 5,
  pages = {341--346},
}
@article{graham:68:cacm,
  author = {Robert M. Graham},
  title = {Protection in an Information Processing Utility},
  journal = {Communications of the ACM},
  volume = {11},
  number = {5},
  month = may,
  year = {1968},
  issn = {0001-0782},
  pages = {365--369},
  doi = {10.1145/363095.363146},
  publisher = {ACM Press},
  address = {New York, NY, USA},
}
@inproceedings{henkel:11:codesisss,
  title = {Design and Architectures for Dependable Embedded Systems},
  author = { Henkel,J{\"o}rg and Bauer,Lars and Becker,Joachim and Bringmann,Oliver and Brinkschulte,Uwe and Chakraborty,Samarjit and Engel,Michael and Ernst,Rolf and H{\"a}rtig,Hermann and Hedrich,Lars and Herkersdorf,Andreas and R{\"u}diger Kapitza and Daniel Lohmann and Marwedel,Peter and Platzner,Marco and Rosenstiel,Wolfgang and Schlichtmann,Ulf and Spinczyk,Olaf and Tahoori,Mehdi and J{\"u}rgen Teich and Wehn,Norbert and Wunderlich,Hans-Joachim},
  keywords = {embedded systems, dependable systems, danceos},
  doi = {10.1145/2039370.2039384},
  pages = {69--78},
  editor = {Robert P. Dick and Jan Madsen},
  isbn = {978-1-4503-0715-4},
  venue = {Taipei, Taiwan},
  booktitle = {Proceedings of the 9th IEEE/ACM International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS '11)},
  year = {2011},
  month = oct,
  publisher = {ACM Press},
}

\end{filecontents}


% Content Tailoring
%
% tailor content of bibliography
\AtEveryBibitem{
   \clearfield{month}
   \clearfield{series}
   \clearfield{venue}
   \clearname{editor}
   \clearlist{publisher}
   \clearlist{location} % alias to field 'address'
   \clearfield{doi}
   \clearfield{url}
   \clearfield{venue}
   \clearfield{issn}
   \clearfield{isbn}
   \clearfield{urldate}
   \clearfield{eventdate}
   %\clearfield{pages}
   %\clearfield{booktitle}
   %\clearfield{journaltitle}
   %\clearfield{number}
   %\clearfield{volume}
}

\begin{document}
\nocite{*}
\begin{frame}[allowframebreaks]
    \printbibliography
\end{frame}
\end{document}

结果如下:

在此处输入图片描述

如果您想要删除更多数据,只需取消注释\AtEveryBibitem处理程序中的附加行:

在此处输入图片描述

答案3

使用此样式文件: http://comedy.dante.de/~herbert/Bibliography/plain-short.bst

\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{plain-short}
\bibliography{ref-antibiotics}

\end{document}

你会得到:

在此处输入图片描述

答案4

为了缩短参考书目,我建议生成一个新的 bib 文件,在其中仅指定您真正需要的字段。(省略中间名,使用常见的会议和期刊缩写等。)正如您在 Daniel 的回答中看到的那样,事后很难将它们过滤掉,您可能会错过一两个。请记住,一些 bibitems 例如@article需要一些期刊标题,并将打印额外的符号,如:In:。为此,Moewe 将所有 bibitems 大大粉碎为一些 std 类型,非常优雅!

现在我要做出贡献:啊,没有,只是在这个网站上搜索了一段时间。

  • 基本上,从项目符号到项目文本(水平方向)浪费了大量空间。您可以使用以下方法减少此浪费:\setlength{\biblabelsep}{-0.5cm}
  • 此外,biblatex 还为您提供了使用名字首字母的可能性:firstinits=true
  • 这里的原始符号也占用了很大的空间,将其更改为较小的一些:\setbeamertemplate{bibliography item}[triangle]
  • 其余来自另一个很好的答案使用 biblatex 减少参考书目中的间距,我认为这有点可能重复,但是,您的问题与 beamer 有关,因此,begingroupendgroup东西再次减少了垂直空间:
  • 最后但并非最不重要的是,有时 microtype 包也可能节省一些空间(这是我经常包含的包之一)
\documentclass[compress]{beamer}
\usepackage{setspace}
\usepackage{microtype}
\usepackage{lmodern}
\usepackage[style=numeric-comp,firstinits=true,maxcitenames=2,maxbibnames=2]{biblatex}
% % Do this to reduce size
% \renewcommand*{\bibfont}{\footnotesize}
\addbibresource{biblatex-examples.bib}

\DeclareBibliographyAlias{article}{std}
\DeclareBibliographyAlias{book}{std}
\DeclareBibliographyAlias{booklet}{std}
\DeclareBibliographyAlias{collection}{std}
\DeclareBibliographyAlias{inbook}{std}
\DeclareBibliographyAlias{incollection}{std}
\DeclareBibliographyAlias{inproceedings}{std}
\DeclareBibliographyAlias{manual}{std}
\DeclareBibliographyAlias{misc}{std}
\DeclareBibliographyAlias{online}{std}
\DeclareBibliographyAlias{patent}{std}
\DeclareBibliographyAlias{periodical}{std}
\DeclareBibliographyAlias{proceedings}{std}
\DeclareBibliographyAlias{report}{std}
\DeclareBibliographyAlias{thesis}{std}
\DeclareBibliographyAlias{unpublished}{std}
\DeclareBibliographyAlias{*}{std}

\DeclareBibliographyDriver{std}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \usebibmacro{date}%
  \newunit\newblock
  \usebibmacro{finentry}
}

\begin{document}
\begin{frame}[t,allowframebreaks]{Bibliography}
  \nocite{*}
  \begingroup
  \setstretch{0.8}
  \linespread{0.9}
  \setbeamertemplate{bibliography item}[triangle]
  \setlength\bibitemsep{-0pt}
  \setlength{\biblabelsep}{-0.5cm}
  \printbibliography
  \endgroup
\end{frame}

\end{document}

在此处输入图片描述

与 moewes 的回答相比: 在此处输入图片描述

相关内容