在我的演讲中,投影在我身后,我可以在笔记本电脑中看到幻灯片笔记。我目前正在使用 Pympress。
我想在演示文稿和注释中显示参考书目。所以我使用了\bibliography
两次。
如我所见,这对于 Latex 来说没有问题,但\bibliography
Bibtex 并不欣赏该命令的复制。
我的 MWE:
\documentclass[12pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen=right}
\bibliographystyle{amsalpha}
\begin{document}
\begin{frame}
File organization: \cite{folkzoellick1992}
Data structures: \cite{langsam1990}
\note{Books}
\end{frame}
\begin{frame}
References for the audience:
\bibliography{mybib}
\note{
References for me:
\bibliography{mybib}
}
\end{frame}
\end{document}
该mybib.bib
文件是:
% Encoding: UTF-8
@Book{langsam1990,
title = {Data structures using C and C++},
publisher = {Prentice-Hall},
year = {1990},
author = {Langsam, Y. and Augenstein, M. J. and Tenenbaum, A .M.},
address = {New Jersey},
}
@Book{folkzoellick1992,
title = {File structures},
publisher = {Addison-Wesley Publishing Company, Inc.},
year = {1992},
author = {Folk, M.J. and Zoellick, B.},
address = {USA},
}
生成的 PDF 没问题,但 Bibtex 会出错。这不是什么大问题,但这个错误一直困扰着我。
这是bibtex
输出:
This is BibTeX, Version 0.99d (TeX Live 2017/Debian)
The top-level auxiliary file: t.aux
The style file: amsalpha.bst
Illegal, another \bibdata command---line 27 of file t.aux
: \bibdata
: {mybib}
I'm skipping whatever remains of this command
Database file #1: mybib.bib
(There was 1 error message)
也许有一个命令可以打印我不知道的参考文献。我在谷歌上搜索并\printbibliography
从biblatex
包中找到。由于我不知道混合使用 Bibtex 和 BibLatex 是否是一种好的做法,所以我正在寻找一些建议。
那么,我错过了什么?:-)
答案1
如果你决定完全切换到biblatex
(用biber
而不是进行编译bibtex
),你可以使用以下方式实现类似的引用样式
\documentclass[12pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen=right}
\usepackage[style=alphabetic]{biblatex}
\addbibresource{mybib.bib}
\setlength{\biblabelsep}{-0.5cm}
\begin{filecontents}{mybib.bib}
% Encoding: UTF-8
@Book{langsam1990,
title = {Data structures using C and C++},
publisher = {Prentice-Hall},
year = {1990},
author = {Langsam, Y. and Augenstein, M. J. and Tenenbaum, A .M.},
address = {New Jersey},
}
@Book{folkzoellick1992,
title = {File structures},
publisher = {Addison-Wesley Publishing Company, Inc.},
year = {1992},
author = {Folk, M.J. and Zoellick, B.},
address = {USA},
}
\end{filecontents}
\begin{document}
\begin{frame}
File organization: \cite{folkzoellick1992}
Data structures: \cite{langsam1990}
\note{Books}
\end{frame}
\begin{frame}
References for the audience:
\printbibliography
\note{
References for me:
\printbibliography
}
\end{frame}
\end{document}