MakeBoxes[expr,form]
is the low‐level function used in Wolfram System sessions to convert expressions into boxes.
MakeBoxes[expr]
is the function to convert expr to StandardForm boxes.
MakeBoxes
MakeBoxes[expr,form]
is the low‐level function used in Wolfram System sessions to convert expressions into boxes.
MakeBoxes[expr]
is the function to convert expr to StandardForm boxes.
Details
- MakeBoxes does not evaluate expr.
- form can be StandardForm, TraditionalForm, or any other format represented using boxes.
- You can give definitions for MakeBoxes[expr,form] to specify your own rules for how expressions should be converted to boxes. »
- MakeBoxes is not automatically called on the results it generates. This means that explicit MakeBoxes calls must typically be inserted into definitions that are given.
- If you change the output format for an expression by giving a definition for MakeBoxes, there is no guarantee that output you get will subsequently be able to be interpreted by the Wolfram Language.
- Definitions you give for MakeBoxes will override built‐in Wolfram Language rules for generating output.
Examples
open all close allBasic Examples (4)
Box representation of a polynomial:
MakeBoxes[a + b ^ 2, StandardForm]Box representation of a graphic:
MakeBoxes[[image], StandardForm]A special function in StandardForm and TraditionalForm:
MakeBoxes[Beta[a, b], StandardForm]MakeBoxes[Beta[a, b], TraditionalForm]Convert an expression to its StandardForm box representation:
MakeBoxes[Beta[a, b]]Scope (6)
Basic Objects (2)
Integer, Rational, Real, and Complex numbers:
Map[MakeBoxes[#, StandardForm]&, {123, 1 / 23, 1.23, 1 + 23I}]Arbitrary-precision Real and Complex numbers:
MakeBoxes[#, StandardForm]& /@ N[{10 / 3, 10 / 3I}, 20]MakeBoxes[#, StandardForm]& /@ {I, Pi, E}Characters and strings of characters:
MakeBoxes[#, StandardForm]& /@ {"a", "α", "⊕"}Control characters for strings:
MakeBoxes["A first line
A second line", StandardForm]Special Input Forms (4)
Box representations for various Power expressions:
MakeBoxes[#, StandardForm]& /@ {a ^ x, a^x, Sqrt[a], Sqrt[a], a^(1/(3)), Exp[x], 1 / x, (1/x)}MakeBoxes[#, StandardForm]& /@ {y'[x], ∫y[x]ⅆx, Subsuperscript[∑, k = 1, n]y[k], Subsuperscript[∏, k = 1, n]y[k], x∈Reals, x∧y∨z}MakeBoxes[{1, 2, 3}, StandardForm]MakeBoxes[(| | | |
| - | - | - |
| a | b | c |
| d | e | f |), StandardForm]MakeBoxes[{{a, b, c}, {d, e, f}}, StandardForm]MakeBoxes[(| | | |
| - | - | - |
| a | b | c |
| d | e | f |), TraditionalForm]Inputs with subscripts, superscripts, etc.:
MakeBoxes[#, StandardForm]& /@ {Subscript[x, a], x^a, Overscript[x, a], Underscript[x, a]}Applications (1)
Define the formatting for a function:
gplus[a, b, c]gplus/:MakeBoxes[gplus[x_, y_, n_], StandardForm] := RowBox[{MakeBoxes[x, StandardForm], SubscriptBox["⊕", MakeBoxes[n, StandardForm]], MakeBoxes[y, StandardForm]}]gplus[a, b, c]Properties & Relations (3)
MakeBoxes does not evaluate expr, while ToBoxes does:
MakeBoxes[25 / 100, StandardForm]ToBoxes[25 / 100, StandardForm]Use MakeExpression to obtain the original expression in a held form:
MakeBoxes[1 + 1, StandardForm]MakeExpression[%, StandardForm]MakeBoxes uses formatting rules added via Format:
MakeBoxes[bin[x, y], StandardForm]Format[bin[x_, y_]] := MatrixForm[{{x}, {y}}]MakeBoxes[bin[i, j], StandardForm]Tech Notes
Related Guides
Related Workflows
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1996), MakeBoxes, Wolfram Language function, https://reference.wolfram.com/language/ref/MakeBoxes.html (updated 2007).
CMS
Wolfram Language. 1996. "MakeBoxes." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/MakeBoxes.html.
APA
Wolfram Language. (1996). MakeBoxes. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MakeBoxes.html
BibTeX
@misc{reference.wolfram_2026_makeboxes, author="Wolfram Research", title="{MakeBoxes}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/MakeBoxes.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_makeboxes, organization={Wolfram Research}, title={MakeBoxes}, year={2007}, url={https://reference.wolfram.com/language/ref/MakeBoxes.html}, note=[Accessed: 12-June-2026]}