mirror of https://github.com/matze/mtheme.git
Merge pull request #189 from rchurchley/standout-slides
Use frame key for standout slides, move to inner theme
This commit is contained in:
commit
820589f497
|
@ -309,7 +309,9 @@ or show \textbf{bold} results.\end{verbatim}
|
||||||
|
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\plain{Questions?}
|
\begin{frame}[standout]
|
||||||
|
Questions?
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
\appendix
|
\appendix
|
||||||
|
|
||||||
|
|
|
@ -453,11 +453,18 @@ regular lined figures for math, you could add the following to your preamble:
|
||||||
|
|
||||||
\subsection{Commands}
|
\subsection{Commands}
|
||||||
|
|
||||||
\begin{macro}{\plain}
|
\subsubsection{Standout frames}
|
||||||
The \lstinline|\plain{title=[]}{<body>}| command sets a slide in with a plain
|
|
||||||
dark background, which can be useful to focus attention on a single sentence
|
The \themename inner theme offers a custom frame format with large, centered
|
||||||
or image.
|
text and an inverted background --- perfect for focusing attention on
|
||||||
\end{macro}
|
single sentence or image. To use it, add the key |standout| to the frame:
|
||||||
|
|
||||||
|
\begin{lstlisting}
|
||||||
|
\begin{frame}[standout]
|
||||||
|
Thank you!
|
||||||
|
\end{frame}
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\section{\texttt{pgfplots} integration}
|
\section{\texttt{pgfplots} integration}
|
||||||
|
@ -551,8 +558,7 @@ only alphabetic characters and do not require the expansion of any macros.
|
||||||
\themename can be used along with any other Beamer color theme, such as
|
\themename can be used along with any other Beamer color theme, such as
|
||||||
|crane| or |seahorse|. If you wish to do this, it is usually best to include
|
|crane| or |seahorse|. If you wish to do this, it is usually best to include
|
||||||
the \themename subpackages individually so the \themename color theme is
|
the \themename subpackages individually so the \themename color theme is
|
||||||
never loaded. Although this will disable some features, including
|
never loaded. This will prevent conflicts between the \themename color theme
|
||||||
|\plain| slides, it will prevent conflicts between the \themename color theme
|
|
||||||
and your preferred theme.
|
and your preferred theme.
|
||||||
|
|
||||||
For example, overriding the color theme as follows may not work as expected because |\usetheme{metropolis}| loads the \themename color theme, which
|
For example, overriding the color theme as follows may not work as expected because |\usetheme{metropolis}| loads the \themename color theme, which
|
||||||
|
|
|
@ -155,8 +155,6 @@
|
||||||
\setbeamerfont{date}{size=\small}
|
\setbeamerfont{date}{size=\small}
|
||||||
\setbeamerfont{section title}{size=\Large,%
|
\setbeamerfont{section title}{size=\Large,%
|
||||||
series=\bfseries}
|
series=\bfseries}
|
||||||
\setbeamerfont{plain title}{size=\Large,%
|
|
||||||
series=\bfseries}
|
|
||||||
\setbeamerfont{block title}{size=\normalsize,%
|
\setbeamerfont{block title}{size=\normalsize,%
|
||||||
series=\bfseries}
|
series=\bfseries}
|
||||||
\setbeamerfont{block title alerted}{size=\normalsize,%
|
\setbeamerfont{block title alerted}{size=\normalsize,%
|
||||||
|
@ -176,6 +174,8 @@
|
||||||
series=\normalfont}
|
series=\normalfont}
|
||||||
\setbeamerfont{bibliography entry note}{size=\small,%
|
\setbeamerfont{bibliography entry note}{size=\small,%
|
||||||
series=\normalfont}
|
series=\normalfont}
|
||||||
|
\setbeamerfont{standout}{size=\Large,%
|
||||||
|
series=\bfseries}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\RequirePackage{etoolbox}
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{keyval}
|
||||||
\RequirePackage{calc}
|
\RequirePackage{calc}
|
||||||
\RequirePackage{pgfopts}
|
\RequirePackage{pgfopts}
|
||||||
\RequirePackage{tikz}
|
\RequirePackage{tikz}
|
||||||
|
@ -474,6 +475,60 @@
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
|
% \subsubsection{Standout frames}
|
||||||
|
%
|
||||||
|
% \themename offers a custom frame format with large, centered text and an
|
||||||
|
% inverted background. To use it, add the key |standout| to the frame:
|
||||||
|
% |\begin{frame}[standout] ... \end{frame}|.
|
||||||
|
%
|
||||||
|
% \begin{macro}{standout}
|
||||||
|
%
|
||||||
|
% Optional arguments to Beamer's frames are implemented using
|
||||||
|
% |\define@key| from the |keyval| package, which will execute code when the
|
||||||
|
% defined option is called. For the |standout| option, we begin a group,
|
||||||
|
% change the colors and fonts, and set a \centering alignment.
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\providebool{metropolis@standout}
|
||||||
|
\define@key{beamerframe}{standout}[true]{%
|
||||||
|
\booltrue{metropolis@standout}
|
||||||
|
\begingroup
|
||||||
|
\setkeys{beamerframe}{c}
|
||||||
|
\setkeys{beamerframe}{noframenumbering}
|
||||||
|
\ifbeamercolorempty[bg]{palette primary}{
|
||||||
|
\setbeamercolor{background canvas}{
|
||||||
|
use=palette primary,
|
||||||
|
bg=-palette primary.fg
|
||||||
|
}
|
||||||
|
}{
|
||||||
|
\setbeamercolor{background canvas}{
|
||||||
|
use=palette primary,
|
||||||
|
bg=palette primary.bg
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\centering
|
||||||
|
\usebeamercolor[fg]{palette primary}
|
||||||
|
\usebeamerfont{standout}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% Then we just have to close the group after the standout slide is finished
|
||||||
|
% in order to restore the colours and fonts for the rest of the
|
||||||
|
% presentation. Unfortunately, we cannot use \AfterEndEnvironment{frame} for
|
||||||
|
% this (see \url{http://tex.stackexchange.com/questions/226319/}).
|
||||||
|
% Instead, we add the |\endgroup| to |\beamer@reseteecodes|, which is run
|
||||||
|
% exactly once at the end of each slide.
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\apptocmd{\beamer@reseteecodes}{%
|
||||||
|
\ifbool{metropolis@standout}{
|
||||||
|
\endgroup
|
||||||
|
\boolfalse{metropolis@standout}
|
||||||
|
}{}
|
||||||
|
}{}{}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
% \subsubsection{Process package options}
|
% \subsubsection{Process package options}
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
|
|
|
@ -68,22 +68,22 @@
|
||||||
.is choice,
|
.is choice,
|
||||||
regular/.code={%
|
regular/.code={%
|
||||||
\let\metropolis@plaintitleformat\@empty%
|
\let\metropolis@plaintitleformat\@empty%
|
||||||
\setbeamerfont{plain title}{shape=\normalfont}%
|
\setbeamerfont{standout}{shape=\normalfont}%
|
||||||
},
|
},
|
||||||
smallcaps/.code={%
|
smallcaps/.code={%
|
||||||
\let\metropolis@plaintitleformat\@empty%
|
\let\metropolis@plaintitleformat\@empty%
|
||||||
\setbeamerfont{plain title}{shape=\scshape}%
|
\setbeamerfont{standout}{shape=\scshape}%
|
||||||
},
|
},
|
||||||
allsmallcaps/.code={%
|
allsmallcaps/.code={%
|
||||||
\let\metropolis@plaintitleformat\MakeLowercase%
|
\let\metropolis@plaintitleformat\MakeLowercase%
|
||||||
\setbeamerfont{plain title}{shape=\scshape}%
|
\setbeamerfont{standout}{shape=\scshape}%
|
||||||
\PackageWarning{beamerthememetropolis}{%
|
\PackageWarning{beamerthememetropolis}{%
|
||||||
Be aware that titleformat plain=allsmallcaps can lead to problems%
|
Be aware that titleformat plain=allsmallcaps can lead to problems%
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
allcaps/.code={%
|
allcaps/.code={%
|
||||||
\let\metropolis@plaintitleformat\MakeUppercase%
|
\let\metropolis@plaintitleformat\MakeUppercase%
|
||||||
\setbeamerfont{plain title}{shape=\normalfont}%
|
\setbeamerfont{standout}{shape=\normalfont}%
|
||||||
\PackageWarning{beamerthememetropolis}{%
|
\PackageWarning{beamerthememetropolis}{%
|
||||||
Be aware that titleformat plain=allcaps can lead to problems%
|
Be aware that titleformat plain=allcaps can lead to problems%
|
||||||
}
|
}
|
||||||
|
@ -177,26 +177,13 @@
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\def\metropolis@plaintitleformat#1{#1}
|
\def\metropolis@plaintitleformat#1{#1}
|
||||||
\newcommand{\plain}[2][]{%
|
\newcommand{\plain}[2][]{%
|
||||||
\begingroup
|
\PackageWarning{beamerthememetropolis}{%
|
||||||
\ifbeamercolorempty[bg]{palette primary}{
|
The syntax `\plain' may be deprecated in a future version of Metropolis.
|
||||||
\setbeamercolor{background canvas}{
|
Please use a frame with [standout] instead.
|
||||||
use=palette primary,
|
}
|
||||||
bg=-palette primary.fg
|
\begin{frame}[standout]{#1}
|
||||||
}
|
\metropolis@plaintitleformat{#2}
|
||||||
}{
|
\end{frame}
|
||||||
\setbeamercolor{background canvas}{
|
|
||||||
use=palette primary,
|
|
||||||
bg=palette primary.bg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
\begin{frame}[c,noframenumbering]{#1}
|
|
||||||
\begin{center}
|
|
||||||
\usebeamercolor[fg]{palette primary}
|
|
||||||
\usebeamerfont{plain title}
|
|
||||||
\metropolis@plaintitleformat{#2}
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
\endgroup
|
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
|
|
Loading…
Reference in New Issue