feat: redesign section and subsection pages (#30)

Redesign section and subsection pages so that section titles are aligned, which 
helps avoid having titles jump if section and subsection pages are viewed
in sequence. The alignment of subtitles on section pages with
the progressbar layout have also been modified to look better. Finally,
section pages have their content raised slightly in both the progressbar
and simple templates.

---------

Co-authored-by: Johan Larsson <jolars@posteo.com>
This commit is contained in:
John Purnell 2024-11-23 02:09:14 +13:00 committed by GitHub
parent fcfbbe1f21
commit 5a98c69a3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 2432 additions and 15 deletions

View File

@ -288,12 +288,14 @@
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\moloch@sectiontitleformat{\insertsectionhead}\par
\ifx\insertsubsectionhead\@empty\else
\usebeamercolor[fg]{subsection title}
\usebeamerfont{subsection title}
\insertsubsectionhead
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\strut%
\ifx\insertsubsectionhead\@empty\else%
\insertsubsectionhead%
\fi
\end{center}
\vspace{\baselineskip - 1ex + 0.4pt}
}
\defbeamertemplate{section page}{progressbar}{
\centering
@ -301,17 +303,17 @@
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\moloch@sectiontitleformat{\insertsectionhead}\\[-1ex]
\moloch@sectiontitleformat{\insertsectionhead}\\[-0.5\baselineskip]
\usebeamertemplate*{progress bar in section page}
\par
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\strut%
\ifx\insertsubsectionhead\@empty\else%
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\insertsubsectionhead
\insertsubsectionhead%
\fi
\end{minipage}
\par
\vspace{\baselineskip}
}
\newcommand{\moloch@disablesectionpage}{
\AtBeginSection{

View File

@ -0,0 +1 @@
\input{sectionpages}

2351
testfiles/sectionpages.tlg Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
\input regression-test
\documentclass{beamer}
\usetheme{moloch}
\usepackage{lmodern}
\begin{document}
\maketitle
\START
\showoutput
\begin{frame}[c]
Sections: progressbar, subsections: progressbar
\end{frame}
\molochset{sectionpage=progressbar}
\molochset{subsectionpage=progressbar}
\section{Section}
\subsection{Subsection}
\begin{frame}[c]
Sections: progressbar, subsections: simple
\end{frame}
\molochset{sectionpage=progressbar}
\section{Section}
\molochset{subsectionpage=simple}
\subsection{Subsection}
\molochset{subsectionpage=progressbar}
\molochset{sectionpage=progressbar}
\section{Section}
\subsection{Subsection}
\begin{frame}[c]
Sections: simple, subsections: simple
\end{frame}
\molochset{sectionpage=simple}
\molochset{subsectionpage=simple}
\section{Section}
\subsection{Subsection}
% \END
\end{document}

View File

@ -348,7 +348,7 @@ Completed box being shipped out [2]
....\write1{\@writefile{nav}{\protect \headcommand {\protect \beamer@subsectionpages {1}{1}}}}
....\write1{\@writefile{nav}{\protect \headcommand {\protect \sectionentry {1}{Results}{2}{Results}{0}}}}
....\glue(\topskip) 0.0
....\vbox(261.20912+0.0)x307.28987, glue set 119.07327fil
....\vbox(261.20912+0.0)x307.28987, glue set 117.97325fil
.....\penalty 10000
.....\vbox(0.0+0.0)x0.0
.....\penalty 10000
@ -367,11 +367,11 @@ 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
.....\hbox(13.43753+7.96255)x307.28987, glue set 32.64862fil
.....\hbox(21.33755+15.86256)x307.28987, glue set 32.64862fil
......\glue(\leftskip) 0.0 plus 1.0fil
......\hbox(0.0+0.0)x0.0
......\mathon
......\vbox(13.43753+7.96255)x241.99265
......\vbox(21.33755+15.86256)x241.99265
.......\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
@ -388,7 +388,7 @@ Completed box being shipped out [2]
........\glue(\parfillskip) 0.0 plus 1.0fil
........\glue(\rightskip) 0.0 plus 1.0fil
.......\glue 0.0
.......\glue -6.59999
.......\glue -9.0
.......\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
@ -442,13 +442,22 @@ Completed box being shipped out [2]
........\penalty 10000
........\glue(\parfillskip) 0.0 plus 1.0fil
........\glue(\rightskip) 0.0 plus 1.0fil
.......\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
.......\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
........\penalty 10000
........\glue(\parfillskip) 0.0 plus 1.0fil
........\glue(\rightskip) 0.0 plus 1.0fil
.......\pdfcolorstack 0 pop
.......\pdfcolorstack 0 pop
......\mathoff
......\penalty 10000
......\glue(\parfillskip) 0.0
......\glue(\rightskip) 0.0 plus 1.0fil
.....\glue 13.6
.....\glue 0.0
.....\pdfcolorstack 0 pop
.....\glue 0.0 plus 1.0fil
.....\rule(0.0+0.0)x*