Examples of Different Formats

This MSP demonstrates different examples of formatting output.

MSPFormat[ exp]

 
      2
Sin[x]

Block[ {$MSPFormatType = OutputForm}, MSPFormat[ exp]]

 
      2
Sin[x]

Block[ {$MSPFormatType = StandardForm}, MSPFormat[ exp]]

Created by webMathematica

Block[ {$MSPFormatType = TraditionalForm}, MSPFormat[ exp]]

Created by webMathematica

MSPFormat[ exp, OutputForm]

 
      2
Sin[x]

MSPFormat[ exp, InputForm]

 
Sin[x]^2

MSPFormat[ exp, StandardForm]

Created by webMathematica

MSPFormat[ exp, TraditionalForm]

Created by webMathematica

MSPFormat[ exp, MathMLForm]

 
<math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='TraditionalForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <msup>
   <mi>sin</mi>
   <mn>2</mn>
  </msup>
  <mo>(</mo>
  <mi>x</mi>
  <mo>)</mo>
 </mrow>
</math>

MSPFormat[ exp, OutputForm, "GIF"]

Created by webMathematica

MSPFormat[ exp, StandardForm, "JPEG"]

Created by webMathematica

MSPFormat[ exp, OutputForm, "RawMathML"]

 
      2
Sin[x]

MSPFormat[ exp, StandardForm, "RawMathML"]

 
<math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='StandardForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <msup>
  <mrow>
   <mi>Sin</mi>
   <mo>[</mo>
   <mi>x</mi>
   <mo>]</mo>
  </mrow>
  <mn>2</mn>
 </msup>
</math>

MSPFormat[ exp, OutputForm, "techexplorer"]

%% %% This is an IBM techexplorer Hypermedia Browser(TM)-compatible %% document generated by automatic conversion of a Mathematica %% notebook using Mathematica 5.0. \documentclass{article} \usepackage{wolfram} \begin{document} \begin{MathematicaOutput}{i0}{MathML} 2 Sin[x] \end{MathematicaOutput} \end{document}

MSPFormat[ exp, StandardForm, "techexplorer"]

%% %% This is an IBM techexplorer Hypermedia Browser(TM)-compatible %% document generated by automatic conversion of a Mathematica %% notebook using Mathematica 5.0. \documentclass{article} \usepackage{wolfram} \begin{document} \begin{MathematicaOutput}{i0}{MathML} Sin [ x ] 2 \end{MathematicaOutput} \end{document}
Enter a new expression: