Merge pull request #98 from benjamin-weiss/pgfkeys-based-options
Pgfkeys based options
This commit is contained in:
commit
1e8b3749f0
40
Makefile
40
Makefile
|
@ -1,28 +1,26 @@
|
||||||
INS = mtheme.ins
|
|
||||||
CONTRIB_SRC = contributors.py
|
|
||||||
CONTRIB_TEX = contributors.tex
|
|
||||||
DTX = $(wildcard *.dtx)
|
|
||||||
STY = $(patsubst %.dtx,%.sty,$(wildcard beamer*.dtx pgfplotsthemetol.dtx))
|
|
||||||
TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME)
|
TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME)
|
||||||
INSTALL_DIR = $(TEXMFHOME)/tex/latex/mtheme
|
INSTALL_DIR = $(TEXMFHOME)/tex/latex/mtheme
|
||||||
MANUAL_DIR = $(TEXMFHOME)/doc/latex/mtheme
|
DOC_DIR = $(TEXMFHOME)/doc/latex/mtheme
|
||||||
TEMP_DIR = .temptex
|
TEMP_DIR = .temptex
|
||||||
|
|
||||||
|
INS = mtheme.ins
|
||||||
DEMO_SRC = demo.tex
|
DEMO_SRC = demo.tex
|
||||||
DEMO_PDF = demo.pdf
|
DEMO_PDF = demo.pdf
|
||||||
MANUAL_SRC = mtheme.dtx
|
DOC_SRC = mtheme.dtx
|
||||||
MANUAL_PDF = mtheme.pdf
|
DOC_PDF = mtheme.pdf
|
||||||
TEXC := latexmk -xelatex -output-directory=$(TEMP_DIR)
|
DTX = $(wildcard *.dtx)
|
||||||
|
STY = $(patsubst %.dtx,%.sty,$(wildcard beamer*.dtx pgfplotsthemetol.dtx))
|
||||||
|
CTAN_CONTENT = $(INS) $(DTX) $(DOC_PDF)
|
||||||
|
|
||||||
CTAN_CONTENT = $(INS) $(DTX) $(MANUAL_PDF)
|
TEXC := latexmk -xelatex -output-directory=$(TEMP_DIR)
|
||||||
|
|
||||||
DOCKER_IMAGE = latex-image
|
DOCKER_IMAGE = latex-image
|
||||||
DOCKER_CONTAINER = latex-container
|
DOCKER_CONTAINER = latex-container
|
||||||
|
|
||||||
|
|
||||||
.PHONY: sty manual demo ctan clean install uninstall docker-run docker-build docker-rm
|
.PHONY: sty doc demo ctan clean install uninstall docker-run docker-build docker-rm
|
||||||
|
|
||||||
all: sty manual demo
|
all: sty doc demo
|
||||||
|
|
||||||
$(STY): $(DTX) $(INS)
|
$(STY): $(DTX) $(INS)
|
||||||
@latex $(INS)
|
@latex $(INS)
|
||||||
|
@ -31,13 +29,13 @@ $(DEMO_PDF): $(STY) $(DEMO_SRC)
|
||||||
$(TEXC) $(DEMO_SRC)
|
$(TEXC) $(DEMO_SRC)
|
||||||
@cp $(TEMP_DIR)/$(DEMO_PDF) .
|
@cp $(TEMP_DIR)/$(DEMO_PDF) .
|
||||||
|
|
||||||
$(MANUAL_PDF): $(MANUAL_SRC)
|
$(DOC_PDF): $(DOC_SRC) $(DTX)
|
||||||
@$(TEXC) $(MANUAL_SRC)
|
@$(TEXC) $(DOC_SRC)
|
||||||
@cp $(TEMP_DIR)/$(MANUAL_PDF) .
|
@cp $(TEMP_DIR)/$(DOC_PDF) .
|
||||||
|
|
||||||
sty: $(STY)
|
sty: $(STY)
|
||||||
|
|
||||||
manual: $(MANUAL_PDF)
|
doc: $(DOC_PDF)
|
||||||
|
|
||||||
demo: $(DEMO_PDF)
|
demo: $(DEMO_PDF)
|
||||||
|
|
||||||
|
@ -50,17 +48,17 @@ ctan: $(CTAN_CONTENT)
|
||||||
clean:
|
clean:
|
||||||
@git clean -xfd
|
@git clean -xfd
|
||||||
|
|
||||||
install: $(STY) $(MANUAL_PDF)
|
install: $(STY) $(DOC_PDF)
|
||||||
@mkdir -p $(INSTALL_DIR)
|
@mkdir -p $(INSTALL_DIR)
|
||||||
@cp $(STY) $(INSTALL_DIR)
|
@cp $(STY) $(INSTALL_DIR)
|
||||||
@mkdir -p $(MANUAL_DIR)
|
@mkdir -p $(DOC_DIR)
|
||||||
@cp $(MANUAL_PDF) $(MANUAL_DIR)
|
@cp $(DOC_PDF) $(DOC_DIR)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@rm -f $(addprefix $(INSTALL_DIR)/, $(STY))
|
@rm -f $(addprefix $(INSTALL_DIR)/, $(STY))
|
||||||
@rm -f $(MANUAL_DIR)/$(MANUAL_PDF)
|
@rm -f $(DOC_DIR)/$(DOC_PDF)
|
||||||
@rmdir $(INSTALL_DIR)
|
@rmdir $(INSTALL_DIR)
|
||||||
@rmdir $(MANUAL_DIR)
|
@rmdir $(DOC_DIR)
|
||||||
|
|
||||||
docker-run: docker-build
|
docker-run: docker-build
|
||||||
docker run --rm=true --name $(DOCKER_CONTAINER) -i -t -v `pwd`:/data $(DOCKER_IMAGE) make
|
docker run --rm=true --name $(DOCKER_CONTAINER) -i -t -v `pwd`:/data $(DOCKER_IMAGE) make
|
||||||
|
|
|
@ -27,32 +27,58 @@
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%<*package>
|
%<*package>
|
||||||
% ------------------------------------------------------------------------- \fi
|
% ------------------------------------------------------------------------- \fi
|
||||||
% \section{Implementation: \textsc{metropolis} color theme}
|
|
||||||
% Options
|
|
||||||
%
|
%
|
||||||
|
% \subsection{\textsc{metropolis} color theme}
|
||||||
%
|
%
|
||||||
% darkcolors
|
% Load required packages.
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newif\if@beamer@metropolis@darkcolors
|
\RequirePackage{pgfopts}
|
||||||
\@beamer@metropolis@darkcolorsfalse
|
|
||||||
\DeclareOptionBeamer{darkcolors}{
|
|
||||||
\@beamer@metropolis@darkcolorstrue
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
|
||||||
% Unknown option error handling
|
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
|
||||||
\DeclareOptionBeamer*{%
|
|
||||||
\PackageWarning{beamercolorthememetropolis}{Unknown option `\CurrentOption'}%
|
|
||||||
}
|
|
||||||
\ProcessOptionsBeamer
|
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \subsection{Base colors}
|
% \subsubsection{Options}
|
||||||
|
%
|
||||||
|
% \begin{macro}{block}
|
||||||
|
% This option controls whether the blocks are filled or transparent.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/color/block/.cd,
|
||||||
|
.is choice,
|
||||||
|
transparent/.code=\@metropolis@block@transparent,
|
||||||
|
fill/.code=\@metropolis@block@fill,
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{colors}
|
||||||
|
% Defines whether the background shall be dark and the foreground be light or
|
||||||
|
% vice versa
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/color/background/.cd,
|
||||||
|
.is choice,
|
||||||
|
dark/.code=\@metropolis@colors@dark,
|
||||||
|
light/.code=\@metropolis@colors@light,
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{\@metropolis@color@setdefaults}
|
||||||
|
% Set default values for color theme options.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\newcommand{\@metropolis@color@setdefaults}{
|
||||||
|
\pgfkeys{/metropolis/color/.cd,
|
||||||
|
background=light,
|
||||||
|
block=transparent,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% \subsubsection{Base colors}
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\definecolor{mDarkBrown}{HTML}{604c38}
|
\definecolor{mDarkBrown}{HTML}{604c38}
|
||||||
|
@ -63,23 +89,24 @@
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \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|.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\if@beamer@metropolis@darkcolors
|
\newcommand{\@metropolis@colors@dark}{
|
||||||
\setbeamercolor{normal text}{%
|
\setbeamercolor{normal text}{%
|
||||||
fg=black!2,
|
fg=black!2,
|
||||||
bg=mDarkTeal
|
bg=mDarkTeal
|
||||||
}
|
}
|
||||||
\else
|
}
|
||||||
|
\newcommand{\@metropolis@colors@light}{
|
||||||
\setbeamercolor{normal text}{%
|
\setbeamercolor{normal text}{%
|
||||||
fg=mDarkTeal,
|
fg=mDarkTeal,
|
||||||
bg=black!2
|
bg=black!2
|
||||||
}
|
}
|
||||||
\fi
|
}
|
||||||
\setbeamercolor{alerted text}{%
|
\setbeamercolor{alerted text}{%
|
||||||
fg=mLightBrown
|
fg=mLightBrown
|
||||||
}
|
}
|
||||||
|
@ -89,12 +116,8 @@
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
%
|
||||||
%
|
% \subsubsection{Derived colors}
|
||||||
%
|
|
||||||
% \subsection{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|
|
||||||
|
@ -130,9 +153,9 @@
|
||||||
%
|
%
|
||||||
% The \textsc{metropolis} inner or outer themes optionally display progress
|
% The \textsc{metropolis} inner or outer themes optionally display progress
|
||||||
% bars in various locations. Their color is set by |progress bar| but the two
|
% bars in various locations. Their color is set by |progress bar| but the two
|
||||||
% different kinds can be customized separately. The horizontal rule on the title
|
% different kinds can be customized separately. The horizontal rule on the
|
||||||
% page is also set based on the progress bar color and can be customized with
|
% title page is also set based on the progress bar color and can be customized
|
||||||
% |title separator|.
|
% with |title separator|.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\setbeamercolor{progress bar}{%
|
\setbeamercolor{progress bar}{%
|
||||||
|
@ -157,15 +180,16 @@
|
||||||
% Blocks
|
% Blocks
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\if@beamer@metropolis@blockbg
|
\newcommand{\@metropolis@block@transparent}{
|
||||||
|
\setbeamercolor{block title}{use=normal text, parent=normal text}
|
||||||
|
}
|
||||||
|
\newcommand{\@metropolis@block@fill}{
|
||||||
\setbeamercolor{block title}{%
|
\setbeamercolor{block title}{%
|
||||||
use=normal text,
|
use=normal text,
|
||||||
fg=normal text.fg,
|
fg=normal text.fg,
|
||||||
bg=normal text.bg!80!fg
|
bg=normal text.bg!80!fg
|
||||||
}
|
}
|
||||||
\else
|
}
|
||||||
\setbeamercolor{block title}{use=normal text, parent=normal text}
|
|
||||||
\fi
|
|
||||||
\setbeamercolor{block title alerted}{%
|
\setbeamercolor{block title alerted}{%
|
||||||
use={block title, alerted text},
|
use={block title, alerted text},
|
||||||
bg=block title.bg,
|
bg=block title.bg,
|
||||||
|
@ -189,10 +213,18 @@
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\setbeamercolor{footnote}{fg=normal text.fg!90}
|
\setbeamercolor{footnote}{fg=normal text.fg!90}
|
||||||
\setbeamercolor{footnote mark}{fg=.}
|
\setbeamercolor{footnote mark}{fg=.}
|
||||||
\mode<all>
|
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
|
% Process package options
|
||||||
%
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\@metropolis@color@setdefaults
|
||||||
|
\ProcessPgfPackageOptions{/metropolis/color}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\mode<all>
|
||||||
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%</package>
|
%</package>
|
||||||
|
|
|
@ -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}
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%<*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:
|
||||||
|
@ -40,14 +41,124 @@
|
||||||
% \item footnotes and plain text.
|
% \item footnotes and plain text.
|
||||||
% \end{itemize}
|
% \end{itemize}
|
||||||
%
|
%
|
||||||
% \subsection{Title page}
|
% Load required packages.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{calc}
|
||||||
|
\RequirePackage{pgfopts}
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \begin{macro}{title page}
|
|
||||||
%
|
%
|
||||||
% Template for the title page.
|
%
|
||||||
|
% \subsubsection{Options}
|
||||||
|
%
|
||||||
|
% \begin{macro}{block}
|
||||||
|
% This option controls the block style.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/inner/block/.cd,
|
||||||
|
.is choice,
|
||||||
|
transparent/.code=\setlength{\@metropolis@blockskip}{0ex},
|
||||||
|
fill/.code=\setlength{\@metropolis@blockskip}{1ex},
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \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}
|
||||||
|
% The |sectionpage| option defines the behaviour of the sectionpage.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/inner/sectionpage/.cd,
|
||||||
|
.is choice,
|
||||||
|
none/.code=\@metropolis@sectionpage@none,
|
||||||
|
progressbar/.code=\@metropolis@sectionpage@progressbar,
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{\@metropolis@inner@setdefaults}
|
||||||
|
% Set default values for inner theme options.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\newcommand{\@metropolis@inner@setdefaults}{
|
||||||
|
\pgfkeys{/metropolis/inner/.cd,
|
||||||
|
sectionpage=progressbar,
|
||||||
|
block=transparent,
|
||||||
|
titleformat=lowercase,
|
||||||
|
sectiontitleformat=lowercase,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% \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}
|
% \begin{macrocode}
|
||||||
\RequirePackage{tikz}
|
\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}
|
||||||
|
% Template for the title page.
|
||||||
|
% \begin{macrocode}
|
||||||
\setbeamertemplate{title page}{
|
\setbeamertemplate{title page}{
|
||||||
\begin{minipage}[b][\paperheight]{\textwidth}
|
\begin{minipage}[b][\paperheight]{\textwidth}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
|
@ -78,7 +189,7 @@
|
||||||
\linespread{1.0}%
|
\linespread{1.0}%
|
||||||
\usebeamerfont{title}%
|
\usebeamerfont{title}%
|
||||||
\usebeamercolor[fg]{title}%
|
\usebeamercolor[fg]{title}%
|
||||||
\mthemetitleformat{\inserttitle}%
|
\@metropolis@titleformat{\inserttitle}%
|
||||||
\par%
|
\par%
|
||||||
\vspace*{0.5em}
|
\vspace*{0.5em}
|
||||||
}}
|
}}
|
||||||
|
@ -177,14 +288,19 @@
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \subsection{Section page}
|
% \subsubsection{Section page}
|
||||||
%
|
%
|
||||||
% \begin{macro}{section page}
|
% \begin{macro}{section page}
|
||||||
%
|
%
|
||||||
% 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}
|
||||||
\setbeamertemplate{section page}{
|
\newcommand{\@metropolis@sectionpage@none}{
|
||||||
|
\AtBeginSection{
|
||||||
|
% intenionally empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\defbeamertemplate{section page}{progressbar}{
|
||||||
\vspace{2em}
|
\vspace{2em}
|
||||||
\centering
|
\centering
|
||||||
\begin{minipage}{22em}
|
\begin{minipage}{22em}
|
||||||
|
@ -195,7 +311,8 @@
|
||||||
\end{minipage}
|
\end{minipage}
|
||||||
\par
|
\par
|
||||||
}
|
}
|
||||||
\if@noSectionSlide\else%
|
\newcommand{\@metropolis@sectionpage@progressbar}{
|
||||||
|
\setbeamertemplate{section page}[progressbar]
|
||||||
\AtBeginSection{
|
\AtBeginSection{
|
||||||
\ifbeamer@inframe
|
\ifbeamer@inframe
|
||||||
\sectionpage
|
\sectionpage
|
||||||
|
@ -203,7 +320,7 @@
|
||||||
\frame[plain,c]{\sectionpage}
|
\frame[plain,c]{\sectionpage}
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
\fi
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
%
|
%
|
||||||
|
@ -214,7 +331,6 @@
|
||||||
% |progress bar in head/foot|.
|
% |progress bar in head/foot|.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\RequirePackage{calc}
|
|
||||||
\newlength{\metropolis@progressonsectionpage}
|
\newlength{\metropolis@progressonsectionpage}
|
||||||
\setbeamertemplate{progress bar in section page}{
|
\setbeamertemplate{progress bar in section page}{
|
||||||
\setlength{\metropolis@progressonsectionpage}{%
|
\setlength{\metropolis@progressonsectionpage}{%
|
||||||
|
@ -244,30 +360,27 @@
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \subsection{Block environments}
|
% \subsubsection{Block environments}
|
||||||
|
%
|
||||||
|
% Regular block environment
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newlength{\leftrightskip}
|
\newlength{\@metropolis@blockskip}
|
||||||
\if@beamer@metropolis@blockbg
|
|
||||||
\setlength{\leftrightskip}{1ex}
|
|
||||||
\else
|
|
||||||
\setlength{\leftrightskip}{0ex}
|
|
||||||
\fi
|
|
||||||
\setbeamertemplate{block begin}{%
|
\setbeamertemplate{block begin}{%
|
||||||
\vspace*{1ex}
|
\vspace*{1ex}
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
ht=2.4ex,
|
ht=2.4ex,
|
||||||
dp=1ex,
|
dp=1ex,
|
||||||
leftskip=\leftrightskip,
|
leftskip=\@metropolis@blockskip,
|
||||||
rightskip=\leftrightskip]{block title}
|
rightskip=\@metropolis@blockskip]{block title}
|
||||||
\usebeamerfont*{block title}\insertblocktitle%
|
\usebeamerfont*{block title}\insertblocktitle%
|
||||||
\end{beamercolorbox}%
|
\end{beamercolorbox}%
|
||||||
\vspace*{-1pt}
|
\vspace*{-1pt}
|
||||||
\usebeamerfont{block body}%
|
\usebeamerfont{block body}%
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
dp=1ex,
|
dp=1ex,
|
||||||
leftskip=\leftrightskip,
|
leftskip=\@metropolis@blockskip,
|
||||||
rightskip=\leftrightskip,
|
rightskip=\@metropolis@blockskip,
|
||||||
vmode]{block body}%
|
vmode]{block body}%
|
||||||
}
|
}
|
||||||
\setbeamertemplate{block end}{%
|
\setbeamertemplate{block end}{%
|
||||||
|
@ -284,16 +397,16 @@
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
ht=2.4ex,
|
ht=2.4ex,
|
||||||
dp=1ex,
|
dp=1ex,
|
||||||
leftskip=\leftrightskip,
|
leftskip=\@metropolis@blockskip,
|
||||||
rightskip=\leftrightskip]{block title alerted}
|
rightskip=\@metropolis@blockskip]{block title alerted}
|
||||||
\usebeamerfont*{block title alerted}\insertblocktitle%
|
\usebeamerfont*{block title alerted}\insertblocktitle%
|
||||||
\end{beamercolorbox}%
|
\end{beamercolorbox}%
|
||||||
\vspace*{-1pt}
|
\vspace*{-1pt}
|
||||||
\usebeamerfont{block body alerted}%
|
\usebeamerfont{block body alerted}%
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
dp=1ex,
|
dp=1ex,
|
||||||
leftskip=\leftrightskip,
|
leftskip=\@metropolis@blockskip,
|
||||||
rightskip=\leftrightskip,
|
rightskip=\@metropolis@blockskip,
|
||||||
vmode]{block body}%
|
vmode]{block body}%
|
||||||
}
|
}
|
||||||
\setbeamertemplate{block alerted end}{%
|
\setbeamertemplate{block alerted end}{%
|
||||||
|
@ -310,16 +423,16 @@
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
ht=2.4ex,
|
ht=2.4ex,
|
||||||
dp=1ex,
|
dp=1ex,
|
||||||
leftskip=\leftrightskip,
|
leftskip=\@metropolis@blockskip,
|
||||||
rightskip=\leftrightskip]{block title example}
|
rightskip=\@metropolis@blockskip]{block title example}
|
||||||
\usebeamerfont*{block title example}\insertblocktitle%
|
\usebeamerfont*{block title example}\insertblocktitle%
|
||||||
\end{beamercolorbox}%
|
\end{beamercolorbox}%
|
||||||
\vspace*{-1pt}
|
\vspace*{-1pt}
|
||||||
\usebeamerfont{block body example}%
|
\usebeamerfont{block body example}%
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
dp=1ex,
|
dp=1ex,
|
||||||
leftskip=\leftrightskip,
|
leftskip=\@metropolis@blockskip,
|
||||||
rightskip=\leftrightskip,
|
rightskip=\@metropolis@blockskip,
|
||||||
vmode]{block body}%
|
vmode]{block body}%
|
||||||
}
|
}
|
||||||
\setbeamertemplate{block example end}{%
|
\setbeamertemplate{block example end}{%
|
||||||
|
@ -330,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}
|
||||||
|
@ -340,13 +453,17 @@
|
||||||
\setbeamertemplate{itemize subsubitem}{\textbullet}
|
\setbeamertemplate{itemize subsubitem}{\textbullet}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \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]
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \subsection{Footnotes}
|
%
|
||||||
|
%
|
||||||
|
% \subsubsection{Footnotes}
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\setbeamertemplate{footnote}{%
|
\setbeamertemplate{footnote}{%
|
||||||
\parindent 0em\noindent%
|
\parindent 0em\noindent%
|
||||||
|
@ -355,14 +472,21 @@
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \subsection{General text}
|
%
|
||||||
|
%
|
||||||
|
% \subsubsection{General text settings}
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\mode<all>
|
\mode<all>
|
||||||
\setlength{\parskip}{0.5em}
|
\setlength{\parskip}{0.5em}
|
||||||
\linespread{1.15}
|
\linespread{1.15}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
|
% Process package options
|
||||||
%
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\@metropolis@inner@setdefaults
|
||||||
|
\ProcessPgfPackageOptions{/metropolis/inner}
|
||||||
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%</package>
|
%</package>
|
||||||
|
|
|
@ -27,21 +27,93 @@
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%<*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.
|
||||||
%
|
|
||||||
% This customization will be removed in a future version.
|
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\def\mthemetitleformat{\scshape\MakeLowercase}
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{calc}
|
||||||
|
\RequirePackage{pgfopts}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \subsection{Head and footline}
|
%
|
||||||
|
% \subsubsection{Options}
|
||||||
|
%
|
||||||
|
% \begin{macro}{numbering}
|
||||||
|
% This option controls the page numbering.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/outer/numbering/.cd,
|
||||||
|
.is choice,
|
||||||
|
none/.code=\setbeamertemplate{frame numbering}[none],
|
||||||
|
counter/.code=\setbeamertemplate{frame numbering}[counter],
|
||||||
|
fraction/.code=\setbeamertemplate{frame numbering}[fraction],
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{progressbar}
|
||||||
|
% This option controls the progressbar.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/outer/progressbar/.cd,
|
||||||
|
.is choice,
|
||||||
|
none/.code=\setbeamertemplate{frametitle}[plain],
|
||||||
|
frametitle/.code=\setbeamertemplate{frametitle}[progressbar],
|
||||||
|
}
|
||||||
|
% \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{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{frametitleoffset}
|
||||||
|
% This option controls the frame title offset.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\pgfkeys{
|
||||||
|
/metropolis/outer/.cd,
|
||||||
|
frametitleoffset/.code=\setlength{\@metropolis@voffset}{#1},
|
||||||
|
noframetitleoffset/.code=\setlength{\@metropolis@voffset}{0em},
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% \begin{macro}{\@metropolis@outer@setdefaults}
|
||||||
|
% Set default values for outer theme options.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\newcommand{\@metropolis@outer@setdefaults}{
|
||||||
|
\pgfkeys{/metropolis/outer/.cd,
|
||||||
|
numbering=counter,
|
||||||
|
progressbar=none,
|
||||||
|
frametitleformat=lowercase,
|
||||||
|
frametitleoffset=2em,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
% \end{macrocode}%
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% \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).
|
||||||
|
@ -50,8 +122,28 @@
|
||||||
\setbeamertemplate{navigation symbols}{}
|
\setbeamertemplate{navigation symbols}{}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% The only element in the footline by default is the frame number. It can
|
% Template for the frame number. Can be omitted, shown or displayed as a
|
||||||
% optionally be omitted or displayed as a fraction of the total frames.
|
% fraction of the total frames.
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\defbeamertemplate{frame numbering}{none}{
|
||||||
|
% intentionally empty
|
||||||
|
}
|
||||||
|
\defbeamertemplate{frame numbering}{counter}{
|
||||||
|
\insertframenumber
|
||||||
|
}
|
||||||
|
\defbeamertemplate{frame numbering}{fraction}{
|
||||||
|
\insertframenumber/\inserttotalframenumber
|
||||||
|
}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% Define additional space between frame title and content. By default 2em.
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\newlength{\@metropolis@voffset}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% The only element in the footline by default is the frame number.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\setbeamertemplate{footline}{%
|
\setbeamertemplate{footline}{%
|
||||||
|
@ -62,31 +154,52 @@
|
||||||
leftskip=0.3cm,
|
leftskip=0.3cm,
|
||||||
rightskip=0.3cm
|
rightskip=0.3cm
|
||||||
]{footline}%
|
]{footline}%
|
||||||
\hfill\usebeamerfont{page number in head/foot}%
|
\hfill\usebeamerfont{page number in head/foot}%
|
||||||
\if@noSlideNumbers%
|
\usebeamertemplate*{frame numbering}
|
||||||
%Purposefully left blank to display no slide number.%
|
|
||||||
\else%
|
|
||||||
\if@useTotalSlideIndicator%
|
|
||||||
\insertframenumber/\inserttotalframenumber%
|
|
||||||
\else%
|
|
||||||
\insertframenumber%
|
|
||||||
\fi%
|
|
||||||
\fi%
|
|
||||||
\end{beamercolorbox}%
|
\end{beamercolorbox}%
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
% \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
|
% Templates for the frame title, which is optionally underlined with a
|
||||||
% progress bar.
|
% progress bar.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\setbeamertemplate{frametitle}{%
|
\defbeamertemplate{frametitle}{plain}{%
|
||||||
\nointerlineskip
|
\nointerlineskip
|
||||||
\begin{beamercolorbox}[%
|
\begin{beamercolorbox}[%
|
||||||
wd=\paperwidth,
|
wd=\paperwidth,
|
||||||
|
@ -97,29 +210,42 @@
|
||||||
]{frametitle}
|
]{frametitle}
|
||||||
\insertframetitle%
|
\insertframetitle%
|
||||||
\end{beamercolorbox}%
|
\end{beamercolorbox}%
|
||||||
\if@useTitleProgressBar
|
\vspace{\@metropolis@voffset}
|
||||||
\nointerlineskip
|
}
|
||||||
\usebeamertemplate*{progress bar in head/foot}
|
\defbeamertemplate{frametitle}{progressbar}{%
|
||||||
\fi
|
\nointerlineskip
|
||||||
\vspace{\@mtheme@voffset}
|
\begin{beamercolorbox}[%
|
||||||
|
wd=\paperwidth,
|
||||||
|
leftskip=0.3cm,
|
||||||
|
rightskip=0.3cm,
|
||||||
|
ht=2.5ex,
|
||||||
|
dp=1.5ex
|
||||||
|
]{frametitle}
|
||||||
|
\insertframetitle%
|
||||||
|
\end{beamercolorbox}%
|
||||||
|
\usebeamertemplate*{progress bar in head/foot}
|
||||||
|
\vspace{\@metropolis@voffset}
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
%
|
%
|
||||||
% \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}
|
||||||
\RequirePackage{calc}
|
|
||||||
\newlength{\metropolis@progressinheadfoot}
|
\newlength{\metropolis@progressinheadfoot}
|
||||||
\setbeamertemplate{progress bar in head/foot}{
|
\setbeamertemplate{progress bar in head/foot}{
|
||||||
|
\nointerlineskip
|
||||||
\setlength{\metropolis@progressinheadfoot}{%
|
\setlength{\metropolis@progressinheadfoot}{%
|
||||||
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
||||||
}%
|
}%
|
||||||
\begin{beamercolorbox}[wd=\paperwidth,ht=0.4pt,dp=0pt]{progress bar in head/foot}
|
\begin{beamercolorbox}[
|
||||||
|
wd=\paperwidth,
|
||||||
|
ht=0.4pt,
|
||||||
|
dp=0pt]{progress bar in head/foot}
|
||||||
\begin{tikzpicture}
|
\begin{tikzpicture}
|
||||||
\draw[bg, fill=bg] (0,0) rectangle (\paperwidth, 0.4pt);
|
\draw[bg, fill=bg] (0,0) rectangle (\paperwidth, 0.4pt);
|
||||||
\draw[fg, fill=fg] (0,0) rectangle (\metropolis@progressinheadfoot, 0.4pt);
|
\draw[fg, fill=fg] (0,0) rectangle (\metropolis@progressinheadfoot, 0.4pt);
|
||||||
|
@ -129,7 +255,12 @@
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
%
|
%
|
||||||
|
% Process package options
|
||||||
%
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\@metropolis@outer@setdefaults
|
||||||
|
\ProcessPgfPackageOptions{/metropolis/outer}
|
||||||
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%</package>
|
%</package>
|
||||||
|
|
208
beamerthemem.dtx
208
beamerthemem.dtx
|
@ -27,91 +27,109 @@
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%<*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
|
||||||
% provides some custom commands and environments for the user.
|
% provides some custom commands and environments for the user.
|
||||||
%
|
%
|
||||||
|
% Load the required packages.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{pgfopts}
|
||||||
|
\RequirePackage{ifxetex}
|
||||||
|
\RequirePackage{ifluatex}
|
||||||
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% Options
|
% \subsubsection{Options}
|
||||||
|
%
|
||||||
|
% \begin{macro}{\metroset}
|
||||||
|
% First of all we define a macro for the user to set options.
|
||||||
|
% \begin{macrocode}
|
||||||
|
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
|
||||||
|
% \end{macrocode}
|
||||||
|
% \end{macro}
|
||||||
|
%
|
||||||
|
% Then we need to pass the unknown options to the sub-packages.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newif\if@useTitleProgressBar
|
\pgfkeys{/metropolis/.cd,
|
||||||
\@useTitleProgressBarfalse
|
.search also={
|
||||||
\DeclareOptionBeamer{usetitleprogressbar}{
|
/metropolis/inner,
|
||||||
\@useTitleProgressBartrue
|
/metropolis/outer,
|
||||||
|
/metropolis/color,
|
||||||
|
},
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
|
% We have to forwarded keys that affect multiple sub-packages manually.
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
block/.code=\pgfkeysalso{
|
||||||
|
inner/block=#1,
|
||||||
|
color/block=#1,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% usetotalslideindicator
|
% \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
|
||||||
|
% deprecated option names as aliases to the corresponding |key=value| options.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newif\if@useTotalSlideIndicator
|
\pgfkeys{/metropolis/.cd,
|
||||||
\@useTotalSlideIndicatorfalse
|
usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle},
|
||||||
\DeclareOptionBeamer{usetotalslideindicator}{
|
noslidenumbers/.code=\pgfkeysalso{outer/numbering=none},
|
||||||
\@useTotalSlideIndicatortrue
|
usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction},
|
||||||
|
nosectionslide/.code=\pgfkeysalso{inner/sectionpage=none},
|
||||||
|
darkcolors/.code=\pgfkeysalso{color/background=dark},
|
||||||
|
blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill},
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% noslidenumbers
|
% Set default values for options.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newif\if@noSlideNumbers
|
\newcommand{\@metropolis@setdefaults}{
|
||||||
\@noSlideNumbersfalse
|
\pgfkeys{/metropolis/.cd,
|
||||||
\DeclareOptionBeamer{noslidenumbers}{
|
plaintitleformat=lowercase,
|
||||||
\@noSlideNumberstrue
|
}
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% nosectionslide
|
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
|
||||||
\newif\if@noSectionSlide
|
|
||||||
\@noSectionSlidefalse
|
|
||||||
\DeclareOptionBeamer{nosectionslide}{
|
|
||||||
\@noSectionSlidetrue
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
%
|
||||||
% nooffset
|
% \subsubsection{Component sub-packages}
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
|
||||||
\newlength{\@mtheme@voffset}
|
|
||||||
\setlength{\@mtheme@voffset}{2em}
|
|
||||||
\DeclareOptionBeamer{nooffset}{
|
|
||||||
\setlength{\@mtheme@voffset}{0em}
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
|
||||||
% blockbg
|
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
|
||||||
\newif\if@beamer@metropolis@blockbg
|
|
||||||
\@beamer@metropolis@blockbgfalse
|
|
||||||
\DeclareOptionBeamer{blockbg}{
|
|
||||||
\@beamer@metropolis@blockbgtrue
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
|
||||||
% darkcolors
|
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
|
||||||
\DeclareOptionBeamer{darkcolors}{
|
|
||||||
\PassOptionsToPackage{darkcolors}{beamercolorthememetropolis}%
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
|
||||||
% Unknown option error handling
|
|
||||||
%
|
|
||||||
% \begin{macrocode}
|
|
||||||
\DeclareOptionBeamer*{
|
|
||||||
\PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}%
|
|
||||||
}
|
|
||||||
\ProcessOptionsBeamer
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
|
||||||
% \subsection{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.
|
||||||
|
@ -125,8 +143,6 @@
|
||||||
% document is being processed by Xe\LaTeX{} or Lua\LaTeX{}.
|
% document is being processed by Xe\LaTeX{} or Lua\LaTeX{}.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\RequirePackage{etoolbox}
|
|
||||||
\RequirePackage{ifxetex,ifluatex}
|
|
||||||
\ifboolexpr{bool {xetex} or bool {luatex}}{
|
\ifboolexpr{bool {xetex} or bool {luatex}}{
|
||||||
\usefonttheme{metropolis}
|
\usefonttheme{metropolis}
|
||||||
}{
|
}{
|
||||||
|
@ -146,56 +162,18 @@
|
||||||
}
|
}
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \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}{\mthemetitleformat}
|
% \begin{macro}{\@metropolis@plaintitleformat}
|
||||||
% \begin{macro}{\mthemesectiontitleformat}
|
% Define a hook to change the case format of the plain title.
|
||||||
% \begin{macro}{\mthemeframetitleformat}
|
|
||||||
% \begin{macro}{\mthemeplaintitleformat}
|
|
||||||
% Creates hooks to change the case format of the four different titles.
|
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\def\mthemetitleformat#1{\MakeLowercase{#1}}
|
\def\@metropolis@plaintitleformat#1{#1}
|
||||||
\def\mthemesectiontitleformat#1{\mthemetitleformat{#1}}
|
|
||||||
\def\mthemeframetitleformat#1{\mthemetitleformat{#1}}
|
|
||||||
\def\mthemeplaintitleformat#1{\mthemetitleformat{#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{\mthemesectiontitleformat{#2}}}
|
|
||||||
{}{}
|
|
||||||
\patchcmd{\beamer@section}
|
|
||||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
|
||||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{\mthemesectiontitleformat{#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{{\mthemeframetitleformat{#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}
|
||||||
|
@ -204,14 +182,17 @@
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newcommand{\plain}[2][]{%
|
\newcommand{\plain}[2][]{%
|
||||||
\begingroup
|
\begingroup
|
||||||
\setbeamercolor{background canvas}{use=palette primary,parent=palette primary}
|
\setbeamercolor{background canvas}{
|
||||||
|
use=palette primary,
|
||||||
|
parent=palette primary
|
||||||
|
}
|
||||||
\begin{frame}{#1}
|
\begin{frame}{#1}
|
||||||
\centering
|
\centering
|
||||||
\vfill
|
\vfill
|
||||||
\vspace{1em}
|
\vspace{1em}
|
||||||
\usebeamercolor[fg]{palette primary}
|
\usebeamercolor[fg]{palette primary}
|
||||||
\usebeamerfont{section title}
|
\usebeamerfont{section title}
|
||||||
\mthemeplaintitleformat{#2}
|
\@metropolis@plaintitleformat{#2}
|
||||||
\vfill
|
\vfill
|
||||||
\end{frame}
|
\end{frame}
|
||||||
\endgroup
|
\endgroup
|
||||||
|
@ -225,6 +206,13 @@
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
% \end{macro}
|
% \end{macro}
|
||||||
%
|
%
|
||||||
|
% Process package options
|
||||||
|
%
|
||||||
|
% \begin{macrocode}
|
||||||
|
\@metropolis@setdefaults
|
||||||
|
\ProcessPgfOptions{/metropolis}
|
||||||
|
% \end{macrocode}
|
||||||
|
%
|
||||||
% \iffalse
|
% \iffalse
|
||||||
%</package>
|
%</package>
|
||||||
% \fi
|
% \fi
|
||||||
|
|
177
mtheme.dtx
177
mtheme.dtx
|
@ -13,7 +13,7 @@
|
||||||
\documentclass{ltxdoc}
|
\documentclass{ltxdoc}
|
||||||
%\OnlyDescription
|
%\OnlyDescription
|
||||||
|
|
||||||
\usepackage[parfill]{parskip}
|
\usepackage{parskip}
|
||||||
\usepackage{setspace}
|
\usepackage{setspace}
|
||||||
\onehalfspacing
|
\onehalfspacing
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
xrightmargin=0em,
|
xrightmargin=0em,
|
||||||
aboveskip=1em,
|
aboveskip=1em,
|
||||||
belowskip=1em,
|
belowskip=1em,
|
||||||
morekeywords={usetheme,institute,maketitle,mthemetitleformat,plain,setbeamercolor},
|
morekeywords={usetheme,institute,maketitle,@metropolis@titleformat,plain,setbeamercolor,metropolisset},
|
||||||
}
|
}
|
||||||
\lstMakeShortInline|
|
\lstMakeShortInline|
|
||||||
|
|
||||||
|
@ -72,6 +72,16 @@
|
||||||
pagecolor=mLightBrown,
|
pagecolor=mLightBrown,
|
||||||
urlcolor=mLightBrown]{hyperref}
|
urlcolor=mLightBrown]{hyperref}
|
||||||
|
|
||||||
|
\newcommand{\DescribeOption}[4]{
|
||||||
|
\DescribeMacro{#1}
|
||||||
|
\begin{minipage}[t]{\textwidth}
|
||||||
|
\textit{\textbf{\textcolor{mLightGreen}{#2}}}\dotfill\,#3\par
|
||||||
|
\begingroup
|
||||||
|
\leftskip2em #4\par
|
||||||
|
\endgroup
|
||||||
|
\end{minipage}
|
||||||
|
}
|
||||||
|
|
||||||
\GetFileInfo{beamerthemem.dtx}
|
\GetFileInfo{beamerthemem.dtx}
|
||||||
\title{Modern Beamer Presentations\\with the\\\textsc{mtheme} package}
|
\title{Modern Beamer Presentations\\with the\\\textsc{mtheme} package}
|
||||||
\author{Matthias Vogelgesang \\ \url{matthias.vogelgesang@gmail.com}}
|
\author{Matthias Vogelgesang \\ \url{matthias.vogelgesang@gmail.com}}
|
||||||
|
@ -82,21 +92,21 @@
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\section{Introduction}
|
\section{Introduction}
|
||||||
Beamer is an awesome way to make presentations with LaTeX. But the stock themes
|
Beamer is an awesome way to make presentations with LaTeX. But the stock
|
||||||
do not necessarily look particularly nice and the custom themes often scream
|
themes do not necessarily look particularly nice and the custom themes often
|
||||||
“Beamer” at first sight. The goal of \textsc{mtheme} is to provide a modern
|
scream “Beamer” at first sight. The goal of \textsc{mtheme} is to provide a
|
||||||
Beamer theme with minimal visual noise. It provides section slides with a neat
|
modern Beamer theme with minimal visual noise. It provides section slides with
|
||||||
progress bar and It is intended to be used with
|
a neat progress bar and it is intended to be used with
|
||||||
\href{https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/}{Fira
|
\href{https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/}
|
||||||
Sans}, a gorgeous typeface commissioned by Mozilla and designed by
|
{Fira Sans}, a gorgeous typeface commissioned by Mozilla and designed by
|
||||||
\href{http://www.carrois.com/fira-3-1/}{Carrois}. Hence to get the best results
|
\href{http://www.carrois.com/fira-3-1/}{Carrois}. Hence to get the best results
|
||||||
you should have installed the Fira typeface and use XeTeX to typeset your
|
you should have installed the Fira typeface and use XeTeX to typeset your
|
||||||
slides. Nevertheless this is no hard dependency. The theme also works fine with
|
slides. Nevertheless this is no hard dependency. The theme also works fine with
|
||||||
pdfTeX and the Computer Modern typeface.
|
pdfTeX and the Computer Modern typeface.
|
||||||
|
|
||||||
The codebase is maintained on \href{https://github.com/matze/mtheme}{GitHub}. So
|
The codebase is maintained on \href{https://github.com/matze/mtheme}{GitHub}.
|
||||||
if you have issues, find mistakes in the manual or want to contribute – to make
|
So if you have issues, find mistakes in the manual or want to contribute – to
|
||||||
the theme even better – get in touch there.
|
make the theme even better – get in touch there.
|
||||||
|
|
||||||
|
|
||||||
\section{Getting Started}
|
\section{Getting Started}
|
||||||
|
@ -120,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}
|
||||||
|
@ -182,45 +194,98 @@ minimal example of a Beamer presentation using the \textsc{mtheme}.
|
||||||
|
|
||||||
\section{Customization}
|
\section{Customization}
|
||||||
\subsection{Package options}
|
\subsection{Package options}
|
||||||
The theme provides a number of options. To use any of the options below, call
|
The theme provides a number of options. The options use a key=value interface.
|
||||||
them when invoking \textsc{mtheme} in the preamble of the slides, i.e.
|
So every option is controlled by a key its value. To use an option you can
|
||||||
\begin{lstlisting}[numbers=none]
|
either provide a comma separated list of options when invoking
|
||||||
\usetheme[<options>]{m}
|
\textsc{mtheme} in the preamble of the presentation.
|
||||||
|
\begin{lstlisting}
|
||||||
|
\usetheme[<key=value list>]{m}
|
||||||
\end{lstlisting}
|
\end{lstlisting}
|
||||||
|
Or you can set them at any time with the |\metropolisset| macro.
|
||||||
|
\begin{lstlisting}
|
||||||
|
\metropolisset[<key=value list>]
|
||||||
|
\end{lstlisting}
|
||||||
|
To set an option on a specific sub-package only you have to add the
|
||||||
|
corresponding prefix (inner, outer, color), e.g.
|
||||||
|
\begin{lstlisting}
|
||||||
|
\metropolisset[inner/block=fill]
|
||||||
|
\end{lstlisting}
|
||||||
|
The list of options is structured as shown in the following example.
|
||||||
|
|
||||||
\noindent\DescribeMacro{usetitleprogressbar}
|
\DescribeOption{key}{list of possible values}{default value}{
|
||||||
Adds a thin progress bar similar to the section progress bar underneath each
|
A short description of the option.
|
||||||
frame title.\\
|
}
|
||||||
|
|
||||||
\noindent\DescribeMacro{blockbg}
|
Although the options are grouped into the corresponding packages every option
|
||||||
Adds background color to the blocks similar to other beamer themes.\\
|
can and in most cases should be set on the main theme directly. If an option
|
||||||
|
is listed in multiple sub-packages, setting it on the main theme will set the
|
||||||
|
option on every sub-package accordingly.
|
||||||
|
|
||||||
\noindent\DescribeMacro{nooffset}
|
\subsubsection{Main theme}
|
||||||
By default, the \textsc{mtheme} adds |\vspace{2em}| after the frametitle to
|
\DescribeOption{everytitleformat}{regular, lowercase, uppercase}{lowercase}{
|
||||||
center content vertically on the frame. This option removes this additional
|
Shortcut option to change the case style of all titles together.
|
||||||
space in order to get more content per slide.\\
|
}
|
||||||
|
|
||||||
\noindent\DescribeMacro{nosectionslide}
|
\DescribeOption{plainformat}{regular, lowercase, uppercase}{lowercase}{
|
||||||
By default when using the |\section| command, a slide is created with just the
|
Control the case style of the plain title.
|
||||||
title and the progress bar on it. This option prevents the creation of these
|
}
|
||||||
additional slides.\\
|
|
||||||
|
|
||||||
\noindent\DescribeMacro{usetotalslideindicator}
|
\subsubsection{Inner theme}
|
||||||
By default, only the current page number is printed in the lower right corner.
|
\DescribeOption{block}{transparent, fill}{transparent}{
|
||||||
This option changes the slide numbering format to |#current/#total|.\\
|
This option controls the block background. It can either be filled with a
|
||||||
|
light grey or be transparent.
|
||||||
|
}
|
||||||
|
|
||||||
\noindent\DescribeMacro{noslidenumbers}
|
\DescribeOption{sectionpage}{none, progressbar}{progressbar}{
|
||||||
Omits slide numbers entirely.\\
|
Adds a thin progress bar similar to the section progress bar underneath each frame title.
|
||||||
|
}
|
||||||
|
|
||||||
\noindent\DescribeMacro{darkcolors}
|
\DescribeOption{titleformat}{regular, lowercase, uppercase}{lowercase}{
|
||||||
Makes the background dark and the foreground light.\\
|
Control the case style of the title.
|
||||||
|
}
|
||||||
|
|
||||||
|
\DescribeOption{sectiontitleformat}{regular, lowercase, uppercase}{lowercase}{
|
||||||
|
Control the case style of the section title.
|
||||||
|
}
|
||||||
|
|
||||||
|
\subsubsection{Outer theme}
|
||||||
|
\DescribeOption{numbering}{none, counter, fraction}{counter}{
|
||||||
|
In the bottom right corner of each frame the current frame number is
|
||||||
|
displayed. This can be disabled or the total framenumber can be added
|
||||||
|
additionally.
|
||||||
|
}
|
||||||
|
|
||||||
|
\DescribeOption{progressbar}{none, frametitle}{none}{
|
||||||
|
Setting this option to frametitle adds a progress bar underneath each frame
|
||||||
|
title similar to the section progress bar.
|
||||||
|
}
|
||||||
|
|
||||||
|
\DescribeOption{frametitleformat}{regular, lowercase, uppercase}{lowercase}{
|
||||||
|
Control the case style of the frame title.
|
||||||
|
}
|
||||||
|
|
||||||
|
\DescribeOption{frametitleoffset\\noframetitleoffset}{<dimension>}{2em}{
|
||||||
|
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
|
||||||
|
the short option |noframetitleoffset| is defined.
|
||||||
|
}
|
||||||
|
|
||||||
|
\subsubsection{Color theme}
|
||||||
|
\DescribeOption{block}{transparent, fill}{transparent}{
|
||||||
|
This option controls the block background. It can either be filled with a
|
||||||
|
light grey or be transparent.
|
||||||
|
}
|
||||||
|
|
||||||
|
\DescribeOption{background}{dark, light}{light}{
|
||||||
|
This option defines whether the background shall be dark and the foreground
|
||||||
|
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)
|
||||||
|
@ -228,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 |\mthemetitleformat|. 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{\mthemetitleformat}{}
|
\setbeamercolor{title separator}{ ... }
|
||||||
% lowercase
|
\setbeamercolor{progress bar in head/foot}{ ... }
|
||||||
\renewcommand{\mthemetitleformat}\MakeLowercase}
|
\setbeamercolor{progress bar in section page}{ ... }
|
||||||
% uppercase
|
|
||||||
\renewcommand{\mthemetitleformat}{\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
|
||||||
|
|
BIN
mtheme.pdf
BIN
mtheme.pdf
Binary file not shown.
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue