Skip to content

Commit

Permalink
Add optional \footlineinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasquale Africa committed Nov 17, 2020
1 parent fb7d2b0 commit c2aa8be
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Focus v2.7.1
# Focus v2.8
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,8 +63,13 @@ 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
can be customized with:
```latex
\footlineinfo{Custom footline text}
```

The footline may also be disabled by typing:
The footline may also be disabled globally by typing:
```latex
\usetheme[numbering=none]{focus}
```
Expand Down
8 changes: 7 additions & 1 deletion beamerouterthemefocus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
}

% Full bar footline.
\def\footlineinfo#1{\def\focus@footlineinfo{#1}}
\defbeamertemplate{footline}{fullbar}{%
% If not appendix.
\ifnum\mainend<0% From package appendixnumberbeamer.
Expand All @@ -124,7 +125,12 @@
\begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]
\clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);
\fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height);


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

\node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber};
\node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/};
\node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber};
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}[2020/10/28 v2.7.1 Focus Beamer theme]
\ProvidesPackage{beamerthemefocus}[2020/11/17 v2.8 Focus Beamer theme]

\mode<presentation>

Expand Down
3 changes: 3 additions & 0 deletions focus-demo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
\institute{Institute Name \\ Institute Address}
\date{dd mm yyyy}

% Footline info is printed only if [numbering=fullbar].
%\footlineinfo{Custom footline text}

\begin{document}
\begin{frame}
\maketitle
Expand Down

0 comments on commit c2aa8be

Please sign in to comment.