In a latex-beamer document i added the following TOC-Definition:

\AtBeginSubsection[]
{
\begin{frame}
\frametitle{Inhalts\"ubersicht}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}


Which produces a tree like this:

Section1
SubSection1
Section1
SubSection2
Section1
SubSection3
Section2
SubSection1
Section2
SubSection2


Instead i would like it to look like this:

Section1
SubSection1
SubSection2
SubSection3
Section2
SubSection1
SubSection2


How can i modify the TOC-Tree to make it look like i want?

Solved - MWE:

\tableofcontents[
currentsubsection,
hideothersubsections,
sectionstyle=show/hide,
]

-
 Can you please add to your question a minimal working example (MWE) illustrating the problem? I ask you for this MWE because I did some tests and couln't reproduce the behaviour mentioned; in fact, what I got in my examples was exactly the desired output. – Gonzalo Medina Sep 16 '11 at 13:08

## migrated from stackoverflow.comSep 16 '11 at 10:24

\tableofcontents[
currentsubsection,
hideothersubsections,
sectionstyle=show/hide,
]


does what i want!

-
 You should accept your own answer. – tcaswell Apr 12 at 16:39

You can use the following code:

\AtBeginSection[]
{
\tableofcontents[currentsection,currentsubsection,
hideothersubsections,
]
\end{frame}
}

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – ienissei Nov 18 '12 at 8:50

You can use in your preamble

\AtBeginSection[]
{
\begin{frame}
\frametitle{Contents}
\tiny{\tableofcontents[currentsection]}
\end{frame}
}


Which produces something like that before every section

-