Math (MathML)

  • Support for different math environments
  • Classification for primitive tokens (\mathord, \mathop, \mathbin, \mathrel, \mathopen, \mathclose, \mathpunct, <mo>, <mi> )
Inline math:  
 $ \alpha^2 + \beta^2 =  
   \gamma^2 $  
 
Display math:  
 $$-b \pm  
   \sqrt{ b^2 - 4ac }  
   \over 2a $$  
 
See equation \ref{eq}.  
 
\begin{equation}  
   A_n =  
   \left\{ \begin{array}{ll}  
      n!, & \mbox{if } n>0 \\  
      0,  & \mbox{otherwise}  
   \end{array}  \right.  
   \label{eq}  
\end{equation}  
Inline math: α2 + β2 =  γ2

Display math:

      √ --------
- b ±   b2 - 4ac
----------------
       2a

See equation 1.

      {
        n!,  if n > 0
An =    0,   otherwise
(1)

<p>Inline math:  
   <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">  
     <msup>  
       <mrow>  
         <mi>&#x3B1;</mi>  
       </mrow>  
       <mrow>  
         <mn>2</mn>  
       </mrow>  
     </msup>  
     <mo>+</mo>  
     <msup>  
       <mrow>  
         <mi>&#x3B2;</mi>  
       </mrow>  
       <mrow>  
         <mn>2</mn>  
       </mrow>  
     </msup>  
     <mo>=</mo>  
     <msup>  
       <mrow>  
         <mi>&#x3B3;</mi>  
       </mrow>  
       <mrow>  
         <mn>2</mn>  
       </mrow>  
     </msup>  
   </math>  
</p>  
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">  
  <mfrac>  
    <mrow>  
      <mo>&#8722;</mo>  
      <mi>b</mi>  
      <mo>&#xB1;</mo>  
      <msqrt>  
        <mrow>  
          <msup>  
            <mrow>  
              <mi>b</mi>  
            </mrow>  
            <mrow>  
              <mn>2</mn>  
            </mrow>  
          </msup>  
          <mo>&#8722;</mo>  
          <mn>4</mn>  
          <mi>a</mi>  
          <mi>c</mi>  
        </mrow>  
      </msqrt>  
    </mrow>  
    <mrow>  
      <mn>2</mn>  
      <mi>a</mi>  
    </mrow>  
  </mfrac>  
</math>  
 
<p>See equation <a href="#eq">1 </a>.</p>  
 
<table width="100%" >  
   <tr>  
     <td>  
       <math xmlns="http://www.w3.org/1998/Math/MathML" display="block" id="eq">  
         <msub>  
           <mrow>  
             <mi>A</mi>  
           </mrow>  
           <mrow>  
             <mi>n</mi>  
           </mrow>  
         </msub>  
         <mo >=</mo>  
         <mfenced separators="" open="{" close="">  
           <mtable align="axis" equalrows="false" equalcolumns="false" >  
             <mtr>  
               <mtd  columnalign="left">  
                 <mi>n</mi>  
                 <mi>!</mi>  
                 <mo >,</mo>  
               </mtd>  
               <mtd  columnalign="left">  
                 <mtext>if^^a0</mtext>  
                 <mi>n</mi>  
                 <mo >&gt;</mo>  
                 <mn>0</mn>  
               </mtd>  
             </mtr>  
             <mtr>  
               <mtd  columnalign="left">  
                 <mn>0</mn>  
                 <mo >,</mo>  
               </mtd>  
               <mtd  columnalign="left">  
                 <mtext>otherwise</mtext>  
               </mtd>  
             </mtr>  
           </mtable>  
         </mfenced>  
       </math>  
     </td>  
     <td>(1)</td>  
   </tr>  
</table>  

11, next, prev, up, toc