%% Copyright (C) 2016 Achim D. Brucker, https://www.brucker.ch %% %% License: %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN %% archives in directory macros/latex/base/lppl.txt; either %% version 1 of the License, or any later version. %% OR %% The 2-clause BSD-style license. %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{beamerthemelh-presentation} [2016/11/01 v0.0 LaTeX presentation class implementing the cooperate design of LogicalHacking.com] \RequirePackage{ifthen} \usepackage{xkeyval} \usepackage{xstring} \usepackage{etoolbox} \usepackage{environ} % \def\lh@classification@sel@default{5} \def\lh@classification@sel{5} \newcommand{\lh@CCBYNCND}{\href{https://creativecommons.org/licenses/by-nc-nd/4.0/}{CC BY-NC-ND 4.0}} \newcommand{\lh@CCBYND}{\href{https://creativecommons.org/licenses/by-nd/4.0/}{CC BY-ND 4.0}} \newcommand{\lh@CCBY}{\href{https://creativecommons.org/licenses/by/4.0/}{CC BY 4.0}} \newcommand{\lh@CCzero}{\href{https://creativecommons.org/publicdomain/zero/1.0/}{CC0 1.0}} \newcommand{\lh@GFDL}{\href{https://www.gnu.org/licenses/fdl.html}{GFDL 1.3}} \newcommand{\lh@strictlyconfidential}{Strictly Confidential} \newcommand{\lh@confidential}{Confidential} \newcommand{\lh@internal}{Internal} \newcommand{\lh@customer}{Customer} \newcommand{\lh@public}{Public} \newboolean{lh@slide@strictlyconfidential}\setboolean{lh@slide@strictlyconfidential}{false} \newboolean{lh@slide@confidential}\setboolean{lh@slide@confidential}{false} \newboolean{lh@slide@internal}\setboolean{lh@slide@internal}{false} \newboolean{lh@slide@customer}\setboolean{lh@slide@customer}{false} \newboolean{lh@slide@public-cc-by-nc-nd}\setboolean{lh@slide@public-cc-by-nc-nd}{false} \newboolean{lh@slide@public-cc-by-nd}\setboolean{lh@slide@public-cc-by-nd}{false} \newboolean{lh@slide@public-cc-by}\setboolean{lh@slide@public-cc-by}{false} \newboolean{lh@slide@public-cc-zero}\setboolean{lh@slide@public-cc-zero}{false} \newboolean{lh@slide@public-gfdl}\setboolean{lh@slide@public-gfdl}{false} \newcommand{\classification}{UNDEFINED} \define@choicekey*{beamerthemelh-presentation.sty}{classification}[\val\nr]% {strictlyconfidential,confidential,internal,customer,public-cc-by-nc-nd,% public-cc-by-nd,public-cc-by,public-cc-zero,public-gfdl}% [strictlyconfidential]% {% \let\lh@classification@sel@default\nr } \define@choicekey*{beamerframe}{classification}[\val\nr]% {strictlyconfidential,confidential,internal,customer,public-cc-by-nc-nd,% public-cc-by-nd,public-cc-by,public-cc-zero,public-gfdl}% [strictlyconfidential]% {% \let\lh@classification@sel\nr \ifcase\nr\relax% strictly confidential \setboolean{lh@slide@strictlyconfidential}{true} \or% confidential \setboolean{lh@slide@confidential}{true} \or% internal \setboolean{lh@slide@internal}{true} \or% customer \setboolean{lh@slide@customer}{true} \or% public \setboolean{lh@slide@public-cc-by-nc-nd}{true} \or \setboolean{lh@slide@public-cc-by-nd}{true} \or \setboolean{lh@slide@public-cc-by}{true} \or \setboolean{lh@slide@public-cc-zero}{true} \or \setboolean{lh@slide@public-gfdl}{true} \fi% } \ProcessOptionsX %\ProcessOptionsBeamer %\ProcessOptions \newcommand{\lh@classification@text}[1]{% \ifcase\number#1\relax% strictly confidential \alert{\lh@strictlyconfidential}% \or% confidential \alert{\lh@confidential}% \or% internal \alert{\lh@internal}% \or% customer \lh@customer% \or% public \lh@public~(\lh@CCBYNCND)% \or \lh@public~(\lh@CCBYND)% \or \lh@public~(\lh@CCBY)% \or \lh@public~(\lh@CCzero)% \or \lh@public~(\lh@GFDL)% \else UNDEFINED~CLASSIFICATION:~#1% \fi% } \newcommand{\lh@classification@description}[1]{% \ifcase\number#1\relax% strictly confidential STRICTLY CONFIDENTIAL. \or% confidential CONFIDENTIAL. \or% internal INTERNAL. \or% customer CUSTOMER. \or% public CC BY NC ND licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License (\lh@CCBYNCND). \or% public CC BY ND licensed under a Creative Commons Attribution-NoDerivatives 4.0 International Public License (\lh@CCBYND). \or% public CC BY licensed under a Creative Commons Attribution 4.0 International Public License (\lh@CCBY). \or% public CC 0 licensed under a \lh@CCzero license: To the extent possible under law, all copyright and related or neighboring rights to the slides marked \lh@CCBY are waived. \or% public GFDL licensed under the \lh@GFDL:\\ Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. \fi% } \BeforeBeginEnvironment{frame}{% \let\lh@classification@sel\lh@classification@sel@default% } \mode \let\lh@classification@sel\lh@classification@sel@default% \renewcommand{\classification}{\lh@classification@text{\lh@classification@sel}} \def\lh@classification{\classification} \RequirePackage{xcolor} \RequirePackage[]{lh-logo}[2016/08/15] \RequirePackage{xparse} \usepackage{lmodern} \usepackage{raleway} \usepackage[T1]{fontenc} \usecolortheme{lh} \useinnertheme{lh} \useoutertheme{lh} \usefonttheme{lh} \mode \AtBeginDocument{ \providecommand{\thanksMsg}{Thank you for your attention!} \providecommand{\thankYouMsg}{Thank you!} \providecommand{\thanksQuestionsMsg}{Any questions or remarks?} \providecommand{\AgendaMsg}{Outline} } \newcommand{\CopyrightFrame}{% \bgroup%\setbeamertemplate{footline}[default]% \begin{frame}\vfill% \frametitle{Document Classification and License Information} \footnotesize \textcopyright~\the\year~\href{https://logicalhacking.com}{LogicalHacking.com}, \insertshortauthor. \begin{itemize}\footnotesize \item This presentation is classified as \emph{\classification}:\\ Except where otherwise noted, this presentation is \lh@classification@description{\lh@classification@sel} \ifthenelse{% \boolean{lh@slide@strictlyconfidential}\OR% \boolean{lh@slide@confidential}\OR% \boolean{lh@slide@internal}\OR% \boolean{lh@slide@customer}\OR% \boolean{lh@slide@public-cc-by-nc-nd}\OR% \boolean{lh@slide@public-cc-by-nd}\OR% \boolean{lh@slide@public-cc-by}\OR% \boolean{lh@slide@public-cc-zero}\OR% \boolean{lh@slide@public-gfdl}}{ \item Deviating from this, the following classifications apply: \begin{itemize}\tiny \ifthenelse{\boolean{lh@slide@strictlyconfidential}}{ \item Slides marked \emph{\lh@classification@text{0}} are \lh@classification@description{0} }{} \ifthenelse{\boolean{lh@slide@confidential}}{ \item Slides marked \emph{\lh@classification@text{1}} are \lh@classification@description{1} }{} \ifthenelse{\boolean{lh@slide@internal}}{ \item Slides marked \emph{\lh@classification@text{2}} are \lh@classification@description{2} }{} \ifthenelse{\boolean{lh@slide@customer}}{ \item Slides marked \emph{\lh@classification@text{3}} are \lh@classification@description{3} }{} \ifthenelse{\boolean{lh@slide@public-cc-by-nc-nd}}{ \item Slides marked \emph{\lh@classification@text{4}} are \lh@classification@description{4} }{} \ifthenelse{\boolean{lh@slide@public-cc-by-nd}}{ \item Slides marked \emph{\lh@classification@text{5}} are \lh@classification@description{5} }{} \ifthenelse{\boolean{lh@slide@public-cc-by}}{ \item Slides marked \emph{\lh@classification@text{6}} are \lh@classification@description{6} }{} \ifthenelse{\boolean{lh@slide@public-cc-zero}}{ \item Slides marked \emph{\lh@classification@text{7}} are \lh@classification@description{7} }{} \ifthenelse{\boolean{lh@slide@public-gfdl}}{ \item Slides marked \emph{\lh@classification@text{8}} are \lh@classification@description{8} }{} \end{itemize} }{} \end{itemize} \end{frame} \egroup} \newcommand{\AgendaFrame}[1][]{% \bgroup %\setbeamertemplate{footline}[default]% \begin{frame} \frametitle{\AgendaMsg} {\tableofcontents[#1]} \end{frame} \egroup} \newcommand{\ThanksFrame}[1][]{% \begin{frame}[plain] \huge \begin{center} \thanksMsg\\ \end{center} \begin{center} \large \thanksQuestionsMsg \end{center} \end{frame} } \DeclareDocumentCommand{\PartFrame}{ O{red} O{white} m }{% \setbeamercolor{footer}{fg=#1, bg=#2} \bgroup \part{#3} \frame{\partpage} \egroup } \newsavebox{\@tempsboxa} \newsavebox{\@tempsboxb} \newlength{\@tempdimd} \newenvironment{kickerbox}[1][] {% \@tempdima=\textwidth% \advance\@tempdima by -8mm% \advance\@tempdima by -4mm% % \sbox{\@tempsboxb}{\parbox{4mm}{#1}}% % \begin{lrbox}{\@tempsboxa}% \begin{minipage}{\the\@tempdima}% }{% \end{minipage}% \end{lrbox}% \settowidth{\@tempdima}{\usebox{\@tempsboxa}} \advance\@tempdima by .4cm% \settoheight{\@tempdimb}{\usebox{\@tempsboxa}} \settodepth{\@tempdimc}{\usebox{\@tempsboxa}} \advance\@tempdimb by .4cm% \advance\@tempdimb by \the\@tempdimc% % \@tempdimc=\@tempdimb% \settodepth{\@tempdimd}{\usebox{\@tempsboxb}} \advance\@tempdimc by -\@tempdimd \settodepth{\@tempdimd}{\usebox{\@tempsboxb}} \advance\@tempdimc by -\@tempdimd \advance\@tempdimc by -.6cm \smallskip \begin{columns}[onlytextwidth] \begin{column}[t]{7mm} \begin{beamercolorbox}[sep=.1cm,wd=8mm,ht=\the\@tempdimb]{palette secondary} \usebox{\@tempsboxb}\vspace{\the\@tempdimc}% \end{beamercolorbox} \end{column} \begin{column}[t]{\the\@tempdima} \begin{beamercolorbox}[sep=0.2cm,wd=\the\@tempdima,ht=\the\@tempdimb]{kicker}% \usebox{\@tempsboxa}% \end{beamercolorbox}% \end{column} \end{columns} \smallskip } \newenvironment{quotebox} {\begin{kickerbox}[{\Huge\textbf{\usebeamercolor[bg]{kicker}{\,``}}}]} {\end{kickerbox}} \newcommand{\partnerLogo}[1][]{} \NewEnviron{abstractframe}[1][]{% \begin{frame}{plain,label={fra:abstract-en},#1} \centerline{\emph{\inserttitle: \insertsubtitle}} \bigskip\begin{abstract}\footnotesize \BODY \end{abstract}\end{frame} } \endinput