2

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

  • The References will only show up if you cite something in your presentation – which you don't do as far as I can see in your code. That means, as soon as there's some \cite command in your code and you have done the latex, bibtex, latex, latex runs, there should be something showing up. – Benedikt Bauer Nov 11 '13 at 14:56
  • This question is similar in nature to How to create a minimum working example to demonstrate difficulties with BibTeX? where the solution suggests to compile with BibTeX after a first compilation, then follow that with another compilation (of pdflatex, say) at the end. That is, pdflatex > bibtex > pdflatex. – Werner Nov 11 '13 at 14:57
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.