Textual Input and Output
FullForm[expr] | the internal form of an expression |
InputForm[expr] | a form suitable for direct keyboard input |
OutputForm[expr] | a two‐dimensional form using only keyboard characters |
StandardForm[expr] | the default form used in Wolfram System notebooks |
TraditionalForm[expr] | traditional mathematical notation |
TeXForm[expr] | output suitable for export to TeX |
MathMLForm[expr] | output suitable for use with MathML on the web |
CForm[expr] | output suitable for export to C |
FortranForm[expr] | output suitable for export to Fortran |
convert from a textual form to an expression | |
Processing | do computations on the expression |
Output | convert the resulting expression to textual form |
one‐dimensional strings | InputForm
,
FullForm
, etc.
|
two‐dimensional boxes | StandardForm
,
TraditionalForm
, etc.
|
ToString[expr,form] | create a string representing the specified textual form of expr |
ToBoxes[expr,form] | create a box structure representing the specified textual form of expr |
ToExpression[input] | create an expression by interpreting strings or boxes |
FullForm | explicit functional notation |
InputForm | one‐dimensional notation |
StandardForm | two‐dimensional notation |
ToExpression[input,form] | attempt to create an expression assuming that input is given in the specified textual form |
Short[expr] | show a one‐line outline of expr |
Short[expr,n] | show an n‐line outline of expr |
Shallow[expr] | show the "top parts" of expr |
Shallow[expr,{depth,length}] | show the parts of expr to the specified depth and length |
StringForm["cccc``cccc",x1,x2,…] | output a string in which successive `` are replaced by successive xi |
StringForm["cccc`i`cccc",x1,x2,…] | output a string in which each `i` is replaced by the corresponding xi |
Row[{expr1,expr2,…}] | give the output forms of the expri concatenated together |
Row[list, s] | insert s between successive elements |
Spacer[w] | a space of w points that can be used in Row |
Invisible[expr] | a space determined by the physical dimensions of expr |
Column[{expr1,expr2,…}] | a left‐aligned column of objects |
Column[list,alignment] | |
Column[list,alignment,s] | a column with elements separated by s x-heights |
Defer[expr] | give the output form of expr, with expr maintained unevaluated |
Interpretation[e,expr] | give an output which displays as e, but evaluates as expr |
ScientificForm[expr] | print all numbers in scientific notation |
EngineeringForm[expr] |
print all numbers in engineering notation (exponents divisible by 3)
|
AccountingForm[expr] | print all numbers in standard accounting format |
NumberForm[expr,tot] | print at most tot digits of all approximate real numbers in expr |
ScientificForm[expr,tot] | use scientific notation with at most tot digits |
EngineeringForm[expr,tot] | use engineering notation with at most tot digits |
option name | default value | |
DigitBlock | Infinity | maximum length of blocks of digits between breaks |
NumberSeparator | {","," "} | strings to insert at breaks between blocks of digits to the left and right of a decimal point |
NumberPoint | "." | string to use for a decimal point |
NumberMultiplier | "∖[Times]" | string to use for the multiplication sign in scientific notation |
NumberSigns | {"-",""} | strings to use for signs of negative and positive numbers |
NumberPadding | {"",""} | strings to use for padding on the left and right |
SignPadding | False | whether to insert padding after the sign |
NumberFormat | Automatic | function to generate final format of number |
ExponentFunction | Automatic | function to determine the exponent to use |
PaddedForm[expr,tot] | print with all numbers having room for tot digits, padding with leading spaces if necessary |
PaddedForm[expr,{tot,frac}] | print with all numbers having room for tot digits, with exactly frac digits to the right of the decimal point |
NumberForm[expr,{tot,frac}] | print with all numbers having at most tot digits, exactly frac of them to the right of the decimal point |
Column[{expr1,expr2,…}] | print with the expri left aligned in a column |
BaseForm[expr,b] | print with all numbers given in base b |
Column[list] | typeset as a column of elements |
Grid[list] | typeset as a grid of elements |
TableForm[list] | print in tabular form |
PaddedForm[Column[list],tot] | print a column with all numbers padded to have room for tot digits |
PaddedForm[Grid[list],tot] | print a table with all numbers padded to have room for tot digits |
PaddedForm[Grid[list],{tot,frac}] | put frac digits to the right of the decimal point in all approximate real numbers |
SpanFromLeft | span from the element on the left |
SpanFromAbove | span from the element above |
SpanFromBoth | span from the element above and to the left |
option | default value | |
Background | None | what background colors to use |
BaselinePosition | Automatic | what to align with a surrounding text baseline |
BaseStyle | {} | base style specifications for the grid |
Frame | None | where to draw frames in the grid |
FrameStyle | Automatic | style to use for frames |
option | default value | |
Alignment | {Center,Baseline} | horizontal and vertical alignment of items |
Dividers | None | where to draw divider lines in the grid |
ItemSize | Automatic | width and height of each item |
ItemStyle | None | styles for columns and rows |
Spacings | {0.8,0.1} | horizontal and vertical spacings |
option | default value | |
Alignment | {Center,Baseline} | horizontal and vertical alignment of items |
Background | None | what background colors to use |
BaseStyle | {} | base style specifications for the item |
Frame | None | where to draw frames around the item |
FrameStyle | Automatic | style to use for frames |
ItemSize | Automatic | width and height of each item |
Formatting Higher-Dimensional Data

option name | default value | |
TableDepth | Infinity | maximum number of levels to include in the table |
TableDirections | {Column,Row,Column,…} | whether to arrange dimensions as rows or columns |
TableAlignments | {Left,Bottom,Left,…} | how to align the entries in each dimension |
TableSpacing | {1,3,0,1,0,…} | how many spaces to put between entries in each dimension |
TableHeadings | {None,None,…} | how to label the entries in each dimension |
None | no labels in any dimension |
Automatic | successive integer labels in each dimension |
{{lbl11,lbl12,…},…} | explicit labels |
Style[expr,options] | print with the specified style options |
Style[expr,"style"] | print with the specified cell style |
option |
typical setting(s)
| |
FontSize | 12 | size of characters in printer's points |
FontWeight | "Plain" or "Bold" | weight of characters |
FontSlant | "Plain" or "Italic" | slant of characters |
FontFamily | "Courier"
,
"Times"
,
"Helvetica" | font family |
FontColor | GrayLevel[0] | color of characters |
Background | GrayLevel[1] | background color for characters |
DisplayForm[boxes] | show boxes as they would be displayed |
"text" | literal text | |||||||||
RowBox[{a,b,…}] | a row of boxes or strings a,b,… | |||||||||
GridBox[{{a1,b1,…},{a2,b2,…},…}] | ||||||||||
a grid of boxes
| ||||||||||
SubscriptBox[a,b] | subscript ab | |||||||||
SuperscriptBox[a,b] | superscript ab | |||||||||
SubsuperscriptBox[a,b,c] | subscript and superscript ![]() | |||||||||
UnderscriptBox[a,b] | underscript ![]() | |||||||||
OverscriptBox[a,b] | overscript ![]() | |||||||||
UnderoverscriptBox[a,b,c] | underscript and overscript ![]() | |||||||||
FractionBox[a,b] | fraction ![]() | |||||||||
SqrtBox[a] | square root ![]() | |||||||||
RadicalBox[a,b] | b th root ![]() |
FrameBox[box] | render box with a frame drawn around it |
GridBox[list,RowLines->True] | put lines between rows in a GridBox |
GridBox[list,ColumnLines->True] | put lines between columns |
GridBox[list,RowLines->{True,False}] | |
put a line below the first row, but not subsequent ones
|
StyleBox[boxes,options] | render boxes with the specified option settings |
StyleBox[boxes,"style"] | render boxes in the specified style |
FormBox[boxes,form] | interpret boxes using rules associated with the specified form |
InterpretationBox[boxes,expr] | interpret boxes as representing the expression expr |
TagBox[boxes,tag] | use tag to guide the interpretation of boxes |
ErrorBox[boxes] | indicate an error and do not attempt further interpretation of boxes |
option | default value | |
Editable | Automatic | whether to allow the contents to be edited |
Selectable | True | whether to allow the contents to be selected |
Deletable | True | whether to allow the box to be deleted |
DeletionWarning | False | whether to issue a warning if the box is deleted |
BoxAutoDelete | False | whether to strip the box if its contents are modified |
StripWrapperBoxes | False |
∖(box1,box2,…∖) | RowBox[box1,box2,…] |
box1∖^box2 | SuperscriptBox[box1,box2] |
box1∖_box2 | SubscriptBox[box1,box2] |
box1∖_box2∖%box3 | SubsuperscriptBox[box1,box2,box3] |
box1∖&box2 | OverscriptBox[box1,box2] |
box1∖+box2 | UnderscriptBox[box1,box2] |
box1∖+box2∖%box3 | UnderoverscriptBox[box1,box2,box3] |
box1∖/box2 | FractionBox[box1,box2] |
∖@box | SqrtBox[box] |
\@box1\%box2 | RadicalBox[box1,box2] |
form∖` box | FormBox[box,form] |
\*input | construct boxes from input |
∖!∖(input∖) | interpret input in the current form |
∖!∖(form∖`input∖) | interpret input using the specified form |
ToString[expr,form] | create a string representing the specified textual form of expr |
ToBoxes[expr,form] | create boxes representing the specified textual form of expr |
ToExpression[input,form] | create an expression by interpreting a string or boxes as input in the specified textual form |
ToString[expr] | create a string using OutputForm |
ToBoxes[expr] | create boxes using StandardForm |
ToExpression[input] | create an expression using StandardForm |
InputForm | strings corresponding to keyboard input |
StandardForm | strings or boxes corresponding to standard two‐dimensional input (default) |
TraditionalForm | strings or boxes mimicking traditional mathematical notation |
ToExpression[input,form,h] |
create an expression, then wrap it with head
h
|
SyntaxQ["string"] | determine whether a string represents syntactically correct Wolfram Language input |
SyntaxLength["string"] | find out how long a sequence of characters starting at the beginning of a string is syntactically correct |


a
,
xyz
,
αβγ | symbols |
"some text"
,
"α+β" | strings |
123.456
,
3*^45 | numbers |
+
,
->
,
≠ | operators |
(*comment*) | input to be ignored |
prefix | !x | Not[x] |
postfix | x! | Factorial[x] |
infix | x+y+z | Plus[x,y,z] |
matchfix | {x,y,z} | List[x,y,z] |
compound | x/:y=z | TagSet[x,y,z] |
overfix | ![]() | OverHat[x] |
Extensions of symbol names | x_
,
#2
,
e::s
, etc.
|
Function application variants | e[e]
,
e@@e
, etc.
|
Power‐related operators | √e
,
e^e
, etc.
|
Multiplication‐related operators
| ∇e
,
e/e
,
e⊗e
,
ee
, etc.
|
Addition‐related operators | e⊕e
,
e+e
,
e⋃e
, etc.
|
Relational operators | e==e
,
e∼e
,
e⪡e
,
e⧏e
,
e∈e
, etc.
|
Arrow and vector operators | e⟶e
,
e↗e
,
e⇌e
,
e⥓e
, etc.
|
Logic operators | ∀ee
,
e&&e
,
e∨e
,
e⊢e
, etc.
|
Pattern and rule operators | e..
,
e|e
,
e->e
,
e/.e
, etc.
|
Pure function operator | e& |
Assignment operators | e=e
,
e:=e
, etc.
|
Compound expression | e;e |











x⊕y | CirclePlus[x,y] |
x≈y | TildeTilde[x,y] |
x∴y | Therefore[x,y] |
x↔y | LeftRightArrow[x,y] |
∇x | Del[x] |
x | Square[x] |
〈x,y,…〉 | AngleBracket[x,y,…] |


xy | Subscript[x,y] |
x+ | SubPlus[x] |
x- | SubMinus[x] |
x* | SubStar[x] |
x+ | SuperPlus[x] |
x- | SuperMinus[x] |
x* | SuperStar[x] |
x† | SuperDagger[x] |
![]() | Overscript[x,y] |
![]() | Underscript[x,y] |
![]() | OverBar[x] |
![]() | OverVector[x] |
![]() | OverTilde[x] |
![]() | OverHat[x] |
![]() | OverDot[x] |
![]() | UnderBar[x] |
Format[expr1]:=expr2 | define expr1 to be formatted like expr2 |
Format[expr1,form]:=expr2 | give a definition only for a particular output form |
Prefix[f[x],h] | prefix form h x |
Postfix[f[x],h] | postfix form x h |
Infix[f[x,y,…],h] | infix form x h y h… |
Prefix[f[x]] | standard prefix form f@x |
Postfix[f[x]] | standard postfix form x//f |
Infix[f[x,y,…]] | standard infix form x~f~y~f~… |
PrecedenceForm[expr,n] | an object to be parenthesized with a precedence level n |


MakeBoxes[expr,form] | construct boxes to represent expr in the specified form |
MakeExpression[boxes,form] | construct an expression corresponding to boxes |


■ Break input into tokens. |
■ Strip spacing characters. |
■ Construct boxes using built‐in operator precedences. |
■ Strip StyleBox and other boxes not intended for interpretation. |
■ Apply rules defined for MakeExpression. |
Print[expr1,expr2,…] | print the expri, with no spaces in between, but with a newline (line feed) at the end |
Styling Output
Menu | Style[] option | Style[] directive |
Format ▶ Size ▶ 14 | FontSize->14 | 14 |
Format ▶ Text Color ▶ Gray | FontColor->Gray | Gray |
Format ▶ Face ▶ Bold | FontWeight->Bold | Bold |
Format ▶ Face ▶ Italic | FontSlant->Italic | Italic |
Format ▶ Background Color ▶ Yellow | Background->Yellow | |
Format ▶ Font | FontFamily->"Times" | |
Format ▶ Style ▶ Subsection | "Subsection" |
Grid Layout
Using Output as Input
Special Grid Entries
Frames and Labels
Other Annotations
Default Styles
Default Options
Mathematical Typesetting
Using the Box Language
The Basic Constructs
These constructs can be placed into three families: constructs that appear within notebooks as typesetting structures, functions that generate graphics whose contents are arranged on a grid, and constructs that can appear inside grids to adjust details of formatting.
Grid Family
Grid[{{expr11,expr12,…},{expr21,expr22,…},…}] | |
an object that formats with the exprij arranged in a two-dimensional grid | |
Column[{expr1,expr2,…}] | an object that formats with the expri arranged in a column, with expr1 above expr2, etc. |
Row[{expr1,expr2,…}] | an object that formats with the expri arranged in a row, potentially extending over several lines |
Graphics Grid Family
GraphicsGrid[{{g11,g12,…},…}] | generates a graphic in which the gij are laid out in a two-dimensional grid |
GraphicsColumn[{g1,g2,…}] | generates a graphic in which the gi are laid out in a column, with g1 above g2, etc. |
GraphicsRow[{g1,g2,…}] | generates a graphic in which the gi are laid out in a row |
Embedded Constructs Family
Item[expr,options] | displays with expr as the content, and with the specified options applied to the region containing expr |
SpanFromLeft | indicates that the position is occupied by the contents on the left |
SpanFromAbove | indicates that the position is occupied by the contents above |
SpanFromBoth | indicates that the position is occupied from both above and left |
Classes of Functionality
Grid and related constructs allow considerable appearance customization, often with very little syntax. The tables below indicate the kind of functionality that is supported; it is explained in detail in later sections.
In addition to these styling features, various forms of interactive editing and dynamic behavior are possible.
Options Syntax
A variety of options exist for adjusting the details of a grid's appearance. This section describes the common syntax shared by many of these options. This syntax provides a way to assign option values not only for the entire grid, but also for individual rows, columns, and even items.
The overall syntax for many options, such as Background, is based on forms like Background->{specx,specy}, where specx is itself a modular syntax that contains values for different columns, while specy contains values for the different rows.
spec | apply spec to all items |
{specx} | apply specx at successive horizontal positions |
{specx,specy} | apply speck at successive horizontal and vertical positions |
{specx,specy,rules} | give rules for the items based on their i,j position in the array |
These two methods have different strengths, as described in "Using Rules" and "Using Lists".
Using Rules
Rules provide a direct and readable method to give a specific row or column a specific value.
When there are a large number of rows or columns, rules are a convenient way to set the properties of just a few of them.
Rules can also be used to give values to specific grid elements or subregions. Note, however, that while conceptually similar, this following syntax is separate from the discussion of specx and specy.
Rules are an efficient way to specify the exceptions to the value that otherwise exists. However, they are less efficient when the intention is to manually specify a value for each piece of the grid.
To achieve repetitive patterns, it is instead recommended to use the list syntax described in the next section.
Using Lists
Giving sequential values in a list is a compact and convenient way to specify large numbers of option values for adjacent rows or columns.
Additionally, sublists can be used to denote cyclic use of values.
These cyclic sublists can be padded at the beginning or end.
Because positions in the list correspond to positions in the grid, specifying a single value in the middle requires giving all previous values. To achieve this more directly, use rules as described in the section "Using Rules".
Using Both
It is possible to have the best of both worlds, using the list syntax for specifying repetitive portions of the grid while also using the rule syntax to specify exceptions.
{s1,s2,…,sn} | use s1 through sn; then use defaults |
{{c}} | use c in all cases |
{{c1,c2}} | alternate between c1 and c2 |
{{c1,c2,…}} | cycle through all ci |
{s,{c}} | use s, then repeatedly use c |
{s1,{c},sn} | use s1, then repeatedly use c, but use sn at the end |
{s1,s2,…,{c1,c2,…},sm,…,sn
}
| use the first sequence of si at the beginning, then cyclically use the ci, then use the last sequence of si at the end |
{s1,s2,…,{},sm,…,sn} | use the first sequence of si at the beginning and the last sequence at the end |
{i1->v1,i2->v2,…} | specify what to use at positions ik |
{spec,rules} | use rules to override specifications in spec |
Columns, Rows, Gutters, and Items
column | vertical sequence of items |
row | horizontal sequence of items |
item | the region containing a grid element |
gutter | the border between consecutive rows or columns |
Grid and GraphicsGrid follow the same conventions for describing the different possible slices of the grid. Column, GraphicsColumn, and GraphicsRow follow the same general conventions, except that they only deal in one of the two possible dimensions. Finally, Row does not participate in this system at all.
The World of Options
The following table identifies the slices each listed option can address. No option is valid for all constructs; refer to the key below to see which option can occur for a given construct.
Note that Row does not take any options.
Columns, Then Rows
To remember the syntax for options, the most important step is knowing that specific values for the columns are specified first, and values for rows are specified second.
opt->val | use val for all items |
opt->{colspec,rowspec} | use colspec for columns, rowspec for rows |
opt->{colspec} | use colspec for columns, defaults for rows |
In the Wolfram Language, options with a horizontal setting h and a vertical setting v are specified as opt->{h,v}. ImageSize and PlotRange are two common options that help establish this convention.
In a grid, these horizontal and vertical settings correspond to values for the columns and rows, respectively. This is because columns are stacked horizontally, and so their properties—such as width and location—correspond to the horizontal dimension. Rows are stacked vertically, and their properties correspond to the vertical dimension.
Gutters
Many Grid options deal with properties that can ultimately be associated with a column, row, or item in the grid.
However there are also options that deal with gutters between rows and columns.
The syntax for Dividers and Spacings is exactly the same as for the other options. For a grid with n items in a particular direction, Dividers and Spacings can specify settings for the n+1 gaps between elements, starting before the first element and ending after the last element.
Items
The most granular level of description is the item. Each item in a grid can have its own value for options such as Background, Alignment, and Frame.
Dividers and Frames
Dividers | draw dividers between columns or rows |
Frame | put a frame around regions of the grid |
FrameStyle | use an overall style for the lines |
Frame always draws a line on all four faces of the enclosed region. Dividers allows a finer level of control.
One result is that when using dividers, the resulting lines run in only a single direction.
Styling Dividers and Frames
Precedence
When conflicting styles are given, Dividers has precedence over Frame, and they have precedence over FrameStyle. Styles from Item take precedence over all others.
Alignment and Positioning
Background and Style
Common Cases
Though an element can have its own background, awkward gaps result when you put elements together.
Grid and related functions place a background across the entire group of items in which the elements are contained.
With more sophisticated syntax, a variety of patterns is easy to achieve.
Precedence of Overlapping Background Settings
Spanning and Nesting
Sizing and Spacing
Sizing in Grid
Grid will typically not modify the size of its elements. Also, rows and columns are by default made as narrow as possible while accommodating the contents.
Notice in the above example that the second row is much taller than the first, the second column thinner than the first, and the sizes of the elements were not modified in any way.
If elements in the grid are interactively or dynamically changed, the size of the entire grid will automatically adjust as appropriate.
A useful exception is that Button will by default expand to fill the available space.
ItemSize can be used to override the default behavior.
The units used for ItemSize are the typesetting units known as "exs" and "ems."
It is also possible to specify widths as a fraction of the enclosing area by using Scaled.
Line Wrapping in Grid
Textual items will line wrap if the columns are too narrow. Notice that this forces the rows to be taller than the minimum specified.
Sizing in GraphicsGrid
GraphicsGrid will by default return a grid whose items are all the same size.
It will automatically choose an aspect ratio that is appropriate for the overall collection of elements.
Compare this with the equivalent Grid example, which does not impose either an overall size or an aspect ratio.
GraphicsGrid does not support an ItemSize option, but it does support ImageSize.
Input[] | read an expression as input |
InputString[] | read a string as input |
Input["prompt"] |
issue a prompt, then read an expression
|
InputString["prompt"] |
issue a prompt, then read a string
|
Quiet[expr] | evaluate expr without printing any messages |
Quiet[expr,{s1::tag,s2::tag,…}] | evaluate expr without printing the specified messages |
Off[s::tag] |
switch off a message, so it is not printed
|
On[s::tag] | switch on a message |


s::tag | give the text of a message |
s::tag=string | set the text of a message |
Messages[s] | show all messages associated with s |







$MessageList | a list of the messages produced during a particular computation |
MessageList[n] | a list of the messages produced during the processing of the n th input line in a Wolfram Language session |


Check[expr,failexpr] | if no messages are generated during the evaluation of expr, then return expr; otherwise return failexpr |
Check[expr,failexpr,s1::t1,s2::t2,…] | check only for the messages si::ti |


Message[s::tag] | print a message |
Message[s::tag,expr1,…] | print a message, with the expri spliced into its string form |

$Language="lang" | set the language to use |

symbol::tag | the default form of a message |
symbol::tag::Language | a message in a particular language |
f::usage="text" | define the usage message for a function |
?f | get information about a function |
??f | get more information about a function |