texlive[48211] Master/texmf-dist: beamertheme-focus (16jul18)

commits+karl at tug.org commits+karl at tug.org
Tue Jul 17 01:04:19 CEST 2018


Revision: 48211
          http://tug.org/svn/texlive?view=revision&revision=48211
Author:   karl
Date:     2018-07-17 01:04:19 +0200 (Tue, 17 Jul 2018)
Log Message:
-----------
beamertheme-focus (16jul18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/beamertheme-focus/README.md
    trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-appendix.jpg
    trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-focus.jpg
    trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-references.jpg
    trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-typeset.jpg
    trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo.pdf
    trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamercolorthemefocus.sty
    trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerfontthemefocus.sty
    trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerinnerthemefocus.sty
    trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerouterthemefocus.sty
    trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerthemefocus.sty

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-focus/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamertheme-focus/README.md	2018-07-16 00:23:50 UTC (rev 48210)
+++ trunk/Master/texmf-dist/doc/latex/beamertheme-focus/README.md	2018-07-16 23:04:19 UTC (rev 48211)
@@ -2,8 +2,13 @@
 A presentation theme for LaTeX Beamer that aims at a clean and minimalist design,
 so to minimize distractions and put the focus directly on the content.
 
-Requires the package [PGF/TikZ](https://www.ctan.org/pkg/pgf) to be installed in your LaTeX distribution.
+This package is available through the [CTAN](https://ctan.org/pkg/beamertheme-focus) in
+most LaTeX distributions such as [MiKTeX](https://ctan.org/pkg/miktex) and [TeXLive](https://ctan.org/pkg/texlive).
 
+Requires the packages [appendixnumberbeamer](https://ctan.org/pkg/appendixnumberbeamer),
+[fira](https://ctan.org/pkg/fira) and [PGF/TikZ](https://ctan.org/pkg/pgf)
+to be installed in your LaTeX distribution.
+
 Demo
 ----
 A full demo is available. Refer to `demo.tex` and `demo.pdf`.
@@ -64,6 +69,15 @@
 \usetheme[numbering=none]{focus}
 ```
 
+Customize fonts
+---------------
+Focus is using the [Fira fonts](https://bboxtype.com/typefaces/FiraSans/) by default.
+
+This can be changed by using the option _nofirafonts_:
+```latex
+\usetheme[nofirafonts]{focus}
+```
+
 License
 =======
 This software is released under the [GNU GPL v3.0 License](https://www.gnu.org/licenses/gpl-3.0.en.html).
@@ -75,3 +89,12 @@
 Any suggestions, comments, criticism or appreciation are welcome!
 
 Contact information are available to registered users on my Github profile page.
+
+Authors
+=======
+Focus was initially created and designed by [Pasquale Africa](https://github.com/elauksap).
+
+My gratitude goes to the following authors, whose help has provided a significant contribution
+to its development.
+
+[Sebastian Friedl](https://github.com/SFr682k)

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-appendix.jpg
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-focus.jpg
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-references.jpg
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo-screenshots/demo-typeset.jpg
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-focus/demo.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamercolorthemefocus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamercolorthemefocus.sty	2018-07-16 00:23:50 UTC (rev 48210)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamercolorthemefocus.sty	2018-07-16 23:04:19 UTC (rev 48211)
@@ -1,8 +1,9 @@
 % Copyright (C) 2018 Pasquale Claudio Africa.
+%               2018 Sebastian Friedl.
 %
 % This file is part of beamerthemefocus.
 %
-% beamerthemefocusis free software: you can redistribute it and/or modify
+% beamerthemefocus 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.
@@ -9,7 +10,7 @@
 % 
 % beamerthemefocus 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
+% 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
@@ -24,12 +25,15 @@
 \definecolor{example}{RGB}{0, 110, 0}
 
 
-\setbeamercolor{frametitle}{fg=background, bg=main}
-
 \setbeamercolor{normal text}{fg=main, bg=background}
 \setbeamercolor{alerted text}{fg=alert}
 \setbeamercolor{example text}{fg=example}
 
+\setbeamercolor{titlelike}{fg=background, bg=main}
+\setbeamercolor{frametitle}{parent={titlelike}}
+
+\setbeamercolor{footline}{fg=background, bg=main}
+
 \setbeamercolor{block title}{bg=main!80!background, fg=background}
 \setbeamercolor{block body}{bg=main!10!background, fg=main}
 
@@ -42,11 +46,11 @@
 \setbeamercolor{itemize item}{fg=main}
 \setbeamercolor{itemize subitem}{fg=main}
 
-\setbeamercolor{enumerate item}{fg=alert!90!black}
-\setbeamercolor{enumerate subitem}{fg=alert!90!black}
+\setbeamercolor{enumerate item}{fg=main!70!black}
+\setbeamercolor{enumerate subitem}{fg=main!70!black}
 
-\setbeamercolor{description item}{fg=alert!90!black}
-\setbeamercolor{description subitem}{fg=alert!90!black}
+\setbeamercolor{description item}{fg=main!70!black}
+\setbeamercolor{description subitem}{fg=main!70!black}
 
 \setbeamercolor{section in toc}{fg=main}
 \setbeamercolor{subsection in toc}{fg=main}
@@ -54,7 +58,7 @@
 \setbeamercolor{subsection number projected}{bg=main}
 
 \setbeamercolor{bibliography item}{fg=main}
-\setbeamercolor{bibliography entry author}{fg=alert!90!black}
+\setbeamercolor{bibliography entry author}{fg=main!70!black}
 \setbeamercolor{bibliography entry title}{fg=main}
 \setbeamercolor{bibliography entry location}{fg=main}
 \setbeamercolor{bibliography entry note}{fg=main}

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerfontthemefocus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerfontthemefocus.sty	2018-07-16 00:23:50 UTC (rev 48210)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerfontthemefocus.sty	2018-07-16 23:04:19 UTC (rev 48211)
@@ -1,8 +1,9 @@
 % Copyright (C) 2018 Pasquale Claudio Africa.
+%               2018 Sebastian Friedl.
 %
 % This file is part of beamerthemefocus.
 %
-% beamerthemefocusis free software: you can redistribute it and/or modify
+% beamerthemefocus 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.
@@ -9,7 +10,7 @@
 % 
 % beamerthemefocus 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
+% 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
@@ -27,7 +28,7 @@
 \setbeamerfont{sectiontitle}{size=\huge, series=\scshape\bfseries}
 \setbeamerfont{frametitle}{size=\Large, shape=\scshape}
 
-\setbeamerfont{footer}{size=\normalsize}
+\setbeamerfont{footline}{size=\scriptsize}
 
 \setbeamerfont{focusframe}{size=\huge, shape=\scshape}
 

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerinnerthemefocus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerinnerthemefocus.sty	2018-07-16 00:23:50 UTC (rev 48210)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerinnerthemefocus.sty	2018-07-16 23:04:19 UTC (rev 48211)
@@ -1,8 +1,9 @@
 % Copyright (C) 2018 Pasquale Claudio Africa.
+%               2018 Sebastia Friedl.
 %
 % This file is part of beamerthemefocus.
 %
-% beamerthemefocusis free software: you can redistribute it and/or modify
+% beamerthemefocus 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.
@@ -9,7 +10,7 @@
 % 
 % beamerthemefocus 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
+% 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
@@ -17,31 +18,29 @@
 
 \mode<presentation>
 
-% Main background.
-\defbeamertemplate*{background}{focus}{
-    % Titlepage.
-    \ifnum\c at framenumber=0
-        \begin{tikzpicture}[overlay, remember picture]
-            \fill[color=background] (current page.north west) rectangle (current page.south east);
-        \end{tikzpicture}
-    \fi
-}
+\RequirePackage{tikz}
 
-% Focus frame background.
-\defbeamertemplate{background}{focusframe}{
-    \ifnum\c at framenumber>0
-        \begin{tikzpicture}[overlay, remember picture]
-            \fill[color=main] (current page.north west) rectangle (current page.south east);
-        \end{tikzpicture}
-    \fi
-}
 
+% CUSTOMIZE STRUCTURE ELEMENTS. ---------------------------------------------------------------------
+
+\setbeamertemplate{blocks}[default]
+
+\setbeamertemplate{section in toc}[square]
+\setbeamertemplate{subsection in toc}[square]
+
+\setbeamertemplate{itemize items}[square]
+\setbeamertemplate{itemize subitem}[triangle]
+
+
+
+% STRUCTURE FRAME TEMPLATE DEFINITIONS. -------------------------------------------------------------
+
 % Title page.
-\defbeamertemplate*{title page}{focus}[1][]
-{
-    \begin{tikzpicture}[overlay, remember picture]
-        \fill[color=main] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
-    \end{tikzpicture}
+\defbeamertemplate*{title page}{focus}{%
+    {\usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}%
+        \begin{tikzpicture}[overlay, remember picture]
+            \fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
+        \end{tikzpicture}}
     
     \vspace{-1.65\baselineskip}
     \begin{minipage}[b][0.35\paperheight]{\textwidth}
@@ -59,10 +58,10 @@
     
     % Set the title graphic in a zero-height box, so that
     % the position of other elements is not affected.
-    \vbox to 0pt {
+    {\vfuzz=9999pt\vbox to 0pt {
         \raggedleft
         \inserttitlegraphic
-    }
+    }}
     
     \begin{minipage}[t]{\textwidth}
         \usebeamerfont{author}
@@ -86,10 +85,13 @@
 }
 
 % Section page.
-\defbeamertemplate*{section page}{focus}{
-    \begin{tikzpicture}[overlay, remember picture]
-        \fill[color=main] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
-    \end{tikzpicture}
+\defbeamertemplate*{section page}{focus}{%
+    {%
+        \usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}%
+        \begin{tikzpicture}[overlay, remember picture]
+            \fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
+        \end{tikzpicture}%
+    }
     
     \vspace{-2\baselineskip}
     \begin{minipage}[b][0.45\paperheight]{\textwidth}
@@ -101,27 +103,11 @@
     \begin{minipage}[t][0.55\paperheight]{\textwidth}
     \end{minipage}
 }
-\setbeamertemplate{section page}[focus]
 
-\AtBeginSection{
+\AtBeginSection{%
     \begin{frame}[plain, noframenumbering]{}
         \sectionpage
-    \end{frame}
+    \end{frame}%
 }
 
-% Shift footnotes to prevent overlap with footline.
-\addtobeamertemplate{footnote}
-{\ifnum\footlineheight>0\vspace{-0.55\footlineheight}\fi}
-{\ifnum\footlineheight>0\vspace{0.55\footlineheight}\fi}
-
-\renewcommand*{\footnoterule}
-{
-    \kern -3pt
-    \hrule width 2in height 0.4pt
-    \ifnum\footlineheight>0
-        \kern 0.55\footlineheight
-    \fi
-    \kern 2.6pt
-}
-
 \mode<all>

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerouterthemefocus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerouterthemefocus.sty	2018-07-16 00:23:50 UTC (rev 48210)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerouterthemefocus.sty	2018-07-16 23:04:19 UTC (rev 48211)
@@ -1,8 +1,9 @@
 % Copyright (C) 2018 Pasquale Claudio Africa.
+%               2018 Sebastian Friedl.
 %
 % This file is part of beamerthemefocus.
 %
-% beamerthemefocusis free software: you can redistribute it and/or modify
+% beamerthemefocus 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.
@@ -9,7 +10,7 @@
 % 
 % beamerthemefocus 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
+% 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
@@ -17,116 +18,99 @@
 
 \mode<presentation>
 
-% Main header.
-\defbeamertemplate*{frametitle}{focus}
-{
+\RequirePackage{appendixnumberbeamer}% Don't number appendix frames.
+\RequirePackage{etoolbox}% \BeforeBeginEnvironment
+\RequirePackage{tikz}
+
+
+% FRAMETITLE TEMPLATES. -------------------------------------------------------------------------------------------------
+
+\defbeamertemplate*{frametitle}{focus}{%
     % If not title page.
-    \ifnum\c at framenumber>0
-        \begin{tikzpicture}[overlay, remember picture]
-            \fill[color=main] (current page.north west) rectangle ([shift = {(0, -1cm)}] current page.north east);
-            \node at ([shift = {(0.6cm, -0.5cm)}] current page.north west) [anchor = west, inner sep = 0pt]
-            {
-                \usebeamerfont{frametitle}
-                \usebeamercolor[fg]{frametitle}
-                \insertframetitle
-                % Fix for vertical centering.
-                \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz(),}
-            };
-        \end{tikzpicture}
-   \fi
+    \ifnum\value{framenumber}>0%
+        \vspace{-1pt}%
+        \begin{beamercolorbox}[wd=\paperwidth,leftskip=0.55cm,rightskip=0.55cm,sep=0.2cm]{frametitle}%
+            \strut\insertframetitle\strut%
+        \end{beamercolorbox}%
+    \fi%
 }
 
 % Plain header.
-\defbeamertemplate{frametitle}{plain}
-{
+\defbeamertemplate{frametitle}{plain}{%
     % If not title page.
-    \ifnum\c at framenumber>0
-        \begin{tikzpicture}[overlay, remember picture]
-            \fill[opacity=0] (current page.north west) rectangle ([shift = {(0, -1cm)}] current page.north east);
-            \node at ([shift = {(0.6cm, -0.5cm)}] current page.north west) [anchor = west, inner sep = 0pt] {};
-        \end{tikzpicture}
-    \fi
+    \ifnum\value{framenumber}>0%
+        \vspace{-1pt}%
+        \begin{beamercolorbox}[wd=\paperwidth,leftskip=0.55cm,rightskip=0.55cm,sep=0.2cm,ignorebg]{frametitle}%
+            \strut%
+        \end{beamercolorbox}%
+    \fi%
 }
 
-% Progress bar footline.
-\newlength{\footlineheight} % Progress bar height.
 
-\defbeamertemplate*{footline}{progressbar}
-{
+
+% FOOTLINE TEMPLATES. ---------------------------------------------------------------------------------------------------
+
+% Lenghts for the progress bar footline.
+\newlength{\focus at pbar@height}% Progress bar height.
+\newlength{\focus at pbar@leftoffset}
+\newlength{\focus at pbar@rightoffset}
+
+\defbeamertemplate*{footline}{progressbar}{%
     % If not appendix.
-    \ifnum\mainend<0 % From package appendixnumberbeamer.
+    \ifnum\mainend<0% From package appendixnumberbeamer.
+        %
+        \settowidth{\focus at pbar@leftoffset}{1}%
+        \addtolength{\focus at pbar@leftoffset}{1.5em}%
+        %
+        \settowidth{\focus at pbar@rightoffset}{\inserttotalframenumber}%
+        \addtolength{\focus at pbar@rightoffset}{1.5em}%
+        %
         % If not title page.
-        \ifnum\c at framenumber>0
-            \ifnum\c at framenumber<\inserttotalframenumber
-                \begin{tikzpicture}[overlay, remember picture]
-                    \pgfmathsetmacro{\progress}{(\insertframenumber-1)/(\inserttotalframenumber-1) * (\textwidth-2*\beamer at leftmargin)}
-                    % Current frame number.
-                    \fill[color=main] (current page.south west) rectangle ([shift = {(\progress pt + \beamer at leftmargin, \footlineheight)}] current page.south west);
-                    \node at ([shift = {(\progress pt + \beamer at leftmargin, 0.5\footlineheight)}] current page.south west) [anchor = east, inner sep = 0pt]
-                    {
-                        \usebeamerfont{footer}
-                        \usebeamercolor[fg]{frametitle}
-                        \insertframenumber\phantom{\strut/\strut}
-                    };
+        \ifnum\c at framenumber>0%
+            \ifnum\c at framenumber<\inserttotalframenumber%
+                \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]\usebeamerfont{footline}
+                    \pgfmathsetmacro{\focus at pbar@progress}%
+                        {(\paperwidth-\focus at pbar@leftoffset-\focus at pbar@rightoffset)*(\insertframenumber/\inserttotalframenumber)}
+                
+                    \clip (0,0) rectangle ++(\paperwidth,\the\focus at pbar@height);
+                    \fill[footline.bg] (0,0) rectangle ++(\the\focus at pbar@leftoffset,\the\focus at pbar@height);
                     
-                    % Total frame number.
-                    \fill[color=main] ([shift = {(-\beamer at rightmargin, \footlineheight)}] current page.south east) rectangle ([shift = {(0, 0)}] current page.south east);
-                    \node at ([shift = {(-\beamer at rightmargin, 0.5\footlineheight)}] current page.south east) [anchor = west, inner sep = 0pt]
-                    {
-                        \usebeamerfont{footer}
-                        \usebeamercolor[fg]{frametitle}
-                        \vphantom{\strut/\strut}\inserttotalframenumber
-                    };
-                \end{tikzpicture}
-            \else
-                \begin{tikzpicture}[overlay, remember picture]
-                    \fill[color=main] (current page.south west) rectangle ([shift = {(0, \footlineheight)}] current page.south east);
-                    % At left of \beamer at rightmargin.
-                    \node at ([shift = {(-\beamer at rightmargin, 0.5\footlineheight)}] current page.south east) [anchor = east, inner sep = 0pt]
-                    {
-                        \usebeamerfont{footer}
-                        \usebeamercolor[fg]{frametitle}
-                        \insertframenumber\ \strut/\strut\ 
-                    };
-                    % At right of \beamer at rightmargin.
-                    \node at ([shift = {(-\beamer at rightmargin, 0.5\footlineheight)}] current page.south east) [anchor = west, inner sep = 0pt]
-                    {
-                        \usebeamerfont{footer}
-                        \usebeamercolor[fg]{frametitle}
-                        \vphantom{\strut/\strut}\inserttotalframenumber
-                    };
-                \end{tikzpicture}
-            \fi
-        \fi
-    \fi
+                    \fill[footline.bg] (\the\focus at pbar@leftoffset,0) rectangle ++(\focus at pbar@progress pt,\the\focus at pbar@height)
+                                       ++(0,{-0.5*\the\focus at pbar@height}) node[anchor=east, text=footline.fg] {\strut\insertframenumber};
+                    
+                    \fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus at pbar@rightoffset,\the\focus at pbar@height)
+                                       ++(0,{-0.5*\the\focus at pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber};
+                \end{tikzpicture}%
+            \else%
+                \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]
+                    \clip (0,0) rectangle ++(\paperwidth,\the\focus at pbar@height);
+                    \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus at pbar@height);
+                    
+                    \node[anchor=east, footline.fg] at ({\paperwidth-\the\focus at pbar@rightoffset},{0.5*\focus at pbar@height}) {\strut\insertframenumber};
+                    \node[footline.fg] at ({\paperwidth-\the\focus at pbar@rightoffset},{0.5*\focus at pbar@height}) {\strut/};
+                    \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus at pbar@rightoffset},{0.5*\focus at pbar@height}) {\strut\inserttotalframenumber};
+                \end{tikzpicture}%
+            \fi%
+        \fi%
+    \fi%
 }
 
 % Full bar footline.
-\defbeamertemplate{footline}{fullbar}
-{
+\defbeamertemplate{footline}{fullbar}{%
     % If not appendix.
-    \ifnum\mainend<0 % From package appendixnumberbeamer.
+    \ifnum\mainend<0% From package appendixnumberbeamer.
         % If not title page.
-        \ifnum\c at framenumber>0
-            \begin{tikzpicture}[overlay, remember picture]
-                \fill[color=main] (current page.south west) rectangle ([shift = {(0, \footlineheight)}] current page.south east);
-                % At left of \beamer at rightmargin.
-                \node at ([shift = {(-\beamer at rightmargin, 0.5\footlineheight)}] current page.south east) [anchor = east, inner sep = 0pt]
-                {
-                    \usebeamerfont{footer}
-                    \usebeamercolor[fg]{frametitle}
-                    \insertframenumber\ \strut/\strut\ 
-                };
-                % At right of \beamer at rightmargin.
-                \node at ([shift = {(-\beamer at rightmargin, 0.5\footlineheight)}] current page.south east) [anchor = west, inner sep = 0pt]
-                {
-                    \usebeamerfont{footer}
-                    \usebeamercolor[fg]{frametitle}
-                    \vphantom{\strut/\strut}\inserttotalframenumber
-                };
-            \end{tikzpicture}
-        \fi
-    \fi
+        \ifnum\c at framenumber>0%
+            \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]
+                \clip (0,0) rectangle ++(\paperwidth,\the\focus at pbar@height);
+                \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus at pbar@height);
+                
+                \node[anchor=east, footline.fg] at ({\paperwidth-\the\focus at pbar@rightoffset},{0.5*\focus at pbar@height}) {\strut\insertframenumber};
+                \node[footline.fg] at ({\paperwidth-\the\focus at pbar@rightoffset},{0.5*\focus at pbar@height}) {\strut/};
+                \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus at pbar@rightoffset},{0.5*\focus at pbar@height}) {\strut\inserttotalframenumber};
+            \end{tikzpicture}%
+        \fi%
+    \fi%
 }
 
 % Empty footline.
@@ -140,85 +124,137 @@
 \def\beamer at focus@numberingfullbar{fullbar}
 \def\beamer at focus@numberingnone{none}
 
-% Default style.
-\BeforeBeginEnvironment{frame}{
-    \setbeamertemplate{background}[focus]
-    \setbeamertemplate{frametitle}[focus]
-    
+
+
+% BACKGROUND CANVAS TEMPLATES. ------------------------------------------------------------------------------------------
+
+\defbeamertemplate*{background canvas}{focus}{%
+    \begin{tikzpicture}
+        \clip (0,0) rectangle ++(\paperwidth,\paperheight);
+        \fill[normal text.bg] (0,0) rectangle ++(\paperwidth,\paperheight);
+    \end{tikzpicture}%
+}
+
+\defbeamertemplate{background canvas}{focusplain}{%
+    \begin{tikzpicture}
+        \clip (0,0) rectangle ++(\paperwidth,\paperheight);
+        \fill[normal text.bg] (0,0) rectangle ++(\paperwidth,\paperheight);
+    \end{tikzpicture}%
+}
+
+\defbeamertemplate{background canvas}{focusframe}{%
+    \begin{tikzpicture}
+        \clip (0,0) rectangle ++(\paperwidth,\paperheight);
+        \fill[frametitle.bg] (0,0) rectangle ++(\paperwidth,\paperheight);        
+    \end{tikzpicture}%
+}
+
+
+
+% HOOKS FOR CREATING FRAMES. --------------------------------------------------------------------------------------------
+
+\BeforeBeginEnvironment{frame}{%
+    \setbeamertemplate{background canvas}[focus]%
+    \setbeamertemplate{frametitle}[focus]%
+    %
     % Reset footline height and determine it for the current slide.
-    \setlength{\footlineheight}{0cm}
-    
+    \setlength{\focus at pbar@height}{0cm}%
+    \focus at calculatefootheight%
+    %
     % If not appendix.
     \ifnum\mainend<0 % From package appendixnumberbeamer.
-        \ifx\beamer at focus@numbering\beamer at focus@numberingprogressbar
-            \setlength{\footlineheight}{0.4cm}
-            \setbeamertemplate{footline}[progressbar]
-        \else
-            \ifx\beamer at focus@numbering\beamer at focus@numberingfullbar
-                \setlength{\footlineheight}{0.4cm}
-                \setbeamertemplate{footline}[fullbar]
-            \fi
-        \fi
-    \fi
+        \settoheight{\focus at pbar@height}{\usebeamerfont{footline}1234567890/}%
+        \addtolength{\focus at pbar@height}{6pt}%
+        %
+        \ifx\beamer at focus@numbering\beamer at focus@numberingprogressbar%
+            \setbeamertemplate{footline}[progressbar]%
+        \else%
+            \ifx\beamer at focus@numbering\beamer at focus@numberingfullbar%
+                \setbeamertemplate{footline}[fullbar]%
+            \fi%
+        \fi%
+        %
+        \focus at calculatefootheight%
+    \fi%
 }
 
 % Enable noframenumbering option.
-\makeatletter
-\define at key{beamerframe}{noframenumbering}[true]{
-    \setbeamertemplate{footline}[none]
-    \setlength{\footlineheight}{0cm}
-    
-    \addtocounter{framenumber}{-1}
+
+\define at key{beamerframe}{noframenumbering}[true]{%
+    \setbeamertemplate{footline}[none]%
+    \setlength{\focus at pbar@height}{0cm}%
+    \focus at calculatefootheight%
+    %
+    \addtocounter{framenumber}{-1}%
 }
-\makeatother
 
+
 % Enable plain option.
-\makeatletter
-\define at key{beamerframe}{plain}[true]{
-    \setbeamertemplate{background}{}
-    \setbeamertemplate{frametitle}[plain]
-    
-    \setbeamertemplate{footline}[none]
-    \setlength{\footlineheight}{0cm}
+
+\define at key{beamerframe}{plain}[true]{%
+    \setbeamertemplate{background canvas}[focusplain]%
+    \setbeamertemplate{frametitle}[plain]%
+    %
+    \setbeamertemplate{footline}[none]%
 }
-\makeatother
 
+
 % Full vertical centering
 % (from https://tex.stackexchange.com/questions/247826/beamer-full-vertical-centering).
-\makeatletter
-\define at key{beamerframe}{c}[true]{
-    \beamer at frametopskip=0pt plus 1fill\relax
-    \beamer at framebottomskip=0pt plus 1fill\relax
-    \beamer at frametopskipautobreak=0pt plus .4\paperheight\relax
-    \beamer at framebottomskipautobreak=0pt plus .6\paperheight\relax
-    \def\beamer at initfirstlineunskip{}
+
+\define at key{beamerframe}{c}[true]{%
+    \beamer at frametopskip=0pt plus 1fill\relax%
+    \beamer at framebottomskip=0pt plus 1fill\relax%
+    \beamer at frametopskipautobreak=0pt plus 0.4\paperheight\relax%
+    \beamer at framebottomskipautobreak=0pt plus 0.6\paperheight\relax%
+    \def\beamer at initfirstlineunskip{}%
 }
-\makeatother
 
+
 % Enable focus option.
-\makeatletter
+
 \providebool{focus at standout}
-\define at key{beamerframe}{focus}[true]{
-    \booltrue{focus at standout}
-    \begingroup
-        \setkeys{beamerframe}{noframenumbering}
-        \setbeamertemplate{background}[focusframe]
-        \setbeamertemplate{frametitle}[plain]
-        
-        \setkeys{beamerframe}{c}
-        \centering
-        \usebeamerfont{focusframe}
-        \usebeamercolor[fg]{frametitle}
+\define at key{beamerframe}{focus}[true]{%
+    \booltrue{focus at standout}%
+    \begingroup%
+        \setkeys{beamerframe}{noframenumbering}%
+        \setbeamertemplate{background canvas}[focusframe]%
+        \setbeamertemplate{frametitle}[plain]%
+        %
+        \setkeys{beamerframe}{c}%
+        \centering%
+        \usebeamerfont{focusframe}%
+        \usebeamercolor[fg]{frametitle}%
 }
 
 \apptocmd{\beamer at reseteecodes}
-{
-    \ifbool{focus at standout}
-    {
-        \endgroup
-        \boolfalse{focus at standout}
-    }{}
+{%
+    \ifbool{focus at standout}%
+    {%
+        \endgroup%
+        \boolfalse{focus at standout}%
+    }{}%
 }{}{}
-\makeatother
 
+
+% Recalculate the footline's size and refresh other parameters.
+% Partially copied from the definition of \beamer at calculateheadfoot.
+
+\def\focus at calculatefootheight{%
+    \footheight=\focus at pbar@height%
+    \advance\footheight by 4pt%
+    \sidebarheight=\paperheight%
+    \advance\sidebarheight by-\headheight%
+    \advance\sidebarheight by\headdp%
+    \advance\sidebarheight by-\footheight%
+    \advance\sidebarheight by 4pt%
+    \footskip=\footheight%
+    \textheight=\paperheight%
+    \advance\textheight by-\footheight%
+    \advance\textheight by-\headheight%
+    \@colht\textheight%
+    \@colroom\textheight%
+    \vsize\textheight%
+}
+
 \mode<all>

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerthemefocus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerthemefocus.sty	2018-07-16 00:23:50 UTC (rev 48210)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-focus/beamerthemefocus.sty	2018-07-16 23:04:19 UTC (rev 48211)
@@ -1,8 +1,9 @@
 % Copyright (C) 2018 Pasquale Claudio Africa.
+%               2018 Sebastian Friedl.
 %
 % This file is part of beamerthemefocus.
 %
-% beamerthemefocusis free software: you can redistribute it and/or modify
+% beamerthemefocus 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.
@@ -9,7 +10,7 @@
 % 
 % beamerthemefocus 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
+% 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
@@ -16,24 +17,43 @@
 % along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerthemefocus}[2018/06/25 v1.1 Focus Beamer theme]
+\ProvidesPackage{beamerthemefocus}[2018/07/15 v2.0 Focus Beamer theme]
 
-\mode<presentation>
+% Note:
+% Packages should be required in the package file using their commands!
 
-\RequirePackage[T1]{fontenc}
-\RequirePackage{FiraSans}
 
-\RequirePackage{tikz}
+\mode<presentation>
 
-\RequirePackage{etoolbox} % \BeforeBeginEnvironment
-\RequirePackage{appendixnumberbeamer} % Don't number appendix frames.
 
+% THEME OPTIONS. ------------------------------------------------------------------------------------
 
-\DeclareOptionBeamer{numbering}{
+\DeclareOptionBeamer{numbering}{%
     \PassOptionsToPackage{numbering=#1}{beamerouterthemefocus}
 }
+
+\newif\if at focus@loadfirafonts
+\@focus at loadfirafontstrue
+
+\DeclareOptionBeamer{nofirafonts}{\@focus at loadfirafontsfalse}
+
 \ProcessOptionsBeamer
 
+
+
+% LOAD EXTERNAL PACKAGES. ---------------------------------------------------------------------------------------
+
+\if at focus@loadfirafonts
+    \RequirePackage[T1]{fontenc}
+    
+    \PassOptionsToPackage{type1}{FiraSans}
+    \PassOptionsToPackage{type1}{FiraMono}
+    
+    \RequirePackage{FiraSans}
+    \RequirePackage{FiraMono}
+\fi
+
+
 \usecolortheme{focus}
 \usefonttheme{focus}
 \useinnertheme{focus}
@@ -40,15 +60,11 @@
 \useoutertheme{focus}
 
 \setbeamertemplate{navigation symbols}{}
-\setbeamertemplate{blocks}[default]
 
-\setbeamertemplate{section in toc}[square]
-\setbeamertemplate{subsection in toc}[square]
 
-\setbeamertemplate{itemize items}[square]
-\setbeamertemplate{itemize subitem}[triangle]
 
-% Set margins.
+% SET MARGINS. ------------------------------------------------------------------------------------------
+
 \setbeamersize{text margin left=0.75cm, text margin right=0.75cm}
 \setlength{\leftmargini}{0.75cm}
 %\leftmarginii=0.75\leftmargini\relax



More information about the tex-live-commits mailing list