Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » writing documentation » handling hypertext » mathML
next | previous | forward | backward | up | index | toc

# mathML -- convert to MathML format

- Usage:
    `mathML x`
- Inputs:
  - x, any Macaulay2 object
- Outputs:
  - a string, x converted to ML format

## Description

    i1 : R = ZZ[x,y];

    i2 : mathML (x+2*y-1)^2

    o2 = <mrow><msup><mi>x</mi><mn>2</mn></msup>
         <mo>+</mo><mrow><mn>4</mn><mspace width="0.1667em"></mspace><mi>x</mi><mspace width="0.1667em"></mspace><mi>y</mi></mrow>
         <mo>+</mo><mrow><mn>4</mn><mspace width="0.1667em"></mspace><msup><mi>y</mi><mn>2</mn></msup></mrow>
         <mo>-</mo><mrow><mn>2</mn><mspace width="0.1667em"></mspace><mi>x</mi></mrow>
         <mo>-</mo><mrow><mn>4</mn><mspace width="0.1667em"></mspace><mi>y</mi></mrow>
         <mo>+</mo><mn>1</mn>
         </mrow>

    i3 : mathML matrix {{x,y},{x^2+2,0}}

    o3 = <mo>(</mo><mtable columnalign="center">
         <mtr><mtd><mi>x</mi></mtd>
         <mtd><mi>y</mi></mtd>
         </mtr>
         <mtr><mtd><mrow><msup><mi>x</mi><mn>2</mn></msup>
         <mo>+</mo><mn>2</mn>
         </mrow>
         </mtd>
         <mtd><mn>0</mn></mtd>
         </mtr>
         </mtable>
         <mo>)</mo>

## See also

- tex -- convert to $\TeX$ format
- texMath -- convert to TeX math format

## For the programmer

The object mathML is a method function with a single argument.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/mathML-doc.m2:26:0.