2.11.11 Advanced Topic: Options for Expression Input and Output
Options associated with the interactive entering of expressions.
The options SingleLetterItalics and ZeroWidthTimes are typically set whenever a cell uses TraditionalForm.
Here is an expression entered with default options for a StandardForm input cell.
Here is the same expression entered in a cell with SingleLetterItalics->True and ZeroWidthTimes->True.
Built into Mathematica are a large number of aliases for common special characters. InputAliases allows you to add your own aliases for further special characters or for any other kind of Mathematica input. A rule of the form "name"->expr specifies that name should immediately be replaced on input by expr.
Aliases are delimited by explicit characters. The option InputAutoReplacements allows you to specify that certain kinds of input sequences should be immediately replaced even when they have no explicit delimiters. By default, for example, -> is immediately replaced by . You can give a rule of the form "seq"->"rhs" to specify that whenever seq appears as a token in your input, it should immediately be replaced by rhs.
Settings for LanguageCategory to control spell checking and hyphenation.
The option LanguageCategory allows you to tell Mathematica what type of contents it should assume cells have. This determines how spelling and structure should be checked, and how hyphenation should be done.
Options associated with interactive manipulation of expressions.
Mathematica normally allows you to select any part of an expression that you see on the screen. Occasionally, however, you may find it useful to get Mathematica to allow only selections which correspond to complete subexpressions. You can do this by setting the option StructuredSelection->True.
Here is an expression with a piece selected.
With StructuredSelection->True only complete subexpressions can ever be selected.
Examples of specifying options for the display of expressions.
As discussed in Section 2.9, Mathematica provides many options for specifying how expressions should be displayed. By using StyleBox[boxes, opts] you can apply such options to collections of boxes. But Mathematica is set up so that any option that you can give to a StyleBox can also be given to a complete Cell object, or even a complete Notebook. Thus, for example, options like Background and LineIndent can be given to complete cells as well as to individual StyleBox objects.
There are some options that apply only to a particular type of box, such as GridBox. Usually these options are best given separately in each GridBox where they are needed. But sometimes you may want to specify default settings to be inherited by all GridBox objects that appear in a particular cell. You can do this by giving these default settings as the value of the option GridBoxOptions for the whole cell.
For each box type named XXXBox, Mathematica provides a cell option XXXBoxOptions that allows you to specify the default options settings for that type of box.