6

I borrowed the following code from this answer (provided by @Gonzalo) to my earlier question and now I want to show highlighted subsubsections as sections and subsections. Any help will be highly appreciated. Thanks in advance for your help.

\documentclass[unknownkeysallowed, compress]{beamer}
%\documentclass[compress]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}

\colorlet{mycolor}{orange!80!black}% change this color to suit your needs

\title[Intro]{Introduction}
\author{The Author}

\AtBeginSection[]{
  \setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg}
  \setbeamercolor{section in toc}{fg=mycolor}
  \setbeamercolor{subsection in toc shaded}{fg=black}
  \setbeamercolor{subsection in toc}{fg=mycolor}
  \setbeamercolor{subsubsection in toc shaded}{fg=black}
  \setbeamercolor{subsubsection in toc}{fg=mycolor}
  \frame<beamer>{\begin{multicols}{2}
  \frametitle{Outline}
  \setcounter{tocdepth}{3}  
  \tableofcontents[currentsection]
\end{multicols} 
 }
}

\begin{document}

\begin{frame}
\maketitle
\end{frame}


\section[Tool]{Tool}

\begin{frame}
 Test2
\end{frame}

\section[Tools]{Automation and Scripting}
\subsection{Overview}
\subsubsection{Rscript}

\begin{frame}
 Test
\end{frame}


\section*{References}
\begin{frame}
 Ref
\end{frame}


\end{document}

Edited

At the start of a new section I want to show highlighted current section, its subsections and its subsubsections. However the other sections, subsections and subsubsections should be dim. Thanks

enter image description here

  • Have you tried \AtBeginSubsubsection? – remus Mar 3 '15 at 15:45
  • As I want to show section so no need for \AtBeginSubsubsection. Let see what @Gonzalo will have? – MYaseen208 Mar 3 '15 at 15:48
6

You can change the way subsubsections are shown in the ToCs by setting the subsubsectionstyle key; for example:

subsubsectionstyle={show/show/show/show}

The first part gives the style for the current subsubsection; the second one, for other subsubsections in current subsection, the third specification controls the appearance of subsubsections in other subsections in current section and the last one gives the style for subsubsections in other subsections in other sections.

For the desired specification in the updated question, you can use

  \tableofcontents[
    sectionstyle=show/shaded,
    subsectionstyle=show/show/shaded,
    subsubsectionstyle=show/show/show/shaded
    ]

A complete example:

\documentclass[unknownkeysallowed, compress]{beamer}
%\documentclass[compress]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}

\colorlet{mycolor}{orange!80!black}% change this color to suit your needs

\title[Intro]{Introduction}
\author{The Author}

\AtBeginSection[]{
  \setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg}
  \setbeamercolor{section in toc}{fg=mycolor}
  \setbeamercolor{subsection in toc shaded}{fg=black}
  \setbeamercolor{subsection in toc}{fg=mycolor}
  \setbeamercolor{subsubsection in toc shaded}{fg=black}
  \setbeamercolor{subsubsection in toc}{fg=mycolor}
  \frame<beamer>{\begin{multicols}{2}
  \frametitle{Outline}
  \setcounter{tocdepth}{3}  
  \tableofcontents[
    sectionstyle=show/shaded,
    subsectionstyle=show/show/shaded,
    subsubsectionstyle=show/show/show/shaded
    ]
\end{multicols} 
 }
}

\begin{document}

\begin{frame}
\maketitle
\end{frame}


\section[Tool]{Tool}

\begin{frame}
 Test2
\end{frame}

\section[Tools]{Automation and Scripting}
\subsection{Overview}
\subsubsection{Rscript}

\begin{frame}
 Test
\end{frame}


\section*{References}
\begin{frame}
 Ref
\end{frame}


\end{document}

The partial ToC at the beginning of the first section:

enter image description here

The partial ToC at the beginning of the second section:

enter image description here

  • (+1): Thanks @Gonzalo for your help. I'm having a problem when have more than one section. Any idea. – MYaseen208 Mar 3 '15 at 16:40
  • @MYaseen208 You're welcome. What kind of problem are you having? – Gonzalo Medina Mar 3 '15 at 16:50
  • At the start of a new section I want to show highlighted current section, its subsections and its subsubsections. – MYaseen208 Mar 3 '15 at 16:52
  • @MYaseen208 I see. Try with this specification: \tableofcontents[sectionstyle={show/hide},subsectionsstyle={show/hide/hide},subsubsectionstyle={show/show/show/hide}] Does this give you the expected result? – Gonzalo Medina Mar 3 '15 at 16:59
  • Sorry @Gonzalo for lot of confusing. Please see my edits with snaps if you can understand my problem. Anyhow thanks a lot for you help. – MYaseen208 Mar 3 '15 at 17:45

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.