summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerouterthemepureminimalistic.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerouterthemepureminimalistic.sty')
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerouterthemepureminimalistic.sty125
1 files changed, 125 insertions, 0 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerouterthemepureminimalistic.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerouterthemepureminimalistic.sty
new file mode 100644
index 0000000000..0e501bf5aa
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerouterthemepureminimalistic.sty
@@ -0,0 +1,125 @@
+% A pure minimalistic LaTeX-Beamer theme for everyone to use.
+% Copyright (C) 2020 Kai Norman Clasen
+
+% 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 3 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, see <https://www.gnu.org/licenses/>.
+
+% This file is part of beamerthemepureminimalistic.
+
+% If problems/bugs are found or enhancements are desired, please contact
+% me over: https://github.com/kai-tub/latex-beamer-pure-minimalistic
+
+\ProvidesPackage{beamerouterthemepureminimalistic}[v1.2.4]
+\RequirePackage{ifthen}
+\RequirePackage{etoolbox}
+\RequirePackage{calc}
+
+\mode<presentation>
+
+\newboolean{showmaxslides}
+\setboolean{showmaxslides}{false}
+
+\newboolean{nofooter}
+\setboolean{nofooter}{false}
+
+\DeclareOptionBeamer{showmaxslides}{\setboolean{showmaxslides}{true}}
+\DeclareOptionBeamer{nofooter}{\setboolean{nofooter}{true}}
+
+\ProcessOptionsBeamer
+
+% invertcolor is already processed in colortheme
+\ifthenelse{\boolean{darkmode}}{%
+ \newcommand{\headerpath}{logos/header_logo_darkmode}
+ \newcommand{\institutepath}{logos/institute_logo_darkmode}
+}{%
+ \newcommand{\headerpath}{logos/header_logo}
+ \newcommand{\institutepath}{logos/institute_logo}
+}
+% The header shares the horizontal space with the frame title in normal mode
+% a relative width value between .5 and .8 should usually be the best
+\newcommand{\logoheader}{\includegraphics[width=.5\linewidth]{\headerpath}}
+% For the title page, the logo is embedded in the total frame, meaning that \linewidth
+% here refers to the complete \paperwidth, small width values of < .4 are usually best.
+\newcommand{\logotitle}{\includegraphics[width=.2\linewidth]{\headerpath}}
+% The footer will only use part of the space under the line. Usually almost the
+% full linewidth should be used
+\newcommand{\logofooter}{\includegraphics[width=.8\linewidth]{\institutepath}}
+
+\defbeamertemplate*{frametitle}{largetitle}{
+ \logotitle
+}
+
+\newlength{\myleftmargin}
+\setlength{\myleftmargin}{.0625\paperwidth}
+\newlength{\myrightmargin}
+\setlength{\myrightmargin}{.0625\paperwidth}
+\newlength{\mytextlength}
+\setlength{\mytextlength}{\paperwidth - \myleftmargin - \myrightmargin}
+\newlength{\myfooterheight}
+\setlength{\myfooterheight}{.08\paperheight}
+
+\setbeamersize{text margin left=\myleftmargin, text margin right=\myrightmargin}
+
+\defbeamertemplate*{frametitle}{pureminimalistictitle}{
+ \vskip 10pt
+ \leavevmode
+ \begin{beamercolorbox}[sep=0ex, wd=.65\paperwidth, left]{frametitle}
+ \usebeamerfont{frametitle}%
+ \insertframetitle%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[sep=0pt, wd=.2\paperwidth, right]{headline}
+ \logoheader
+ \end{beamercolorbox}
+}%
+
+\defbeamertemplate*{footline}{pureminimalisticfooter}{%
+ \ifthenelse{\boolean{nofooter}}{}{%
+ \leavevmode
+ \begin{beamercolorbox}[sep=0pt, wd=\myleftmargin, ht=\myfooterheight, dp=1ex]{footline}
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[sep=0pt, wd=\mytextlength, ht=\myfooterheight, dp=1ex]{footline}
+ \parbox{\linewidth}%
+ % Don't ask me why I had to insert a space/character after \usebeamercolor
+ % for it to have an effect on \hrule. Same goes for \color{white} \hrule
+ { \usebeamercolor[fg]{normal text}\ \hrule }
+ \leavevmode
+ \begin{beamercolorbox}[sep=0mm, wd=.6\paperwidth, ht=\myfooterheight]{footline}%
+ \usebeamerfont{footline}%
+ \vbox to\myfooterheight{%
+ \vfil%
+ \insertshorttitle{} $~|~$ %
+ \insertshortauthor{} $\quad$ %
+ \insertshortsubtitle{}\par%
+ Page \insertframenumber\ifthenelse{%
+ \boolean{showmaxslides}}%
+ {/\inserttotalframenumber}%
+ {}\par%
+ \vfil%
+ \vfil%
+ }%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[sep=0mm, wd=.275\paperwidth,right, ht=\myfooterheight]{footline}
+ \vbox to\myfooterheight{%
+ \vfil%
+ \logofooter
+ \vfil%
+ \vfil%
+ }%
+ \end{beamercolorbox}%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[sep=0pt, wd=\myrightmargin, dp=1ex, ht=\myfooterheight]{footline}
+ \end{beamercolorbox}
+ }
+ }
+
+\mode<all> \ No newline at end of file