This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
NOTATION PACKAGE TUTORIAL|Functions »

Options and Auxiliary Functions

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 which clears all notations, symbolizations, and infix notations defined so far.

The Option Action

option name
possible values
effect
ActionCreateNotationRulesnotations are entered into the system
RemoveNotationRulesnotations are removed from the system
PrintNotationRulescells 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.
This creates a notation for pure functions more in keeping with that of traditional mathematics.
In[43]:=
Click for copyable input
Pure functions now use this new notation.
In[44]:=
Click for copyable input
Out[44]=
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.
This removes the above notation from the system.
In[45]:=
Click for copyable input
Now the special notation for functions is no longer defined.
In[46]:=
Click for copyable input
Out[46]=
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.
This prints the MakeExpression and MakeBoxes rules corresponding to the given Notation.

The Option WorkingForm

option name
possible values
effect
WorkingFormStandardFormnotations, symbolizations and infix notations are defined in StandardForm
TraditionalFormnotations, symbolizations and infix notations are defined in TraditionalForm
Automaticnotations, symbolizations and infix notations are defined in the

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 , , 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].
This creates TraditionalForm notations for the vector calculus functions Div, Curl and the wrapper .
In[48]:=
Click for copyable input
These notations behave as expected.
In[51]:=
Click for copyable input
Out[51]//TraditionalForm=
In[52]:=
Click for copyable input
Out[52]//FullForm=
In[53]:=
Click for copyable input
Out[53]=

The Option AutoLoadNotationPalette

option name
possible values
effect
AutoLoadNotationPaletteTrue, undefinedthe notation palette will be loaded when the Notation package loads
Falsethe 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.
Statement forcing the notation palette not to load when the Notation package loads.
Click for copyable input

The Function ClearNotations

ClearNotations[] clears all notations, symbolizations and infix notations

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.
Wipe all notations, symbolizations and infix notations.
In[54]:=
Click for copyable input