({{, (RefLink[OutputForm, paclet:ref/OutputForm])[expr]
prints as a two-dimensional representation of expr using only keyboard characters. }})

OpenersNotesSection(Spacer1)Details

(RefLink[OutputForm, paclet:ref/OutputForm]) is an approximation to (RefLink[StandardForm, paclet:ref/StandardForm]) which uses only ordinary keyboard characters.

The (RefLink[OutputForm, paclet:ref/OutputForm]) of many kinds of expressions is quite different from their internal representation.

(RefLink[OutputForm, paclet:ref/OutputForm]) acts as a "wrapper", which affects printing, but not evaluation. »

(RefLink[OutputForm, paclet:ref/OutputForm]) cannot be used directly for input to the Wolfram Language.

When possible, (RefLink[OutputForm, paclet:ref/OutputForm]) uses approximations to special characters. Thus ≥ is given as >= and é as e'. »

OpenersPrimaryExamplesSection(Spacer1)Examples  (15)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

(RefLink[OutputForm, paclet:ref/OutputForm]) of a typeset expression:

OutputForm[(x/(Sqrt[5]))+(y^2)+1/z]

(RefLink[OutputForm, paclet:ref/OutputForm]) of a graphic:

//OutputForm

OpenersExampleSection1(Spacer1)Scope  (8)

OpenersExampleSubsection0(Spacer1)Basic Objects  (2)

(RefLink[Integer, paclet:ref/Integer]), (RefLink[Rational, paclet:ref/Rational]), (RefLink[Real, paclet:ref/Real]), and (RefLink[Complex, paclet:ref/Complex]) numbers:

Map[OutputForm,{123,1/23,1.23,1+23I}]

Arbitrary-precision (RefLink[Real, paclet:ref/Real]) and (RefLink[Complex, paclet:ref/Complex]) numbers:

OutputForm/@N[{10/3,10/3I},20]

Special constants:

OutputForm/@{I,π,E}

Characters and strings of characters:

OutputForm/@{"a","α","⊕"}

Control characters for strings:

OutputForm["A first line
A second line"]

OpenersExampleSubsection1(Spacer1)Special Input Forms  (4)

Different (RefLink[Power, paclet:ref/Power]) expressions:

OutputForm/@{a^x,(a^x),(a^(1/3)),Exp[x],1/x,(1/x)}

Special typeset expressions:

OutputForm/@{y'[x],∫y[x]\[DifferentialD]x,(∑_(k=1)^n)y[k],(∏_(k=1)^n)y[k],x∈Reals,x∧y∨z}

Different list structures:

OutputForm[{1,2,3}]

OutputForm/@{(({{a, b, c}, {d, e, f}})),{{a,b,c},{d,e,f}}}

Inputs with subscripts, superscripts, etc.:

OutputForm/@{(Subscript[x, a]),(x^a),(Overscript[x, a]),(Underscript[x, a])}

OpenersExampleSubsection2(Spacer1)Special Output Forms  (2)

Some objects use a special output representation:

ser=Series[Sin[x],{x,0,3}]

Compare the (RefLink[OutputForm, paclet:ref/OutputForm]) with the underlying (RefLink[FullForm, paclet:ref/FullForm]) of the expression:

OutputForm[ser]

FullForm[ser]

Some objects use an elided output representation:

sp=SparseArray[{{1,2}->1},{5,5}]

OutputForm[sp]

The elided information is visible in the (RefLink[FullForm, paclet:ref/FullForm]):

FullForm[sp]

OpenersExampleSection2(Spacer1)Properties & Relations  (5)

(RefLink[OutputForm, paclet:ref/OutputForm]) affects display but not evaluation:

OutputForm[Integrate[x^n,x]]

Apply (RefLink[OutputForm, paclet:ref/OutputForm]) to the evaluated integral:

Integrate[x^n,x]

OutputForm[%]

Special characters format as keyboard characters:

a≥b

OutputForm[%]

(RefLink[OutputForm, paclet:ref/OutputForm]) formats in two dimensions:

OutputForm[Exp[I x/n]]

(RefLink[StandardForm, paclet:ref/StandardForm]) and (RefLink[TraditionalForm, paclet:ref/TraditionalForm]) are two-dimensional with additional formatting:

StandardForm[Exp[I x/n]]

TraditionalForm[Exp[I x/n]]

(RefLink[InputForm, paclet:ref/InputForm]) and (RefLink[FullForm, paclet:ref/FullForm]) provide one-dimensional formatting:

InputForm[Exp[I x/n]]

FullForm[Exp[I x/n]]

Use (RefLink[ToString, paclet:ref/ToString]) to generate a string in (RefLink[OutputForm, paclet:ref/OutputForm]):

ToString[1/a+x^2,OutputForm]

Head[%]

Add formatting via (RefLink[Format, paclet:ref/Format]):

bin[x,y]//OutputForm

Format[bin[x_,y_],OutputForm]:=MatrixForm[{{x},{y}}]

bin[x,y]//OutputForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TextString, paclet:ref/TextString])  ▪  (RefLink[StandardForm, paclet:ref/StandardForm])  ▪  (RefLink[TraditionalForm, paclet:ref/TraditionalForm])  ▪  (RefLink[InputForm, paclet:ref/InputForm])  ▪  (RefLink[TeXForm, paclet:ref/TeXForm])  ▪  (RefLink[MathMLForm, paclet:ref/MathMLForm])  ▪  (RefLink[Short, paclet:ref/Short])  ▪  (RefLink[FullForm, paclet:ref/FullForm])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Forms of Input and Output, paclet:tutorial/FormsOfInputAndOutput])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Display of Numbers, paclet:guide/DisplayOfNumbers])}, {▪(RefLinkPlain[Converting between Expressions & Strings, paclet:guide/ConvertingBetweenExpressionsAndStrings])}})}})