Document ClassesBeamer + BibTeX = new section "References" -> how to avoid?

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Beamer + BibTeX = new section "References" -> how to avoid?

Post by Stefanie »

I have a problem with my bibliography in a presentation written with beamer. The command \bibliography{mybibfile} automatically creates a new section "References". My problem is that this section is printed in the sections overview on the top of every slide (this depends on the theme used of course) and i don't want this.

How can I stop LaTeX from creating this section?

Code: Select all

\documentclass[a4paper,12pt]{beamer}
\usetheme{copenhagen}

\begin{document}

\begin{frame}[allowframebreaks]{Bibliography}
\bibliographystyle{alpha}
\bibliography{bib.bib}
\end{frame}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: Beamer + BibTeX = new section "References" -> how to avoid?

Post by Stefan Kottwitz »

Hi Stefanie,

when I tested this example no section References was created. I don't see "References" in the sections overview at the top. What exactly do you mean? Is this minimal example really showing a problem? Or is it caused by other code that you didn't post? Maybe something else in your document preamble.

Stefan
LaTeX.org admin
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Beamer + BibTeX = new section "References" -> how to avoid?

Post by Stefanie »

I have to run pdflatex twice to see it. If i run latex only once the cross-references are replaced by a question mark.
My preamble looks like this

Code: Select all

\documentclass[a4paper,12pt]{beamer}
\usepackage[dutch]{babel}
\usetheme{copenhagen}
\usepackage{tipa} % phonetic symbols
\usepackage{amsmath} %more symbols
\usepackage{booktabs} %nice tabulars
\usepackage{gb4e} %numbered examples with interlinear glosses
\author{Stefanie} \date{\today} \title{title}
\hyphenpenalty=4000%less hyphenation
\tolerance=1000 %less hyphenation
\let\eachwordone=\sl % first line = slanted in numbered examples
\usepackage{natbib} %citep and citet
\bibpunct[:]{(}{)}{;}{a}{}{,} 
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Beamer + BibTeX = new section "References" -> how to avoid?

Post by Stefanie »

I found a solution. For those with a similar problem, insert this line after \usepackage{natbib}:

Code: Select all

\renewcommand{\bibsection}{\subsubsection*{\bibname } }
This command redefines the section References (which is created by \bibliography) to a subsubsection, and subsubsections don't appear in the section overview (at least not in the copenhagen theme for beamer).
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: Beamer + BibTeX = new section "References" -> how to avoid?

Post by Stefan Kottwitz »

Hi Stefanie,

the default behavior of beamer is that no section would be produced for the bibliography. The section was introduced by natbib. In your first post and that minimal example natbib was not mentioned, that made the example useless. Nobody guessed that natbib was loaded. A minimal example should contain the problem. If you keep it in mind we could help more quickly next time. ;)

Stefan
LaTeX.org admin
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Beamer + BibTeX = new section "References" -> how to avoid?

Post by Stefanie »

Stefan_K wrote:Hi Stefanie,

the default behavior of beamer is that no section would be produced for the bibliography. The section was introduced by natbib. In your first post and that minimal example natbib was not mentioned, that made the example useless. Nobody guessed that natbib was loaded. A minimal example should contain the problem. If you keep it in mind we could help more quickly next time. ;)

Stefan

I had no idea that natbib was causing the behaviour (I thought it was a problem with beamer), and my preambles are usually very long, so that's why I forgot to mention it. I'll keep it in mind though.
Post Reply