This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Demos / Notations / ...Advanced Features /

Note: This section is intended for advanced users.

Changing precedences and the TagBox option SyntaxForm

Using the option SyntaxForm you can change the precedence of an expression containing a TagBox. A tag box containing a SyntaxForm option will look like TagBox[ box structure, tag, SyntaxForm Rulestring], where string is a string indicating the operator on which the precedence of the tag box is modeled. The following examples illustrate the SyntaxForm option .

An expression which uses the arrow LongLeftRightArrow with standard precedences.

We can define a new notation for a composite arrow LongLeftRightArrow surrounded by a TagBox that has the SyntaxForm option set to a low precedence.

This new composite arrow has a low precedence.

We can illustrate the underlying groupings of the expressions above in the following table.

A table illustrating the precedences and grouping of expressions with and without precedence changing tag boxes.

The SyntaxForm option value can be any operator string valid in Mathematica, that is, any operator contained in the UnicodeCharacters.tr file. The SyntaxForm value can also include symbols before and after the operator to indicate whether the precedence is that of a prefix operator, an infix operator, or a postfix operator. Some typical values for the SyntaxForm option are given in the table below.

Typical SyntaxForm values and their associated precedence behaviors.