MathML - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

codegen

 MathML
 generate MathML text

 Calling Sequence MathML(expr, opts)

Parameters

 expr - Maple expression opts - (optional) one or more options having the form output=style or filename=fn

Description

 • The MathML(expr, opts) function translates the Maple expression expr to MathML text.
 • The output=style option, where style is one of content, presentation, or parallel, can be included. If the output=content option is provided, then content-only MathML is produced.  If the output=presentation option is provided, then presentation-only MathML is produced.  Otherwise, parallel (both content and export) MathML is produced as the default.  See the MathML package help page for a description of the parallel, content-only and presentation-only encodings, and for additional information about MathML.
 • The filename=fn option is used to direct the output to the file with name fn, where fn is a string or symbol.  Otherwise, the default output stream is used. If you are using the MathML command interactively, the default output stream is the terminal screen.
 • The function MathML produces MathML code as a side-effect and returns NULL as the function value. Therefore, the ditto commands (% and %%) do not recall the output from the MathML command.
 • The command with(codegen,MathML) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{codegen}\right):$
 > $\mathrm{MathML}\left(2x+3\right)$
                        2                  x              +       3                                                         2           x                  3                 2*x+3    [/itex]
 > $\mathrm{MathML}\left(4\mathrm{cos}\left(x\right),\mathrm{output}=\mathrm{content}\right)$
             4                   x         [/itex]
 > $\mathrm{MathML}\left(4\mathrm{cos}\left(x\right),\mathrm{output}=\mathrm{presentation}\right)$
        4                 cos                       x                [/itex]

 See Also