Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm making a beamer presentation and I'd like to use natbib because of its \citet and that it recognizes URLs. However, when I try to compile it, while doing the third PDFLaTeX pass, there appear this error (among others):

[28] (./presentacion.toc) [29] (./presentacion.bbl  

(./presentacion.toc  

! Missing } inserted.  

<inserted text>   

                }  

l.3 ...r@sectionintoc {1}{Introducci\'on}{4}{0}{1}  

When I take out the natbib package, everything works well, including the \bibliography

Is there a way to solve this, or I shouldn't use natbib with beamer?

share|improve this question
    
Minimal complete example? I have used beamer + natbib occasionally. –  Jukka Suomela Aug 18 '10 at 17:10

2 Answers 2

up vote 8 down vote accepted

The beamer class is not working with natbib. The initial author of the class Till Tantau said:

Currently, beamer does not work with natbib since beamer meddles with the same things as natbib and beamer's meddling is not done in such a way that natbib can tolerate this. Also, it is not possible to "switch off beamer's meddling"

However, you may use it in article mode.

You can read it here in the tex.latex.beamer.general mailing list.

share|improve this answer
1  
Yes, this is one of the things on the beamer 'to do' list. Not sure whether we'll tackle this any time soon. –  Joseph Wright Aug 18 '10 at 17:15
    
It's really great that the development of beamer goes on. –  Stefan Kottwitz Aug 18 '10 at 17:16

Here is a working example. I compiled this on MacTex-2009, using pdflatex. No errors, no warnings (except a message about pgfbaseimage.sty being obsolete, which is unrelated).

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage[scaled]{helvet}
\usepackage[round]{natbib}
\newcommand{\newblock}{}

\begin{document}

\begin{frame}
    See \citet{foo}.

    \begin{thebibliography}{22}
        \bibitem[Foo(1988)]{foo} Foo (1998). Bar. \emph{CONF 1988}.
    \end{thebibliography}
\end{frame}

\end{document}

The result is a PDF document that looks like this:

See Foo (1988).

Foo (1998). Bar. CONF 1988.

And another example using Bibtex; test.tex:

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage[scaled]{helvet}
\usepackage[round]{natbib}
\newcommand{\newblock}{}

\begin{document}

\begin{frame}
    See \citet{foo}.

    \bibliographystyle{abbrvnat}
    \bibliography{test}
\end{frame}

\end{document}

and test.bib:

@INPROCEEDINGS{foo,
    author={Bar Foo},
    year={1988},
    title={Foo},
    booktitle={CONF 1988}
}

Again, works fine.

share|improve this answer
3  
Your post was very helpful for me. I want to say, though, that this second example is NOT straightforward at all. In particular \newcommand{\newblock}{} is a hack to get natbib and beamer working together. The beamer user guide suggests that only the manual bibliography entry approach is supported. –  lowndrul Mar 2 '11 at 0:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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