From 787d984b37705fd66b118002f3fee4b8d6a0f760 Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Mon, 30 Jan 2017 00:07:17 +0000 Subject: [PATCH] Implemented option titlelight for title pages with light background. --- ...hemelh.sty => beamercolorthemelh-core.sty} | 15 ++++++----- .../beamercolorthemelh-titledark.sty | 25 ++++++++++++++++++ .../beamercolorthemelh-titlelight.sty | 26 +++++++++++++++++++ lh-presentation/beamerinnerthemelh.sty | 19 +++++++------- .../beamerthemelh-presentation.sty | 20 +++++++++----- lh-presentation/lh-presentation.cls | 1 + 6 files changed, 84 insertions(+), 22 deletions(-) rename lh-presentation/{beamercolorthemelh.sty => beamercolorthemelh-core.sty} (86%) create mode 100644 lh-presentation/beamercolorthemelh-titledark.sty create mode 100644 lh-presentation/beamercolorthemelh-titlelight.sty diff --git a/lh-presentation/beamercolorthemelh.sty b/lh-presentation/beamercolorthemelh-core.sty similarity index 86% rename from lh-presentation/beamercolorthemelh.sty rename to lh-presentation/beamercolorthemelh-core.sty index f7ead7c..41f65c5 100644 --- a/lh-presentation/beamercolorthemelh.sty +++ b/lh-presentation/beamercolorthemelh-core.sty @@ -9,7 +9,7 @@ %% The 2-clause BSD-style license. %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{beamercolorthemelh} +\ProvidesPackage{beamercolorthemelh-core} [2016/11/01 v0.0 LaTeX presentation class implementing the cooperate design of LogicalHacking.com] \mode @@ -20,12 +20,13 @@ \setbeamercolor{alerted text}{fg=lhOrange} - \setbeamercolor{title}{fg=black} - \setbeamercolor{subtitle}{fg=lhDarkGray} - \setbeamercolor{author}{fg=black} - \setbeamercolor{institute}{fg=black} - \setbeamercolor{date}{fg=black} - \setbeamercolor{titleframe}{fg=lhOrange,bg=white} + \setbeamercolor{title}{fg=white} + \setbeamercolor{subtitle}{fg=white} + \setbeamercolor{author}{fg=white} + \setbeamercolor{institute}{fg=white} + \setbeamercolor{date}{fg=white} + % \setbeamercolor{titleframe}{fg=black,bg=white} + \setbeamercolor{titleframe}{bg=black} \setbeamercolor{titlerule}{bg=lhOrange,fg=white} \setbeamercolor*{palette primary}{fg=lhDarkGray,bg=white} diff --git a/lh-presentation/beamercolorthemelh-titledark.sty b/lh-presentation/beamercolorthemelh-titledark.sty new file mode 100644 index 0000000..8350a17 --- /dev/null +++ b/lh-presentation/beamercolorthemelh-titledark.sty @@ -0,0 +1,25 @@ +%% 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{beamercolorthemelh-titledark} + [2016/11/01 v0.0 LaTeX presentation class implementing the cooperate design of LogicalHacking.com] + +\mode + + \setbeamercolor{title}{fg=black} + \setbeamercolor{subtitle}{fg=lhDarkGray} + \setbeamercolor{author}{fg=black} + \setbeamercolor{institute}{fg=black} + \setbeamercolor{date}{fg=black} + \setbeamercolor{titleframe}{fg=lhOrange,bg=white} + +\mode + diff --git a/lh-presentation/beamercolorthemelh-titlelight.sty b/lh-presentation/beamercolorthemelh-titlelight.sty new file mode 100644 index 0000000..293b58a --- /dev/null +++ b/lh-presentation/beamercolorthemelh-titlelight.sty @@ -0,0 +1,26 @@ +%% 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{beamercolorthemelh-titlelight} + [2016/11/01 v0.0 LaTeX presentation class implementing the cooperate design of LogicalHacking.com] + +\mode + + \setbeamercolor{title}{fg=white} + \setbeamercolor{subtitle}{fg=white} + \setbeamercolor{author}{fg=white} + \setbeamercolor{institute}{fg=white} + \setbeamercolor{date}{fg=white} + \setbeamercolor{titleframe}{bg=black} + +\mode + + diff --git a/lh-presentation/beamerinnerthemelh.sty b/lh-presentation/beamerinnerthemelh.sty index 083b0bb..b8ee6f9 100644 --- a/lh-presentation/beamerinnerthemelh.sty +++ b/lh-presentation/beamerinnerthemelh.sty @@ -43,24 +43,25 @@ \mbox{}\vspace{-6mm} \begin{beamercolorbox}[ht=4mm,sep=.2cm,wd=\@tempdima]{titlerule} \end{beamercolorbox} - \mbox{}\vspace{-5mm}\transparent{.75}\mbox{}% - \begin{beamercolorbox}[ht=40mm,sep=.2cm,wd=\@tempdima]{titleframe} + \mbox{}\vspace{-5mm}\transparent{.80}\mbox{}% + \begin{beamercolorbox}[ht=42mm,sep=.2cm,center,wd=\@tempdima]{titleframe} \vspace{-2mm}% {\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par}% \ifx\insertsubtitle\@empty% + \vskip0.25em% \else% \vskip0.25em% {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% \fi% \vbox{} \vfill - \begin{beamercolorbox}[sep=4pt,center,#1]{author} - \usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor + \begin{beamercolorbox}[sep=4pt,center,wd=1.1\@tempdima,#1]{author} + \usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor \end{beamercolorbox} - \begin{beamercolorbox}[sep=4pt,center,#1]{institute} + \begin{beamercolorbox}[sep=4pt,center,wd=1.1\@tempdima,#1]{institute} \usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute \end{beamercolorbox} - \begin{beamercolorbox}[sep=4pt,center,#1]{date} + \begin{beamercolorbox}[sep=4pt,center,wd=1.1\@tempdima,#1]{date} \usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate \end{beamercolorbox} \end{beamercolorbox} @@ -69,11 +70,11 @@ \end{beamercolorbox} \vspace{1mm} \begin{beamercolorbox}[wd=\@tempdima,ignorebg]{white} - \ifx\inserttitlegraphic\@empty% + \ifthenelse{\boolean{lh@title@light}}{% \raisebox{-\fboxsep}{{\setlength{\fboxsep}{0pt}\lhcomLogoLight[width=42mm]}}% - \else% + }{% \raisebox{-\fboxsep}{{\setlength{\fboxsep}{0pt}\lhcomLogoDark[width=42mm]}}% - \fi% + }% \hfill% {\partnerLogo[height=4mm]}% \end{beamercolorbox} diff --git a/lh-presentation/beamerthemelh-presentation.sty b/lh-presentation/beamerthemelh-presentation.sty index e324b8f..ff31c2b 100644 --- a/lh-presentation/beamerthemelh-presentation.sty +++ b/lh-presentation/beamerthemelh-presentation.sty @@ -18,6 +18,12 @@ \usepackage{etoolbox} \usepackage{environ} + + +% +\newboolean{lh@title@light} +\setboolean{lh@title@light}{false} +\DeclareOptionX{titlelight}{\setboolean{lh@title@light}{true}} % \def\lh@classification@sel@default{5} \def\lh@classification@sel{5} @@ -86,11 +92,8 @@ \fi% } - - - -\ProcessOptionsX -%\ProcessOptionsBeamer +\ProcessOptionsX\relax +%\ProcessOptionsBeamer\relax %\ProcessOptions \newcommand{\lh@classification@text}[1]{% @@ -190,7 +193,12 @@ -\usecolortheme{lh} +\usecolortheme{lh-core} +\ifthenelse{\boolean{lh@title@light}}{% + \usecolortheme{lh-titlelight} +}{% + \usecolortheme{lh-titledark} +} \useinnertheme{lh} \useoutertheme{lh} \usefonttheme{lh} diff --git a/lh-presentation/lh-presentation.cls b/lh-presentation/lh-presentation.cls index 65c2919..c2528da 100644 --- a/lh-presentation/lh-presentation.cls +++ b/lh-presentation/lh-presentation.cls @@ -14,6 +14,7 @@ \LoadClassWithOptions{beamer}[] \DeclareOptionBeamer{classification}{\PassOptionsToPackage{classification=#1}{beamerthemelh-presentation}} +\DeclareOptionBeamer{titlelight}{\PassOptionsToPackage{titlelight}{beamerthemelh-presentation}} \ProcessOptionsBeamer\relax