11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

46 webMathematica User GuideIf[integrand =!= Null,MSPFormat[Integrate[integrand,x], StandardForm]]carry out the integrationThis example shows how to generate typeset output with webMathematica.In this example, an msp:evaluate tag integrates an expression and uses MSPFormat to formatthe result with StandardForm. This generates an image and returns a reference to the image.For this to work, it is necessary to use the Mathematica front end.The example also demonstrates the use of page variables with MSPToExpression. This is analternative to using MSPBlock suitable in certain constructions, for example, when the input willbe used in a number of computations. The page variable integrand is initialized to Null andlater, if its value has been modified, the integration is carried out. It is assigned to the interpretedvalue of $$expr only if this input variable actually has a value. Note that if an error,such as a security error, is encountered in interpreting $$expr, an exception will be thrown andintegrand will remain assigned to Null.Note that MSPToExpression applies a security check to the input variable. You should be awarethat input variables are a major source of danger and always use the secure conversion functionsMSPBlock and MSPToExpression. In particular, you should never use ToExpression on aninput variable. The Security section documents the security system in more detail.It is also possible to return the result using MathML; this is described in greater detail in thesection on MathML. A further discussion on formatting mathematics and graphics is given in thesection on Displaying Mathematics and Graphics.

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

Saved successfully!

Ooh no, something went wrong!