Beamer 中的参考文献和参考书目

Beamer 中的参考文献和参考书目

我正在尝试在 Beamer 的脚注中实现完整引用,就像我在 latex wikibooks 上找到的那样https://en.wikibooks.org/wiki/LaTeX/Presentations,以及在Beamer 中的书目。我似乎无法让它工作,我是否遗漏了什么?这是 MWE。

\documentclass[10pt,handout,english]{beamer}
\usepackage[english]{babel}
\usepackage[backend=biber,style=numeric-comp,sorting=none]{biblatex}
\addbibresource{bib2.bib}

\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}

\begin{document}

\begin{frame}

 \frametitle{Title}
 A reference~\footfullcite{Amin}, with ref_bib an item of the .bib file.

\end{frame}

\begin{frame}[allowframebreaks]
        \frametitle{References}
        \bibliographystyle{amsalpha}
        \bibliography{bib2.bib}
\end{frame}

\end{document}

答案1

因为您加载了biblatex包,所以您应该用 替换\bibliography{bib2.bib}\printbibliography删除\bibliographystyle{amsalpha},在您的示例中,样式在包加载期间定义为可选参数numeric-comp。还请注意,您必须在您展示的代码中使用 biber 而不是 bibtex。

如果您更喜欢模仿该amsalpha风格的风格,请参阅Biblatex 中有任何类似 amsalpha 的风格吗?

\documentclass[10pt,handout,english]{beamer}
\usepackage[english]{babel}
\usepackage[backend=biber,style=numeric-comp,sorting=none]{biblatex}


\usepackage{filecontents}
\begin{filecontents*}{bib2.bib}
@book{knuth,
  author       = {Knuth, Donald E.},
  title        = {The {\TeX} book},
  date         = 1984,
  maintitle    = {Computers \& Typesetting},
  volume       = {A},
  publisher    = {Addison-Wesley},
  location     = {Reading, Mass.},
  langid       = {english},
  langidopts   = {variant=american},
  sortyear     = {1984-1},
  sorttitle    = {Computers & Typesetting A},
  indexsorttitle= {The TeXbook},
  indextitle   = {\protect\TeX book, The},
  shorttitle   = {\TeX book}
}

@article{einstein,
    author = {Einstein, A.},
    title = {Die Grundlage der allgemeinen Relativitätstheorie},
    journal = {Annalen der Physik},
    volume = {354},
    number = {7},
    doi = {10.1002/andp.19163540702},
    pages = {769--822},
    year = {1916}
}
\end{filecontents*}

\addbibresource{bib2.bib}

\begin{document}

\begin{frame}

 \frametitle{Title}
 A reference\footfullcite{knuth}, with refbib an item of the .bib file.

\end{frame}

\begin{frame}[allowframebreaks]
        \frametitle{References}
%        \bibliographystyle{amsalpha}
\printbibliography
%        \bibliography{bib2.bib}
\end{frame}

\end{document}

在此处输入图片描述

相关内容