ToBoxes

ToBoxes[expr]
generates boxes corresponding to the printed form of expr in StandardForm.

ToBoxes[expr,form]
gives the boxes corresponding to output in the specified form.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Box representation of a polynomial:

In[1]:=
Click for copyable input
Out[1]=

Display boxes as formatted:

In[2]:=
Click for copyable input
Out[2]//DisplayForm=

Box representation of a graphic:

In[1]:=
Click for copyable input
Out[1]=

A special function in StandardForm and TraditionalForm:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 1996
(3.0)