Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbered (sub)sections in toc and (sub)sectionpage #271

Closed
Flo-Wo opened this issue Apr 8, 2017 · 5 comments
Closed

Numbered (sub)sections in toc and (sub)sectionpage #271

Flo-Wo opened this issue Apr 8, 2017 · 5 comments

Comments

@Flo-Wo
Copy link

Flo-Wo commented Apr 8, 2017

Hi,
I got the subsectionpages with the command:
\usetheme[subsectionpage=progressbar]{metropolis}
and the subsections into the toc by removing
\tableofcontents %[hideallsubsections].

Is it possible to get numbered sections and subsections on their own pages, as well as numbered subsections in the table of contents.

Thank you very much.

@benjamin-weiss
Copy link
Contributor

Do you mean like this?

numbered_toc
numbered_sectionpage

\documentclass{beamer}
\usetheme[subsectionpage=progressbar]{metropolis}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]

\makeatletter
\setbeamertemplate{section page}{
  \centering
  \begin{minipage}{22em}
    \raggedright
    \usebeamercolor[fg]{section title}
    \usebeamerfont{section title}
    \thesection.~\insertsectionhead\\[-1ex]
    \usebeamertemplate*{progress bar in section page}
    \par
    \ifx\insertsubsectionhead\@empty\else%
      \usebeamercolor[fg]{subsection title}%
      \usebeamerfont{subsection title}%
      \thesubsection.~\insertsubsectionhead
    \fi
  \end{minipage}
  \par
  \vspace{\baselineskip}
}
\makeatother

\begin{document}
\begin{frame}{TOC}
  \tableofcontents
\end{frame}
\section{Section}
\subsection{Subsection}
\begin{frame}{Frame}
  Content
\end{frame}
\subsection{Subsection}
\begin{frame}{Frame}
  Content
\end{frame}
\section{Section}
\subsection{Subsection}
\begin{frame}{Frame}
  Content
\end{frame}
\subsection{Subsection}
\begin{frame}{Frame}
  Content
\end{frame}
\end{document}

@Flo-Wo
Copy link
Author

Flo-Wo commented Apr 9, 2017

Is it possible to get "1.1 subsection" below the "1. section" on the subsectionpage as well? The rest is perfect. Thank you

@benjamin-weiss
Copy link
Contributor

Sure. Just replace:

\thesubsection.~\insertsubsectionhead

with

\thesection.\thesubsection~\insertsubsectionhead

@Flo-Wo
Copy link
Author

Flo-Wo commented Apr 9, 2017

Thank you very much

@Flo-Wo Flo-Wo closed this as completed Apr 9, 2017
@mickey4u
Copy link

@benjamin-weiss @Flo-Wo How can I indent the subsection numbering on the table of contents page.

liweitianux added a commit to liweitianux/phd-thesis that referenced this issue Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants