Back out changeset fecc8ed9e813.
[mozilla-central.git] / layout / mathml / tests / stretchy.xml
blobef706456240b5046246e9ceede811ca72bf8abd5
1 <?xml version="1.0"?>
2 <!-- ***** BEGIN LICENSE BLOCK *****
3    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
4    -
5    - The contents of this file are subject to the Mozilla Public License Version
6    - 1.1 (the "License"); you may not use this file except in compliance with
7    - the License. You may obtain a copy of the License at
8    - http://www.mozilla.org/MPL/
9    -
10    - Software distributed under the License is distributed on an "AS IS" basis,
11    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12    - for the specific language governing rights and limitations under the
13    - License.
14    -
15    - The Original Code is Mozilla MathML Project.
16    -
17    - The Initial Developer of the Original Code is
18    - The University of Queensland.
19    - Portions created by the Initial Developer are Copyright (C) 1999
20    - the Initial Developer. All Rights Reserved.
21    -
22    - Contributor(s):
23    -  Roger B. Sidje <rbs@maths.uq.edu.au>
24    -
25    - Alternatively, the contents of this file may be used under the terms of
26    - either the GNU General Public License Version 2 or later (the "GPL"), or
27    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28    - in which case the provisions of the GPL or the LGPL are applicable instead
29    - of those above. If you wish to allow use of your version of this file only
30    - under the terms of either the GPL or the LGPL, and not to allow others to
31    - use your version of this file under the terms of the MPL, indicate your
32    - decision by deleting the provisions above and replace them with the notice
33    - and other provisions required by the LGPL or the GPL. If you do not delete
34    - the provisions above, a recipient may use your version of this file under
35    - the terms of any one of the MPL, the GPL or the LGPL.
36    -
37    - ***** END LICENSE BLOCK ***** -->
38 <!DOCTYPE html PUBLIC
39   "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
40   "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd"
42   <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
44 <html xmlns="http://www.w3.org/1999/xhtml">
46 <head>
47   <title>Testing stretchy MathML symbols</title>
48 </head>
49 <body>
51 <div>
52 Testing stretchy symbols -- view the source...
54 <math xmlns="http://www.w3.org/1998/Math/MathML">
55 <msup>
56   <mrow>
57     <mo symmetric='false' minsize='3'>(</mo>
58     <mo>...</mo>
59     <msup>
60       <mrow>
61         <mo symmetric='false' minsize='2'>(</mo>
62         <msup>
63           <mrow>
64             <mo symmetric='false'>(</mo>
65             <msub><mi>a</mi><mn>0</mn></msub>
66             <mo>+</mo>
67             <msub><mi>a</mi><mn>1</mn></msub>
68             <mo symmetric='false'>)</mo>
69           </mrow>
70           <msub><mi>n</mi><mn>1</mn></msub>
71         </msup>
72         <mo>+</mo>
73         <msub><mi>a</mi><mn>2</mn></msub>
74         <mo symmetric='false' minsize='2'>)</mo>
75       </mrow>    
76       <msub><mi>n</mi><mn>2</mn></msub>
77     </msup>
78     <mo>+</mo><mo>...</mo><mo>+</mo>
79     <msup><mi>a</mi><mi>p</mi></msup>
80     <mo symmetric='false' minsize='3'>)</mo>
81   </mrow>
82   <msup><mi>n</mi><mi>p</mi></msup>
83 </msup>
84 </math>
87 <math xmlns="http://www.w3.org/1998/Math/MathML">
88 <mrow>
89   <mi>A</mi>
90   <mo>=</mo>
91   <mfenced open="[" close="]">
92     <mtable>
93       <mtr>
94         <mtd><mi>x</mi></mtd>
95         <mtd><mi>y</mi></mtd>
96       </mtr>
97       <mtr>
98         <mtd><mi>z</mi></mtd>
99         <mtd><mi>w</mi></mtd>
100       </mtr>
101     </mtable>
102   </mfenced>
103 </mrow>
104 <mo>;</mo>
105 </math>
107 <math xmlns="http://www.w3.org/1998/Math/MathML">
108 <mrow>
109     <mi>x</mi>
110     <mo>+</mo>
111     <mrow>
112         <mo>(</mo>
113         <mfrac linethickness="30">
114             <mi>a</mi>
115             <mi>b</mi>
116         </mfrac>
117         <mo stretchy="false">)</mo>
118     </mrow>
119 </mrow>
120 <mo>;</mo>
121 </math>
123 in binomial formulas
125 <math xmlns="http://www.w3.org/1998/Math/MathML">
126 <mrow>
127     <mo>(</mo>
128     <mfrac linethickness="0">
129        <mi>n</mi>
130        <mi>p</mi>
131     </mfrac>
132     <mo>)</mo>
133 </mrow>
135 <mo>=</mo>
136   
137 <mrow>
138     <mrow>
139        <mo>(</mo>
140        <mfrac linethickness="0">
141            <mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow>
142            <mi>p</mi>
143        </mfrac>
144        <mo>)</mo>
145     </mrow>
146     
147     <mo>+</mo>
148     
149     <mrow>
150        <mo>(</mo>
151        <mfrac linethickness="0">
152           <mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow>
153           <mrow><mi>p</mi><mo>-</mo><mn>1</mn></mrow>
154        </mfrac>
155        <mo>)</mo>
156     </mrow>
158     <mo>;</mo>
159 </mrow>
162 <mrow>
163   <msup>
164      <mrow>
165         <mo>(</mo>
166         <mi>a</mi>
167         <mo>+</mo>
168         <mi>b</mi>
169         <mo>)</mo>
170      </mrow>
171      <mi>n</mi>
172   </msup>
174   <mo>=</mo>
176   <msup>
177      <mi>a</mi>
178      <mi>n</mi>
179   </msup>
181   <mo>+</mo>
183   <mrow>
184      <mrow>
185         <mo>(</mo>
186         <mfrac linethickness="0">
187            <mi>n</mi>
188            <mi>1</mi>
189         </mfrac>
190         <mo>)</mo>
191      </mrow>
192      <msup>
193         <mi>a</mi>
194         <mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow>
195      </msup>
196      <mi>b</mi>
197   </mrow>
199   <mo>+</mo>
200   <mo>...</mo>
201   <mo>+</mo>
203   <mrow>
204      <mrow>
205         <mo>(</mo>
206         <mfrac linethickness="0">
207            <mi>n</mi>
208            <mi>p</mi>
209         </mfrac>
210         <mo>)</mo>
211      </mrow>
212      <msup>
213         <mi>a</mi>
214         <mrow><mi>n</mi><mo>-</mo><mi>p</mi></mrow>
215      </msup>
216      <msup>
217         <mi>b</mi>
218         <mi>p</mi>
219      </msup>
220   </mrow>
222   <mo>+</mo>
223   <mo>...</mo>
224   <mo>+</mo>
226   <msup>
227      <mi>b</mi>
228      <mi>n</mi>
229   </msup>
230 </mrow>
231 </math>
234 and elsewhere,
236 <math xmlns="http://www.w3.org/1998/Math/MathML">
237 <mrow>
238 <mo symmetric='false'>{</mo>
240 <mrow>
241   <msub>
242      <mi>a</mi>
243      <mn>0</mn>
244   </msub>
245   <mo>+</mo>
246   <mfrac>
247      <mstyle scriptlevel="0">
248         <mn>1</mn>
249      </mstyle>
250      <mstyle scriptlevel="0">
251         <mrow>
252           <msub>
253              <mi>a</mi>
254              <mn>1</mn>
255           </msub>
256           <mo>+</mo>
257           <mfrac>
258             <mstyle scriptlevel="0">
259                <mn>1</mn>
260             </mstyle>
261             <mstyle scriptlevel="0">
262                <mrow>
263                  <msub>
264                     <mi>a</mi>
265                     <mn>2</mn>
266                  </msub>
267                  <mo>+</mo>
268                  <mfrac>
269                       <mstyle scriptlevel="0">               
270                       <mn>1</mn>
271                       </mstyle>
272                       <mstyle scriptlevel="0">                              
273                       <msub>
274                          <mi>a</mi>
275                          <mn>3</mn>
276                       </msub>
277                     </mstyle>
278                  </mfrac>      
279                </mrow>
280             </mstyle>
281           </mfrac>      
282         </mrow> 
283      </mstyle> 
284   </mfrac>  
285 </mrow>
286 </mrow>
288 <mo>;</mo>
290 <mover>
291    <mrow> <mi>aa</mi> <mo>+</mo> <mi>bb</mi> </mrow>
292    <mo>&OverBrace;</mo>
293 </mover>
295 <mo>;</mo>
297 <munder>
298    <mrow> <mi>b</mi> <mo>+</mo> <mi>c</mi> <mo>+</mo> <mi>d</mi></mrow>
299    <mo form="infix">&RightArrow;</mo>
300 </munder>
302 <mo>;</mo>
304 <munderover>
305    <mrow> <mi>a</mi> <mo>+</mo> <mi>b</mi> <mo>+</mo> 
306           <mi>c</mi> <mo>+</mo> <mi>d</mi></mrow>
307    <mo form="infix">&RightArrow;</mo>
308    <mo form="infix">&LeftArrow;</mo>
309 </munderover>
311 <mo>;</mo>
313      <mrow>
314          <mo>(</mo><mfrac>
315                      <mrow>
316                         <mn>1</mn>
317                         <mo>+</mo>
318                         <msqrt><mn>5</mn></msqrt>
319                      </mrow>
320                      <mn>2</mn>
321          </mfrac><mo>)</mo>  
322      </mrow>
324 <mo>;</mo>
325      
326 <mrow>
327   <mi>x</mi>
328   <mo>=</mo>
329   <mfrac>
330     <mrow>
331       <mrow>
332         <mo>-</mo>
333         <mi>b</mi>
334       </mrow>
335       <mo>&PlusMinus;</mo>
336       <msqrt>
337         <mrow>
338           <msup>
339             <mi>b</mi>
340             <mn>2</mn>
341           </msup>
342           <mo>-</mo>
343           <mrow>
344             <mn>4</mn>
345             <mo>&InvisibleTimes;</mo>
346             <mi>a</mi>
347             <mo>&InvisibleTimes;</mo>
348             <mi>c</mi>
349           </mrow>
350         </mrow>
351       </msqrt>
352     </mrow>
353     <mrow>
354       <mn>2</mn>
355       <mo>&InvisibleTimes;</mo>
356       <mi>a</mi>
357     </mrow>
358   </mfrac>
359 </mrow>
361   <mrow>
362      <mo form="prefix">(</mo>
363      <mo form="prefix">{</mo>
364      <mo form="infix">&UpArrow;</mo>
365      <mrow>
366         <mo>&#x222B;</mo>
367         <mfrac linethickness="26">
368            <mfrac>     
369               <mrow><mi>n</mi>
370                     <mrow>
371                        <mo>{</mo>
372                        <mi>n</mi>
373                        <mo>+</mo>
374                        <mn>1</mn>
375                        <mo>)</mo>
376                     </mrow>
377               </mrow>
378               <mn>2</mn>
379            </mfrac>
380            <mi>y</mi>
381         </mfrac>
382         <mo>&DownArrow;</mo>
383         <mo form="postfix">}</mo>
384         <mo form="postfix">)</mo>
385      </mrow>
386   </mrow>
388 <mrow>
389         <mi>x</mi>
390         <mover>
391            <mo form="infix">&RightArrow;</mo>
392            <mtext> maps to </mtext>
393         </mover>
394         <mi>y</mi>
395 </mrow>
396      
397 </math>
399 </div>
401 </body>
402 </html>