Skip to content

Commit

Permalink
Add "minimal" footline style
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasquale Africa committed Dec 8, 2021
1 parent 6de113f commit 1016dbd
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Focus v3.0.0
# Focus v3.1.0
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.

Expand Down Expand Up @@ -63,13 +63,19 @@ Alternatively, a full footline bar with the frame numbering can be shown with:
```latex
\usetheme[numbering=fullbar]{focus}
```
In such case, an optional text to be printed on the left side of the footline

The `minimal` style just prints the frame numbering without any footline background:
```latex
\usetheme[numbering=minimal]{focus}
```

In the `fullbar` and `minimal` cases, an optional text to be printed on the left side of the footline
can be customized with:
```latex
\footlineinfo{Custom footline text}
```

For both footline styles the total frame number (shown by default) can be suppressed with:
For all footline styles the total frame number (shown by default) can be suppressed with:
```latex
\usetheme[totalframenumbering=no]{focus}
```
Expand Down
45 changes: 44 additions & 1 deletion beamerouterthemefocus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,44 @@
\fi%
}

\defbeamertemplate{footline}{minimal}{%
% If not appendix.
\ifnum\mainend<0% From package appendixnumberbeamer.
%
\settowidth{\focus@pbar@leftoffset}{1}%
\addtolength{\focus@pbar@leftoffset}{1.5em}%
%
\ifx\beamer@focus@totalframenumbering\no%
\settowidth{\focus@pbar@rightoffset}{}%
\addtolength{\focus@pbar@rightoffset}{0.5em}%
\else%
\settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}%
\addtolength{\focus@pbar@rightoffset}{1.5em}%
\fi%
%
% If not title page.
\ifnum\value{realframenumber}>0%
\begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]
\clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\fill[footline.fg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);

\ifx\focus@footlineinfo\empty%
\else%
\node[anchor=west, footline.bg] at ({\the\focus@pbar@leftoffset},{0.5*\focus@pbar@height}) {\focus@footlineinfo};
\fi%

\node[anchor=east, footline.bg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber};

\ifx\beamer@focus@totalframenumbering\no%
\else%
\node[footline.bg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/};
\node[anchor=west, footline.bg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber};
\fi%
\end{tikzpicture}%
\fi%
\fi%
}

% Empty footline.
\defbeamertemplate{footline}{none}{}

Expand All @@ -177,6 +215,7 @@

\def\beamer@focus@numberingprogressbar{progressbar}
\def\beamer@focus@numberingfullbar{fullbar}
\def\beamer@focus@numberingminimal{minimal}
\def\beamer@focus@numberingnone{none}

\def\beamer@focus@totalframenumberingyes{yes}
Expand Down Expand Up @@ -220,7 +259,11 @@
\ifx\beamer@focus@numbering\beamer@focus@numberingfullbar%
\setbeamertemplate{footline}[fullbar]%
\else%
\setbeamertemplate{footline}[none]%
\ifx\beamer@focus@numbering\beamer@focus@numberingminimal%
\setbeamertemplate{footline}[minimal]%
\else%
\setbeamertemplate{footline}[none]%
\fi
\fi%
\fi%
%
Expand Down
2 changes: 1 addition & 1 deletion beamerthemefocus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemefocus}[2021/12/07 v3.0.0 Focus Beamer theme]
\ProvidesPackage{beamerthemefocus}[2021/12/08 v3.1.0 Focus Beamer theme]

\mode<presentation>

Expand Down

0 comments on commit 1016dbd

Please sign in to comment.