Skip to content

Commit

Permalink
kai-tub/issue45 (#54)
Browse files Browse the repository at this point in the history
* Fixes #45
* Added minimal_examples
* Removed code duplication
* Updated documentation
  • Loading branch information
kai-tub authored Oct 24, 2020
1 parent ac721e5 commit 9440fe3
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 33 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,25 @@ set the `nofooter` option:

![no-footer](https://raw.githubusercontent.com/wiki/kai-tub/latex-beamer-pure-minimalistic/minimal_examples/no_footer.png)

**Replace footer logo with page count**

To remove the footer logo and instead move the page description
to that position use the `nofooterlogo` option:
```latex
\usetheme[nofooterlogo, darkmode]{pureminimalistic}
```

![no-footer-logo](https://raw.githubusercontent.com/wiki/kai-tub/latex-beamer-pure-minimalistic/minimal_examples/no_footer_logo.png)

**Customize word for Page in footer**

To change the word _Page_ in the footer, define a different word with:
```latex
\renewcommand{\pageword}{Seite}
```

![custom-page-word](https://raw.githubusercontent.com/wiki/kai-tub/latex-beamer-pure-minimalistic/minimal_examples/custom_page_word.png)

# Release status
The next steps and thoughts about the upcoming release
with possible features can be seen on the [project
Expand Down
102 changes: 73 additions & 29 deletions beamerouterthemepureminimalistic.sty
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@

\newboolean{showmaxslides}
\setboolean{showmaxslides}{false}
\newboolean{nofooterlogo}
\setboolean{nofooterlogo}{false}

\newboolean{nofooter}
\setboolean{nofooter}{false}

\DeclareOptionBeamer{showmaxslides}{\setboolean{showmaxslides}{true}}
\DeclareOptionBeamer{nofooterlogo}{\setboolean{nofooterlogo}{true}}
\DeclareOptionBeamer{nofooter}{\setboolean{nofooter}{true}}

\ProcessOptionsBeamer
Expand All @@ -55,6 +58,16 @@
% full linewidth should be used
\newcommand{\logofooter}{\includegraphics[width=.8\linewidth]{\institutepath}}

\newcommand{\pageword}{Page}
\newcommand{\showpagenum}{%
\pageword{} \insertframenumber\ifthenelse{%
\boolean{showmaxslides}%
}{%
/\inserttotalframenumber%
}{}%
}


\defbeamertemplate*{frametitle}{largetitle}{
\logotitle
}
Expand All @@ -69,6 +82,23 @@
\setlength{\myfooterheight}{.08\paperheight}

\setbeamersize{text margin left=\myleftmargin, text margin right=\myrightmargin}
% This cannot be an environment because I need to access the height parameter
% after closing the relevant beamercolorbox
\newcommand{\basicfooter}[2]{%
\leavevmode
\begin{beamercolorbox}[sep=0pt, wd=\myleftmargin, ht=#1, dp=1ex]{footline}
\end{beamercolorbox}%
\begin{beamercolorbox}[sep=0pt, wd=\mytextlength, ht=#1, 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%
#2%
\end{beamercolorbox}%
\begin{beamercolorbox}[sep=0pt, wd=\myrightmargin, dp=1ex, ht=#1]{footline}
\end{beamercolorbox}%
}

\defbeamertemplate*{frametitle}{pureminimalistictitle}{
\vskip 10pt
Expand All @@ -82,44 +112,58 @@
\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{%
\defbeamertemplate*{footline}{pureminimalisticfooterdefault}{%
\basicfooter{%
\myfooterheight
}{%
\begin{beamercolorbox}[sep=0mm, wd=.725\mytextlength, ht=\myfooterheight]{footline}%
\usebeamerfont{footline}%
\vbox to\myfooterheight{%
\vfil%
\insertshorttitle{} $~|~$ %
\insertshortauthor{} $\quad$ %
\insertshortauthor{} $\quad$%
\insertshortsubtitle{}\par%
Page \insertframenumber\ifthenelse{%
\boolean{showmaxslides}}%
{/\inserttotalframenumber}%
{}\par%
\ifthenelse{\boolean{nofooterlogo}}{}{
\showpagenum
}
\par%
\vfil%
\vfil%
}%
\end{beamercolorbox}%
\begin{beamercolorbox}[sep=0mm, wd=.275\paperwidth,right, ht=\myfooterheight]{footline}
\vbox to\myfooterheight{%
}
\end{beamercolorbox}%
\begin{beamercolorbox}[sep=0mm, wd=.275\mytextlength,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}
}
}

\defbeamertemplate{footline}{pureminimalisticfooternologo}{%
\basicfooter{%
\myfooterheight
}{%
\vbox to\myfooterheight{%
\vfil%
\insertshorttitle{} $~|~$ %
\insertshortauthor{} $\quad$%
\insertshortsubtitle{}%
\hfill \showpagenum%
\par\vfil\vfil
}
}

}

\defbeamertemplate{footline}{pureminimalisticfooterdisable}{}

\ifthenelse{\boolean{nofooter}}{
\setbeamertemplate{footline}[pureminimalisticfooterdisable]
}{}

\ifthenelse{\boolean{nofooterlogo}}{
\setbeamertemplate{footline}[pureminimalisticfooternologo]
}{}

\mode<all>
28 changes: 24 additions & 4 deletions beamertheme-pure-minimalistic-demo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetheme[showmaxslides, darkmode]{pureminimalistic}

\usetheme[darkmode, showmaxslides]{pureminimalistic}
% \renewcommand{\pageword}{}
% \renewcommand{\logoheader}{\vspace{1.5em}}
\usepackage[backend=biber, doi=false, maxbibnames=2, maxcitenames=2,%
style=numeric, sorting=none, url=false, eprint=false]{biblatex}
\addbibresource{demo_bib.bib}
Expand Down Expand Up @@ -208,7 +209,11 @@ \section{Graphics}
To disable the logo, overwrite the default logo command with an empty
command.
\begin{verbatim}
\renewcommand{\logofooter}{}
\renewcommand{\logoheader}{}
\end{verbatim}
You may want to add some vertical space if you wish to delete the \texttt{logoheader}.
\begin{verbatim}
\renewcommand{\logoheader}{\vspace{1.5em}}
\end{verbatim}
\end{frame}

Expand Down Expand Up @@ -261,7 +266,6 @@ \section{Graphics}
\end{frame}
}


\section{Footer options}
\begin{frame}[fragile]{Disable footer}
If you do not want to use a footer, disable it with:
Expand All @@ -282,6 +286,22 @@ \section{Footer options}
the last few slides are shown.
\end{frame}

\begin{frame}[fragile]{Remove footer logo}
If you wish to remove the footer logo \emph{and}
move the page number to the right parts use:
\begin{verbatim}
\usetheme[nofooterlogo]{pureminimalistic}
\end{verbatim}
\end{frame}

\begin{frame}[fragile]{Change Page word}
If you wish to remove or change the word \emph{Page}
in the footer, change the value with
\begin{verbatim}
\renewcommand{\pageword}{Seite}
\end{verbatim}
\end{frame}

\section{Citations}
\begin{frame}{Citations}
I've also changed the bibliography options to be minimalistic:
Expand Down
1 change: 1 addition & 0 deletions beamerthemepureminimalistic.sty
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

\DeclareOptionBeamer{darkmode}{\PassOptionsToPackage{darkmode}{beamercolorthemepureminimalistic}}
\DeclareOptionBeamer{showmaxslides}{\PassOptionsToPackage{showmaxslides}{beamerouterthemepureminimalistic}}
\DeclareOptionBeamer{nofooterlogo}{\PassOptionsToPackage{nofooterlogo}{beamerouterthemepureminimalistic}}
\DeclareOptionBeamer{nofooter}{\PassOptionsToPackage{nofooter}{beamerouterthemepureminimalistic}}
\DeclareOptionBeamer{nofirafonts}{\PassOptionsToPackage{nofirafonts}{beamerfontthemepureminimalistic}}
\DeclareOptionBeamer{helvetica}{\PassOptionsToPackage{helvetica}{beamerfontthemepureminimalistic}}
Expand Down
20 changes: 20 additions & 0 deletions minimal_examples/custom_page_word.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
\documentclass[aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetheme[darkmode, nofooterlogo]{pureminimalistic}
\renewcommand{\pageword}{Seite}
\title[Custom word for page]{Long title}
\author{Kai Norman Clasen}
\institute{}
\date{\today}

\begin{document}
\begin{frame}{Custom word for page in footer}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet.
\end{frame}
\end{document}
20 changes: 20 additions & 0 deletions minimal_examples/no_footer_logo.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
\documentclass[aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetheme[darkmode, nofooterlogo]{pureminimalistic}

\title[No footer logo]{Long title}
\author{Kai Norman Clasen}
\institute{}
\date{\today}

\begin{document}
\begin{frame}{No Footer Logo}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet.
\end{frame}
\end{document}

0 comments on commit 9440fe3

Please sign in to comment.