<< Chapter < Page Chapter >> Page >
The mo operator element in MathML conveys the meaning of mathematical operation.

Specific attributes : form fence separator lspace rspace stretchy symmetric Specific attributes : maxsize minsize largeop movablelimits accent

The “mo” element displays an operator or other representations, which are treated as an operator in mathematics. The term "operator" also includes fence, separator, accent, comma, semicolon, invisible characters etc. , some of which are used to provide new meaning to the ordinary operator. Hence, “operator” in MathML has wider meaning beyond ordinary operators, consistent with the requirement of growing expanse of mathematical operations.

Many of the important operators contained within “mo” element can be typed directly. They are available on key board; while many others have to be referenced through valid Unicode entity references. The operator symbols, which can be typed from the keyboard include “+”, “-, ”/”, ”*”, ”(“, ”)”, ”{“, ”}”, ”[“, ”]”, “.NOT.”, ”.OR.” etc.

Following example shows the display of operators by "mo" element.

Displaying operators with “mo” element

<m:math display="block"> <m:mtable> <m:mtr> <m:mtd> <m:mi>Plus : </m:mi><m:mo>+</m:mo> <m:mi> ;</m:mi> <m:mi>Increment : </m:mi><m:mo>++</m:mo> <m:mi> ;</m:mi> <m:mi>Logical not : </m:mi><m:mo>.NOT.</m:mo> <m:mi> ;</m:mi> </m:mtd> </m:mtr> <m:mtr> <m:mtd> <m:mi>Less than and equal : </m:mi><m:mo> &le; </m:mo> <m:mi> ;</m:mi> <m:mi>Partial operator : </m:mi><m:mo> &PartialD; </m:mo> <m:mi> ;</m:mi> <m:mi>Differentiation : </m:mi><m:mo> &DifferentialD; </m:mo> <m:mi> ;</m:mi> <m:mi>Integration : </m:mi><m:mo> &int; </m:mo> </m:mtd> </m:mtr> </m:mtable> </m:math>

Save the file after editing as “test.xml”. The display looks like :

Plus : + ; Increment : ++ ; Logical not : .NOT. ; Less than and equal : ; Partial operator : ; Differentiation : ; Integration :

In the above example, we have used “mtable” (with “mtr” and “mtd” elements) element for controlling display. See that first three operators in above example have been typed directly from the keyboard; while others have been referenced by entity reference.

MathML design of rendering an operator closely follows mathematical convention. It distinguishes between rendering a character with “mi” element and an operator with “mo” operator in many important ways for notational representation of mathematical expression. Two basic considerations are (i) to manage space around the operator, consistent with the context in which they are displayed and (ii) dimensional change (stretching) of operators in accordance with the dimension of other elements and terms. Space around an operator is managed by “form” attribute, while stretching is managed by “stretchy” attribute of “mo” element. A plus operator ("+") may ,for example, precede or follow an identifier or may lie between two operands. Depending upon its placement, the space around the operator "+" is determined. Similarly, size of a parentheses around an expression must stretch to the height of the expression as in ( a b ) .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, A primer in mathml. OpenStax CNX. Apr 19, 2006 Download for free at http://cnx.org/content/col10345/1.16
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A primer in mathml' conversation and receive update notifications?

Ask