diff options
Diffstat (limited to 'macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty')
-rw-r--r-- | macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty | 57 |
1 files changed, 44 insertions, 13 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty index 9031ac0ca3..0f09243977 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty @@ -68,6 +68,9 @@ \newlength{\focus@pbar@leftoffset} \newlength{\focus@pbar@rightoffset} +% Comparision token for totalframenumbering. +\def\no{no} + \defbeamertemplate*{footline}{progressbar}{% % If not appendix. \ifnum\mainend<0% From package appendixnumberbeamer. @@ -75,8 +78,13 @@ \settowidth{\focus@pbar@leftoffset}{1}% \addtolength{\focus@pbar@leftoffset}{1.5em}% % - \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% - \addtolength{\focus@pbar@rightoffset}{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% @@ -91,8 +99,11 @@ \fill[footline.bg] (\the\focus@pbar@leftoffset,0) rectangle ++(\focus@pbar@progress pt,\the\focus@pbar@height) ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=east, text=footline.fg] {\strut\insertframenumber}; - \fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus@pbar@rightoffset,\the\focus@pbar@height) - ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber}; + \ifx\beamer@focus@totalframenumbering\no% + \else% + \fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus@pbar@rightoffset,\the\focus@pbar@height) + ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber}; + \fi% \end{tikzpicture}% \else% \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex] @@ -100,8 +111,12 @@ \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); \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}; + + \ifx\beamer@focus@totalframenumbering\no% + \else% + \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}; + \fi% \end{tikzpicture}% \fi% \fi% @@ -118,8 +133,13 @@ \settowidth{\focus@pbar@leftoffset}{1}% \addtolength{\focus@pbar@leftoffset}{1.5em}% % - \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% - \addtolength{\focus@pbar@rightoffset}{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% @@ -127,14 +147,18 @@ \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 + \ifx\focus@footlineinfo\empty% + \else% \node[anchor=west, footline.fg] at ({\the\focus@pbar@leftoffset},{0.5*\focus@pbar@height}) {\focus@footlineinfo}; - \fi + \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}; + + \ifx\beamer@focus@totalframenumbering\no% + \else% + \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}; + \fi% \end{tikzpicture}% \fi% \fi% @@ -145,12 +169,19 @@ \DeclareOptionBeamer{numbering}{\def\beamer@focus@numbering{#1}} \ExecuteOptionsBeamer{numbering=progressbar} + +\DeclareOptionBeamer{totalframenumbering}{\def\beamer@focus@totalframenumbering{#1}} +\ExecuteOptionsBeamer{totalframenumbering=yes} + \ProcessOptionsBeamer \def\beamer@focus@numberingprogressbar{progressbar} \def\beamer@focus@numberingfullbar{fullbar} \def\beamer@focus@numberingnone{none} +\def\beamer@focus@totalframenumberingyes{yes} +\def\beamer@focus@totalframenumberingno{no} + % BACKGROUND CANVAS TEMPLATES. ------------------------------------------------- \defbeamertemplate*{background canvas}{focus}{% |