mirror of https://github.com/matze/mtheme.git
Merge pull request #190 from rchurchley/subsection-page
Add support for subsections
This commit is contained in:
commit
6b70b210b5
|
@ -356,6 +356,12 @@ The list of options is structured as shown in the following example.
|
||||||
disables the section page.
|
disables the section page.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\DescribeOption{subsectionpage}{none, simple, progressbar}{none}{
|
||||||
|
Optionally adds a slide at the start of each subsection. If enabled with
|
||||||
|
the |simple| or |progressbar| options, the style of the |section page| will
|
||||||
|
be updated to match the style of the |subsection page|.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
\subsubsection{Outer theme}
|
\subsubsection{Outer theme}
|
||||||
|
|
||||||
|
|
|
@ -57,14 +57,31 @@
|
||||||
% \subsubsection{Options}
|
% \subsubsection{Options}
|
||||||
%
|
%
|
||||||
% \begin{macro}{sectionpage}
|
% \begin{macro}{sectionpage}
|
||||||
% The |sectionpage| option defines the behaviour of the sectionpage.
|
% Optionally add a slide marking the beginning of each section.
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\pgfkeys{
|
\pgfkeys{
|
||||||
/metropolis/inner/sectionpage/.cd,
|
/metropolis/inner/sectionpage/.cd,
|
||||||
.is choice,
|
.is choice,
|
||||||
none/.code=\metropolis@sectionpage@none,
|
none/.code=\metropolis@disablesectionpage,
|
||||||
simple/.code=\metropolis@sectionpage@simple,
|
simple/.code={\metropolis@enablesectionpage
|
||||||
progressbar/.code=\metropolis@sectionpage@progressbar,
|
\setbeamertemplate{section page}[simple]},
|
||||||
|
progressbar/.code={\metropolis@enablesectionpage
|
||||||
|
\setbeamertemplate{section page}[progressbar]},
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{sectionpage}
|
||||||
|
% Optionally add a slide marking the beginning of each subsection.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/inner/subsectionpage/.cd,
|
||||||
|
.is choice,
|
||||||
|
none/.code=\metropolis@disablesubsectionpage,
|
||||||
|
simple/.code={\metropolis@enablesubsectionpage
|
||||||
|
\setbeamertemplate{section page}[simple]},
|
||||||
|
progressbar/.code={\metropolis@enablesubsectionpage
|
||||||
|
\setbeamertemplate{section page}[progressbar]},
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
|
@ -75,6 +92,7 @@
|
||||||
\newcommand{\metropolis@inner@setdefaults}{
|
\newcommand{\metropolis@inner@setdefaults}{
|
||||||
\pgfkeys{/metropolis/inner/.cd,
|
\pgfkeys{/metropolis/inner/.cd,
|
||||||
sectionpage=progressbar,
|
sectionpage=progressbar,
|
||||||
|
subsectionpage=none
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
|
@ -234,26 +252,17 @@
|
||||||
% Template for the section title slide at the beginning of each section.
|
% Template for the section title slide at the beginning of each section.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newcommand{\metropolis@sectionpage@none}{
|
|
||||||
\AtBeginSection{
|
|
||||||
% intenionally empty
|
|
||||||
}
|
|
||||||
}
|
|
||||||
\defbeamertemplate{section page}{simple}{
|
\defbeamertemplate{section page}{simple}{
|
||||||
\centering
|
\begin{center}
|
||||||
\usebeamercolor[fg]{section title}
|
\usebeamercolor[fg]{section title}
|
||||||
\usebeamerfont{section title}
|
\usebeamerfont{section title}
|
||||||
\insertsectionhead\\
|
\insertsectionhead\par
|
||||||
}
|
\ifx\insertsubsection\@empty\else
|
||||||
\newcommand{\metropolis@sectionpage@simple}{
|
\usebeamercolor[fg]{subsection title}
|
||||||
\setbeamertemplate{section page}[simple]
|
\usebeamerfont{subsection title}
|
||||||
\AtBeginSection{
|
\insertsubsection
|
||||||
\ifbeamer@inframe
|
|
||||||
\sectionpage
|
|
||||||
\else
|
|
||||||
\frame[plain,c,noframenumbering]{\sectionpage}
|
|
||||||
\fi
|
\fi
|
||||||
}
|
\end{center}
|
||||||
}
|
}
|
||||||
\defbeamertemplate{section page}{progressbar}{
|
\defbeamertemplate{section page}{progressbar}{
|
||||||
\centering
|
\centering
|
||||||
|
@ -263,12 +272,22 @@
|
||||||
\usebeamerfont{section title}
|
\usebeamerfont{section title}
|
||||||
\insertsectionhead\\[-1ex]
|
\insertsectionhead\\[-1ex]
|
||||||
\usebeamertemplate*{progress bar in section page}
|
\usebeamertemplate*{progress bar in section page}
|
||||||
|
\par
|
||||||
|
\ifx\insertsubsection\@empty\else%
|
||||||
|
\usebeamercolor[fg]{subsection title}%
|
||||||
|
\usebeamerfont{subsection title}%
|
||||||
|
\insertsubsection
|
||||||
|
\fi
|
||||||
\end{minipage}
|
\end{minipage}
|
||||||
\par
|
\par
|
||||||
\vspace{\baselineskip}
|
\vspace{\baselineskip}
|
||||||
}
|
}
|
||||||
\newcommand{\metropolis@sectionpage@progressbar}{
|
\newcommand{\metropolis@disablesectionpage}{
|
||||||
\setbeamertemplate{section page}[progressbar]
|
\AtBeginSection{
|
||||||
|
% intentionally empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\newcommand{\metropolis@enablesectionpage}{
|
||||||
\AtBeginSection{
|
\AtBeginSection{
|
||||||
\ifbeamer@inframe
|
\ifbeamer@inframe
|
||||||
\sectionpage
|
\sectionpage
|
||||||
|
@ -280,6 +299,32 @@
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
%
|
%
|
||||||
|
% \begin{macro}{subsection page}
|
||||||
|
%
|
||||||
|
% Template for the subsection title slide that can optionally be added to
|
||||||
|
% at the beginning of each subsection.
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\setbeamertemplate{subsection page}{%
|
||||||
|
\usebeamertemplate*{section page}
|
||||||
|
}
|
||||||
|
\newcommand{\metropolis@disablesubsectionpage}{
|
||||||
|
\AtBeginSubsection{
|
||||||
|
% intentionally empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\newcommand{\metropolis@enablesubsectionpage}{
|
||||||
|
\AtBeginSubsection{
|
||||||
|
\ifbeamer@inframe
|
||||||
|
\subsectionpage
|
||||||
|
\else
|
||||||
|
\frame[plain,c,noframenumbering]{\subsectionpage}
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
% \begin{macro}{progress bar in section page}
|
% \begin{macro}{progress bar in section page}
|
||||||
%
|
%
|
||||||
% Template for the progress bar displayed by default on the section page.
|
% Template for the progress bar displayed by default on the section page.
|
||||||
|
|
Loading…
Reference in New Issue