Bug 461267, bump version to 3.0.5pre/1.9.0.5pre, p=joduinn, r=nthomas
[mozilla-1.9.git] / layout / mathml / tests / mixing.xml
blob4d7d5e9c059e7889d6dd5f70bcea1d40f1c32e2d
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       xmlns:html="http://www.w3.org/1999/xhtml"
10       xmlns:math="http://www.w3.org/1998/Math/MathML"
11       xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
13 <!-- ***** BEGIN LICENSE BLOCK *****
14    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
15    -
16    - The contents of this file are subject to the Mozilla Public License Version
17    - 1.1 (the "License"); you may not use this file except in compliance with
18    - the License. You may obtain a copy of the License at
19    - http://www.mozilla.org/MPL/
20    -
21    - Software distributed under the License is distributed on an "AS IS" basis,
22    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
23    - for the specific language governing rights and limitations under the
24    - License.
25    -
26    - The Original Code is Mozilla MathML Project.
27    -
28    - The Initial Developer of the Original Code is
29    - The University of Queensland.
30    - Portions created by the Initial Developer are Copyright (C) 1999
31    - the Initial Developer. All Rights Reserved.
32    -
33    - Contributor(s):
34    -   Roger B. Sidje <rbs@maths.uq.edu.au>
35    -
36    - Alternatively, the contents of this file may be used under the terms of
37    - either the GNU General Public License Version 2 or later (the "GPL"), or
38    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
39    - in which case the provisions of the GPL or the LGPL are applicable instead
40    - of those above. If you wish to allow use of your version of this file only
41    - under the terms of either the GPL or the LGPL, and not to allow others to
42    - use your version of this file under the terms of the MPL, indicate your
43    - decision by deleting the provisions above and replace them with the notice
44    - and other provisions required by the LGPL or the GPL. If you do not delete
45    - the provisions above, a recipient may use your version of this file under
46    - the terms of any one of the MPL, the GPL or the LGPL.
47    -
48    - ***** END LICENSE BLOCK ***** -->
50 <head>
51   <title>Mixing MathML with other markup</title>
52 </head>
54 <body style="font-size: 18pt; 
55       background-color: gold;
56       background-image: url(resource:/res/samples/raptor.jpg);
57       background-repeat: no-repeat;
58       background-attachment: fixed;">
60 <h2 style="text-align: center; color: blue">
61 Mixing MathML markups and other markups to get special effects</h2>
63 <br />
65 A fraction with the animated throbber as denominator...
66 View the source...
68 <math mode="display" xmlns="http://www.w3.org/1998/Math/MathML">
69   <mfrac linethickness="3">
70     <mi>a</mi>
71     <html:img src="chrome://communicator/skin/brand/throbber-anim.gif" />
72   </mfrac>
73 </math>
75 Fill the gaps in this matrix with input fields
76 <math mode="display" xmlns="http://www.w3.org/1998/Math/MathML">
77 <mrow>
78   <mo>[</mo>
79   <mtable>
80     <mtr>
81       <mtd><mi>a</mi></mtd>
82       <mtd><html:input value="?" size="1"/></mtd>
83     </mtr>
84     <mtr>
85       <mtd><html:input value="?" size="1"/></mtd>      
86       <mtd><mi>d</mi></mtd>
87     </mtr>
88   </mtable>
89   <mo>]</mo>
90 </mrow>
91 </math>
92 <br />
95 See the difference of rendering between <br />
97 <math xmlns="http://www.w3.org/1998/Math/MathML">
98 <msup>
99   <mi fontstyle="italic">jif</mi>
100   <mi fontstyle="italic">jif</mi>
101 </msup>
102 </math> -- italic MathML &lt;msup&gt; and
104 <br />
106 <span><i>jif</i><sup><i>jif</i></sup></span> -- italic HTML &lt;sup&gt;
108 <br />
109 <br />
111 And there could be more...
113 <div style="text-align: center">
114   <button style="background-color:rgb(192,192,192)">
115      <span style="color: brown;">
116        For example, click this MathML continued fraction inside a HTML button<br />
117      </span> 
118      <math xmlns="&mathml;">
119        <mrow>
120          <mfrac>
121            <mi>&pi;</mi>
122            <mn>4</mn>
123          </mfrac>
124          <mo>=</mo>
125          <mfrac numalign="left">
126             <mstyle scriptlevel="0">
127               <mn>1</mn>
128             </mstyle>
129             <mstyle scriptlevel="0">
130                <mrow>
131                  <mn>2</mn>
132                  <mo>+</mo>
133                  <mfrac numalign="left">
134                    <mstyle scriptlevel="0">
135                      <msup><mn>1</mn><mn>2</mn></msup>
136                    </mstyle>
137                    <mstyle scriptlevel="0">
138                       <mrow>
139                         <mn>2</mn>
140                         <mo>+</mo>
141                         <mfrac numalign="left">
142                           <mstyle scriptlevel="0">
143                             <msup><mn>3</mn><mn>2</mn></msup>
144                           </mstyle>               
145                           <mstyle scriptlevel="0">
146                             <mrow>
147                                <mn>2</mn>
148                                <mo>+</mo>
149                                <mfrac numalign="left">
150                                  <mstyle scriptlevel="0">
151                                    <msup><mn>5</mn><mn>2</mn></msup>
152                                  </mstyle>
153                                  <mstyle scriptlevel="0">
154                                    <mrow>
155                                       <mn>2</mn>
156                                       <mo>+</mo>
157                                       <mfrac numalign="left">
158                                         <mstyle scriptlevel="0">
159                                           <msup><mn>7</mn><mn>2</mn></msup>
160                                         </mstyle>
161                                         <mstyle scriptlevel="0">
162                                           <mn>2</mn><mo>+</mo><mo fontweight="bold">...</mo>
163                                         </mstyle>
164                                       </mfrac>
165                                     </mrow>
166                                  </mstyle>
167                                </mfrac>
168                              </mrow>
169                           </mstyle>
170                         </mfrac>
171                       </mrow>
172                    </mstyle>
173                  </mfrac>      
174                </mrow> 
175             </mstyle> 
176          </mfrac>  
177       </mrow>
178     </math>
179   </button>
180 </div>
182 </body>
183 </html>