DisplayForm[expr]
prints with low-level boxes inside expr shown in explicit two-dimensional or other form.
DisplayForm
DisplayForm[expr]
prints with low-level boxes inside expr shown in explicit two-dimensional or other form.
Details
- In ordinary StandardForm output, boxes such as SubscriptBox are shown literally. In DisplayForm they are shown as explicit two-dimensional constructs.
- When an input evaluates to DisplayForm[expr], DisplayForm does not appear in the output. »
Examples
open all close allBasic Examples (1)
Scope (5)
Formatting for a row of elements:
DisplayForm[RowBox[{"1", "+", "1"}]]DisplayForm[RadicalBox[FractionBox[x, SqrtBox[y]], n]]A subscript and superscript as nested boxes:
DisplayForm[SuperscriptBox[SubscriptBox[a, b], c]]A subscript and superscript in a single box:
DisplayForm[SubsuperscriptBox[a, b, c]]Vector notation from an OverscriptBox:
DisplayForm[OverscriptBox[a, "⇀"]]Symbolic sum displayed using an UnderoverscriptBox:
DisplayForm[RowBox[{UnderoverscriptBox["∑", "x=1", "n"], x}]]Display a GridBox:
tab = Table[i + j, {i, 3}, {j, 3}];DisplayForm[GridBox[tab]]Display with row and column lines:
DisplayForm[GridBox[tab, RowLines -> True, ColumnLines -> True]]DisplayForm[FrameBox[%]]DisplayForm[StyleBox["name", FontSlant -> "Italic"]]Display using Title cell style:
DisplayForm[StyleBox["name", "Title"]]Properties & Relations (3)
Sqrt[x - a / b]ToBoxes[%]DisplayForm[%]Display an InterpretationBox:
DisplayForm[InterpretationBox[SuperscriptBox["x", "2"], var]]The box is interpreted as the second argument:
ToExpression[%]When an input evaluates to DisplayForm[expr], DisplayForm does not appear in the output:
DisplayForm[RowBox[{"2", "+", "2"}]]Out is assigned the value RowBox[{"2","+","2"}], not DisplayForm[RowBox[{"2","+","2"}]]:
%Possible Issues (1)
Even when an output omits DisplayForm from the top level, it is not stripped from subexpressions:
e = DisplayForm[RowBox[{"2", "+", "2"}]]The output does not have DisplayForm in it:
%However, the variable e does have DisplayForm in it, which may affect subsequent evaluations:
FullForm[e]The MakeExpression gives an error due to the intervening DisplayForm:
MakeExpression[e, StandardForm]Assign variables first and then apply DisplayForm to the result to maintain computability:
(f = RowBox[{"2", "+", "2"}])//DisplayFormMakeExpression[f, StandardForm]Tech Notes
Related Guides
History
Introduced in 1996 (3.0)
Text
Wolfram Research (1996), DisplayForm, Wolfram Language function, https://reference.wolfram.com/language/ref/DisplayForm.html.
CMS
Wolfram Language. 1996. "DisplayForm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DisplayForm.html.
APA
Wolfram Language. (1996). DisplayForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DisplayForm.html
BibTeX
@misc{reference.wolfram_2026_displayform, author="Wolfram Research", title="{DisplayForm}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/DisplayForm.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_displayform, organization={Wolfram Research}, title={DisplayForm}, year={1996}, url={https://reference.wolfram.com/language/ref/DisplayForm.html}, note=[Accessed: 13-June-2026]}