2015-06-16 08:13:19 +02:00
|
|
|
|
%% ---------------------------------------------------------------------------
|
|
|
|
|
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
|
|
|
|
|
%% contributors can be found at
|
2015-06-12 07:47:38 +02:00
|
|
|
|
%%
|
2015-06-16 08:13:19 +02:00
|
|
|
|
%% https://github.com/matze/mtheme/graphs/contributors
|
2015-06-12 07:47:38 +02:00
|
|
|
|
%%
|
2015-06-16 08:13:19 +02:00
|
|
|
|
%% and the original template was based on the HSRM theme by Benjamin Weiss.
|
2015-06-12 07:47:38 +02:00
|
|
|
|
%%
|
2015-06-16 08:13:19 +02:00
|
|
|
|
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
|
|
|
|
|
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
2015-06-12 07:47:38 +02:00
|
|
|
|
%% ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
\documentclass{ltxdoc}
|
|
|
|
|
%\OnlyDescription
|
|
|
|
|
|
|
|
|
|
\usepackage{setspace}
|
|
|
|
|
\onehalfspacing
|
|
|
|
|
|
|
|
|
|
\usepackage{fontspec}
|
|
|
|
|
\setmainfont[BoldItalicFont={Fira Sans Italic},%
|
|
|
|
|
ItalicFont={Fira Sans Light Italic},%
|
|
|
|
|
BoldFont={Fira Sans}]{Fira Sans Light}
|
|
|
|
|
\setmonofont{Fira Mono}
|
2015-06-12 10:24:24 +02:00
|
|
|
|
\defaultfontfeatures{Ligatures=TeX}
|
|
|
|
|
|
2015-06-12 07:47:38 +02:00
|
|
|
|
\usepackage{enumitem}
|
|
|
|
|
\setlist[itemize]{noitemsep}
|
|
|
|
|
\setlist[enumerate]{noitemsep}
|
|
|
|
|
|
|
|
|
|
\usepackage{xcolor}
|
|
|
|
|
\definecolor{mDarkBrown}{HTML}{604c38}
|
|
|
|
|
\definecolor{mDarkTeal}{HTML}{23373b}
|
|
|
|
|
\definecolor{mLightBrown}{HTML}{EB811B}
|
|
|
|
|
\definecolor{mLightGreen}{HTML}{14B03D}
|
|
|
|
|
\definecolor{mBackground}{HTML}{FFFFFF}
|
|
|
|
|
|
|
|
|
|
\usepackage{listings}
|
|
|
|
|
\lstset{%
|
|
|
|
|
language=[LaTeX]{TeX},
|
|
|
|
|
basicstyle=\ttfamily,
|
|
|
|
|
keywordstyle=\color{mLightBrown}\bfseries,
|
|
|
|
|
commentstyle=\color{mLightGreen},
|
|
|
|
|
stringstyle=\color{mLightGreen},
|
|
|
|
|
backgroundcolor=\color{mBackground},
|
|
|
|
|
numbers=none,
|
|
|
|
|
numberstyle=\tiny\ttfamily,
|
|
|
|
|
stepnumber=2,
|
|
|
|
|
showspaces=false,
|
|
|
|
|
showstringspaces=false,
|
|
|
|
|
showtabs=false,
|
|
|
|
|
frame=none,
|
|
|
|
|
framerule=1pt,
|
|
|
|
|
tabsize=2,
|
|
|
|
|
rulesep=5em,
|
|
|
|
|
captionpos=b,
|
|
|
|
|
breaklines=true,
|
|
|
|
|
breakatwhitespace=false,
|
|
|
|
|
framexleftmargin=0em,
|
|
|
|
|
framexrightmargin=0em,
|
|
|
|
|
xleftmargin=0em,
|
|
|
|
|
xrightmargin=0em,
|
|
|
|
|
aboveskip=1em,
|
|
|
|
|
belowskip=1em,
|
|
|
|
|
morekeywords={usetheme,institute,maketitle,mthemetitleformat,plain,setbeamercolor},
|
|
|
|
|
}
|
|
|
|
|
\lstMakeShortInline|
|
2015-06-12 10:20:35 +02:00
|
|
|
|
|
2015-06-12 07:47:38 +02:00
|
|
|
|
\usepackage[colorlinks=true,
|
|
|
|
|
linkcolor=mLightBrown,
|
|
|
|
|
menucolor=mLightBrown,
|
|
|
|
|
pagecolor=mLightBrown,
|
|
|
|
|
urlcolor=mLightBrown]{hyperref}
|
|
|
|
|
|
|
|
|
|
\GetFileInfo{beamerthemem.dtx}
|
|
|
|
|
\title{Modern Beamer Presentations\\with the\\\textsc{mtheme} package}
|
|
|
|
|
\author{Matthias Vogelgesang \\ \url{matthias.vogelgesang@gmail.com}}
|
2015-06-16 17:14:05 +02:00
|
|
|
|
\date{v0.x.x}
|
2015-06-12 07:47:38 +02:00
|
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
|
|
\maketitle
|
|
|
|
|
|
|
|
|
|
\section{Introduction}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
Beamer is an awesome way to make presentations with LaTeX. But the stock themes
|
|
|
|
|
do not necessarily look particularly nice and the custom themes often scream
|
|
|
|
|
“Beamer” at first sight. The goal of \textsc{mtheme} is to provide a modern
|
|
|
|
|
Beamer theme with minimal visual noise. It provides section slides 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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
pdfTeX and the Computer Modern typeface.
|
|
|
|
|
|
|
|
|
|
The codebase is maintained on \href{https://github.com/matze/mtheme}{GitHub}. So
|
|
|
|
|
if you have issues, find mistakes in the manual or want to contribute – to make
|
|
|
|
|
the theme even better – get in touch there.
|
2015-06-12 07:47:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\section{Getting Started}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\subsection{Installation}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
|
|
|
|
The \textsc{mtheme} uses Make as build system. Hence the installation is very
|
|
|
|
|
straight forward. Simply type
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\begin{lstlisting}
|
|
|
|
|
$ make
|
|
|
|
|
$ make install
|
|
|
|
|
\end{lstlisting}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
in the top directory and all the files will be created and installed on your
|
|
|
|
|
computer. The complete list of make rules is as follows:
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\begin{description}
|
|
|
|
|
\item[all] \hfill \\
|
|
|
|
|
Build the theme, the manual and the demo presentation.
|
|
|
|
|
\item[install] \hfill \\
|
|
|
|
|
Install the theme into your local texmf folder.
|
|
|
|
|
\item[uninstall] \hfill \\
|
|
|
|
|
Remove the theme from your local texmf folder.
|
|
|
|
|
\item[sty] \hfill \\
|
|
|
|
|
Build the manual.
|
|
|
|
|
\item[manual] \hfill \\
|
|
|
|
|
Build the manual.
|
|
|
|
|
\item[demo] \hfill \\
|
|
|
|
|
Build the demo presentation.
|
|
|
|
|
\item[ctan] \hfill \\
|
|
|
|
|
Create a package for CTAN distribution.
|
|
|
|
|
\end{description}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\subsection{Dependencies}
|
|
|
|
|
|
|
|
|
|
\begin{itemize}
|
|
|
|
|
\item XeLaTeX
|
|
|
|
|
\item \href{https://github.com/mozilla/Fira}{Fira Sans} and Mono font
|
|
|
|
|
\item TikZ
|
|
|
|
|
\end{itemize}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
Depending on the Linux distribution, the packaged name of |Fira Sans| might be
|
|
|
|
|
|Fira Sans OT| instead of |Fira Sans|. In that case, you may have to edit
|
|
|
|
|
|beamerfontthememetropolis.dtx|. You may also need to install Fira Sans; see the
|
|
|
|
|
|contrib/| directory for more. Users of Debian or Ubuntu can also install this
|
|
|
|
|
\href{https://launchpad.net/\%7Eedd/+archive/ubuntu/misc/+files/latex-mtheme_0.1.0vidid1_all.deb}{.deb
|
|
|
|
|
package} containing the theme files as well as the Fira Sans font files.
|
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\subsection{Pandoc}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
To use this theme with \href{http://johnmacfarlane.net/pandoc/}{Pandoc}-based
|
|
|
|
|
presentations, you can run the following command
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\begin{lstlisting}
|
|
|
|
|
$ pandoc -t beamer --latex-engine=xelatex -V theme:m -o output.pdf input.md
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\subsection{A Minimal Example}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
To get started with the theme is very simple. The following code shows a minimal
|
|
|
|
|
example of a Beamer presentation using the \textsc{mtheme}.
|
2015-06-12 07:47:38 +02:00
|
|
|
|
|
|
|
|
|
\begin{lstlisting}
|
|
|
|
|
\documentclass[10pt]{beamer}
|
|
|
|
|
\usetheme{m} % load mtheme
|
|
|
|
|
\title{A modern beamer theme} % define title
|
|
|
|
|
\date{\today} % define date
|
|
|
|
|
\author{Matthias Vogelgesang} % define author
|
|
|
|
|
\institute{Institute} % define institute
|
|
|
|
|
\begin{document}
|
|
|
|
|
\maketitle % create titlepage
|
|
|
|
|
\section{First Section} % create section
|
|
|
|
|
\begin{frame}{First Frame} % first frame
|
|
|
|
|
Lorem ipsum dolor sit amet, ...
|
|
|
|
|
\end{frame}
|
|
|
|
|
\begin{frame}{Second Frame} % second frame
|
|
|
|
|
Lorem ipsum dolor sit amet, ...
|
|
|
|
|
\end{frame}
|
|
|
|
|
\end{document}
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\section{Customization}
|
|
|
|
|
\subsection{Package options}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
The theme provides a number of options. To use any of the options below, call
|
|
|
|
|
them when invoking \textsc{mtheme} in the preamble of the slides, i.e.
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\begin{lstlisting}[numbers=none]
|
|
|
|
|
\usetheme[<options>]{m}
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
2015-06-17 09:14:55 +02:00
|
|
|
|
\noindent\DescribeMacro{usetitleprogressbar}
|
|
|
|
|
Adds a thin progress bar similar to the section progress bar underneath each
|
|
|
|
|
frame title.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{protectframetitle}
|
|
|
|
|
In order to use |\cite|, |\ref| and similar commands in a frame title you have
|
|
|
|
|
to protect the title. This can be done automatically with this option.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{blockbg}
|
|
|
|
|
Adds background color to the blocks similar to other beamer themes.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{nooffset}
|
|
|
|
|
By default, the \textsc{mtheme} adds |\vspace{2em}| after the frametitle to
|
|
|
|
|
center content vertically on the frame. This option removes this additional
|
|
|
|
|
space in order to get more content per slide.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{nosectionslide}
|
|
|
|
|
By default when using the |\section| command, a slide is created with just the
|
|
|
|
|
title and the progress bar on it. This option prevents the creation of these
|
|
|
|
|
additional slides.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{usetotalslideindicator}
|
|
|
|
|
By default, only the current page number is printed in the lower right corner.
|
|
|
|
|
This option changes the slide numbering format to |#current/#total|.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{noslidenumbers}
|
|
|
|
|
Omits slide numbers entirely.\\
|
|
|
|
|
|
|
|
|
|
\noindent\DescribeMacro{darkcolors}
|
|
|
|
|
Makes the background dark and the foreground light.\\
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\subsection{Color Customization}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
The included metropolis 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:
|
2015-06-16 14:40:16 +02:00
|
|
|
|
\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)
|
|
|
|
|
\end{itemize}
|
|
|
|
|
An easy way to customize the theme is to redefine these colors using
|
|
|
|
|
|
|
|
|
|
\begin{lstlisting}[numbers=none]
|
|
|
|
|
\setbeamercolor{ ... }{ fg= ... , bg= ... }
|
|
|
|
|
\end{lstlisting}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
in your preamble. For greater customization, you can redefine any of the other
|
|
|
|
|
colors in |beamercolorthememetropolis|, including progress bar.
|
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\subsection{Title Formatting}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
|
|
|
|
The main title, section titles, and frame titles are all formatted according to
|
|
|
|
|
the custom command |\mthemetitleformat|. By default, this is equivalent to
|
|
|
|
|
|\scshape| and sets the titles in small capitals, but you can change it in your
|
|
|
|
|
preamble. For example:
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\begin{lstlisting}
|
|
|
|
|
% no small capitals
|
|
|
|
|
\renewcommand{\mthemetitleformat}{}
|
|
|
|
|
% all small capitals
|
|
|
|
|
\renewcommand{\mthemetitleformat}{\scshape\MakeLowercase}
|
|
|
|
|
% all capitals
|
|
|
|
|
\renewcommand{\mthemetitleformat}{\MakeUppercase}
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
Note that |\MakeLowercase| and |\MakeUppercase| can have unexpected behaviour in
|
|
|
|
|
math mode, are disabled when |protectframetitle| is used, and cause crashes when
|
|
|
|
|
an unprotected frametitle appears on a slide with |allowframebreaks|.
|
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\subsection{Commands}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
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.
|
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
|
|
|
|
\subsection{pgfplot styles}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
The beamer theme also contains pre-defined pgfplot styles. Use the |mlineplot|
|
|
|
|
|
key to plot line data and |mbarplot| or horizontal |mbarplot| to plot bar
|
|
|
|
|
charts.
|
|
|
|
|
|
2015-06-16 14:40:16 +02:00
|
|
|
|
|
2015-06-12 10:20:35 +02:00
|
|
|
|
\section{Known Issues}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
2015-06-12 10:20:35 +02:00
|
|
|
|
\section{License}
|
|
|
|
|
|
2015-06-17 09:18:08 +02:00
|
|
|
|
The theme itself is licensed under a
|
|
|
|
|
\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
|
|
|
|
|
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 the
|
|
|
|
|
presentation that you create with the theme.
|
|
|
|
|
|
2015-06-12 10:20:35 +02:00
|
|
|
|
|
2015-06-12 10:24:24 +02:00
|
|
|
|
\section{Contributors}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
|
|
|
|
For a full list of contributors please visit the
|
|
|
|
|
\href{https://github.com/matze/mtheme/graphs/contributors}{GitHub Repository}.
|
|
|
|
|
|
2015-06-12 10:24:24 +02:00
|
|
|
|
|
2015-06-12 07:47:38 +02:00
|
|
|
|
\section{Implementation}
|
2015-06-17 09:18:08 +02:00
|
|
|
|
|
2015-06-12 07:47:38 +02:00
|
|
|
|
\DocInput{beamerthemem.dtx}
|
|
|
|
|
\DocInput{beamerfontthememetropolis.dtx}
|
|
|
|
|
\DocInput{beamercolorthememetropolis.dtx}
|
|
|
|
|
|
|
|
|
|
\end{document}
|