https://github.com/mozilla/gecko-dev
Raw File
Tip revision: d49bbe497cd81f6b4f6c05f41d930cba433ef645 authored by tbirdbld on 15 August 2012, 15:53:13 UTC
Added THUNDERBIRD_15_0b4_RELEASE THUNDERBIRD_15_0b4_BUILD1 tag(s) for changeset 65cd4f678ab0. DONTBUILD CLOSED TREE a=release
Tip revision: d49bbe4
all-presentation.xml
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
  "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd"
[
  <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<head>
  <title>Examples of Presentation Markup</title>
</head>
<body>

<div>
Testing tensor indices &lt;mmultiscripts&gt;:

<!-- {3 \atop k} R {1 \atop i} {2 \atop j} -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mmultiscripts>
  <mi>R</mi>
  <mi>i</mi><mi>1</mi>
  <mi>j</mi><mi>2</mi>
    <mprescripts/>
  <mi>k</mi><mi>3</mi>
</mmultiscripts>
</math>;

This with &lt;none/&gt;, 

<!-- {{} \atop i} A {p \atop q} -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mmultiscripts>
  <mi>A</mi>
  <mi>q</mi><mi>p</mi>
    <mprescripts/>
  <mi>i</mi><none/>
</mmultiscripts>
</math>;

A bit of calculus:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<!-- \int_a^b f(x)dx -->
<msubsup>
  <mo>&Integral;</mo>
  <mi>a</mi>
  <mi>b</mi>
</msubsup>
<mrow>
<mi>f</mi>
  <mo>(</mo>
  <mi>x</mi>
  <mo>)</mo>
  <mi>dx</mi>
</mrow>

<!-- \frac{\partial}{\partial x}F(x,y) + \frac{\partial}{\partial y}F(x,y) -->
<mrow>
  <mfrac>
    <mo>&PartialD;</mo>
    <mrow>
      <mo>&PartialD;</mo>
      <mi>x</mi>
    </mrow>
  </mfrac>
  <mrow>
    <mi>F</mi>
    <mo>(</mo>
    <mi>x</mi>
    <mo>,</mo>
    <mi>y</mi>
    <mo>)</mo>
  </mrow>  
  <mo>+</mo>
  <mfrac>
    <mo>&PartialD;</mo>
    <mrow>
      <mo>&PartialD;</mo>
      <mi>y</mi>
    </mrow>
  </mfrac>
  <mrow>
    <mi>F</mi>
    <mo>(</mo>
    <mi>x</mi>
    <mo>,</mo>
    <mi>y</mi>
    <mo>)</mo>
  </mrow>
</mrow>
</math>;

Here is the alphabet with invisible
portions wrapped by &lt;mphantom&gt; in between:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mi>a</mi>
  <mi>b</mi>
  <mi>c</mi> 
<mphantom>
  <mi>d</mi>
  <mi>e</mi>
  <mi>f</mi>
  <mi>g</mi>
  <mi>h</mi>
  <mi>i</mi>
  <mi>j</mi>
</mphantom>
  <mi>k</mi>
  <mi>l</mi>
  <mi>m</mi>
  <mi>n</mi>
  <mi>o</mi>
<mphantom>
  <mi>p</mi>
  <mi>q</mi>
  <mi>r</mi>
  <mi>s</mi>
</mphantom> 
  <mi>t</mi>
  <mi>u</mi>
  <mi>v</mi>
  <mi>w</mi>
  <mi>x</mi>
  <mi>y</mi>
  <mi>z</mi>
</math>.

Testing MathML &lt;msub&gt;:

<!-- a_b -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<msub>
  <mi>a</mi>
  <mi>b</mi>
</msub>
</math>;

<!-- a_i -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<msub>
  <mi>a</mi>
  <mi>i</mi>
</msub>
</math>;

<!-- A_{I_{k}} -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<msub>
  <mi>A</mi>
  <msub>
    <mi>I</mi>
    <mi>k</mi>
  </msub>
</msub>
</math>;


Testing MathML &lt;msup&gt;:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<!-- d^b -->
<msup>
  <mi>d</mi>
  <mi>b</mi>
</msup>

<!-- 2^{a_x} -->
<msup>
  <mn>2</mn>
  <msub>
    <mi>a</mi>
    <mi>x</mi>
  </msub>
</msup>

<!-- 2^{2^x} -->
<msup>
  <msup>
    <mn>2</mn>
    <mn>2</mn>
  </msup>
  <mi>x</mi>
</msup>

<!-- {\frac{1}{2}}^{y^{a_x}} -->
<msup>
  <mrow>
    <mo>(</mo>
    <mfrac>
      <mn>1</mn>
      <mn>2</mn>
    </mfrac>
    <mo>)</mo>
  </mrow>
  <msup>
    <mi>y</mi>
    <msub>
      <mi>a</mi>
      <mi>x</mi>
    </msub>
  </msup>
</msup>
</math>.

Testing MathML &lt;munder&gt;, &lt;mover&gt;, and &lt;munderover&gt;:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<munder>
  <mi>abcd</mi>
  <mi>un</mi>
</munder>

<mover>
  <mi>abcd</mi>
  <mi>ov</mi>
</mover>

<munderover>
  <mi>abcd</mi>
  <mi>under</mi>
  <mi>over</mi>
</munderover>
</math>.


Testing MathML &lt;msubsup&gt;:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<!-- a_b^c -->
<msubsup>
  <mi>a</mi>
  <mi>p</mi>
  <mi>q</mi>
</msubsup>

<!-- a_{b+c}^x -->
<msubsup>
  <mi>a</mi>
  <mrow>
    <mi>b</mi>
    <mo>+</mo>
    <mi>c</mi>
  </mrow>
  <mi>x</mi>
</msubsup>
</math>.


Testing MathML &lt;mrow&gt;:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<!-- d^{a/b} -->
<msup>
  <mi>d</mi>
  <mrow>
    <mo>(</mo>
    <mfrac>
      <mi>a</mi>
      <mi>b</mi>
    </mfrac>
    <mo>)</mo>
  </mrow>
</msup>
</math>;

<math xmlns="http://www.w3.org/1998/Math/MathML">
<!-- x^2  +  4*x  +  \frac{p}{q} = 0 --> 
<mrow>
  <mrow>
    <msup>
      <mi>x</mi>
      <mn>2</mn>
    </msup>
    <mo>+</mo>
    <mrow>
      <mn>4</mn>
      <mo>*</mo>
      <mi>x</mi>
    </mrow>
    <mo>+</mo>
    <mfrac>
      <mi>p</mi>
      <mi>q</mi>
    </mfrac>
  </mrow>
  <mo>=</mo>
  <mn>0</mn>
</mrow>
</math>,
    
with this &lt;mfrac&gt; hanging here

<math xmlns="http://www.w3.org/1998/Math/MathML">
<!-- \frac{d*T^{(\frac{i+j}{n})} + p_y*q} 
          {p^x*b_x + \frac{a+c}{d}} -->
<mfrac>
  <mrow>
    <mi>d</mi>
    <mo>*</mo>
    <msup>
      <mi>T</mi>
      <mrow>
        <mo>(</mo>
        <mfrac>
          <mrow>
            <mi>i</mi>
            <mo>+</mo>
            <mi>j</mi>
          </mrow>
          <mi>n</mi>
        </mfrac>
        <mo>)</mo>
      </mrow>
    </msup>
    <mo>+</mo>
    <msub>
      <mi>p</mi>
      <mi>y</mi>
    </msub>
    <mo>*</mo>
    <mi>q</mi>
  </mrow>
  <mrow>
    <msup>
      <mi>p</mi>
      <mi>x</mi>
    </msup>
    <mo>*</mo>
    <msub>
      <mi>b</mi>
      <mi>x</mi>
    </msub>
    <mo>+</mo>
    <mfrac>
      <mrow>
        <mi>a</mi>
        <mo>+</mo>
        <mi>c</mi>
      </mrow>
      <mi>d</mi>
    </mfrac>
  </mrow>
</mfrac>
</math>

in the middle of a lot of running text to try to explain what this
means to those who care to read.

Testing MathML merror, mtext,

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mtext>This is a text in mtext</mtext>
<merror><mtext>This is a text in merror</mtext></merror>
</math>

</div>

</body>
</html>
back to top