mopl/lxpresent.cls

107 lines
3.8 KiB
TeX

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% LxStyle - Lxsameer's beamer style
% Copyright (C) 2022 Sameer Rahmani <lxsameer@gnu.org>
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\LoadClass[hyperref={pdfpagelabels=false,hidelinks},presentation]{beamer}
\ProvidesClass{lxpresent}[2022/09/22 lxsameer's presentation class]
\RequirePackage[default,light,semibold]{sourcesanspro}
\setsansfont{Source Sans Pro}
\RequirePackage{fontspec}
\RequirePackage{xcolor}
\RequirePackage{fontawesome5}
\RequirePackage{tikz}
\RequirePackage{rotating}
\RequirePackage[normalem]{ulem}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{capt-of}
\newcommand*{\setep}[2]{\def\@ep{#1}\def\@eptitle{#2}}
\definecolor{spurple}{HTML}{5e246e}
\definecolor{spurple1}{HTML}{eeddaa}
\definecolor{linkcolor}{HTML}{eeeeec}
\setbeamercolor{palette primary}{fg=spurple,bg=white}
\setbeamercolor{palette secondary}{fg=spurple,bg=white}
\setbeamercolor{structure}{fg=white,bg=spurple}
\setbeamercolor{title in head/foot}{fg=white,bg=spurple}
\setbeamercolor{date in head/foot}{fg=lightgray,bg=spurple}
\setbeamercolor{background canvas}{bg=spurple}
% definition of the footline template
\defbeamertemplate*{footline}{mytheme}{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{title in head/foot}%
\makebox[2em][l]{{\usebeamerfont{title in head/foot}\textcolor{white}{\@ep}}}%
{\usebeamercolor{title in head/foot}{\@eptitle}}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm,right]{title in head/foot}%
\end{beamercolorbox}}%
\vskip0pt%
}
% definition of the title page template
\defbeamertemplate*{title page}{mytheme}[1][]
{%
\begin{tikzpicture}
\node[overlay,anchor=south west,inner sep=0,scale=0.7,opacity=1] at (6cm,-7cm) {\includegraphics[width=\textwidth]{serene.png}};
\end{tikzpicture}
\begin{tikzpicture}[remember picture,overlay]
\node[text=white,anchor=south west,font=\sffamily\huge,text width=0.8\paperwidth]
at ([xshift=20pt,yshift=30pt]current page.west)
(title)
{Mathematics of Programming Languages};
\node[text=white,font=\large\sffamily,anchor=south west]
at ([xshift=10,yshift=-80pt]title.south west)
(epnum)
{Episode \@ep:};
\node[text=white,font=\large\sffamily,anchor=south west]
at ([yshift=-15pt]epnum.south west)
(eptitle)
{\textbf{\@eptitle}};
\end{tikzpicture}%
}
% remove navigation symbols
\setbeamertemplate{navigation symbols}{}
% definition of the symbols used in itemize
\newcommand\mysymbol{%
\begin{tikzpicture}[xscale=0.85]
\fill[spurple]
(-1ex,1ex) to[out=-60,in=240,looseness=1.2]
(1ex,1ex) to[out=240,in=120,looseness=1.2]
(1ex,-1ex) to[out=120,in=60,looseness=1.2]
(-1ex,-1ex) to[out=60,in=-60,looseness=1.2]
cycle;
\end{tikzpicture}%
}
% definition of the itemize templates
\defbeamertemplate*{itemize item}{mysymbol}{\small\raise0.5pt\hbox{\mysymbol}}
\defbeamertemplate*{itemize subitem}{mysymbol}{\footnotesize\raise0.5pt\hbox{\mysymbol}}
\defbeamertemplate*{itemize subsubitem}{mysymbol}{\footnotesize\raise0.5pt\hbox{\mysymbol}}