%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% amsmath.4ht                          2001-12-14-17:07 %
% Copyright (C) 1997--2001      Eitan M. Gurari         %
%                                                       %
% This program can redistributed and/or modified under  %
% the terms of the LaTeX Project Public License         %
% Distributed from CTAN archives in directory           %
% macros/latex/base/lppl.txt; either version 1 of the   %
% License, or (at your option) any later version.       %
%                                                       %
% However, you are allowed to modify this program       %
% without changing its name, if you modify its          %
% signature. Changes to the signature can be introduced %
% with a directive of the form                          %
%            \message{signature}                        %
%                                                       %
%                             gurari@cis.ohio-state.edu %
%                 http://www.cis.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2001-12-14-17:07}

\HRestore\cases
\HRestore\matrix
\HRestore\pmatrix
\append:def\a:display{\@displaytrue}
\expandafter\append:defIII\csname
    c:$$:\endcsname{\append:def\a:display{\@displaytrue}}



\HRestore\over
\def\:tempc{\pic:gobble\a:over \o:@@over: \pic:gobble\b:over}
\HLet\@@over\:tempc
\HRestore\atop
\def\:tempc{\pic:gobble\a:atop \o:@@atop: \pic:gobble\b:atop}
\HLet\@@atop\:tempc
\def\::above{\pic:gobble\a:above \o:@@above:\tmp:dim
            \pic:gobble\b:above }
\def\:above{\afterassignment\::above}
\def\:tempc{\Protect\:above \tmp:dim=}
\HLet\@@above\:tempc
\HRestore\abovewithdelims
\def\::abovewithdelims#1#2{\pic:gobble\a:abovewithdelims
   \o:@@abovewithdelims:#1#2\tmp:dim\pic:gobble\b:abovewithdelims}
\def\:abovewithdelims#1#2{\def\:temp{\::abovewithdelims#1#2}%
   \afterassignment\:temp\tmp:dim}
\def\:tempc{\Protect\:abovewithdelims }
\HLet\@@abovewithdelims\:tempc
\NewConfigure{abovewithdelims}{2}
\HRestore\overwithdelims
\def\:overwithdelims#1#2{\pic:gobble\a:overwithdelims
   \o:@@overwithdelims:#1#2\pic:gobble\b:overwithdelims}
\def\:tempc{\Protect\:overwithdelims}
\HLet\@@overwithdelims\:tempc
\NewConfigure{overwithdelims}{2}
\HRestore\atopwithdelims
\def\:atopwithdelims#1#2{\pic:gobble\a:atopwithdelims
   \o:@@atopwithdelims:#1#2\pic:gobble\b:atopwithdelims}
\def\:tempc{\Protect\:atopwithdelims}
\HLet\@@atopwithdelims\:tempc
\NewConfigure{atopwithdelims}{2}
\let\ltx@label\lb:l
\let\Mathaccent:\mathaccent@
\def\mathaccent@#1#2{\ifx \EndPicture\:UnDef
     \DN@{\Picture+{}\Mathaccent:{#1}{#2}\EndPicture}%
  \else\DN@{\Mathaccent:{#1}{#2}}\fi\next@}
\MathSymbol\mathop{dotsc}
\MathSymbol\mathop{dotso}
\MathSymbol\mathop{longleftarrow}
\MathSymbol\mathop{longrightarrow}
\def\:tempc#1#2#3{\a:underarrow@
   \hbox{$\m@th#2#3$}\b:underarrow@
   \hbox{#1#2}\c:underarrow@
}
\HLet\underarrow@\:tempc
\def\:tempc#1#2#3{\a:overarrow@
   \hbox{#1#2}\b:overarrow@
   \hbox{$\m@th#2#3$}\c:overarrow@
}
\HLet\overarrow@\:tempc
\NewConfigure{underarrow@}{3}
\NewConfigure{overarrow@}{3}
\def\:temp#1#2{\a:overset\binrel@{#2}%
  \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}\b:overset}
\HLet\overset\:temp
\NewConfigure{overset}{2}
\def\:temp#1#2{\a:underset\binrel@{#2}%
  \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}\b:underset}
\HLet\underset\:temp
\NewConfigure{underset}{2}
\def\:temp#1{\mathop{\vtop{\a:overbrace
   $\o:overbrace:{#1}$\b:overbrace}}\limits}
\HLet\overbrace\:temp
\NewConfigure{overbrace}{2}
\def\:temp#1{\mathop{\vtop{$\a:underbrace
   \o:underbrace:{#1}\b:underbrace$}}\limits}
\HLet\underbrace\:temp
\NewConfigure{underbrace}{2}


\def\:temp#1{{\a:boxed\leavevmode
   \vbox{\m@th$\displaystyle#1$}\b:boxed}}
\HLet\boxed\:temp
\NewConfigure{boxed}{2}
\def\:temp#1#2{\a:xrightarrow \o:xrightarrow:{#1}\b:xrightarrow}
\HLet\xrightarrow\:temp
\NewConfigure{xrightarrow}{2}
\def\:temp#1#2{\a:xleftarrow \o:xleftarrow:{#1}\b:xleftarrow}
\HLet\xleftarrow\:temp
\NewConfigure{xleftarrow}{2}

\NewConfigure{equation}[3]{%
  \c:def\a:equation{#1\bgroup \let\tagform@\:gobble }%
  \c:def\b:equation{\egroup#2}\c:def\c:equation{#3}}
\expandafter\def\csname genfrac \endcsname#1#2#3#4{%
  \def\@tempa{#1#2}%
  \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
    \expandafter\noexpand\csname @@\ifx @#3@over\else above\fi
    \ifx\@tempa\@empty \else withdelims\fi\endcsname}%
  \@tempb{#1#2#3}}
\def\:tempc#1#2#3#4#5{{\a:genfrac#1\b:genfrac{\c:genfrac#4#2#3\relax
   {\d:genfrac#5\e:genfrac}}\f:genfrac}}
\HLet\@genfrac\:tempc
\NewConfigure{genfrac}{6}
\HRestore\frac

                                    \catcode`\#13 \catcode`\!6
\def\reg:align!1!2{%
   \ifx \ifinany@\:Undef\else  \inany@true\fi
  \inalign@true \ifx \displaybreak@\:UnDef
   \chardef\dspbrk@context\z@
\else
   \displaybreak@
\fi
\intertext@
   \ifingather@\else\displ@y@\fi\Let@  \let\math@cr@@@\math@cr@@@align
   \ifxxat@\else \let\tag\tag@in@align \fi
   \let\label\label@in@display !1% set st@r
   \ifst@rred\else \global\@eqnswtrue  \fi   \measure@{!2}%
   \global\row@\z@ \tabskip\eqnshift@
   \Configure{PauseMkHalign}
  {\Configure{PauseMkHalign}{}{}{}{}\expandafter\clean:span}{}{}{}%
%
   \SaveMkHalignConf:g{\align:type}\HRestore\noalign
\MkHalign#{\span
   &\@lign$\m@th\displaystyle{{\HCode{}}%
#}$%
   &\@lign$\m@th\displaystyle{{\HCode{}}%
#}$%
}!2%
}
                                    \catcode`\#=6 \catcode`\!=12
\def\clean:span#1\c:halign{\TeXhalign \bgroup \:span}
\ifx \ifinany@\:Undef
   \def\:tempc{%
        \math@cr
    \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname
    \ifingather@  \restorealignstate@  \egroup \nonumber
      \ifnum0=`{\fi\iffalse}\fi%
    \else         $$\fi
    \global\@ignoretrue
}

\else
   \def\:tempc{%
        \math@cr
    \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname
    \ifingather@  \restorealignstate@  \egroup \nonumber
      \ifnum0=`{\fi}%
    \else         $$\fi
    \global\@ignoretrue
}

\fi
\HLet\endalign\:tempc
\def\:tempc{\pic:MkHalign{\align:type}}
\HLet\align@\:tempc
\def\Config:alg#1#2#3#4#5#6#7{%
   \expandafter\c:def\csname a:#7\endcsname{\global
      \let\sv:amps\add:amps #1}%
   \expandafter\c:def\csname b:#7\endcsname{#2\global
      \let\add:amps\sv:amps}%
   \expandafter\c:def\csname c:#7\endcsname{#3}%
   \expandafter\c:def\csname d:#7\endcsname{#4}%
   \expandafter\c:def\csname e:#7\endcsname{\expandafter\align:td
      \expandafter{\csname f:#7\endcsname}{#5}{#6}}%
}
\def\align:td#1#2#3{\iftag@
     \ifnum \add:amps>0
        \gHAdvance\add:amps  -1   \gHAdvance\HCol  -1
        \global\let#1\empty
        \ifnum \add:amps=0 \gHAdvance\HCol1 #2\gdef#1{#3}\fi
     \else #2\gdef#1{#3}\fi
   \else \gHAssign\add:amps\HCol\relax #2\gdef#1{#3}\fi}%

\def\:tempc#1{%
   \expandafter\pend:def\csname #1\endcsname{\def\align:type{#1}}%
   \NewConfigure{#1}[6]{\Config:alg{##1}{##2}{##3}{##4}{##5}{##6}{#1}}%
   \Configure{#1}{}{}{}{}{}{}%
   \def\:temp{#1}\def\:tempa{align}\ifx \:temp\:tempa\else
      \@xp\let\csname reg:#1\endcsname\reg:align
      \@xp\let\csname end#1\endcsname\endalign
   \fi }
\:tempc{alignat}
\:tempc{alignat*}
\:tempc{xalignat}
\:tempc{xalignat*}
\:tempc{xxalignat}
\:tempc{align}
\:tempc{align*}
\:tempc{flalign}
\:tempc{flalign*}
\pend:defIII\start@align{\Configure{$$}{}{}{}}
                                    \catcode`\#13 \catcode`\!6
\def\reg:multline!1{%
  \ifx \ifinany@\:Undef\else  \inany@true\fi
    \Let@
  \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
  \ifx \displaybreak@\:UnDef
   \chardef\dspbrk@context\z@
\else
   \displaybreak@
\fi
    \restore@math@cr    \let\tag\tag@in@align
  \global\tag@false \global\let\raise@tag\@empty   
  \let\tag\gobble@tag \ifst@rred  \let\label\@gobble  \else
   \stepcounter{equation}%
   \def\label{\let\cnt:currentlabel\@currentlabel
      \def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
      \the\c@equation\else \@currentlabel\fi}%
      \anc:lbl r{equation}\ltx@label}%
   \edef\@currentlabel{\the\c@equation}%
\fi
%
  \ifst@rred
  \expandafter\let\csname e:multline*\endcsname\empty
  \expandafter\let\csname f:multline*\endcsname\empty
\fi
\SaveMkHalignConf:g{multline\ifst@rred *\fi}\HRestore\noalign
\MkHalign#{\hbox{$\m@th\displaystyle{\HCode{}}%
#$}}!1%
}
                                    \catcode`\#=6 \catcode`\!=12
\def\:tempc{\ifst@rred\else
   \e:multline(\theequation)\f:multline
\fi
\math@cr \EndMkHalign
   \RecallMkHalignConfig \csname b:multline\ifst@rred *\fi\endcsname
   $$\global\@ignoretrue  }
\HLet\endmultline\:tempc
\def\:tempc{\pic:MkHalign{multline\ifst@rred *\fi}}
\HLet\multline@\:tempc
\NewConfigure{multline}{6}
\@xp\let\csname reg:multline*\endcsname\reg:multline
\@xp\let\csname endmultline*\endcsname\endmultline
\NewConfigure{multline*}{4}
                                    \catcode`\#13 \catcode`\!6
\def\reg:gather!1{%
   \ingather@true  \ifx \ifinany@\:Undef
   \let\split\insplit@   \chardef\dspbrk@context\z@
\else
   \inany@true
\fi
%
   \let\tag\tag@in@align  \let\label\label@in@display  \displ@y@
   \Let@  \let\math@cr@@@\math@cr@@@gather  
   \global\shifttag@false    \global\row@\@ne
  \SaveMkHalignConf:g{gather\ifst@rred *\fi}\HRestore\noalign
\MkHalign#{\hbox{$\m@th\displaystyle{{\HCode{}}%
#}$}%
&\hbox{{\HCode{}}%
#}%
}!1%
}
                                    \catcode`\#=6 \catcode`\!=12
\def\:tempc{\math@cr \EndMkHalign
   \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname
   $$\global\@ignoretrue  }
\HLet\endgather\:tempc
\def\:tempc{\pic:MkHalign{gather\ifst@rred *\fi}}
\HLet\gather@\:tempc
\NewConfigure{gather}{6}
\@xp\let\csname reg:gather*\endcsname\reg:gather
\@xp\let\csname endgather*\endcsname\endgather
\NewConfigure{gather*}{6}
\HLet\leftroot\:gobble
\HLet\uproot\:gobble
                                    \catcode`\#13 \catcode`\!6
\def\reg:smallmatrix{%
  \vcenter\bgroup \Let@\restore@math@cr\default@tag
  \SaveMkHalignConf:g{smallmatrix}%
\MkHalign#{$\m@th\scriptstyle#$&&%
           $\m@th\scriptstyle#$}%
}
                                    \catcode`\#=6 \catcode`\!=12
\def\:tempc{\crcr\EndMkHalign
    \RecallMkHalignConfig \egroup\b:smallmatrix}
\HLet\endsmallmatrix\:tempc
\def\:temp{\pic:MkHalign{smallmatrix}}
\HLet\smallmatrix\:temp
\NewConfigure{smallmatrix}{6}
\pend:defI\substack{\a:substack}
\append:defI\substack{\b:substack}
\NewConfigure{substack}{2}
                                    \catcode`\#13 \catcode`\!6
\def\reg:subarray!1{%
  \vcenter\bgroup
  \Let@ \restore@math@cr \default@tag
  \baselineskip\fontdimen10 \scriptfont\tw@
  \advance\baselineskip\fontdimen12 \scriptfont\tw@
  \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
  \let\e:subarray\empty \let\f:subarray\empty
\everycr{}\SaveMkHalignConf:g{subarray}%
\MkHalign#{$\m@th\scriptstyle#$}%
}
                                    \catcode`\#=6 \catcode`\!=12
\def\:tempc{\crcr\EndMkHalign
    \RecallMkHalignConfig \egroup\b:subarray}
\HLet\endsubarray\:tempc
\def\:temp#1{\def\Hlcr{#1}\pic:MkHalign{subarray}{#1}}
\HLet\subarray\:temp
\NewConfigure{subarray}{4}
\NewConfigure{split}{6}
                                    \catcode`\#13 \catcode`\!6
\def\:tempc{%
   \vbox\bgroup
        \ifx \ifinany@\:Undef
   \chardef\dspbrk@context\@ne
\fi
%
        \Let@  \restore@math@cr  \default@tag \everycr{}\a:split
        \SaveMkHalignConf:g{split}\HRestore\noalign
        \MkHalign#{ $\m@th\displaystyle{{\HCode{}}%
#}$%
&$\m@th\displaystyle{{\HCode{}}%
#}$%
}}
\HLet\insplit@\:tempc
                                    \catcode`\#6 \catcode`\!12
\def\:tempc{%
   \crcr\EndMkHalign \b:split \egroup }
\HLet\endsplit\:tempc
\NewConfigure{equations}[2]{\def\pic:equa{#1}\def\pic:equb{#2}}
\def\str:pic{\ifx \EndPicture\:UnDef
      \expandafter\Picture\pic:equa{ \pic:equb}%
   \else \let\EndPicture\empty  \fi
   \let\halign\TeXhalign}
\def\make@df@tag@@#1{%
  \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}%
               \let\cnt:currentlabel\@currentlabel
\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
   \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}%
%
               \anc:lbl r{}%
}}
\def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{#1}%
  \toks@\@xp{\p@equation{#1}}\edef\@currentlabel{\the\toks@}%
  \let\cnt:currentlabel\@currentlabel
\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
   \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}%
%
  \anc:lbl r{}%
  }}

\:CheckOption{new-accents}     \if:Option \else
   \HLet\Hat\hat
\HLet\Check\check
\HLet\Tilde\tilde
\HLet\Acute\acute
\HLet\Grave\grave
\HLet\Dot\dot
\HLet\Ddot\ddot
\HLet\Breve\breve
\HLet\Bar\bar
\HLet\Vec\vec

\fi
\MathSymbol\mathrel{@cdots}
\MathSymbol\mathop{iint}
   \def\n:iint:{\expandafter\:same \math:sym\mathop{iint}\nolimits}
\MathSymbol\mathop{iiint}
   \def\n:iiint:{\expandafter\:same \math:sym\mathop{iiint}\nolimits}
\MathSymbol\mathop{iiiint}
   \def\n:iiiint:{\expandafter\:same \math:sym\mathop{iiiint}\nolimits}
\MathSymbol\mathop{idotsint}
   \def\n:idotsint:{\expandafter\:same \math:sym\mathop{idotsint}\nolimits}
\MathSymbol\mathop{doteq}
   \def\n:doteq:{\expandafter\:same \math:sym\mathop{doteq}\nolimits}
\HLet\dotsb@=\@cdots
\HLet\dotsb=\cdots
\HLet\dotsm=\dotsb
\HLet\intdots@=\@cdots
\let\:tempc\measure@
\pend:defI\:tempc{\bgroup
   \RecallTeXcr \HRestore\noalign \let\EndPicture\empty
   \let\halign\TeXhalign \let\span\:span  \HRestore\begin
   \HRestore\end   \a:measure@ }
\append:defI\:tempc{\egroup}
\HLet\measure@\:tempc
\NewConfigure{measure@}{1}
\HLet\savealignstate@\empty
\renewcommand{\n:smash:}[2][tb]{%
  \def\smash@{#1}%
  \ifmmode\@xp\o:mathpalette:\@xp\mathsm@sh\else
        \@xp\makesm@sh\fi{#2}}

\MathSymbol\mathop{dotsc}
\MathSymbol\mathop{dotso}
\MathSymbol\mathop{longleftarrow}
\MathSymbol\mathop{longrightarrow}
\def\:tempc#1#2#3{\a:underarrow@
   \hbox{$\m@th#2#3$}\b:underarrow@
   \hbox{#1#2}\c:underarrow@
}
\HLet\underarrow@\:tempc
\def\:tempc#1#2#3{\a:overarrow@
   \hbox{#1#2}\b:overarrow@
   \hbox{$\m@th#2#3$}\c:overarrow@
}
\HLet\overarrow@\:tempc
\NewConfigure{underarrow@}{3}
\NewConfigure{overarrow@}{3}
\def\:temp#1#2{\a:overset\binrel@{#2}%
  \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}\b:overset}
\HLet\overset\:temp
\NewConfigure{overset}{2}
\def\:temp#1#2{\a:underset\binrel@{#2}%
  \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}\b:underset}
\HLet\underset\:temp
\NewConfigure{underset}{2}
\def\:temp#1{\mathop{\vtop{\a:overbrace
   $\o:overbrace:{#1}$\b:overbrace}}\limits}
\HLet\overbrace\:temp
\NewConfigure{overbrace}{2}
\def\:temp#1{\mathop{\vtop{$\a:underbrace
   \o:underbrace:{#1}\b:underbrace$}}\limits}
\HLet\underbrace\:temp
\NewConfigure{underbrace}{2}


\ifx \ifinany@\:Undef
   \let\:tempc\gather@split
\append:defIII\:tempc{%
   \def\endmathdisplay@a{%
     \math@cr \EndMkHalign
     \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname
     \egroup 
   }%
}
\HLet\gather@split\:tempc

\fi
\Hinput{amsmath}
\endinput

