3.5 The equation Environment

  3.5.1 LaTeX
  3.5.2 AmsMath
  3.5.3 Embedded Text

3.5.1 LaTeX

<..configure jsml-math latex..>+
 \Configure{equation}
   {\IgnorePar<.inline end-par comment.>\EndP
    <.advance table number.>%
    \HCode{<div class="display-math">%
       \add:description{begin-math}{\a:speak:equation}%
       <div class="equation">}\IgnorePar
      <.math display in equation.>}
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{</div>}%
    \let\@eqnnum\empty
   }
   {\HCode{%
        \add:description{end-math}{\b:speak:equation}%
       </div>}%
    \Tag{eq-\TableNo-num}{\theequation}%
    <.try inline par.>}
-_-_-

<..configure jsml-math latex..>+
 \NewConfigure{speak:equation}{2}
 \Configure{speak:equation}
    {<BREAK SIZE="medium"/>begin equation
          \ifTag{eq-\TableNo-num}{\LikeRef{eq-\TableNo-num}}{}%
     <BREAK SIZE="small"/>
    }
    {<BREAK SIZE="small"/>end equation \theequation
     <BREAK SIZE="medium"/>}
-_-_-

<..inline end-par comment..>
 \ifvmode\else \HCode{<!--tex4ht:inline-->}\fi
-_-_-

3.5.2 AmsMath

<..configure jsml-math amsmath..>+
 \ifx \mathdisplay@@pop\:UnDef
    \ifx \emdf@La\:UnDef
       <.amsmath html-mml pre 2000.>
    \else
       <.amsmath html-mml jan 2000.>
    \fi
 \else
    <.amsmath html-mml july 2000.>
 \fi
-_-_-

<..amsmath html-mml july 2000..>
 \Configure{equation}
   {\ifvmode \IgnorePar\fi\EndP
    <.advance table number.>%
    \HCode{<div class="display-math">%
       \add:description{begin-math}{\a:speak:equation}%
    <div class="equation">}%
    <.amsmath equation july 2000.>%
    <.math display in equation.>%
   }
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{</div>}%
    \let\@eqnnum\empty
   }
   {\ifvmode \IgnorePar\fi\EndP
     \HCode{%
        \add:description{end-math}{\b:speak:equation}%
        </div>}%
     \Tag{eq-\TableNo-num}{\theequation}%
     <.return to prev table number.>%
     \ShowPar\IgnoreIndent\par}
-_-_-

<..amsmath html-mml july 2000..>+
 \Configure{equation*}
   {\ifvmode \IgnorePar\fi\EndP
    <.advance table number.>%
    \HCode{<div class="display-math">%
       \add:description{begin-math}{\csname
                                a:speak:equation*\endcsname}}%
    <.amsmath equation-star july 2000.>%
    <.math display in equation.>%
   }
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{\add:description{end-math}{\csname
                          b:speak:equation*\endcsname}</div>}%
    <.return to prev table number.>%
    \ShowPar\IgnoreIndent\par}
-_-_-

<..amsmath html-mml july 2000..>+
 \Configure{speak:equation}
    {<BREAK SIZE="medium"/>begin equation
          \ifTag{eq-\TableNo-num}{\LikeRef{eq-\TableNo-num}}{}%
     <BREAK SIZE="small"/>
    }
    {<BREAK SIZE="small"/>end equation
                      \theequation<BREAK SIZE="medium"/>}
 \NewConfigure{speak:equation*}{2}
 \Configure{speak:equation*}
    {<BREAK SIZE="medium"/>begin equation<BREAK SIZE="small"/>}
    {<BREAK SIZE="small"/>end equation<BREAK SIZE="medium"/>}
-_-_-

<..amsmath equation july 2000..>
 \Configure{gather}
      {\HCode{<div\Hnewline class="equation"><div
                                        class="gather">}\IgnorePar
          <.math display in equation.>}
      {\HCode{</div></div>}}
      {}
      {}
      {\ifnum\HCol=2 \IgnorePar
          \HCode{</div><div>}\fi }
      {}
-_-_-

<..amsmath equation-star july 2000..>
 \Configure{gather*}
      {\HCode{<div\Hnewline class="equation-star"><div
                                   class="gather-star">}\IgnorePar
          <.math display in equation.>}
      {\HCode{</div></div>}}
      {}
      {}
      {\ifnum\HCol=2 \IgnorePar
          \HCode{</div><div>}\fi }
      {}
-_-_-

<..math display in equation..>
 \Configure{$$}
    {\Configure{@math}{<.block display.>%
                        class="equation"}\IgnorePar\EndP\DviMath}
    {\EndDviMath\EndP}
    {\DisplayMathtrue}%
-_-_-

<..configure html-mml amsmath..>
 \Configure{@begin}
   {split}
   {\let\tagform@=\:gobble }
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{split}
    {<.advance table number.>%
     \HCode{<mtable class="split"><.start split note.>}}
    {\ifvmode\IgnorePar\fi
     \Tag{split-\TableNo}{\HRow:s}%
     \HCode{<.end split note.></mtable>}%
     <.return to prev table number.>}
    {\HCode{<mtr\Hnewline>}%
     \xdef\HRow:s{\HRow}%
    }
    {\HCode{</mtr>}}
    {\HCode{<mtd\Hnewline class="split-side"
                          title="implicit-baseline" >%
            <.split note sub eq note.>}%
    }
    {\HCode{</mtd>}}
-_-_-

<..start split note..>
 \add:vdescription{begin-array}{<BREAK SIZE="medium"/>begin
     \ifTag{split-\TableNo}{\LikeRef{split-\TableNo}}{}
     sub equations<BREAK SIZE="small"/>}%
-_-_-

<..end split note..>
 \add:vdescription{end-array}{<BREAK SIZE="small"/>end sub equations<BREAK SIZE="medium"/>}%
-_-_-

<..split note sub eq note..>
 \add:vdescription{begin-end}{<BREAK SIZE="small"/>%
   \ifnum \HCol=1 left \else right  \fi
   <.ord row.> sub equation<BREAK SIZE="small"/>}%
-_-_-

<..configure jsml-math amsmath..>+
 \ConfigureEnv{multline}
    {\bgroup <.math display in equation.>}
    {\egroup}
    {}{}
 \ConfigureEnv{multline*}
    {\bgroup <.math display in equation.>}
    {\egroup}
    {}{}
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{multline}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline  class="display-math">%
     <.multline begin note.>%
     <mtable>}}
    {\Tag{multline-\TableNo}{\hrow:s}%
     \HCode{</mtable><.multline end note.></div>}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr><mtd\Hnewline class="multline-1">%
     <.multline row note.>}}
    {\xdef\hrow:s{\HRow}\HCode{</mtd></mtr>}}
    {\HCode{</mtd><mtd class="multline-2">}}
    {}
 \Configure{multline-num}
    {\Tag{multline-\TableNo-num}{\theequation}\let\tagform@\:gobble}
    {}
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{multline*}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
            <mtable class="multline-star">%
         <.multline-star begin note.>}}
    {\Tag{multline-\TableNo}{\hrow:s}%
     \HCode{<.multline-star end note.></mtable></div>}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr\Hnewline><mtd>%
             <.multline row note.>}}
    {\xdef\hrow:s{\HRow}\HCode{</mtd></mtr>}}
-_-_-

<..multline begin note..>
 \add:vdescription{begin-math}{%
    <BREAK SIZE="medium"/>%
    begin equation
    \ifTag{multline-\TableNo-num}{\LikeRef{multline-\TableNo-num}}{}
    with
    \ifTag{multline-\TableNo}{\LikeRef{multline-\TableNo}}{}
    lines<BREAK SIZE="small"/>}%
 <div class="multline">%
-_-_-

<..multline-star begin note..>
 \add:vdescription{begin-math}{%
    <BREAK SIZE="medium"/>%
    begin equation with
    \ifTag{multline-\TableNo}{\LikeRef{multline-\TableNo}}{}
    lines<BREAK SIZE="small"/>}%
 <div class="multline-star">%
-_-_-

<..multline end note..>
 </div>%
 \add:vdescription{end-math}{end equation
    <BREAK SIZE="small"/>%
    \ifTag{multline-\TableNo-num}{\LikeRef
                                {multline-\TableNo-num}}{}%
    <BREAK SIZE="medium"/>%
 }%
-_-_-

<..multline-star end note..>
 </div>%
 \add:vdescription{end-math}{%
    <BREAK SIZE="small"/>end equation<BREAK SIZE="medium"/>}%
-_-_-

<..multline row note..>
 \add:vdescription{begin-end}{%
    <BREAK SIZE="small"/><.ord row.> line<BREAK SIZE="small"/>}%
-_-_-

<..advance multline count..>
 \HAdvance\HRow by 1
-_-_-

<..configure jsml-math amsmath..>+
 \ConfigureEnv{gather}
    {\bgroup <.math display in equation.>}
    {\egroup}
    {}{}
 \ConfigureEnv{gather*}
    {\bgroup <.math display in equation.>}
    {\egroup}
    {}{}
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{gather}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
            <.begin gather note.>%
        <mtable class="gather">%
    }}
    {\HCode{</mtable><.end gather note.>%
            </div>}%
     \Tag{gather-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr>%
     <.row gather note.>%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</mtr>}}
    {\HCode{\Hnewline<mtd <.gather td class.> >}%
     \ifnum \HCol>1 \let\tagform@\:gobble \fi
    }
    {\HCode{</mtd>}}
-_-_-

<..begin gather note..>
 \add:vdescription{begin-math}{<BREAK SIZE="small"/>begin group of
     \ifTag{gather-\TableNo}{\LikeRef{gather-\TableNo}}{}
     equations<BREAK SIZE="small"/>}%
-_-_-

<..end gather note..>
 \add:vdescription{end-math}{<BREAK SIZE="small"/>end equations<BREAK SIZE="small"/>}%
-_-_-

<..row gather note..>
 \add:vdescription{begin-end}{<BREAK SIZE="small"/><.ord row.> equation<BREAK SIZE="small"/>}%
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{gather*}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
            <.start gather star note.>%
          <mtable class="gather-star">%
     }}
    {\HCode{</mtable><.end gather star note.>%
            </div>}%
     \Tag{gather-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr>%
     <.line gather star note.>%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</mtr>}}
    {\HCode{\Hnewline<mtd <.gather td class.> >}}
    {\HCode{</mtd>}}
-_-_-

<..start gather star note..>
 \add:vdescription{begin-math}{<BREAK SIZE="small"/>begin group of
   \ifTag{gather-\TableNo}{\LikeRef{gather-\TableNo}}{}
   equations<BREAK SIZE="small"/>}%
-_-_-

<..line gather star note..>
 \add:vdescription{begin-math}{%
    <BREAK SIZE="small"/><.ord row.> equation<BREAK SIZE="small"/>}%
-_-_-

<..end gather star note..>
 \add:vdescription{end-math}{%
    <BREAK SIZE="small"/>end equations<BREAK SIZE="small"/>}%
-_-_-

�BREAK SIZE=”small”/�

<..configure jsml-math amsmath..>+
 \Configure{gathered}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
            <.start gathered note.>%
        <mtable class="gather">%
    }}
    {\HCode{</mtable><.end gathered note.>%
            </div>}%
     \Tag{gather-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr>%
     <.start gathered row.>%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</mtr>}}
    {\HCode{\Hnewline<mtd <.gather td class.> >}%
     \ifnum \HCol>1 \let\tagform@\:gobble \fi
    }
    {\HCode{</mtd>}}
-_-_-

<..start gathered note..>
 \add:vdescription{begin-math}{<BREAK SIZE="small"/>begin group of
    \ifTag{gather-\TableNo}{\LikeRef{gather-\TableNo}}{}
    equations<BREAK SIZE="small"/>}
-_-_-

<..end gathered note..>
 \add:vdescription{end-math}{%
    <BREAK SIZE="small"/>end equations<BREAK SIZE="small"/>}%
-_-_-

<..start gathered row..>
 \add:vdescription{begin-end}{%
    <BREAK SIZE="small"/><.ord row.> equation<BREAK SIZE="small"/>}%
-_-_-

<..gather td class..>
 \ifnum \HCol=1   class="col-\HCol"
 \else            class="content-less" title="col-\HCol"
 \fi
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{subarray}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<mtable class="subarray\if c\Hlcr-c\fi">%
        \add:vdescription{begin-array}{\a:speak:subarray}%
     }}
    {\HCode{\add:vdescription{end-array}{\b:speak:subarray}%
            </mtable>}%
     \Tag{subarray-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr><mtd>%
     \add:vdescription{begin-end}{\c:speak:subarray}%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</mtd></mtr>}}
-_-_-

<..configure jsml-math amsmath..>+
 \NewConfigure{speak:subarray}{3}
 <.config speak:subarray.>
-_-_-

<..config speak:subarray..>
 \Configure{speak:subarray}
    {<BREAK SIZE="small"/>begin sub array with
          \ifTag{subarray-\TableNo}{\LikeRef{subarray-\TableNo}}{}
          rows<BREAK SIZE="small"/>}
    {<BREAK SIZE="small"/>end sub array<BREAK SIZE="small"/>}
    {<BREAK SIZE="small"/><.ord row.> row<BREAK SIZE="small"/>}
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{substack}
    {\bgroup
     \Configure{speak:subarray}
       {<BREAK SIZE="small"/>begin sub stack with
             \ifTag{subarray-\TableNo}{\LikeRef{subarray-\TableNo}}{}
             entries<BREAK SIZE="small"/>}
       {<BREAK SIZE="small"/>end sub stack<BREAK SIZE="small"/>}
       {<BREAK SIZE="small"/><.ord row.>
              entry<BREAK SIZE="small"/>}
    }
    {\egroup}
-_-_-

<..configure jsml-math amsmath..>+
 \Configure{smallmatrix}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<PARA><mtable class="smallmatrix">}%
     \HCode{\add:vdescription{begin-array}{\a:speak:smallmatrix}}}
    {\Tag{smallmatrix-\TableNo}{\hrow:s}%
     \HCode{<.show input line no.>%
            \add:vdescription{end-array}{\b:speak:smallmatrix}}%
     \ifvmode \IgnorePar\fi
     \HCode{</mtable></PARA>}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<mtr>}\c:speak:smallmatrix}%
    {\xdef\hrow:s{\HRow}\HCode{</mtr>}}%
    {\HCode{<mtd>}%
     \e:speak:smallmatrix \HCode{<div>}}
    {\HCode{</div>}\f:speak:smallmatrix
     \HCode{</mtd>\Hnewline}}
-_-_-

<..plain,latex mathml..>+
 \NewConfigure{speak:smallmatrix}{6}
 \Configure{speak:smallmatrix}
    {begin matrix with
        \ifTag{smallmatrix-\TableNo}{\LikeRef{smallmatrix-\TableNo}}{}
        rows}
    {end  matrix}
    {<.begin table row note.>}
    {<.end table row note.>}
    {<.begin table cell note.>}
    {<.end table cell note.>}
-_-_-

<..configure jsml-math amsmath..>+
 \def\:tempc#1#2{%
    \ConfigureEnv{#1}
      {\def\end:al:env{}\ifmmode\else
        \ifvmode\else \def\end:al:env{\par\ShowPar\IgnoreIndent}\fi\fi}
      {\end:al:env }
      {}{}%
    \Configure{#1}
    {\IgnorePar
     \ifvmode \EndP  \else \EndP  \HCode{<!--tex4ht:inline-->}\fi
     \ifmathml
        \Tg<span class="mrow">\def\end:mathalign{\Tg</span>}%
     \else
        \DviMath
        \def\end:mathalign{\EndDviMath \DisplayMathfalse}%
        \DisplayMathtrue
     \fi
     <.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math"><mtable>%
         \add:description{begin-array}{\a:speak:align}%
        }}
    {\HCode{%
         \add:description{end-array}{\b:speak:align}%
        </mtable></div>}%
     \Tag{align-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>\end:mathalign }
    {\HCode{<mtr><.align eq note.>}}
    {\HCode{</mtr>}\ifst@rred\else
         \Tag{align-\TableNo-\HRow}{\theequation}%
     \fi \xdef\hrow:s{\HRow}}
    {\HCode{<mtd\Hnewline
       class="align-\ifnum \HCol>\maxfields@ label\else
          \ifodd\HCol\space  odd\else     even\fi
        \fi">}%
     \ifnum \HCol>\maxfields@ \let\tagform@\:gobble \fi
    }
    {\HCode{</mtd>}}
 }
 \:tempc{align}{align}
 \:tempc{alignat}{alignat}
 \:tempc{xalignat}{xalignat}
 \:tempc{xxalignat}{xxalignat}
 \:tempc{flalign}{flalign}
 \:tempc{align*}{align-star}
 \:tempc{alignat*}{alignat-star}
 \:tempc{xalignat*}{xalignat-star}
 \:tempc{flalign*}{flalign-star}
-_-_-

<..align eq note..>
 \add:description{begin-end}{\c:speak:align}%
-_-_-

<..configure jsml-math amsmath..>+
 \NewConfigure{speak:align}{3}
 \Configure{speak:align}
    {<BREAK SIZE="small"/>begin
            \ifTag{align-\TableNo}{\LikeRef{align-\TableNo}}{}
            aligned equations<BREAK SIZE="small"/>}
    {<BREAK SIZE="small"/>end aligned equations<BREAK SIZE="small"/>}
    {<BREAK SIZE="small"/>\ifst@rred  <.ord row.> equation
     \else
        equation number \ifst@rred\else
           \ifTag{align-\TableNo-\HRow}%
                 {\LikeRef{align-\TableNo-\HRow}}{}
        \fi
     \fi <BREAK SIZE="small"/>%
    }
-_-_-

3.5.3 Embedded Text

<..configure jsml-math latex..>+
 \def\AA:text#1{<.config start mtext.>}
 \def\BB:text{<.config end mtext.>}
-_-_-

<..config start mtext..>
 \mtexttrue
 \HCode{ <span\Hnewline class="mstyle-#1">}%
          <.start mtext space.>\PauseMathClass
    <.config math within mtext.>%
-_-_-

<..config end mtext..>
 \mtextfalse\EndPauseMathClass<.end mtext space.>\HCode
      {</span>}%
-_-_-

<..config math within mtext..>
 \Configure{$}%
   {\EndPauseMathClass \HCode{<span \Hnewline
                              class="text-math">}\mtextfalse
       <.end mtext space.>}%
   {\HCode{</span>}<.start mtext space.>\PauseMathClass \mtexttrue}%
   {}%
-_-_-

<..start mtext space..>
 \ht:special{t4ht@,&\#x00A0;}%
-_-_-

<..end mtext space..>
 \ht:special{t4ht@,}%
-_-_-