Metroazwei

A modern LaTeX Beamer theme for the A2 collaboration

Category

Presentation

License

Free to use (MIT)

File

demo/demo.tex

demo.texRead-only preview
\documentclass[
		%fleqn, % so that equations are left and not center aligned
		10pt
		]{beamer}
%\documentclass[10pt,fleqn,handout]{beamer}
\usetheme[ % choose your options, choose wisely
	titleformat title= regular, % regular, smallcaps, allsmallcaps, allcaps
	titleformat frame= regular, % regular, smallcaps, allsmallcaps, allcaps
	progressbar=frametitle,% frametitle, head, foot, none
	numbering=fraction,% counter, fraction, none
	block=fill,% fill, transparent
	sectionpage=progressbar,% none, simple, progressbar
	%
	]{metroazwei}
%
%%%------------- setup footer content -------------%
\setbeamertemplate{frame footer}{
	\insertauthor
	\hspace{1.5ex}-\hspace{1.5ex} 
	\insertshorttitle
	\ifx\insertsection\empty\else
		\hspace{1.5ex}-\hspace{1.5ex}\insertsection
	\fi
}
%
%%%------------- packages -------------%
\usepackage[scale=2]{ccicons} % creative commons icons
\usepackage{booktabs} % better tables
\usepackage{pifont} % for to do list
\usepackage{mdframed} % for more boxes

%%%------------- ToDoList -------------%
%\usepackage{pifont} %important!
\newcommand{\cmark}{\textcolor{A2green}{\ding{51}}}%
\newcommand{\xmark}{\textcolor{A2red}{\ding{55}}}%
\newcommand{\done}{\rlap{$\square$}{\raisebox{1.5pt}{\large\hspace{1pt}\cmark}}\hspace{-2.2pt}}
\newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{.5pt}\xmark}\hspace{-0pt}}
\makeatletter
\newcommand{\mymakelabel}[1]{%
	\begingroup
	\def\@tempa{#1}%
	\def\@tempb{\@itemlabel}%
	\ifx\@tempa\@tempb
	\endgroup
	\hss \llap{$\square$}%
	\else
	\endgroup
	\hss \llap{#1}%
	\fi
}
\newenvironment{todolist}{%
	\vspace*{.5em}\itemize
	\let\makelabel\mymakelabel
}{%
	\enditemize\vspace*{.5em}
}
\makeatother

%%%------------- ToDoList -------------%
%\usepackage{mdframed} %important!
\mdfdefinestyle{alert}{
	innertopmargin=1.75ex,
	innerbottommargin=1.75ex,
	innerleftmargin=2.25ex,
	innerrightmargin=3.75ex,
	linewidth=3pt,
	linecolor=A2red,
	topline=false,
	bottomline=false,
	%rightline=false,
	%backgroundcolor=GREYteal,
	%fontcolor=white,
	backgroundcolor=DARKteal!6,
	fontcolor=DARKteal,
}
\mdfdefinestyle{example}{
	innertopmargin=1.75ex,
	innerbottommargin=1.75ex,
	innerleftmargin=2.25ex,
	innerrightmargin=3.75ex,
	linewidth=3pt,
	linecolor=GREYteal,
	topline=false,
	bottomline=false,
	%rightline=false,
	%backgroundcolor=GREYteal,
	%fontcolor=white,
	backgroundcolor=DARKteal!6,
	fontcolor=DARKteal,
}

%%%------------- title -------------%
\title[Metropolis A2] % short title
			{Metropolis theme for the A2 Collaboration} % long title
\subtitle{because we're all using different presentations so far}
\date{Mainz, June 2018}
\author{John Doe}
\institute[JGU Mainz]{
	Institute for Nuclear Physics\\ 
	Johannes Gutenberg University of Mainz\\ 
}
\newcommand{\logoheight}{1.0cm}
\newcommand{\logospace}{\hspace*{2mm}}
\titlegraphic{
	\includegraphics[height=\logoheight]{a2logo_light.pdf}
}

%%------------- TALK -------------%
\begin{document}

\maketitle

\begin{frame}{Outline}
%		\setbeamertemplate{section in toc}[sections numbered]
%		\setbeamertemplate{subsection in toc}[subsections numbered]
		\tableofcontents
\end{frame}

\section{Introduction \& Installation}

\begin{frame}{Metropolis A2 Theme}
	This theme is based upon the Beamer theme Metropolis by Matthias Vogelgesang, Get the original theme at:
	\begin{center}\url{github.com/matze/mtheme}\end{center}
	
	The theme \emph{itself} is licensed under a
	\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
		Attribution-ShareAlike 4.0 International License}.
	
	\begin{center}\ccbysa\end{center}
	
	This theme is intended to be used with Mozilla's \emph{Fira Sans} font and to be compiled with XeTeX. If you don't have the font installed it will fallback to the standard font.
\end{frame}

\begin{frame}[fragile]{Installation}
To be able to use the theme alongside the original metropolis theme it is renamed to \alert{metroazwei}. Just download the github zip or git clone it into your home folder:
\begin{verbatim}
~/texmf/tex/latex/metroazwei
\end{verbatim}
Then you can use it in any beamer presentation like this:
\begin{verbatim}
\documentclass[10pt]{beamer}
\usetheme[]{metroazwei}
\end{verbatim}
Take a look into this demo pdf for different options or even better take a look at the original documentation of metropolis.
\end{frame}

\section{Theme features}
\subsection{Title formats}

\begin{frame}{Title formats}
	This theme supports 4 different title formats:
	\begin{itemize}
		\item Regular
		\item \textsc{Small caps}
		\item \textsc{all small caps}
		\item ALL CAPS
	\end{itemize}
	They can either be set at once for every title type or individually.
\end{frame}

{
\metroset{titleformat frame=smallcaps}
	\begin{frame}{Small caps}
		This frame uses the \texttt{smallcaps} title format.
		\vspace{5mm}
		\begin{alertblock}{Potential Problems}
			Be aware that not every font supports small caps. If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in small caps will be typeset with the Computer Modern Serif font instead.
		\end{alertblock}
	\end{frame}
}

\subsection{Elements}

\begin{frame}[fragile]{Typography}
	\begin{verbatim}
The theme provides sensible defaults to
\emph{emphasize} text, \alert{accent} parts
or show \textbf{bold} results.\end{verbatim}
	\begin{center}becomes\end{center}
	The theme provides sensible defaults to \emph{emphasize} text,
	\alert{accent} parts or show \textbf{bold} results.
\end{frame}

\begin{frame}[fragile]{Colours}
	You can use some colours defined in the theme:
	
	These are \textbf{\textcolor{A2red}{A2red}}, \textbf{\textcolor{A2green}{A2green}}, \textbf{\textcolor{DARKteal}{DARKteal}}, \textbf{\textcolor{LIGHTteal}{LIGHTteal}} and \textbf{\textcolor{GREYteal}{GREYteal}}.
	
	All colours in this theme are derived from these colours (well, including white).
\end{frame}

\begin{frame}{Font feature test}
	\begin{itemize}
		\item Regular
		\item \textit{Italic}
		\item \textsc{Small Caps}
		\item \textbf{Bold}
		\item \textbf{\textit{Bold Italic}}
		\item \textbf{\textsc{Bold Small Caps}}
		\item \texttt{Monospace}
		\item \texttt{\textit{Monospace Italic}}
		\item \texttt{\textbf{Monospace Bold}}
		\item \texttt{\textbf{\textit{Monospace Bold Italic}}}
	\end{itemize}
\end{frame}


\begin{frame}{Tables}
	Use the booktabs package for nicer tables
	\begin{table}
		\caption{Largest cities in the world (source: Wikipedia)}
		\begin{tabular}{@{} lr @{}}
		\toprule
		City & Population\\
		\midrule
		Mexico City & 20,116,842\\
		Shanghai & 19,210,000\\
		Peking & 15,796,450\\
		Istanbul & 14,160,467\\
		\bottomrule
		\end{tabular}
	\end{table}
\end{frame}

\begin{frame}{Blocks}
Three different block environments are pre-defined and may be styled with an
optional background color.
\begin{columns}[T,onlytextwidth]
	\column{0.47\textwidth}
	\metroset{block=transparent}
		\begin{block}{Default}
		Block content.
		\end{block}
		
		\begin{alertblock}{Alert}
		Block content.
		\end{alertblock}
		
		\begin{exampleblock}{Example}
		Block content.
		\end{exampleblock}

	\column{0.47\textwidth}
	
		\metroset{block=fill}
	
		\begin{block}{Default}
		Block content.
		\end{block}
		
		\begin{alertblock}{Alert}
		Block content.
		\end{alertblock}
		
		\begin{exampleblock}{Example}
		Block content.
		\end{exampleblock}
	\end{columns}
\end{frame}

\begin{frame}[fragile]{Footer}
In your presentation you can set the footer to display information about you and your talk. A sample footer is this:
\begin{verbatim}
\setbeamertemplate{frame footer}{
  \insertauthor
  \hspace{1.5ex}-\hspace{1.5ex} 
  \insertshorttitle
  \ifx\insertsection
    \empty
  \else
    \hspace{1.5ex}-\hspace{1.5ex}\insertsection
  \fi
}\end{verbatim}

\end{frame}

\begin{frame}[fragile]{Titlepage logos}
In order to display one or several logos on your titlepage (for example institute, sponsor, collaboration,...) you can use the \emph{titlegraphic} environment. It's useful to set logoheight and space between logos globally:
\begin{verbatim}
\newcommand{\logoheight}{1.0cm}
\newcommand{\logospace}{\hspace*{2mm}}
\titlegraphic{
\includegraphics[height=\logoheight]{img/logo1.pdf}
\logospace
\includegraphics[height=\logoheight]{img/logo2.pdf}
\logospace
\includegraphics[height=\logoheight]{img/logo3.pdf}
}\end{verbatim}

\end{frame}

\subsection{A2 Logo}

\begin{frame}[fragile]{A2 Logo}
To change the A2 Logo in the upper right corner you need to edit the theme file
\begin{verbatim}beamerouterthememetroazwei.sty\end{verbatim} at lines 98 - 100:
\begin{verbatim}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,yshift=-0.6mm,xshift=-0.5mm]
at (current page.north east){\includegraphics
[height=0.6cm]{a2logo_white.pdf}};
\end{tikzpicture}\end{verbatim}
But be aware that this changes all presentations which will be compiled with this theme.
\end{frame}

\subsection{Fancy frames}

\begin{frame}[fragile]
You can use this:
\begin{verbatim}
\begin{frame}[plain, standout]
I'm a simple slide to emphasize something important.
\end{frame}\end{verbatim}
to get \dots
\end{frame}

\begin{frame}[plain, standout]
	I'm a simple slide to emphasize something important.
\end{frame}

\section{more Features which are included in this demo.tex}

\begin{frame}[fragile]{To Do Lists}

Fancy ToDo lists

Thanks to Sascha Wagner to implement this
\begin{todolist}
	\item[\done] Frame the problem
	\item Write solution
	\item[\wontfix] profit
\end{todolist}

\begin{verbatim}
\begin{todolist}
  \item[\done] Frame the problem
  \item Write solution
  \item[\wontfix] profit
\end{todolist}
\end{verbatim}
\end{frame}

\begin{frame}[fragile]{Boxes which fit the Blocks}
	\begin{mdframed}[style=alert,userdefinedwidth=1\textwidth,align=center]
		Across the centuries billions upon billions courage of our questions galaxies, vanquish the impossible.
	\end{mdframed}
	\begin{mdframed}[style=example,userdefinedwidth=1\textwidth,align=center]
		As a patch of light, muse about circumnavigated, inconspicuous motes of rock and gas.
	\end{mdframed}


{\footnotesize  \begin{verbatim}
\begin{mdframed}
  [style=alert,userdefinedwidth=1\textwidth,align=center]
    Across...
\end{mdframed}
\begin{mdframed}
  [style=example,userdefinedwidth=1\textwidth,align=center]
    As a patch...
\end{mdframed}
\end{verbatim}}
\end{frame}


\section{Conclusion}

\begin{frame}{Where to find me}
Get the theme at:
\begin{center}\url{github.com/A2-Collaboration-dev/metroazwei}\end{center}

The theme \emph{itself} is licensed under a
\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
	Attribution-ShareAlike 4.0 International License}.

\begin{center}\ccbysa\end{center}

\end{frame}


\end{document}
Preview
Metroazwei preview
Metroazwei LaTeX Template | Bibby | Bibby AI