Bug 461267, bump version to 3.0.5pre/1.9.0.5pre, p=joduinn, r=nthomas
[mozilla-1.9.git] / layout / mathml / tests / all-presentation.xml
blob6aebd79f6c572b287f63e15a0f8c0781f7f5cde8
1 <?xml version="1.0"?>
2 <!DOCTYPE html PUBLIC
3   "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
4   "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd"
6   <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
7 ]>
8 <html xmlns="http://www.w3.org/1999/xhtml">
9 <!-- ***** BEGIN LICENSE BLOCK *****
10    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
11    -
12    - The contents of this file are subject to the Mozilla Public License Version
13    - 1.1 (the "License"); you may not use this file except in compliance with
14    - the License. You may obtain a copy of the License at
15    - http://www.mozilla.org/MPL/
16    -
17    - Software distributed under the License is distributed on an "AS IS" basis,
18    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
19    - for the specific language governing rights and limitations under the
20    - License.
21    -
22    - The Original Code is Mozilla MathML Project.
23    -
24    - The Initial Developer of the Original Code is
25    - The University of Queensland.
26    - Portions created by the Initial Developer are Copyright (C) 1999
27    - the Initial Developer. All Rights Reserved.
28    -
29    - Contributor(s):
30    -   Roger B. Sidje <rbs@maths.uq.edu.au>
31    -
32    - Alternatively, the contents of this file may be used under the terms of
33    - either the GNU General Public License Version 2 or later (the "GPL"), or
34    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
35    - in which case the provisions of the GPL or the LGPL are applicable instead
36    - of those above. If you wish to allow use of your version of this file only
37    - under the terms of either the GPL or the LGPL, and not to allow others to
38    - use your version of this file under the terms of the MPL, indicate your
39    - decision by deleting the provisions above and replace them with the notice
40    - and other provisions required by the LGPL or the GPL. If you do not delete
41    - the provisions above, a recipient may use your version of this file under
42    - the terms of any one of the MPL, the GPL or the LGPL.
43    -
44    - ***** END LICENSE BLOCK ***** -->
46 <head>
47   <title>Examples of Presentation Markup</title>
48 </head>
49 <body>
52 Testing tensor indices &lt;mmultiscripts&gt;:
54 <!-- {3 \atop k} R {1 \atop i} {2 \atop j} -->
55 <math xmlns="http://www.w3.org/1998/Math/MathML">
56 <mmultiscripts>
57   <mi>R</mi>
58   <mi>i</mi><mi>1</mi>
59   <mi>j</mi><mi>2</mi>
60     <mprescripts/>
61   <mi>k</mi><mi>3</mi>
62 </mmultiscripts>
63 </math>;
65 This with &lt;none/&gt;, 
67 <!-- {{} \atop i} A {p \atop q} -->
68 <math xmlns="http://www.w3.org/1998/Math/MathML">
69 <mmultiscripts>
70   <mi>A</mi>
71   <mi>q</mi><mi>p</mi>
72     <mprescripts/>
73   <mi>i</mi><none/>
74 </mmultiscripts>
75 </math>;
77 A bit of calculus:
79 <math xmlns="http://www.w3.org/1998/Math/MathML">
80 <!-- \int_a^b f(x)dx -->
81 <msubsup>
82   <mo>&Integral;</mo>
83   <mi>a</mi>
84   <mi>b</mi>
85 </msubsup>
86 <mrow>
87 <mi>f</mi>
88   <mo>(</mo>
89   <mi>x</mi>
90   <mo>)</mo>
91   <mi>dx</mi>
92 </mrow>
94 <!-- \frac{\partial}{\partial x}F(x,y) + \frac{\partial}{\partial y}F(x,y) -->
95 <mrow>
96   <mfrac>
97     <mo>&PartialD;</mo>
98     <mrow>
99       <mo>&PartialD;</mo>
100       <mi>x</mi>
101     </mrow>
102   </mfrac>
103   <mrow>
104     <mi>F</mi>
105     <mo>(</mo>
106     <mi>x</mi>
107     <mo>,</mo>
108     <mi>y</mi>
109     <mo>)</mo>
110   </mrow>  
111   <mo>+</mo>
112   <mfrac>
113     <mo>&PartialD;</mo>
114     <mrow>
115       <mo>&PartialD;</mo>
116       <mi>y</mi>
117     </mrow>
118   </mfrac>
119   <mrow>
120     <mi>F</mi>
121     <mo>(</mo>
122     <mi>x</mi>
123     <mo>,</mo>
124     <mi>y</mi>
125     <mo>)</mo>
126   </mrow>
127 </mrow>
128 </math>;
130 Here is the alphabet with invisible
131 portions wrapped by &lt;mphantom&gt; in between:
133 <math xmlns="http://www.w3.org/1998/Math/MathML">
134   <mi>a</mi>
135   <mi>b</mi>
136   <mi>c</mi> 
137 <mphantom>
138   <mi>d</mi>
139   <mi>e</mi>
140   <mi>f</mi>
141   <mi>g</mi>
142   <mi>h</mi>
143   <mi>i</mi>
144   <mi>j</mi>
145 </mphantom>
146   <mi>k</mi>
147   <mi>l</mi>
148   <mi>m</mi>
149   <mi>n</mi>
150   <mi>o</mi>
151 <mphantom>
152   <mi>p</mi>
153   <mi>q</mi>
154   <mi>r</mi>
155   <mi>s</mi>
156 </mphantom> 
157   <mi>t</mi>
158   <mi>u</mi>
159   <mi>v</mi>
160   <mi>w</mi>
161   <mi>x</mi>
162   <mi>y</mi>
163   <mi>z</mi>
164 </math>.
166 Testing MathML &lt;msub&gt;:
168 <!-- a_b -->
169 <math xmlns="http://www.w3.org/1998/Math/MathML">
170 <msub>
171   <mi>a</mi>
172   <mi>b</mi>
173 </msub>
174 </math>;
176 <!-- a_i -->
177 <math xmlns="http://www.w3.org/1998/Math/MathML">
178 <msub>
179   <mi>a</mi>
180   <mi>i</mi>
181 </msub>
182 </math>;
184 <!-- A_{I_{k}} -->
185 <math xmlns="http://www.w3.org/1998/Math/MathML">
186 <msub>
187   <mi>A</mi>
188   <msub>
189     <mi>I</mi>
190     <mi>k</mi>
191   </msub>
192 </msub>
193 </math>;
196 Testing MathML &lt;msup&gt;:
198 <math xmlns="http://www.w3.org/1998/Math/MathML">
199 <!-- d^b -->
200 <msup>
201   <mi>d</mi>
202   <mi>b</mi>
203 </msup>
205 <!-- 2^{a_x} -->
206 <msup>
207   <mn>2</mn>
208   <msub>
209     <mi>a</mi>
210     <mi>x</mi>
211   </msub>
212 </msup>
214 <!-- 2^{2^x} -->
215 <msup>
216   <msup>
217     <mn>2</mn>
218     <mn>2</mn>
219   </msup>
220   <mi>x</mi>
221 </msup>
223 <!-- {\frac{1}{2}}^{y^{a_x}} -->
224 <msup>
225   <mrow>
226     <mo>(</mo>
227     <mfrac>
228       <mn>1</mn>
229       <mn>2</mn>
230     </mfrac>
231     <mo>)</mo>
232   </mrow>
233   <msup>
234     <mi>y</mi>
235     <msub>
236       <mi>a</mi>
237       <mi>x</mi>
238     </msub>
239   </msup>
240 </msup>
241 </math>.
243 Testing MathML &lt;munder&gt;, &lt;mover&gt;, and &lt;munderover&gt;:
245 <math xmlns="http://www.w3.org/1998/Math/MathML">
246 <munder>
247   <mi>abcd</mi>
248   <mi>un</mi>
249 </munder>
251 <mover>
252   <mi>abcd</mi>
253   <mi>ov</mi>
254 </mover>
256 <munderover>
257   <mi>abcd</mi>
258   <mi>under</mi>
259   <mi>over</mi>
260 </munderover>
261 </math>.
264 Testing MathML &lt;msubsup&gt;:
266 <math xmlns="http://www.w3.org/1998/Math/MathML">
267 <!-- a_b^c -->
268 <msubsup>
269   <mi>a</mi>
270   <mi>p</mi>
271   <mi>q</mi>
272 </msubsup>
274 <!-- a_{b+c}^x -->
275 <msubsup>
276   <mi>a</mi>
277   <mrow>
278     <mi>b</mi>
279     <mo>+</mo>
280     <mi>c</mi>
281   </mrow>
282   <mi>x</mi>
283 </msubsup>
284 </math>.
287 Testing MathML &lt;mrow&gt;:
289 <math xmlns="http://www.w3.org/1998/Math/MathML">
290 <!-- d^{a/b} -->
291 <msup>
292   <mi>d</mi>
293   <mrow>
294     <mo>(</mo>
295     <mfrac>
296       <mi>a</mi>
297       <mi>b</mi>
298     </mfrac>
299     <mo>)</mo>
300   </mrow>
301 </msup>
302 </math>;
304 <math xmlns="http://www.w3.org/1998/Math/MathML">
305 <!-- x^2  +  4*x  +  \frac{p}{q} = 0 --> 
306 <mrow>
307   <mrow>
308     <msup>
309       <mi>x</mi>
310       <mn>2</mn>
311     </msup>
312     <mo>+</mo>
313     <mrow>
314       <mn>4</mn>
315       <mo>*</mo>
316       <mi>x</mi>
317     </mrow>
318     <mo>+</mo>
319     <mfrac>
320       <mi>p</mi>
321       <mi>q</mi>
322     </mfrac>
323   </mrow>
324   <mo>=</mo>
325   <mn>0</mn>
326 </mrow>
327 </math>,
328     
329 with this &lt;mfrac&gt; hanging here
331 <math xmlns="http://www.w3.org/1998/Math/MathML">
332 <!-- \frac{d*T^{(\frac{i+j}{n})} + p_y*q} 
333           {p^x*b_x + \frac{a+c}{d}} -->
334 <mfrac>
335   <mrow>
336     <mi>d</mi>
337     <mo>*</mo>
338     <msup>
339       <mi>T</mi>
340       <mrow>
341         <mo>(</mo>
342         <mfrac>
343           <mrow>
344             <mi>i</mi>
345             <mo>+</mo>
346             <mi>j</mi>
347           </mrow>
348           <mi>n</mi>
349         </mfrac>
350         <mo>)</mo>
351       </mrow>
352     </msup>
353     <mo>+</mo>
354     <msub>
355       <mi>p</mi>
356       <mi>y</mi>
357     </msub>
358     <mo>*</mo>
359     <mi>q</mi>
360   </mrow>
361   <mrow>
362     <msup>
363       <mi>p</mi>
364       <mi>x</mi>
365     </msup>
366     <mo>*</mo>
367     <msub>
368       <mi>b</mi>
369       <mi>x</mi>
370     </msub>
371     <mo>+</mo>
372     <mfrac>
373       <mrow>
374         <mi>a</mi>
375         <mo>+</mo>
376         <mi>c</mi>
377       </mrow>
378       <mi>d</mi>
379     </mfrac>
380   </mrow>
381 </mfrac>
382 </math>
384 in the middle of a lot of running text to try to explain what this
385 means to those who care to read.
387 Testing MathML merror, mtext,
389 <math xmlns="http://www.w3.org/1998/Math/MathML">
390 <mtext>This is a text in mtext</mtext>
391 <merror>This is a text in merror</merror>
392 </math>
394 </body>
395 </html>