pjs/layout/mathml/tests/all-presentation.xml

398 строки
7.3 KiB
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">
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla MathML Project.
-
- The Initial Developer of the Original Code is
- The University of Queensland.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Roger B. Sidje <rbs@maths.uq.edu.au>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<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>