0.18 The equation Environment

  0.18.1 LaTeX
  0.18.2 AmsMath

0.18.1 LaTeX

<..configure html-speech-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 html-speech-math latex..>+
 \NewConfigure{speak:equation}{2}
 \Configure{speak:equation}
    {begin equation
          \ifTag{eq-\TableNo-num}{\LikeRef{eq-\TableNo-num}}{}%
    }
    {end equation \theequation}
-_-_-

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

0.18.2 AmsMath

<..amsmath equation..>
 \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}
    {begin equation
          \ifTag{eq-\TableNo-num}{\LikeRef{eq-\TableNo-num}}{}%
    }
    {end equation \theequation}
 \NewConfigure{speak:equation*}{2}
 \Configure{speak:equation*}
    {begin equation}
    {end equation}
-_-_-

<..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 html-speech-math amsmath..>+
 \Configure{split}
    {<.advance table number.>%
     \HCode{<div class="split">%
       \add:vdescription{begin-array}{begin
           \ifTag{split-\TableNo}{\LikeRef{split-\TableNo}}{}
           sub equations}}}
    {\ifvmode\IgnorePar\fi
     \Tag{split-\TableNo}{\HRow:s}%
     \HCode{\add:vdescription{end-array}{end sub equations}</div>}%
     <.return to prev table number.>%
    }
    {\HCode{<div\Hnewline class="tr">}%
     \xdef\HRow:s{\HRow}%
    }
    {\HCode{</div>}}
    {\HCode{<div\Hnewline class="split-side"
                          title="implicit-baseline" >%
     \add:vdescription{begin-end}{%
       \ifnum \HCol=1 left \else right  \fi
       <.ord row.> sub equation}}%
    }
    {\HCode{</div>}}
-_-_-

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

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

<..configure html-speech-math amsmath..>+
 \Configure{multline*}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
         <.multline-star begin note.>}}
    {\Tag{multline-\TableNo}{\hrow:s}%
     \HCode{<.multline-star end note.></div>}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<div\Hnewline class="tr">%
             <.multline row note.>}}
    {\xdef\hrow:s{\HRow}\HCode{</div>}}
 \Css{.begin-multline, .end-multline {color:red;}}
-_-_-

<..configure emacspeak amsmath..>+
 \CssSpeech{.begin-multline, .end-multline  {stress:3; richness:5;}}
-_-_-

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

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

<..multline end note..>
 </div>%
 \add:vdescription{end-math}{end equation
    \ifTag{multline-\TableNo-num}{\LikeRef{multline-\TableNo-num}}{}%
 }%
-_-_-

<..multline-star end note..>
 </div>%
 \add:vdescription{end-math}{end equation}%
-_-_-

<..multline row note..>
 \add:vdescription{begin-end}{<.ord row.> line}%
-_-_-

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

<..configure html-speech-math amsmath..>+
 \ConfigureEnv{gather}
    {\bgroup <.math display in equation.>}
    {\egroup}
    {}{}
 \ConfigureEnv{gather*}
    {\bgroup <.math display in equation.>}
    {\egroup}
    {}{}
 \Css{.begin-gather, .end-gather {color:red;}}
-_-_-

<..configure emacspeak amsmath..>+
 \CssSpeech{.begin-gather, .end-gather  {stress:3; richness:5;}}
-_-_-

<..configure html-speech-math amsmath..>+
 \Configure{gather}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
        \add:vdescription{begin-math}{begin group of
          \ifTag{gather-\TableNo}{\LikeRef{gather-\TableNo}}{}
          equations}%
        <div class="gather">%
    }}
    {\HCode{</div>\add:vdescription{end-math}{end equations}%
            </div>}%
     \Tag{gather-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<div class="tr">%
     \add:vdescription{begin-end}{<.ord row.> equation}%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</div>}}
    {\HCode{\Hnewline<div <.gather td class.> >}%
     \ifnum \HCol>1 \let\tagform@\:gobble \fi
    }
    {\HCode{</div>}}
-_-_-

<..configure html-speech-math amsmath..>+
 \Configure{gather*}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
        \add:vdescription{begin-math}{begin group of
          \ifTag{gather-\TableNo}{\LikeRef{gather-\TableNo}}{}
          equations}%
          <div class="gather-star">%
     }}
    {\HCode{</div>\add:vdescription{end-math}{end equations}%
            </div>}%
     \Tag{gather-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<div class="tr">%
     \add:vdescription{begin-math}{<.ord row.> equation}%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</div>}}
    {\HCode{\Hnewline<div <.gather td class.> >}}
    {\HCode{</div>}}
-_-_-

<..configure html-speech-math amsmath..>+
 \Configure{gathered}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div\Hnewline class="display-math">%
        \add:vdescription{begin-math}{begin group of
          \ifTag{gather-\TableNo}{\LikeRef{gather-\TableNo}}{}
          equations}%
        <div class="gather">%
    }}
    {\HCode{</div>\add:vdescription{end-math}{end equations}%
            </div>}%
     \Tag{gather-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<div class="tr">%
     \add:vdescription{begin-end}{<.ord row.> equation}%
    }}
    {\xdef\hrow:s{\HRow}\HCode{</div>}}
    {\HCode{\Hnewline<div <.gather td class.> >}%
     \ifnum \HCol>1 \let\tagform@\:gobble \fi
    }
    {\HCode{</div>}}
-_-_-

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

<..ord row..>
 <span class="ord-row">\ord:pos{\HRow}</span>%
-_-_-

<..ord col..>
 \ord:pos{\HCol}%
-_-_-

<..configure html-speech tex4ht..>+
 \def\ord:pos#1{%
    \ifcase #1
    \or first
    \or second
    \or third
    \or fourth
    \or fifth
    \or sixth
    \or seventh
    \or eighth
    \or nineth
    \else #1th
    \fi
 }
-_-_-

<..configure html-speech tex4ht..>+
 \Css{.ord-row {color:red;}}
-_-_-

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

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

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

<..configure html-speech-math amsmath..>+
 \Configure{substack}
    {\bgroup
     \Configure{speak:subarray}
       {begin sub stack with
          \ifTag{subarray-\TableNo}{\LikeRef{subarray-\TableNo}}{}
          entries}
       {end sub stack}
       {<.ord row.> entry}
    }
    {\egroup}
-_-_-

<..configure html-speech-math amsmath..>+
 \Configure{smallmatrix}
    {<.advance table number.>%
     <.new row counter.>%
     \HCode{<div 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 \Tg</div>%
     <.return to prev row counter.>%
     <.return to prev table number.>}
    {\HCode{<div class="tr">}\c:speak:smallmatrix}%
    {\xdef\hrow:s{\HRow}\HCode{</div>}}%
    {\HCode{<div  class="td" >}%
     \e:speak:smallmatrix \HCode{<div>}}
    {\HCode{</div>}\f:speak:smallmatrix
     \HCode{</div>\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 html-speech-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"><div class="display-math">%
         \add:description{begin-array}{\a:speak:align}%
        }}
    {\HCode{%
         \add:description{end-array}{\b:speak:align}%
        </div></div>}%
     \Tag{align-\TableNo}{\hrow:s}%
     <.return to prev row counter.>%
     <.return to prev table number.>\end:mathalign }
    {\HCode{<div class="tr"><.align eq note.>}}
    {\HCode{</div>}\ifst@rred\else
         \Tag{align-\TableNo-\HRow}{\theequation}%
     \fi \xdef\hrow:s{\HRow}}
    {\HCode{<div\Hnewline
       class="align-\ifnum \HCol>\maxfields@ label\else
          \ifodd\HCol\space  odd\else     even\fi
        \fi">}%
     \ifnum \HCol>\maxfields@ \let\tagform@\:gobble \fi
    }
    {\HCode{</div>}}
 }
 \: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}
 \Css{.begin-aligned, .end-aligned {color:red;}}
-_-_-

<..configure emacspeak amsmath..>+
 \CssSpeech{.begin-aligned, .end-aligned  {stress:3; richness:5;}}
-_-_-

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

<..configure html-speech-math amsmath..>+
 \NewConfigure{speak:align}{3}
 \Configure{speak:align}
    {begin
            \ifTag{align-\TableNo}{\LikeRef{align-\TableNo}}{}
            aligned equations}
    {end aligned equations}
    {\ifst@rred  <.ord row.> equation
     \else
        equation number \ifst@rred\else
           \ifTag{align-\TableNo-\HRow}{\LikeRef{align-\TableNo-\HRow}}{}
        \fi
     \fi
    }
-_-_-