11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

webMathematica User Guide 233The following demonstrates formatting output into HTML using the format OutputForm; it is formatted to apage width set by the variable $PageWidth.In[1]:=Needs@"MSP`"DIn[2]:=MSPFormat@ x + y^2, OutputFormDOut[2]= &Ò160;&Ò160;&Ò160;&Ò160;&Ò160;2x&Ò160;+&Ò160;yAn alternative to formatting into text is to format into an image; this is done for StandardForm and TradiÖtionalForm, creating an image file and saving it on the server. An img tag, which can be used to retrievethe image, is then returned as the result.In[3]:=Out[3]=MSPFormat@ x + y, StandardFormDBy 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.In[4]:=Out[4]=MSPFormat@ x + y, StandardForm, "JPEG"DIt is also possible, though rather strange, to get a text-based format type (for example OutputForm)rendered into an image.In[5]:=Out[5]=MSPFormat@ x + y, OutputForm, "GIF"DThe 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 imagegeneration, see the section Displaying Mathematics and Graphics.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!