2

Consider the folllowing code:

\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=BrickRed]{structure} 
\usetheme{Singapore}
\begin{document}

\section{Section No 1}
\subsection{SubSection No 1}
\frame{\tableofcontents[currentsection]}
\frame{\tableofcontents[currentsubsection]}
\frame{Some text 1}
\subsection{SubSection No 2}
\subsection{SubSection No 3}
\frame{Some text 2}

\section{Section No 2}
\subsection{SubSection No 1}
\frame{\tableofcontents[currentsubsection]}
\frame{Some more text 1}
\subsection{SubSection No 2}
\subsection{SubSection No 3}
\frame{Some more text 2}

\end{document}

Now when we look at the frames with currentsection then only the current section+its subsections are highlighted and all other sections+subsections are properly grayed out. If we use currentsubsection, then only the other subsections are grayed out but not the sections. How can I also gray out the sections?

See: just a picture describing the situation

1
  • @dcmst Oh that's excellent. Precisely what I was looking for.
    – Phil-ZXX
    Sep 17 '14 at 13:37
3
\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=BrickRed]{structure} 
\usetheme{Singapore}
\begin{document}

\section{Section No 1}
\subsection{SubSection No 1}
\frame{\tableofcontents[currentsection]}
\frame{\tableofcontents[currentsection, currentsubsection]} %new code
\frame{Some text 1}
\subsection{SubSection No 2}
\subsection{SubSection No 3}
\frame{Some text 2}

\section{Section No 2}
\subsection{SubSection No 1}
\frame{\tableofcontents[currentsection,currentsubsection]}  %new code
\frame{Some more text 1}
\subsection{SubSection No 2}
\subsection{SubSection No 3}
\frame{Some more text 2}

\end{document}

By Using \tableofcontents[currentsection,currentsubsection] the other sections will be shaded. I think this is a sound behaviour since we are in a certain section so it's right for it not to be shaded.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.