diff options
author | Karl Berry <karl@freefriends.org> | 2024-07-10 20:43:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-07-10 20:43:24 +0000 |
commit | c6356e6556e01bd57a6ec55d3b16d400678cee68 (patch) | |
tree | d4e5dc4a5a46ea5b697e3a997b467a1842d8f673 /Master | |
parent | e3b45be32b80ad4c53c539b44b50f8da3aad3287 (diff) |
moloch (10jul24)
git-svn-id: svn://tug.org/texlive/trunk@71763 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/moloch/CHANGELOG.md | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/moloch/README.md | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/moloch/moloch.pdf | bin | 276169 -> 295500 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/moloch/moloch.tex | 58 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx | 187 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx | 19 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx | 42 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx | 58 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/moloch/beamercolorthememoloch.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/moloch/beamerfontthememoloch.sty | 128 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/moloch/beamerinnerthememoloch.sty | 19 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/moloch/beamerouterthememoloch.sty | 42 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/moloch/beamerthememoloch.sty | 38 |
14 files changed, 567 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/moloch/CHANGELOG.md b/Master/texmf-dist/doc/latex/moloch/CHANGELOG.md index 1d90d7617cc..d1e8bc4d603 100644 --- a/Master/texmf-dist/doc/latex/moloch/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/moloch/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.4.0](https://github.com/jolars/moloch/compare/v0.3.0...v0.4.0) (2024-07-09) + + +### Features + +* add a small amount of vertical space before subtitle ([b224a9b](https://github.com/jolars/moloch/commit/b224a9b5067187e64a7669b61aee029447535729)) +* support memoize package (closes [#16](https://github.com/jolars/moloch/issues/16)) ([1ca26e8](https://github.com/jolars/moloch/commit/1ca26e857a331fcb29296c4987b69aea0db90fae)) +* support title format modifications ([#18](https://github.com/jolars/moloch/issues/18)) ([46a4f49](https://github.com/jolars/moloch/commit/46a4f49e8bb95798c2d6f3b69a1b96128d95cb8b)) + + +### Bug Fixes + +* add % at the end of some commands ([33b9833](https://github.com/jolars/moloch/commit/33b9833f21d3e0654fe2452d0b8ac8e8eb3a47bb)) +* convert raw command in manual to text ([ac305e9](https://github.com/jolars/moloch/commit/ac305e9b547ce44e0573f333adc4e6684eb88b68)) + ## [0.3.0](https://github.com/jolars/moloch/compare/v0.2.0...v0.3.0) (2024-03-06) diff --git a/Master/texmf-dist/doc/latex/moloch/README.md b/Master/texmf-dist/doc/latex/moloch/README.md index f3b7971303c..c8d9b78f15a 100644 --- a/Master/texmf-dist/doc/latex/moloch/README.md +++ b/Master/texmf-dist/doc/latex/moloch/README.md @@ -12,19 +12,23 @@ The fork was created for the following reasons: - To remove some of the more opinionated design choices, such as special handling of the Fira family of fonts. - To strip away some features that added complexity to the code base without achieving valuable functionality for the majority of users, such as special code block designs and the pgfplots theme. +[Here's a blog post](https://jolars.co/blog/2024-05-30-moloch/) in which I introduce the theme and write in more detail about the changes with respect to Metropolis. + Do not expect this theme to be backwards compatible with the Metropolis theme. +![Screenshot](https://raw.githubusercontent.com/jolars/moloch/main/assets/screenshot.svg) + ## Installation Moloch is on [CTAN](https://ctan.org/pkg/moloch), so you can install it using your favorite LaTeX package manager. For example, with `tlmgr`: -```sh +```bash tlmgr install moloch ``` You can also install the theme from source, in which case you need a working LaTeX installation with `l3build` installed. Then just follow these steps: -```sh +```bash git clone https://github.com/jolars/moloch.git cd moloch l3build install diff --git a/Master/texmf-dist/doc/latex/moloch/moloch.pdf b/Master/texmf-dist/doc/latex/moloch/moloch.pdf Binary files differindex 3607149cef9..15f0652a6ac 100644 --- a/Master/texmf-dist/doc/latex/moloch/moloch.pdf +++ b/Master/texmf-dist/doc/latex/moloch/moloch.pdf diff --git a/Master/texmf-dist/doc/latex/moloch/moloch.tex b/Master/texmf-dist/doc/latex/moloch/moloch.tex index a9eb3269333..c8300607bef 100644 --- a/Master/texmf-dist/doc/latex/moloch/moloch.tex +++ b/Master/texmf-dist/doc/latex/moloch/moloch.tex @@ -58,7 +58,7 @@ xrightmargin=0em, aboveskip=1em, belowskip=1em, - morekeywords={usetheme,institute,maketitle,% + morekeywords={usetheme,institute,maketitle,@moloch@titleformat,% plain,setbeamercolor,molochset,setsansfont,setmonofont}, } \lstMakeShortInline| @@ -82,7 +82,7 @@ \newcommand{\themename}{\textsf{moloch}\xspace} -\def\molochversion{0.3.0} % x-release-please-version +\def\molochversion{0.4.0} % x-release-please-version \usepackage{readprov} % \ReadPackageInfos{beamerthememoloch} @@ -166,10 +166,10 @@ The following code shows a minimal example of a Beamer presentation using \begin{lstlisting} \documentclass{beamer} \usetheme{moloch} -\title{A minimal example} +\title{A Minimal Example} \date{\today} \author{Johan Larsson} -\institute{Centre for Modern Beamer Themes} +\institute{Some University} \begin{document} \maketitle \section{First Section} @@ -187,6 +187,7 @@ The following code shows a minimal example of a Beamer presentation using \begin{itemize} \item |tikz| \item |pgfopts| + \item |etoolbox| \item |calc| \end{itemize} \end{multicols} @@ -224,6 +225,27 @@ The list of options is structured as shown in the following example. A short description of the option. } + +\subsubsection{Main theme} + +\DescribeOption{titleformat}% +{regular, smallcaps, allsmallcaps, allcaps} +{regular}{ + Changes the format of titles, subtitles, section titles, frame titles, and + the text on ``standout'' frames. The available options produce + Regular, \textsc{SmallCaps}, \textsc{\MakeLowercase{AllSmallCaps}}, or + \MakeUppercase{AllCaps} titles. Note that these commands do not + affect math and numbers, so may not work as you expect if your titles + contain these. +} + +\DescribeOption{titleformat plain}% +{regular, smallcaps, allsmallcaps, allcaps}% +{regular}{ + Changes the format of ``standout'' frames (see |titleformat|, above). +} + + \subsubsection{Inner theme} \DescribeOption{sectionpage}{none, simple, progressbar}{progressbar}{ @@ -270,6 +292,20 @@ The list of options is structured as shown in the following example. of the reverse. } + +\subsubsection{Font theme} + +\DescribeMacro{titleformat title} +\DescribeMacro{titleformat subtitle} +\DescribeMacro{titleformat section} +\DescribeOption{titleformat frame}% +{regular, smallcaps, allsmallcaps, allcaps}% +{regular}{ + Individually controls the format of titles, subtitles, section titles, and + frame titles (see |titleformat|, above). +} + + \subsection{Color Customization} The included \themename color theme is used by default, but its colors can be @@ -321,6 +357,18 @@ single sentence or image. To use it, add the key |standout| to the frame: \section{Known Issues} +\subsection{Title Formats} + +Be aware that not every font supports small caps, so the |smallcaps| or +|allsmallcaps| options may not work for all fonts. +In particular, the Computer Modern sans-serif typeface, which is used +by default when \themename is compiled with pdf\LaTeX, does not have a +small-caps variant. + +Note that title format options |allsmallcaps| and |allcaps| do not +affect the sizes of numerals, punctuation, and math symbol, and are +probably best avoided if your titles contain these characters. + \subsection{Interactions with other color themes} \themename can be used along with any other Beamer color theme, such as @@ -412,7 +460,7 @@ solution for Org mode users, using |org-set-property|. \subsection{Standout frames with Pandoc} -With Pandoc versions prior 1.17.2 it was not possible to create standout frames +With Pandoc versions prior to 1.17.2 it was not possible to create standout frames because Pandoc only supported a specific list of frame attributes thus ignoring additional attributes such as |{.standout}|. diff --git a/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx index d6a14105cad..f0f644acbd8 100644 --- a/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx +++ b/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx @@ -14,7 +14,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamercolorthememoloch}[2024-03-06 v0.3.0 Moloch color theme] % x-release-please-version +\ProvidesPackage{beamercolorthememoloch}[2024-07-09 v0.4.0 Moloch color theme] % x-release-please-version %</package> % \fi % \CheckSum{0} diff --git a/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx index 4748387c3cc..cc3396fe472 100644 --- a/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx +++ b/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx @@ -14,7 +14,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerfontthememoloch}[2024-03-06 v0.3.0 Moloch font theme] % x-release-please-version +\ProvidesPackage{beamerfontthememoloch}[2024-07-09 v0.4.0 Moloch font theme] % x-release-please-version %</package> % \fi % \CheckSum{0} @@ -27,9 +27,12 @@ % % A |beamer| font theme sets the style of the font used in the document. % +% +% % \subsubsection{Package dependencies} % % \begin{macrocode} +\RequirePackage{etoolbox} \RequirePackage{pgfopts} % \end{macrocode} % @@ -51,6 +54,188 @@ \setbeamerfont{standout}{size=\Large, series=\bfseries} % \end{macrocode} % +% +% +% \subsubsection{Title format options} +% +% \begin{macro}{titleformat title} +% Controls the format of the title. +% \begin{macrocode} +\pgfkeys{ + /moloch/font/titleformat title/.cd, + .is choice, + regular/.code={% + \let\moloch@titleformat\@empty% + \setbeamerfont{title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@titleformat\@empty% + \setbeamerfont{title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@titleformat\lowercase% + \setbeamerfont{title}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat title=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@titleformat\uppercase% + \setbeamerfont{title}{shape=\normalfont} + \PackageNote{beamerthememoloch}{% + Be aware that titleformat title=allcaps can lead to problems% + } + }, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{titleformat subtitle} +% Control the format of the subtitle. +% \begin{macrocode} +\pgfkeys{ + /moloch/font/titleformat subtitle/.cd, + .is choice, + regular/.code={% + \let\moloch@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@subtitleformat\MakeLowercase% + \setbeamerfont{subtitle}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat subtitle=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@subtitleformat\MakeUppercase% + \setbeamerfont{subtitle}{shape=\normalfont}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat subtitle=allcaps can lead to problems% + } + }, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{titleformat section} +% Controls the format of the section title. +% \begin{macrocode} +\pgfkeys{ + /moloch/font/titleformat section/.cd, + .is choice, + regular/.code={% + \let\moloch@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@sectiontitleformat\MakeLowercase% + \setbeamerfont{section title}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat section=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@sectiontitleformat\MakeUppercase% + \setbeamerfont{section title}{shape=\normalfont}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat section=allcaps can lead to problems% + } + }, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{frametitleformat} +% Control the format of the frame title. +% \begin{macrocode} +\pgfkeys{ + /moloch/font/titleformat frame/.cd, + .is choice, + regular/.code={% + \let\moloch@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@frametitleformat\MakeLowercase% + \setbeamerfont{frametitle}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat frame=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@frametitleformat\MakeUppercase% + \setbeamerfont{frametitle}{shape=\normalfont} + \PackageNote{beamerthememoloch}{% + Be aware that titleformat frame=allcaps can lead to problems% + } + }, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{titleformat aliases} +% Allows |titleformat title| et al. to be used in the |\usetheme| +% declaration, where \LaTeX{} automatically removes all spaces. +% \begin{macrocode} +\pgfkeys{ + /moloch/font/.cd, + titleformattitle/.code=\pgfkeysalso{titleformat title=#1}, + titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1}, + titleformatsection/.code=\pgfkeysalso{titleformat section=#1}, + titleformatframe/.code=\pgfkeysalso{titleformat frame=#1}, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\moloch@font@setdefaults} +% Sets default values for font theme options. +% \begin{macrocode} +\newcommand{\moloch@font@setdefaults}{ + \pgfkeys{/moloch/font/.cd, + titleformat title=regular, + titleformat subtitle=regular, + titleformat section=regular, + titleformat frame=regular, + } +} +% \end{macrocode} +% \end{macro} +% +% We first define hooks to change the case format of the titles. +% +% \begin{macrocode} +\def\moloch@titleformat#1{#1} +\def\moloch@subtitleformat#1{#1} +\def\moloch@sectiontitleformat#1{#1} +\def\moloch@frametitleformat#1{#1} +% \end{macrocode} +% +% To make the uppercase and lowercase macros work in the title, subtitle, etc., +% we have to patch the appropriate |beamer| commands that set their values. +% This solution was suggested by Enrico Gregorio in an answer to +% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange +% question}. +% +% +% \subsubsection{Process package options} +% +% \begin{macrocode} +\moloch@font@setdefaults +\ProcessPgfPackageOptions{/moloch/font} +% \end{macrocode} % \iffalse %</package> % \fi diff --git a/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx index 2b626d526d4..9815a0995f5 100644 --- a/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx +++ b/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx @@ -14,7 +14,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerinnerthememoloch}[2024-03-06 v0.3.0 Moloch inner theme] % x-release-please-version +\ProvidesPackage{beamerinnerthememoloch}[2024-07-09 v0.4.0 Moloch inner theme] % x-release-please-version %</package> % \fi % \CheckSum{0} @@ -173,7 +173,7 @@ % \begin{macrocode} \setbeamertemplate{title}{ \raggedright% - \inserttitle% + \moloch@titleformat{\inserttitle}% \par% \vspace*{0.2em} } @@ -184,8 +184,9 @@ % Set the subtitle on the title page. % \begin{macrocode} \setbeamertemplate{subtitle}{ + \vspace*{0.1em} \raggedright% - \insertsubtitle% + \moloch@subtitleformat{\insertsubtitle}% \par% \vspace*{0.2em} } @@ -201,6 +202,7 @@ \setbeamertemplate{title separator}{ \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth); \end{tikzpicture}% \tikzexternalenable% @@ -256,7 +258,7 @@ \begin{center} \usebeamercolor[fg]{section title} \usebeamerfont{section title} - \insertsectionhead\par + \moloch@sectiontitleformat{\insertsectionhead}\par \ifx\insertsubsectionhead\@empty\else \usebeamercolor[fg]{subsection title} \usebeamerfont{subsection title} @@ -270,7 +272,7 @@ \raggedright \usebeamercolor[fg]{section title} \usebeamerfont{section title} - \insertsectionhead\\[-1ex] + \moloch@sectiontitleformat{\insertsectionhead}\\[-1ex] \usebeamertemplate*{progress bar in section page} \par \ifx\insertsubsectionhead\@empty\else% @@ -338,9 +340,10 @@ \setbeamertemplate{progress bar in section page}{ \pgfmathsetlength{\moloch@progressonsectionpage}{ \textwidth * min(1,\insertframenumber/\inserttotalframenumber) - } - \tikzexternaldisable + }% + \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[bg] (0,0) rectangle @@ -350,7 +353,7 @@ rectangle (\moloch@progressonsectionpage, \moloch@progressonsectionpage@linewidth); \end{tikzpicture} - \tikzexternalenable + \tikzexternalenable% } % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx index a5d59108319..a0ce0af5804 100644 --- a/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx +++ b/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx @@ -14,7 +14,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerouterthememoloch}[2024-03-06 v0.3.0 Moloch outer theme] % x-release-please-version +\ProvidesPackage{beamerouterthememoloch}[2024-07-09 v0.4.0 Moloch outer theme] % x-release-please-version %</package> % \fi % \CheckSum{0} @@ -160,23 +160,42 @@ % Templates for the frame title, which is optionally underlined with a % progress bar. % \begin{macrocode} +\newlength{\moloch@frametitle@padding} +\setlength{\moloch@frametitle@padding}{2.2ex} +\newcommand{\moloch@frametitlestrut@start}{% + \rule{0pt}{\moloch@frametitle@padding +% + \totalheightof{% + \ifcsdef{moloch@frametitleformat}{\moloch@frametitleformat X}{X}% + }% +}% +} + +\newcommand{\moloch@frametitlestrut@end}{% + \vphantom{\rule[-\moloch@frametitle@padding]{0pt}{\moloch@frametitle@padding}} +} \defbeamertemplate{frametitle}{plain}{% \nointerlineskip% \begin{beamercolorbox}[% wd=\paperwidth,% - sep=1.1ex,% - leftskip=0.5ex,% - rightskip=\the\glueexpr 0.5ex plus 1fill\relax,% + leftskip=1.6ex,% + rightskip=\the\glueexpr 1.6ex plus 1fill\relax,% ]{frametitle}% \usebeamerfont{frametitle}% - \vbox{}\vskip-0.4ex% - \strut\insertframetitle\nolinebreak\strut\par% + \moloch@frametitlestrut@start% + \moloch@frametitleformat{\insertframetitle}% {% \ifx\insertframesubtitle\@empty% \else% - {\usebeamerfont{framesubtitle}\vspace{-0.8ex}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\strut\par}% + {% + \par% + \usebeamerfont{framesubtitle}% + \vspace{-0.8ex}% + \usebeamercolor[fg]{framesubtitle}% + \insertframesubtitle% + }% \fi }% + \moloch@frametitlestrut@end% \end{beamercolorbox}% } \setbeamertemplate{frametitle continuation}{\romannumeral\insertcontinuationcount} @@ -192,13 +211,14 @@ \newlength{\moloch@progressinheadfoot@linewidth} \setlength{\moloch@progressinheadfoot@linewidth}{0.4pt} \setbeamertemplate{progress bar in head/foot}{ - \nointerlineskip + \nointerlineskip% \pgfmathsetlength{\moloch@progressinheadfoot}{% \paperwidth * min(1,\insertframenumber/\inserttotalframenumber)% - } + }% \begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot} - \tikzexternaldisable + \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[bg] (0,0) rectangle @@ -208,7 +228,7 @@ rectangle (\moloch@progressinheadfoot, \moloch@progressinheadfoot@linewidth); \end{tikzpicture} - \tikzexternalenable + \tikzexternalenable% \end{beamercolorbox} } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx index fcebef5a811..e6447ec7918 100644 --- a/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx +++ b/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx @@ -12,7 +12,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerthememoloch}[2024-03-06 v0.3.0 Moloch Beamer theme] % x-release-please-version +\ProvidesPackage{beamerthememoloch}[2024-07-09 v0.4.0 Moloch Beamer theme] % x-release-please-version %</package> % \fi % \CheckSum{0} @@ -52,14 +52,69 @@ } % \end{macrocode} % +% \begin{macro}{titleformat plain} +% Controls the formatting of the text on standout ``plain'' frames. +% \begin{macrocode} +\pgfkeys{ + /moloch/titleformat plain/.cd, + .is choice, + regular/.code={% + \let\moloch@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@plaintitleformat\MakeLowercase% + \setbeamerfont{standout}{shape=\scshape}% + }, + allcaps/.code={% + \let\moloch@plaintitleformat\MakeUppercase% + \setbeamerfont{standout}{shape=\normalfont}% + }, +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{titleformat} +% Sets a standard format for titles, subtitles, section titles, frame +% titles, and the text on standout ``plain'' frames. +% \begin{macrocode} +\pgfkeys{ + /moloch/titleformat/.code=\pgfkeysalso{ + font/titleformat title=#1, + font/titleformat subtitle=#1, + font/titleformat section=#1, + font/titleformat frame=#1, + titleformat plain=#1, + } +} +% \end{macrocode} +% \end{macro} +% +% Set default values for options. +% +% \begin{macrocode} +\newcommand{\moloch@setdefaults}{ + \pgfkeys{/moloch/.cd, + titleformat plain=regular, + } +} +% \end{macrocode} +% % To avoid generating externalized figures of the progressbar we have to disable % them with ``tikzexternalenable'' and ``tikzexternaldisable''. However, if the % ``external'' libray is not loaded we would get undefined control sequence % problems, hence we define them as no-ops if they are not defined yet. +% We do the same for the ``mmzUnmemoizable'' command from the memoize package, in +% order to avoid memoization of the progress bars. % % \begin{macrocode} \providecommand{\tikzexternalenable}{} \providecommand{\tikzexternaldisable}{} +\providecommand{\mmzUnmemoizable}{} % \end{macrocode} % % \subsubsection{Component sub-packages} @@ -98,6 +153,7 @@ % \subsubsection{Process package options} % % \begin{macrocode} +\moloch@setdefaults \ProcessPgfOptions{/moloch} % \end{macrocode} % diff --git a/Master/texmf-dist/tex/latex/moloch/beamercolorthememoloch.sty b/Master/texmf-dist/tex/latex/moloch/beamercolorthememoloch.sty index cf95d62b96b..d0e3a496e7b 100644 --- a/Master/texmf-dist/tex/latex/moloch/beamercolorthememoloch.sty +++ b/Master/texmf-dist/tex/latex/moloch/beamercolorthememoloch.sty @@ -23,7 +23,7 @@ %% --------------------------------------------------------------------------- %% Copyright 2024 Johan Larsson and contributors \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamercolorthememoloch}[2024-03-06 v0.3.0 Moloch color theme] % x-release-please-version +\ProvidesPackage{beamercolorthememoloch}[2024-07-09 v0.4.0 Moloch color theme] % x-release-please-version \RequirePackage{pgfopts} \pgfkeys{ /moloch/color/block/.cd, diff --git a/Master/texmf-dist/tex/latex/moloch/beamerfontthememoloch.sty b/Master/texmf-dist/tex/latex/moloch/beamerfontthememoloch.sty index 71b52aae8d7..756958d73b8 100644 --- a/Master/texmf-dist/tex/latex/moloch/beamerfontthememoloch.sty +++ b/Master/texmf-dist/tex/latex/moloch/beamerfontthememoloch.sty @@ -23,7 +23,8 @@ %% --------------------------------------------------------------------------- %% Copyright 2024 Johan Larsson and contributors \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerfontthememoloch}[2024-03-06 v0.3.0 Moloch font theme] % x-release-please-version +\ProvidesPackage{beamerfontthememoloch}[2024-07-09 v0.4.0 Moloch font theme] % x-release-please-version +\RequirePackage{etoolbox} \RequirePackage{pgfopts} \setbeamerfont{title}{size=\Large, series=\bfseries} \setbeamerfont{author}{size=\small} @@ -38,6 +39,131 @@ \setbeamerfont{caption name}{series=\bfseries} \setbeamerfont{description item}{series=\bfseries} \setbeamerfont{standout}{size=\Large, series=\bfseries} +\pgfkeys{ + /moloch/font/titleformat title/.cd, + .is choice, + regular/.code={% + \let\moloch@titleformat\@empty% + \setbeamerfont{title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@titleformat\@empty% + \setbeamerfont{title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@titleformat\lowercase% + \setbeamerfont{title}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat title=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@titleformat\uppercase% + \setbeamerfont{title}{shape=\normalfont} + \PackageNote{beamerthememoloch}{% + Be aware that titleformat title=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /moloch/font/titleformat subtitle/.cd, + .is choice, + regular/.code={% + \let\moloch@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@subtitleformat\MakeLowercase% + \setbeamerfont{subtitle}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat subtitle=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@subtitleformat\MakeUppercase% + \setbeamerfont{subtitle}{shape=\normalfont}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat subtitle=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /moloch/font/titleformat section/.cd, + .is choice, + regular/.code={% + \let\moloch@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@sectiontitleformat\MakeLowercase% + \setbeamerfont{section title}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat section=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@sectiontitleformat\MakeUppercase% + \setbeamerfont{section title}{shape=\normalfont}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat section=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /moloch/font/titleformat frame/.cd, + .is choice, + regular/.code={% + \let\moloch@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@frametitleformat\MakeLowercase% + \setbeamerfont{frametitle}{shape=\scshape}% + \PackageNote{beamerthememoloch}{% + Be aware that titleformat frame=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\moloch@frametitleformat\MakeUppercase% + \setbeamerfont{frametitle}{shape=\normalfont} + \PackageNote{beamerthememoloch}{% + Be aware that titleformat frame=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /moloch/font/.cd, + titleformattitle/.code=\pgfkeysalso{titleformat title=#1}, + titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1}, + titleformatsection/.code=\pgfkeysalso{titleformat section=#1}, + titleformatframe/.code=\pgfkeysalso{titleformat frame=#1}, +} +\newcommand{\moloch@font@setdefaults}{ + \pgfkeys{/moloch/font/.cd, + titleformat title=regular, + titleformat subtitle=regular, + titleformat section=regular, + titleformat frame=regular, + } +} +\def\moloch@titleformat#1{#1} +\def\moloch@subtitleformat#1{#1} +\def\moloch@sectiontitleformat#1{#1} +\def\moloch@frametitleformat#1{#1} +\moloch@font@setdefaults +\ProcessPgfPackageOptions{/moloch/font} \endinput %% %% End of file `beamerfontthememoloch.sty'. diff --git a/Master/texmf-dist/tex/latex/moloch/beamerinnerthememoloch.sty b/Master/texmf-dist/tex/latex/moloch/beamerinnerthememoloch.sty index c64522e8a5b..8cbc634ec02 100644 --- a/Master/texmf-dist/tex/latex/moloch/beamerinnerthememoloch.sty +++ b/Master/texmf-dist/tex/latex/moloch/beamerinnerthememoloch.sty @@ -23,7 +23,7 @@ %% --------------------------------------------------------------------------- %% Copyright 2024 Johan Larsson and contributors \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerinnerthememoloch}[2024-03-06 v0.3.0 Moloch inner theme] % x-release-please-version +\ProvidesPackage{beamerinnerthememoloch}[2024-07-09 v0.4.0 Moloch inner theme] % x-release-please-version \RequirePackage{keyval} \RequirePackage{calc} \RequirePackage{pgfopts} @@ -94,13 +94,14 @@ } \setbeamertemplate{title}{ \raggedright% - \inserttitle% + \moloch@titleformat{\inserttitle}% \par% \vspace*{0.2em} } \setbeamertemplate{subtitle}{ + \vspace*{0.1em} \raggedright% - \insertsubtitle% + \moloch@subtitleformat{\insertsubtitle}% \par% \vspace*{0.2em} } @@ -109,6 +110,7 @@ \setbeamertemplate{title separator}{ \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth); \end{tikzpicture}% \tikzexternalenable% @@ -134,7 +136,7 @@ \begin{center} \usebeamercolor[fg]{section title} \usebeamerfont{section title} - \insertsectionhead\par + \moloch@sectiontitleformat{\insertsectionhead}\par \ifx\insertsubsectionhead\@empty\else \usebeamercolor[fg]{subsection title} \usebeamerfont{subsection title} @@ -148,7 +150,7 @@ \raggedright \usebeamercolor[fg]{section title} \usebeamerfont{section title} - \insertsectionhead\\[-1ex] + \moloch@sectiontitleformat{\insertsectionhead}\\[-1ex] \usebeamertemplate*{progress bar in section page} \par \ifx\insertsubsectionhead\@empty\else% @@ -197,9 +199,10 @@ \setbeamertemplate{progress bar in section page}{ \pgfmathsetlength{\moloch@progressonsectionpage}{ \textwidth * min(1,\insertframenumber/\inserttotalframenumber) - } - \tikzexternaldisable + }% + \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[bg] (0,0) rectangle @@ -209,7 +212,7 @@ rectangle (\moloch@progressonsectionpage, \moloch@progressonsectionpage@linewidth); \end{tikzpicture} - \tikzexternalenable + \tikzexternalenable% } \def\inserttotalframenumber{100} \setbeamertemplate{itemize item}{\(\bullet\)} diff --git a/Master/texmf-dist/tex/latex/moloch/beamerouterthememoloch.sty b/Master/texmf-dist/tex/latex/moloch/beamerouterthememoloch.sty index 311ef669812..1895dbc9402 100644 --- a/Master/texmf-dist/tex/latex/moloch/beamerouterthememoloch.sty +++ b/Master/texmf-dist/tex/latex/moloch/beamerouterthememoloch.sty @@ -23,7 +23,7 @@ %% --------------------------------------------------------------------------- %% Copyright 2024 Johan Larsson and contributors \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerouterthememoloch}[2024-03-06 v0.3.0 Moloch outer theme] % x-release-please-version +\ProvidesPackage{beamerouterthememoloch}[2024-07-09 v0.4.0 Moloch outer theme] % x-release-please-version \RequirePackage{calc} \RequirePackage{pgfopts} \pgfkeys{ @@ -90,23 +90,42 @@ \usebeamertemplate*{page number in head/foot}\vskip4pt% \end{beamercolorbox}% } +\newlength{\moloch@frametitle@padding} +\setlength{\moloch@frametitle@padding}{2.2ex} +\newcommand{\moloch@frametitlestrut@start}{% + \rule{0pt}{\moloch@frametitle@padding +% + \totalheightof{% + \ifcsdef{moloch@frametitleformat}{\moloch@frametitleformat X}{X}% + }% +}% +} + +\newcommand{\moloch@frametitlestrut@end}{% + \vphantom{\rule[-\moloch@frametitle@padding]{0pt}{\moloch@frametitle@padding}} +} \defbeamertemplate{frametitle}{plain}{% \nointerlineskip% \begin{beamercolorbox}[% wd=\paperwidth,% - sep=1.1ex,% - leftskip=0.5ex,% - rightskip=\the\glueexpr 0.5ex plus 1fill\relax,% + leftskip=1.6ex,% + rightskip=\the\glueexpr 1.6ex plus 1fill\relax,% ]{frametitle}% \usebeamerfont{frametitle}% - \vbox{}\vskip-0.4ex% - \strut\insertframetitle\nolinebreak\strut\par% + \moloch@frametitlestrut@start% + \moloch@frametitleformat{\insertframetitle}% {% \ifx\insertframesubtitle\@empty% \else% - {\usebeamerfont{framesubtitle}\vspace{-0.8ex}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\strut\par}% + {% + \par% + \usebeamerfont{framesubtitle}% + \vspace{-0.8ex}% + \usebeamercolor[fg]{framesubtitle}% + \insertframesubtitle% + }% \fi }% + \moloch@frametitlestrut@end% \end{beamercolorbox}% } \setbeamertemplate{frametitle continuation}{\romannumeral\insertcontinuationcount} @@ -114,13 +133,14 @@ \newlength{\moloch@progressinheadfoot@linewidth} \setlength{\moloch@progressinheadfoot@linewidth}{0.4pt} \setbeamertemplate{progress bar in head/foot}{ - \nointerlineskip + \nointerlineskip% \pgfmathsetlength{\moloch@progressinheadfoot}{% \paperwidth * min(1,\insertframenumber/\inserttotalframenumber)% - } + }% \begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot} - \tikzexternaldisable + \tikzexternaldisable% \begin{tikzpicture} + \mmzUnmemoizable% \fill[bg] (0,0) rectangle @@ -130,7 +150,7 @@ rectangle (\moloch@progressinheadfoot, \moloch@progressinheadfoot@linewidth); \end{tikzpicture} - \tikzexternalenable + \tikzexternalenable% \end{beamercolorbox} } \moloch@outer@setdefaults diff --git a/Master/texmf-dist/tex/latex/moloch/beamerthememoloch.sty b/Master/texmf-dist/tex/latex/moloch/beamerthememoloch.sty index ff2a2df3b70..4f47627e301 100644 --- a/Master/texmf-dist/tex/latex/moloch/beamerthememoloch.sty +++ b/Master/texmf-dist/tex/latex/moloch/beamerthememoloch.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerthememoloch}[2024-03-06 v0.3.0 Moloch Beamer theme] % x-release-please-version +\ProvidesPackage{beamerthememoloch}[2024-07-09 v0.4.0 Moloch Beamer theme] % x-release-please-version \RequirePackage{pgfopts} \pgfkeys{/moloch/.cd, .search also={ @@ -31,14 +31,50 @@ /moloch/font, } } +\pgfkeys{ + /moloch/titleformat plain/.cd, + .is choice, + regular/.code={% + \let\moloch@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\moloch@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\moloch@plaintitleformat\MakeLowercase% + \setbeamerfont{standout}{shape=\scshape}% + }, + allcaps/.code={% + \let\moloch@plaintitleformat\MakeUppercase% + \setbeamerfont{standout}{shape=\normalfont}% + }, +} +\pgfkeys{ + /moloch/titleformat/.code=\pgfkeysalso{ + font/titleformat title=#1, + font/titleformat subtitle=#1, + font/titleformat section=#1, + font/titleformat frame=#1, + titleformat plain=#1, + } +} +\newcommand{\moloch@setdefaults}{ + \pgfkeys{/moloch/.cd, + titleformat plain=regular, + } +} \providecommand{\tikzexternalenable}{} \providecommand{\tikzexternaldisable}{} +\providecommand{\mmzUnmemoizable}{} \useinnertheme{moloch} \useoutertheme{moloch} \usecolortheme{moloch} \usefonttheme{moloch} \newcommand{\molochset}[1]{\pgfkeys{/moloch/.cd,#1}} \newcommand{\mreducelistspacing}{\vspace{-\topsep}} +\moloch@setdefaults \ProcessPgfOptions{/moloch} \endinput %% |