aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@mullvad.net>2022-09-04 00:18:24 +0200
committerRasmus Dahlberg <rasmus@mullvad.net>2022-09-04 00:18:24 +0200
commit5dd6c416aa6e14dd5ddbe4622274b71b86b7a030 (patch)
tree276709554696ba94dc3ef4ab42d45aed806442e4
parented26572d987c2d27fa2962cbda5ef2f9176bb254 (diff)
add Sigsum beamer template
-rw-r--r--beamer/.gitignore9
-rw-r--r--beamer/README.md18
-rw-r--r--beamer/beamercolorthemesigsum.sty26
-rw-r--r--beamer/beamerfontthemesigsum.sty11
-rw-r--r--beamer/beamerinnerthemesigsum.sty43
-rw-r--r--beamer/beamerouterthemesigsum.sty42
-rw-r--r--beamer/beamerthemesigsum.sty23
-rw-r--r--beamer/cfg/preamble.tex112
-rw-r--r--beamer/demo.pdfbin0 -> 93032 bytes
-rw-r--r--beamer/main.tex22
-rw-r--r--beamer/src/body.tex45
11 files changed, 351 insertions, 0 deletions
diff --git a/beamer/.gitignore b/beamer/.gitignore
new file mode 100644
index 0000000..337c393
--- /dev/null
+++ b/beamer/.gitignore
@@ -0,0 +1,9 @@
+*.aux
+*.fdb_latexmk
+*.fls
+*.log
+*.nav
+*.out
+*.pdf
+*.snm
+*.toc
diff --git a/beamer/README.md b/beamer/README.md
new file mode 100644
index 0000000..3e0181f
--- /dev/null
+++ b/beamer/README.md
@@ -0,0 +1,18 @@
+# README
+
+**Warning:**
+work in progress template.
+
+## Quick start
+
+Install on Debian:
+
+ # apt install texlive-full
+
+Compile:
+
+ $ latexmk -pdf
+ ...
+
+This builds from `main.tex`, and writes the result to `main.pdf`. Drop the
+"handout" option in `main.tex` to build with the effect of `\pause` and such.
diff --git a/beamer/beamercolorthemesigsum.sty b/beamer/beamercolorthemesigsum.sty
new file mode 100644
index 0000000..cbfd0a8
--- /dev/null
+++ b/beamer/beamercolorthemesigsum.sty
@@ -0,0 +1,26 @@
+\mode<presentation>
+
+%
+% Color definitions
+%
+\definecolor{sigsumWhite}{HTML}{FAF9F5}
+\definecolor{sigsumBlack}{HTML}{333333}
+\definecolor{sigsumOrange}{HTML}{DB4D2C}
+\definecolor{sigsumRed}{HTML}{581303}
+\definecolor{sigsumBlue}{HTML}{6B60E3}
+
+%
+% Beamer colors
+%
+\setbeamercolor*{titlepage}{fg=sigsumBlack}
+\setbeamercolor*{author}{fg=sigsumRed}
+\setbeamercolor*{date}{fg=sigsumBlack}
+\setbeamercolor*{header}{bg=sigsumOrange,fg=sigsumWhite}
+\setbeamercolor*{trailer}{bg=sigsumBlack,fg=sigsumWhite}
+\setbeamercolor*{background canvas}{bg=sigsumWhite}
+\setbeamercolor*{frametitle}{fg=sigsumBlack}
+\setbeamercolor*{normal text}{fg=sigsumBlack}
+\setbeamercolor*{alerted text}{fg=sigsumRed}
+\setbeamercolor*{item}{fg=sigsumOrange}
+
+\mode<all>
diff --git a/beamer/beamerfontthemesigsum.sty b/beamer/beamerfontthemesigsum.sty
new file mode 100644
index 0000000..9592eb9
--- /dev/null
+++ b/beamer/beamerfontthemesigsum.sty
@@ -0,0 +1,11 @@
+\mode<presentation>
+
+%
+% Beamer fonts
+%
+\setbeamerfont{title}{size=\large,shape=\bfseries}
+\setbeamerfont{subtitle}{size=\normalsize,shape=\bfseries}
+\setbeamerfont{frametitle}{size=\large,shape=\bfseries}
+\setbeamerfont{date}{size=\small}
+
+\mode<all>
diff --git a/beamer/beamerinnerthemesigsum.sty b/beamer/beamerinnerthemesigsum.sty
new file mode 100644
index 0000000..d8e5a70
--- /dev/null
+++ b/beamer/beamerinnerthemesigsum.sty
@@ -0,0 +1,43 @@
+\mode<presentation>
+
+\defbeamertemplate*{title page}{sigsum}[1][]{
+ \begin{tikzpicture}[remember picture, overlay]
+ \usebeamercolor{titlepage}
+ %
+ % Draw top-most rectangle with logo
+ %
+ \filldraw[draw=none,fill=sigsumOrange]
+ ($ (current page.east) + (1,0) $) --
+ ($ (current page.north east) + (1,1) $) --
+ ($ (current page.north west) + (-1,1) $) --
+ ($ (current page.west) + (-1,0) $) --
+ ($ (current page.east) + (1,0) $);
+ \node[draw=none] (Logo) at ($ (current page.center) !.5! (current page.north) $) {
+ \includegraphics[width=.6\textwidth]{img/logo}
+ };
+
+ %
+ % Add title
+ %
+ \node[text=fg, text width=0.75\paperwidth] (Title) at ([shift={(0,-0.5cm)}]current page){
+ \centering\usebeamerfont{title}\inserttitle\\
+ };
+
+ %
+ % Add date
+ %
+ \node[text=fg, text width=0.75\paperwidth, below=0pt of Title] (Subtitle){
+ \centering\usebeamerfont{date}\today\\%
+ };
+
+ %
+ % Add authors
+ %
+ \usebeamercolor{author}
+ \node[text=fg, text width=0.75\paperwidth, below=0pt of Subtitle] (Author){
+ \centering\usebeamerfont{author}\insertauthor\\%
+ };
+ \end{tikzpicture}
+}
+
+\mode<all>
diff --git a/beamer/beamerouterthemesigsum.sty b/beamer/beamerouterthemesigsum.sty
new file mode 100644
index 0000000..969e40d
--- /dev/null
+++ b/beamer/beamerouterthemesigsum.sty
@@ -0,0 +1,42 @@
+\mode<presentation>
+
+%
+% Frame header
+%
+\defbeamertemplate*{frametitle}{corporate}[1][]{%
+ \nointerlineskip
+ % Add frame title
+ \begin{beamercolorbox}[wd=\paperwidth, ht=3ex, dp=1.5ex, left, leftskip=2ex]{header}
+ \centering\insertframetitle
+ \end{beamercolorbox}
+ % Add line after
+ \nointerlineskip
+ \begin{beamercolorbox}[wd=\paperwidth, ht=0.25ex ]{trailer}
+ \end{beamercolorbox}
+}
+
+%
+% Frame trailer
+%
+\defbeamertemplate*{footline}{corporate}{\hbox{%
+ % Add website in the left-most portion of the trailer
+ \begin{beamercolorbox}[wd=0.20\paperwidth, ht=2ex, dp=0.5ex, left]{trailer}
+ \hfill
+ www.sigsum.org
+ \hfill
+ \end{beamercolorbox}%
+ % Add in the trailer's middle portion
+ \begin{beamercolorbox}[wd=0.6\paperwidth, ht=2ex, dp=0.5ex, left]{header}
+ \hfill
+ \inserttitle
+ \hfill
+ \end{beamercolorbox}%
+ % Add page counter in the right-most portion of the trailer
+ \begin{beamercolorbox}[wd=0.20\paperwidth, ht=2ex, dp=0.5ex, left]{trailer}
+ \hfill
+ \insertframenumber/\inserttotalframenumber
+ \hfill
+ \end{beamercolorbox}
+}}
+
+\mode<all>
diff --git a/beamer/beamerthemesigsum.sty b/beamer/beamerthemesigsum.sty
new file mode 100644
index 0000000..338d2bd
--- /dev/null
+++ b/beamer/beamerthemesigsum.sty
@@ -0,0 +1,23 @@
+\mode<presentation>
+
+%
+% Load beamer settings
+%
+\usecolortheme{sigsum}
+\usefonttheme{sigsum}
+\useinnertheme{sigsum}
+\useoutertheme{sigsum}
+
+%
+% Disable navigation tools on slides
+%
+\setbeamertemplate{navigation symbols}{}
+
+%
+% Object styles
+%
+\setbeamertemplate{itemize item}[square]
+\setbeamertemplate{itemize subitem}[default]
+\setbeamertemplate{sections/subsections in toc}[square]
+
+\mode<all>
diff --git a/beamer/cfg/preamble.tex b/beamer/cfg/preamble.tex
new file mode 100644
index 0000000..ea39a37
--- /dev/null
+++ b/beamer/cfg/preamble.tex
@@ -0,0 +1,112 @@
+%
+% Packages
+%
+\usepackage[utf8]{inputenc}
+
+\usepackage[
+ lambda, advantage, operators, sets, adversary, landau, probability, notions,
+ logic, ff, mm, primitives, events, complexity, asymptotics, keys
+]{cryptocode}
+
+\usepackage{rotate}
+\usepackage{graphicx}
+\usepackage{mathtools}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{flowchart}
+\usepackage{smartdiagram}
+\usepackage{pifont}
+\usepackage{wasysym}
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage{drawstack}
+\usepackage{tikz}
+\usepackage{tikz-qtree}
+\usetikzlibrary{
+ arrows,
+ decorations.markings,
+ backgrounds,
+ calc,
+ fit,
+ positioning,
+ shapes.misc,
+ shadows,
+ shapes.arrows,
+ shapes,
+ snakes,
+}
+\usepackage{booktabs}
+\usepackage{smartdiagram}
+\usepackage[position=bottom]{subfig}
+
+\usepackage{xcolor}
+\definecolor{darkGreen}{HTML}{008000}
+\definecolor{darkBlue}{HTML}{2809B2}
+\definecolor{darkRed}{HTML}{CC0000}
+\definecolor{darkGray}{HTML}{808080}
+\definecolor{darkOrange}{HTML}{D77D00}
+\definecolor{darkPurple}{HTML}{800080}
+\colorlet{lightGray}{gray!33}
+\colorlet{lightYellow}{yellow!50}
+\definecolor{darkGreen}{HTML}{008000}
+\definecolor{darkBlue}{HTML}{2809B2}
+\definecolor{darkRed}{HTML}{CC0000}
+
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks = true,
+ urlcolor = darkBlue,
+ linkcolor = darkBlue,
+ citecolor = darkBlue,
+}
+
+%
+% Figures, tables and code
+%
+\usepackage{booktabs}
+\usepackage{colortbl}
+\usepackage{flowchart}
+\usepackage{adjustbox}
+\usepackage{listings}
+
+%
+% Code listings
+%
+\lstdefinestyle{CStyle}{
+ backgroundcolor=\color{lightGray!25},
+ commentstyle=\color{darkGreen},
+ keywordstyle=\color{darkBlue},
+ numberstyle=\tiny\color{darkRed},
+ stringstyle=\color{darkPurple},
+ basicstyle=\scriptsize,
+ breakatwhitespace=false,
+ breaklines=false,
+ captionpos=b,
+ keepspaces=true,
+ numbers=left,
+ numbersep=5pt,
+ showspaces=false,
+ showstringspaces=false,
+ showtabs=false,
+ tabsize=2,
+ language=C,
+ morekeywords={size_t,def,in,zip,True,False,ord,u8,u64},
+}
+
+%
+% Defines
+%
+\makeatletter
+\let\@@magyar@captionfix\relax %needed for \titlefloatright
+\makeatother
+
+\newcommand{\floatright}[1]{\hspace{0pt plus 1 filll}#1$\;$}
+\newcommand{\tyes}{\textcolor{darkGreen}{\ding{51}}}
+\newcommand{\tno}{\textcolor{darkRed}{\ding{55}}}
+\newcommand{\burl}[1]{\tiny{\url{#1}}}
+
+\def\rding{\rotatebox[origin=c]{-91}{\ding{224}}}
+\def\lding{\rotatebox[origin=c]{91}{\ding{224}}}
+
+\newcommand{\mktitle}[1]{\centering\textbf{\large#1}\vfill\normalsize}
+\newcommand{\TODO}[1]{\textcolor{red}{TODO}: #1}
diff --git a/beamer/demo.pdf b/beamer/demo.pdf
new file mode 100644
index 0000000..b5c8525
--- /dev/null
+++ b/beamer/demo.pdf
Binary files differ
diff --git a/beamer/main.tex b/beamer/main.tex
new file mode 100644
index 0000000..fd9f050
--- /dev/null
+++ b/beamer/main.tex
@@ -0,0 +1,22 @@
+\pdfminorversion=4
+\documentclass[handout,aspectratio=169]{beamer}
+\usetheme{sigsum}
+
+\input{cfg/preamble}
+
+\title{%
+ A brief demo of this template
+}
+
+\author{%
+ First author name, other info\\
+ Second author name, other info
+}
+
+\begin{document}
+ \begin{frame}
+ \titlepage
+ \end{frame}
+
+ \input{src/body}
+\end{document}
diff --git a/beamer/src/body.tex b/beamer/src/body.tex
new file mode 100644
index 0000000..c590a19
--- /dev/null
+++ b/beamer/src/body.tex
@@ -0,0 +1,45 @@
+\begin{frame}
+ \frametitle{Text and lists}
+ Normal text,
+ \emph{emphasized text},
+ \textbf{bold text},
+ \texttt{code text},
+ $\mathsf{math text\;\frac{1}{2}}$,
+ \alert{alert text}
+ \begin{columns}
+ \begin{column}{.33\textwidth}
+ \begin{itemize}
+ \item test
+ \begin{itemize}
+ \item a
+ \item b
+ \end{itemize}
+ \item again
+ \end{itemize}
+ \end{column}
+ \begin{column}{.33\textwidth}
+ \begin{enumerate}
+ \item test
+ \begin{enumerate}
+ \item a
+ \item b
+ \end{enumerate}
+ \item again
+ \end{enumerate}
+ \end{column}
+ \begin{column}{.33\textwidth}
+ \begin{description}
+ \item[first] abcd
+ \item[second] efgh
+ \item[third] ijkl
+ \end{description}
+ \end{column}
+ \end{columns}
+\end{frame}
+
+\begin{frame}
+ \mktitle{An alternative way to make less dense frame titles}
+
+ The last slide used \texttt{\textbackslash{frametitle}}.\\
+ This slide used \texttt{\textbackslash{mktitle}}.
+\end{frame}