13.07.2015 Views

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - 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.

<strong>Notebooks</strong> and <strong>Documents</strong> 71The string in StringForm acts somewhat like a “format directive” in the formatted output statementsof languages such as C and Fortran. You can determine how the expressions inStringForm will be formatted by wrapping them with standard output format functions.In[5]:=You can specify how the expressions in StringForm are formatted using standard outputformat functions.StringForm@"The `` of `` is ``.", TeXForm, a ê b, TeXForm@a ê bDDOut[5]= The TeXForm ofa bis \ frac 8a< 8b bIn input form, you can see the actual StringForm object.In[7]:=InputForm@%DOut[7]//InputForm= StringForm["Q: `` -> ``", a, b]This creates an ordinary string from the StringForm object.In[8]:=InputForm@ToString@%DDOut[8]//InputForm= "Q: a -> b"StringForm allows you to specify a “template string”, then fill in various expressions. Sometimesall you want to do is to concatenate together the output forms for a sequence of expressions.You can do this using Row.Row@8expr 1 ,expr 2 ,…

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

Saved successfully!

Ooh no, something went wrong!