diff --git a/examples/demo/demo.pdf b/examples/demo/demo.pdf index 2f797e1..10e480b 100644 Binary files a/examples/demo/demo.pdf and b/examples/demo/demo.pdf differ diff --git a/examples/demo/demo.tex b/examples/demo/demo.tex index 42c1701..e1ba024 100644 --- a/examples/demo/demo.tex +++ b/examples/demo/demo.tex @@ -75,7 +75,6 @@ \molochset{titleformat frame=smallcaps} \begin{frame} \frametitle{Small Caps} - This frame uses the \texttt{smallcaps} title format. \begin{alertblock}{Potential Problems} Be aware that not every font supports small caps. If you use the Computer (or Latin) Modern Sans Serif font, for instance, text in small caps will just be typeset in a normal font. @@ -264,6 +263,48 @@ \end{columns} \end{frame} +\begin{frame}[c] + \frametitle{Progress Bars} + + A prominent feature of \themename is the use of progress bars to + visualize the progress of the presentation. \medskip + + By default bars are shown on section pages, but this can be toggled + through \texttt{sectionpage=progressbar|simple|none} and also enabled for + subsection pages through \texttt{subsectionpage=progressbar}.\medskip + + + Finally, you can enable progress bars on frames by setting + \texttt{progressbar=none|head|frametitle|foot} (depending on where + you'd like the bar to be placed).\medskip +\end{frame} + +\begin{frame}[c,fragile] + \frametitle{Progress Bar Customization} + You can customize the width of the bars using + \texttt{progressbar linewidth=}.\medskip + + On the following pages, we have set +\begin{verbatim}\molochset{ + progressbar=frametitle, + progressbar linewidth=1pt +} +\end{verbatim} + to enable progress bars below the frame title and set its width to 1pt. +\end{frame} + +\molochset{progressbar=frametitle,progressbar linewidth=1pt} + +\begin{frame}[c,fragile] + \frametitle{The Title Page} + + There is only very little customization available of the title page at the + time of writing.\medskip + + But you can at least modify the line width of the title separator + by setting \texttt{titleseparator linewidth=} +\end{frame} + \begin{frame} \frametitle{Math} \begin{equation*} diff --git a/src/beamerinnerthememoloch.dtx b/src/beamerinnerthememoloch.dtx index aabf357..afc2ca3 100644 --- a/src/beamerinnerthememoloch.dtx +++ b/src/beamerinnerthememoloch.dtx @@ -117,6 +117,29 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{titleseparator linewidth} +% Set the width of the line separating the title from the author. +% \begin{macrocode} +\newlength{\moloch@titleseparator@linewidth} +\pgfkeys{ + /moloch/inner/.cd, + titleseparatorlinewidth/.code={\setlength{\moloch@titleseparator@linewidth}{#1}}, + titleseparatorlinewidth/.default=0.4pt, +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{titleseparator aliases} +% Allows |titleseparator linewidth| to be used in |\usetheme|. +% \begin{macrocode} +\pgfkeys{ + /moloch/inner/.cd, + titleseparator linewidth/.code=\pgfkeysalso{titleseparatorlinewidth=#1}, +} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\moloch@inner@setdefaults} % Set default values for inner theme options. % \begin{macrocode} @@ -124,7 +147,8 @@ \pgfkeys{/moloch/inner/.cd, sectionpage=progressbar, subsectionpage=none, - standoutnumbering=none + standoutnumbering=none, + titleseparator linewidth=0.4pt, } } % \end{macrocode} @@ -205,7 +229,6 @@ \raggedright% \moloch@titleformat{\inserttitle}% \par% - \vspace*{0.2em} } % \end{macrocode} % \end{macro} @@ -214,26 +237,23 @@ % Set the subtitle on the title page. % \begin{macrocode} \setbeamertemplate{subtitle}{ - \vspace*{0.1em} + \vspace*{0.3em} \raggedright% \moloch@subtitleformat{\insertsubtitle}% \par% - \vspace*{0.2em} } % \end{macrocode} % \end{macro} % % \begin{macro}{title separator} -% Template to set the title graphic in a zero-height box. (It won't -% change the position of other elements.) +% Template to set the title separator. % \begin{macrocode} -\newlength{\moloch@titleseparator@linewidth} -\setlength{\moloch@titleseparator@linewidth}{0.4pt} \setbeamertemplate{title separator}{ \tikzexternaldisable% - \begin{tikzpicture} + \begin{tikzpicture}[baseline=(current bounding box.north)] \mmzUnmemoizable% \fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth); + \useasboundingbox (0,0) rectangle (\textwidth,-\moloch@titleseparator@linewidth); \end{tikzpicture}% \tikzexternalenable% \par% @@ -296,7 +316,7 @@ \insertsubsectionhead% \fi \end{center} - \vspace{\baselineskip - 1ex + 0.4pt} + \vspace{\baselineskip - 1ex + \moloch@titleseparator@linewidth} } \defbeamertemplate{section page}{progressbar}{ \centering @@ -366,15 +386,12 @@ % |progress bar in head/foot|. % % \begin{macrocode} -\newlength{\moloch@progressonsectionpage} -\newlength{\moloch@progressonsectionpage@linewidth} -\setlength{\moloch@progressonsectionpage@linewidth}{0.4pt} \setbeamertemplate{progress bar in section page}{ \pgfmathsetlength{\moloch@progressonsectionpage}{ \textwidth * min(1,\insertframenumber/\inserttotalframenumber) }% \tikzexternaldisable% - \begin{tikzpicture} + \begin{tikzpicture}[baseline=(current bounding box.north)] \mmzUnmemoizable% \fill[bg] (0,0) @@ -385,6 +402,7 @@ rectangle (\moloch@progressonsectionpage, \moloch@progressonsectionpage@linewidth); + \useasboundingbox (0,0) rectangle (\textwidth,-\moloch@progressonsectionpage@linewidth); \end{tikzpicture}% \tikzexternalenable% } diff --git a/src/beamerouterthememoloch.dtx b/src/beamerouterthememoloch.dtx index 1769e39..d06ff36 100644 --- a/src/beamerouterthememoloch.dtx +++ b/src/beamerouterthememoloch.dtx @@ -71,12 +71,41 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{progressbar linewidth} +% Sets the linewidth of the progress bar for sectionpages and frames. +% \begin{macrocode} +\newlength{\moloch@progressonsectionpage} +\newlength{\moloch@progressonsectionpage@linewidth} +\newlength{\moloch@progressinheadfoot} +\newlength{\moloch@progressinheadfoot@linewidth} +\pgfkeys{ + /moloch/outer/.cd, + progressbarlinewidth/.code={ + \setlength{\moloch@progressonsectionpage@linewidth}{#1} + \setlength{\moloch@progressinheadfoot@linewidth}{#1} + }, + progressbarlinewidth/.default=0.4pt, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{progressbar aliases} +% Allows |progressbar linewidth| to be used in |\molochset|. +% \begin{macrocode} +\pgfkeys{ + /moloch/outer/.cd, + progressbar linewidth/.code=\pgfkeysalso{progressbarlinewidth=#1}, +} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\moloch@outer@setdefaults} % Sets default values for outer theme options. % \begin{macrocode} \newcommand{\moloch@outer@setdefaults}{ \pgfkeys{/moloch/outer/.cd, progressbar=none, + progressbar linewidth=0.4pt, } } % \end{macrocode}% @@ -210,9 +239,6 @@ % on each page. Much of this code is duplicated in the inner theme's % template |progress bar in section page|. % \begin{macrocode} -\newlength{\moloch@progressinheadfoot} -\newlength{\moloch@progressinheadfoot@linewidth} -\setlength{\moloch@progressinheadfoot@linewidth}{0.4pt} \setbeamertemplate{progress bar in head/foot}{ \nointerlineskip% \pgfmathsetlength{\moloch@progressinheadfoot}{% diff --git a/testfiles/test.tlg b/testfiles/test.tlg index 4d68078..fdacaef 100644 --- a/testfiles/test.tlg +++ b/testfiles/test.tlg @@ -392,12 +392,12 @@ Completed box being shipped out [2] .......\pdfcolorstack 0 push {0.92157 0.50587 0.10588 rg 0.92157 0.50587 0.10588 RG} .......\glue(\parskip) 0.0 .......\glue(\parskip) 0.0 -.......\glue(\baselineskip) 17.6 -.......\hbox(0.4+0.0)x241.99265 +.......\glue(\baselineskip) 18.0 +.......\hbox(0.0+0.79999)x241.99265 ........\hbox(0.0+0.0)x0.0 -........\hbox(0.4+0.0)x241.99265 +........\hbox(0.79999+0.0)x241.99265, shifted 0.79999 .........\glue 0.0 -.........\hbox(0.0+0.0)x0.0 +.........\hbox(0.0+0.0)x0.0, shifted -0.4 ..........\pdfliteral{q } ..........\pdfliteral{0.92157 0.50587 0.10588 RG } ..........\pdfliteral{0.92157 0.50587 0.10588 rg } @@ -405,6 +405,7 @@ Completed box being shipped out [2] ..........\hbox(0.0+0.0)x0.0 ...........\pdfliteral{q } ...........\glue 0.0 +...........\glue 0.0 ...........\pdfliteral{q } ...........\pdfcolorstack 0 push {0.83824 0.77588 0.71588 rg 0.83824 0.77588 0.71588 RG} ...........\pdfliteral{0.0 0.0 m } @@ -433,7 +434,10 @@ Completed box being shipped out [2] ...........\pdfcolorstack 0 pop ...........\pdfliteral{Q } ...........\glue 0.0 +...........\glue 0.0 +...........\glue 0.0 ...........\pdfliteral{Q } +...........\glue 0.0 ...........\glue 0.0 plus 1.0fil minus 1.0fil ..........\pdfliteral{n } ..........\pdfliteral{Q } @@ -445,7 +449,7 @@ Completed box being shipped out [2] .......\pdfcolorstack 0 push {0.13725 0.2157 0.23137 rg 0.13725 0.2157 0.23137 RG} .......\glue(\parskip) 0.0 .......\glue(\parskip) 0.0 -.......\glue(\baselineskip) 4.20004 +.......\glue(\baselineskip) 3.40005 .......\hbox(9.79996+4.20004)x241.99265, glue set 120.99632fil ........\hbox(0.0+0.0)x0.0 ........\rule(9.79996+4.20004)x0.0