A.2.9 Input of Boxes
Ways to input boxes.
Standard control keys.
On English-language keyboards both forms will work where alternates are given. On other keyboards the first form should work but the second may not.
Boxes Constructed from Text
When textual input that you give is used to construct boxes, as in StandardForm or TraditionalForm cells in a notebook, the input is handled slightly differently from when it is fed directly to the kernel.
The input is broken into tokens, and then each token is included in the box structure as a separate character string. Thus, for example, xx+yyy is broken into the tokens "xx", "+", "yyy".
Types of tokens in text used to construct boxes.
A RowBox is constructed to hold each operator and its operands. The nesting of RowBox objects is determined by the precedence of the operators in standard Mathematica syntax.
Note that spacing characters are not automatically discarded. Instead, each sequence of consecutive such characters is made into a separate token.
Inputting raw and interpreted boxes.
Any textual input that you give between \( and \) is taken to specify boxes to construct. The boxes are only interpreted if you specify with \! that this should be done. Otherwise x \^ y is left for example as SuperscriptBox[x, y], and is not converted to Power[x, y].
Within the outermost \( ... \), further \( ... \) specify grouping and lead to the insertion of RowBox objects.
String-based ways of constructing raw boxes.
In string-based input between \( and \) spaces, tabs and newlines are discarded. \ can be used to insert a single space. Special spacing characters such as \[ThinSpace], \[ThickSpace] or \[NegativeThinSpace] are not discarded.