[Tex/LaTex] no items shown bibliography beamer

beamerbibliographies

Hi I'm quite new to beamer class, I'm trying to add a bibliography at the end of my presentation, latex compiles it without any errors, the reference slides is created but without any items shown in it. here is my codes:

\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}

thanks in advance

Best Answer

As the comment by @Benedikt Bauer pointed already out, you could either use the \cite command in your presentation (e.g. \cite{Baird2002}) or if you do not wand to cite your references you could use the \nocite{*} command. Afterwards compile with pdflatex > bibtex > pdflatex > pdflatex.

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

enter image description here

Related Question