You can simulate how the functions work by loading the package.
The following demonstrates formatting output into HTML using the format OutputForm
; it is formatted to a page width set by the variable $PageWidth
An alternative to formatting into text is to format into an image; this is done for StandardForm
, creating an image file and saving it on the server. An img
tag, which can be used to retrieve the image, is then returned as the result.
By default, the images are in GIF format. This can be changed by specifying the format as a third argument. Here the image is stored in JPEG format.
It is also possible, though rather strange, to get a text-based format type (for example OutputForm
) rendered into an image.
The width that is used for typeset images is set by the variable $TypesetImageWidth
An alternative way to generate images is with the function MSPExportImage
. For information on image generation, see the section Displaying Mathematics and Graphics
If the format is set to MathMLForm
, the system will format the expression into MathML.
In addition, you can specify a content type of RawMathML
. This can be useful to get the MathML for the StandardForm
rendering of an expression. This output is raw in the sense that it does not use any reference to a plug-in, applet, or special browser that would be necessary to activate the MathML.
More information on working with MathML is provided in the section MathML