feat!: rename theme to moloch

This commit is contained in:
Johan Larsson 2024-01-09 15:08:17 +01:00
parent 2fa6084b9d
commit c7c32a2a61
14 changed files with 306 additions and 334 deletions

2
.gitignore vendored
View File

@ -39,5 +39,5 @@
# Output
*.sty
doc/metropolistheme.pdf
doc/molochtheme.pdf
demo/demo.pdf

View File

@ -1,17 +1,17 @@
MAKEFLAGS := -j 1
INS = source/beamerthememetropolis.ins
INS = source/beamerthememoloch.ins
PACKAGE_SRC = $(wildcard source/*.dtx)
PACKAGE_STY = $(notdir $(PACKAGE_SRC:%.dtx=%.sty))
DEMO_SRC = demo/demo.tex demo/demo.bib
DEMO_PDF = demo/demo.pdf
DOC_SRC = doc/metropolistheme.dtx
DOC_PDF = doc/metropolistheme.pdf
DOC_SRC = doc/molochtheme.dtx
DOC_PDF = doc/molochtheme.pdf
CTAN_CONTENT = README.md $(INS) $(PACKAGE_SRC) $(DOC_SRC) $(DOC_PDF) $(DEMO_SRC) $(DEMO_PDF)
DESTDIR ?= $(shell kpsewhich -var-value=TEXMFHOME)
INSTALL_DIR = $(DESTDIR)/tex/latex/metropolis
DOC_DIR = $(DESTDIR)/doc/latex/metropolis
INSTALL_DIR = $(DESTDIR)/tex/latex/moloch
DOC_DIR = $(DESTDIR)/doc/latex/moloch
CACHE_DIR := $(shell pwd)/.latex-cache
COMPILE_TEX := latexmk -xelatex -output-directory=$(CACHE_DIR)
@ -51,7 +51,7 @@ clean-sty:
@rm -f $(PACKAGE_STY)
ctan: $(CTAN_CONTENT) ctan-version
@tar --transform "s@\(.*\)@metropolis/\1@" -cf metropolis-$(shell date "+%Y-%m-%d").tar.gz $(CTAN_CONTENT)
@tar --transform "s@\(.*\)@moloch/\1@" -cf moloch-$(shell date "+%Y-%m-%d").tar.gz $(CTAN_CONTENT)
ctan-version:
@sed -i 's@20[0-9][0-9]/[0-9]*/[0-9]*@$(shell date "+%Y/%m/%d")@' $(PACKAGE_SRC)

4
NEWS
View File

@ -1,4 +1,4 @@
Overview of changes in Metropolis 1.2
Overview of changes in Moloch 1.2
=====================================
* New features:
@ -16,7 +16,7 @@ Overview of changes in Metropolis 1.2
- Fixed #206, #214, #216
Overview of changes in Metropolis 1.1
Overview of changes in Moloch 1.1
=====================================
* New features:

View File

@ -1,56 +1,39 @@
## Metropolis
## Moloch
Moloch is a simple Beamer theme suitable for anyone to use. It is
a fork of the [Moloch Theme](https://github.com/matze/mtheme).
I created the fork mainly to fix some outstanding issues
to Moloch, since the theme is no longer actively maintained.
I also wanted to simplify some of the code, for instance no longer hard-code
the use of the Fira Sans font and introduce subtitles for frames.
**IMPORTANT NOTICES FOR VERSION 1.0**
* The package and theme name changed from *m* to *metropolis*!
* The `title format` values have been restructured. Please refer to the
[manual][].
---
Metropolis is a simple, modern Beamer theme suitable for anyone to use. It tries
to minimize noise and maximize space for content; the only visual flourish it
offers is an (optional) progress bar added to each slide. The core design
principles of the theme were described in a blog post
[here](http://bloerg.net/2014/09/20/a-modern-beamer-theme.html).
Not convinced? Have a look at the [demo slides][].
Have a look at the [demo slides][] to see how the theme looks.
![Sample](http://i.imgur.com/Bxu52fz.png)
## Installation
To install a stable version of this theme, please refer to update instructions
of your TeX distribution. Metropolis is on [CTAN][] since December
2014 thus it is part of MikTeX and will be part of TeX Live 2016.
Installing Metropolis from source, like any Beamer theme, involves four easy
Installing Moloch from source, like any Beamer theme, involves four easy
steps:
1. **Download the source** with a `git clone` of the [Metropolis repository](https://github.com/matze/mtheme)
or as a [zip archive](https://github.com/matze/mtheme/archive/master.zip) of
the latest development version.
1. **Download the source** with a `git clone` of the [repository](https://github.com/jolars/moloch).
2. **Compile the style files** by running `make sty` inside the downloaded
directory. (Or run LaTeX directly on `source/metropolistheme.ins`.)
directory. (Or run LaTeX directly on `source/molochtheme.ins`.)
3. **Move the resulting `*.sty` files** to the folder containing your
presentation. To use Metropolis with many presentations, run `make install`
presentation. To use Moloch with many presentations, run `make install`
or move the `*.sty` files to a folder in your TeX path instead (might require
`sudo` rights).
4. **Use the theme for your presentation** by declaring `\usetheme{metropolis}` in
the preamble of your Beamer document.
5. **For best results** install Mozilla's [Fira Sans](https://github.com/bBoxType/FiraSans).
4. **Use the theme for your presentation** by declaring `\usetheme{moloch}` in
the preamble of your Beamer document.
## Usage
The following code shows a minimal example of a Beamer presentation using
Metropolis.
Moloch.
```latex
\documentclass{beamer}
\usetheme{metropolis} % Use metropolis theme
\usetheme{moloch}
\title{A minimal example}
\date{\today}
\author{Matthias Vogelgesang}
@ -64,21 +47,10 @@ Metropolis.
\end{document}
```
Detailed information on using Metropolis can be found in the [manual][].
For an alternative dark color theme, please have a look at Ross Churchley's
excellent [owl](https://github.com/rchurchley/beamercolortheme-owl) theme.
## License
The theme itself is licensed under a [Creative Commons Attribution-ShareAlike
4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/). This
means that if you change the theme and re-distribute it, you *must* retain the
means that if you change the theme and re-distribute it, you _must_ retain the
copyright notice header and license it under the same CC-BY-SA license. This
does not affect the presentation that you create with the theme.
[demo slides]: http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/themes/metropolis/demo/demo.pdf
[manual]: http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/themes/metropolis/doc/metropolistheme.pdf
[CTAN]: http://ctan.org/pkg/beamertheme-metropolis

View File

@ -1,6 +1,6 @@
\documentclass[10pt]{beamer}
\usetheme{metropolis}
\usetheme{moloch}
\usepackage{appendixnumberbeamer}
\usepackage{booktabs}
@ -10,9 +10,9 @@
\usepgfplotslibrary{dateplot}
\usepackage{xspace}
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\newcommand{\themename}{\textbf{\textsc{moloch}}\xspace}
\title{Metropolis}
\title{Moloch}
\subtitle{A modern beamer theme}
\date{\today}
\author{Matthias Vogelgesang}
@ -30,7 +30,7 @@
\section{Introduction}
\begin{frame}[fragile]{Metropolis}
\begin{frame}[fragile]{Moloch}
The \themename theme is a Beamer theme with minimal visual noise
inspired by the \href{https://github.com/hsrmbeamertheme/hsrmbeamertheme}{\textsc{hsrm} Beamer
@ -39,7 +39,7 @@
Enable the theme by loading
\begin{verbatim} \documentclass{beamer}
\usetheme{metropolis}\end{verbatim}
\usetheme{moloch}\end{verbatim}
Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX
installed to enjoy this wonderful typography.
@ -54,7 +54,7 @@
\section{Title formats}
\begin{frame}{Metropolis title formats}
\begin{frame}{Moloch title formats}
\themename supports 4 different title formats:
\begin{itemize}
\item Regular
@ -66,7 +66,7 @@
\end{frame}
{
\metroset{titleformat frame=smallcaps}
\molochset{titleformat frame=smallcaps}
\begin{frame}{Small caps}
This frame uses the \texttt{smallcaps} title format.
@ -77,7 +77,7 @@
}
{
\metroset{titleformat frame=allsmallcaps}
\molochset{titleformat frame=allsmallcaps}
\begin{frame}{All small caps}
This frame uses the \texttt{allsmallcaps} title format.
@ -90,7 +90,7 @@
}
{
\metroset{titleformat frame=allcaps}
\molochset{titleformat frame=allcaps}
\begin{frame}{All caps}
This frame uses the \texttt{allcaps} title format.
@ -217,7 +217,7 @@ or show \textbf{bold} results.\end{verbatim}
\column{0.5\textwidth}
\metroset{block=fill}
\molochset{block=fill}
\begin{block}{Default}
Block content.

View File

@ -121,8 +121,8 @@
xrightmargin=0em,
aboveskip=1em,
belowskip=1em,
morekeywords={usetheme,institute,maketitle,@metropolis@titleformat,%
plain,setbeamercolor,metroset,setsansfont,setmonofont},
morekeywords={usetheme,institute,maketitle,@moloch@titleformat,%
plain,setbeamercolor,molochset,setsansfont,setmonofont},
}
\lstMakeShortInline|
\usepackage{metalogo}
@ -143,10 +143,10 @@
\end{minipage}
}
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\newcommand{\themename}{\textbf{\textsc{moloch}}\xspace}
\usepackage{readprov}
\ReadPackageInfos{beamerthememetropolis}
\ReadPackageInfos{beamerthememoloch}
\title{Modern Beamer Presentations with the \themename package}
\author{Matthias Vogelgesang \\ \url{matthias.vogelgesang@gmail.com}}
@ -221,20 +221,20 @@ If you want to use the cutting-edge development version of \themename, you can
install it manually. Like any \LaTeX\ package, this involves four easy steps:
\begin{description}
\item[Download the source] with a |git clone| of the
\href{https://github.com/matze/mtheme}{\themename repository} or as a
\href{https://github.com/matze/mtheme/archive/master.zip}{zip archive}
of the latest development version.
\href{https://github.com/matze/mtheme}{\themename repository} or as a
\href{https://github.com/matze/mtheme/archive/master.zip}{zip archive}
of the latest development version.
\item[Compile the style files] by running |make sty| inside the downloaded
directory. (Or run \LaTeX{} directly on |source/metropolistheme.ins|.)
directory. (Or run \LaTeX{} directly on |source/molochtheme.ins|.)
\item[Move the resulting |*.sty| files] to the folder containing your
presentation. To use \themename with many presentations, run
|make install| or move the |*.sty| files to a folder in your \TeX{} path
instead.
presentation. To use \themename with many presentations, run
|make install| or move the |*.sty| files to a folder in your \TeX{} path
instead.
\item[Use the theme for your presentation] by declaring
|\usetheme{metropolis}| in the preamble of your Beamer document.
|\usetheme{moloch}| in the preamble of your Beamer document.
\end{description}
\themename uses the Make build system to offer the following installation
@ -244,7 +244,7 @@ options for advanced users:
\item[|make sty|] builds the theme style files.
\item[|make doc|] builds this documentation manual.
\item[|make demo|] builds a demo presentation to test the features of
\themename.
\themename.
\item[|make all|] builds the theme and manual.
\item[|make clean|] removes the files generated by |make all|.
\item[|make install|] installs the theme into your local texmf folder.
@ -259,7 +259,7 @@ The following code shows a minimal example of a Beamer presentation using
\begin{lstlisting}
\documentclass{beamer}
\usetheme{metropolis} % Use metropolis theme
\usetheme{moloch} % Use moloch theme
\title{A minimal example}
\date{\today}
\author{Matthias Vogelgesang}
@ -305,7 +305,7 @@ To use this theme with \href{http://johnmacfarlane.net/pandoc/}{Pandoc}-based
presentations, you can run the following command
\begin{lstlisting}
$ pandoc -t beamer --latex-engine=xelatex -V theme:metropolis -o output.pdf input.md
$ pandoc -t beamer --latex-engine=xelatex -V theme:moloch -o output.pdf input.md
\end{lstlisting}
@ -317,13 +317,13 @@ The theme provides a number of options, which can be set using a key=value
interface. The primary way to set options is to provide a comma-separated list
of option-value pairs when loading \themename in the preamble:
\begin{lstlisting}
\usetheme[option1=value1, option2=value2, ...]{metropolis}
\usetheme[option1=value1, option2=value2, ...]{moloch}
\end{lstlisting}
Options can be changed at any time --- even mid-presentation! --- with the
|\metroset| macro.
|\molochset| macro.
\begin{lstlisting}
\metroset{option1=newvalue1, option2=newvalue2, ...}
\molochset{option1=newvalue1, option2=newvalue2, ...}
\end{lstlisting}
The list of options is structured as shown in the following example.
@ -336,8 +336,8 @@ The list of options is structured as shown in the following example.
\subsubsection{Main theme}
\DescribeOption{titleformat}%
{regular, smallcaps, allsmallcaps, allcaps}
{regular}{
{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
@ -346,8 +346,8 @@ The list of options is structured as shown in the following example.
}
\DescribeOption{titleformat plain}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Changes the format of ``standout'' frames (see |titleformat|, above).
}
@ -402,8 +402,8 @@ The list of options is structured as shown in the following example.
\DescribeMacro{titleformat subtitle}
\DescribeMacro{titleformat section}
\DescribeOption{titleformat frame}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Individually controls the format of titles, subtitles, section titles, and
frame titles (see |titleformat|, above).
}
@ -415,9 +415,9 @@ The included \themename color theme is used by default, but its colors can be
easily changed to suit your tastes. All of the theme's styles are defined in
terms of three beamer colors:
\begin{itemize}
\item |normal text| (dark fg, light bg)
\item |alerted text| (colored fg, should be visible against dark or light)
\item |example text| (colored fg, should be visible against dark or light)
\item |normal text| (dark fg, light bg)
\item |alerted text| (colored fg, should be visible against dark or light)
\item |example text| (colored fg, should be visible against dark or light)
\end{itemize}
An easy way to customize the theme is to redefine these colors using
@ -437,10 +437,10 @@ of \themename specific colors, which can also be redefined to your liking.
\end{lstlisting}
For low-light situations \themename it might be helpful to use the
|metropolis-highcontrast| color theme. It is enabled like any other color theme:
|moloch-highcontrast| color theme. It is enabled like any other color theme:
\begin{lstlisting}
\usecolortheme{metropolis-highcontrast}
\usecolortheme{moloch-highcontrast}
\end{lstlisting}
@ -561,20 +561,20 @@ 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})
\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
@ -589,14 +589,14 @@ the \themename subpackages individually so the \themename color theme is
never loaded. This will prevent conflicts between the \themename color theme
and your preferred theme.
For example, overriding the color theme as follows may not work as expected because |\usetheme{metropolis}| loads the \themename color theme, which
For example, overriding the color theme as follows may not work as expected because |\usetheme{moloch}| loads the \themename color theme, which
defines a relationship between the frametitle background and the primary
palette of the theme. Since |seahorse| assumes a different relationship
between its palettes, the result is a grey, rather than periwinkle,
frametitle background.
\begin{lstlisting}
\usetheme{metropolis}
\usetheme{moloch}
\usecolortheme{seahorse}
\end{lstlisting}
@ -604,9 +604,9 @@ The correct colors are chosen if the \themename outer, inner, and font themes
are loaded seperately:
\begin{lstlisting}
\useoutertheme{metropolis}
\useinnertheme{metropolis}
\usefonttheme{metropolis}
\useoutertheme{moloch}
\useinnertheme{moloch}
\usefonttheme{moloch}
\usecolortheme{seahorse} % or your preferred color theme
\end{lstlisting}
@ -681,7 +681,7 @@ additional attributes such as |{.standout}|.
\themename is licensed under a
\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
Attribution-ShareAlike 4.0 International License}.
Attribution-ShareAlike 4.0 International License}.
This means that if you change the theme and re-distribute it, you must retain
the copyright notice header and license it under the same CC-BY-SA license.
This does not affect any presentations that you create with the theme.
@ -689,11 +689,11 @@ This does not affect any presentations that you create with the theme.
\section{Implementation}
\DocInput{beamerthememetropolis.dtx}
\DocInput{beamerinnerthememetropolis.dtx}
\DocInput{beamerouterthememetropolis.dtx}
\DocInput{beamerfontthememetropolis.dtx}
\DocInput{beamercolorthememetropolis.dtx}
\DocInput{beamerthememoloch.dtx}
\DocInput{beamerinnerthememoloch.dtx}
\DocInput{beamerouterthememoloch.dtx}
\DocInput{beamerfontthememoloch.dtx}
\DocInput{beamercolorthememoloch.dtx}
\DocInput{pgfplotsthemetol.dtx}
\end{document}

View File

@ -8,9 +8,9 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -q
RUN apt-get install -qy texlive-full
RUN apt-get install -qy \
gnuplot \
wget \
build-essential
gnuplot \
wget \
build-essential
ADD ./getFiraFont.sh ./getFiraFont.sh
RUN ./getFiraFont.sh

View File

@ -12,7 +12,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthememetropolis-highcontrast}[2017/01/23 Metropolis color theme]
\ProvidesPackage{beamercolorthememoloch-highcontrast}[2017/01/23 Moloch color theme]
%</package>
% \fi
% \CheckSum{0}
@ -21,7 +21,7 @@
%<*package>
% ------------------------------------------------------------------------- \fi
%
\usecolortheme{metropolis}
\usecolortheme{moloch}
\definecolor{mAlert}{HTML}{AD003D}
\definecolor{mExample}{HTML}{005580}

View File

@ -12,7 +12,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthememetropolis}[2017/01/23 Metropolis color theme]
\ProvidesPackage{beamercolorthememoloch}[2017/01/23 Moloch color theme]
%</package>
% \fi
% \CheckSum{0}
@ -39,10 +39,10 @@
% |theorem| and |example|.
% \begin{macrocode}
\pgfkeys{
/metropolis/color/block/.cd,
/moloch/color/block/.cd,
.is choice,
transparent/.code=\metropolis@block@transparent,
fill/.code=\metropolis@block@fill,
transparent/.code=\moloch@block@transparent,
fill/.code=\moloch@block@fill,
}
% \end{macrocode}
% \end{macro}
@ -52,19 +52,19 @@
% of the reverse.
% \begin{macrocode}
\pgfkeys{
/metropolis/color/background/.cd,
/moloch/color/background/.cd,
.is choice,
dark/.code=\metropolis@colors@dark,
light/.code=\metropolis@colors@light,
dark/.code=\moloch@colors@dark,
light/.code=\moloch@colors@light,
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\metropolis@color@setdefaults}
% \begin{macro}{\moloch@color@setdefaults}
% Sets default values for color theme options.
% \begin{macrocode}
\newcommand{\metropolis@color@setdefaults}{
\pgfkeys{/metropolis/color/.cd,
\newcommand{\moloch@color@setdefaults}{
\pgfkeys{/moloch/color/.cd,
background=light,
block=transparent,
}
@ -91,14 +91,14 @@
% |alerted text|, and |example text|.
%
% \begin{macrocode}
\newcommand{\metropolis@colors@dark}{
\newcommand{\moloch@colors@dark}{
\setbeamercolor{normal text}{%
fg=black!2,
bg=mDarkTeal
}
\usebeamercolor[fg]{normal text}
}
\newcommand{\metropolis@colors@light}{
\newcommand{\moloch@colors@light}{
\setbeamercolor{normal text}{%
fg=mDarkTeal,
bg=black!2
@ -179,7 +179,7 @@
% if changing colors mid-presentation.
%
% \begin{macrocode}
\newcommand{\metropolis@block@transparent}{
\newcommand{\moloch@block@transparent}{
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
@ -189,7 +189,7 @@
bg=
}
}
\newcommand{\metropolis@block@fill}{
\newcommand{\moloch@block@fill}{
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
@ -237,8 +237,8 @@
% \subsubsection{Process package options}
%
% \begin{macrocode}
\metropolis@color@setdefaults
\ProcessPgfPackageOptions{/metropolis/color}
\moloch@color@setdefaults
\ProcessPgfPackageOptions{/moloch/color}
% \end{macrocode}
%
% \begin{macrocode}

View File

@ -12,7 +12,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerfontthememetropolis}[2017/01/23 Metropolis font theme]
\ProvidesPackage{beamerfontthememoloch}[2017/01/23 Moloch font theme]
%</package>
% \fi
% \CheckSum{0}
@ -112,7 +112,7 @@
BoldItalicFont={Fira Sans Italic OT}]%
{Fira Sans Light OT}%
}{%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Could not find Fira Sans fonts%
}
}
@ -123,7 +123,7 @@
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{%
\setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}%
}{%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Could not find Fira Mono fonts%
}
}
@ -132,7 +132,7 @@
\addfontfeature{Numbers={Monospaced}}%
}
}{%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts%
}
}
@ -184,27 +184,27 @@
% Controls the format of the title.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat title/.cd,
/moloch/font/titleformat title/.cd,
.is choice,
regular/.code={%
\let\metropolis@titleformat\@empty%
\let\moloch@titleformat\@empty%
\setbeamerfont{title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@titleformat\@empty%
\let\moloch@titleformat\@empty%
\setbeamerfont{title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@titleformat\lowercase%
\let\moloch@titleformat\lowercase%
\setbeamerfont{title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat title=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@titleformat\uppercase%
\let\moloch@titleformat\uppercase%
\setbeamerfont{title}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat title=allcaps can lead to problems%
}
},
@ -216,27 +216,27 @@
% Control the format of the subtitle.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat subtitle/.cd,
/moloch/font/titleformat subtitle/.cd,
.is choice,
regular/.code={%
\let\metropolis@subtitleformat\@empty%
\let\moloch@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@subtitleformat\@empty%
\let\moloch@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@subtitleformat\lowercase%
\let\moloch@subtitleformat\lowercase%
\setbeamerfont{subtitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@subtitleformat\uppercase%
\let\moloch@subtitleformat\uppercase%
\setbeamerfont{subtitle}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat subtitle=allcaps can lead to problems%
}
},
@ -248,27 +248,27 @@
% Controls the format of the section title.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat section/.cd,
/moloch/font/titleformat section/.cd,
.is choice,
regular/.code={%
\let\metropolis@sectiontitleformat\@empty%
\let\moloch@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@sectiontitleformat\@empty%
\let\moloch@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@sectiontitleformat\MakeLowercase%
\let\moloch@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat section=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@sectiontitleformat\MakeUppercase%
\let\moloch@sectiontitleformat\MakeUppercase%
\setbeamerfont{section title}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat section=allcaps can lead to problems%
}
},
@ -280,27 +280,27 @@
% Control the format of the frame title.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat frame/.cd,
/moloch/font/titleformat frame/.cd,
.is choice,
regular/.code={%
\let\metropolis@frametitleformat\@empty%
\let\moloch@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@frametitleformat\@empty%
\let\moloch@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@frametitleformat\MakeLowercase%
\let\moloch@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat frame=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@frametitleformat\MakeUppercase%
\let\moloch@frametitleformat\MakeUppercase%
\setbeamerfont{frametitle}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat frame=allcaps can lead to problems%
}
},
@ -313,7 +313,7 @@
% declaration, where \LaTeX{} automatically removes all spaces.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/.cd,
/moloch/font/.cd,
titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
@ -322,11 +322,11 @@
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\metropolis@font@setdefaults}
% \begin{macro}{\moloch@font@setdefaults}
% Sets default values for font theme options.
% \begin{macrocode}
\newcommand{\metropolis@font@setdefaults}{
\pgfkeys{/metropolis/font/.cd,
\newcommand{\moloch@font@setdefaults}{
\pgfkeys{/moloch/font/.cd,
titleformat title=regular,
titleformat subtitle=regular,
titleformat section=regular,
@ -339,10 +339,10 @@
% We first define hooks to change the case format of the titles.
%
% \begin{macrocode}
\def\metropolis@titleformat#1{#1}
\def\metropolis@subtitleformat#1{#1}
\def\metropolis@sectiontitleformat#1{#1}
\def\metropolis@frametitleformat#1{#1}
\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.,
@ -354,62 +354,62 @@
% \begin{macrocode}
\patchcmd{\beamer@title}%
{\def\inserttitle{#2}}%
{\def\inserttitle{\metropolis@titleformat{#2}}}%
{\def\inserttitle{\moloch@titleformat{#2}}}%
{}%
{\PackageError{beamerfontthememetropolis}{Patching title failed}\@ehc}
{\PackageError{beamerfontthememoloch}{Patching title failed}\@ehc}
\patchcmd{\beamer@subtitle}%
{\def\insertsubtitle{#2}}%
{\def\insertsubtitle{\metropolis@subtitleformat{#2}}}%
{\def\insertsubtitle{\moloch@subtitleformat{#2}}}%
{}%
{\PackageError{beamerfontthememetropolis}{Patching subtitle failed}\@ehc}
{\PackageError{beamerfontthememoloch}{Patching subtitle failed}\@ehc}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}}
{\def\insertsectionhead{\moloch@sectiontitleformat{#2}}}
{}
{\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc}
{\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\metropolis@sectiontitleformat{\unexpanded{#1}}}}}
\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@section}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
\metropolis@sectiontitleformat{#1}}}}
\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\metropolis@sectiontitleformat{#1}}}}
\noexpand\moloch@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\if@tempswa\else
\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc
\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\metropolis@sectiontitleformat{\unexpanded{#1}}}}}
\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@subsection}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
\metropolis@sectiontitleformat{#1}}}}
\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\metropolis@sectiontitleformat{#1}}}}
\noexpand\moloch@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\if@tempswa\else
\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc
\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc
\fi
% \end{macrocode}
%
@ -425,14 +425,14 @@
\gdef\beamer@shortframetitle{#1}%
}}
{{%
\gdef\insertframetitle{{\metropolis@frametitleformat{#2}\ifnum%
\gdef\insertframetitle{{\moloch@frametitleformat{#2}\ifnum%
\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}
{\PackageError{beamerfontthememetropolis}{Patching frame title failed}\@ehc}
{\PackageError{beamerfontthememoloch}{Patching frame title failed}\@ehc}
% \end{macrocode}
%
%
@ -440,8 +440,8 @@
% \subsubsection{Process package options}
%
% \begin{macrocode}
\metropolis@font@setdefaults
\ProcessPgfPackageOptions{/metropolis/font}
\moloch@font@setdefaults
\ProcessPgfPackageOptions{/moloch/font}
% \end{macrocode}
% \iffalse
%</package>

View File

@ -12,7 +12,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerinnerthememetropolis}[2017/01/23 Metropolis inner theme]
\ProvidesPackage{beamerinnerthememoloch}[2017/01/23 Moloch inner theme]
%</package>
% \fi
% \CheckSum{0}
@ -54,12 +54,12 @@
% Optionally add a slide marking the beginning of each section.
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/sectionpage/.cd,
/moloch/inner/sectionpage/.cd,
.is choice,
none/.code=\metropolis@disablesectionpage,
simple/.code={\metropolis@enablesectionpage
none/.code=\moloch@disablesectionpage,
simple/.code={\moloch@enablesectionpage
\setbeamertemplate{section page}[simple]},
progressbar/.code={\metropolis@enablesectionpage
progressbar/.code={\moloch@enablesectionpage
\setbeamertemplate{section page}[progressbar]},
}
% \end{macrocode}
@ -69,22 +69,22 @@
% Optionally add a slide marking the beginning of each subsection.
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/subsectionpage/.cd,
/moloch/inner/subsectionpage/.cd,
.is choice,
none/.code=\metropolis@disablesubsectionpage,
simple/.code={\metropolis@enablesubsectionpage
none/.code=\moloch@disablesubsectionpage,
simple/.code={\moloch@enablesubsectionpage
\setbeamertemplate{section page}[simple]},
progressbar/.code={\metropolis@enablesubsectionpage
progressbar/.code={\moloch@enablesubsectionpage
\setbeamertemplate{section page}[progressbar]},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\metropolis@inner@setdefaults}
% \begin{macro}{\moloch@inner@setdefaults}
% Set default values for inner theme options.
% \begin{macrocode}
\newcommand{\metropolis@inner@setdefaults}{
\pgfkeys{/metropolis/inner/.cd,
\newcommand{\moloch@inner@setdefaults}{
\pgfkeys{/moloch/inner/.cd,
sectionpage=progressbar,
subsectionpage=none
}
@ -196,12 +196,12 @@
% Template to set the title graphic in a zero-height box. (It won't
% change the position of other elements.)
% \begin{macrocode}
\newlength{\metropolis@titleseparator@linewidth}
\setlength{\metropolis@titleseparator@linewidth}{0.4pt}
\newlength{\moloch@titleseparator@linewidth}
\setlength{\moloch@titleseparator@linewidth}{0.4pt}
\setbeamertemplate{title separator}{
\tikzexternaldisable%
\begin{tikzpicture}
\fill[fg] (0,0) rectangle (\textwidth, \metropolis@titleseparator@linewidth);
\fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth);
\end{tikzpicture}%
\tikzexternalenable%
\par%
@ -281,12 +281,12 @@
\par
\vspace{\baselineskip}
}
\newcommand{\metropolis@disablesectionpage}{
\newcommand{\moloch@disablesectionpage}{
\AtBeginSection{
% intentionally empty
}
}
\newcommand{\metropolis@enablesectionpage}{
\newcommand{\moloch@enablesectionpage}{
\AtBeginSection{
\ifbeamer@inframe
\sectionpage
@ -307,12 +307,12 @@
\setbeamertemplate{subsection page}{%
\usebeamertemplate*{section page}
}
\newcommand{\metropolis@disablesubsectionpage}{
\newcommand{\moloch@disablesubsectionpage}{
\AtBeginSubsection{
% intentionally empty
}
}
\newcommand{\metropolis@enablesubsectionpage}{
\newcommand{\moloch@enablesubsectionpage}{
\AtBeginSubsection{
\ifbeamer@inframe
\subsectionpage
@ -331,17 +331,17 @@
% |progress bar in head/foot|.
%
% \begin{macrocode}
\newlength{\metropolis@progressonsectionpage}
\newlength{\metropolis@progressonsectionpage@linewidth}
\setlength{\metropolis@progressonsectionpage@linewidth}{0.4pt}
\newlength{\moloch@progressonsectionpage}
\newlength{\moloch@progressonsectionpage@linewidth}
\setlength{\moloch@progressonsectionpage@linewidth}{0.4pt}
\setbeamertemplate{progress bar in section page}{
\setlength{\metropolis@progressonsectionpage}{%
\setlength{\moloch@progressonsectionpage}{%
\textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\tikzexternaldisable%
\begin{tikzpicture}
\fill[bg] (0,0) rectangle (\textwidth, \metropolis@progressonsectionpage@linewidth);
\fill[fg] (0,0) rectangle (\metropolis@progressonsectionpage, \metropolis@progressonsectionpage@linewidth);
\fill[bg] (0,0) rectangle (\textwidth, \moloch@progressonsectionpage@linewidth);
\fill[fg] (0,0) rectangle (\moloch@progressonsectionpage, \moloch@progressonsectionpage@linewidth);
\end{tikzpicture}%
\tikzexternalenable%
}
@ -351,7 +351,7 @@
% |\inserttotalframenumber|. However, this is not true on the first compile;
% in the absence of an |.aux| file, |\inserttotalframenumber| defaults to 1.
% This behaviour could cause fatal errors for long presentations, as
% |\metropolis@progressonsectionpage| would exceed \TeX's maximum length
% |\moloch@progressonsectionpage| would exceed \TeX's maximum length
% (16383.99999pt, roughly 5.75 metres or 18.9 feet).
% To avoid this, we increase the default value for |\inserttotalframenumber|;
% presentations with over 4000 slides will still break on first compile, but
@ -373,17 +373,17 @@
%
% The three different block environments differ only in their colours.
% Rather than repeat the essentially the same template three times, we use
% the auxiliary macro |\metropolis@block| to define all three templates.
% the auxiliary macro |\moloch@block| to define all three templates.
%
% \begin{macrocode}
\newlength{\metropolis@blocksep}
\newlength{\metropolis@blockadjust}
\setlength{\metropolis@blocksep}{0.75ex}
\setlength{\metropolis@blockadjust}{0.25ex}
\providecommand{\metropolis@strut}{%
\newlength{\moloch@blocksep}
\newlength{\moloch@blockadjust}
\setlength{\moloch@blocksep}{0.75ex}
\setlength{\moloch@blockadjust}{0.25ex}
\providecommand{\moloch@strut}{%
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}%
}
\newcommand{\metropolis@block}[1]{
\newcommand{\moloch@block}[1]{
\par\vskip\medskipamount%
\setlength{\parskip}{0pt}
% \end{macrocode}
@ -414,30 +414,30 @@
% \end{macrocode}
%
% Otherwise, if the |block title| has a background, we set the padding based
% on |\metropolis@blockskip|. However, we have to visually compensate for
% the |\metropolis@strut| added to the block title (see below) by
% subtracting |\metropolis@blockadjust| from the top and bottom padding.
% on |\moloch@blockskip|. However, we have to visually compensate for
% the |\moloch@strut| added to the block title (see below) by
% subtracting |\moloch@blockadjust| from the top and bottom padding.
%
% \begin{macrocode}
{%
\begin{beamercolorbox}[
sep=\dimexpr\metropolis@blocksep-\metropolis@blockadjust\relax,
leftskip=\metropolis@blockadjust,
rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax
sep=\dimexpr\moloch@blocksep-\moloch@blockadjust\relax,
leftskip=\moloch@blockadjust,
rightskip=\dimexpr\moloch@blockadjust plus 4em\relax
]{block title#1}%
}}%
% \end{macrocode}
%
% We can now set the contents of the |block title|. The zero-width but
% positive-height box |\metropolis@strut| ensures that the block title box
% positive-height box |\moloch@strut| ensures that the block title box
% has a consistent height, even if it lacks punctuation, ascenders, or
% descenders.
%
% \begin{macrocode}
\usebeamerfont*{block title#1}%
\metropolis@strut%
\moloch@strut%
\insertblocktitle%
\metropolis@strut%
\moloch@strut%
\end{beamercolorbox}%
% \end{macrocode}
%
@ -451,21 +451,21 @@
\ifbeamercolorempty[bg]{block body}{%
\begin{beamercolorbox}[vmode]{block body#1}%
}{%
\begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}%
\vspace{-\metropolis@parskip}
\begin{beamercolorbox}[sep=\moloch@blocksep, vmode]{block body#1}%
\vspace{-\moloch@parskip}
}}%
\usebeamerfont{block body#1}%
\setlength{\parskip}{\metropolis@parskip}%
\setlength{\parskip}{\moloch@parskip}%
}
% \end{macrocode}
%
% This concludes the auxiliary macro |\metropolis@block|. Finally,
% This concludes the auxiliary macro |\moloch@block|. Finally,
% we define the block beamer templates using this macro.
%
% \begin{macrocode}
\setbeamertemplate{block begin}{\metropolis@block{}}
\setbeamertemplate{block alerted begin}{\metropolis@block{ alerted}}
\setbeamertemplate{block example begin}{\metropolis@block{ example}}
\setbeamertemplate{block begin}{\moloch@block{}}
\setbeamertemplate{block alerted begin}{\moloch@block{ alerted}}
\setbeamertemplate{block example begin}{\moloch@block{ example}}
\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}}
\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}}
\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}}
@ -500,9 +500,9 @@
% \subsubsection{Text and spacing settings}
%
% \begin{macrocode}
\newlength{\metropolis@parskip}
\setlength{\metropolis@parskip}{0.5em}
\setlength{\parskip}{\metropolis@parskip}
\newlength{\moloch@parskip}
\setlength{\moloch@parskip}{0.5em}
\setlength{\parskip}{\moloch@parskip}
\linespread{1.15}
% \end{macrocode}
%
@ -539,9 +539,9 @@
% change the colors and set frame options.
%
% \begin{macrocode}
\providebool{metropolis@standout}
\providebool{moloch@standout}
\define@key{beamerframe}{standout}[true]{%
\booltrue{metropolis@standout}
\booltrue{moloch@standout}
\begingroup
\setkeys{beamerframe}{c}
\setkeys{beamerframe}{noframenumbering}
@ -572,9 +572,9 @@
%
% \begin{macrocode}
\pretocmd{\beamer@reseteecodes}{%
\ifbool{metropolis@standout}{
\ifbool{moloch@standout}{
\endgroup
\boolfalse{metropolis@standout}
\boolfalse{moloch@standout}
}{}
}{}{}
% \end{macrocode}
@ -585,7 +585,7 @@
%
% \begin{macrocode}
\AtBeginEnvironment{beamer@frameslide}{
\ifbool{metropolis@standout}{
\ifbool{moloch@standout}{
\centering
\usebeamerfont{standout}
}{}
@ -596,8 +596,8 @@
% \subsubsection{Process package options}
%
% \begin{macrocode}
\metropolis@inner@setdefaults
\ProcessPgfPackageOptions{/metropolis/inner}
\moloch@inner@setdefaults
\ProcessPgfPackageOptions{/moloch/inner}
% \end{macrocode}
%
% \iffalse

View File

@ -12,7 +12,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerouterthememetropolis}[2017/01/23 Metropolis outer theme]
\ProvidesPackage{beamerouterthememoloch}[2017/01/23 Moloch outer theme]
%</package>
% \fi
% \CheckSum{0}
@ -44,7 +44,7 @@
% Adds slide numbers to the bottom right of each slide.
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/numbering/.cd,
/moloch/outer/numbering/.cd,
.is choice,
none/.code=\setbeamertemplate{frame numbering}[none],
counter/.code=\setbeamertemplate{frame numbering}[counter],
@ -57,24 +57,24 @@
% Adds a progress bar to the top, bottom, or frametitle of each slide.
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/progressbar/.cd,
/moloch/outer/progressbar/.cd,
.is choice,
none/.code={%
\setbeamertemplate{headline}[plain]
\setbeamertemplate{frametitle}[plain]
\setbeamertemplate{footline}[plain]
},
head/.code={\pgfkeys{/metropolis/outer/progressbar=none}
head/.code={\pgfkeys{/moloch/outer/progressbar=none}
\addtobeamertemplate{headline}{}{%
\usebeamertemplate*{progress bar in head/foot}
}
},
frametitle/.code={\pgfkeys{/metropolis/outer/progressbar=none}
frametitle/.code={\pgfkeys{/moloch/outer/progressbar=none}
\addtobeamertemplate{frametitle}{}{%
\usebeamertemplate*{progress bar in head/foot}
}
},
foot/.code={\pgfkeys{/metropolis/outer/progressbar=none}
foot/.code={\pgfkeys{/moloch/outer/progressbar=none}
\addtobeamertemplate{footline}{}{%
\usebeamertemplate*{progress bar in head/foot}%
}
@ -83,11 +83,11 @@
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\metropolis@outer@setdefaults}
% \begin{macro}{\moloch@outer@setdefaults}
% Sets default values for outer theme options.
% \begin{macrocode}
\newcommand{\metropolis@outer@setdefaults}{
\pgfkeys{/metropolis/outer/.cd,
\newcommand{\moloch@outer@setdefaults}{
\pgfkeys{/moloch/outer/.cd,
numbering=counter,
progressbar=none,
}
@ -148,30 +148,30 @@
% Templates for the frame title, which is optionally underlined with a
% progress bar.
% \begin{macrocode}
\newlength{\metropolis@frametitle@padding}
\setlength{\metropolis@frametitle@padding}{2.2ex}
\newcommand{\metropolis@frametitlestrut@start}{
\rule{0pt}{\metropolis@frametitle@padding +%
\newlength{\moloch@frametitle@padding}
\setlength{\moloch@frametitle@padding}{2.2ex}
\newcommand{\moloch@frametitlestrut@start}{
\rule{0pt}{\moloch@frametitle@padding +%
\totalheightof{%
\ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X}%
\ifcsdef{moloch@frametitleformat}{\moloch@frametitleformat X}{X}%
}%
}%
}
\newcommand{\metropolis@frametitlestrut@end}{
\rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding}
\newcommand{\moloch@frametitlestrut@end}{
\rule[-\moloch@frametitle@padding]{0pt}{\moloch@frametitle@padding}
}
\defbeamertemplate{frametitle}{plain}{%
\nointerlineskip%
\begin{beamercolorbox}[%
wd=\paperwidth,%
sep=0pt,%
leftskip=\metropolis@frametitle@padding,%
rightskip=\metropolis@frametitle@padding,%
leftskip=\moloch@frametitle@padding,%
rightskip=\moloch@frametitle@padding,%
]{frametitle}%
\metropolis@frametitlestrut@start%
\moloch@frametitlestrut@start%
\insertframetitle%
\nolinebreak%
\metropolis@frametitlestrut@end%
\moloch@frametitlestrut@end%
\end{beamercolorbox}%
}
\setbeamertemplate{frametitle continuation}{%
@ -186,19 +186,19 @@
% on each page. Much of this code is duplicated in the inner theme's
% template |progress bar in section page|.
% \begin{macrocode}
\newlength{\metropolis@progressinheadfoot}
\newlength{\metropolis@progressinheadfoot@linewidth}
\setlength{\metropolis@progressinheadfoot@linewidth}{0.4pt}
\newlength{\moloch@progressinheadfoot}
\newlength{\moloch@progressinheadfoot@linewidth}
\setlength{\moloch@progressinheadfoot@linewidth}{0.4pt}
\setbeamertemplate{progress bar in head/foot}{
\nointerlineskip
\setlength{\metropolis@progressinheadfoot}{%
\setlength{\moloch@progressinheadfoot}{%
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
\tikzexternaldisable%
\begin{tikzpicture}
\fill[bg] (0,0) rectangle (\paperwidth, \metropolis@progressinheadfoot@linewidth);
\fill[fg] (0,0) rectangle (\metropolis@progressinheadfoot, \metropolis@progressinheadfoot@linewidth);
\fill[bg] (0,0) rectangle (\paperwidth, \moloch@progressinheadfoot@linewidth);
\fill[fg] (0,0) rectangle (\moloch@progressinheadfoot, \moloch@progressinheadfoot@linewidth);
\end{tikzpicture}%
\tikzexternalenable%
\end{beamercolorbox}
@ -217,7 +217,7 @@
\AtBeginDocument{%
\apptocmd{\appendix}{%
\pgfkeys{%
/metropolis/outer/.cd,
/moloch/outer/.cd,
numbering=none,
progressbar=none}
}{}{}
@ -227,8 +227,8 @@
% \subsubsection{Process package options}
%
% \begin{macrocode}
\metropolis@outer@setdefaults
\ProcessPgfPackageOptions{/metropolis/outer}
\moloch@outer@setdefaults
\ProcessPgfPackageOptions{/moloch/outer}
% \end{macrocode}
%
% \iffalse

View File

@ -12,8 +12,8 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthememetropolis}
[2017/01/23 v1.2 Metropolis Beamer theme]
\ProvidesPackage{beamerthememoloch}
[2017/01/23 v1.2 Moloch Beamer theme]
%</package>
% \fi
% \CheckSum{0}
@ -44,12 +44,12 @@
% Most options are passed off to the component sub-packages.
%
% \begin{macrocode}
\pgfkeys{/metropolis/.cd,
\pgfkeys{/moloch/.cd,
.search also={
/metropolis/inner,
/metropolis/outer,
/metropolis/color,
/metropolis/font,
/moloch/inner,
/moloch/outer,
/moloch/color,
/moloch/font,
}
}
% \end{macrocode}
@ -58,27 +58,27 @@
% Controls the formatting of the text on standout ``plain'' frames.
% \begin{macrocode}
\pgfkeys{
/metropolis/titleformat plain/.cd,
/moloch/titleformat plain/.cd,
.is choice,
regular/.code={%
\let\metropolis@plaintitleformat\@empty%
\let\moloch@plaintitleformat\@empty%
\setbeamerfont{standout}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@plaintitleformat\@empty%
\let\moloch@plaintitleformat\@empty%
\setbeamerfont{standout}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@plaintitleformat\MakeLowercase%
\let\moloch@plaintitleformat\MakeLowercase%
\setbeamerfont{standout}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat plain=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@plaintitleformat\MakeUppercase%
\let\moloch@plaintitleformat\MakeUppercase%
\setbeamerfont{standout}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
\PackageWarning{beamerthememoloch}{%
Be aware that titleformat plain=allcaps can lead to problems%
}
},
@ -91,7 +91,7 @@
% titles, and the text on standout ``plain'' frames.
% \begin{macrocode}
\pgfkeys{
/metropolis/titleformat/.code=\pgfkeysalso{
/moloch/titleformat/.code=\pgfkeysalso{
font/titleformat title=#1,
font/titleformat subtitle=#1,
font/titleformat section=#1,
@ -106,7 +106,7 @@
% deprecated option names as aliases to the corresponding |key=value| options.
%
% \begin{macrocode}
\pgfkeys{/metropolis/.cd,
\pgfkeys{/moloch/.cd,
usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle},
noslidenumbers/.code=\pgfkeysalso{outer/numbering=none},
usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction},
@ -119,8 +119,8 @@
% Set default values for options.
%
% \begin{macrocode}
\newcommand{\metropolis@setdefaults}{
\pgfkeys{/metropolis/.cd,
\newcommand{\moloch@setdefaults}{
\pgfkeys{/moloch/.cd,
titleformat plain=regular,
}
}
@ -142,10 +142,10 @@
% the theme.
%
% \begin{macrocode}
\useinnertheme{metropolis}
\useoutertheme{metropolis}
\usecolortheme{metropolis}
\usefonttheme{metropolis}
\useinnertheme{moloch}
\useoutertheme{moloch}
\usecolortheme{moloch}
\usefonttheme{moloch}
% \end{macrocode}
%
% The |tol| theme for |pgfplots| is only loaded if |pgfplots| is used.
@ -165,10 +165,10 @@
% The parent theme defines custom commands as their proper usage may depend
% on multiple sub-packages.
%
% \begin{macro}{\metroset}
% \begin{macro}{\molochset}
% Allows the user to change options midway through a presentation.
% \begin{macrocode}
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
\newcommand{\molochset}[1]{\pgfkeys{/moloch/.cd,#1}}
% \end{macrocode}
% \end{macro}
%
@ -177,14 +177,14 @@
% or a few words. The format of the text can be set with the
% |titleformat plain| option.
% \begin{macrocode}
\def\metropolis@plaintitleformat#1{#1}
\def\moloch@plaintitleformat#1{#1}
\newcommand{\plain}[2][]{%
\PackageWarning{beamerthememetropolis}{%
The syntax `\plain' may be deprecated in a future version of Metropolis.
\PackageWarning{beamerthememoloch}{%
The syntax `\plain' may be deprecated in a future version of Moloch.
Please use a frame with [standout] instead.
}
\begin{frame}[standout]{#1}
\metropolis@plaintitleformat{#2}
\moloch@plaintitleformat{#2}
\end{frame}
}
% \end{macrocode}
@ -201,8 +201,8 @@
% \subsubsection{Process package options}
%
% \begin{macrocode}
\metropolis@setdefaults
\ProcessPgfOptions{/metropolis}
\moloch@setdefaults
\ProcessPgfOptions{/moloch}
% \end{macrocode}
%
% \iffalse

View File

@ -13,7 +13,7 @@
\input docstrip.tex %
\keepsilent
\askforoverwritefalse
\usedir{tex/latex/mtheme}
\usedir{tex/latex/moloch}
\preamble
---------------------------------------------------------------------------
@ -29,23 +29,23 @@ International License (https://creativecommons.org/licenses/by-sa/4.0/).
---------------------------------------------------------------------------
\endpreamble
\generate{\file{beamerthememetropolis.sty}{%
\from{beamerthememetropolis.dtx}{package}}
\generate{\file{beamerthememoloch.sty}{%
\from{beamerthememoloch.dtx}{package}}
}
\generate{\file{beamerinnerthememetropolis.sty}{%
\from{beamerinnerthememetropolis.dtx}{package}}
\generate{\file{beamerinnerthememoloch.sty}{%
\from{beamerinnerthememoloch.dtx}{package}}
}
\generate{\file{beamerouterthememetropolis.sty}{%
\from{beamerouterthememetropolis.dtx}{package}}
\generate{\file{beamerouterthememoloch.sty}{%
\from{beamerouterthememoloch.dtx}{package}}
}
\generate{\file{beamerfontthememetropolis.sty}{%
\from{beamerfontthememetropolis.dtx}{package}}
\generate{\file{beamerfontthememoloch.sty}{%
\from{beamerfontthememoloch.dtx}{package}}
}
\generate{\file{beamercolorthememetropolis.sty}{%
\from{beamercolorthememetropolis.dtx}{package}}
\generate{\file{beamercolorthememoloch.sty}{%
\from{beamercolorthememoloch.dtx}{package}}
}
\generate{\file{beamercolorthememetropolis-highcontrast.sty}{%
\from{beamercolorthememetropolis-highcontrast.dtx}{package}}
\generate{\file{beamercolorthememoloch-highcontrast.sty}{%
\from{beamercolorthememoloch-highcontrast.dtx}{package}}
}
\generate{\file{pgfplotsthemetol.sty}{%
\from{pgfplotsthemetol.dtx}{package}}
@ -57,14 +57,14 @@ International License (https://creativecommons.org/licenses/by-sa/4.0/).
\Msg{* To finish the installation you have to move the following *}
\Msg{* files into a directory searched by TeX: *}
\Msg{* *}
\Msg{* beamerthememetropolis.sty *}
\Msg{* beamerinnerthememetropolis.sty *}
\Msg{* beamerouterthememetropolis.sty *}
\Msg{* beamerfontthememetropolis.sty *}
\Msg{* beamercolorthememetropolis.sty *}
\Msg{* beamerthememoloch.sty *}
\Msg{* beamerinnerthememoloch.sty *}
\Msg{* beamerouterthememoloch.sty *}
\Msg{* beamerfontthememoloch.sty *}
\Msg{* beamercolorthememoloch.sty *}
\Msg{* pgfplotsthemetol.sty *}
\Msg{* *}
\Msg{* To produce the documentation run the file mtheme.dtx *}
\Msg{* To produce the documentation run the file moloch.dtx *}
\Msg{* through LaTeX. *}
\Msg{* *}
\Msg{* Happy TeXing! *}