matze / mtheme

A modern LaTeX Beamer theme
6.44k stars 845 forks source link

Indent of subsections in the toc #282

Closed Flo-Wo closed 7 years ago

Flo-Wo commented 7 years ago

Hallo,

bisher habe ich folgende Befehle, die das Inhaltsverzeichnis betreffen, in meiner Datei:

\usetheme[outer/progressbar=foot, subsectionpage=progressbar]{metropolis} \setbeamertemplate{section in toc}[sections numbered] \setbeamertemplate{subsection in toc}[subsections numbered] \makeatletter Gibt es eine einfache Möglichkeit die subsections um einen bestimmten Abstand (z.B. $\quad$) im Inhaltsverzeichnis einzurücken?

Vielen Dank.

benjamin-weiss commented 7 years ago

Even though I speak german: Please translate your question to english!

Flo-Wo commented 7 years ago

Hello,

is there a possibility to indent subsections in the toc with a specific distance (e.g $\quad$)?

I already got the following commands in my template:

\usetheme[outer/progressbar=foot, subsectionpage=progressbar]{metropolis} \setbeamertemplate{section in toc}[sections numbered] \setbeamertemplate{subsection in toc}[subsections numbered] \makeatletter

Thank you very much.

benjamin-weiss commented 7 years ago

This is not a metropolis related question, but here you go. You have to manually redefine the subsecion in toc template.

\documentclass{beamer}
\usetheme[outer/progressbar=foot, subsectionpage=progressbar]{metropolis} 
\setbeamertemplate{section in toc}[sections numbered]
%%%%%%
\setbeamertemplate{subsection in toc}
{\leavevmode\leftskip=2em\rlap{\hskip-2em$\quad$\inserttocsectionnumber.\inserttocsubsectionnumber}$\quad$\inserttocsubsection\par}
%%%%%%
\begin{document}
\begin{frame}{Table of contents}
  \tableofcontents
\end{frame}
\section{Section 1}
\subsection{Subsection 1}
\begin{frame}{Frame 1}
    Content 1
\end{frame}
\subsection{Subsection 2}
\begin{frame}{Frame 2}
    Content 2
\end{frame}
\end{document}
Flo-Wo commented 7 years ago

Thank you very much.