Compare commits

..

10 Commits
v1.0.1 ... main

Author SHA1 Message Date
xenia b39c368b52 wip: add package.nix for build packaging 2025-06-11 00:51:03 -04:00
xenia d23403af80 fix: improve page numbering styles and calculation
- For improved compatibility with
  [Pympress](https://github.com/Cimbali/pympress), use the recommended
  format for PDF page numbers on notes pages. This allows presentations
  built with `show notes` on (i.e., notes on every other page) to work
  out of the box. Other notes page formats and other PDF viewers are not
  impacted.
- Change page numbering defaults to `appendixpagenumber` so that
  appendix pages are restarted from the beginning. Additionally,
  progressbar calculation will only take into account the
  `mainframenumber`, which doesn't include appendix pages.
- Remove deprecated options relating to frame numbering, as I'm not sure
  whether it impacts the change in defaults above.
2025-06-09 23:23:12 -04:00
Johan Larsson 8594369316
feat: redesign itemize environment (#50) 2025-05-21 15:24:16 +02:00
Johan Larsson 70e573e9fe
test: update separation test example 2025-05-13 09:36:43 +02:00
Johan Larsson 88b24e1f50
test: use larger portion of test 2025-05-13 09:33:37 +02:00
Johan Larsson 888e1201b4
test: update test file with nested itemize environment 2025-05-13 09:33:19 +02:00
Johan Larsson 81037c66e1
feat: use beamer-like itemize item and subitem templates
This brings the itemize templates more in line with beamer. The changes
are mostly that the symbols are slightly raised. Alignment with te
subsubitem symbol is not great, but I will defer it to another update.
This also closes #49, since we now rely on `$...$` instead of `\(...\)`.

fix: avoid coloring bullets based on math colors
2025-05-13 09:28:44 +02:00
Johan Larsson fd86a305e9
fix: move command substitutions into inner and outer themes
Closes #47.
2025-04-13 14:24:43 +02:00
Johan Larsson 75c3f569f2
docs: fix typo 2025-04-13 14:12:27 +02:00
Johan Larsson a549f1f97e
chore: update ctan announcement 2025-04-01 21:52:41 +02:00
10 changed files with 5890 additions and 87 deletions

View File

@ -1,13 +1,19 @@
## [0.6.0](https://github.com/jolars/moloch/compare/v0.5.0...v0.6.0) (2025-01-17) This release of Moloch adds support for `\thanks` in the title page and allows
customization of the bar line width. The 1.0.0 version was not released
on CTAN due to a couple of small issues, which were then fixed in 1.0.1.
See below fro detailed changes.
## [1.0.1](https://github.com/jolars/moloch/compare/v1.0.0...v1.0.1) (2025-04-01)
### Bug Fixes
* add missing files for updating version tags ([ba01d33](https://github.com/jolars/moloch/commit/ba01d33b1993d4992372420f25f6390c5e4baa91))
* use proper package names ([0c4d38e](https://github.com/jolars/moloch/commit/0c4d38e3c2e2b0b93bfc1b6c1abe6bf0a3a01311))
## [1.0.0](https://github.com/jolars/moloch/compare/v0.6.0...v1.0.0) (2025-04-01)
### Features ### Features
* add back highcontrast theme from metropolis ([3039994](https://github.com/jolars/moloch/commit/3039994e27a01d54d7a3cfa696318413161f5e15)) * add customization of bar line width ([#42](https://github.com/jolars/moloch/issues/42)) ([be0d8f2](https://github.com/jolars/moloch/commit/be0d8f23c72b9760baeb31a58d2e9988cba5d19a))
* add new color theme based on the tomorrow color theme ([13e7300](https://github.com/jolars/moloch/commit/13e73007c6d29989684aa228f7f74d3bdcce526f)) * support `\thanks` in title page ([#45](https://github.com/jolars/moloch/issues/45)) ([de3db5e](https://github.com/jolars/moloch/commit/de3db5e517c06d1b8793b3a1c134b9bf4ad8b189))
* add option to customize frame numbering of standout pages ([d6d0e3c](https://github.com/jolars/moloch/commit/d6d0e3c61565f06d1987c275e2460c9b61ef8ae3)), closes [#33](https://github.com/jolars/moloch/issues/33)
* redesign section and subsection pages ([#30](https://github.com/jolars/moloch/issues/30)) ([5a98c69](https://github.com/jolars/moloch/commit/5a98c69a3f07b5b36d5d2c5e5a117e25c472ad22))
* use golden rule in top-bottom spacing of title page ([85eabc7](https://github.com/jolars/moloch/commit/85eabc7beef4296dcc7a7ac53eb0f7a785fe8c35))
### Reverts
* "test: remove standoutnumbering test" ([ce7540d](https://github.com/jolars/moloch/commit/ce7540d71caf490cbd3129345cd778b1519394d9))

87
package.nix Normal file
View File

@ -0,0 +1,87 @@
{
writeShellScript,
writableTmpDirAsHomeHook,
stdenvNoCC,
texlivePackages,
texliveBasic,
}:
let
texEnv = texliveBasic.withPackages (ps: with ps; [
# l3build
beamer
biblatex
enumitem
fileinfo
hypdoc
hyperref
listings
metalogo
parskip
pgf
pgfopts
setspace
xurl
microtype
latexmk
]);
in stdenvNoCC.mkDerivation rec {
pname = "moloch";
version = "1.0.2-DEV-xenia";
outputs = [
"tex"
"texdoc"
];
passthru.tlDeps = with texlivePackages; [ latex ];
src = ./.;
dontConfigure = true;
nativeBuildInputs = [
texEnv
# multiple-outputs.sh fails if $out is not defined
(writeShellScript "force-tex-output.sh" ''
out="''${tex-}"
'')
writableTmpDirAsHomeHook # Need a writable $HOME for latexmk
];
# we just build manually, but moloch's own method of building is using l3build
# i have no idea how to get that working, so for now just do it normal style
buildPhase = ''
runHook preBuild
# Generate the style files
cd src
latex beamertheme${pname}.ins
# Generate the documentation
cp ../doc/${pname}.tex .
latexmk -pdf ${pname}.tex
cd ..
runHook postBuild
'';
installPhase = ''
runHook preInstall
path="$tex/tex/latex/${pname}"
mkdir -p "$path"
cp src/*.{cls,def,clo,sty} "$path/"
path="$texdoc/doc/tex/latex/${pname}"
mkdir -p "$path"
cp src/${pname}.pdf "$path/"
runHook postInstall
'';
}

View File

@ -47,7 +47,16 @@
\RequirePackage{tikz} \RequirePackage{tikz}
% \end{macrocode} % \end{macrocode}
% %
% \subsubsection{Memoization and Tikz Externalization}
% %
% See the documentation for the correspondign section under the outer theme for
% more information on the following lines.
%
% \begin{macrocode}
\providecommand{\tikzexternalenable}{}
\providecommand{\tikzexternaldisable}{}
\providecommand{\mmzUnmemoizable}{}
% \end{macrocode}
% %
% \subsubsection{Options} % \subsubsection{Options}
% %
@ -395,7 +404,7 @@
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{progress bar in section page}{ \setbeamertemplate{progress bar in section page}{
\pgfmathsetlength{\moloch@progressonsectionpage}{ \pgfmathsetlength{\moloch@progressonsectionpage}{
\textwidth * min(1,\insertframenumber/\inserttotalframenumber) \textwidth * min(1,\insertframenumber/\insertmainframenumber)
}% }%
\tikzexternaldisable% \tikzexternaldisable%
\begin{tikzpicture}[baseline=(current bounding box.north)] \begin{tikzpicture}[baseline=(current bounding box.north)]
@ -433,9 +442,12 @@
% \subsubsection{Lists and Floats} % \subsubsection{Lists and Floats}
% %
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{itemize item}{\(\bullet\)} \setbeamertemplate{itemize item}[circle]
\setbeamertemplate{itemize subitem}{\(\circ\)} \setbeamertemplate{itemize subitem}{\raise1.5pt\hbox{\vrule width 0.8ex height 0.8ex}}
\setbeamertemplate{itemize subsubitem}{\textbullet} \setbeamerfont{itemize subsubitem}{size=\tiny}
\setbeamertemplate{itemize subsubitem}{%
\usebeamerfont*{itemize subsubitem}\raise1.75pt\hbox{\donotcoloroutermaths$\blacktriangleright$}%
}
\setbeamertemplate{caption label separator}{: } \setbeamertemplate{caption label separator}{: }
\setbeamertemplate{caption}[numbered] \setbeamertemplate{caption}[numbered]
% \end{macrocode} % \end{macrocode}

View File

@ -38,6 +38,20 @@
% \end{macrocode} % \end{macrocode}
% %
% %
% \subsubsection{Memoization and Tikz Externalization}
%
% To avoid generating externalized figures of the progressbar we have to disable
% them with ``tikzexternalenable'' and ``tikzexternaldisable''. However, if the
% ``external'' library 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{Options} % \subsubsection{Options}
% %
@ -111,42 +125,23 @@
% \end{macrocode}% % \end{macrocode}%
% \end{macro} % \end{macro}
% %
% \subsubsection{Deprecated Options}
%
% These options are deprecated and will be removed in a future version.
%
% \begin{macro}{numbering}
% Adds slide numbers to the bottom right of each slide.
% \begin{macrocode}
\pgfkeys{
/moloch/outer/numbering/.cd,
.is choice,
none/.code={%
\PackageWarning{moloch}{The ``numbering'' option is deprecated.
Use beamer's ``page number in head/foot'' template instead}%
\setbeamertemplate{page number in head/foot}[default]
},
counter/.code={%
\PackageWarning{moloch}{The ``numbering'' option is deprecated.
Use beamer's ``page number in head/foot'' template instead}%
\setbeamertemplate{page number in head/foot}[framenumber]
},
fraction/.code={%
\PackageWarning{moloch}{The ``numbering'' option is deprecated.
Use beamer's ``page number in head/foot'' template instead}%
\setbeamertemplate{page number in head/foot}[totalframenumber]
},
}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Slide Numbering} % \subsubsection{Slide Numbering}
% %
% Moloch defaults to numbering frames. To modify this, simply copy this line to your % Moloch defaults to numbering frames. To modify this, simply copy this line to your
% preamble and replace |framenumber|. % preamble and replace |appendixframenumber|.
% %
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{page number in head/foot}[framenumber] \setbeamertemplate{page number in head/foot}[appendixframenumber]
% \end{macrocode}
%
% \subsubsection{Notes Page Numbering}
%
% Moloch defaults to numbering notes pages in a format compatible with Pympress.
% This means that presentations using |show notes| (i.e., notes on every other
% slide) work by default.
%
% \begin{macrocode}
\addtobeamertemplate{note page}{}{\thispdfpagelabel{notes:\insertframenumber}}
% \end{macrocode} % \end{macrocode}
% %
% \subsubsection{Head and footline} % \subsubsection{Head and footline}

View File

@ -104,19 +104,6 @@
} }
% \end{macrocode} % \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} % \subsubsection{Component Sub-Packages}
% %
% Having processed the options, we can now load the component sub-packages of % Having processed the options, we can now load the component sub-packages of

10
testfiles/separation.lvt Normal file
View File

@ -0,0 +1,10 @@
\documentclass[hyperref={draft}]{beamer}
\useoutertheme{moloch}
\useinnertheme{moloch}
\usefonttheme{moloch}
\usecolortheme{moloch}
\usepackage{lmodern}
\input{separationexample}

1275
testfiles/separation.tlg Normal file

File diff suppressed because it is too large Load Diff

View File

@ -38,12 +38,9 @@
\end{proof} \end{proof}
\end{frame} \end{frame}
\vfil\break
\END
{ {
\molochset{titleformat frame=smallcaps} \molochset{titleformat frame=smallcaps}
\begin{frame}{Small caps} \begin{frame}{Small caps}
This frame uses the \texttt{smallcaps} title format. This frame uses the \texttt{smallcaps} title format.
\begin{block}{Block} \begin{block}{Block}
@ -57,21 +54,21 @@
\begin{exampleblock}{Example Block} \begin{exampleblock}{Example Block}
Just to try out the different blocks Just to try out the different blocks
\end{exampleblock} \end{exampleblock}
\end{frame} \end{frame}
} }
{ {
\molochset{titleformat frame=allsmallcaps} \molochset{titleformat frame=allsmallcaps}
\begin{frame}{All small caps} \begin{frame}{All small caps}
This frame uses the \texttt{allsmallcaps} title format. This frame uses the \texttt{allsmallcaps} title format.
\end{frame} \end{frame}
} }
{ {
\molochset{titleformat frame=allcaps} \molochset{titleformat frame=allcaps}
\begin{frame}{All caps} \begin{frame}{All caps}
This frame uses the \texttt{allcaps} title format. This frame uses the \texttt{allcaps} title format.
\end{frame} \end{frame}
} }
\begin{frame}{Lists} \begin{frame}{Lists}
@ -79,7 +76,15 @@
\column{0.33\textwidth} \column{0.33\textwidth}
Items Items
\begin{itemize} \begin{itemize}
\item Milk \item Eggs \item Potatoes \item Flour
\begin{itemize}
\item Wheat
\begin{itemize}
\item Whole-grain
\item White
\end{itemize}
\end{itemize}
\item Eggs
\end{itemize} \end{itemize}
\column{0.33\textwidth} \column{0.33\textwidth}
@ -138,7 +143,6 @@
\end{column} \end{column}
\end{columns} \end{columns}
\end{frame} \end{frame}
\appendix \appendix
@ -147,8 +151,7 @@
Here are some backup slides Here are some backup slides
\end{frame} \end{frame}
\vfil\break
\END
\end{document}
\end{document} \end{document}

View File

@ -0,0 +1,44 @@
\input regression-test
\title{Moloch Test Suite}
\subtitle{A subtitle that is way to long and in fact might just need to be split across lines}
\author[Johan]{Johan Larsson}
\institute[LU]{Lund Univesity//Department of Statistics}
\date{April 23, 2024}
\begin{document}
\START
\showoutput
\begin{frame}{Table of contents}
\setbeamertemplate{section in toc}[sections numbered]
\tableofcontents[hideallsubsections]
\end{frame}
\section{Results}
\subsection{Proof of the Main Theorem}
\begin{frame}<1>
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number.
\end{theorem}
\begin{proof}
\begin{enumerate}
\item<1-| alert@1> Suppose $p$ were the largest prime number.
\item<2-> Let $q$ be the product of the first $p$ numbers.
\item<3-> Then $q$\;+\,$1$ is not divisible by any of them.
\item<1-> Thus $q$\;+\,$1$ is also prime and greater than $p$.\qedhere
\end{enumerate}
\end{proof}
\end{frame}
\vfil\break
\END
\end{document}

File diff suppressed because it is too large Load Diff