6

I have the following slide. a) I want it to have subsections numbered 10.1 and 10.2 etc. I had increased the secnumdepth(3) doesnt help. b) sub sections are indented weirdly(horizontally side by side) . I want it vertically aligned/stacked..

Sorry if its duplicated. Sub Section Numbering and Indention

Codes for the section is

  \setbeamertemplate{section in toc}{\hspace*{1em}{\inserttocsectionnumber.~\inserttocsection}}
\setbeamertemplate{subsection in toc}{\hspace*{2em}{\inserttocsubsectionnumber.~\inserttocsubsection}}
\setcounter{tocdepth}{3}

1 Answer 1

6
  1. Add \par at the end of the redefinitions of the templates.

  2. You can prepend \inserttocsectionnumber. to your current definition of the subsection in toc template.

The code:

\documentclass{beamer}

\setbeamertemplate{section in toc}{\hspace*{1em}\inserttocsectionnumber.~\inserttocsection\par}
\setbeamertemplate{subsection in toc}{\hspace*{2em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}

\begin{document}

\begin{frame} 
\tableofcontents
\end{frame}

\section{Test section one}
\begin{frame} test\end{frame}
\subsection{Test subsection one}
\begin{frame} test\end{frame}
\subsection{Test subsection two}
\begin{frame} test\end{frame}

\section{Test section two}
\begin{frame} test\end{frame}
\subsection{Test subsection one}
\begin{frame} test\end{frame}
\subsection{Test subsection two}
\begin{frame} test\end{frame}

\section{Test section three}
\begin{frame} test\end{frame}
\subsection{Test subsection one}
\begin{frame} test\end{frame}
\subsection{Test subsection two}
\begin{frame} test\end{frame}

\end{document}

The result:

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .