Skip to content

Commit

Permalink
doc: redesign manual for moloch
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Nov 22, 2024
1 parent 6deb045 commit e770ca1
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 66 deletions.
67 changes: 40 additions & 27 deletions doc/moloch.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@
%% ---------------------------------------------------------------------------
%% Copyright 2024 Johan Larsson and contributors
%% ---------------------------------------------------------------------------
\PassOptionsToPackage{unicode,pdfusetitle}{hyperref}
\PassOptionsToPackage{hyphens}{xurl}
\PassOptionsToPackage{dvipsnames}{xcolor}

\documentclass{ltxdoc}

\usepackage{parskip}
\usepackage{setspace}
\usepackage{xspace}
\usepackage{xurl}
\onehalfspacing

\usepackage{lmodern}
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts

\usepackage{enumitem}
\setlist[itemize]{noitemsep}
Expand All @@ -35,8 +41,8 @@
\lstset{%
language=[LaTeX]{TeX},
basicstyle=\ttfamily,
keywordstyle=\color{mLightBrown}\bfseries,
commentstyle=\color{mLightGreen},
keywordstyle=\color{MidnightBlue}\bfseries,
commentstyle=\color{Periwinkle},
stringstyle=\color{mLightGreen},
backgroundcolor=\color{mBackground},
numbers=none,
Expand All @@ -58,22 +64,27 @@
xrightmargin=0em,
aboveskip=1em,
belowskip=1em,
morekeywords={usetheme,institute,maketitle,@moloch@titleformat,%
plain,setbeamercolor,molochset,setsansfont,setmonofont},
morekeywords={
usetheme,
institute,
maketitle,
@moloch@titleformat,
%plain,
setbeamercolor,
molochset,
setsansfont,
setmonofont
},
}
\lstMakeShortInline|
\usepackage{metalogo}

\usepackage[colorlinks=true,
linkcolor=mLightBrown,
menucolor=mLightBrown,
pagecolor=mLightBrown,
urlcolor=mLightBrown]{hyperref}
\usepackage[colorlinks=true,linkcolor=MidnightBlue,urlcolor=MidnightBlue]{hyperref}

\newcommand{\DescribeOption}[4]{
\DescribeMacro{#1}
\begin{minipage}[t]{\textwidth}
\textit{\textbf{\textcolor{mLightGreen}{#2}}}\dotfill\,#3\par
\textit{\textbf{\textcolor{JungleGreen}{#2}}}\dotfill\,#3\par
\begingroup
\vspace{0.5em}#4\par
\endgroup
Expand All @@ -85,16 +96,18 @@
\def\molochversion{0.5.0} % x-release-please-version

\usepackage{readprov}
% \ReadPackageInfos{beamerthememoloch}

\title{The \themename package (v\molochversion)}
\title{The \themename Package (v\molochversion)}
\author{Johan Larsson \and Matthias Vogelgesang\footnote{Matthias wrote the original version of this manual for the Metropolis theme, which has since been modified by Johan Larsson.}}
\date{\today}

\begin{document}

\maketitle

\hypersetup{linkcolor=black}
\tableofcontents
\hypersetup{linkcolor=MidnightBlue}

\section{Introduction}

Expand Down Expand Up @@ -200,7 +213,7 @@ \subsection{Pandoc}

\section{Customization}

\subsection{Package options}
\subsection{Package Options}

The theme provides a number of options, which can be set using a key=value
interface. The primary way to set options is to provide a comma-separated list
Expand All @@ -221,7 +234,7 @@ \subsection{Package options}
A short description of the option.
}

\subsubsection{Main theme}
\subsubsection{Main Theme}

\DescribeOption{titleformat}%
{regular, smallcaps, allsmallcaps, allcaps}
Expand All @@ -240,7 +253,7 @@ \subsubsection{Main theme}
Changes the format of ``standout'' frames (see |titleformat|, above).
}

\subsubsection{Inner theme}
\subsubsection{Inner Theme}

\DescribeOption{sectionpage}{none, simple, progressbar}{progressbar}{
Adds a slide at the start of each section (|simple|) with an optional thin
Expand All @@ -257,7 +270,7 @@ \subsubsection{Inner theme}
on the section structure of your presentation.
}

\subsubsection{Outer theme}
\subsubsection{Outer Theme}

\DescribeOption{numbering}{none, counter, fraction}{}{
\emph{This option is deprecated and will be removed in a future version.
Expand All @@ -273,7 +286,7 @@ \subsubsection{Outer theme}
(|frametitle|).
}

\subsubsection{Color theme}
\subsubsection{Color Theme}

\DescribeOption{block}{transparent, fill}{transparent}{
Optionally adds a light grey background to block environments like |theorem|
Expand All @@ -285,7 +298,7 @@ \subsubsection{Color theme}
of the reverse.
}

\subsubsection{Font theme}
\subsubsection{Font Theme}

\DescribeMacro{titleformat title}
\DescribeMacro{titleformat subtitle}
Expand Down Expand Up @@ -333,7 +346,7 @@ \subsection{Color Customization}

\subsection{Commands}

\subsubsection{Standout frames}
\subsubsection{Standout Frames}

The \themename inner theme offers a custom frame format with large, centered
text and an inverted background---perfect for focusing attention on
Expand All @@ -359,7 +372,7 @@ \subsection{Title Formats}
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}
\subsection{Interactions with Other Color Themes}

\themename can be used along with any other Beamer color theme, such as
|crane| or |seahorse|. If you wish to do this, it is usually best to include
Expand Down Expand Up @@ -393,7 +406,7 @@ \subsection{Interactions with other color themes}
background color for the title; this will cause issues when using color themes
like |whale| which set a white foreground for the title.

\subsection{Notes on second screen}
\subsection{Notes on Second Screen}

If you use the \verb+[show notes on second screen]+ option built in to Beamer and
compile with \XeLaTeX, text on slides following the first section slide may
Expand All @@ -407,13 +420,13 @@ \subsection{Notes on second screen}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\end{lstlisting}

\subsection{Standout frames with labels}
\subsection{Standout Frames with Labels}

Because the |standout| frame option creates a group to restrict the colour
change to a single slide, labels defined after calling |standout| will stay
Expand All @@ -429,7 +442,7 @@ \subsection{Standout frames with labels}

\begin{lstlisting}
\begin{frame}[label=conclusion, standout]{Conclusion}
Awesome slide
Awesome slide
\end{frame}
\end{lstlisting}

Expand All @@ -445,7 +458,7 @@ \subsection{Standout frames with labels}
:END:
\end{lstlisting}

\subsection{Standout frames with Pandoc}
\subsection{Standout Frames with Pandoc}

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
Expand Down
15 changes: 8 additions & 7 deletions src/beamercolorthememoloch.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\themename color theme}
% \subsection{\themename Color Theme}
%
%
%
% \subsubsection{Package dependencies}
% \subsubsection{Package Dependencies}
% \begin{macrocode}
\RequirePackage{pgfopts}
% \end{macrocode}
Expand Down Expand Up @@ -75,7 +75,7 @@
%
%
%
% \subsubsection{Base colors}
% \subsubsection{Base Colors}
%
% \begin{macrocode}
\definecolor{mDarkBrown}{HTML}{604c38}
Expand All @@ -86,7 +86,7 @@
%
%
%
% \subsubsection{Base styles}
% \subsubsection{Base Styles}
%
% All colors in \themename are derived from the definitions of |normal text|,
% |alerted text|, and |example text|.
Expand Down Expand Up @@ -115,7 +115,7 @@
%
%
%
% \subsubsection{Derived colors}
% \subsubsection{Derived Colors}
%
% The titles and structural elements (e.g. |itemize| bullets) are set in the
% same color as |normal text|. This would ideally done by setting |normal text|
Expand All @@ -127,7 +127,8 @@
\setbeamercolor{titlelike}{use=normal text, parent=normal text}
\setbeamercolor{author}{use=normal text, parent=normal text}
\setbeamercolor{date}{use=normal text, parent=normal text}
\setbeamercolor{institute}{use=normal text, fg=normal text.fg!80!normal text.bg}
\setbeamercolor{institute}{%
use=normal text, fg=normal text.fg!80!normal text.bg}
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
% \end{macrocode}
%
Expand Down Expand Up @@ -237,7 +238,7 @@
%
%
%
% \subsubsection{Process package options}
% \subsubsection{Process Package Options}
%
% \begin{macrocode}
\moloch@color@setdefaults
Expand Down
24 changes: 12 additions & 12 deletions src/beamerfontthememoloch.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
\let\moloch@titleformat\lowercase%
\setbeamerfont{title}{shape=\scshape}%
\PackageNote{beamerthememoloch}{%
Be aware that titleformat title=allsmallcaps can lead to problems%
}
Be aware that titleformat title=allsmallcaps can
lead to problems}
},
allcaps/.code={%
\let\moloch@titleformat\uppercase%
Expand Down Expand Up @@ -108,15 +108,15 @@
\let\moloch@subtitleformat\MakeLowercase%
\setbeamerfont{subtitle}{shape=\scshape}%
\PackageNote{beamerthememoloch}{%
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
}
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%
}
Be aware that titleformat subtitle=allcaps can
lead to problems}
},
}
% \end{macrocode}
Expand All @@ -140,15 +140,15 @@
\let\moloch@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}%
\PackageNote{beamerthememoloch}{%
Be aware that titleformat section=allsmallcaps can lead to problems%
}
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%
}
Be aware that titleformat section=allcaps
can lead to problems}
},
}
% \end{macrocode}
Expand All @@ -172,8 +172,8 @@
\let\moloch@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}%
\PackageNote{beamerthememoloch}{%
Be aware that titleformat frame=allsmallcaps can lead to problems%
}
Be aware that titleformat frame=allsmallcaps
can lead to problems}
},
allcaps/.code={%
\let\moloch@frametitleformat\MakeUppercase%
Expand Down
Loading

0 comments on commit e770ca1

Please sign in to comment.