没有显示任何项目 参考书目 beamer

没有显示任何项目 参考书目 beamer

你好,我对 beamer 课程还很陌生,我想在演示文稿的末尾添加一个参考书目,LaTeX 可以毫无错误地编译它,创建参考幻灯片但其中没有显示任何项目。这是我的代码:

\documentclass{beamer}
\usepackage[english,italian]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern}
\usepackage{color}
\usepackage{url}
\usepackage{attrib}
\newcommand{\virgolette}[1]{``#1''}

\begin{filecontents}{\jobname.bib}
@article{Baird2002,
author = {Baird, Kevin M and Hoffmann, Errol R and Drury, Colin G},
journal = {Applied ergonomics},
month = jan,
number = {1},
pages = {9--14},
title = {{The effects of probe length on Fitts' law.}},
volume = {33},
year = {2002}
}
\end{filecontents}
\bibliographystyle{apalike}
\setbeamertemplate{frametitle continuation}[from second]
\setbeamercolor*{bibliography entry title}{fg=black}
\setbeamercolor*{bibliography entry author}{fg=black}
\setbeamercolor*{bibliography entry location}{fg=black}
\setbeamercolor*{bibliography entry note}{fg=black}
\setbeamertemplate{bibliography item}{}


\mode<presentation>

\definecolor{Dblue}{cmyk}{0.67,0.363,0,0.643}
\definecolor{Lblue}{cmyk}{0.23,0.10,0,0.043}
\setbeamercolor{section in head/foot}{fg=black,bg=Lblue}
\setbeamercolor{title}{bg=Dblue, fg=white}
\setbeamercolor{frametitle}{bg=Dblue, fg=white}
\setbeamercolor{upper separation line head}{bg=white, fg=white}
\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent}

\setbeamertemplate{headline}
{
\begin{beamercolorbox}[colsep=0.5pt,ht=.3ex]{upper separation line head}
 \end{beamercolorbox}
\hspace{3.8cm}
\begin{beamercolorbox}[wd=9cm]{section in head/foot}
\vskip2pt\insertnavigation{9cm}\vskip2pt
\end{beamercolorbox}
\begin{beamercolorbox}[colsep=0.5pt,ht=.3ex]{upper separation line head}
  \end{beamercolorbox}
}
\setbeamertemplate{footline}
{
\begin{beamercolorbox}[wd=0.5\paperwidth ,ht=2.25ex,dp=1ex]{section in head/foot}
  \hspace{10pt}\insertframenumber \hspace{10pt} \textbf{\inserttitle} \insertsubtitle   
\end{beamercolorbox}
\begin{beamercolorbox}[colsep=0.5pt,ht=.3ex]{upper separation line head}
 \end{beamercolorbox}
}    

\setbeamertemplate{title page}[default][colsep=0pt]


\begin{document}
\begin{frame}[t,allowframebreaks]
\frametitle{References}
\bibliography{\jobname}
\end{frame}
\end{document}

提前致谢

答案1

正如@Benedikt 鲍尔已经指出,您可以\cite在演示文稿中使用命令(例如\cite{Baird2002}),或者如果您不想引用参考文献,也可以使用命令\nocite{*}。然后使用pdflatex> bibtex> pdflatex>进行编译pdflatex

\begin{frame}[t,allowframebreaks]
    \frametitle{References}
    \nocite{*}
    \bibliography{\jobname}
\end{frame}

enter image description here

相关内容