% \iffalse meta-comment
%
% Copyright (C) 1989--1993 by Frank Mittelbach, Rainer Schoepf.
% All rights reserved.
% 
% This file is part of the NFSS2 (New Font Selection Scheme) package.
% 
%  This package 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:
% 
% For error reports in case of UNCHANGED versions see readme files.
% 
% 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 may however copy
% this file to a file with a different name and then change the copy
% if you obey the restrictions on file changes described in
% readme.mz.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in readme.mz8.
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  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.
% \fi
\def\fileversion{v2.0c}
\def\filedate{93/05/13}
\def\docdate {93/05/17}

% \CheckSum{2527}
%
% \iffalse
% Copyright (C) 1993 Frank Mittelbach,
% all rights reserved.
% \fi
% 
%
% \title{Producing slides with with NFSS2}
% \author{Frank Mittelbach}
% \date{\filedate}
%
% \MakeShortVerb\|
% \setcounter{StandardModuleDepth}{1}
%
% \def\dst{{\csname mediumseries\endcsname\sc docstrip}}
%
% \maketitle
%
% \section{Introduction}
%
% With NFSS2 it is now no longer necessary to maintain a special
% format for producing overhead slides. Instead the standard format
% may be used and internally only different font definition files come
% into play.
%
% \section{Usage}
%
% For producing slides you have to use |nfslides| as the major
% document style. This style is very similar to the |slides| style
% that came with \SliTeX{}, in fact it is basically a copy changed to
% work under NFSS2.\footnote{Therefore you should compare both styles
% in case you have local slide styles to see what you have to change
% in order to use them with NFSS2.} Thus you have to say something
% like
% \begin{verbatim}
%   \documentstyle[...]{nfslides}
% \end{verbatim}
% and process this with NFSS/\LaTeX .
%
% \section{Fonts} 
%
% Note, that that with NFSS you can easily produce slides with special
% fonts just by calling an appropriate style file (like |nftimes|) in
% your |\documentstyle| command. This works, for example, with all
% fonts that are defined to be scalable (eg PostScript fonts) since
% they can be used at any size by NFSS.
%
% However, minor styles like |nfpandor| won't work because the standard
% |.fd| files shipped with NFSS only contain small sizes. You can, of
% course, produce additional sizes and change the |.fd| files
% accordingly so that they would be useable for slides as well.
%
% \section{Invisible text and color separation}
%
% In the original \SliTeX{} it was possible to produce invisible text
% using the |\invisible| command, so that one was able to put several
% slides on top of each other (with each slides showing additional
% details, etc.). It was also possible to produce `color' slides. This
% was done by producing individual slides one for each color and
% placing them on top of each other.
%
% These features are retained in the NFSS2 implementation but there
% are a few restrictions. Invisible fonts are implemented as special
% shapes where the shape names are build by prefixing the normal shape
% name with an uppercase |I|. For example, the `normal invisible
% shape' would be |In|. When \LaTeX{} is requested to typeset
% invisible it will thus change the current shape attribute in this
% manner. To make this work it is necessary that the resulting font
% shape group is defined. If not, the normal font substitution
% mechanism of NFSS2 will change the attribute until it finds a usable
% font shape group with the result that the text may become visible.
%
% As long as you use the standard fonts for slides this is not a
% problem because all the visible font shape groups have invisible
% counterparts. However, if you decide on using special fonts, e.g.,
% PostScript fonts, your |\DeclareFontShape| settings may not contain
% invisible font shape groups and thus you may be unable to use these
% features without adding additional |\DeclareFontShape| commands to
% your |.fd| files or the preamble of your document.
%
% \StopEventually
%
% \section{The Implementation}
%
% \begin{quote}
% {\bf Warning:} The implementation is still very experimental and may
% change internally very much. It currently basically consists of a
% slightly modified copy of |slides.sty| (which then forms
% |nfslides.sty|) followed by a slightly changed copy of |slitex.tex|
% (which forms |nfslides.tex|). Documentation is practically
% non-existing.  Everybody is invited to change this.
% \end{quote}
%
% The code is divided into two parts, we first implement the style
% related functions and declarations and then define lowlevel stuff
% that is necessary within every style. By placing such commands into
% a separate file it will be possible to share it with other slide
% styles.
%
% \subsection{The style code}
%
% We start by writing to the VDU and the transcript file.
%    \begin{macrocode}
%<*style>
\typeout{Style Option: `nfslides
  \fileversion\space\space <\filedate> (FMi)}
\typeout{English Documentation
  \@spaces\@spaces\space <\docdate> (FMi)}
\typeout{^^J********* experimental ***********^^J}
%    \end{macrocode}
%    We have to make sure that it runs under NFSS release 2, so we
%    check for appropriate command names.
%    \begin{macrocode}
\@ifundefined{DeclareFontShape}
     {\@ifundefined{selectfont}
        {\@latexerr{The `nfslides' style option can only be used
                    with the new^^Jfont selection scheme}\@eha}
        {\@latexerr{The `nfslides' style option can only be used
                    with the new^^Jfont selection scheme *release 2*}
                   {Your format contains NFSS release 1, but this style
                    option was^^Jdeveloped for release 2.}
        }
      \endinput}
     {}
%    \end{macrocode}
%
%    
%    \begin{macrocode}
\input nfslides.tex
\input sfontdef.tex

% FMi what happened to the next command?

\def\@notinslitex{\errmessage{This command not allowed in SLiTeX.}}

%page layout
\@twosidefalse
\topmargin -10pt
\oddsidemargin 17pt
\evensidemargin 17pt

\def\ds@twoside{\@latexerr{No 'twoside' layout for slides}\@eha}

\headheight 14pt
\headsep 15pt
\footheight 14pt
\footskip 25pt
\textheight 600pt
\textwidth 460pt
\columnwidth \textwidth 
\columnsep 10pt
\columnseprule \z@

%footnotes

\skip\footins 10pt plus 2pt minus 4pt  % Space between last line of text
                                       % and top of first footnote.

% \skip\@mpfootins : plays same role for footnotes in a minipage as
%                    \skip\footins does for ordinary footnotes

\skip\@mpfootins = \skip\footins

\footnotesep 20pt     % Height of strut placed at the beginning of every
                      % footnote.




%floats and marginpar
\marginparwidth 20pt 
\marginparsep 5pt
\marginparpush 5pt
%    \end{macrocode}
%    
%
%
% \subsection{Fonts}
%
%    \begin{macrocode}
% FMi:


\def\rmdefault{lcmss}        % no roman
\def\sfdefault{lcmss}
\def\ttdefault{lcmtt}
\def\itdefault{sl}
\def\sldefault{sl}
\def\bfdefault{bx}
%    \end{macrocode}
%    
%  \begin{macro}{\@normalsize}
%    |\@normalize| is not used by the new \SliTeX{} style but is
%    called in |\document| therefore we define it.
%    \begin{macrocode}
\def\@normalsize{\normalsize}
%    \end{macrocode}
%  \end{macro}
%
%
%  \begin{macro}{\set@font@size@parms}
%    This routine is used in \SliTeX{} to interface font size setting
%    it is modeled after the settings I found in {\tt slides.sty}, so
%    it probably needs an update. But any style is free to redefine
%    it, as it is used only as an abbreviation.
%    \begin{macrocode}
\def\set@font@size@parms#1#2#3#4#5#6#7#8#9{%
%    \end{macrocode}
%    The curious use of \@setsize allows to use {\tt nfoldfnt} and
%    {\tt nfnewfnt} options together with \SliTeX.  Of course this has
%    to change when the LaTeX styles change to support the new font
%    selection directly.
%    \begin{macrocode}
   \@setsize#1{#3}\@empty{#2}%
   \lineskip 2pt%
   \parskip #4\relax
   \abovedisplayskip #5\relax
   \belowdisplayskip #6\relax
   \abovedisplayshortskip #7\relax
   \belowdisplayshortskip\abovedisplayshortskip
%    \end{macrocode}
%    I don't see a reason why the |\strutbox| has a dim different from
%    |\baselineskip| but we will leave it for the moment
%    \begin{macrocode}
  \setbox\strutbox=\hbox{\vrule \@height#8\p@\@depth#9\p@\@width\z@}%
  \baselineskip\baselinestretch\baselineskip
  \normalbaselineskip\baselineskip}
%    \end{macrocode}
%  \end{macro}
%
% Defining sizes used below:
%    \begin{macrocode}
\def\ifourteenpt{13.82}
\def\iseventeenpt{16.59}
\def\itwentypt{19.91}
\def\itwentyfourpt{23.89}
\def\itwentyninept{28.66}
\def\ithirtyfourpt{34.4}
\def\ifortyonept{41.28}
%    \end{macrocode}
%    Setting size relations for math scripts:
%    \begin{macrocode}
\define@mathsizes{13.82}{10}{7}
\define@mathsizes{16.59}{12}{7}
\define@mathsizes{19.91}{13.82}{10}
\define@mathsizes{23.89}{19.91}{16.59}
\define@mathsizes{28.66}{23.89}{19.91}
\define@mathsizes{34.4}{28.66}{23.89}
\define@mathsizes{41.28}{34.4}{28.66}
%    \end{macrocode}
%    
%
% \subsection{Providing math {\em versions}}
%
%  \LaTeX{} provides two {\em versions\/}. We call them
%  {\sf normal} and {\sf bold}, respectively.
%  \SliTeX{} does not have a {\sf bold} version. But we treat the
%  invisible characters as a version. The only thing we have to take 
%  care of is to ensure that we have exactly the same fonts in both
%  versions available. 
%
%    \begin{macrocode}
\DeclareMathVersion{invisible}
%    \end{macrocode}
%
% Now we define the basic {\em math groups\/} used by \LaTeX{}.  Later
% on, in style files some other {\em math groups}, e.g., the AMS
% symbol fonts, will be defined.
%
%  As a default I used serif fonts for mathgroup 0 to get things like
% \verb+\log+ look right.
%    \begin{macrocode}
\SetSymbolFont{operators}{normal}
                 {OT1}{lcmss}{m}{n}

\SetSymbolFont{letters}{normal}
                 {OML}{lcmm}{m}{it}
\SetSymbolFont{symbols}{normal}
                 {OMS}{lcmsy}{m}{n}
\SetSymbolFont{largesymbols}{normal}
                 {OMX}{lcmex}{m}{n}

\SetSymbolFont{operators}{invisible}
                 {OT1}{lcmss}{m}{In}
\SetSymbolFont{letters}{invisible}
                 {OML}{lcmm}{m}{Iit}
\SetSymbolFont{symbols}{invisible}
                 {OMS}{lcmsy}{m}{In}
\SetSymbolFont{largesymbols}{invisible}
                  {OMX}{lcmex}{m}{In}


\def\@mainsize{\visible\tiny}  
\parindent 0pt
\def\baselinestretch{1}
%    \end{macrocode}
%
%
%  In the next lines of code I changed so much that you perhaps
%    compare it directly with the original |slides.sty|.
%
%  Since the number of parameters to set are very large it seems
%    reasonable to set up one command |\set@font@size@parms| which will
%    do the work for us.
%
% Syntax:
% \begin{quote}
%     |\set@font@size@parms|
%     |   |\meta{name of calling command} \\
%     |   |\meta{size} \\
%     |   |\meta{baselineskip}  \\
%     |   |\meta{parskip} \\
%     |   |\meta{abovedisplayskip}  \\
%     |   |\meta{belowdisplayskip}  \\
%     |   |\meta{abovedisplayshortskip}
%            (also for belowdisplayshortskip)\\
%     |   |\meta{strut ht} \meta{strut dp}   (without pt)\\
% \end{quote}
%
% No provision for different belowdisplayskip so far
%
% For NFSS1 a similar style existed which did run both with a
% \SliTeX{} with old font selection or with NFSS1. But when no
% separate format is made this doesn't make much sense.
% So the following note is history and would only be true if all NFSS
% stuff would be removed from the file and placed into the format.
% \begin{quote}\small
% Note: To interface the old {\tt sfonts.tex} the \meta{size} must be
%    hidden in commands denoting the size by its name prefixed with
%    `i', i.e.\ 20pt size is called |\itwentypt| at this point. The
%    NFSS interface will define those sizes to expand to the internal
%    size, e.g.\ 20 but for the old sfonts the command name, e.g.
%    |\itwentypt|, will be used to construct the name |\twentypt| etc.
%
%    This is a crude interface to the old {\tt sfonts.tex}. It will be
%    a bit slower than the old one because it must define |\@tiny|
%    etc.\ every time a size changes.
% \end{quote}
%
% If styles are set up that are only for use with NFSS then the second
% argument may be an ordinary font size!
%    \begin{macrocode}
\def\huge{\set@font@size@parms\huge
            \ifortyonept
            {60pt plus 10pt minus 6pt}%
            {60pt plus 30pt minus 6pt}%
            {24pt plus 10pt minus 6pt}%
            \abovedisplayskip 
            {12pt plus 8pt}%
            {27}{11}}
%    \end{macrocode}
%    
% Actually copying the code above would be better because this would
% correct the error message. Maybe one should remove the first
% argument of |\set@font@size@parms|.
%
%    \begin{macrocode}
\let\Huge\huge

\def\LARGE{\set@font@size@parms\LARGE
            \ithirtyfourpt
            {52pt plus 10pt minus 6pt}%
            {52pt plus 30pt minus 6pt}%
            {24pt plus 10pt minus 6pt}%
            \abovedisplayskip 
            {12pt plus 8pt}%
            {27}{11}}




\def\Large{\set@font@size@parms\Large
            \itwentyninept
            {48pt plus 10pt minus 6pt}%
            {48pt plus 30pt minus 6pt}%
            {24pt plus 10pt minus 6pt}%
            \abovedisplayskip 
            {12pt plus 8pt}%
            {27}{11}}



\def\large{\set@font@size@parms\large
            \itwentyfourpt
            {42pt plus 8pt minus 5pt}%
            {40pt plus 20pt minus 4pt}%
            {20pt plus 8pt minus 3pt}%
            \abovedisplayskip 
            {10pt plus 5pt}%
            {20}{8.5}}


\def\normalsize{\set@font@size@parms\normalsize
%            {20}{30pt plus 3pt minus 3pt}%  made a bit shorter
            \itwentypt
            {28pt plus 3pt minus 4pt}%
            {30pt plus 18pt minus 9pt}%
            {15pt plus 3pt minus 3pt}%
            {10pt plus 3pt minus 3pt}%
            {10pt plus 3pt}
            {17}{7}}


\def\small{\set@font@size@parms\small
            \iseventeenpt
            {19pt plus 3pt minus 1pt}%
            {15pt plus 15pt minus 7pt}%
            {12pt plus 3pt minus 3pt}%
            {9pt plus 3pt minus 3pt}%
            {6pt plus 3pt}%
            {13.5}{5.6}}


\let\footnotesize=\small

\let\scriptsize=\small


\def\tiny{\set@font@size@parms\tiny
            \ifourteenpt
            {16pt plus 2pt minus 1pt}%
            {14pt plus 3pt minus 10pt}%
            \abovedisplayskip
            {8pt plus 3pt minus 5pt}%
            {6pt plus 3pt}%
            {10}{4}}

%    \end{macrocode}
%
% \subsection{ Page styles}
%
%  The page styles of slides is determined by the 'slide' page style,
% the slide environment executing a |\thispagestyle{slide}| command.
% The page styles of overlays and notes are similarly determined by
% 'overlay' and 'note' page styles.  The command standard 'headings',
% 'plain' and 'empty' page styles work by redefining the 'slide',
% 'overlay', and 'note' styles.
%
%    
%    \begin{macrocode}

\def\ps@headings{%
\def\ps@slide{\def\@oddfoot{\@mainsize +\hfil\hbox to3em{\theslide
                                                          \hss}}%
 \def\@oddhead{\@mainsize +\hfil +}%
 \def\@evenfoot{\@mainsize +\hfil\hbox to3em{\theslide\hss}}%
 \def\@evenhead{\@mainsize +\hfil +}}
\def\ps@overlay{\def\@oddfoot{\@mainsize +\hfil\hbox to3em{\theoverlay
                                                           \hss}}%
 \def\@oddhead{\@mainsize +\hfil +}%
 \def\@evenfoot{\@mainsize +\hfil\hbox to3em{\theoverlay\hss}}%
 \def\@evenhead{\@mainsize +\hfil +}}
\def\ps@note{\def\@oddfoot{\@mainsize \hbox{}\hfil\thenote}%
 \def\@oddhead{}%
 \def\@evenfoot{\@mainsize \hbox{}\hfil\thenote}%
 \def\@evenhead{}}}

\def\ps@plain{\def\ps@slide{%
 \def\@oddfoot{\@mainsize \mbox{}\hfil\hbox to 3em{\theslide\hss}}%
 \def\@oddhead{}%
 \def\@evenfoot{\@mainsize \mbox{}\hfil\hbox to 3em{\theslide\hss}}%
 \def\@evenhead{}}
\def\ps@overlay{\def\@oddfoot{\@mainsize 
   \mbox{}\hfil\hbox to 3em{\theoverlay\hss}}%
 \def\@oddhead{}%
 \def\@evenfoot{\@mainsize \mbox{}\hfil\hbox to 3em{\theoverlay\hss}}%
 \def\@evenhead{}}
\def\ps@note{\def\@oddfoot{\@mainsize \hbox{}\hfil\thenote}%
 \def\@oddhead{}%
 \def\@evenfoot{\@mainsize \hbox{}\hfil\thenote}%
 \def\@evenhead{}}}

\def\ps@empty{%
\def\ps@slide{\def\@oddhead{}\def\@oddfoot{}%
\def\@evenhead{}\def\@evenfoot{}}%
\def\ps@overlay{\def\@oddhead{}\def\@oddfoot{}%
\def\@evenhead{}\def\@evenfoot{}}%
\def\ps@note{\def\@oddhead{}\def\@oddfoot{}%
\def\@evenhead{}\def\@evenfoot{}}}

% Default definition the 'slide', 'overlay', and 'note' page styles.
\ps@headings

% Set ordinary page style to 'empty'
\let\@oddhead\@empty\let\@oddfoot\@empty%
\let\@evenhead\@empty\let\@evenfoot\@empty



%    \end{macrocode} 
% The |\@options| command causes the execution of every command
% |\ds@FOO| which is defined and for which the user typed the |FOO|
% option in his |\documentstyle| command.  For every option |BAR| he
% typed for which |\ds@BAR| is not defined, the file |BAR.sty| will be
% read after the present (main) |.STY| file is executed.
%    
%    \begin{macrocode}

\@options
%    \end{macrocode}
%    
%  \subsection{Environments}
%
% titlepage
%
%    \begin{macrocode}
\def\titlepage{\newpage\thispagestyle{empty}\c@page\z@}
\def\endtitlepage{\newpage}

% Default values for list environment.

\leftmargini 38pt
\leftmarginii 30pt
\leftmarginiii 20pt
\leftmarginiv 15pt
\leftmarginv 15pt
\leftmarginvi 10pt

\def\@listi{\parsep .5\parskip
\topsep \parsep
\itemsep\parskip
\partopsep \z@}

\def\@listii{\leftmargin\leftmarginii
   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
   \parsep .5\parskip
   \topsep \parsep
   \itemsep\parskip}

\def\@listiii{\leftmargin\leftmarginiii
    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep}

\def\@listiv{\leftmargin\leftmarginiv
     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}

\def\@listv{\leftmargin\leftmarginv
     \labelwidth\leftmarginv\advance\labelwidth-\labelsep}

\def\@listvi{\leftmargin\leftmarginvi
     \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}



\labelsep 10pt
\tabbingsep \labelsep
\leftmargin\leftmargini
\labelwidth\leftmargini\advance\labelwidth-\labelsep


%    \end{macrocode}
%    \subsubsection{Paragraph-formatting environments}
%
%    VERSE
%   |\\| ends line
%   Line continuations indented further.
%   Blank line makes new paragraph with |\parskip| space
%    \begin{macrocode}

%
\def\verse{\let\\=\@centercr \list{}{\itemsep\z@ 
  \itemindent -15\p@\listparindent \itemindent 
  \rightmargin\leftmargin\advance\leftmargin 15\p@}\item[]}
\let\endverse\endlist

% QUOTATION
%   Fills lines
%   Indents paragraph
%   
\def\quotation{\list{}{\listparindent 20\p@
    \itemindent\listparindent
    \rightmargin\leftmargin}\item[]}
\let\endquotation=\endlist

% QUOTE -- same as quotation except no paragraph indentation,
\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

%    \end{macrocode}
%    \subsubsection{List-making environments}
%
% DESCRIPTION 
%
%  To change the formatting of the label, you must redefine 
%  |\descriptionlabel|.  
%    \begin{macrocode}
\def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
       \let\makelabel\descriptionlabel}}

\let\enddescription\endlist



% ENUMERATE
%  Enumeration is done with four counters: enumi, enumii, enumiii
%  and enumiv, where enumN controls the numbering of the Nth level
%  enumeration.  The label is generated by the commands \labelenumi 
%  ... \labelenumiv.  The expansion of \p@enumN\theenumN defines the 
%  output of a \ref command.  

\def\labelenumi{\arabic{enumi}.}    
\def\theenumi{\arabic{enumi}}     

\def\labelenumii{(\alph{enumii})}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}

\def\labelenumiii{\roman{enumiii}.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}

\def\labelenumiv{\Alph{enumiv}.}
\def\theenumiv{\Alph{enumiv}}     
\def\p@enumiv{\p@enumiii\theenumiii}

% ITEMIZE
% Itemization is controlled by four commands: \labelitemi, \labelitemii,
% \labelitemiii, and \labelitemiv, which define the labels of the
% various itemization levels.

\def\labelitemi{$\m@th\bullet$}
\def\labelitemii{\bf --}
\def\labelitemiii{$\m@th\ast$}
\def\labelitemiv{$\m@th\cdot$}

% Theorem environments 
% \@begintheorem ... \@endtheorem are the commands executed at the
% beginning and end of a (user-defined) theorem-like environment.
% Except \@opargbegintheorem is executed when an optional argument is
% given.  Cf. LATEX.TEX.
%
% \def\@begintheorem#1#2{\it \trivlist
%       \item[\hskip \labelsep{\bf #1\ #2}]}
% \def\@opargbegintheorem#1#2#3{\it \trivlist
%       \item[\hskip \labelsep{\bf #1\ #2\ (#3)}]}
% \def\@endtheorem{\endtrivlist}

% Array and tabular environment parameters
\arraycolsep 8pt
\tabcolsep 10pt
\arrayrulewidth .6pt
\doublerulesep 3pt

% \fbox parameters
\fboxsep = 5pt
\fboxrule = .6pt

% Date
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}

%    \end{macrocode}
%    
% \subsection{Footnotes}
%
% Following makes footnotes numbered *, dagger, etc., with numbering
% begun again on every slide, note, or overlay.
%
%    \begin{macrocode}

\def\thefootnote{\fnsymbol{footnote}}
\@addtoreset{footnote}{slide}
\@addtoreset{footnote}{overlay}
\@addtoreset{footnote}{note}

% \footnoterule is a macro to draw the rule separating the footnotes
% from the text.  It should take zero vertical space, so it needs a
% negative skip to compensate for any positive space taken by the
% rule.  (See PLAIN.TEX.)  The resulting rule will appear on all color
% layers, so it's best not to draw a rule.

\let\footnoterule=\relax

%   \@makefntext{NOTE} :
%        Must produce the actual footnote, using \@thefnmark as the
%        mark of the footnote and NOTE as the text.  It is called when
%        effectively inside a \parbox of width \columnwidth (i.e., with
%        \hsize = \columnwidth).  The following macro indents all
%        lines of the footnote by 10pt, and indents the first line of a
%        new paragraph by 1em.  To change these dimensions, just
%        substitute the desired value for '10pt' [in both places] or
%        '1em'. The mark is flushright against the footnote. 
%
%        It is much easier to write a macro in which the footnote text
%        is set like an ordinary text paragraph, with no indentation
%        except on the first line of a paragraph, and the first line of
%        the footnote.  In that case, all the macro must do is set
%        \parindent to the appropriate value for succeeding paragraphs
%        and put the proper indentation before mark.

\long\def\@makefntext#1{\noindent % Macro to make the text of a footnote
    \hangindent 10\p@\hbox 
    to10\p@{\hss $\m@th^{\@thefnmark}$}#1}

% \@makefnmark : A macro to generate the footnote marker that goes
%                in the text.  




\def\theequation{\@arabic{\c@equation}}

% The following stuff isn't used, but needs to be defined.
\def\@figsep{7\p@}
\def\@textfigsep{5\p@}
\def\@captionskip{6\p@}
\def\topfraction{.7}
\def\bottomfraction{.3}
\def\textfraction{.2}
\def\floatpagefraction{.5}
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}
%    \end{macrocode}
%    
%
%
% \subsection{Initialisation}
%
%
% Default initializations
%
%    \begin{macrocode}
\pagenumbering{arabic}
\onecolumn
%</style>
%    \end{macrocode}
%
% \subsection{Basic code}
% 
% The code below is basically a copy of |slitex.tex| with some
% changes.
%    \begin{macrocode}
% Global changes so far:
%
% FMi 90/06/01  \gdef\@slidesw ... replaced by a \newifG which is
%               similar to \newif but uses \global inside.
% 
%<*cmd>
%    
%      **********************************************
%      *          HACKS FOR SLIDE MACROS            *
%      **********************************************
%
%    \end{macrocode}
%    \begin{macrocode}
\message{hacks,}


\outer\def\newifG#1{\count@\escapechar \escapechar\m@ne
  \expandafter\expandafter\expandafter
   \edef\@ifG#1{true}{\global\let\noexpand#1\noexpand\iftrue}%
  \expandafter\expandafter\expandafter
   \edef\@ifG#1{false}{\global\let\noexpand#1\noexpand\iffalse}%
  \@ifG#1{false}\escapechar\count@} % the condition starts out false
\def\@ifG#1#2{\csname\expandafter\ifG@\string#1#2\endcsname}
{\uccode`1=`i \uccode`2=`f \uccode`3=`G \uppercase{\gdef\ifG@123{G}}}
 % `ifG' is required




\def\@gobbletoend#1{\def\@argend{#1}\@ggobtoend}

\long\def\@ggobtoend#1\end#2{\fi\def\@tempa{#2}%
\ifx\@tempa\@argend\else\@ggobtoend\fi}

% FMi: I don't see any reason for this command since \fi is hidden
%      anyway in the replacement text 
% \def\@xfi{\fi}

%    \end{macrocode}
%    
%    \begin{macrocode}
 \message{slides,}
%      **********************************************
%      *               SLIDE  MACROS                *
%      **********************************************
%
% Switches:
% @bw      : true if making black and white slides
% @visible : true if visible output to be produced.
% @makingslides : true if executing \blackandwhite or \colorslides

\newif\if@bw
\newif\if@visible
\newif\if@onlyslidesw \@onlyslideswfalse
\newif\if@onlynotesw  \@onlynoteswfalse
\newif\if@makingslides

% FMi \newifG replaces \gdef\@slidesw{T} stuff

\newifG\ifG@slidesw

% Counters
%  slide   = slide number
%  overlay = overlay number for a slide
%  note    = note number for a slide

\countdef\c@slide=0 \c@slide=0
\def\cl@slide{}
\countdef\c@overlay=1 \c@overlay=0
\def\cl@overlay{}
\countdef\c@note=2 \c@note=0
\def\cl@note{}


\@addtoreset{overlay}{slide}
\@addtoreset{note}{slide}

% Redefine page counter to some other number.
% The page counter will always be zero except when putting out an
% extra page for a slide, note or overlay.
%
\@definecounter{page}
\@addtoreset{page}{slide}
\@addtoreset{page}{note}
\@addtoreset{page}{overlay}


\def\theslide{\@arabic\c@slide}
\def\theoverlay{\theslide-\@alph\c@overlay}
\def\thenote{\theslide-\@arabic\c@note}

% \@setlimits \LIST \LOW \HIGH
%
%    Assumes that \LIST = RANGE1,RANGE2,...,RANGEn  (n>0)
%    Where RANGEi = j or j-k.
%
%    Then \@setlimits  globally sets
%        (i) \LIST := RANGE2, ... , RANGEn
%       (ii) \LOW  := p
%      (iii) \HIGH := q
%   where either RANGE1 = p-q   or  RANGE1 = p  and  q=p.

\def\@sl@getargs#1-#2-#3\relax#4#5{\xdef#4{#1}\xdef#5{#2}}
\def\@sl@ccdr#1,#2\relax#3#4{\xdef#3{#1-#1-}\xdef#4{#2}}

\def\@setlimits #1#2#3{\expandafter\@sl@ccdr#1\relax\@sl@gtmp #1%
\expandafter\@sl@getargs\@sl@gtmp\relax#2#3}

%    \end{macrocode}
%    
%    \begin{macrocode}
% \onlyslides{LIST} ::=
%  BEGIN
%    @onlyslidesw := true
%    \@doglslidelist :=G LIST,999999,999999
%   if @onlynotesw = true
%     else @onlynotesw := true
%          \@doglnotelist :=G LIST,999999,999999
%   fi
%   message: Only Slides LIST
%  END

\def\onlyslides#1{\@onlyslideswtrue
   \gdef\@doglslidelist{#1,999999,999999}%
   \if@onlynotesw \else
      \@onlynoteswtrue\gdef\@doglnotelist{999999,999999}\fi
   \typeout{Only Slides #1}}

% \onlynotes{LIST} ::=
%  BEGIN
%    @onlynotesw := true
%    \@doglnotelist :=G LIST,999999,999999
%   if @onlyslidesw = true
%     else \@onlyslidesw := true
%          \@doglslidelist{999999,999999}
%   fi
%   message: Only Notes LIST
%  END

\def\onlynotes#1{\@onlynoteswtrue
   \gdef\@doglnotelist{#1,999999,999999}%
   \if@onlyslidesw \else
      \@onlyslideswtrue\gdef\@doglslidelist{999999,999999}\fi
   \typeout{Only Notes #1}}


%    \end{macrocode}
%    
%    \begin{macrocode}
% \blackandwhite #1  ::=
%    \newpage
%    page counter := 0
%    @bw := T
%    @visible := T
%    if @onlyslidesw = true
%      then  \@doslidelist := \@doglslidelist
%            \@setlimits\@doslidelist\@doslidelow\@doslidehigh
%    fi
%    if @onlynotesw = true
%      then  \@donotelist := \@doglnotelist
%            \@setlimits\@donotelist\@donotelow\@donotehigh
%    fi
%    \normalsize    % Note, this sets font to \rm , which sets
%                     % \@currfont to \rm
%    counter slidenumber := 0
%    counter note        := 0
%    counter overlay     := 0
%    @makingslides       := T
%    input #1
%    @makingslides       := F

\def\blackandwhite#1{\newpage\setcounter{page}{0}\@bwtrue\@visibletrue
\if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
\@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
\if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
\@setlimits\@donotelist\@donotelow\@donotehigh\fi
\normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
\setcounter{note}{0}\@makingslidestrue\input #1\@makingslidesfalse}


% \colors{COLORS} ::=
%  for \@colortemp := COLORS
%     do \csname \@colortemp \endcsname == \@color{\@colortemp} od
%  if \@colorlist = empty
%     then \@colorlist := COLORS
%     else \@colorlist := \@colorlist , COLORS
%  fi
%
\def\colors#1{\@for\@colortemp:=#1\do{\expandafter
  \xdef\csname\@colortemp\endcsname{\noexpand\@color{\@colortemp}}}\ifx
  \@colorlist\@empty \gdef\@colorlist{#1}%
    \else \xdef\@colorlist{\@colorlist,#1}\fi}

\def\@colorlist{}

%    \end{macrocode}
%    
%    \begin{macrocode}
% \colorslides{FILE} ::=
%    \newpage
%    page counter := 0
%    @bw := F
%    for \@currcolor := \@colorlist
%      do  @visible := T
%          if @onlyslidesw = true
%            then  \@doslidelist := \@doglslidelist
%                  \@setlimits\@doslidelist\@doslidelow\@doslidehigh
%          fi
%          if @onlynotesw = true
%            then  \@donotelist := \@doglnotelist
%                  \@setlimits\@donotelist\@donotelow\@donotehigh
%          fi
%          \normalsize
%          counter slide := 0
%          counter overlay := 0
%          counter note    := 0
%          type message
%          generate color layer output page
%          @makingslides := T
%          input #1
%          @makingslides := F
%      od

\def\colorslides#1{\newpage\setcounter{page}{0}\@bwfalse
\@for\@currcolor:=\@colorlist\do
{\@visibletrue
\if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
\@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
\if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
\@setlimits\@donotelist\@donotelow\@donotehigh\fi
\normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
\setcounter{note}{0}\typeout{color \@currcolor}%
\newpage
\begin{huge}%
\begin{center}%
COLOR LAYER\\[.75in]%
\@currcolor
\end{center}%
\end{huge}%
\newpage
\@makingslidestrue
\input #1
\@makingslidesfalse}}


%    \end{macrocode}
%    
%    \begin{macrocode}
% \slide COLORS ::=
%  BEGIN
%   \stepcounter{slide}
%   \@slidesw :=G T
%   if @onlyslidesw = true                   % set \@slidesw = T iff
%     then                                   % page to be output
%       while \c@slide > \@doslidehigh
%          do  \@setlimits\@doslidelist\@doslidelow\@doslidehigh  od
%       if \c@slide < \@doslidelow
%         then \@slidesw := F
%       fi
%   fi
%   if \@slidesw = T
%      then \@slidesw :=G F
%           \begingroup
%              if @bw = true
%                then  \@slidesw :=G T
%                else \@color{COLORS}
%                     \if@visible then \@slidesw :=G T \fi
%              fi
%            \endgroup
%  fi
%  if \@slidesw = T
%    then \newpage
%         \thispagestyle{slide}
%    else \end{slide}
%          \@gobbletoend{slide}
%  fi
% END

% \endslide ::=
%  BEGIN
%    \par\break
%  END

%    \end{macrocode}
%    
%    \begin{macrocode}
\def\slide#1{\stepcounter{slide}\G@slideswtrue\if@onlyslidesw
\@whilenum \c@slide >\@doslidehigh\relax
\do{\@setlimits\@doslidelist\@doslidelow\@doslidehigh}\ifnum
\c@slide <\@doslidelow\relax\G@slideswfalse\fi\fi
\ifG@slidesw 
  \G@slideswfalse
% FMi this is only a hack at the moment to get things running.
%  \begingroup
  \if@bw\G@slideswtrue\else
    \@color{#1}\if@visible \G@slideswtrue \fi
  \fi
%  \endgroup
\fi
\ifG@slidesw \newpage\thispagestyle{slide}%
%    \end{macrocode}
%    This will set up the last color specified in the argument to
%    \verb+\slide+ as the current color. If only back and white  slides
%    are prepared \verb+\last@color+ will be empty and effectly
%    \verb+\relax+ will be generated (hopefully).
%
%    We need to reset to a default font at the beginning of a slide.
%    (not done yet).
%    \begin{macrocode}
\csname \last@color \endcsname
%    \end{macrocode}
%    \begin{macrocode}
\else\end{slide}\@gobbletoend{slide}\fi}

\let\last@color\@empty

\def\endslide{\par\break}

% \overlay COLORS ::=
%  BEGIN
%   \stepcounter{overlay}
%   \@slidesw :=G T
%   if @onlyslidesw = T                     % set \@slidesw = T iff
%     then                                  % page to be output
%       if \c@slide < \@doslidelow
%         then \@slidesw :=G F
%       fi
%  fi
%  if \@slidesw = T
%    \@slidesw :=G F
%    \begingroup
%      if @bw = true
%          then  \@slidesw :=G T
%          else  \@color{COLORS}
%                \if@visible then \@slidesw :=G T \fi
%      fi
%    \endgroup
%  fi
%  if \@slidesw = T
%     then \newpage
%          \thispagestyle{overlay}
%     else \end{overlay}
%          \@gobbletoend{overlay}
%  fi
% END

% \endoverlay ::=
%  BEGIN
%    \par\break
%  END

\def\overlay#1{\stepcounter{overlay}\G@slideswtrue%
\if@onlyslidesw\ifnum \c@slide <\@doslidelow\relax
\G@slideswfalse\fi\fi
\ifG@slidesw \G@slideswfalse\begingroup\if@bw\G@slideswtrue%
\else\@color{#1}\if@visible \G@slideswtrue\fi\fi\endgroup\fi
\ifG@slidesw \newpage\thispagestyle{overlay}%
\else\end{overlay}\@gobbletoend{overlay}\fi}

\def\endoverlay{\par\break}

%    \end{macrocode}
%    
%    \begin{macrocode}
% \note ::=
%  BEGIN
%   \stepcounter{note}
%   if @bw = T
%     then
%       \@slidesw :=G T
%       if @onlynotesw = true                  % set \@notesw = T iff
%         then                                 % page to be output
%           while \c@slide > \@donotehigh
%              do  \@setlimits\@donotelist\@donotelow\@donotehigh  od
%           if \c@slide < \@donotelow
%             then \@slidesw :=G F
%           fi
%       fi
%     else \@slidesw :=G F
%  fi
%  if \@slidesw = T
%     then \newpage
%          \thispagestyle{note}
%     else \end{note}
%          \@gobbletoend{note}
%  fi
% END

% \endnote ::=
%  BEGIN
%    \par\break
%  END

\def\note{\stepcounter{note}%
   \if@bw
      \G@slideswtrue
      \if@onlynotesw\@whilenum \c@slide > \@donotehigh\relax
      \do{\@setlimits\@donotelist\@donotelow\@donotehigh}\ifnum
        \c@slide <\@donotelow\relax \G@slideswfalse\fi\fi
      \else\G@slideswfalse\fi
      \ifG@slidesw \newpage\thispagestyle{note}\else
      \end{note}\@gobbletoend{note}\fi}

\def\endnote{\par\break}


% \@color{COLORS} ::=
%  BEGIN
%   if math mode
%     then type warning
%   fi
%   if @bw
%     then \visible 
%     else \invisible 
%         for \last@color := COLORS
%          do if \last@color = \@currcolor
%               then \visible 
%             fi
%          od
%   fi
%   \ignorespaces
% END
%
% FMi: \last@color will be used in \slide to set up first
%      color if no color is given.
% I suppose that this is much too complicated. \else\@tempsafalse
% would produce the same effect I imagine.

\def\@color#1{\@mmodetest
 {\if@bw \@tempswatrue \else \@tempswafalse
   \@for \@tempa :=#1\do{\ifx\@tempa\@currcolor\@tempswatrue\fi
                         \let\last@color\@tempa}\fi
  \if@tempswa \visible \else \invisible \fi
  \ignorespaces}}

\def\@mmodetest#1{\ifmmode\@warning{Color-changing command
       in math mode has been ignored}\else #1\fi}


\def\invisible{\@mmodetest
  {\if@visible
     \@visiblefalse
     \fontshape\f@shape\selectfont
     \mathversion{invisible}%
   \fi
   \ignorespaces}}

\def\visible{\@mmodetest
  {\if@visible
   \else
     \@visibletrue
%    \end{macrocode}
%    Here is the NFSS2 interface hidden. We use a trick to provide
%    ourselves with a sort of additional attribute without making the
%    current mechanism even larger. The trick is that we denote
%    invisible by putting an uppercase |I| in front of the shape name
%    for invisible shapes and remove it again if we want to become
%    visible.
%    \begin{macrocode}
     \fontshape{\expandafter\@gobble\f@shape}\selectfont
     \mathversion{normal}%
   \fi
   \ignorespaces}}


\def\fontshape#1{\edef\f@shape{\if@visible \else I\fi #1}}



%    \end{macrocode}
%    
% \subsection{Macros for font handling}
%
% Here comes a possible interface that would allow running a style
% both with and without NFSS provided that NFSS would define
% |\set@font@size@parms| as was done in release 1. This is only left
% in here for references (and to confuse everybody).
%    \begin{macrocode}
\message{fonts,}

\iffalse % bypass
\ifx\undefined\set@font@size@parms
\def\set@font@size@parms#1#2{%
  \@nomath#1%
  \expandafter\def@atsizecommand
      \csname @\expandafter\@gobble\string#1%
              \expandafter\endcsname
      \csname \expandafter\@gobbletwo\string#2%
               \endcsname
      #2%
  \do@size@parms
}

\def\def@atsizecommand#1#2#3{%
   \def#1{\if@visible#2\else#3\fi}#1%
   \def\@currsize{#1}\rm}

\def\do@size@parms#1#2#3#4#5#6#7{%
  \baselineskip#1\relax
  \lineskip 2pt%
  \parskip #2\relax
  \abovedisplayskip #3\relax
  \belowdisplayskip #4\relax
  \abovedisplayshortskip #5\relax
  \belowdisplayshortskip\abovedisplayshortskip
  \setbox\strutbox=\hbox{\vrule \@height#6\p@\@depth#7\p@\@width\z@}%
  \baselineskip\baselinestretch\baselineskip
  \normalbaselineskip\baselineskip}
\fi
\fi


%    \end{macrocode}
%    
%    \begin{macrocode}
\message{picture,}
%      ****************************************
%      *          MODIFICATIONS TO            *
%      *       THE PICTURE ENVIRONMENT        *
%      ****************************************
%
%  Below are the new definitions of the picture-drawing macros
%  required for SLiTeX.  Only those commands that actually
%  draw something must be changed so that they do not produce
%  any output when the @visible switch is false.

\def\line(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
\@linelen #3\unitlength
\ifnum\@xarg =\z@ \@vline
  \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
\fi\fi}

\def\vector(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
\@linelen #3\unitlength
\ifnum\@xarg =\z@ \@vvector
  \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
\fi\fi}

\def\dashbox#1(#2,#3){%
\leavevmode\if@visible\hbox to \z@{\baselineskip \z@
\lineskip \z@
\@dashdim #2\unitlength
\@dashcnt \@dashdim \advance\@dashcnt 200
\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
\ifodd\@dashcnt\@dashdim\z@
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
\advance\@dashcnt \m@ne
\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
\@width \@dashdim}\put(0,0){\copy\@dashbox}%
\put(0,#3){\copy\@dashbox}%
\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
\multiply\@dashdim \thr@@
\fi
\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
\@dashdim #3\unitlength
\@dashcnt=\@dashdim \advance\@dashcnt 200
\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
\ifodd\@dashcnt \@dashdim=\z@
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else
\divide\@dashdim \tw@ \divide\@dashcnt \tw@
\advance\@dashcnt \m@ne
\setbox\@dashbox\hbox{\hskip -\@halfwidth
\vrule \@width \@wholewidth
\@height \@dashdim}\put(0,0){\copy\@dashbox}%
\put(#2,0){\copy\@dashbox}%
\put(0,#3){\lower\@dashdim\copy\@dashbox}%
\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
\multiply\@dashdim \thr@@
\fi
\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
\@height #1\unitlength}\@tempcnta\z@
\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}\@tempcnta\z@
\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
\relax\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}}\fi\@makepicbox(#2,#3)}

\def\@oval(#1,#2)[#3]{\if@visible\begingroup \boxmaxdepth \maxdimen
  \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
  \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
  #1\unitlength \@ovyy #2\unitlength
  \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
  \@getcirc \@tempdimb
  \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
  \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
  \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
  \@circlefnt \setbox\@tempboxa
  \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
  \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
  \if@ovt \@ovhorz \kern -\@ovxx \fi
  \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
  \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
  \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
  \endgroup\fi}

\def\@circle#1{\if@visible \begingroup \boxmaxdepth \maxdimen
   \@tempdimb #1\unitlength
   \ifdim \@tempdimb >15.5\p@\relax \@getcirc\@tempdimb
      \@ovro\ht\@tempboxa
     \setbox\@tempboxa\hbox{\@circlefnt
      \advance\@tempcnta\tw@ \char \@tempcnta
      \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
      \advance\@tempcnta\tw@
      \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
        \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
      \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
   \else  \@circ\@tempdimb{96}\fi\endgroup\fi}

%    \end{macrocode}
%    
%    \begin{macrocode}
\def\@dot#1{%
  \if@visible\@tempdimb #1\unitlength \@circ\@tempdimb{112}\fi}

\long\def\@iframebox[#1][#2]#3{\leavevmode
  \savebox\@tempboxa[#1][#2]{\kern\fboxsep #3\kern\fboxsep}%
    \@tempdima\fboxrule
    \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
   \hbox{\lower \@tempdima\hbox
  {\vbox{ \if@visible \hrule \@height \else \vskip \fi \fboxrule
          \hbox{%
            \if@visible \vrule \@width \fboxrule \hskip-\fboxrule \fi
            \vbox{\vskip\fboxsep\box\@tempboxa\vskip\fboxsep}\if@visible
            \vrule \@width \fboxrule \hskip-\fboxrule \fi}\if@visible
         \hrule \@height \else \vskip\fi\fboxrule}}}}


\long\def\frame#1{\if@visible\leavevmode
\vbox{\vskip-\@halfwidth\hrule \@height\@halfwidth \@depth \@halfwidth
  \vskip-\@halfwidth\hbox{\hskip-\@halfwidth \vrule \@width\@wholewidth
  \hskip-\@halfwidth #1\hskip-\@halfwidth \vrule \@width \@wholewidth
  \hskip -\@halfwidth}\vskip -\@halfwidth\hrule \@height \@halfwidth
  \@depth \@halfwidth\vskip -\@halfwidth}\else #1\fi}

\long\def\fbox#1{\leavevmode
    \setbox\@tempboxa\hbox{#1}\@tempdima\fboxrule
    \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
   \hbox{\lower \@tempdima\hbox
  {\vbox{\if@visible \hrule \@height \else \vskip\fi\fboxrule
          \hbox{\if@visible\vrule \@width \else \hskip \fi\fboxrule
                 \hskip\fboxsep
            \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip
                   \fboxsep
                   \if@visible\vrule \@width\else\hskip \fi\fboxrule}%
          \if@visible\hrule \@height \else \vskip \fi\fboxrule}}}}

%    \end{macrocode}
%    
%    \begin{macrocode}
\message{mods,}
%      ****************************************
%      *        OTHER MODIFICATIONS TO        *
%      *        TeX AND LaTeX COMMANDS        *
%      ****************************************
%

% \rule

\def\@rule[#1]#2#3{\@tempdima#3\advance\@tempdima #1\leavevmode
 \hbox{\if@visible\vrule
  \@width#2 \@height\@tempdima \@depth-#1\else
\vrule \@width \z@ \@height\@tempdima \@depth-#1\vrule
 \@width#2 \@height\z@\fi}}

% \_  (Added 10 Nov 86)

\def\_{\leavevmode \kern.06em \if@visible\vbox{\hrule \@width.3em}\else
   \vbox{\hrule \@height \z@ \@width.3em}\vbox{\hrule \@width \z@}\fi}

% \overline, \underline, \frac and \sqrt
%
% \@mathbox{STYLE}{BOX}{MTEXT} : Called in math mode, typesets MTEXT and
%   stores result in BOX, using style STYLE.
%
% \@bphant{BOX}    : Creates a phantom with dimensions BOX.
% \@vbphant{BOX}   : Creates a phantom with ht of BOX and zero width.
% \@hbphant{BOX}   : Creates a phantom with width of BOX
%                    and zero ht & dp.
% \@hvsmash{STYLE}{MTEXT} : Creates a copy of MTEXT with zero height and
%                           width in style STYLE.

\def\@mathbox#1#2#3{\setbox#2\hbox{$\m@th#1{#3}$}}

\def\@vbphantom#1{\setbox\tw@\null \ht\tw@\ht #1\dp\tw@\dp #1%
   \box\tw@}

\def\@bphantom#1{\setbox\tw@\null
   \wd\tw@\wd #1\ht\tw@\ht #1\dp\tw@\dp #1%
   \box\tw@}

\def\@hbphantom#1{\setbox\tw@\null \wd\tw@\wd #1\ht\tw@\z@ \dp\tw@\z@
   \box\tw@}

\def\@hvsmash#1#2{\@mathbox#1\z@{#2}\ht\z@\z@ \dp\z@\z@ \wd\z@\z@
   \box\z@}

\def\underline#1{\relax\ifmmode
  \@xunderline{#1}\else $\@math\@xunderline{\hbox{#1}}$\relax\fi}

\def\@xunderline#1{\mathchoice{\@xyunderline\displaystyle{#1}}%
   {\@xyunderline
    \textstyle{#1}}{\@xyunderline\scriptstyle{#1}}{\@xyunderline
      \scriptscriptstyle{#1}}}

\def\@xyunderline#1#2{%
   \@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}%
   \if@visible \@hvsmash#1{\@@underline{\@bphantom\@smashboxa}}\fi
  \@mathbox#1\@smashboxb{\@@underline{\box\@smashboxa}}%
   \@bphantom\@smashboxb}

\let\@@overline=\overline

\def\overline#1{\mathchoice{\@xoverline\displaystyle{#1}}{\@xoverline
    \textstyle{#1}}{\@xoverline\scriptstyle{#1}}{\@xoverline
      \scriptscriptstyle{#1}}}

\def\@xoverline#1#2{%
   \@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}%
   \if@visible \@hvsmash#1{\@@overline{\@bphantom\@smashboxa}}\fi
   \@mathbox#1\@smashboxb{\@@overline{\box\@smashboxa}}%
   \@bphantom\@smashboxb}


%    \end{macrocode}
%
% \changes{v2.0b}{93/04/14}{Corrected `frac command.}
%    \begin{macrocode}
% \@frac {STYLE}{DENOMSTYLE}{NUM}{DEN}{FONTSIZE} :
%   Creates \frac{NUM}{DENOM}
%   in style STYLE with NUM and DENOM in style DENOMSTYLE
%   FONTSIZE should be \textfont \scriptfont or \scriptscriptfont

\def\frac#1#2{\mathchoice
   {\@frac\displaystyle\textstyle{#1}{#2}\textfont}{\@frac
         \textstyle\scriptstyle{#1}{#2}\textfont}{\@frac
         \scriptstyle\scriptscriptstyle{#1}{#2}\scriptfont}{\@frac
         \scriptscriptstyle\scriptscriptstyle{#1}{#2}\scriptscriptfont}}

\def\@frac#1#2#3#4#5{\@mathbox#1\@smashboxc{{#3\over#4}}%
   \setbox\tw@\null
   \ht\tw@ \ht\@smashboxc
   \dp\tw@ \dp\@smashboxc
   \wd\tw@ \wd\@smashboxc
   \vcenter{\box\if@visible\@smashboxc\else\tw@\fi}}

%\def\@frac#1#2#3#4#5{%
%   \@mathbox#2\@smashboxa{#3}\@mathbox#2\@smashboxb{#4}%
%   \@mathbox#1\@smashboxc{\copy\@smashboxa\over\copy\@smashboxb}%
%   \@vbphantom\@smashboxc
%   \vcenter{\vbox to\z@{\hsize \wd\@smashboxc
%                        \vss\nointerlineskip
%                       \hbox to\wd\@smashboxc{\hss\box\@smashboxa\hss}%
%              \hrule \@height \z@}%
%          \vskip 7\fontdimen8#53
%          \if@visible\hrule \@height \fontdimen8#53\else 
%          \vskip \fontdimen8#53\fi
%          \vskip 7\fontdimen8#53
%          \nointerlineskip
%          \vbox to\z@{\nointerlineskip
%                      \hbox to\wd\@smashboxc{\hss\box\@smashboxb\hss}%
%              \hrule \@height \z@\vss}%
%           }}

\def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\@xysqrt#1{#2}$}%
  \dimen@\ht\z@ \advance\dimen@-\dp\z@
  \mskip5mu\raise.6\dimen@\copy\rootbox \mskip-10mu\box\z@}

\def\sqrt{\@ifnextchar[{\@sqrt}{\@xsqrt}}
\def\@sqrt[#1]{\root #1\of}
\def\@xsqrt#1{\mathchoice{\@xysqrt\displaystyle{#1}}{\@xysqrt
     \textstyle{#1}}{\@xysqrt\scriptstyle{#1}}{\@xysqrt
    \scriptscriptstyle{#1}}}
\def\@xysqrt#1#2{\@mathbox#1\@smashboxa{#2}\if@visible
    \@hvsmash#1{\@@sqrt{\@bphantom\@smashboxa}}\fi
    \phantom{\@@sqrt{\@vbphantom\@smashboxa}}\box\@smashboxa}

\newbox\@smashboxa
\newbox\@smashboxb
\newbox\@smashboxc

%    \end{macrocode}
%    
%    \begin{macrocode}
% array and tabular environments: changes to `|', \hline, \cline,
% and \vline
% added 8 Jun 88

\def\@arrayrule{\if@visible\@addtopreamble{\hskip -.5\arrayrulewidth
   \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}\fi}

\def\cline#1{\if@visible\@cline[#1]\fi}


\def\hline{\noalign{\ifnum0=`}\fi
    \if@visible \hrule \@height \arrayrulewidth
      \else \hrule \@width \z@
    \fi
    \futurelet \@tempa\@xhline}


\def\vline{\if@visible \vrule \@width \arrayrulewidth
            \else \vrule \@width \arrayrulewidth \@height \z@
           \@depth \z@ \fi}


%    \end{macrocode}
%    
%    \begin{macrocode}
\message{output,}
%      ****************************************
%      *   CHANGES TO LaTeX \output ROUTINE   *
%      ****************************************
%
%  \@makecol ==
%    BEGIN
% % Following test added for slides to check if extra page
%     if @makingslides = T
%     then if \c@page > 0
%             then if \c@note > 0
%                     then type 'Note \thenote too long.'
%                     else if \c@overlay > 0
%                            then type 'Overlay \theoverlay too long.'
%                            else type 'Slide \theslide too long'
%     fi     fi     fi     fi
%     ifvoid \insert\footins
%        then  \@outputbox := \box255
%        else  \@outputbox := \vbox {\unvbox255
%                                    \vskip \skip\footins
%                                    \footnoterule
%                                    \unvbox\@footinsert
%                                   }
%    fi
%    \@freelist :=G \@freelist * \@midlist
%    \@midlist  :=G empty
%    \@combinefloats
%    \@outputbox := \vbox to \@colht{\boxmaxdepth := \maxdepth
%                                     \vfil     %%\vfil added for slides
%                                     \unvbox\@outputbox
%                                     \vfil }   %%\vfil added for slides
%    \maxdepth :=G \@maxdepth
%    END

% FMi simple hack to allow none centered slides Should be revised
% of course.

\let\@topfil\vfil

\def\@makecol{\if@makingslides\ifnum\c@page>\z@ \@extraslide\fi\fi
\ifvoid\footins \setbox\@outputbox\box\@cclv \let\@botfil\vfil
   \else\let\@botfil\relax\setbox\@outputbox
     \vbox{\unvbox\@cclv\vfil
           \vskip\skip\footins\footnoterule\unvbox\footins\vskip
            \z@ plus.1fil\relax}\fi
  \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
     \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
        \@topfil\unvbox\@outputbox\@botfil}\global\maxdepth\@maxdepth}

\def\@extraslide{\ifnum\c@note>\z@
    \@warning{Note \thenote\space too long}\else
     \ifnum\c@overlay>\z@
        \@warning{Overlay \theoverlay\space too long}\else
        \@warning{Slide \theslide\space too long}\fi\fi}

%    \end{macrocode}
%    
%    \begin{macrocode}
\message{init}
%      ****************************************
%      *    SPECIAL SLiTeX INITIALIZATIONS    *
%      ****************************************
%
%FMi why not allow for ref's ?
%   \nofiles

\@visibletrue
%</cmd>
%    \end{macrocode}
%
% \section{A driver for this document}
%
% The next bit of code contains the documentation driver file for
% \TeX{}, i.e., the file that will produce the documentation you are
% currently reading. It will be extracted from this file by the 
% \dst{} program.
%    \begin{macrocode}
%<*driver>
\documentstyle[doc]{article}

% dimensions from ltugboat.sty:

\setlength\textwidth{31pc} 
\setlength\textheight{54pc}
\setlength{\parindent}{0pt}
\setlength{\parskip}{2pt plus 1pt minus 1pt}
\setlength{\oddsidemargin}{8pc} 
\setlength{\marginparwidth}{8pc}
\setlength{\topmargin}{-2.5pc} 
\setlength{\headsep}{20pt}
\setlength{\columnsep}{1.5pc} 
\setlength{\columnwidth}{18.75pc}

\DisableCrossrefs

\CodelineIndex     % Index code by line number

%\OnlyDescription  % comment out for implementation details

\begin{document}
   \DocInput{nfslides.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% 
% \DeleteShortVerb{\|}
%
% \Finale
%
\endinput
