Binary Operators and Relations

The following table contains instances of all operators found on the SWP Binary Operations and Binary Relations panels. The symbols occur in the context of a simple expression. In general, the lspace and rspace around the relation should be greater than that around the operation. Operator and relations center vertically on the math axis.

a ± b c a b c a × b c a b c a * b c
a b c a b c a b c a b c a ÷ b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a ⨿ b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a · b c a b c
a & b c a ± b c a b c a × b c a b c
a * b c a b c a b c a b c a b c
a ÷ b c a b c a b c a b c a b c
a b c a b c a b \smallsmile c a b \smallfrown c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a ⨿ b c a b c
a b c a b c a b c a b c a b c
a b c a b \vartriangle c      

Arrows

The following table contains instances of all arrows found on the SWP Arrows panel. The symbols occur in the context of a simple expression. In general, the lspace and rspace around arrows should be similar to the spacing around relations.

There is an issue with the markup of "long" LaTeX arrows in MathML. There are entities from these arrows, &xlarr; &xlArr; &xrarr; etc. but they have no standard unicodes. They can be viewed as stretched versions of short arrows. \longleftarrow can be scripted as <mo>&xlarr;</mo> or as <mo stretchy="true" minsize="1.8">&larr;</mo>.

a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a b c a b c
a b c a b c a b c a + b c a - b c
a + b c a - b c a + b c a - b c a + b c
a - b c a + b c a - b c a + b c a - b c
a + b c a - b c a + b c a - b c a + b c
a - b c a + b c a - b c a + b c a - b c
a + b c a - b c a + b c a - b c a + b c
a - b c a + b c      

Negated Relations

The following table contains instances of all negated relations found on the SWP panel. The symbols occur in the context of a simple expression. In general, the lspace and rspace around negated relations should be similar to the spacing around relations.

a + b c d a + b = c d a - b c * d a - b c * d a + b ≨︀ c × d
a + b c × d a - b ≩︀ c ÷ d a - b c ÷ d a + b c d a - b c * d
a + b c × d a - b c ÷ d a + b c d a - b c * d a + b c × d
a - b c ÷ d a + b ⩽̸ c d a - b ⩾̸ c * d a + b c × d a - b c ÷ d
a + b ⪯̸ c d a - b ⪰̸ c * d a + b c × d a - b c ÷ d a + b c d
a - b c * d a + b ≦̸ c × d a - b ≧̸ c ÷ d a + b c d a - b c * d
a + b c × d a - b c ÷ d a + b c d a - b c * d a + b c × d
a - b c ÷ d a + b ⊊︀ c d a - b ⊋︀ c * d a + b ⫅̸ c × d a - b ⫆̸ c ÷ d
a + b c d a - b c * d a + b ⫋︀ c × d a - b ⫌︀ c ÷ d a + b c d
a - b c * d a + b c × d a - b c ÷ d a + b c d a - b c * d
a + b c × d a + b c ÷ d a + b c d a + b c * d a + b c × d
a + b c ÷ d a + b c d a + b c * d a + b c × d a + b c ÷ d
a + b c d a + b c * d a + b c × d a + b c ÷ d a + b c d
a + b c * d        

Fences

LaTeX fences that begin with \left and \right are stretchy. They grow vertically to the height and depth of the enclosed math run. This growth is continuous and symmetric. Here are examples of the standard LaTeX fences ( x ) [ y ] { 1 } T a . | π | || Σ || and / F / \ n \ 1.0 x 2 x a 2 x M . Here are some examples with a bit more stretching ( k 1 2 2 ) [ k 1 2 2 ] { k 1 2 2 } k 1 2 2 k 1 2 2 k 1 2 2 | k 1 2 2 | k 1 2 2 and / k 1 2 2 / \ k 1 2 2 \ k 1 2 2 k 1 2 2 k 1 2 2 k 1 2 2 k 1 2 2 k 1 2 2

Generally, it is safest to script all attributes that configure an <mo> as a fence (fence, stretchy, symmetric, lspace, rspace). This is especially important for vertical arrows used as fences. The default attributes given in the MathML Operator Dictionary don't configure vertical arrows as fences.

In LaTeX, the lspace on a left side fence delimiter and the rspace on a right side fence delimiter is not 0. Here's an example to illustrate spacing around fences M [ M M M ] M ( M M ) M { M M } M M M M | M M | M M M [ M M M ] + ( M M ) + { M M } + M M + | M M | M M M [ M M M ] ( M M ) { M M } M M | M M | M M

In LaTeX, all fencing symbols are symmetric - they have equal extent above and below the math axis of the run of math in which they occur directly.

Fences that enclose fractions illustrate the symmetry issue as seen below. ( 1 2 3 4 5 ) + 1

Given the symmetric restriction on fences, it is very difficult for LaTeX to produce the product of a fenced row vector and a fenced column vector as shown below. [ a b c d ] [ a b c d ] We want the row vector to typeset at the same level as the top row of the column vector, but this is difficult to achieve.

This problem can be solved using aligned arrays, as follows a b c d a b c d However, all reasonable attempts to fence the column vector will fail because LaTeX fences are symmetric.

In MathML, operators that are used for fencing are never symmetric and are always stretchy by default. (i.e., as documented in the suggested Operator Dictionary). Hence <mo symmetric="true"> must be scripted if the intent is to emulated LaTeX fence behavior.

The commands \big, \Big, \bigg and \Bigg produce a discreet set of increasingly taller fences, | 1 + | 2 + | 3 + | 4 + | . | + 5 | + 6 | + 7 | + 8 | . Here's the same expression in a display | 1 + | 2 + | 3 + | 4 + | . | + 5 | + 6 | + 7 | + 8 | The size ratio is 3.0 : 2.4 : 1.8 : 1.2. Fixed sized fences are useful with nested fences as in the following example [ [ A B ] + [ B A ] ] + [ A B ]

LaTeX fences that are built into fractions (\binom, etc.) are not stretchy, but they are taller in displays. Emulating this behavior in MathML would require a context sensitive transaltion. Further, non-stretchy fences aren't usually desirable. Hence we script binomial fences as stretchy in MathML.

Some examples of inline fractions ( 8 - 5 8 ) + [ 1 2 ] + 1 2 2 + 1 x y x + 1 + | e - 2 π t θ | with built in fences. Same expression in a display. ( 8 - 5 8 ) + [ 1 2 ] + 1 2 2 + 1 x y x + 1 + | e - 2 π t θ |