# MathML Demo: <mo> - operator, fence, separator, or accent

## 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\le c$ $a\mp b\prec c$ $a×b⪯c$ $a\cdot b\ll c$ $a*b\subset c$ $a\cup b\subseteq c$ $a\cap b⊏c$ $a\circ b⊑c$ $a•b\in c$ $a÷b⊢c$ $a\bigsqcup b⌣c$ $a\sqcap b⌢c$ $a○b\equiv c$ $a\setminus b\sim c$ $a\setminus b\simeq c$ $a\oplus b\asymp c$ $a\ominus b\approx c$ $a\otimes b\ge c$ $a\odot b\succ c$ $a⊛b⪰c$ $a\vee b\gg c$ $a\wedge b\supset c$ $a⊚b\supseteq c$ $a⊲b⊐c$ $a⊳b⊒c$ $a⊻b\ni c$ $a⌅b⊣c$ $a\wr b\mid c$ $a◃b\parallel c$ $a▹b\perp c$ $a\uplus b\cong c$ $a⌆b\bowtie c$ $a⨿b\propto c$ $a⊴b\vDash c$ $a⊵b\doteq c$ $a▽b\bowtie c$ $a△b⊩c$ $a\diamond b\Vvdash c$ $a†b\models c$ $a‡b\circeq c$ $a⊞b\succsim c$ $a\boxminus b\gtrsim c$ $a⊠b⪆c$ $a⊡b\therefore c$ $a\oslash b\because c$ $a⋓b\doteqdot c$ $a⋒b\triangleq c$ $a⋉b\precsim c$ $a⋊b\lesssim c$ $a\star b⪅c$ $a⋎b⪕c$ $a⋏b⪖c$ $a⋋b⋞c$ $a⋌b⋟c$ $a⊺b\preccurlyeq c$ $a\dotplus b\leqq c$ $a⊝b⩽c$ $a\divideontimes b\lessgtr c$ $a·b\risingdotseq c$ $a\int b\fallingdotseq c$ $a&b\succcurlyeq c$ $a±b\geqq c$ $a\mp b⩾c$ $a×b\gtrless c$ $a\cdot b⊳c$ $a*b⊲c$ $a\cup b⊵c$ $a\cap b⊴c$ $a\circ b\between c$ $a•b▸c$ $a÷b◂c$ $a\bigsqcup b\eqcirc c$ $a\sqcap b⋚c$ $a○b⋛c$ $ab⪋c$ $a\setminus b⪌c$ $a\oplus b\propto c$ $a\ominus b\smallsmilec$ $a\otimes b\smallfrownc$ $a\odot b⋐c$ $a⊛b⋑c$ $a\vee b⫅c$ $a\wedge b⫆c$ $a⊚b\bumpeq c$ $a⊲b\Bumpeq c$ $a⊳b⋘c$ $a⊻b⋙c$ $a⌅b⋔c$ $a\wr b\backsim c$ $a◃b\backsimeq c$ $a▹b\eqsim c$ $a\uplus b⋖c$ $a⌆b⋗c$ $a⨿b\mid c$ $a⊴b\parallel c$ $a⊵b\sim c$ $a▽b\approx c$ $a△b\approxeq c$ $a\diamond b⪸c$ $a†b⪷c$ $a‡b\ni c$ $a⊞b\vartrianglec$

## 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\to 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\ne c\cdot d$ $a+b=c\cdot d$ $a-b\notin c*d$ $a-b\in c*d$ $a+b\lneqq ︀c×d$ $a+b\leqq c×d$ $a-b\gneqq ︀c÷d$ $a-b\geqq c÷d$ $a+b\nleqq c\cdot d$ $a-b\ngeqq c*d$ $a+b\nless c×d$ $a-b\ngtr c÷d$ $a+b\nprec c\cdot d$ $a-b\nsucc c*d$ $a+b\lneqq c×d$ $a-b\gneqq c÷d$ $a+b⩽̸c\cdot d$ $a-b⩾̸c*d$ $a+b⪇c×d$ $a-b⪈c÷d$ $a+b⪯̸c\cdot d$ $a-b⪰̸c*d$ $a+b⋨c×d$ $a-b⋩c÷d$ $a+b⋦c\cdot d$ $a-b⋧c*d$ $a+b\leqq ̸c×d$ $a-b\geqq ̸c÷d$ $a+b⪵c\cdot d$ $a-b⪶c*d$ $a+b⪹c×d$ $a-b⪺c÷d$ $a+b⪉c\cdot d$ $a-b⪊c*d$ $a+b\nsim c×d$ $a-b\ncong c÷d$ $a+b⊊︀c\cdot d$ $a-b⊋︀c*d$ $a+b⫅̸c×d$ $a-b⫆̸c÷d$ $a+b⫋c\cdot d$ $a-b⫌c*d$ $a+b⫋︀c×d$ $a-b⫌︀c÷d$ $a+b⊊c\cdot d$ $a-b⊋c*d$ $a+b⊈c×d$ $a-b⊉c÷d$ $a+b\nparallel c\cdot d$ $a-b\nmid c*d$ $a+b\nmid c×d$ $a+b\nparallel c÷d$ $a+b⊬c\cdot d$ $a+b⊮c*d$ $a+b⊭c×d$ $a+b⊯c÷d$ $a+b⋭c\cdot d$ $a+b⋬c*d$ $a+b⋫c×d$ $a+b⋪c÷d$ $a+b↚c\cdot d$ $a+b↛c*d$ $a+b⇍c×d$ $a+b⇏c÷d$ $a+b⇎c\cdot 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 $\left(x\right)\left[y\right]\left\{1\right\}⟨T⟩⌊a⌋⌈\text{.}⌉|\pi |||\Sigma ||$ and $/F/\n\↕\Re ↕⇕1.0⇕↑{x}^{2}↑⇑{x}_{a}^{2}⇑↓x↓⇓M⇓$. Here are some examples with a bit more stretching $\left(\frac{{k}^{\frac{1}{2}}}{2}\right)\left[\frac{{k}^{\frac{1}{2}}}{2}\right]\left\{\frac{{k}^{\frac{1}{2}}}{2}\right\}⟨\frac{{k}^{\frac{1}{2}}}{2}⟩⌊\frac{{k}^{\frac{1}{2}}}{2}⌋⌈\frac{{k}^{\frac{1}{2}}}{2}⌉|\frac{{k}^{\frac{1}{2}}}{2}|\parallel \frac{{k}^{\frac{1}{2}}}{2}\parallel$ and $/\frac{{k}^{\frac{1}{2}}}{2}/\\frac{{k}^{\frac{1}{2}}}{2}\↕\frac{{k}^{\frac{1}{2}}}{2}↕⇕\frac{{k}^{\frac{1}{2}}}{2}⇕↑\frac{{k}^{\frac{1}{2}}}{2}↑⇑\frac{{k}^{\frac{1}{2}}}{2}⇑↓\frac{{k}^{\frac{1}{2}}}{2}↓⇓\frac{{k}^{\frac{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+|\text{.}|+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 $\left(\genfrac{}{}{0}{}{8-5}{8}\right)+\left[\frac{1}{2}\right]+⌊\frac{\frac{1}{2}}{2}⌋+⌈\frac{\frac{1}{x}}{\frac{y}{x+1}}⌉+|\frac{{e}^{-2\pi t}}{\theta }|$ 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 θ |$

Tags: