├── demo.pdf ├── images └── valley.jpg ├── latexmkrc ├── .gitignore ├── Makefile ├── beamerfontthememetropolis.sty ├── beamercolorthememetropolis.sty ├── README.md ├── demo.tex └── beamerthemem.sty /demo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leonidas-from-XIV/mtheme/master/demo.pdf -------------------------------------------------------------------------------- /images/valley.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leonidas-from-XIV/mtheme/master/images/valley.jpg -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | $texprefix = 'demo'; 2 | $pdf_mode = 1; 3 | $dvi_mode = $postscript_mode = 0; 4 | $pdflatex = 'lualatex --shell-escape %O %S'; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | demo.pdf 2 | 3 | *.fls 4 | *.acn 5 | *.acr 6 | *.alg 7 | *.aux 8 | *.bbl 9 | *.blg 10 | *.dvi 11 | *.fdb_latexmk 12 | *.glg 13 | *.glo 14 | *.gls 15 | *.idx 16 | *.ilg 17 | *.ind 18 | *.ist 19 | *.lof 20 | *.log 21 | *.lot 22 | *.maf 23 | *.mtc 24 | *.mtc0 25 | *.nav 26 | *.nlo 27 | *.out 28 | *.pdfsync 29 | *.ps 30 | *.snm 31 | *.synctex.gz 32 | *.toc 33 | *.vrb 34 | *.xdy 35 | *.tdo 36 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SRC = demo.tex 2 | PDF = demo.pdf 3 | AUX = demo.aux 4 | TEXC := xelatex 5 | TEXC_OPTS += -shell-escape 6 | TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME) 7 | INSTALL_DIR = $(TEXMFHOME)/tex/latex/mtheme 8 | 9 | .PHONY: clean install 10 | 11 | all: $(PDF) 12 | 13 | $(AUX): 14 | $(TEXC) $(TEXC_OPTS) $(SRC) 15 | 16 | $(PDF): beamerthemem.sty $(AUX) $(SRC) 17 | $(TEXC) $(TEXC_OPTS) $(SRC) 18 | 19 | clean: 20 | @rm -f $(PDF) 21 | @git clean -xf 22 | 23 | install: 24 | mkdir -p $(INSTALL_DIR) 25 | cp *.sty $(INSTALL_DIR) 26 | -------------------------------------------------------------------------------- /beamerfontthememetropolis.sty: -------------------------------------------------------------------------------- 1 | % Beamer mtheme 2 | % 3 | % Copyright 2014 Matthias Vogelgesang 4 | % Licensed under CC-BY-SA 4.0 International. 5 | % 6 | % The initial template comes from the HSRM beamer theme by Benjamin Weiss, which 7 | % you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme. 8 | % 9 | 10 | \ProvidesPackage{beamerfontthememetropolis} 11 | 12 | \RequirePackage[no-math]{fontspec} 13 | 14 | 15 | \defaultfontfeatures{Mapping=tex-text} 16 | \setsansfont[BoldFont={Fira Sans}]{Fira Sans Light} 17 | \setmonofont{Fira Mono} 18 | \newfontfamily\ExtraLight{Fira Sans ExtraLight} 19 | \newfontfamily\Light{Fira Sans Light} 20 | \newfontfamily\Book{Fira Sans} 21 | \newfontfamily\Medium{Fira Sans Medium} 22 | 23 | \AtBeginEnvironment{tabular}{\setsansfont[BoldFont={Fira Sans}, Numbers={Monospaced}]{Fira Sans Light}} 24 | 25 | \setbeamerfont{title}{family=\Book, size=\Large} 26 | \setbeamerfont{author}{family=\ExtraLight, size=\small} 27 | \setbeamerfont{date}{family=\ExtraLight, size=\small} 28 | 29 | \setbeamerfont{section title}{family=\Book, size=\Large} 30 | 31 | \setbeamerfont{block title}{family=\Book, size=\normalsize} 32 | \setbeamerfont{block title alerted}{family=\Book,size=\normalsize} 33 | 34 | \setbeamerfont{subtitle}{family=\Light, size=\fontsize{12}{14}} 35 | \setbeamerfont{frametitle}{family=\Book, series=\scshape, size=\large} 36 | 37 | \setbeamerfont{caption}{size=\small} 38 | \setbeamerfont{caption name}{family=\Book} 39 | 40 | \setbeamerfont{description item}{family=\Book} 41 | 42 | \setbeamerfont{page number in head/foot}{size=\scriptsize} 43 | 44 | 45 | \linespread{1.15} 46 | -------------------------------------------------------------------------------- /beamercolorthememetropolis.sty: -------------------------------------------------------------------------------- 1 | % Beamer mtheme 2 | % 3 | % Copyright 2014 Matthias Vogelgesang 4 | % Licensed under CC-BY-SA 4.0 International. 5 | % 6 | % The initial template comes from the HSRM beamer theme by Benjamin Weiss, which 7 | % you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme. 8 | % 9 | 10 | \ProvidesPackage{beamercolorthememetropolis} 11 | 12 | 13 | %}}} 14 | %{{{ --- Options ---------------------- 15 | 16 | \newif\if@beamer@metropolis@blockbg 17 | \@beamer@metropolis@blockbgfalse 18 | \DeclareOptionBeamer{blockbg}{\@beamer@metropolis@blockbgtrue} 19 | 20 | \DeclareOptionBeamer*{% 21 | \PackageWarning{beamercolorthememetropolis}{Unknown option `\CurrentOption'}% 22 | } 23 | 24 | \ProcessOptionsBeamer 25 | 26 | %}}} 27 | %{{{ --- Colors --------------------- 28 | 29 | % http://paletton.com/#uid=7050t0kkJkJsntwoyp6gYgoddc4 30 | 31 | \definecolor{mDarkBrown}{HTML}{604c38} 32 | \definecolor{mDarkTeal}{HTML}{23373b} 33 | 34 | \definecolor{mLightBrown}{HTML}{EB811B} 35 | \definecolor{mMediumBrown}{HTML}{C87A2F} 36 | 37 | \setbeamercolor{palette primary}{fg=mDarkTeal, bg=black!2} 38 | \setbeamercolor{palette secondary}{fg=white, bg=mDarkTeal} 39 | \setbeamercolor{palette quaternary}{fg=mDarkBrown} 40 | \setbeamercolor{palette tertiary}{fg=white, bg=mMediumBrown} 41 | 42 | \setbeamercolor{title}{parent=palette primary} 43 | \setbeamercolor{subtitle}{parent=palette primary} 44 | \setbeamercolor{author}{parent=palette primary} 45 | \setbeamercolor{date}{parent=palette primary} 46 | \setbeamercolor{institute}{parent=palette primary} 47 | 48 | \setbeamercolor{section title}{parent=palette primary} 49 | \setbeamercolor{frametitle}{parent=palette secondary} 50 | \setbeamercolor{background canvas}{parent=palette primary} 51 | \setbeamercolor{structure}{fg=mDarkTeal} 52 | 53 | \setbeamercolor{normal text}{fg=black!97} 54 | \setbeamercolor{alerted text}{fg=mLightBrown} 55 | 56 | \setbeamercolor{footnote}{fg=mDarkTeal!50} 57 | \setbeamercolor{footnote mark}{fg=.} 58 | \setbeamercolor{page number in head/foot}{fg=mDarkTeal} 59 | 60 | \if@beamer@metropolis@blockbg 61 | 62 | \setbeamercolor{block title}{parent=palette primary,bg=palette primary.bg!80!fg} 63 | \setbeamercolor{block title alerted}{use=alerted text,parent=palette primary,fg=alerted text.fg} 64 | \setbeamercolor{block title example}{use=example text,parent=palette primary,fg=example text.fg} 65 | 66 | \setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg} 67 | \setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg} 68 | \setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg} 69 | 70 | \fi 71 | 72 | \mode 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Beamer mtheme 2 | 3 | The *mtheme* is a Beamer theme with minimal visual. The core design principles 4 | of the theme were described in a [blog post](http://bloerg.net/2014/09/20/a-modern-beamer-theme.html). 5 | Not convinced? Have a look at the [demo slides](demo.pdf). 6 | 7 | 8 | ![Sample](http://i.imgur.com/wP4uGbS.png) 9 | 10 | 11 | ### Installation 12 | 13 | To install the theme either run `make install` or copy the style files ending 14 | with `.sty` to the source files of your presentation. As of now, fonts, colors 15 | and the section indicator are hardcoded into the theme. For the demo you need 16 | 17 | * XeLaTeX, 18 | * the [Fira Sans](https://github.com/mozilla/Fira) font, 19 | * TikZ and 20 | * the Python package [Pygments](http://pygments.org/) that you can get with `pip 21 | install pygments`. 22 | 23 | Depending on the Linux distribution, the packaged name of Fira Sans might be 24 | `Fira Sans OT` instead of `Fira Sans`. In that case, you may have to edit 25 | `beamerfontthememetropolis.sty`. 26 | 27 | 28 | ### Usage 29 | 30 | To build the demo slides just run `make` in the top-level directory. To use this 31 | theme with [Pandoc](http://johnmacfarlane.net/pandoc/)-based presentations, you 32 | can run the following command 33 | 34 | $ pandoc -t beamer --latex-engine=xelatex -V theme:m -o output.pdf input.md 35 | 36 | 37 | ### Customization 38 | 39 | #### Package options 40 | 41 | The `usetitleprogressbar` option adds a thin progress bar similar to the section 42 | progress bar underneath *each* frame title 43 | 44 | ![Progressbar](http://i.imgur.com/4BXHU4K.png) 45 | 46 | In order to use `\cite`, `\ref` and similar commands in a frame title you have 47 | to protect the title. This can be done automatically with the 48 | `protectframetitle` option. 49 | 50 | The `blockbg` option defines extra colors used in defining the blocks. 51 | The blocks then have a gray background similar to other beamer themes. 52 | 53 | By default, this package adds `\vspace{2em}` after the frametitle to 54 | make content more centered on the frame. If using more content per 55 | slide, this can be turned off at the package-level by passing the 56 | `nooffset` option. 57 | 58 | 59 | #### Commands 60 | 61 | The `\plain{title=[]}{body}` command sets a slide in plain dark colors 62 | which can be useful to focus attentation on a single image. 63 | 64 | 65 | #### pgfplot styles 66 | 67 | The beamer theme also contains pre-defined pgfplot styles. Use the `mlineplot` 68 | key to plot line data and `mbarplot` or `horizontal mbarplot` to plot bar 69 | charts. 70 | 71 | ![Charts](http://i.imgur.com/yuEqU3j.png) 72 | 73 | 74 | ### License 75 | 76 | The theme itself is licensed under a [Creative Commons Attribution-ShareAlike 77 | 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/). This 78 | means that if you change the theme and re-distribute it, you *must* retain the 79 | copyright notice header and license it under the same CC-BY-SA license. This 80 | does not affect the presentation that you create with the theme. 81 | -------------------------------------------------------------------------------- /demo.tex: -------------------------------------------------------------------------------- 1 | \documentclass[10pt, compress]{beamer} 2 | 3 | \usetheme{m} 4 | 5 | \usepackage{booktabs} 6 | \usepackage[scale=2]{ccicons} 7 | \usepackage{minted} 8 | 9 | \usepgfplotslibrary{dateplot} 10 | 11 | \usemintedstyle{trac} 12 | 13 | \title{A modern beamer theme} 14 | \subtitle{} 15 | \date{\today} 16 | \author{Matthias Vogelgesang} 17 | \institute{Institute or miscellaneous information} 18 | 19 | \begin{document} 20 | 21 | \maketitle 22 | 23 | \begin{frame}[fragile] 24 | \frametitle{mtheme} 25 | 26 | The \emph{mtheme} is a Beamer theme with minimal visual noise inspired by the 27 | \href{https://github.com/hsrmbeamertheme/hsrmbeamertheme}{\textsc{hsrm} Beamer 28 | Theme} by Benjamin Weiss. 29 | 30 | Enable the theme by loading 31 | 32 | \begin{minted}[fontsize=\small]{latex} 33 | \documentclass{beamer} 34 | \usetheme{m} 35 | \end{minted} 36 | 37 | Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX 38 | installed to enjoy this wonderful typography. 39 | \end{frame} 40 | 41 | \begin{frame}[fragile] 42 | \frametitle{Sections} 43 | Sections group slides of the same topic 44 | 45 | \begin{minted}[fontsize=\small]{latex} 46 | \section{Elements} 47 | \end{minted} 48 | 49 | for which the \emph{mtheme} provides a nice progress indicator \ldots 50 | \end{frame} 51 | 52 | \section{Elements} 53 | 54 | \begin{frame}[fragile] 55 | \frametitle{Typography} 56 | \begin{minted}[fontsize=\small]{latex} 57 | The theme provides sensible defaults to \emph{emphasize} 58 | text, \alert{accent} parts or show \textbf{bold} results. 59 | \end{minted} 60 | 61 | \begin{center}becomes\end{center} 62 | 63 | The theme provides sensible defaults to \emph{emphasize} text, 64 | \alert{accent} parts or show \textbf{bold} results. 65 | \end{frame} 66 | \begin{frame}{Lists} 67 | \begin{columns}[onlytextwidth] 68 | \column{0.5\textwidth} 69 | Items 70 | \begin{itemize} 71 | \item Milk \item Eggs \item Potatos 72 | \end{itemize} 73 | 74 | \column{0.5\textwidth} 75 | Enumerations 76 | \begin{enumerate} 77 | \item First, \item Second and \item Last. 78 | \end{enumerate} 79 | \end{columns} 80 | \end{frame} 81 | \begin{frame}{Descriptions} 82 | \begin{description} 83 | \item[PowerPoint] Meeh. 84 | \item[Beamer] Yeeeha. 85 | \end{description} 86 | \end{frame} 87 | \begin{frame}{Animation} 88 | \begin{itemize}[<+- | alert@+>] 89 | \item \alert<4>{This is\only<4>{ really} important} 90 | \item Now this 91 | \item And now this 92 | \end{itemize} 93 | \end{frame} 94 | \begin{frame}{Figures} 95 | \begin{figure} 96 | \newcounter{density} 97 | \setcounter{density}{20} 98 | \begin{tikzpicture} 99 | \def\couleur{mLightBrown} 100 | \path[coordinate] (0,0) coordinate(A) 101 | ++( 90:5cm) coordinate(B) 102 | ++(0:5cm) coordinate(C) 103 | ++(-90:5cm) coordinate(D); 104 | \draw[fill=\couleur!\thedensity] (A) -- (B) -- (C) --(D) -- cycle; 105 | \foreach \x in {1,...,40}{% 106 | \pgfmathsetcounter{density}{\thedensity+20} 107 | \setcounter{density}{\thedensity} 108 | \path[coordinate] coordinate(X) at (A){}; 109 | \path[coordinate] (A) -- (B) coordinate[pos=.10](A) 110 | -- (C) coordinate[pos=.10](B) 111 | -- (D) coordinate[pos=.10](C) 112 | -- (X) coordinate[pos=.10](D); 113 | \draw[fill=\couleur!\thedensity] (A)--(B)--(C)-- (D) -- cycle; 114 | } 115 | \end{tikzpicture} 116 | \caption{Rotated square from 117 | \href{http://www.texample.net/tikz/examples/rotated-polygons/}{texample.net}.} 118 | \end{figure} 119 | \end{frame} 120 | \begin{frame}{Tables} 121 | \begin{table} 122 | \caption{Largest cities in the world (source: Wikipedia)} 123 | \begin{tabular}{lr} 124 | \toprule 125 | City & Population\\ 126 | \midrule 127 | Mexico City & 20,116,842\\ 128 | Shanghai & 19,210,000\\ 129 | Peking & 15,796,450\\ 130 | Istanbul & 14,160,467\\ 131 | \bottomrule 132 | \end{tabular} 133 | \end{table} 134 | \end{frame} 135 | \begin{frame}{Blocks} 136 | 137 | \begin{block}{This is a block title} 138 | This is soothing. 139 | \end{block} 140 | 141 | \end{frame} 142 | \begin{frame}{Math} 143 | \begin{equation*} 144 | e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n 145 | \end{equation*} 146 | \end{frame} 147 | \begin{frame}{Line plots} 148 | \begin{figure} 149 | \begin{tikzpicture} 150 | \begin{axis}[ 151 | mlineplot, 152 | width=0.9\textwidth, 153 | height=6cm, 154 | ] 155 | 156 | \addplot {sin(deg(x))}; 157 | \addplot+[samples=100] {sin(deg(2*x))}; 158 | 159 | \end{axis} 160 | \end{tikzpicture} 161 | \end{figure} 162 | \end{frame} 163 | \begin{frame}{Bar charts} 164 | \begin{figure} 165 | \begin{tikzpicture} 166 | \begin{axis}[ 167 | mbarplot, 168 | xlabel={Foo}, 169 | ylabel={Bar}, 170 | width=0.9\textwidth, 171 | height=6cm, 172 | ] 173 | 174 | \addplot plot coordinates {(1, 20) (2, 25) (3, 22.4) (4, 12.4)}; 175 | \addplot plot coordinates {(1, 18) (2, 24) (3, 23.5) (4, 13.2)}; 176 | \addplot plot coordinates {(1, 10) (2, 19) (3, 25) (4, 15.2)}; 177 | 178 | \legend{lorem, ipsum, dolor} 179 | 180 | \end{axis} 181 | \end{tikzpicture} 182 | \end{figure} 183 | \end{frame} 184 | \begin{frame}{Quotes} 185 | \begin{quote} 186 | Veni, Vidi, Vici 187 | \end{quote} 188 | \end{frame} 189 | 190 | 191 | \section{Conclusion} 192 | 193 | \begin{frame}{Summary} 194 | 195 | Get the source of this theme and the demo presentation from 196 | 197 | \begin{center}\url{github.com/matze/mtheme}\end{center} 198 | 199 | The theme \emph{itself} is licensed under a 200 | \href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons 201 | Attribution-ShareAlike 4.0 International License}. 202 | 203 | \begin{center}\ccbysa\end{center} 204 | 205 | \end{frame} 206 | 207 | \plain{Questions?} 208 | 209 | \end{document} 210 | -------------------------------------------------------------------------------- /beamerthemem.sty: -------------------------------------------------------------------------------- 1 | % Beamer mtheme 2 | % 3 | % Copyright 2014 Matthias Vogelgesang 4 | % Licensed under CC-BY-SA 4.0 International. 5 | % 6 | % The initial template comes from the HSRM beamer theme by Benjamin Weiss, which 7 | % you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme. 8 | % 9 | 10 | \ProvidesPackage{beamerthemem} 11 | 12 | %{{{ --- Options ---------------------- 13 | 14 | \newif\if@useTitleProgressBar 15 | \newif\if@protectFrameTitle 16 | 17 | \@useTitleProgressBarfalse 18 | \@protectFrameTitlefalse 19 | 20 | \newlength{\@mtheme@voffset} 21 | \setlength{\@mtheme@voffset}{2em} 22 | 23 | \DeclareOptionBeamer{usetitleprogressbar}{\@useTitleProgressBartrue} 24 | \DeclareOptionBeamer{protectframetitle}{\@protectFrameTitletrue} 25 | \DeclareOptionBeamer{blockbg}{% 26 | \PassOptionsToPackage{blockbg}{beamercolorthememetropolis}% 27 | } 28 | \DeclareOptionBeamer{nooffset}{\setlength{\@mtheme@voffset}{0em}} 29 | 30 | \DeclareOptionBeamer*{% 31 | \PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}% 32 | } 33 | 34 | \ProcessOptionsBeamer 35 | 36 | %}}} 37 | 38 | \mode 39 | 40 | %{{{ --- Packages --------------------- 41 | 42 | \RequirePackage[no-math]{fontspec} 43 | \RequirePackage{etoolbox} 44 | \RequirePackage{tikz} 45 | \RequirePackage{pgfplots} 46 | 47 | \usetikzlibrary{backgrounds} 48 | \usetikzlibrary{calc} 49 | 50 | \usecolortheme{metropolis} 51 | \usefonttheme{metropolis} 52 | 53 | %}}} 54 | %{{{ --- Titlepage -------------------- 55 | 56 | \def\maketitle{\ifbeamer@inframe\titlepage\else\frame[plain]{\titlepage}\fi} 57 | 58 | \def\titlepage{\usebeamertemplate{title page}} 59 | \setbeamertemplate{title page} 60 | { 61 | \begin{minipage}[b][\paperheight]{\textwidth} 62 | \vfill 63 | \ifx\inserttitle\@empty% 64 | \else% 65 | {\raggedright\linespread{1.0}\usebeamerfont{title}\usebeamercolor[fg]{title}\scshape\MakeLowercase{\inserttitle}\par}% 66 | \vspace*{0.5em} 67 | \fi% 68 | \ifx\insertsubtitle\@empty% 69 | \else% 70 | {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% 71 | \vspace*{0.5em} 72 | \fi% 73 | \begin{tikzpicture}\draw[alerted text.fg] (0, 0) -- (\textwidth, 0);\end{tikzpicture}% 74 | \vspace*{1em} 75 | \ifx\insertauthor\@empty% 76 | \else% 77 | {\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par}% 78 | \vspace*{0.25em} 79 | \fi% 80 | \ifx\insertdate\@empty% 81 | \else% 82 | {\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par}% 83 | \fi% 84 | \ifx\insertinstitut\@empty% 85 | \else% 86 | \vspace*{3mm} 87 | {\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute\par}% 88 | \fi% 89 | \vfill 90 | \vspace*{5mm} 91 | \end{minipage} 92 | } 93 | 94 | %}}} 95 | %{{{ --- Progressbar ------------------ 96 | 97 | \makeatletter 98 | \def\progressbar@sectionprogressbar{} 99 | \def\progressbar@titleprogressbar{} 100 | \newcount\progressbar@tmpcounta % auxiliary counter 101 | \newcount\progressbar@tmpcountb % auxiliary counter 102 | \newdimen\progressbar@pbht % progressbar height 103 | \newdimen\progressbar@pbwd % progressbar width 104 | \newdimen\progressbar@tmpdim % auxiliary dimension 105 | 106 | \progressbar@pbwd=22em 107 | \progressbar@pbht=0.4pt 108 | 109 | % the progress bar 110 | \def\progressbar@sectionprogressbar{% 111 | {\usebeamercolor{palette primary}% 112 | \progressbar@tmpcounta=\insertframenumber 113 | \progressbar@tmpcountb=\inserttotalframenumber 114 | \progressbar@tmpdim=\progressbar@pbwd 115 | \divide\progressbar@tmpdim by 100 116 | \multiply\progressbar@tmpdim by \progressbar@tmpcounta 117 | \divide\progressbar@tmpdim by \progressbar@tmpcountb 118 | \multiply\progressbar@tmpdim by 100 119 | 120 | \makebox[\textwidth][c]{ 121 | \begin{tikzpicture}[tight background] 122 | 123 | \node[anchor=west, fg, inner sep=0pt] at (0pt, 0pt) {\insertsectionHEAD}; 124 | 125 | \draw[anchor=west, fg!20, fill=fg!20, inner sep=0pt] 126 | (2pt, -16pt) rectangle ++ (\progressbar@pbwd, \progressbar@pbht); 127 | 128 | \draw[anchor=west, fg, fill=fg, inner sep=0pt] 129 | (2pt, -16pt) rectangle ++ (\progressbar@tmpdim, \progressbar@pbht); 130 | \end{tikzpicture}% 131 | } 132 | } % end usebeamercolor{palette primary} 133 | } 134 | 135 | \if@useTitleProgressBar 136 | \def\progressbar@titleprogressbar{% 137 | \progressbar@tmpcounta=\insertframenumber 138 | \progressbar@tmpcountb=\inserttotalframenumber 139 | \progressbar@tmpdim=\paperwidth 140 | \divide\progressbar@tmpdim by 100 141 | \multiply\progressbar@tmpdim by \progressbar@tmpcounta 142 | \divide\progressbar@tmpdim by \progressbar@tmpcountb 143 | \multiply\progressbar@tmpdim by 100 144 | {% 145 | \usebeamercolor{palette quaternary}% 146 | \usebeamercolor{alerted text}% 147 | \begin{tikzpicture}[tight background] 148 | \draw[palette quaternary.fg, fill=palette quaternary.fg] (0, 0) rectangle ($(\paperwidth, 0.6pt) - (0.4pt, 0)$); 149 | \draw[alerted text.fg, fill=alerted text.fg] (0, 0) rectangle (\progressbar@tmpdim, 0.6pt); 150 | \end{tikzpicture}% 151 | }% 152 | } 153 | \fi 154 | %}}} 155 | %{{{ --- Commands --------------------- 156 | 157 | \newcommand{\insertsectionHEAD}{% 158 | \expandafter\insertsectionHEADaux\insertsectionhead} 159 | \newcommand{\insertsectionHEADaux}[3]{\textsc{\MakeLowercase{#3}} 160 | } 161 | 162 | \newcommand{\plain}[2][]{% 163 | \begingroup 164 | \setbeamercolor{background canvas}{use=palette primary,bg=palette primary.fg} 165 | \begin{frame}{#1} 166 | \centering 167 | \vfill\vspace{1em}\usebeamerfont{section title}\textcolor{white}{\scshape #2}\vfill 168 | \end{frame} 169 | \endgroup 170 | } 171 | 172 | %}}} 173 | %{{{ --- Itemize ---------------------- 174 | 175 | \setlength{\leftmargini}{1em} 176 | 177 | % Actually one level should be enough but ... 178 | \setlength{\leftmarginii}{1em} 179 | \setlength{\leftmarginiii}{1em} 180 | 181 | \newcommand{\itemBullet}{∙} 182 | 183 | \setbeamertemplate{itemize item}{\itemBullet} 184 | \setbeamertemplate{itemize subitem}{\itemBullet} 185 | \setbeamertemplate{itemize subsubitem}{\itemBullet} 186 | \setlength{\parskip}{0.5em} 187 | 188 | %}}} 189 | %{{{ --- Sections --------------------- 190 | 191 | % Insert frame with section title at every section start 192 | \AtBeginSection[] 193 | { 194 | \begingroup 195 | \setbeamercolor{background canvas}{parent=palette primary} 196 | \begin{frame}[plain] 197 | \vspace{2em}\usebeamerfont{section title} 198 | \progressbar@sectionprogressbar% 199 | \end{frame} 200 | \endgroup 201 | } 202 | 203 | %}}} 204 | %{{{ --- Captions --------------------- 205 | 206 | \setbeamertemplate{caption label separator}{: } 207 | \setbeamertemplate{caption}[numbered] 208 | 209 | %}}} 210 | %{{{ --- Footline/footnote ------------ 211 | 212 | \usenavigationsymbolstemplate{} 213 | \setbeamertemplate{footline} 214 | {% 215 | \begin{beamercolorbox}[wd=\textwidth,ht=3ex,dp=3ex,leftskip=0.3cm,rightskip=0.3cm]{structure}% 216 | \hfill\usebeamerfont{page number in head/foot}% 217 | \insertframenumber% 218 | \end{beamercolorbox}% 219 | } 220 | 221 | \setbeamertemplate{footnote} 222 | {% 223 | \parindent 0em\noindent% 224 | \raggedright 225 | \usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par% 226 | } 227 | 228 | %}}} 229 | %{{{ --- Frametitle ------------------- 230 | 231 | \setbeamertemplate{frametitle}{% 232 | \nointerlineskip 233 | \begin{beamercolorbox}[wd=\paperwidth,leftskip=0.3cm,rightskip=0.3cm,ht=2.5ex,dp=1.5ex]{frametitle} 234 | \if@protectFrameTitle 235 | \usebeamerfont{frametitle}\MakeLowercase{\protect\insertframetitle}% 236 | \else 237 | \usebeamerfont{frametitle}\MakeLowercase{\insertframetitle}% 238 | \fi 239 | \end{beamercolorbox}% 240 | \if@useTitleProgressBar 241 | \vspace{-.5em} 242 | \begin{beamercolorbox}[wd=\paperwidth,ht=1pt,dp=0pt]{frametitle} 243 | \progressbar@titleprogressbar 244 | \end{beamercolorbox} 245 | \fi 246 | \vspace{\@mtheme@voffset} 247 | } 248 | 249 | %}}} 250 | %{{{ --- pgfplots --------------------- 251 | 252 | %{{{ Colors 253 | 254 | % TolColors from http://www.r-bloggers.com/the-paul-tol-21-color-salute/ 255 | \definecolor{TolColor1}{HTML}{332288} % dark purple 256 | \definecolor{TolColor2}{HTML}{6699CC} % dark blue 257 | \definecolor{TolColor3}{HTML}{88CCEE} % light blue 258 | \definecolor{TolColor4}{HTML}{44AA99} % light green 259 | \definecolor{TolColor5}{HTML}{117733} % dark green 260 | \definecolor{TolColor6}{HTML}{999933} % dark brown 261 | \definecolor{TolColor7}{HTML}{DDCC77} % light brown 262 | \definecolor{TolColor8}{HTML}{661100} % dark red 263 | \definecolor{TolColor9}{HTML}{CC6677} % light red 264 | \definecolor{TolColor10}{HTML}{AA4466} % light pink 265 | \definecolor{TolColor11}{HTML}{882255} % dark pink 266 | \definecolor{TolColor12}{HTML}{AA4499} % light purple 267 | 268 | %}}} 269 | %{{{ Color cycles 270 | 271 | \pgfplotscreateplotcyclelist{mbarplot cycle}{% 272 | {draw=TolColor2, fill=TolColor2!70}, 273 | {draw=TolColor7, fill=TolColor7!70}, 274 | {draw=TolColor4, fill=TolColor4!70}, 275 | {draw=TolColor11, fill=TolColor11!70}, 276 | {draw=TolColor1, fill=TolColor1!70}, 277 | {draw=TolColor8, fill=TolColor8!70}, 278 | {draw=TolColor6, fill=TolColor6!70}, 279 | {draw=TolColor9, fill=TolColor9!70}, 280 | {draw=TolColor10, fill=TolColor10!70}, 281 | {draw=TolColor12, fill=TolColor12!70}, 282 | {draw=TolColor3, fill=TolColor3!70}, 283 | {draw=TolColor5, fill=TolColor5!70}, 284 | } 285 | 286 | \pgfplotscreateplotcyclelist{mlineplot cycle}{% 287 | {TolColor2, mark=*, mark size=1.5pt}, 288 | {TolColor7, mark=square*, mark size=1.3pt}, 289 | {TolColor4, mark=triangle*, mark size=1.5pt}, 290 | {TolColor6, mark=diamond*, mark size=1.5pt}, 291 | } 292 | 293 | %}}} 294 | %{{{ Styles 295 | 296 | \pgfplotsset{ 297 | compat=1.9, 298 | mbaseplot/.style={ 299 | legend style={ 300 | draw=none, 301 | fill=none, 302 | cells={anchor=west}, 303 | }, 304 | x tick label style={ 305 | font=\footnotesize 306 | }, 307 | y tick label style={ 308 | font=\footnotesize 309 | }, 310 | legend style={ 311 | font=\footnotesize 312 | }, 313 | major grid style={ 314 | dotted, 315 | }, 316 | axis x line*=bottom, 317 | }, 318 | mlineplot/.style={ 319 | mbaseplot, 320 | xmajorgrids=true, 321 | ymajorgrids=true, 322 | major grid style={dotted}, 323 | axis x line=bottom, 324 | axis y line=left, 325 | legend style={ 326 | cells={anchor=west}, 327 | draw=none 328 | }, 329 | cycle list name=mlineplot cycle, 330 | }, 331 | mbarplot base/.style={ 332 | mbaseplot, 333 | bar width=6pt, 334 | axis y line*=none, 335 | }, 336 | mbarplot/.style={ 337 | mbarplot base, 338 | ybar, 339 | xmajorgrids=false, 340 | ymajorgrids=true, 341 | area legend, 342 | legend image code/.code={% 343 | \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); 344 | }, 345 | cycle list name=mbarplot cycle, 346 | }, 347 | horizontal mbarplot/.style={ 348 | mbarplot base, 349 | xmajorgrids=true, 350 | ymajorgrids=false, 351 | xbar stacked, 352 | area legend, 353 | legend image code/.code={% 354 | \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); 355 | }, 356 | cycle list name=mbarplot cycle, 357 | }, 358 | disable thousands separator/.style={ 359 | /pgf/number format/.cd, 360 | 1000 sep={} 361 | }, 362 | } 363 | 364 | %}}} 365 | 366 | \mode 367 | 368 | %{{{ misc 369 | \let\otp\titlepage 370 | \renewcommand{\titlepage}{\otp\addtocounter{framenumber}{-1}} 371 | \newcommand{\mreducelistspacing}{\vspace{-\topsep}} 372 | 373 | \linespread{1.15} 374 | 375 | %}}} 376 | --------------------------------------------------------------------------------