Options and Auxiliary Functions
|The Option Action||The Option AutoLoadNotationPalette|
|The Option WorkingForm||The Function ClearNotations|
Notation, Symbolize, and InfixNotation have several options that modify their behavior. These notation functions all take the options WorkingForm and Action. In addition, the Notation package has a local option, AutoLoadNotationPalette, which affects the loading of the palette. Finally, the Notation package has a function that clears all notations, symbolizations, and infix notations defined so far.
|Action||CreateNotationRules||notations are entered into the system|
|RemoveNotationRules||notations are removed from the system|
|PrintNotationRules||cells containing the rules defining the given notation are pasted into the current notebook|
The Action option and its possible values.
The Notation, Symbolize, and InfixNotation option Action determines what a notation statement does with the rules it generates. The default value of the Action option is CreateNotationRules, which causes the generated notation rules to be entered into the system.
If the Action option is set to RemoveNotationRules, then the notation rules are removed from the system. Using the option value RemoveNotationRules in a notation statement is equivalent to using the appropriate RemoveNotation, RemoveSymbolize, or RemoveInfixNotation statement.
By setting the option Action to PrintNotationRules, you can view the rules generated by a notation statement. Examining the MakeExpression and MakeBoxes rules is often useful to give you an idea of the underlying box structures that are used in your notation statement.
|WorkingForm||StandardForm||notations, symbolizations, and infix notations are defined in StandardForm|
|TraditionalForm||notations, symbolizations, and infix notations are defined in TraditionalForm|
|Automatic||notations, symbolizations, and infix notations are defined in the DefaultOutputFormatType|
The WorkingForm option and some of its possible values.
The option WorkingForm specifies the form or environment the Notation, Symbolize, or InfixNotation statement is generated in. The typical values of WorkingForm are StandardForm or TraditionalForm; any notations created would only apply in StandardForm or TraditionalForm (respectively). However, WorkingForm can be set to any form you define, for instance LogicForm, PhysicsForm, etc.
When the option WorkingForm is set to Automatic, the Notation, Symbolize, or InfixNotation statement will be created in the ambient default input and output forms. These default forms can be set through the option inspector and they govern what the default input form and the default output form will be. You can see the current settings of these options in your notebook by evaluating Options[InputNotebook,CommonDefaultFormatTypes].
|AutoLoadNotationPalette||True, undefined||the notation palette will be loaded when the Notation package loads|
|False||the notation palette will not be loaded when the Notation package loads|
The option AutoLoadNotationPalette and its behavior.
If you are designing a package, you may want to hide the notation palette when the user loads the Notation package so as not to confuse them. You can set the Boolean variable AutoLoadNotationPalette inside your package to achieve this. If AutoLoadNotationPalette has been set to False, then the notation palette will not be loaded when the Notation package is loaded. If the value is undefined or True, the notation palette will be loaded when the Notation package loads. In input form, the statement would look like the following.
Syntax of ClearNotations.
If you would like to reenter a set of notations or would like to make a "clean start", you can use the ClearNotations command to erase all notations, symbolizations, and infix notations present in the system. Using ClearNotations should not affect other packages or definitions you have made to MakeExpression or MakeBoxes.