L.6.1.13 Literal Operators and Operator Emulators
Literal Operators and Operator Emulators are two special operators in the Office Open XML Math Markup Language. These operator types and their properties have been well documented and published as a Unicode Technical Note (http://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v2.pdf).
Linear format operators such as “=”, “+”, and “[“, are usually single Unicode characters that have special meaning. For example, the “/” linear format operator usually signals that it and its operands should be 𝑎 “built up” into a fraction. Consequently, the linear string “a/b” is interpreted to mean . The Literal 𝑏 Operator “\” can be used to strip the implied special meaning of the “/” operator so that this build up does not occur. This happens because the literal operator dictates that the following Unicode character be interpreted literally and not be given its usual special meaning.
An example linear string with a literal operator might be “c = a / b”. This string would indicate that the 𝑎 “/” character should be taken literally and not used to build the equation into 𝑐 = . With the literal 𝑏 operator “\”, the result is the equation 𝑐 = 𝑎/𝑏. The XML for this equation is as follows: (looks inline, i.e., not a math para)
<m:oMathPara>
<m:oMath>
<m:r>
<m:t>c=a</m:t>
</m:r>
<m:r>
<m:rPr>
<m:lit />
</m:rPr>
<m:t>/</m:t>
</m:r>
<m:r>
<m:t>b</m:t>
</m:r>
</m:oMath>
</m:oMathPara>
Single-character linear format operators have the ability to be aligned, serve as line break points, or have associated argument size attributes. Sometimes it is desirable to have multi-character operators that have these properties, such as “==”, which is where the operator emulator element (opEmu) and the box element (box) are useful. A box element, as explained previously, is used to group components
of an expression or equation. Note that the box is not a visible box. It is only a grouping mechanism. The opEmu element is also used to signify that the box and its contents must behave as a single operator and inherit the properties of an operator. This means, for example, that the grouped characters can serve as a point for a line break and can be aligned to other operators. Operator Emulators are often used when one or more characters combine to form an operator, such as “==”, “++”, etc. A good example of a box and opEmu combination is shown in 7.1.4, Box Object.
Alignment points are one of the unique properties of operators. They allow multiple objects in a single math zone to be aligned against their various operators to improve readability. Alignment points are set through linear format using the “&” character. An example of equations being aligned to their operators is shown in 7.1.6, Array Object. In that example and the example below, ampersands are interpreted as alternating align and spacer values. A spacer value is implied at the beginning of each line (represented by an <m:e> element) while every following odd ‘&’ is an alignment point and every even ‘&’ is a place where space can be added to align expressions or equations. A brief example of this is as follows:
Example:
Example XML:
<m:eqArr>
<m:e>
<m:r>
<m:t>&x+&9&y =&15&</m:t>
</m:r>
</m:e>
<m:e>
<m:r>
<m:t>8&x+&&y =&5&</m:t>
</m:r>
</m:e>
</m:eqArr>