[Tex/LaTex] Setting TOC depth in beamer_presentation with RMarkdown

beamermarkdownpresentations

How can we set the number of Table of Contents levels (depth) that is displayed in RMarkdown beamer_presentation? For HTML documents, I have found that a toc_depth option exists, but it doesn't seem to be recognized with the beamer_presentation output format.

Best Answer

To show only sections and subsection in the toc, but not subsubsections, set the subsubsection style to hide.

MWE:

\documentclass{beamer}

\begin{document}

\begin{frame}
\tableofcontents[subsubsectionstyle=hide]
\end{frame}

\section{test}
\subsection{test}
\subsubsection{title}
\begin{frame}
    abc
\end{frame} 

\end{document}