%% 
%% This is file `footnote.sty',
%% generated with the docstrip utility.
%% 
%% The original source files were:
%% 
%% footnote.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% You are *not* allowed to modify this file.
%% 
%% You are *not* allowed to distribute this file.
%% For distribution of the original source see
%% the terms for copying and modification in the file  footnote.dtx.
%% 
%% This is footnote.dtx, and it's -*-LaTeX-*- text
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{footnote}
        [1996/08/04 v3.2a
     a hotchpotch of footnote facilites%
                   ]
\NeedsTeXFormat{LaTeX2e}
\providecommand\protected@writeaux{%
  \protected@write\@auxout
}
\def\FN@outputflag{0}
\def\PP@footflag{0}
\def\@advance@macro#1#2{\expandafter\@tempcnta#1\relax
                        \advance\@tempcnta#2\relax
                        \edef#1{\the\@tempcnta}}
\newdimen\footnotemargin
\footnotemargin1.8em\relax
\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
\def\FN@unhbox@par#1{\unhbox#1\par}
\let\FN@tempboxa\@tempboxa
\newbox\FN@tempboxb
\newbox\FN@tempboxc
\DeclareOption{para}{%
\newskip\footglue \footglue=1em plus.3em minus.3em
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\long\def\@makefntext#1{\@makefnmark\nobreak\hskip.5em\relax#1}
\@advance@macro\FN@outputflag1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\footnotesize \newdimen\footnotebaselineskip
  \global
  \footnotebaselineskip=\normalbaselineskip}
\@tempdima=\footnotebaselineskip \multiply\@tempdima by 1024
\divide \@tempdima by \columnwidth \multiply\@tempdima by 64
\xdef\fudgefactor{\strip@pt\@tempdima }
\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
  \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes}
    \hsize\columnwidth
    \@parboxrestore
    \baselineskip=\footnotebaselineskip
    \noindent
  \rule{\z@}{\footnotesep}%
  \FN@unhbox@par{\FN@tempboxa}
}
\def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}
  \loop\setbox\FN@tempboxb=\lastbox \ifhbox\FN@tempboxb
  \setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}\repeat}
\def\removehboxes{\setbox\FN@tempboxa=\lastbox
  \ifhbox\FN@tempboxa{\removehboxes}\unhbox\FN@tempboxa \fi}
}
\DeclareOption{perpage}{%
\def \PP@footnote
  {%
  \if@minipage\else
     \if@filesw
        \edef \@tempa
           {%
           \noexpand\protected@writeaux\relax
              {%
              \string\newfoot@mark{\thepage}%
                 {\the\c@footnote}{\noexpand\thepage}%
              }%
           }%
        \@tempa
     \fi
     \edef \@tempa {ft@\thepage-\the\c@footnote}%
     \expandafter\ifx\csname\@tempa\endcsname \relax
     \else
        \begingroup
           \global\expandafter\c@footnote
               \csname\@tempa\endcsname\relax
           \xdef \@thefnmark {\thefootnote}%
        \endgroup
     \fi
  \fi
  }
\def\ft@page{0}
\def\ft@foot{0}
\def \newfoot@mark #1#2#3{%
  \@ifdigit{#3}{%
    \expandafter\ifnum \ft@page > #3\relax
      \def\ft@page{0}%
    \else
      \expandafter\ifnum \ft@page < #3\relax
        \def\ft@page{#3}
        \def\ft@foot{0}%
    \fi\fi}%
   {\def\ft@page{0}}%
  \@advance@macro\ft@foot1
  \def\@tempa{#2}%
  \ifx \@tempa\ft@foot \else
     \expandafter \xdef \csname ft@#1-#2\endcsname {\ft@foot}%
  \fi
  }
\@onlypreamble\newfoot@mark
\def\@ifdigit#1{\expandafter\@digithelp\string#1\@digithelp}%
\def\@digithelp#1#2\@digithelp{%
  \ifnum `#1<`0
    \@triple@expandafter\@secondoftwo
  \else
    \ifnum `#1>`9
      \@triple@expandafter\@secondoftwo
    \else
      \@triple@expandafter\@firstoftwo
    \fi
  \fi}
\providecommand\@triple@expandafter{\expandafter
  \expandafter\expandafter}
\def \enddoc@newfoot@mark #1#2#3{%
  \@ifdigit{#3}{%
    \expandafter\ifnum \ft@page > #3\relax
      \def\ft@page{0}%
    \else
      \expandafter\ifnum \ft@page < #3\relax
        \def\ft@page{#3}
        \def\ft@foot{0}%
    \fi\fi}%
   {\def\ft@page{0}}%
  \@advance@macro\ft@foot1
  \def\@tempa{#2}%
  \ifx \@tempa\ft@foot \else
    \expandafter \ifx \csname ft@#1-#2\endcsname \ft@foot
    \else\@tempswatrue
    \fi
  \fi
  }
\AtEndDocument{%
  \def\ft@page{0}
  \def\ft@foot{0}
  \let\newfoot@mark\enddoc@newfoot@mark
  }
\@advance@macro\PP@footflag9
\@addtoreset{footnote}{page}%
}
\DeclareOption{bottom}{%
  \@advance@macro\FN@outputflag{-2}
}
\DeclareOption{marginal}{%
  \footnotemargin-0.8em\relax
}
\DeclareOption{flushmargin}{%
  \footnotemargin0pt\relax
}
\DeclareOption{norule}{%
  \renewcommand\footnoterule{}%
  \advance\skip\footins 4\p@\@plus2\p@\relax
}
\ProcessOptions
\expandafter\@tempcntb\PP@footflag\relax
\@advance@macro\FN@outputflag\@tempcntb\relax
\ifnum\@tempcnta=0
\else
\advance\@tempcnta-\@tempcntb\relax
\let\FN@obrace{
\let\FN@cbrace} % this has the merit (at least) of satisfying emacs...
\input{patch}
\ifnum\FN@outputflag<0
\gpatch\@makecol{}{\vbox\FN@obrace\boxmaxdepth\@maxdepth
                   \unvbox\@cclv\vskip\skip\footins
                     {\vbox to\@colht\FN@obrace\boxmaxdepth\@maxdepth
                      \unvbox\@cclv\vfill\relax\vskip\skip\footins}}
\fi
\ifodd\@tempcnta
\gpatch\@makecol{}{\normalcolor\footnoterule\unvbox\footins
                     {\normalcolor\footnoterule
                      \global\setbox\FN@tempboxc\vbox
                                      {\makefootnoteparagraph}%
                      \unvbox\FN@tempboxc}}
\gpatch\@footnotetext#1{{#1}}{\@makefntext\FN@obrace
     \rule\z@\footnotesep
     \ignorespaces#1%
     \@finalstrut\strutbox\FN@cbrace
     {%
     \setbox\FN@tempboxa=\hbox\FN@obrace
        \@makefntext\FN@obrace
          \ignorespaces#1\strut
          \penalty-10\relax
          \hskip\footglue
          \FN@cbrace% end of \@makefntext parameter
        \FN@cbrace% end of \hbox
     \dp\FN@tempboxa=0pt\ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa
     \box\FN@tempboxa
     }}
\fi
\ifnum\@tempcntb=0
\else
\gpatch\footnote{}% Note that \footnote doesn't have arguments,
                  % whatever it says in the book...
                  {\@footnotemark{\PP@footnote\@footnotemark}}
\gpatch\footnotemark{}{\@footnotemark{\PP@footnote\@footnotemark}}
\fi
\endpatch
\fi
\ifodd\@tempcnta\else
  \def\@makefntext#1{%
    \parindent1em
    \noindent
    \ifdim\footnotemargin>0pt
      \hbox to 1.8em{\hss\@makefnmark}%
    \else
      \ifdim\footnotemargin=0pt
        \llap{$^{\@thefnmark}$}%
      \else
        \llap{\hbox to-\footnotemargin{$^{\@thefnmark}$\hss}}%
      \fi
    \fi
    #1}
\fi
\endinput
%% 
%% End of file `footnote.sty'.
