%% 
%% This is file `slidenotes.cls',
%% generated with the docstrip utility.
%% 
%% The original source files were:
%% 
%% slidenotes.dtx  (with options: `package')
%% 
%% Copyright (C) 1995 by Hans van der Meer. All rights reserved. 
%% For additional copyright information see further down in this file. 
%% 
%% This system is distributed in the hope that it will be useful, 
%% but WITHOUT ANY WARRANTY; without even the implied warranty of 
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
%% 
%% IMPORTANT NOTICE: 
%% 
%% Please do not request updates from us directly. Distribution is 
%% done through Mail-Servers and TeX organizations. 
%% 
%% You are not allowed to change this file. You are NOT 
%% ALLOWED to take money for the distribution or use of either this 
%% file or a changed version, except for a nominal charge for copying 
%% etc. 
%% File: slidenotes.dtx Copyright (C) 1993-1994 Hans van der Meer
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesClass{slidenotes}[1995/10/23 vs 3.12  Slides and notes]
  \ClassWarningNoLine{slidenotes}{%
    Options (first one is default):
      \MessageBreak
    notes,slides,minis:\space type of production;
      \MessageBreak
    landscape,portrait:\space slide orientation;
      \MessageBreak
    center,nocenter:\space vertical centering slide text;
      \MessageBreak
    oval,rect,rules,noframe:\space type of slideframe;
      \MessageBreak
    smallnotes:\space notes one notch smaller}
\newif\ifnotes
\newif\ifminis
\DeclareOption{notes}{\notestrue\minisfalse}
\DeclareOption{slides}{\notesfalse\minisfalse}
\DeclareOption{minis}{\ministrue\notesfalse}
\newif\iflandscape
\DeclareOption{landscape}{\landscapetrue}
\DeclareOption{portrait}{\landscapefalse}
\newcommand{\belowheadfil}{}
\DeclareOption{center}{\renewcommand{\belowheadfil}{\vfil}}
\DeclareOption{nocenter}{\renewcommand{\belowheadfil}{}}
\newif\ifsmallnotes
\DeclareOption{smallnotes}{\smallnotestrue}
\newcommand{\framevariant}{}
\DeclareOption{noframe}{\renewcommand{\framevariant}{n}}
\DeclareOption{rules}{\renewcommand{\framevariant}{r}}
\DeclareOption{rect}{\renewcommand{\framevariant}{f}}
\DeclareOption{oval}{\renewcommand{\framevariant}{o}}
\AtBeginDocument{\@ifundefined{obox}%
  {\IfFileExists{obox.sty}{\RequirePackage{obox}}%
    {\if\framevariant o
    \PackageWarningNoLine{slidenotes}{oval option disabled}%
    \renewcommand{\framevariant}{f}\fi}}%
  {}}
\newcommand{\ovalslideframesize}{\thicklines}
\providecommand\parentclass{report}
\ExecuteOptions{notes,landscape,oval,center}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\parentclass}}
\PassOptionsToClass{titlepage,a4paper}{\parentclass}
\ProcessOptions
\typeout{}
\if\framevariant n
  \ifnotes\renewcommand{\framevariant}{f}\fi
  \ifminis\renewcommand{\framevariant}{f}\fi
  \if\framevariant n \else
  \PackageWarningNoLine{slidenotes}{slide frames temporarily on}
  \fi
\fi
\typeout{slidenotes: slides in
  \iflandscape LANDSCAPE\else PORTRAIT\fi\space format}
\ifminis
  \typeout{slidenotes: SLIDE COLLECTION}
\else\ifnotes
  \typeout{slidenotes: SLIDES + NOTES}
\else
  \typeout{slidenotes: SLIDE PRODUCTION}
\fi\fi
\typeout{}
\iflandscape\ifnotes\else
  \PassOptionsToClass{landscape}{\parentclass}%
\fi\fi
\LoadClass{\parentclass}
\ifnotes\else\nofiles\fi
\newcommand{\slidemagnification}{\magstep4}
\newlength{\slidewidth}\setlength{\slidewidth}{85mm}
\newlength{\slideheight}\setlength{\slideheight}{120mm}
\newlength{\slideboxrule}\setlength{\slideboxrule}{.2mm}
\newlength{\slideboxsep}\setlength{\slideboxsep}{3mm}
\newlength{\slidenotesep}\setlength{\slidenotesep}{8mm}
\newlength{\slidetitlesep}\setlength{\slidetitlesep}{\medskipamount}
\newcounter{slidecounter}[chapter]
\newsavebox{\slidebox}
\newtoks\slidemarker
\newtoks\slidetitletext
\newtoks\everyslide
\newtoks\everynote
\let\old@makechapterhead=\@makechapterhead
\let\old@makeschapterhead=\@makeschapterhead
\renewcommand{\@makechapterhead}[1]{%
  \global\slidemarker={#1}\old@makechapterhead{#1}%
  \thispagestyle{empty}\newpage}
\renewcommand{\@makeschapterhead}[1]{%
  \global\slidemarker={#1}\old@makeschapterhead{#1}%
  \thispagestyle{empty}\newpage}
\newenvironment{slide}[1][]{%
  \global\slidetitletext{#1}%
  \ifminis\noindent\else\newpage\fi
  \stepcounter{slidecounter}%
  \slidefont
  \normalsize
  \@tempdima\slidewidth
  \advance\@tempdima-\tw@\slideboxrule
  \advance\@tempdima-\tw@\slideboxsep
  \@tempdimb\slideheight
  \advance\@tempdimb-\tw@\slideboxrule
  \advance\@tempdimb-\tw@\slideboxsep
  \begin{lrbox}{\slidebox}%
    \the\everyslide
    \begin{minipage}[][\@tempdimb][t]{\@tempdima}%
     \slidetitle{\the\slidetitletext}\belowheadfil
  }{\vfil\end{minipage}\end{lrbox}%
  \ifminis\noindent\else\begin{center}\fi
  \parbox{\slidewidth}{%
    \fboxsep\slideboxsep
    \fboxrule\slideboxrule
    \if\framevariant f
        \fbox{\usebox\slidebox}\fi
    \if\framevariant o
        \@tempdimb\dp\slidebox
        \advance\@tempdimb-\fboxsep
        \advance\@tempdimb-\fboxrule
        \obox[][\ovalslideframesize]{%
            \raisebox{\@tempdimb}{\usebox\slidebox}}\fi
    \if\framevariant n
        \advance\fboxsep\fboxrule \fboxrule\z@
        \fbox{\usebox\slidebox}\fi
    \if\framevariant r
        \rule{\slidewidth}{\fboxrule}\\[\fboxsep]
        \usebox{\slidebox}\\[\fboxsep]
        \rule{\slidewidth}{\fboxrule}\fi
    \\*[\smallskipamount]
    \hbox to\slidewidth{%
      \small\strut\the\slidemarker
      \hfil\Slidenumber~\theslidecounter}%
  }%
  \ifminis
    \ifodd\value{slidecounter}\hfill\else\par\vfill\fi
  \else\end{center}\fi
  \ifnotes\par\fi}
\newcommand{\@slidetitle}[2]{%
    \@ifemptyarg{#2}{}{\begin{center}#1#2\end{center}\vspace{\slidetitlesep}}}
\newcommand*{\slidetitle}{\@slidetitle{\slidetitlefont}}
\newcommand*{\slidesubtitle}{\@slidetitle{\slidesubtitlefont}}
\newlength{\marginwidth}
\setlength{\marginwidth}{3cm}
\newcommand*{\cue}[2][\cuefont]{%
  \marginpar{\hspace*{-\marginwidth}%
  \parbox{\marginparwidth}{\raggedright\sloppy#1#2}}}
\@mparswitchfalse
\newcommand{\thehead}{%
    \@title\ifdim\overfullrule>\z@---\@date\fi}
\renewcommand{\ps@headings}{%
  \let\@oddfoot\@empty
  \let\@evenfoot\@empty
  \renewcommand{\@oddhead}{%
    \vbox{%
    \hbox to\textwidth{\headerfont\thehead\hfil\upshape\thepage}%
    \vskip1.5\p@
    \hrule\@height.5\p@\@width\textwidth
    }}%
  \let\@evenhead\@oddhead}
  \addtolength{\headheight}{2pt}
\ifnotes\pagestyle{headings}\else\pagestyle{empty}\fi
\newcommand{\headerfont}{\rmfamily}
\newcommand{\slidefont}{\sffamily}
\newcommand{\notesfont}{\rmfamily}
\newcommand{\footnotefont}{\sffamily\mdseries\upshape}
\newcommand{\slidetitlefont}{\Large\bfseries}
\newcommand{\slidesubtitlefont}{\normalsize\bfseries}
\newcommand{\cuefont}{\sffamily\bfseries}
\newcommand\onlanguage[4]{% {current}{existing}{not existing}
  \expandafter\ifx\csname l@#1\endcsname\relax
  #4\else
    \ifnum\csname l@#1\endcsname=\language #2%
    \else#3\fi
  \fi}
\newcommand{\Collection}{LECTURE NOTES}%
\newcommand{\Slidenumber}{\#}%
\newcommand{\Slide}{Slide}%
\newcommand{\englishSlideNames}{%
  \renewcommand{\Collection}{LECTURE NOTES}%
  \renewcommand{\Slidenumber}{\#}%
  \renewcommand{\Slide}{Slide}%
  }
\AtBeginDocument{\onlanguage{english}{\englishSlideNames}{}{}}
\AtBeginDocument{\onlanguage{american}{\englishSlideNames}{}{}}
\newcommand{\dutchSlideNames}{%
  \renewcommand{\Collection}{COLLEGE AANTEKENINGEN}%
  \renewcommand{\Slidenumber}{Nr.}%
  \renewcommand{\Slide}{Slide}%
  }
\AtBeginDocument{\onlanguage{dutch}{\dutchSlideNames}{}{}}
\providecommand*{\@ifemptyarg}[1]{% {absence}{presence}
  \ifx\@empty#1\@empty
  \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
\newcommand{\Mainfolder}[1]{\def\mainfolder{#1}}
\newcommand{\Commonfolder}[1]{\def\commonfolder{#1}}
\newcommand{\Figuresfolder}[1]{\def\figuresfolder{#1}}
\Mainfolder{\@currdir}
\Commonfolder{\@currdir}
\Figuresfolder{\@currdir}
\InputIfFileExists{slidenotes.cfg}{}{}
\iflandscape\ifnotes
  \setlength{\@tempdima}{\paperheight}
  \setlength{\paperheight}{\paperwidth}
  \setlength{\paperwidth}{\@tempdima}
\fi\fi
\iflandscape
  \setlength{\@tempdima}{\slideheight}
  \setlength{\slideheight}{\slidewidth}
  \setlength{\slidewidth}{\@tempdima}
\fi
\ifx\undefined\ThrowAwayComment
\newcommand\ThrowAwayComment[1]{\begingroup
    \def\CurrentComment{#1}%
    \@sanitize \@makeother\{ \@makeother\}
    \@makeother\^^L% and whatever other special cases
    \endlinechar`\^^M\@makeother\^^M\xComment}
{%
    \catcode`\^^M=12 \endlinechar=-1 %
    \gdef\xComment#1^^M{\def\test{#1}%
    \expandafter\ifx\csname PlainEnd\CurrentComment Test\endcsname\test
    \let\next\endgroup
    \else
    \expandafter\ifx\csname LaLaEnd\CurrentComment Test\endcsname\test
    \edef\next{\endgroup\noexpand\end{\CurrentComment}}%
    \else \let\next\xComment\fi \fi \next}%
}
\def\includecomment
 #1{\@namedef{#1}{}\@namedef{end#1}{}}%
\def\excludecomment
 #1{\@namedef{#1}{\ThrowAwayComment{#1}}%
    {\escapechar=\m@ne\relax
     \expandafter\xdef\csname PlainEnd#1Test\endcsname
        {\string\\end#1}%
     \expandafter\xdef\csname LaLaEnd#1Test\endcsname
        {\string\\end\string\{#1\string\}}%
    }}
\fi
\ifnotes
\newenvironment{note}[1][]{%
  \notesfont
  \ifsmallnotes
    \let\Huge\huge
    \let\huge\LARGE
    \let\LARGE\Large
    \let\Large\large
    \let\large\normalsize
    \let\normalsize\small
    \let\small\footnootsize
    \let\footnotesize\scriptsize
    \let\scriptsize\tiny
  \fi
  \normalsize
  \the\everynote
  \@ifemptyarg{#1}{}{\slidetitletext{#1}}%
  \addcontentsline{toc}{section}%
    {\Slide\,\theslidecounter:\space\the\slidetitletext}%
  \addvspace{\slidenotesep}%
  \list{}{\leftmargin=\z@ \rightmargin=\marginwidth}\item[]
  }{\endlist\vfill\newpage}
\else
\excludecomment{note}
\fi
\ifnotes\else\ifminis\else
  \renewcommand{\maketitle}{}
  \renewcommand{\@makechapterhead}[1]{\global\slidemarker={#1}%
    \thispagestyle{empty}}
  \renewcommand{\@makeschapterhead}[1]{\global\slidemarker={#1}%
    \thispagestyle{empty}}
\fi\fi
\ifnotes\else\ifminis\else
  \mag\slidemagnification\relax
  \setlength{\hoffset}{-25.4mm}
    \divide\hoffset by\slidemagnification
    \multiply\hoffset by\@m
  \setlength{\textwidth}{\paperwidth}
    \divide\textwidth by\slidemagnification
    \multiply\textwidth by\@m
  \setlength{\oddsidemargin}{0pt}
  \setlength{\evensidemargin}{\oddsidemargin}
  \setlength{\voffset}{-25.4mm}
    \divide\voffset by\slidemagnification
    \multiply\voffset by\@m
  \setlength{\headheight}{0pt}
  \setlength{\headsep}{0pt}
  \setlength{\textheight}{\slideheight}
    \addtolength{\textheight}{10mm}
    \divide\textheight by\@m
    \multiply\textheight by\slidemagnification
\fi\fi
\ifnotes\else\ifminis
  \dimen@=2\slidewidth
  \advance\dimen@ 5mm
  \ifdim\dimen@>\textwidth \setlength{\textwidth}{\dimen@}\fi
  \setlength{\headheight}{0pt}
  \setlength{\headsep}{0pt}
  \setlength{\footskip}{0pt}
  \dimen@=2\slideheight
    \setbox0=\vbox{\hbox{\slidefont\small\strut}\smallskip\null}
    \advance\dimen@ by 2\ht0
  \ifdim\dimen@>\textheight
    \setlength{\textheight}{\dimen@}
    \dimen@\paperheight
    \advance\dimen@-\textheight
    \addtolength{\topmargin}{-.5\dimen@}
  \fi
  \setlength{\oddsidemargin}{0pt}
  \setlength{\evensidemargin}{\oddsidemargin}
\fi\fi
\ifnotes
  \setlength{\marginparsep}{5mm}
  \addtolength{\marginparwidth}{\marginwidth}
\fi
\notesfont
\endinput
%% 
%% End of file `slidenotes.cls'.
