commit e777f2a1732f5c9242e9c62c10c1b519dc6af12a Author: Giulio Date: Sun Mar 13 16:51:01 2022 +0100 Draft import diff --git a/beamerthemevu.sty b/beamerthemevu.sty new file mode 100644 index 0000000..449a197 --- /dev/null +++ b/beamerthemevu.sty @@ -0,0 +1,140 @@ +\DeclareOption{Lato}{ + \setsansfont[Ligatures=TeX]{Lato} + \setmonofont[Ligatures=TeX]{Lato} +} +\ProcessOptions + +\RequirePackage{tikz} +\RequirePackage[overlay, absolute]{textpos} +\usetikzlibrary{arrows.meta, shapes.misc} + +\definecolor{VUBlack}{RGB}{0,0,0} +\definecolor{VUWhite}{RGB}{255,255,255} +\definecolor{VUBlue}{RGB}{0,129,202} +\definecolor{VUGray}{RGB}{124,124,124} +\definecolor{VUPurple}{RGB}{240,0,240} + + +\setbeamercolor{normal text}{fg=VUGray, bg=white} +\setbeamercolor{background canvas}{bg=VUWhite} +\setbeamercolor{section in toc}{parent={normal text}} +\setbeamercolor{subsection in toc}{parent={normal text}} +\setbeamercolor{item}{parent={normal text}} +\setbeamercolor{block title}{parent={normal text}, fg=VUWhite, bg=VUBlack} +\setbeamercolor{block body}{parent={normal text}, fg=VUWhite, bg=VUGray} +\setbeamercolor{block title example}{parent={normal text}, fg=VUWhite, bg=VUGray} +\setbeamercolor{block body example}{parent={normal text}, fg=VUWhite, bg=VUBlack} +\setbeamercolor{logo}{parent={normal text}, bg=VUWhite} +\setbeamercolor{subtitle}{parent={normal text}} +\setbeamercolor{institute in head/foot}{parent={normal text}} +\setbeamercolor{headline}{parent={normal text}, bg=VUBlack} +\setbeamercolor{qed symbol}{parent={normal text}} + +\setbeamercolor{title page}{fg=VUBlack, bg=VUWhite} +\setbeamercolor{subtitle}{fg=VUGray,bg=VUWhite} +\setbeamercolor{footline}{fg=VUWhite, bg=VUBlue} +\setbeamercolor{footnote}{fg=VUWhite, bg=VUGray} +\setbeamercolor{frametitle}{fg=VUWhite, bg=VUBlack} +\setbeamercolor{canvas}{fg=VUGray, bg=VUWhite} +\setbeamercolor{prefooter}{fg=VUWhite, bg=VUGray} +\setbeamercolor{section page}{fg=VUBlack, bg=VUWhite} + + +\setbeamerfont{footline}{size=\normalsize} +\setbeamerfont{footnote}{size=\normalsize} +\setbeamerfont{institute in head/foot}{size=\small} +\setbeamerfont{navigation symbols}{size=\small} +\setbeamerfont{section page}{size=\huge} +\setbeamerfont{title}{size=\huge} +\setbeamerfont{frametitle}{size=\huge} +\setbeamerfont{subtitle}{size=\Large} +\setbeamerfont{author}{size=\Large} +\setbeamerfont{date}{size=\Large} + +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{itemize items}[circle] + + + \setbeamertemplate{footline}{ + \begin{beamercolorbox}[ht=0.75cm,wd=\paperwidth]{footline} + \includegraphics[height=0.75cm]{images/footer} + \hfill + \vbox to 0.75cm{\vfil\hbox{Course name or presentation title - \#\insertframenumber/\inserttotalframenumber}\vfil}%\ + \hspace{0.5cm} + \end{beamercolorbox} + } + + \setbeamertemplate{footnote}{ + \begin{beamercolorbox}[ht=0.75cm,wd=\paperwidth]{footnote} + \end{beamercolorbox} + } + + +\setbeamertemplate{title page}{ + \begin{beamercolorbox}[wd=0.5\paperwidth,ht=0.4\paperheight,dp=8ex,left]{logo} + \vfill + \includegraphics[height=2.5cm]{images/logo} + \vfill + \end{beamercolorbox} + \begin{textblock*}{12cm}(0.5\paperwidth,3cm) + \begin{beamercolorbox}[wd=0.5\paperwidth]{title page} + \usebeamerfont{title}\usebeamercolor{title}\inserttitle% + \end{beamercolorbox}% + \end{textblock*} + \begin{textblock*}{12cm}(0.5\paperwidth,5cm) + \begin{beamercolorbox}[wd=0.5\paperwidth]{subtitle} + \usebeamerfont{subtitle}\usebeamercolor{subtitle}\insertsubtitle% + \end{beamercolorbox}% + \end{textblock*} +} + +\setbeamertemplate{frametitle}{ +\begin{beamercolorbox}[wd=\paperwidth,dp=1ex,leftskip=0.5cm,rightskip=0.5cm]{frametitle} + \vfill + \usebeamerfont{frametitle}\insertframetitle + \vfill +\end{beamercolorbox} +} + +\setbeamertemplate{block begin}{ + \vskip\baselineskip + \begin{beamercolorbox}[wd=\textwidth, ht=0.5cm, dp=0.2cm, leftskip=0.2cm]{block title}% + \usebeamerfont*{block title}{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}% + \end{beamercolorbox}% + {\nointerlineskip\vskip-0.5pt}% + \usebeamerfont{block body}% + \begin{beamercolorbox}[wd=\textwidth, leftskip=0.2cm, dp=0.2cm]{block body}% + \vskip-.75ex\vbox{}% +} + +\setbeamertemplate{block end}{ + \end{beamercolorbox} + \vspace*{.25cm} +} + +\setbeamertemplate{block example begin}{ + \vskip\baselineskip + \begin{beamercolorbox}[wd=\textwidth, ht=0.5cm, dp=0.2cm, leftskip=0.2cm]{block title example}% + \usebeamerfont*{block title example}{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}% + \end{beamercolorbox}% + {\nointerlineskip\vskip-0.5pt}% + \usebeamerfont{block body example}% + \begin{beamercolorbox}[wd=\textwidth, leftskip=0.2cm, dp=0.2cm]{block body example}% + \vskip-.75ex\vbox{}% +} + +\setbeamertemplate{block example end}{ + \end{beamercolorbox} + \vspace*{.25cm} +} + +\AtBeginSection[]{ + \begin{frame} + \vfill + \centering + \begin{beamercolorbox}[center]{section page} + \usebeamerfont{section page}\insertsectionhead\par% + \end{beamercolorbox} + \vfill + \end{frame} +} \ No newline at end of file diff --git a/compile.sh b/compile.sh new file mode 100755 index 0000000..3966062 --- /dev/null +++ b/compile.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +LOGO="images/logo" +FOOTER="images/footer" +DPI=600 + +clean() { + rm -rf *.aux *.nav *.toc *.log *.snm *.out *.vrb _minted* +} + +convert_images() { + if [ ! -f "${LOGO}.png" ]; then + convert -density ${DPI} ${LOGO}.svg ${LOGO}.png + fi + + if [ ! -f "${FOOTER}.png" ]; then + convert -density ${DPI} ${FOOTER}.svg ${FOOTER}.png + fi +} + +main() { + clean + convert_images + xelatex --shell-escape "${1}" + xelatex --shell-escape "${1}" + clean + echo "Done, output is ${1%.*}.pdf" +} + +main "${1}" + diff --git a/example.pdf b/example.pdf new file mode 100644 index 0000000..3d367ed Binary files /dev/null and b/example.pdf differ diff --git a/example.tex b/example.tex new file mode 100644 index 0000000..968cdd4 --- /dev/null +++ b/example.tex @@ -0,0 +1,134 @@ +\documentclass[aspectratio=169]{beamer} +\usepackage[utf8]{inputenc} +\usepackage{listings} +\usepackage{minted} +\usetheme{vu} + +\title{My title here} +\subtitle{Name Surname} +%\date{\today} + +\begin{document} + +\frame[plain]{\maketitle} + +\begin{frame}{Table of contents} + \tableofcontents +\end{frame} + +\section{Section title} + +\begin{frame}{One or two lines here are fine! Do your best to use meaningful titles} +Ypu can use paragraphs or nested enumerations +\begin{itemize} + \item We have plenty bullet styles available! + \begin{itemize} + \item[$\circ$] And you can go as deep as yout want + \begin{itemize} + \item[$\blacksquare$] But do not abuse this feature, otherwise you will lose clarity + \end{itemize} + \end{itemize} + \item And of course do not push too much text in a single slides, people hate reading :) +\end{itemize} +\end{frame} + +\begin{frame}{Pros, cons or short concise lists} +\begin{columns}[T] % align columns +\begin{column}{.48\textwidth} + +Pros +\begin{itemize} + \item Generic good design comment + \item Second generic good written comment + \item Generic good charts + \item Whatever +\end{itemize} +\end{column} +\hfill +\begin{column}{.48\textwidth} + +Cons +\begin{itemize} + \item Product pitch, not research + \item Closed source + \item Manipulated benchmarks + \item I do not like the authors +\end{itemize} +\end{column} +\end{columns} +\end{frame} + +\begin{frame}[fragile]{This is a non-highlighted code sample} + \begin{lstlisting} +fn fib (n: i32) -> i32 { + if n <= 0 { + return 0; + } else if n== 1{ + return 1; +} else { + return fib (n-1) + fib(n-2); + } +} +\end{lstlisting} +\end{frame} + +\begin{frame}[fragile]{This is a highlighted code sample} + \begin{minted}{rust} +fn fib (n: i32) -> i32 { + if n <= 0 { + return 0; + } else if n== 1{ + return 1; +} else { + return fib (n-1) + fib(n-2); + } +} +\end{minted} +\end{frame} + +\begin{frame}{This is an example enumeration with math!} +\begin{enumerate} +\item Here you can see an enumeration +\item It has items +\item The items are numbered +\end{enumerate} +\[ + f(x)=\sum_{i=0}^\infty \frac{f^{(i)}(x_0)}{i!}(x-x_0)^i +\] +\end{frame} + +\begin{frame}{Put your not funny quote here} +\begin{quote}[Oscar Wilde] +I have nothing to declare except my genius.\end{quote} +\end{frame} + +\begin{frame}{Example slide with Title} +\begin{example} +The demonstration is flawed. +\end{example} +\begin{solution} +Quit your researcher job. +\end{solution} +\footnotetext[1]{A test footnote in the first column} +\end{frame} + +\begin{frame}[plain]{Plain frame with title} +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, +placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, +nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis +egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum +urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer +sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices +bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, +nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, +congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci +dignissim rutrum. +\end{frame} + +\section{Questions?} + +\begin{frame}{Keep in touch!} +Add some other text here with your contact +\end{frame} +\end{document} \ No newline at end of file diff --git a/images/footer.svg b/images/footer.svg new file mode 100755 index 0000000..06a870e --- /dev/null +++ b/images/footer.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + diff --git a/images/logo.svg b/images/logo.svg new file mode 100755 index 0000000..e2e804b --- /dev/null +++ b/images/logo.svg @@ -0,0 +1 @@ +logo-VU \ No newline at end of file