3 @setfilename mathml.info
4 @settitle Package mathml
12 @dircategory Mathematics/Maxima
14 * Package mathml: (maxima)Maxima share package mathml to generate Presentation MathML.
17 @node Top, Definitions for package mathml, (dir), (dir)
20 * Definitions for package mathml::
21 * Function and variable index::
23 @chapter Package mathml
25 @node Definitions for package mathml, Function and variable index, Top, Top
26 @section Definitions for package mathml
28 @deffn {Function} mathml
29 @*mathml (@var{expr}) @
30 @*mathml (@var{expr}, @var{filename}) @
31 @*mathml (@var{label}, @var{filename})
33 Convert an expression to Presentation MathML (version 2).
35 When the first argument is a label,
36 the label and its associated value are printed verbatim,
37 not typeset as MathML.
39 When the optional argument @var{filename} is supplied,
40 any output will be appended to the file.
42 @code{load("mathml");} loads this package.
47 (%i1) load ("mathml") $
48 (%i2) mathml (integrate (sin(x), x));
49 <math xmlns="http://www.w3.org/1998/Math/MathML"> <mo>-</mo>
50 <mi>cos</mi> <mi>x</mi> </math>
52 (%i3) integrate (1/(1 + x^3), x);
55 log(x - x + 1) sqrt(3) log(x + 1)
56 (%o3) (- ---------------) + ------------- + ----------
60 (%O3) (-log(x^2-x+1)/6)+atan((2*x-1)/sqrt(3))/sqrt(3)+log(x+1)/3;
65 <math xmlns="http://www.w3.org/1998/Math/MathML"> <mo>-</mo>
66 <mfrac><mrow><mi>log</mi> <mfenced separators=""><msup><mrow>
67 <mi>x</mi> </mrow> <mn>2</mn> </msup> <mo>-</mo> <mi>x</mi>
68 <mo>+</mo> <mn>1</mn> </mfenced> </mrow> <mrow><mn>6</mn>
69 </mrow></mfrac> <mo>+</mo> <mfrac><mrow><mi>arctan</mi>
70 <mfenced separators=""><mfrac><mrow><mn>2</mn>
71 <mspace width="thinmathspace"/><mi>x</mi> <mo>-</mo> <mn>1</mn>
72 </mrow> <mrow><msqrt><mn>3</mn> </msqrt></mrow></mfrac> </mfenced>
73 </mrow> <mrow><msqrt><mn>3</mn> </msqrt></mrow></mfrac> <mo>+</mo>
74 <mfrac><mrow><mi>log</mi> <mfenced separators=""><mi>x</mi>
75 <mo>+</mo> <mn>1</mn> </mfenced> </mrow> <mrow><mn>3</mn>
76 </mrow></mfrac> </math>
78 (%i6) mathml (''%o3, "/tmp/tmp.xml");
83 @node Function and variable index, , Definitions for package mathml, Top
84 @appendix Function and variable index