Page Layoutbeamer | Remove Table of Contents in Header

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
soTo
Posts: 8
Joined: Tue Aug 23, 2011 1:00 pm

beamer | Remove Table of Contents in Header

Post by soTo »

Dear all,

I am using the document class beamer for a presentation of my work.

Here is an example:

Code: Select all


\documentclass{beamer}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{multirow}

\usepackage[english]{babel}
\usepackage[applemac]{inputenc}
\usepackage[T1]{fontenc}

\usetheme{classic}

\begin{document}

\begin{frame}
   this is the title page
\end{frame}

\begin{frame}
   \tableofcontents
\end{frame}

\section{First section}
\begin{frame}
   This is the first section
\end{frame}

I would be happy if the ToC does not always appear in the header of some slides, for instance the title slide and the slide with explicitly all the contents.

I have tried:

Code: Select all

\begin{frame}[plain]
   \tableofcontents
\end{frame}

\end{document}

and it removes both the ToC and the style of(f) the header. But I'd like to remove only the ToC, and keep the style.

(Note: in fact, I have the same issue for the first slide, which is the title of my presentation. I'd like that the ToC does not appear there neither).

Any help is welcomed!
Thanks a lot.

PS: edited to give a tex sample
Last edited by soTo on Sun Nov 13, 2011 9:03 pm, edited 1 time in total.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

beamer | Remove Table of Contents in Header

Post by 5gon12eder »

The "clean" solution would be to \setbeamertemplate{headline}{...} where "..." is some code that knows when to insert a navigation bar and when not. The problem with this is that you probably don't want to loose the other definitions that are made here. (E.g. the blue shade.)

If you don't mind, you may alternatively use the following hack:

Code: Select all

\let\reallydohead\dohead
\newenvironment{nonavigation}
               {\let\dohead\relax}
               {\let\dohead\reallydohead}
Now, inside the nonavigation environment, slides won't have a navigation bar. The trick is to temporarily disable the \dohead macro that is responsible for inserting the navigation bar.

Best
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
soTo
Posts: 8
Joined: Tue Aug 23, 2011 1:00 pm

beamer | Remove Table of Contents in Header

Post by soTo »

Thanks for your answer.

I tried the environment you proposed, and I ended up with a white strip slightly too large. However, with the command `\dohead' (that I did not know), I could narrow my search and find something pretty nice:

Code: Select all

\newenvironment{nonavig}
{\begingroup
	\renewcommand*\insertshorttitle{}
	\renewcommand*\insertshortauthor{}
	\renewcommand*\insertshortinstitute{}
	\renewcommand*\dohead{\rule{0em}{1.75em}}}
{\endgroup}
A frame without the navigation bar has to be inserted between this environment. The second argument of `\rule' seems to adjust the width of the white strip.

It works pretty nice for me.

Thanks!
5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

beamer | Remove Table of Contents in Header

Post by 5gon12eder »

Glad to hear it works for you.

My first idea also was to \let\insertnavigation\relax which -- interestingly enough -- works fine (for all frames) when put into the preamble but produces the strange white bar you've mentioned when used inside an environment.

If anyone should have an explanation for this, I'd love to learn more.
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
sameerthahir
Posts: 1
Joined: Mon Nov 14, 2011 6:21 am

Re: beamer | Remove Table of Contents in Header

Post by sameerthahir »

I was also facing the difficulty of having a bulky header with all the sections cramped into it, making the header reach the middle of the screen.

From a forum http://tex.stackexchange.com/questions/ ... esentation I found this simple method
\section[]{Problem}
\begin{frame}
\end{frame}
Post Reply