summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx
blob: 7d8d226146c1f9f300db565e33c7834729df57d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
% \iffalse meta-comment
% A LaTeX Class for Jacobs University Slides
% Copyright (c) 2007 Michael Kohlhase, all rights reserved
%               this file is released under the
%               Gnu Library Public Licences (LGPL)
%
% The original of this file is in the public repository at 
% http://github.com/KWARC/sTeX/
% \fi
% 
% \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]
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{url,array,float,xspace}
\usepackage[show]{ed}
\usepackage{graphicx}
\usepackage[hyperref=auto,style=alphabetic]{biblatex}
\addbibresource{kwarcpubs.bib}
\addbibresource{extpubs.bib}
\addbibresource{kwarccrossrefs.bib}
\addbibresource{extcrossrefs.bib}
\makeindex
\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}}
\usepackage{hyperref}
\begin{document}\DocInput{mikoslides.dtx}\end{document}
%</driver>
% \fi
% 
% \CheckSum{469}
% 
% \changes{v0.1}{2005/12/06}{Initial Version}
% \changes{v0.2}{2006/01/11}{course notes back on seminar}
% \changes{v0.3}{2007/05/16}{changing to Jacobs logo}
% \changes{v0.4}{2007/10/16}{re-basing the whole thing on beamer}
% \changes{v0.4}{2008/09/06}{moving line-end-comment to \texttt{omdoc.dtx}}
% \changes{v0.5}{2009/06/17}{eliminating mytwocolumns, this is better done by \texttt{beamer.cls}}
% \changes{v0.9}{2010/06/18}{this is almost done}
% \changes{v0.9}{2012/09/17}{basic options handling for the \texttt{frame} environment in
% notes mode}
% \changes{v0.9}{2013/08/23}{numbered sectocframes}
% \changes{v1.0}{2014/01/07}{adding \texttt{\textbackslash frameimage}}
% \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}
% 
% \GetFileInfo{mikoslides.cls}
% \MakeShortVerb{\|}
%
% \def\twin#1#2{\index{#1!#2}\index{#2!#1}}
% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}}
% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}}
% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}}
%
% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}}
% \def\stex{\hbox{\raisebox{-.5ex}S\kern-.5ex\TeX}}
% \def\sTeX{\stex}
% \def\cnxml{\scshape{CNXml}}
% \def\connexions{\scshape{Connexions}}
% \def\element#1{{\ttfamily{#1}}}
% \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}
% 
% \title{Slides and Course Notes\thanks{Version {\fileversion}
% (last revised {\filedate})}}
%    \author{Michael Kohlhase\\
%            Jacobs University, Bremen\\
%            \url{http://kwarc.info/kohlhase}}
% \maketitle
%
% \begin{abstract}
%   We present a document class from which we can generate both course slides and course
%   notes in a transparent way.
% \end{abstract}
%
% \tableofcontents\newpage
%
%\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|.
%
% 
%\section{The User Interface}\label{sec:user}
%
% The |mikoslides| class takes the notion of a slide frame from Till Tantau's excellent
% |beamer| class and adapts its notion of frames for use in the \sTeX and \omdoc. To
% support semantic course notes, it extends the notion of mixing frames and explanatory
% text, but rather than treating the frames as images (or integrating their contents into
% the flowing text), the |mikoslides| package displays the slides as such in the course
% notes to give students a visual anchor into the slide presentation in the course (and to
% distinguish the different writing styles in slides and course notes).
% 
% In practice we want to generate two documents from the same source: the slides for
% presentation in the lecture and the course notes as a narrative document for home
% study. To achieve this, the |mikoslides| class has two modes: \emph{slides mode} and
% \emph{notes mode} which are determined by the package option. 
%
% \subsection{Package Options}\label{sec:user:options}
% 
% 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}
% \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
%   frames with section table of contents are produced headers \ednote{document the functionality}
% \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}
% 
% \subsection{Notes and Slides}\label{sec:user:notesslides}
% 
% Slides are represented with the \DescribeEnv{frame}|frame| just like in the |beamer|
% class, see~\cite{Tantau:ugbc} for details. The |mikoslides| class adds the
% \DescribeEnv{note}|note| environment for encapsulating the course note
% fragments.\footnote{MK: it would be very nice, if we did not need this environment, and
% this should be possible in principle, but not without intensive LaTeX trickery. Hints to
% the author are welcome.} 
%
% \textwarning Note that it is essential to start and end the |notes| environment at the
% start of the line -- in particular, there may not be leading blanks -- else {\LaTeX}
% becomes confused and throws error messages that are difficult to decipher.
%
% \begin{exfig}
% \begin{verbatim}
% \begin{note}
%   We start this course with ...
% \end{note}
%
% \begin{frame}
%   \frametitle{The first slide}
%   ...
% \end{frame}
% \begin{note}
%   ... and more explanatory text
% \end{note}
%
% \begin{frame}
%   \frametitle{The second slide}
%   ...
% \end{frame}
% ...
% \end{verbatim}
% \caption{A typical Course Notes File}\label{fig:notesfile}
% \end{exfig}
% 
% By interleaving the |frame| and |note| environments, we can build course notes as shown
% in Figure~\ref{fig:notesfile}. 
% 
% Sometimes, we want to integrate slides as images after all -- e.g. because we already
% have a PowerPoint presentation, to which we want to add \sTeX notes. In this case we can
% use \DescribeMacro{\frameimage}|\frameimage[|\meta{opt}|]{|\meta{path}|}|, where
% \meta{opt} are the options of |\includegraphics| from the |graphicx|
% package~\cite{CarRah:tpp99} and \meta{path} is the file path (extension can be left off
% like in |\includegraphics|).
% 
% \subsection{Header and Footer Lines}\label{sec:user:headfootlines}
%
% \subsection{Colors and Highlighting}\label{sec:user:highlighting}
% The \DescribeMacro{\textwarning}|\textwarning| macro generates a warning
% sign: \textwarning
%
% \subsection{Front Matter, Titles, etc}\label{sec:user:matter}
%
% \subsection{Miscellaneous}\label{sec:user:misc}
%
% \section{Limitations}\label{sec:limitations}
% 
% 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}
% \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}
% 
% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}
% 
%\section{The Implementation}\label{sec:impl}
%
%\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.
%
%    \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
%</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.
%    \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}
                           \PassOptionsToPackage{\CurrentOption}{smglom}
                           \PassOptionsToPackage{\CurrentOption}{tikzinput}}
\ProcessOptions
%</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.
%    \begin{macrocode}
%<*cls>
\ifnotes
  \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}
  \newcounter{Item}
  \newcounter{paragraph}
  \newcounter{subparagraph}
  \newcounter{Hfootnote}
  \usetheme{Jacobs}
\fi
\RequirePackage{mikoslides}
%</cls>
%    \end{macrocode}
% 
% now, we load the remaining packages for both versions. 
%
%    \begin{macrocode}
%<*package>
\if@mikoslides@mh@\RequirePackage{mikoslides-mh}\fi
\RequirePackage{stex}
\RequirePackage{smglom}
\RequirePackage{tikzinput}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{comment}
\RequirePackage{textcomp}
\RequirePackage{url}
%    \end{macrocode}
% 
% \subsection{Notes and Slides}\label{sec:impl:noteslides}
%
% We define the sizes of slides in the notes. Somehow, we cannot get by with the same
% here. 
%
%    \begin{macrocode}
\newcounter{slide}
\newlength{\slidewidth}\setlength{\slidewidth}{12.8cm}
\newlength{\slideheight}\setlength{\slideheight}{9cm}
%    \end{macrocode}
% 
% \begin{environment}{note}
% The |note| environment is used to leave out text in the |slides| mode. It does not have
% a counterpart in OMDoc. So for course notes, we define the |note| environment to be a
% no-operation otherwise we declare the |note| environment as a comment via the |comment|
% package.
%    \begin{macrocode}
\ifnotes%
  \renewenvironment{note}{\ignorespaces}{}%
\else%
  \excludecomment{note}%
\fi%
%    \end{macrocode}
% \end{environment}
% 
%
% 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
% box register for the frames and a counter for the slides.
% 
%    \begin{macrocode}
\ifnotes
  \newlength{\slideframewidth}
  \setlength{\slideframewidth}{1.5pt}
%    \end{macrocode}
% 
% \begin{environment}{frame}
%   We first define the keys. 
%    \begin{macrocode}
  \addmetakey{frame}{label}
  \addmetakey[yes]{frame}{allowframebreaks}
  \addmetakey{frame}{allowdisplaybreaks}
  \addmetakey[yes]{frame}{fragile}
  \addmetakey[yes]{frame}{shrink}
  \addmetakey[yes]{frame}{squeeze}
%    \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. 
%    \begin{macrocode}
  \renewenvironment{frame}[1][]{%
    \metasetkeys{frame}{#1}%
    \stepcounter{slide}%
    \def\@currentlabel{\theslide}%
    \ifx\frame@label\@empty%
    \else%
      \label{\frame@label}%
    \fi%
%    \end{macrocode}
%   We redefine the |itemize| environment so that it looks more like the one in |beamer|
%   with |Jacobs| theme. 
%    \begin{macrocode}
    \def\itemize@level{outer}%
    \def\itemize@outer{outer}%
    \def\itemize@inner{inner}%
    \renewcommand\newpage{}%
    \renewcommand\metakeys@show@keys[2]{\marginnote{{\scriptsize ##2}}}%
    \renewenvironment{itemize}{%
      \ifx\itemize@level\itemize@outer%
        \def\itemize@label{$\rhd$}%
      \fi%
      \ifx\itemize@level\itemize@inner%
        \def\itemize@label{$\scriptstyle\rhd$}%
      \fi%
      \begin{list}%
      {\itemize@label}%
      {\setlength{\labelsep}{.3em}%
       \setlength{\labelwidth}{.5em}%
       \setlength{\leftmargin}{1.5em}%
      }%
      \edef\itemize@level{\itemize@inner}%
    }{%
      \end{list}%
    }%
%    \end{macrocode}
% We create the box with the |mdframed| environment from the equinymous package.
%    \begin{macrocode}
    \begin{mdframed}[linewidth=\slideframewidth,skipabove=1ex,skipbelow=1ex,userdefinedwidth=\slidewidth,align=center]\sf%
  }{%
    \medskip\miko@slidelabel\end{mdframed}%
  }%
%    \end{macrocode}
% \end{environment}
% 
% Now, we need to redefine the frametitle (we are still in course notes mode). 
% \begin{macro}{\frametitle}
%    \begin{macrocode}
  \renewcommand{\frametitle}[1]{{\Large\bf\sf\color{blue}{#1}}\medskip}%
\fi %ifnotes
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\frameimage}
%   We have to make sure that the width is overwritten, for that we check the
%   |\Gin@ewidth| macro from the |graphicx| package\ednote{MK@DG; we need to do that in
%   the LaTeXML binding as well!}
%    \begin{macrocode}
\newrobustcmd\frameimage[2][]{%
  \stepcounter{slide}%
  \ifframeimages%
    \def\Gin@ewidth{}\setkeys{Gin}{#1}%
    \ifnotes%
    \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%
  \fi%
}% ifframeimages
%    \end{macrocode}
% \end{macro}
% 
% \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%
  \setlength{\slidelogoheight}{.4cm}%
\else%
  \setlength{\slidelogoheight}{1cm}%
\fi%
\newsavebox{\slidelogo}%
\sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{jacobs-logo}}%
\newrobustcmd{\setslidelogo}[1]{%
  \sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{#1}}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setsource}
% |\source| stores the writer's name. By default it is {\it Michael Kohlhase} since he is the main user and designer of this package. |\setsource{|\meta{name}|}| can change the writer's name.
%    \begin{macrocode}
\def\source{Michael Kohlhase}% customize locally
\newrobustcmd{\setsource}[1]{\def\source{#1}}%
%    \end{macrocode}
% \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.
%    \begin{macrocode}
\def\copyrightnotice{\footnotesize\copyright:\hspace{.3ex}{\source}}%
\newsavebox{\cclogo}%
\sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{cc_somerights}}%
\newif\ifcchref\cchreffalse%
\AtBeginDocument{%
  \@ifpackageloaded{hyperref}{\cchreftrue}{\cchreffalse}
}%
\def\licensing{%
  \ifcchref%
    \href{http://creativecommons.org/licenses/by-sa/2.5/}{\usebox{\cclogo}}%
  \else%
    {\usebox{\cclogo}}%
  \fi%
}%
\newrobustcmd{\setlicensing}[2][]{%
  \def\@url{#1}%
  \sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{#2}}%
  \ifx\@url\@empty%
    \def\licensing{{\usebox{\cclogo}}}%
  \else%
    \def\licensing{%
	  \ifcchref%
	    \href{#1}{\usebox{\cclogo}}%
	  \else%
	    {\usebox{\cclogo}}%
	  \fi%
    }%
  \fi%
}%
%    \end{macrocode}
% \end{macro} 
%
% \begin{macro}{\slidelabel}
% Now, we set up the slide label for the |article| mode.\ednote{see that we can use the themes for the slides some day. This is all fake.}
%    \begin{macrocode}
\newrobustcmd\miko@slidelabel{%
  \vbox to \slidelogoheight{%
    \vss\hbox to \slidewidth%
    {\licensing\hfill\copyrightnotice\hfill\arabic{slide}\hfill\usebox{\slidelogo}}%
  }%
}%
%    \end{macrocode}
% \end{macro}
% 
% \subsection{Colors and Highlighting}\label{sec:impl:highlighting}
%
% 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}%
}%
%    \end{macrocode}
%
% We customize the |\defemph|, |\notemph|, and |\stDMemph| macros with colors for the use
% in the |statements| package. Furthermore we customize the |\@@lec| macro for the
% appearance of line end comments in |\lec|.
%
%    \begin{macrocode}
% \def\STpresent#1{\textcolor{blue}{#1}}
\def\defemph#1{{\textcolor{magenta}{#1}}}
\def\notemph#1{{\textcolor{magenta}{#1}}}
\def\stDMemph#1{{\textcolor{blue}{#1}}}
\def\@@lec#1{(\textcolor{green}{#1})}
%    \end{macrocode}
%
% I like to use the dangerous bend symbol for warnings, so we provide it here.
% \begin{macro}{\textwarning}
%   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}
\def\smalltextwarning{%
  \pgfuseimage{miko@small@dbend}%
  \xspace%
}%
\pgfdeclareimage[width=1.5em]{miko@dbend}{dangerous-bend}
\newrobustcmd\textwarning{%
  \raisebox{-.05cm}{\pgfuseimage{miko@dbend}}%
  \xspace%
}%
\pgfdeclareimage[width=2.5em]{miko@big@dbend}{dangerous-bend}%
\newrobustcmd\bigtextwarning{%
  \raisebox{-.05cm}{\pgfuseimage{miko@big@dbend}}%
  \xspace%
}%
%    \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}%
}%
\newrobustcmd\putat[2]{%
  \begin{picture}(0,0)\put(#1){#2}\end{picture}%
}%
%    \end{macrocode}
%
% \subsection{Sectioning}
%
% If the |sectocframes| option is set, then we make section frames. We first define a set
% of counters
%    \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
%    \end{macrocode}
%
% \subsection{Miscellaneous}
%
% 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{}
%    \begin{macrocode}
%
% We need to disregard the columns macros introduced by the |beamer| class
%    \begin{macrocode}
\ifnotes%
  \renewenvironment{columns}{%
    \par\noindent%
    \begin{minipage}%
    \slidewidth\centering\leavevmode%
  }{%
    \end{minipage}\par\noindent%
  }%
  \newsavebox\columnbox%
  \renewenvironment{column}[1]{%
    \begin{lrbox}{\columnbox}\begin{minipage}{#1}%
  }{%
    \end{minipage}\end{lrbox}\usebox\columnbox%
  }%
\fi%
%    \end{macrocode}
% Now, some things that are imported from the |pgf| and |beamer| packages: 
%    \begin{macrocode}
%    \end{macrocode}
% 
%
%    \begin{macrocode}
\ifproblems%
  \newenvironment{problems}{}{}%
\else%
  \excludecomment{problems}%
\fi%
%</package>
%    \end{macrocode}
% \Finale
\endinput
% \iffalse
%%% Local Variables: 
%%% mode: doctex
%%% TeX-master: t
%%% End: 
% \fi
% LocalWords:  mikoslides dtx beamer omdoc notheorems noamsthm beamerarticle sc Licences
% LocalWords:  graphicx slidelabel stex latexml 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
% LocalWords:  noproblems linkcolor bookmarksopen citecolor urlcolor colorlinks Tantau di
% LocalWords:  breaklinks plainpages pdfpagelabels srcref iffalse texttt atwin exfig dt
% LocalWords:  mytwocolumns twintoo atwintoo scsys sc hbox raisebox cnxml impl notesfile
% LocalWords:  scshape ttfamily cnxlatex mathml activemath fileversion newpage tpp99 dd
% LocalWords:  maketitle tableofcontents ednote compactitem showmeta showmeta beamerclass
% LocalWords:  sectocframes sectocframes textwarning textwarning compactenum eq omgroups
% LocalWords:  includegraphics tracissue printbibliography textsf langle textsf rangle
% LocalWords:  langle ltxml metakeys newif ifnotes notesfalse ifsectocframes rangle putat
% LocalWords:  sectocframesfalse ifproblems problemstrue notestrue marginnote frontmatter
% LocalWords:  problemsfalse sectocframestrue mdframed noxcolor newcounter ifx equinymous
% LocalWords:  Hfootnote usetheme tikzinput usepgflibrary usetikzlibrary rhd ignorespaces
% LocalWords:  tikzmark textcomp newlength slidewidth setlength slidewidth miko setkeys
% LocalWords:  slideheight slideheight renewenvironment excludecomment itenize Gin@ewidth
% LocalWords:  slideframewidth slideframewidth surroundwithmdframed addmetakey Gen@ewidth
% LocalWords:  allowframebreaks allowdisplaybreaks metasetkeys stepcounter sbox mpart baz
% LocalWords:  currentlabel theslide renewcommand scriptsize scriptstyle hspace mchapter
% LocalWords:  medskip linewidth skipabove skipbelow frametitle newenvironment msection
% LocalWords:  slidelogoheight newsavebox slidelogo slidelogo jacobs-logo vbox ifcase
% LocalWords:  Attribuition-ShareAlike copyrightnotice footnotesize cclogo vss minipage
% LocalWords:  cclogo somerights ifcchref cchreffalse ifpackageloaded usebox mycgraphics
% LocalWords:  cchreftrue usebox newcommand hfill hfill definecolor definecolor endinput
% LocalWords:  defemph notemph stDMemph STpresent textcolor textwarigrening ltx HorIacJuc
% LocalWords:  pgfdeclareimage dbend pgfuseimage xspace titleframe titlepage mycgraphics
% LocalWords:  titleframewith hline vspace ttitlejoint newbox boxwith boxwith msubsection
% 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:  frameimages frameimages ifframeimages frameimagesfalse frameimagestrue
%  LocalWords:  expandafter csname endcsname specializes customization flexiformal colors
%  LocalWords:  initialize Initialization defindex realized itemize newrobustcmd
%  LocalWords:  specialize centering itemizations setsource setlicensing