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 would like to use \tableofcontents to get contents of all the parts in beamer including only the names of parts, not including sections and subsections, how should I do?

share|improve this question
    
I'm not sure that I understand what you want. Could you please edit your question to include a minimal working example (MWE)? Having a small, complete document that will compile makes it a lot easier for us to copy it into our text editors and work with it, as well as to see exactly what it is you are trying to do. –  Andrew Uzzell Nov 23 '12 at 10:30

1 Answer 1

Here's something to get you started, but note that it does not fit in with beamer's styles and the entries in the list of parts are not hyperlinked:

\documentclass{beamer}
\usepackage{lipsum}

% for the list of parts
\makeatletter
\AtBeginPart{%
    \addtocontents{parttoc}{\protect\beamer@partintoc{\the\c@part}{\beamer@partnameshort}{\the\c@page}}%
    \frame{\partpage}%
}
\newcommand{\parttableofcontents}{\@starttoc{parttoc}}
\newcommand{\beamer@partintoc}[3]{#2\par}
\makeatother

% for slides to announce the start of a new section
\AtBeginSection[]% do nothing for \section*
{\frame{\sectionpage}}

\begin{document}
    \frame{\frametitle{List of parts}\parttableofcontents}
    \part{one}
    \section{a section}
    \frame{\lipsum[1]}
    \section{another section}
    \frame{\lipsum[2]}
    \part{two}
    \section{yet another section}
    \subsection{subsection}
    \frame{\lipsum[3]}
\end{document}
share|improve this answer

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.