feat!: remove titleformat configuration
We thereby also remove the dependency on etoolbox and use of patchcmd throughout the package, which should mitigate problems that have arisen previously when beamer has changes its commands.
This commit is contained in:
parent
4a859ed992
commit
e19f93c40a
|
@ -1,20 +1,17 @@
|
|||
\documentclass[10pt]{beamer}
|
||||
|
||||
\usetheme{moloch}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
|
||||
% \usepackage{appendixnumberbeamer}
|
||||
\usetheme{moloch}
|
||||
|
||||
\setbeamertemplate{page number in head/foot}[appendixframenumber]
|
||||
\setbeamertemplate{section in toc}[sections numbered]
|
||||
|
||||
% \molochset{progressbar=foot}
|
||||
|
||||
\usepackage{booktabs}
|
||||
\usepackage[scale=2]{ccicons}
|
||||
|
||||
% \usepackage[medium,light]{FiraSans}
|
||||
% \usepackage[medium]{FiraMono}
|
||||
\usepackage{lmodern}
|
||||
|
||||
\usepackage{xspace}
|
||||
|
@ -32,7 +29,6 @@
|
|||
\maketitle
|
||||
|
||||
\begin{frame}{Table of Contents}
|
||||
\setbeamertemplate{section in toc}[sections numbered]
|
||||
\tableofcontents[hideallsubsections]
|
||||
\end{frame}
|
||||
|
||||
|
@ -51,61 +47,9 @@
|
|||
\begin{frame}[fragile]{Sections}
|
||||
Sections group slides of the same topic by introducing a section page between them. A progress bar is shown which indicates how far along in the presentation you are.
|
||||
|
||||
\begin{verbatim}\section{Title Formats}\end{verbatim}
|
||||
\begin{verbatim}\section{Elements}\end{verbatim}
|
||||
\end{frame}
|
||||
|
||||
\section{Title Formats}
|
||||
|
||||
\begin{frame}[fragile]{Moloch Title Formats}
|
||||
\themename supports four different title formats:
|
||||
\begin{itemize}
|
||||
\item Regular
|
||||
\item \textsc{Small Caps}
|
||||
\item \textsc{All Small Caps}
|
||||
\item ALL CAPS
|
||||
\end{itemize}
|
||||
|
||||
They can either be set globally for every frame or used locally just for the current frame and onwards by using
|
||||
\begin{verbatim}\molochset{titleformat frame=<option>}\end{verbatim}
|
||||
\end{frame}
|
||||
|
||||
{
|
||||
\molochset{titleformat frame=smallcaps}
|
||||
\begin{frame}{Small Caps}
|
||||
This frame uses the \texttt{smallcaps} title format.
|
||||
|
||||
\begin{alertblock}{Potential Problems}
|
||||
Be aware that not every font supports small caps. If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in small caps will be typeset with the Computer Modern Serif font instead.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
||||
{
|
||||
\molochset{titleformat frame=allsmallcaps}
|
||||
\begin{frame}{All Small Caps}
|
||||
This frame uses the \texttt{allsmallcaps} title format.
|
||||
|
||||
\begin{alertblock}{Potential Problems}
|
||||
As this title format also uses small caps you face the same problems as with the \texttt{smallcaps} title format. Additionally this format can cause some other problems. Please refer to the documentation if you consider using it.
|
||||
|
||||
\medskip
|
||||
|
||||
As a rule of thumb: just use it for plaintext-only titles.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
||||
{
|
||||
\molochset{titleformat frame=allcaps}
|
||||
\begin{frame}{All Caps}
|
||||
This frame uses the \texttt{allcaps} title format.
|
||||
|
||||
\begin{alertblock}{Potential Problems}
|
||||
This title format is not as problematic as the \texttt{allsmallcaps} format, but basically suffers from the same deficiencies. So please have a look at the documentation if you want to use it.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
||||
\section{Elements}
|
||||
|
||||
\begin{frame}[fragile]{Typography}
|
||||
|
@ -269,10 +213,8 @@
|
|||
\appendix
|
||||
|
||||
\begin{frame}[allowframebreaks]{References}
|
||||
|
||||
\bibliography{demo}
|
||||
\bibliographystyle{abbrv}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\end{document}
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
\usepackage{xspace}
|
||||
\onehalfspacing
|
||||
|
||||
\usepackage{etoolbox}
|
||||
|
||||
\usepackage{enumitem}
|
||||
\setlist[itemize]{noitemsep}
|
||||
\setlist[enumerate]{noitemsep}
|
||||
|
@ -57,7 +55,7 @@
|
|||
xrightmargin=0em,
|
||||
aboveskip=1em,
|
||||
belowskip=1em,
|
||||
morekeywords={usetheme,institute,maketitle,@moloch@titleformat,%
|
||||
morekeywords={usetheme,institute,maketitle,%
|
||||
plain,setbeamercolor,molochset,setsansfont,setmonofont},
|
||||
}
|
||||
\lstMakeShortInline|
|
||||
|
@ -205,7 +203,6 @@ The following code shows a minimal example of a Beamer presentation using
|
|||
\begin{itemize}
|
||||
\item |tikz|
|
||||
\item |pgfopts|
|
||||
\item |etoolbox|
|
||||
\item |calc|
|
||||
\end{itemize}
|
||||
\end{multicols}
|
||||
|
@ -243,26 +240,6 @@ The list of options is structured as shown in the following example.
|
|||
A short description of the option.
|
||||
}
|
||||
|
||||
|
||||
\subsubsection{Main theme}
|
||||
|
||||
\DescribeOption{titleformat}%
|
||||
{regular, smallcaps, allsmallcaps, allcaps}
|
||||
{regular}{
|
||||
Changes the format of titles, subtitles, section titles, frame titles, and
|
||||
the text on ``standout'' frames. The available options produce
|
||||
Regular, \textsc{SmallCaps}, \textsc{\MakeLowercase{AllSmallCaps}}, or
|
||||
\MakeUppercase{AllCaps} titles. Please refer to
|
||||
Section~\ref{sec:titleformats} for known issues with these options.
|
||||
}
|
||||
|
||||
\DescribeOption{titleformat plain}%
|
||||
{regular, smallcaps, allsmallcaps, allcaps}%
|
||||
{regular}{
|
||||
Changes the format of ``standout'' frames (see |titleformat|, above).
|
||||
}
|
||||
|
||||
|
||||
\subsubsection{Inner theme}
|
||||
|
||||
\DescribeOption{sectionpage}{none, simple, progressbar}{progressbar}{
|
||||
|
@ -296,20 +273,6 @@ The list of options is structured as shown in the following example.
|
|||
of the reverse.
|
||||
}
|
||||
|
||||
|
||||
\subsubsection{Font theme}
|
||||
|
||||
\DescribeMacro{titleformat title}
|
||||
\DescribeMacro{titleformat subtitle}
|
||||
\DescribeMacro{titleformat section}
|
||||
\DescribeOption{titleformat frame}%
|
||||
{regular, smallcaps, allsmallcaps, allcaps}%
|
||||
{regular}{
|
||||
Individually controls the format of titles, subtitles, section titles, and
|
||||
frame titles (see |titleformat|, above).
|
||||
}
|
||||
|
||||
|
||||
\subsection{Color Customization}
|
||||
|
||||
The included \themename color theme is used by default, but its colors can be
|
||||
|
@ -359,43 +322,8 @@ single sentence or image. To use it, add the key |standout| to the frame:
|
|||
\end{frame}
|
||||
\end{lstlisting}
|
||||
|
||||
\section{Tips \& Tricks}
|
||||
|
||||
\section{Known Issues}
|
||||
|
||||
\subsection{Title formats}
|
||||
\label{sec:titleformats}
|
||||
|
||||
Be aware that not every font supports small caps, so the |smallcaps| or
|
||||
|allsmallcaps| options may not work for all fonts.
|
||||
In particular, the Computer Modern sans-serif typeface, which is used when
|
||||
\themename is compiled with pdf\LaTeX, does not have a small-caps variant.
|
||||
|
||||
The title format options |allsmallcaps| and |allcaps| are quite nice from an
|
||||
aesthetic point of view, but their use of |\MakeLowercase| and
|
||||
|\MakeUppercase| can cause unexpected problems. For example:
|
||||
|
||||
\begin{itemize}
|
||||
\item Some commands, like |\\|, do not work inside |\MakeLowercase| and
|
||||
|\MakeUppercase|. (See \href{https://github.com/matze/mtheme/issues/125}
|
||||
{\#125})
|
||||
\item Only alphabetic characters are affected by |\MakeLowercase|, so
|
||||
numerals and punctuation remain at full height. This can spoil some of the
|
||||
aesthetic benefits of |allsmallcaps|. (See
|
||||
\href{https://github.com/matze/mtheme/issues/33}{\#33})
|
||||
\item |\MakeLowercase| and |\MakeUppercase| apply to math mode and
|
||||
|\scshape| does not. This can easily introduce mathematical errors that
|
||||
are hard to catch.
|
||||
\item It is impossible to typeset symbols which are encoded as uppercase
|
||||
letters in a different font. In particular, |\mathbb| and |\mathcal|
|
||||
letters will be replaced by other math glyphs. (See
|
||||
\href{https://github.com/matze/mtheme/issues/153}{\#153})
|
||||
\end{itemize}
|
||||
|
||||
The |allsmallcaps| and |allcaps| options are safe to use if your titles contain
|
||||
only alphabetic characters and do not require the expansion of any macros.
|
||||
|
||||
|
||||
\subsection{Interactions with other color themes}
|
||||
|
||||
\themename can be used along with any other Beamer color theme, such as
|
||||
|
|
|
@ -25,12 +25,9 @@
|
|||
%
|
||||
% A |beamer| font theme sets the style of the font used in the document.
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsubsection{Package dependencies}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{pgfopts}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
@ -55,276 +52,6 @@
|
|||
\setbeamerfont{standout}{size=\Large, series=\bfseries}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsubsection{Title format options}
|
||||
%
|
||||
% \begin{macro}{titleformat title}
|
||||
% Controls the format of the title.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/font/titleformat title/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\moloch@titleformat\@empty%
|
||||
\setbeamerfont{title}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\moloch@titleformat\@empty%
|
||||
\setbeamerfont{title}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\moloch@titleformat\lowercase%
|
||||
\setbeamerfont{title}{shape=\scshape}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat title=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\moloch@titleformat\uppercase%
|
||||
\setbeamerfont{title}{shape=\normalfont}
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat title=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \begin{macro}{titleformat subtitle}
|
||||
% Control the format of the subtitle.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/font/titleformat subtitle/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\moloch@subtitleformat\@empty%
|
||||
\setbeamerfont{subtitle}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\moloch@subtitleformat\@empty%
|
||||
\setbeamerfont{subtitle}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\moloch@subtitleformat\lowercase%
|
||||
\setbeamerfont{subtitle}{shape=\scshape}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\moloch@subtitleformat\uppercase%
|
||||
\setbeamerfont{subtitle}{shape=\normalfont}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat subtitle=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \begin{macro}{titleformat section}
|
||||
% Controls the format of the section title.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/font/titleformat section/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\moloch@sectiontitleformat\@empty%
|
||||
\setbeamerfont{section title}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\moloch@sectiontitleformat\@empty%
|
||||
\setbeamerfont{section title}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\moloch@sectiontitleformat\MakeLowercase%
|
||||
\setbeamerfont{section title}{shape=\scshape}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat section=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\moloch@sectiontitleformat\MakeUppercase%
|
||||
\setbeamerfont{section title}{shape=\normalfont}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat section=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \begin{macro}{frametitleformat}
|
||||
% Control the format of the frame title.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/font/titleformat frame/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\moloch@frametitleformat\@empty%
|
||||
\setbeamerfont{frametitle}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\moloch@frametitleformat\@empty%
|
||||
\setbeamerfont{frametitle}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\moloch@frametitleformat\MakeLowercase%
|
||||
\setbeamerfont{frametitle}{shape=\scshape}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat frame=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\moloch@frametitleformat\MakeUppercase%
|
||||
\setbeamerfont{frametitle}{shape=\normalfont}
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat frame=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \begin{macro}{titleformat aliases}
|
||||
% Allows |titleformat title| et al. to be used in the |\usetheme|
|
||||
% declaration, where \LaTeX{} automatically removes all spaces.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/font/.cd,
|
||||
titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
|
||||
titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
|
||||
titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
|
||||
titleformatframe/.code=\pgfkeysalso{titleformat frame=#1},
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \begin{macro}{\moloch@font@setdefaults}
|
||||
% Sets default values for font theme options.
|
||||
% \begin{macrocode}
|
||||
\newcommand{\moloch@font@setdefaults}{
|
||||
\pgfkeys{/moloch/font/.cd,
|
||||
titleformat title=regular,
|
||||
titleformat subtitle=regular,
|
||||
titleformat section=regular,
|
||||
titleformat frame=regular,
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% We first define hooks to change the case format of the titles.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\def\moloch@titleformat#1{#1}
|
||||
\def\moloch@subtitleformat#1{#1}
|
||||
\def\moloch@sectiontitleformat#1{#1}
|
||||
\def\moloch@frametitleformat#1{#1}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% To make the uppercase and lowercase macros work in the title, subtitle, etc.,
|
||||
% we have to patch the appropriate |beamer| commands that set their values.
|
||||
% This solution was suggested by Enrico Gregorio in an answer to
|
||||
% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
|
||||
% question}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\patchcmd{\beamer@title}%
|
||||
{\def\inserttitle{#2}}%
|
||||
{\def\inserttitle{\moloch@titleformat{#2}}}%
|
||||
{}%
|
||||
{\PackageError{beamerfontthememoloch}{Patching title failed}\@ehc}
|
||||
\patchcmd{\beamer@subtitle}%
|
||||
{\def\insertsubtitle{#2}}%
|
||||
{\def\insertsubtitle{\moloch@subtitleformat{#2}}}%
|
||||
{}%
|
||||
{\PackageError{beamerfontthememoloch}{Patching subtitle failed}\@ehc}
|
||||
\patchcmd{\sectionentry}
|
||||
{\def\insertsectionhead{#2}}
|
||||
{\def\insertsectionhead{\moloch@sectiontitleformat{#2}}}
|
||||
{}
|
||||
{\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc}
|
||||
\@tempswafalse
|
||||
\patchcmd{\beamer@section}
|
||||
{\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
|
||||
{\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@section}
|
||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
|
||||
\moloch@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@section}
|
||||
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\moloch@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\if@tempswa\else
|
||||
\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc
|
||||
\fi
|
||||
\@tempswafalse
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
|
||||
{\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
|
||||
\moloch@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\moloch@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\if@tempswa\else
|
||||
\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc
|
||||
\fi
|
||||
% \end{macrocode}
|
||||
%
|
||||
% Similarly, to make the |\MakeLowercase| and |\MakeUppercase| macros work in
|
||||
% the frame title we have to patch |\beamer@@frametitle|.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\patchcmd{\beamer@@frametitle}{%
|
||||
\gdef\insertframetitle{{%
|
||||
#2%
|
||||
\ifnum\beamer@autobreakcount>0
|
||||
\relax{}\space%
|
||||
\beamer@insertframetitlecontinuation%
|
||||
\fi%
|
||||
}}%
|
||||
}{%
|
||||
\gdef\insertframetitle{{%
|
||||
\moloch@frametitleformat{#2}%
|
||||
\ifnum\beamer@autobreakcount>0
|
||||
\relax{}\space%
|
||||
\beamer@insertframetitlecontinuation%
|
||||
\fi%
|
||||
}}%
|
||||
}{}{%
|
||||
\PackageError{beamerfontthememoloch}{Patching frame title failed}\@ehc
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsubsection{Process package options}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\moloch@font@setdefaults
|
||||
\ProcessPgfPackageOptions{/moloch/font}
|
||||
% \end{macrocode}
|
||||
% \iffalse
|
||||
%</package>
|
||||
% \fi
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
% \subsubsection{Package dependencies}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{keyval}
|
||||
\RequirePackage{calc}
|
||||
\RequirePackage{pgfopts}
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
% \subsubsection{Package dependencies}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{calc}
|
||||
\RequirePackage{pgfopts}
|
||||
% \end{macrocode}
|
||||
|
@ -125,14 +124,10 @@
|
|||
% \begin{macrocode}
|
||||
\newlength{\moloch@frametitle@padding}
|
||||
\setlength{\moloch@frametitle@padding}{2.2ex}
|
||||
\newcommand{\moloch@frametitlestrut@start}{
|
||||
\rule{0pt}{\moloch@frametitle@padding +%
|
||||
\totalheightof{%
|
||||
\ifcsdef{moloch@frametitleformat}{\moloch@frametitleformat X}{X}%
|
||||
}%
|
||||
}%
|
||||
\newcommand{\moloch@frametitlestrut@start}{%
|
||||
\rule{0pt}{\moloch@frametitle@padding + \totalheightof{X}}%
|
||||
}
|
||||
\newcommand{\moloch@frametitlestrut@end}{
|
||||
\newcommand{\moloch@frametitlestrut@end}{%
|
||||
\rule[-\moloch@frametitle@padding]{0pt}{\moloch@frametitle@padding}
|
||||
}
|
||||
\defbeamertemplate{frametitle}{plain}{%
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
% \subsubsection{Package dependencies}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{pgfopts}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
@ -53,64 +52,6 @@
|
|||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \begin{macro}{titleformat plain}
|
||||
% Controls the formatting of the text on standout ``plain'' frames.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/titleformat plain/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\moloch@plaintitleformat\@empty%
|
||||
\setbeamerfont{standout}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\moloch@plaintitleformat\@empty%
|
||||
\setbeamerfont{standout}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\moloch@plaintitleformat\MakeLowercase%
|
||||
\setbeamerfont{standout}{shape=\scshape}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat plain=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\moloch@plaintitleformat\MakeUppercase%
|
||||
\setbeamerfont{standout}{shape=\normalfont}%
|
||||
\PackageNote{beamerthememoloch}{%
|
||||
Be aware that titleformat plain=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \begin{macro}{titleformat}
|
||||
% Sets a standard format for titles, subtitles, section titles, frame
|
||||
% titles, and the text on standout ``plain'' frames.
|
||||
% \begin{macrocode}
|
||||
\pgfkeys{
|
||||
/moloch/titleformat/.code=\pgfkeysalso{
|
||||
font/titleformat title=#1,
|
||||
font/titleformat subtitle=#1,
|
||||
font/titleformat section=#1,
|
||||
font/titleformat frame=#1,
|
||||
titleformat plain=#1,
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% Set default values for options.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\newcommand{\moloch@setdefaults}{
|
||||
\pgfkeys{/moloch/.cd,
|
||||
titleformat plain=regular,
|
||||
}
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% To avoid generating externalized figures of the progressbar we have to disable
|
||||
% them with ``tikzexternalenable'' and ``tikzexternaldisable''. However, if the
|
||||
% ``external'' libray is not loaded we would get undefined control sequence
|
||||
|
@ -157,7 +98,6 @@
|
|||
% \subsubsection{Process package options}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\moloch@setdefaults
|
||||
\ProcessPgfOptions{/moloch}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
|
|
@ -41,40 +41,6 @@
|
|||
\vfil\break
|
||||
\END
|
||||
|
||||
{
|
||||
\molochset{titleformat frame=smallcaps}
|
||||
\begin{frame}{Small caps}
|
||||
This frame uses the \texttt{smallcaps} title format.
|
||||
|
||||
\begin{block}{Block}
|
||||
Some content
|
||||
\end{block}
|
||||
|
||||
\begin{alertblock}{Alert Block}
|
||||
Yet more content
|
||||
\end{alertblock}
|
||||
|
||||
\begin{exampleblock}{Example Block}
|
||||
Just to try out the different blocks
|
||||
|
||||
\end{exampleblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
||||
{
|
||||
\molochset{titleformat frame=allsmallcaps}
|
||||
\begin{frame}{All small caps}
|
||||
This frame uses the \texttt{allsmallcaps} title format.
|
||||
\end{frame}
|
||||
}
|
||||
|
||||
{
|
||||
\molochset{titleformat frame=allcaps}
|
||||
\begin{frame}{All caps}
|
||||
This frame uses the \texttt{allcaps} title format.
|
||||
\end{frame}
|
||||
}
|
||||
|
||||
\begin{frame}{Lists}
|
||||
\begin{columns}[T,onlytextwidth]
|
||||
\column{0.33\textwidth}
|
||||
|
|
Loading…
Reference in New Issue