diff --git a/docs/presentation/latex-template/README.md b/docs/presentation/latex-template/README.md new file mode 100644 index 000000000..d649be4a9 --- /dev/null +++ b/docs/presentation/latex-template/README.md @@ -0,0 +1,22 @@ +# Memgraph LaTeX Beamer Template + +This folder contains all of the needed files for creating a presentation with +Memgraph styling. You should use this style for any public presentations. + +Feel free to improve it according to style guidelines and raise issues if you +find any. + +## Usage + +Copy the contents of this folder (excluding this README file) to where you +want to write your own presentation. After copying, you can start editing the +`template.tex` with your content. + +To compile the presentation to a PDF, run `latexmk -pdf -xelatex`. Some +directives require XeLaTeX, so you need to pass `-xelatex` as the final option +of `latexmk`. You may also need to install some packages if the compilation +complains about missing packages. + +To clean up the generated files, use `latexmk -C`. This will also delete the +generated PDF. If you wish to remove generated files except the PDF, use +`latexmk -c`. diff --git a/docs/presentation/latex-template/mg-beamer.cls b/docs/presentation/latex-template/mg-beamer.cls new file mode 100644 index 000000000..2f4569c77 --- /dev/null +++ b/docs/presentation/latex-template/mg-beamer.cls @@ -0,0 +1,82 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{mg-beamer}[2018/03/26 Memgraph Beamer] + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}} + +\ProcessOptions \relax + +\LoadClass{beamer} + +\usetheme{Pittsburgh} + +% Memgraph color palette +\definecolor{mg-purple}{HTML}{720096} +\definecolor{mg-red}{HTML}{DD2222} +\definecolor{mg-orange}{HTML}{FB6E00} +\definecolor{mg-yellow}{HTML}{FFC500} +\definecolor{mg-gray}{HTML}{857F87} +\definecolor{mg-black}{HTML}{231F20} + +\RequirePackage{fontspec} +% Title fonts +\setbeamerfont{frametitle}{family={\fontspec[Path = ./mg-style/fonts/]{EncodeSansSemiCondensed-Regular.ttf}}} +\setbeamerfont{title}{family={\fontspec[Path = ./mg-style/fonts/]{EncodeSansSemiCondensed-Regular.ttf}}} +% Body font +\RequirePackage[sfdefault,light]{roboto} +% Roboto is pretty bad for monospace font. We will find a replacement. +% \setmonofont{RobotoMono-Regular.ttf}[Path = ./mg-style/fonts/] + +% Title slide styles +% \setbeamerfont{frametitle}{size=\huge} +% \setbeamerfont{title}{size=\huge} +% \setbeamerfont{date}{size=\tiny} + +% Other typography styles +\setbeamertemplate{frametitle}[default][center] +\setbeamercolor{frametitle}{fg=mg-black} +\setbeamercolor{title}{fg=mg-black} +\setbeamercolor{section in toc}{fg=mg-black} +\setbeamercolor{local structure}{fg=mg-orange} +\setbeamercolor{alert text}{fg=mg-red} + +% Commands +\newcommand{\mgalert}[1]{{\usebeamercolor[fg]{alert text}#1}} +\newcommand{\titleframe}{\frame[plain]{\titlepage}} +\newcommand{\mgtexttt}[1]{{\textcolor{mg-gray}{\texttt{#1}}}} + +% Title slide background +\RequirePackage{tikz,calc} +% Use title-slide-169 if aspect ration is 16:9 +\pgfdeclareimage[interpolate=true,width=\paperwidth,height=\paperheight]{logo}{mg-style/title-slide-169} +\setbeamertemplate{background}{ + \begin{tikzpicture} + \useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight); + \pgftext[at=\pgfpoint{0}{0},left,base]{\pgfuseimage{logo}}; + \ifnum\thepage>1\relax + \useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight); + \fill[white, opacity=1](0,\the\paperheight)--(\the\paperwidth,\the\paperheight)--(\the\paperwidth,0)--(0,0)--(0,\the\paperheight); + \fi + \end{tikzpicture} +} + +% Footline content +\setbeamertemplate{navigation symbols}{}%remove navigation symbols + \setbeamertemplate{footline}{ + \begin{beamercolorbox}[ht=1.6cm,wd=\paperwidth]{footlinecolor} + \vspace{0.1cm} + \hfill + \begin{minipage}[c]{3cm} + \begin{center} + \includegraphics[height=0.8cm]{mg-style/memgraph-logo.png} + \end{center} + \end{minipage} + \begin{minipage}[c]{7cm} + \insertshorttitle\ --- \insertsection + \end{minipage} + \begin{minipage}[c]{2cm} + \tiny{\insertframenumber{} of \inserttotalframenumber} + \end{minipage} + \end{beamercolorbox} +} + +\endinput diff --git a/docs/presentation/latex-template/mg-style/fonts/EncodeSansSemiCondensed-Regular.ttf b/docs/presentation/latex-template/mg-style/fonts/EncodeSansSemiCondensed-Regular.ttf new file mode 100644 index 000000000..4964bd2b1 Binary files /dev/null and b/docs/presentation/latex-template/mg-style/fonts/EncodeSansSemiCondensed-Regular.ttf differ diff --git a/docs/presentation/latex-template/mg-style/memgraph-logo.png b/docs/presentation/latex-template/mg-style/memgraph-logo.png new file mode 100644 index 000000000..ed9518596 Binary files /dev/null and b/docs/presentation/latex-template/mg-style/memgraph-logo.png differ diff --git a/docs/presentation/latex-template/mg-style/title-slide-169.png b/docs/presentation/latex-template/mg-style/title-slide-169.png new file mode 100644 index 000000000..71a49a9a1 Binary files /dev/null and b/docs/presentation/latex-template/mg-style/title-slide-169.png differ diff --git a/docs/presentation/latex-template/mg-style/title-slide.png b/docs/presentation/latex-template/mg-style/title-slide.png new file mode 100644 index 000000000..f889c437f Binary files /dev/null and b/docs/presentation/latex-template/mg-style/title-slide.png differ diff --git a/docs/presentation/latex-template/template.tex b/docs/presentation/latex-template/template.tex new file mode 100644 index 000000000..310fe973b --- /dev/null +++ b/docs/presentation/latex-template/template.tex @@ -0,0 +1,40 @@ +% Set 16:9 aspect ratio +\documentclass[aspectratio=169]{mg-beamer} +% Default directive sets the regular 4:3 aspect ratio +% \documentclass{mg-beamer} +\mode<presentation> + +% requires xelatex +\usepackage{ccicons} + +\title{Insert Presentation Title} +\titlegraphic{\ccbyncnd} +\author{Insert Name} + +% Institute doesn't look good in our current styling class. +% \institute[Memgraph Ltd.]{\pgfimage[height=1.5cm]{mg-logo.png}} + +% Date is autogenerated on compilation, so no need to set it explicitly, +% unless you wish to override it with a different date. +% \date{March 23, 2018} + +\begin{document} + +\titleframe + +\section{Intro} + +\begin{frame}{Contents} + \tableofcontents +\end{frame} + +\begin{frame}{Memgraph Markup Test} + \begin{itemize} + \item \mgtexttt{Prefer \\mgtexttt for monospace} + \item Replace this slide with your own + \item Add even more slides in different sections + \item Make sure you spellcheck your presentation + \end{itemize} +\end{frame} + +\end{document}