summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/mikoslides
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-20 22:31:24 +0000
committerKarl Berry <karl@freefriends.org>2019-03-20 22:31:24 +0000
commit2b006ec0e0cafe12255f874f9c44786ab6f38901 (patch)
treec40f5796e1b34e3f051abd84d049e092e4ffd0ab /Master/texmf-dist/source/latex/stex/mikoslides
parent8e508e8b0218f17eb318645073096f2cf645cc78 (diff)
stex (20mar19)
git-svn-id: svn://tug.org/texlive/trunk@50489 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/mikoslides')
-rw-r--r--Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx443
1 files changed, 284 insertions, 159 deletions
diff --git a/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx
index 7d8d226146c..1fc76db644a 100644
--- a/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx
+++ b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx
@@ -10,14 +10,15 @@
%
% \iffalse
%<cls|package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<cls>\ProvidesClass{mikoslides}[2016/04/07 v1.1 Jacobs slides Class]
-%<package>\ProvidesPackage{mikoslides}[2016/04/07 v1.1 Jacobs slides Package]
+%<cls>\ProvidesClass{mikoslides}[2019/03/20 v1.2 MiKo slides Class]
+%<package>\ProvidesPackage{mikoslides}[2019/03/20 v1.2 MiKo slides Package]
%
%<*driver>
\documentclass{ltxdoc}
+\usepackage[utf8]{inputenc}
\usepackage{url,array,float,xspace}
\usepackage[show]{ed}
-\usepackage{graphicx}
+\usepackage{graphicx,paralist}
\usepackage[hyperref=auto,style=alphabetic]{biblatex}
\addbibresource{kwarcpubs.bib}
\addbibresource{extpubs.bib}
@@ -27,10 +28,13 @@
\floatstyle{boxed}
\newfloat{exfig}{thp}{lop}
\floatname{exfig}{Example}
-\def\tracissue#1{\cite{sTeX:online},
-\hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}}
+\def\githubissue#1{\cite{sTeX:github:on},
+\hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}}
\usepackage{hyperref}
-\begin{document}\DocInput{mikoslides.dtx}\end{document}
+\begin{document}
+\RecordChanges
+\DocInput{mikoslides.dtx}
+\end{document}
%</driver>
% \fi
%
@@ -50,6 +54,7 @@
% \changes{v1.1}{2015/10/25}{Removing the old title macros (use the regular ones instead)}
% \changes{v1.1}{2015/10/25}{reinterpreting omgroup}
% \changes{v1.1}{2015/11/04}{moving MathHub support out to separate package}
+% \changes{v1.2}{2018/12/03}{changed to keyval class/package options, allowed arbitrary classes}
%
% \GetFileInfo{mikoslides.cls}
% \MakeShortVerb{\|}
@@ -68,7 +73,6 @@
% \def\snippet#1{{\ttfamily{#1}}}
% \def\cnxlatex{CNX\LaTeX\xspace}
% \def\mathml{{\scshape{MathML}}\xspace}
-% \def\latexml{\hbox{{\LaTeX}ML}\xspace}
% \def\omdoc{OMDoc\xspace}
% \def\activemath{{\scshape{ActiveMath}}\xspace}
% \def\textwarning{\includegraphics[width=1.2em]{dangerous-bend}\xspace}
@@ -76,7 +80,7 @@
% \title{Slides and Course Notes\thanks{Version {\fileversion}
% (last revised {\filedate})}}
% \author{Michael Kohlhase\\
-% Jacobs University, Bremen\\
+% FAU Erlangen-N\"urnberg\\
% \url{http://kwarc.info/kohlhase}}
% \maketitle
%
@@ -89,10 +93,10 @@
%
%\section{Introduction}
%
-% This Document class is derived from |beamer.cls|~\cite{beamerclass:on}, specializes it
-% with a simple theme (Jacobs as a default) and adds a ``notes version'' for course notes
-% derived from the |omdoc| class~\cite{Kohlhase:smomdl} that is more suited to printing
-% than the one supplied by |beamer.cls|.
+% The |mikoslides| document class is derived from |beamer.cls|~\cite{beamerclass:on}, it
+% adds a ``notes version'' for course notes derived from the |omdoc|
+% class~\cite{Kohlhase:smomdl} that is more suited to printing than the one supplied by
+% |beamer.cls|.
%
%
%\section{The User Interface}\label{sec:user}
@@ -114,7 +118,7 @@
%
% The |mikoslides| class takes a variety of class options:\ednote{leaving out noproblems
% for the moment until we decide what to do with it.}
-% \begin{compactitem}
+% \begin{itemize}
% \item The options \DescribeMacro{slides}|slides|\DescribeMacro and {notes}|notes| switch
% between slides mode and notes mode (see Section~\ref{sec:user:notesslides}).
% \item If the option \DescribeMacro{sectocframes}|sectocframes| is given, then special
@@ -122,8 +126,10 @@
% \item \DescribeMacro{showmeta}|showmeta|. If this is set, then the metadata keys are
% shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization options).
% \item If the option \DescribeMacro{frameimages}|frameimages| is set, then slide mode
-% also shows the |\frameimage|-generated frames.
-% \end{compactitem}
+% also shows the |\frameimage|-generated frames.
+% \item \DescribeMacro{topsect}|topsect=|\meta{sect} can be used to specify the
+% top-level sectioning level; the default for \meta{setc} is |section|.
+% \end{itemize}
%
% \subsection{Notes and Slides}\label{sec:user:notesslides}
%
@@ -171,6 +177,20 @@
% package~\cite{CarRah:tpp99} and \meta{path} is the file path (extension can be left off
% like in |\includegraphics|).
%
+% If we want to transclude a the contents of a file as a note, we can use the
+% \DescribeMacro{\ninputref}|\ninputref| macro. |\ninputref{foo}| is equivalent to
+%\begin{verbatim}
+% \begin{note}
+% \inputref{foo}
+% \end{note}
+% \end{verbatim}
+%
+% There are some environments that tend to occur at the top-level of |note|
+% environments. We make convenience versions of these: e.g. the
+% \DescribeEnv{nomtext}|nomtext| environment is just an |omtext| inside a |note|
+% environemnt (but looks nicer in the source, since it avoids one level of source
+% indenting). Similarly, we have the \DescribeEnv{nomgroup}|nomgroup| environment.
+%
% \subsection{Header and Footer Lines}\label{sec:user:headfootlines}
%
% \subsection{Colors and Highlighting}\label{sec:user:highlighting}
@@ -186,12 +206,12 @@
% In this section we document known limitations. If you want to help alleviate them,
% please feel free to contact the package author. Some of them are currently discussed in
% the \sTeX GitHub repository~\cite{sTeX:github:on}.
-% \begin{compactenum}
+% \begin{enumerate}
% \item when option |book| which uses |\pagestyle{headings}| is given and semantic macros
% are given in the |omgroup| titles, then they sometimes are not defined by the time the
% heading is formatted. Need to look into how the headings are made. This is a problem
% of the underlying |omdoc| package.
-% \end{compactenum}
+% \end{enumerate}
%
% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}
%
@@ -200,93 +220,124 @@
%\subsection{Class and Package Options}\label{sec:impl:init}
%
% We define some Package Options and switches for the |mikoslides| class and activate them
-% by passing them on to |beamer.cls| and |omdoc.cls| and the |mikoslides| package.
+% by passing them on to |beamer.cls| and |omdoc.cls| and the |mikoslides| package. We pass
+% the |nontheorem| option to the |statements| package when we are not in notes mode, since
+% the |beamer| package has its own (overlay-aware) theorem environments.
%
% \begin{macrocode}
%<*cls>
-\newif\ifnotes\notesfalse
-\DeclareOption{notes}{\notestrue\PassOptionsToPackage{\CurrentOption}{mikoslides}}
-\DeclareOption{slides}{\notesfalse\PassOptionsToPackage{\CurrentOption}{mikoslides}}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{omdoc}
- \PassOptionsToClass{\CurrentOption}{beamer}
- \PassOptionsToPackage{\CurrentOption}{mikoslides}}
-\ProcessOptions
+\RequirePackage{kvoptions}
+\RequirePackage{etoolbox}
+\SetupKeyvalOptions{family=mks@cls,prefix=mks@cls@}
+\DeclareStringOption[article]{class}
+\AddToKeyvalOption*{class}{\PassOptionsToClass{class=\mks@cls@class}{omdoc}
+ \ifdefstring{\mks@cls@class}{book}{\PassOptionsToPackage{topsect=part}{mikoslides}}{}
+ \ifdefstring{\mks@cls@class}{report}{\PassOptionsToPackage{topsect=part}{mikoslides}}}{}
+\DeclareBoolOption{notes}
+\DeclareComplementaryOption{slides}{notes}
+\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{omdoc}
+ \PassOptionsToClass{\CurrentOption}{beamer}
+ \PassOptionsToPackage{\CurrentOption}{mikoslides}}
+\ProcessKeyvalOptions{mks@cls}
%</cls>
% \end{macrocode}
-% now we do the same for the |mikoslides| package. Note that we also have to define the
-% same switches\ednote{MK: we may think about making all of them internal}, since we might
-% use |mikoslides.sty| in a different class.
+% now we do the same for the |mikoslides| package.
% \begin{macrocode}
%<*package>
-\newif\if@mikoslides@mh@\@mikoslides@mh@false
-\DeclareOption{mh}{\@mikoslides@mh@true
- \PassOptionsToPackage{\CurrentOption}{stex}
- \PassOptionsToPackage{\CurrentOption}{smglom}
- \PassOptionsToPackage{\CurrentOption}{tikzinput}}
-\newif\ifnotes\notesfalse
-\DeclareOption{notes}{\notestrue}
-\DeclareOption{slides}{\notesfalse}
-\newif\ifsectocframes\sectocframesfalse
-\DeclareOption{sectocframes}{\sectocframestrue}
-\newif\ifframeimages\frameimagesfalse
-\DeclareOption{frameimages}{\frameimagestrue}
-\newif\if@part\@partfalse
-\DeclareOption{report}{\@parttrue\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\DeclareOption{book}{\@parttrue\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\newif\ifproblems\problemstrue
-\DeclareOption{noproblems}{\problemsfalse}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{stex}
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{family=mks@sty,prefix=mks@sty@}
+\DeclareStringOption[section]{topsect}
+\DeclareBoolOption{mh}
+\AddToKeyvalOption*{mh}{
+ \PassOptionsToPackage{mh}{stex}
+ \PassOptionsToPackage{mh}{smglom}
+ \PassOptionsToPackage{mh}{tikzinput}}
+\newif\ifnotes\notestrue
+\DeclareBoolOption{notes}
+\AddToKeyvalOption*{notes}{\notestrue\PassOptionsToPackage{notes}{statements}}
+\DeclareComplementaryOption{slides}{notes}
+\AddToKeyvalOption*{slides}{\notesfalse\PassOptionsToPackage{nontheorem}{statements}}
+\DeclareBoolOption{sectocframes}
+\AddToKeyvalOption*{sectocframes}{\PassOptionsToPackage{msection}{statements}}
+\DeclareBoolOption{frameimages}
+\DeclareBoolOption{noproblems}
+\DeclareDefaultOption{\PassOptionsToPackage{\CurrentOption}{stex}
\PassOptionsToPackage{\CurrentOption}{smglom}
\PassOptionsToPackage{\CurrentOption}{tikzinput}}
-\ProcessOptions
+\ProcessKeyvalOptions{mks@sty}
%</package>
% \end{macrocode}
%
% Depending on the options, we either load the |article|-based |omdoc| or the |beamer|
-% class. In the first case, we also have to make the |beamer|-specific things available to
-% |article| via the |beamerarticle| package. We use options to avoid loading theorem-like
-% environments, since we want to use our own from the $\sTeX$ packages. On the \latexml
-% side we just load the omdoc class and provide the |\usetheme| macro that would otherwise
-% from the the |beamer| class.
+% class (and set some counters).
% \begin{macrocode}
%<*cls>
-\ifnotes
+\ifmks@cls@notes
\LoadClass{omdoc}
- \RequirePackage{a4wide}
- \RequirePackage{marginnote}
- \RequirePackage{mdframed}
- \RequirePackage[notheorems,noamsthm,noxcolor]{beamerarticle}
- \RequirePackage[bookmarks,bookmarksopen,bookmarksnumbered,breaklinks,
- linkcolor=black,citecolor=black,urlcolor=cyan,filecolor=cyan,colorlinks]{hyperref}
\else
- \LoadClass[notheorems,noamsthm,10pt]{beamer}
+ \LoadClass[10pt,notheorems]{beamer}
\newcounter{Item}
\newcounter{paragraph}
\newcounter{subparagraph}
\newcounter{Hfootnote}
- \usetheme{Jacobs}
\fi
+% \end{macrocode}
+% now it only remains to load the |mikoslides| package that does all the rest.
+% \begin{macrocode}
\RequirePackage{mikoslides}
%</cls>
% \end{macrocode}
%
-% now, we load the remaining packages for both versions.
+% In |notes| mode, we also have to make the |beamer|-specific things available to
+% |article| via the |beamerarticle| package. We use options to avoid loading theorem-like
+% environments, since we want to use our own from the $\sTeX$ packages. The first batch
+% of packages we want are loaded on |mikoslides.sty|. These are the general ones, we will
+% load the \sTeX-specific ones after we have done some work (e.g. defined the counters
+% |m*|). Only the |stex-logo| package is already needed now for the default theme.
%
% \begin{macrocode}
%<*package>
-\if@mikoslides@mh@\RequirePackage{mikoslides-mh}\fi
-\RequirePackage{stex}
-\RequirePackage{smglom}
-\RequirePackage{tikzinput}
+\ifmks@sty@notes
+\RequirePackage{a4wide}
+\RequirePackage{marginnote}
+\RequirePackage{xcolor}
+\RequirePackage{mdframed}
+\RequirePackage[noxcolor,noamsthm]{beamerarticle}
+\fi
+\ifmks@sty@mh\RequirePackage{mikoslides-mh}\fi
+\RequirePackage{etoolbox}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{comment}
\RequirePackage{textcomp}
\RequirePackage{url}
+\RequirePackage{graphicx}
+\RequirePackage{stex-logo}
+\RequirePackage{pgf}
+\ifmks@sty@notes
+\RequirePackage[bookmarks,bookmarksopen,bookmarksnumbered,breaklinks,
+linkcolor=black,citecolor=black,urlcolor=cyan,filecolor=cyan,colorlinks]{hyperref}
+\fi
+% \end{macrocode}
+%
+% finally, we require the |metakeys| package from \sTeX, so that we can use the
+% |\addmetakey| mechanism.
+%
+% \begin{macrocode}
+\RequirePackage{metakeys}
% \end{macrocode}
%
% \subsection{Notes and Slides}\label{sec:impl:noteslides}
%
+% For the lecture notes cases, we also provide the |\usetheme| macro that would otherwise
+% from the the |beamer| class. While the latter loads |beamertheme|\meta{theme}{.sty}, the
+% notes version loads |beamernotestheme|\meta{theme}|.sty|.\ednote{MK: This is not ideal, but
+% I am not sure that I want to be able to provide the full theme functionality there.}
+% \begin{macrocode}
+\ifmks@sty@notes
+\renewcommand\usetheme[2][]{\usepackage[#1]{beamernotestheme#2}}
+\fi
+% \end{macrocode}
% We define the sizes of slides in the notes. Somehow, we cannot get by with the same
% here.
%
@@ -302,7 +353,7 @@
% no-operation otherwise we declare the |note| environment as a comment via the |comment|
% package.
% \begin{macrocode}
-\ifnotes%
+\ifmks@sty@notes%
\renewenvironment{note}{\ignorespaces}{}%
\else%
\excludecomment{note}%
@@ -310,13 +361,18 @@
% \end{macrocode}
% \end{environment}
%
+% \begin{macro}{\ninputref}
+% \begin{macrocode}
+\newcommand\ninputref[2][]{\ifmks@sty@notes\inputref[#1]{#2}\fi}
+% \end{macrocode}
+% \end{macro}
+%
%
-% We start by giving the {\latexml} binding for the |frame| environment from the |beamer|
-% class. We first set up the slide boxes in |article| mode. We set up sizes and provide a
+% We first set up the slide boxes in |article| mode. We set up sizes and provide a
% box register for the frames and a counter for the slides.
%
% \begin{macrocode}
-\ifnotes
+\ifmks@sty@notes
\newlength{\slideframewidth}
\setlength{\slideframewidth}{1.5pt}
% \end{macrocode}
@@ -330,11 +386,9 @@
\addmetakey[yes]{frame}{fragile}
\addmetakey[yes]{frame}{shrink}
\addmetakey[yes]{frame}{squeeze}
+ \addmetakey[yes]{frame}{t}
% \end{macrocode}
-% We redefine the |itemize| environment so that it looks more like the one in |beamer|
-% with |Jacobs| theme. We create the box with the |mdframed| environment from the
-% equinymous package.
-% Then we define the environment, read them, and construct the slide number and label.
+% We define the environment, read them, and construct the slide number and label.
% \begin{macrocode}
\renewenvironment{frame}[1][]{%
\metasetkeys{frame}{#1}%
@@ -345,8 +399,7 @@
\label{\frame@label}%
\fi%
% \end{macrocode}
-% We redefine the |itemize| environment so that it looks more like the one in |beamer|
-% with |Jacobs| theme.
+% We redefine the |itemize| environment so that it looks more like the one in |beamer|.
% \begin{macrocode}
\def\itemize@level{outer}%
\def\itemize@outer{outer}%
@@ -395,40 +448,55 @@
% \begin{macrocode}
\newrobustcmd\frameimage[2][]{%
\stepcounter{slide}%
- \ifframeimages%
+ \ifmks@sty@frameimages%
\def\Gin@ewidth{}\setkeys{Gin}{#1}%
- \ifnotes%
- \else%
- \vfill%
- \fi%
+ \ifmks@sty@notes\else\vfill\fi%
\ifx\Gin@ewidth\@empty%
\mycgraphics[width=\slidewidth,#1]{#2}\else\mycgraphics[#1]{#2}%
\fi%
\par\strut\hfill{\footnotesize Slide \arabic{slide}}%
- \ifnotes%
- \else%
- \vfill%
- \fi%
+ \ifmks@sty@notes\else\vfill\fi%
\fi%
}% ifframeimages
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pause}
+% \ednote{MK: fake it in notes mode for now}
+% \begin{macrocode}
+\ifmks@sty@notes\newcommand\pause{}\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{nomtext}
+% \begin{macrocode}
+\ifmks@sty@notes\newenvironment{nomtext}[1][]{\begin{omtext}[#1]}{\end{omtext}}%
+\else\excludecomment{nomtext}\fi%
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{nomgroup}
+% \begin{macrocode}
+\ifmks@sty@notes\newenvironment{nomgroup}[2][]{\begin{omgroup}[#1]{#2}}{\end{omgroup}}%
+\else\excludecomment{nomgroup}\fi%
+% \end{macrocode}
+% \end{environment}
% \subsection{Header and Footer Lines}\label{sec:impl:headfootlines}
%
% Now, we set up the infrastructure for the footer line of the slides, we use boxes for
% the logos, so that they are only loaded once, that considerably speeds up processing.
+%
% \begin{macro}{\setslidelogo}
% The default logo is the logo of Jacobs University. Customization can be done by |\setslidelogo{|\meta{logo name}|}|.
% \begin{macrocode}
\newlength{\slidelogoheight}
-\ifnotes%
+\ifmks@sty@notes%
\setlength{\slidelogoheight}{.4cm}%
\else%
\setlength{\slidelogoheight}{1cm}%
\fi%
\newsavebox{\slidelogo}%
-\sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{jacobs-logo}}%
+\sbox{\slidelogo}{\sTeX}%
\newrobustcmd{\setslidelogo}[1]{%
\sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{#1}}%
}%
@@ -444,7 +512,11 @@
% \end{macro}
%
% \begin{macro}{\setlicensing}
-% Now, we set up the copyright and licensing. By default we use the Creative Commons Attribuition-ShareAlike license to strengthen the public domain. If package |hyperref| is loaded, then we can attach a hyperlink to the license logo. |\setlicensing[|\meta{url}|]{|\meta{logo name}|}| is used for customization, where ||\meta{url}|| is optional.
+% Now, we set up the copyright and licensing. By default we use the Creative Commons
+% Attribuition-ShareAlike license to strengthen the public domain. If package |hyperref|
+% is loaded, then we can attach a hyperlink to the license
+% logo. |\setlicensing[|\meta{url}|]{|\meta{logo name}|}| is used for customization,
+% where ||\meta{url}|| is optional.
% \begin{macrocode}
\def\copyrightnotice{\footnotesize\copyright:\hspace{.3ex}{\source}}%
\newsavebox{\cclogo}%
@@ -467,11 +539,11 @@
\def\licensing{{\usebox{\cclogo}}}%
\else%
\def\licensing{%
- \ifcchref%
- \href{#1}{\usebox{\cclogo}}%
- \else%
- {\usebox{\cclogo}}%
- \fi%
+ \ifcchref%
+ \href{#1}{\usebox{\cclogo}}%
+ \else%
+ {\usebox{\cclogo}}%
+ \fi%
}%
\fi%
}%
@@ -492,13 +564,19 @@
%
% \subsection{Colors and Highlighting}\label{sec:impl:highlighting}
%
+% We first specify sans serif fonts as the default.
+%
+% \begin{macrocode}
+\sffamily
+% \end{macrocode}
+%
% Now, we set up an infrastructure for highlighting phrases in slides. Note that we use
% content-oriented macros for highlighting rather than directly using color markup.
% The first thing to to is to adapt the green so that it is dark enough for most beamers
% \begin{macrocode}
\AtBeginDocument{%
- \definecolor{green}{rgb}{0,.5,0}%
- \definecolor{purple}{cmyk}{.3,1,0,.17}%
+\definecolor{green}{rgb}{0,.5,0}%
+\definecolor{purple}{cmyk}{.3,1,0,.17}%
}%
% \end{macrocode}
%
@@ -519,12 +597,12 @@
% as the macro can be used quite often we put it into a box register, so that it is only
% loaded once.
% \begin{macrocode}
-\pgfdeclareimage[width=.9em]{miko@small@dbend}{dangerous-bend}
+\pgfdeclareimage[width=.8em]{miko@small@dbend}{dangerous-bend}
\def\smalltextwarning{%
\pgfuseimage{miko@small@dbend}%
\xspace%
}%
-\pgfdeclareimage[width=1.5em]{miko@dbend}{dangerous-bend}
+\pgfdeclareimage[width=1.2em]{miko@dbend}{dangerous-bend}
\newrobustcmd\textwarning{%
\raisebox{-.05cm}{\pgfuseimage{miko@dbend}}%
\xspace%
@@ -537,14 +615,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Front Matter, Titles, etc}
-%
-% We need to redefine the frontmatter macros inherited from the |beamer| class for
-% LaTeXML, since there they take an optional argument.
-% \begin{macrocode}
-% \end{macrocode}
% \begin{macrocode}
-% Must be first command on slide to make positioning work.
\newrobustcmd\putgraphicsat[3]{%
\begin{picture}(0,0)\put(#1){\includegraphics[#2]{#3}}\end{picture}%
}%
@@ -556,61 +627,119 @@
% \subsection{Sectioning}
%
% If the |sectocframes| option is set, then we make section frames. We first define a set
-% of counters
+% of counters\ednote{I forget: why not use the counters from beamer/article? --> document
+% this.}
% \begin{macrocode}
-\ifsectocframes%
- \if@part%
- \newcounter{mpart}%
- \newcounter{mchapter}%
- \newcounter{msection}[mchapter]%
- \else%
- \newcounter{msection}%
- \fi%
- \newcounter{msubsection}[msection]%
- \newcounter{msubsubsection}[msubsection]%
- \newcounter{msubsubsubsection}[msubsubsection]%
-\fi% ifsectocframes
-% \end{macrocode}
-% and then
-% \begin{macrocode}
-\ifnotes\else% only in slides
- \renewenvironment{omgroup}[2][]{%
- \metasetkeys{omgroup}{#1}\sref@target%
- \advance\section@level by 1%
- \ifsectocframes%
- \begin{frame}%
- \vfill\Large\centering%
- \red{%
- \ifcase\section@level\or%
- \stepcounter{mpart}Part \Roman{mpart}\or%
- \stepcounter{mchapter}Chapter \arabic{mchapter}\or
- \stepcounter{msection}\if@part\arabic{mchapter}.\fi\arabic{msection}\or
- \stepcounter{msubsection}\if@part\arabic{mchapter}.\fi\arabic{msection}.\arabic{msubsection}\or
- \stepcounter{msubsubsection}\if@part\arabic{mchapter}.\fi\arabic{msection}.\arabic{msubsection}.\arabic{msubsubsection}.\or
- \stepcounter{msubsubsubsection}\if@part\arabic{mchapter}.\fi\arabic{msection}.\arabic{msubsection}.\arabic{msubsubsection}.\arabic{msubsubsubsection}%
- \fi% end ifcase
- \quad #2%
- }%
- \vfill%
- \end{frame}%
- \fi %ifsectocframes
- }
- {\advance\section@level by -1}%
-\fi% ifnotes
+\ifmks@sty@sectocframes%
+\ifdefstring\mks@sty@topsect{part}{%
+ \newcounter{mpart}\newcounter{mchapter}\newcounter{msection}[mchapter]}
+{\ifdefstring\mks@sty@topsect{chapter}{%
+ \newcounter{mchapter}\newcounter{msection}[mchapter]}
+ {\newcounter{msection}}}
+\newcounter{msubsection}[msection]%
+\newcounter{msubsubsection}[msubsection]%
+\newcounter{msubsubsubsection}[msubsubsection]%
+\fi% ifsectocframes
+% \end{macrocode}
+%
+% Now that we have defined the counters, we can load the \sTeX-specific packages (in
+% particular |statements| that needs these counters).
+%
+% \begin{macrocode}
+\RequirePackage{stex}
+\RequirePackage{smglom}
+\RequirePackage{tikzinput}
+% \end{macrocode}
+%
+% Finally, we set the \DescribeMacro{\section@level}|\section@level| macro that governs
+% sectioning.
+%
+% \begin{macrocode}
+\section@level=2
+\ifdefstring{\mks@sty@topsect}{part}{\section@level=0}{}
+\ifdefstring{\mks@sty@topsect}{chapter}{\section@level=1}{}
+% \end{macrocode}
+%
+% Now \sTeX is loaded, we redefine the |omgroup| environment to produce section toc frames
+% (if the option |sectocframes| is specified.)\ednote{MK: we should probably just redefine
+% omgroup@num and omgroup@nonum, since they do the actual work so that we can add the
+% sectocframes behavior here without having to copy the internals. Then there is less
+% material that can get out of sync. Additionally, we should have a hook in the original
+% code of those so that we can increment the slides counter in notes node (to keep slides
+% in sync)}
+%
+% \begin{macrocode}
+\ifmks@sty@notes\else% only in slides
+\def\part@prefix{\ifdefstring\mks@sty@topsect{part}{\arabic{mchapter}.}{}}
+\renewenvironment{omgroup}[2][]{%
+ \metasetkeys{omgroup}{#1}\sref@target%
+ \advance\section@level by 1%
+ \ifmks@sty@sectocframes%
+ \stepcounter{slide}
+ \begin{frame}[noframenumbering]%
+ \vfill\Large\centering%
+ \red{%
+ \ifcase\section@level\or
+ \stepcounter{mpart}
+ \def\@@label{Part \Roman{mpart}}
+ \def\currentsectionlevel{part}
+ \or%
+ \stepcounter{mchapter}
+ \def\@@label{Chapter \arabic{mchapter}}
+ \def\currentsectionlevel{chapter}
+ \or
+ \stepcounter{msection}
+ \def\@@label{\part@prefix\arabic{msection}}
+ \def\currentsectionlevel{section}
+ \or
+ \stepcounter{msubsection}
+ \def\@@label{\part@prefix\arabic{msection}.\arabic{msubsection}}
+ \def\currentsectionlevel{subsection}
+ \or
+ \stepcounter{msubsubsection}
+ \def\@@label{\part@prefix\arabic{msection}.\arabic{msubsection}.\arabic{msubsubsection}}
+ \def\currentsectionlevel{subsubsection}
+ \or
+ \stepcounter{msubsubsubsection}
+ \def\@@label{\part@prefix\arabic{msection}.\arabic{msubsection}.\arabic{msubsubsection}.\arabic{msubsubsubsection}}
+ \def\currentsectionlevel{subsubsubsection}
+ \fi% end ifcase
+ \@@label\sref@label@id\@@label
+ \quad #2%
+ }%
+ \vfill%
+ \end{frame}%
+ \fi %ifmks@sty@sectocframes
+}
+{\advance\section@level by -1}%
+\fi% ifmks@sty@notes
% \end{macrocode}
%
% \subsection{Miscellaneous}
%
+% We set up a |beamer| template for theorems like ams style, but without a block
+% environment.
+% \begin{macrocode}
+\def\inserttheorembodyfont{\normalfont}
+\defbeamertemplate{theorem begin}{miko}
+{\inserttheoremheadfont\inserttheoremname\inserttheoremnumber
+ \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
+ \inserttheorempunctuation\inserttheorembodyfont\xspace}
+\defbeamertemplate{theorem end}{miko}{}
+% \end{macrocode}
+% and we set it as the default one.
+% \begin{macrocode}
+\setbeamertemplate{theorems}[miko]
+% \end{macrocode}
% The following fixes an error I do not understand, this has something to do with
% beamer compatibility, which has similar definitions but only up to 1.
% \begin{macrocode}
\expandafter\def\csname Parent2\endcsname{}
+% \end{macrocode}
+% We need to disregard the columns macros introduced by the |beamer| class in the notes.
% \begin{macrocode}
-%
-% We need to disregard the columns macros introduced by the |beamer| class
-% \begin{macrocode}
-\ifnotes%
- \renewenvironment{columns}{%
+\ifmks@sty@notes%
+ \renewenvironment{columns}[1][]{%
\par\noindent%
\begin{minipage}%
\slidewidth\centering\leavevmode%
@@ -618,20 +747,16 @@
\end{minipage}\par\noindent%
}%
\newsavebox\columnbox%
- \renewenvironment{column}[1]{%
- \begin{lrbox}{\columnbox}\begin{minipage}{#1}%
+ \renewenvironment<>{column}[2][]{%
+ \begin{lrbox}{\columnbox}\begin{minipage}{#2}%
}{%
\end{minipage}\end{lrbox}\usebox\columnbox%
}%
-\fi%
-% \end{macrocode}
-% Now, some things that are imported from the |pgf| and |beamer| packages:
-% \begin{macrocode}
+\fi% ifnotes
% \end{macrocode}
-%
%
% \begin{macrocode}
-\ifproblems%
+\ifmks@sty@noproblems%
\newenvironment{problems}{}{}%
\else%
\excludecomment{problems}%
@@ -647,7 +772,7 @@
%%% End:
% \fi
% LocalWords: mikoslides dtx beamer omdoc notheorems noamsthm beamerarticle sc Licences
-% LocalWords: graphicx slidelabel stex latexml amssymb tikz url CPERL amsmath filedate
+% LocalWords: graphicx slidelabel stex amssymb tikz url CPERL amsmath filedate
% LocalWords: LoadClass RequirePackage DefRegister DefEnvironment omgroup rgb frameimage
% LocalWords: afterDigestBegin setProperty LookupValue DefConstructor hyperref Tantau's
% LocalWords: cmyk lec DefMacro titleslide ttitle RawTeX metadata etoolbox cls emph ugbc
@@ -678,7 +803,7 @@
% LocalWords: putgraphicsat beginomgroup ifnum vfill vfill noindent leavevmode cscpnrr11
% LocalWords: columnbox lrbox needwrapper unlist omtext bgroup autoclose pgf readXToken
% LocalWords: mygraphics doctex NeedsTeXFormat textbackslash userdefinedwidth foobar
-% LocalWords: includegrahics smalltextwarning msubsubsection msubsubsubsection ldots
+% LocalWords: includegrahics smalltextwarnings msubsubsection msubsubsubsection ldots
% LocalWords: frameimages frameimages ifframeimages frameimagesfalse frameimagestrue
% LocalWords: expandafter csname endcsname specializes customization flexiformal colors
% LocalWords: initialize Initialization defindex realized itemize newrobustcmd