Generalbeamer natbib bibliography not working

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Monkey D
Posts: 22
Joined: Thu Nov 01, 2007 6:12 pm

beamer natbib bibliography not working

Post by Monkey D »

I don't know why this doesn't work.

I copy-pasted the bib structure from my document to this presentation but it insists on not working.

Code: Select all

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage{default}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[square, sort, numbers, authoryear]{natbib}
\bibliographystyle{plainnat}

\usetheme{Warsaw}
...
\begin{document}

\begin{frame}{something}
Because it's cool \citep{MrCool2007}.
\end{frame}

\bibliography{references}
\end{document}
My error message:
presentation.tex:0: Citation `MrCool2007' on page 3 undefinedon input line 101.
presentation.tex:8: Empty `thebibliography' environment on input line 8.
presentation.tex:0: There were undefined citations.
Line 8 is the one before natbib usepackage.
If I comment the line where I cite and the \bibliography line it compiles without warnings/errors (but off course it doesn't solve me the problem).

Any way to fix this?
Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: beamer natbib bibliography not working

Post by josephwright »

Have you run bibtex? I think you also need to do something like \newcommand*{\newblock}{}, as beamer does not define it.

Joseph Wright
Joseph Wright
Monkey D
Posts: 22
Joined: Thu Nov 01, 2007 6:12 pm

Re: beamer natbib bibliography not working

Post by Monkey D »

Once again thank you josephwright! :mrgreen:
This solved the problem:
\def\newblock{}
\bibliography{references}
Post Reply