made the case settings package options and a lot of documenting

This commit is contained in:
Benjamin Weiss 2015-06-23 14:35:04 +02:00
parent f6fc58c6c7
commit 4a8557a124
13 changed files with 229 additions and 123 deletions

View File

@ -22,7 +22,7 @@ DOCKER_CONTAINER = latex-container
.PHONY: sty doc demo demo-min ctan clean install uninstall docker-run docker-build docker-rm .PHONY: sty doc demo demo-min ctan clean install uninstall docker-run docker-build docker-rm
all: sty doc demo all: sty doc demo demo-min
$(STY): $(DTX) $(INS) $(STY): $(DTX) $(INS)
@latex $(INS) @latex $(INS)

View File

@ -28,7 +28,7 @@
%<*package> %<*package>
% ------------------------------------------------------------------------- \fi % ------------------------------------------------------------------------- \fi
% %
% \section{Implementation: \textsc{metropolis} color theme} % \subsection{\textsc{metropolis} color theme}
% %
% Load required packages. % Load required packages.
% \begin{macrocode} % \begin{macrocode}
@ -37,7 +37,7 @@
% %
% %
% %
% \subsection{Options} % \subsubsection{Options}
% %
% \begin{macro}{block} % \begin{macro}{block}
% This option controls whether the blocks are filled or transparent. % This option controls whether the blocks are filled or transparent.
@ -78,7 +78,7 @@
% %
% %
% %
% \subsection{Base colors} % \subsubsection{Base colors}
% %
% \begin{macrocode} % \begin{macrocode}
\definecolor{mDarkBrown}{HTML}{604c38} \definecolor{mDarkBrown}{HTML}{604c38}
@ -89,7 +89,7 @@
% %
% %
% %
% \subsection{Base styles} % \subsubsection{Base styles}
% %
% All colors in the \textsc{metropolis} theme are derived from the definitions % All colors in the \textsc{metropolis} theme are derived from the definitions
% of |normal text|, |alerted text|, and |example text|. % of |normal text|, |alerted text|, and |example text|.
@ -117,7 +117,7 @@
% %
% %
% %
% \subsection{Derived colors} % \subsubsection{Derived colors}
% %
% The titles and structural elements (e.g. |itemize| bullets) are set in the % The titles and structural elements (e.g. |itemize| bullets) are set in the
% same color as |normal text|. This would ideally done by setting |normal text| % same color as |normal text|. This would ideally done by setting |normal text|

View File

@ -27,7 +27,7 @@
% \iffalse % \iffalse
%<*package> %<*package>
% ------------------------------------------------------------------------- \fi % ------------------------------------------------------------------------- \fi
% \section{Implementation: Fira font theme} % \subsection{Fira font theme}
% Font Definitions % Font Definitions
% %
% \begin{macrocode} % \begin{macrocode}

View File

@ -28,7 +28,7 @@
%<*package> %<*package>
% ------------------------------------------------------------------------- \fi % ------------------------------------------------------------------------- \fi
% %
% \section{Implementation: \textsc{metropolis} inner theme} % \subsection{\textsc{metropolis} inner theme}
% %
% A |beamer| inner theme dictates the style of the frame elements traditionally % A |beamer| inner theme dictates the style of the frame elements traditionally
% set in the ``body'' of each slide. These include: % set in the ``body'' of each slide. These include:
@ -43,6 +43,7 @@
% %
% Load required packages. % Load required packages.
% \begin{macrocode} % \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{calc} \RequirePackage{calc}
\RequirePackage{pgfopts} \RequirePackage{pgfopts}
\RequirePackage{tikz} \RequirePackage{tikz}
@ -50,7 +51,7 @@
% %
% %
% %
% \subsection{Options} % \subsubsection{Options}
% %
% \begin{macro}{block} % \begin{macro}{block}
% This option controls the block style. % This option controls the block style.
@ -64,6 +65,40 @@
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% \begin{macro}{titleformat}
% Control the case style of the title
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/titleformat/.cd,
.is choice,
regular/.code=\renewcommand{\@metropolis@titleformat}{},
lowercase/.code={%
\renewcommand{\@metropolis@titleformat}{\MakeLowercase}
},
uppercase/.code={%
\renewcommand{\@metropolis@titleformat}{\MakeUppercase}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{sectiontitleformat}
% Control the case style of the section title
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/sectiontitleformat/.cd,
.is choice,
regular/.code=\renewcommand{\@metropolis@sectiontitleformat}{},
lowercase/.code={%
\renewcommand{\@metropolis@sectiontitleformat}{\MakeLowercase}
},
uppercase/.code={%
\renewcommand{\@metropolis@sectiontitleformat}{\MakeUppercase}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{sectionpage} % \begin{macro}{sectionpage}
% The |sectionpage| option defines the behaviour of the sectionpage. % The |sectionpage| option defines the behaviour of the sectionpage.
% \begin{macrocode} % \begin{macrocode}
@ -83,6 +118,8 @@
\pgfkeys{/metropolis/inner/.cd, \pgfkeys{/metropolis/inner/.cd,
sectionpage=progressbar, sectionpage=progressbar,
block=transparent, block=transparent,
titleformat=lowercase,
sectiontitleformat=lowercase,
} }
} }
% \end{macrocode} % \end{macrocode}
@ -90,7 +127,34 @@
% %
% %
% %
% \subsection{Title page} % \subsubsection{Title page}
%
% \begin{macro}{\@metropolis@titleformat}
% Define hooks to change the case format of the titles.
% \begin{macrocode}
\def\@metropolis@titleformat#1{#1}
\def\@metropolis@sectiontitleformat#1{#1}
% \end{macrocode}
% \end{macro}
%
% To make the |\MakeLowercase| and |\MakeUppercase| macros work in the
% sectiontitle we have to patch |\sectionentry| and |\beamer@section|. This
% solution was suggested by Enrico Gregorio in an answer to
% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
% question}.
%
% \begin{macrocode}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\@metropolis@sectiontitleformat{#2}}}
{}
{\PackageError{beamerinnerthememetropolis}{Patching section title failed.}}
\patchcmd{\beamer@section}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{\@metropolis@sectiontitleformat{#1}}}}
{}
{\PackageError{beamerinnerthememetropolis}{Patching section title failed.}}
% \end{macrocode}
% %
% \begin{macro}{title page} % \begin{macro}{title page}
% Template for the title page. % Template for the title page.
@ -224,7 +288,7 @@
% %
% %
% %
% \subsection{Section page} % \subsubsection{Section page}
% %
% \begin{macro}{section page} % \begin{macro}{section page}
% %
@ -296,7 +360,9 @@
% %
% %
% %
% \subsection{Block environments} % \subsubsection{Block environments}
%
% Regular block environment
% %
% \begin{macrocode} % \begin{macrocode}
\newlength{\@metropolis@blockskip} \newlength{\@metropolis@blockskip}
@ -377,7 +443,7 @@
% %
% %
% %
% \subsection{Itemize/enumerate environments} % \subsubsection{Itemize/enumerate environments}
% \begin{macrocode} % \begin{macrocode}
\setlength{\leftmargini}{1em} \setlength{\leftmargini}{1em}
\setlength{\leftmarginii}{1em} \setlength{\leftmarginii}{1em}
@ -389,7 +455,7 @@
% %
% %
% %
% \subsection{Figures and tables} % \subsubsection{Figures and tables}
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{caption label separator}{: } \setbeamertemplate{caption label separator}{: }
\setbeamertemplate{caption}[numbered] \setbeamertemplate{caption}[numbered]
@ -397,7 +463,7 @@
% %
% %
% %
% \subsection{Footnotes} % \subsubsection{Footnotes}
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{footnote}{% \setbeamertemplate{footnote}{%
\parindent 0em\noindent% \parindent 0em\noindent%
@ -408,7 +474,7 @@
% %
% %
% %
% \subsection{General text settings} % \subsubsection{General text settings}
% \begin{macrocode} % \begin{macrocode}
\mode<all> \mode<all>
\setlength{\parskip}{0.5em} \setlength{\parskip}{0.5em}

View File

@ -28,20 +28,21 @@
%<*package> %<*package>
% ------------------------------------------------------------------------- \fi % ------------------------------------------------------------------------- \fi
% %
% \section{Implementation: \textsc{metropolis} outer theme} % \subsection{\textsc{metropolis} outer theme}
% %
% A |beamer| outer theme dictates the style of the frame elements traditionally % A |beamer| outer theme dictates the style of the frame elements traditionally
% set outside the body of each slide: the head, footline, and frame title. % set outside the body of each slide: the head, footline, and frame title.
% %
% Load required packages. % Load required packages.
% \begin{macrocode} % \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{calc} \RequirePackage{calc}
\RequirePackage{pgfopts} \RequirePackage{pgfopts}
% \end{macrocode} % \end{macrocode}
% %
% %
% %
% \subsection{Options} % \subsubsection{Options}
% %
% \begin{macro}{numbering} % \begin{macro}{numbering}
% This option controls the page numbering. % This option controls the page numbering.
@ -63,7 +64,24 @@
/metropolis/outer/progressbar/.cd, /metropolis/outer/progressbar/.cd,
.is choice, .is choice,
none/.code=\setbeamertemplate{progress bar in head/foot}[none], none/.code=\setbeamertemplate{progress bar in head/foot}[none],
head/.code=\setbeamertemplate{progress bar in head/foot}[head], top/.code=\setbeamertemplate{progress bar in head/foot}[top],
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{frametitleformat}
% Control the case style of the frame title
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/frametitleformat/.cd,
.is choice,
regular/.code=\renewcommand{\@metropolis@frametitleformat}{},
lowercase/.code={%
\renewcommand{\@metropolis@frametitleformat}{\MakeLowercase}
},
uppercase/.code={%
\renewcommand{\@metropolis@frametitleformat}{\MakeUppercase}
},
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
@ -86,6 +104,7 @@
\pgfkeys{/metropolis/outer/.cd, \pgfkeys{/metropolis/outer/.cd,
numbering=counter, numbering=counter,
progressbar=none, progressbar=none,
frametitleformat=lowercase,
frametitleoffset=2em, frametitleoffset=2em,
} }
} }
@ -94,7 +113,7 @@
% %
% %
% %
% \subsection{Head and footline} % \subsubsection{Head and footline}
% %
% All good |beamer| presentations should already remove the navigation symbols, % All good |beamer| presentations should already remove the navigation symbols,
% but \textsc{metropolis} removes them automatically (just in case). % but \textsc{metropolis} removes them automatically (just in case).
@ -143,12 +162,41 @@
% %
% %
% %
% \subsection{Frametitle} % \subsubsection{Frametitle}
%
% \begin{macro}{\@metropolis@frametitleformat}
% Define a hook to change the case format of the frame title.
% \begin{macrocode}
\def\@metropolis@frametitleformat#1{#1}
% \end{macrocode}
% \end{macro}
%
% To make the |\MakeLowercase| and |\MakeUppercase| macros work in the
% frame title we have to patch |\beamer@@frametitle|. 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@@frametitle}
{\beamer@ifempty{#2}{}{%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{\beamer@ifempty{#2}{}{%
\gdef\insertframetitle{{\@metropolis@frametitleformat{#2}\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}
{\PackageError{beamerouterthememetropolis}{Patching frame title failed.}}
% \end{macrocode}
% %
% \begin{macro}{frametitle} % \begin{macro}{frametitle}
% %
% Template for the frame title, which is optionally underlined with a % Template for the frame title, which is optionally underlined with a
% progress bar. % progress bar.
% %
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{frametitle}{% \setbeamertemplate{frametitle}{%
@ -170,9 +218,9 @@
% %
% \begin{macro}{progress bar in head/foot} % \begin{macro}{progress bar in head/foot}
% %
% Template for the progress bar optionally displayed below the frame title % Template for the progress bar optionally displayed below the frame title
% on each page. Much of this code is duplicated in the inner theme's template % on each page. Much of this code is duplicated in the inner theme's template
% |progress bar in section page|. % |progress bar in section page|.
% %
% \begin{macrocode} % \begin{macrocode}
\newlength{\metropolis@progressinheadfoot} \newlength{\metropolis@progressinheadfoot}

View File

@ -28,7 +28,7 @@
%<*package> %<*package>
% ------------------------------------------------------------------------- \fi % ------------------------------------------------------------------------- \fi
% %
% \section{Implementation: \textsc{metropolis} main theme} % \subsection{\textsc{metropolis} main theme}
% %
% The primary job of this package is to load the component sub-packages of the % The primary job of this package is to load the component sub-packages of the
% \textsc{metropolis} theme and route the theme options accordingly. It also % \textsc{metropolis} theme and route the theme options accordingly. It also
@ -42,7 +42,7 @@
\RequirePackage{ifluatex} \RequirePackage{ifluatex}
% \end{macrocode} % \end{macrocode}
% %
% \subsection{Options} % \subsubsection{Options}
% %
% \begin{macro}{\metropolisset} % \begin{macro}{\metropolisset}
% First of all we define a macro for the user to set options. % First of all we define a macro for the user to set options.
@ -68,10 +68,41 @@
block/.code=\pgfkeysalso{ block/.code=\pgfkeysalso{
inner/block=#1, inner/block=#1,
color/block=#1, color/block=#1,
} },
} }
% \end{macrocode} % \end{macrocode}
% %
% \begin{macro}{plaintitleformat}
% Control the case style of the plain title
% \begin{macrocode}
\pgfkeys{
/metropolis/plaintitleformat/.cd,
.is choice,
regular/.code=\renewcommand{\@metropolis@plaintitleformat}{#1},
lowercase/.code={%
\renewcommand{\@metropolis@plaintitleformat}{\MakeLowercase{#1}}
},
uppercase/.code={%
\renewcommand{\@metropolis@plaintitleformat}{\MakeUppercase{#1}}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{everytitleformat}
% Control the case style of the every title
% \begin{macrocode}
\pgfkeys{
/metropolis/everytitleformat/.code=\pgfkeysalso{
inner/titleformat=#1,
inner/sectiontitleformat=#1,
outer/frametitleformat=#1,
plaintitleformat=#1,
}
}
% \end{macrocode}
% \end{macro}
%
% For backwards compatibility with earlier betas of the theme, we implement % For backwards compatibility with earlier betas of the theme, we implement
% deprecated option names as aliases to the corresponding |key=value| options. % deprecated option names as aliases to the corresponding |key=value| options.
% %
@ -91,13 +122,14 @@
% \begin{macrocode} % \begin{macrocode}
\newcommand{\@metropolis@setdefaults}{ \newcommand{\@metropolis@setdefaults}{
\pgfkeys{/metropolis/.cd, \pgfkeys{/metropolis/.cd,
plaintitleformat=lowercase,
} }
} }
% \end{macrocode} % \end{macrocode}
% %
% %
% %
% \subsection{Component sub-packages} % \subsubsection{Component sub-packages}
% %
% Having processed the options, we can now load the component sub-packages of % Having processed the options, we can now load the component sub-packages of
% the theme. % the theme.
@ -132,56 +164,16 @@
% %
% %
% %
% \subsection{Custom commands} % \subsubsection{Custom commands}
% %
% We define custom commands in this package as their proper usage may depend % We define custom commands in this package as their proper usage may depend
% on multiple sub-packages. % on multiple sub-packages.
% %
% \begin{macro}{\@metropolis@titleformat}
% \begin{macro}{\@metropolis@sectiontitleformat}
% \begin{macro}{\@metropolis@frametitleformat}
% \begin{macro}{\@metropolis@plaintitleformat} % \begin{macro}{\@metropolis@plaintitleformat}
% Creates hooks to change the case format of the four different titles. % Define a hook to change the case format of the plain title.
% \begin{macrocode} % \begin{macrocode}
\def\@metropolis@titleformat#1{\MakeLowercase{#1}} \def\@metropolis@plaintitleformat#1{#1}
\def\@metropolis@sectiontitleformat#1{\@metropolis@titleformat{#1}}
\def\@metropolis@frametitleformat#1{\@metropolis@titleformat{#1}}
\def\@metropolis@plaintitleformat#1{\@metropolis@titleformat{#1}}
% \end{macrocode} % \end{macrocode}
%
% To give users the option to |\MakeUppercase| or |\MakeLowercase| the
% section title and frame title we need to patch the commands
% |\sectionentry|, |\beamer@section| and |\beamer@@frametitle|. This
% solution was suggested by Enrico Gregorio in an answer to
% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
% question}.
%
% \begin{macrocode}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\@metropolis@sectiontitleformat{#2}}}
{}{}
\patchcmd{\beamer@section}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{\@metropolis@sectiontitleformat{#1}}}}
{}{}
\patchcmd{\beamer@@frametitle}
{\beamer@ifempty{#2}{}{%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{\beamer@ifempty{#2}{}{%
\gdef\insertframetitle{{\@metropolis@frametitleformat{#2}\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}{}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro} % \end{macro}
% %
% \begin{macro}{\plain} % \begin{macro}{\plain}

BIN
demo-minimal.pdf Normal file

Binary file not shown.

View File

@ -1,10 +1,6 @@
\documentclass[10pt]{beamer} \documentclass[10pt]{beamer}
\usetheme{m} \usetheme{m}
\metropolisset{
numbering=fraction,
progressbar=top,
}
\title{A modern beamer theme} \title{A modern beamer theme}
\subtitle{} \subtitle{}
@ -35,10 +31,6 @@
\end{block} \end{block}
\end{frame} \end{frame}
\metropolisset{
block=fill,
}
\begin{frame}{Frame 4} \begin{frame}{Frame 4}
Content 4 Content 4
\begin{block}{Block 2} \begin{block}{Block 2}

BIN
demo.pdf

Binary file not shown.

View File

@ -2,12 +2,6 @@
\usetheme{m} \usetheme{m}
\metropolisset{
sectionpage=none,
block=fill,
numbering=fraction,
}
\usepackage{booktabs} \usepackage{booktabs}
\usepackage[scale=2]{ccicons} \usepackage[scale=2]{ccicons}

View File

@ -130,11 +130,13 @@ computer. The complete list of make rules is as follows:
\item[uninstall] \hfill \\ \item[uninstall] \hfill \\
Remove the theme from your local texmf folder. Remove the theme from your local texmf folder.
\item[sty] \hfill \\ \item[sty] \hfill \\
Build the manual. Creat the package files.
\item[manual] \hfill \\ \item[doc] \hfill \\
Build the manual. Build the documentation.
\item[demo] \hfill \\ \item[demo] \hfill \\
Build the demo presentation. Build the demo presentation.
\item[demo-min] \hfill \\
Build the minimal demo presentation.
\item[ctan] \hfill \\ \item[ctan] \hfill \\
Create a package for CTAN distribution. Create a package for CTAN distribution.
\end{description} \end{description}
@ -196,37 +198,56 @@ The theme provides a number of options. The options use a key=value interface.
So every option is controlled by a key its value. To use an option you can So every option is controlled by a key its value. To use an option you can
either provide a comma separated list of options when invoking either provide a comma separated list of options when invoking
\textsc{mtheme} in the preamble of the presentation. \textsc{mtheme} in the preamble of the presentation.
\begin{lstlisting}[numbers=none] \begin{lstlisting}
\usetheme[<key=value list>]{m} \usetheme[<key=value list>]{m}
\end{lstlisting} \end{lstlisting}
Or you can set them at any time with the |\metropolisset| macro. Or you can set them at any time with the |\metropolisset| macro.
\begin{lstlisting}[numbers=none] \begin{lstlisting}
\metropolisset[<key=value list>] \metropolisset[<key=value list>]
\end{lstlisting} \end{lstlisting}
To set an option on a specific sub-package only you have to add the To set an option on a specific sub-package only you have to add the
corresponding prefix (inner, outer, color), e.g. corresponding prefix (inner, outer, color), e.g.
\begin{lstlisting}[numbers=none] \begin{lstlisting}
\metropolisset[inner/block=fill] \metropolisset[inner/block=fill]
\end{lstlisting} \end{lstlisting}
The following list of options is structured as shown in the following example. The list of options is structured as shown in the following example.
\DescribeOption{key}{list of possible values}{default value}{ \DescribeOption{key}{list of possible values}{default value}{
A short description of the option. A short description of the option.
} }
Although the options are grouped into the corresponding sub-packages every Although the options are grouped into the corresponding packages every option
option can and in most cases should be set on the main theme directly. If an can and in most cases should be set on the main theme directly. If an option
option is listed in multiple themes, setting it on the main theme will set the is listed in multiple sub-packages, setting it on the main theme will set the
option on every sub-package. option on every sub-package accordingly.
\subsubsection{Main theme}
\DescribeOption{everytitleformat}{regular, lowercase, uppercase}{lowercase}{
Shortcut option to change the case style of all titles together.
}
\DescribeOption{plainformat}{regular, lowercase, uppercase}{lowercase}{
Control the case style of the plain title.
}
\subsubsection{Inner theme} \subsubsection{Inner theme}
\DescribeOption{block}{transparent, fill}{transparent}{ \DescribeOption{block}{transparent, fill}{transparent}{
This option controls the block background. It can either be filled with a This option controls the block background. It can either be filled with a
light grey or be transparent. light grey or be transparent.
} }
\DescribeOption{sectionpage}{none, progressbar}{progressbar}{ \DescribeOption{sectionpage}{none, progressbar}{progressbar}{
Adds a thin progress bar similar to the section progress bar underneath each frame title. Adds a thin progress bar similar to the section progress bar underneath each frame title.
} }
\DescribeOption{titleformat}{regular, lowercase, uppercase}{lowercase}{
Control the case style of the title.
}
\DescribeOption{sectiontitleformat}{regular, lowercase, uppercase}{lowercase}{
Control the case style of the section title.
}
\subsubsection{Outer theme} \subsubsection{Outer theme}
\DescribeOption{numbering}{none, counter, fraction}{counter}{ \DescribeOption{numbering}{none, counter, fraction}{counter}{
In the bottom right corner of each frame the current frame number is In the bottom right corner of each frame the current frame number is
@ -239,27 +260,32 @@ option on every sub-package.
progress bar underneath each frame title. progress bar underneath each frame title.
} }
\DescribeOption{frametitleformat}{regular, lowercase, uppercase}{lowercase}{
Control the case style of the frame title.
}
\DescribeOption{frametitleoffset\\noframetitleoffset}{<dimension>}{2em}{ \DescribeOption{frametitleoffset\\noframetitleoffset}{<dimension>}{2em}{
The frametitle offset is an additional vertical space after the frame title The frametitle offset is an additional vertical space after the frame title
to center the content vertically on the frame. To remove this space entirely to center the content vertically on the frame. To remove this space entirely
the short option |noframetitleoffset| is defined. the short option |noframetitleoffset| is defined.
} }
\subsubsection{Color theme} \subsubsection{Color theme}
\DescribeOption{block}{transparent, fill}{transparent}{ \DescribeOption{block}{transparent, fill}{transparent}{
This option controls the block background. It can either be filled with a This option controls the block background. It can either be filled with a
light grey or be transparent. light grey or be transparent.
} }
\DescribeOption{background}{dark, light}{light}{ \DescribeOption{background}{dark, light}{light}{
This option defines whether the background shall be dark and the foreground This option defines whether the background shall be dark and the foreground
be light or vice versa. be light or vice versa.
} }
\subsection{Color Customization} \subsection{Color Customization}
The included metropolis color theme is used by default, but its colors can be The included \textsc{metropolis} color theme is used by default, but its
easily changed to suit your tastes. All of the theme's styles are defined in colors can be easily changed to suit your tastes. All of the theme's styles
terms of three beamer colors: are defined in terms of three beamer colors:
\begin{itemize} \begin{itemize}
\item |normal text| (dark fg, light bg) \item |normal text| (dark fg, light bg)
\item |alerted text| (colored fg, should be visible against dark or light) \item |alerted text| (colored fg, should be visible against dark or light)
@ -267,38 +293,26 @@ terms of three beamer colors:
\end{itemize} \end{itemize}
An easy way to customize the theme is to redefine these colors using An easy way to customize the theme is to redefine these colors using
\begin{lstlisting}[numbers=none] \begin{lstlisting}
\setbeamercolor{ ... }{ fg= ... , bg= ... } \setbeamercolor{ ... }{ fg= ... , bg= ... }
\end{lstlisting} \end{lstlisting}
in your preamble. For greater customization, you can redefine any of the other in your preamble. For greater customization, you can redefine any of the other
colors in |beamercolorthememetropolis|, including progress bar. stock beamer colors. In addition to the stock colors the theme defines a number
of \textsc{metropolis} specific colors, which can also be redefined to your
liking.
\subsection{Title Case Formatting}
The main title, section titles, frame titles and plain frame titles are all
formatted according to the custom command |\@metropolis@titleformat|. By default,
this is equivalent to |\MakeLowercase{#1}|, hence seting the titles in small
capitals. You can change this behaviour in your preamble. For example:
\begin{lstlisting} \begin{lstlisting}
% camel case \setbeamercolor{progress bar}{ ... }
\renewcommand{\@metropolis@titleformat}{} \setbeamercolor{title separator}{ ... }
% lowercase \setbeamercolor{progress bar in head/foot}{ ... }
\renewcommand{\@metropolis@titleformat}\MakeLowercase} \setbeamercolor{progress bar in section page}{ ... }
% uppercase
\renewcommand{\@metropolis@titleformat}{\MakeUppercase}
\end{lstlisting} \end{lstlisting}
Be aware that these formatting macros will be replaced with theme options in
the future.
\subsection{Commands} \subsection{Commands}
The |\plain{title=[]}{<body>}| command sets a slide in plain dark colors which The |\plain{title=[]}{<body>}| command sets a slide in plain dark colors which
can be useful to focus attention on a single sentence or image. can be useful to focus attention on a single sentence or image.
\subsection{Paul Tol's colors: a \texttt{pgfplots} theme} \subsection{Paul Tol's colors: a \texttt{pgfplots} theme}
A good presentation uses colors that are A good presentation uses colors that are

Binary file not shown.

View File

@ -30,7 +30,7 @@
%<*package> %<*package>
% ------------------------------------------------------------------------- \fi % ------------------------------------------------------------------------- \fi
% %
% \section{Implementation: Tol \texttt{pgfplots} theme} % \subsection{Tol \texttt{pgfplots} theme}
% %
% Paul Tol's 12-color palette\footnote{Tol actually describes several % Paul Tol's 12-color palette\footnote{Tol actually describes several
% palettes; these colours are taken from the bottom row of Figure 3 in his % palettes; these colours are taken from the bottom row of Figure 3 in his