[Tex/LaTex] Highlight only current subsection, hide subsections of other sections

beamerpdftex

The table of contents command in my beamer .sty looks like this:

\newcommand{\MyToc}[1]
{
    \AtBeginSubsection[]
    {
        \begin{frame}
        \frametitle{#1}
        \tableofcontents[currentsection,hideothersubsections,currentsubsection]
        \end{frame}
    }
}

It shows all sections and subsections with emphasis on the current section and subsection, but I want only the subsections of the current section to be shown, the current subsection be emphasized AND subsections of other sections not to be shown at all:

  • section 1
  • section 2
    • subsection 1 <= inactive, shaded
    • subsection 2 <= active subsection, strong colour
    • subsection 3 <= inactive, shaded
  • section 3

How can that be achieved?

Best Answer

Once again I found the solution in the docs (page 100):

    ...
    \tableofcontents
    [
        currentsection,
        currentsubsection,
        subsectionstyle=show/shaded/hide
    ]
    ...

show = current subsection is shown regularly

shaded = the section's other subsections are shown, but shaded

hide = other sections' subsection entries are not shown in the table of contents