feat: add customization of bar line width (#42)
Adds the ability to set the line width of the progress bars and title separator (on the title page) through `progressbar linewidth` and `titleseparator linewidth`. Closes #41.
This commit is contained in:
parent
795d202d6d
commit
be0d8f23c7
Binary file not shown.
|
@ -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=<length>}.\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=<length>}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Math}
|
||||
\begin{equation*}
|
||||
|
|
|
@ -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%
|
||||
}
|
||||
|
|
|
@ -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}{%
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue