Export (0) Print
Expand All

3.8.3 Reading the equationXml attribute

The contents of the equationXml attribute, as written by Word 2007, Word 2010, or earlier versions of Word with the Compatibility Pack, can be read in two different ways to determine the mathematical equation associated with the image:

To determine the associated equation/expression, read only the Office Open XML Math elements and ignore all other elements.

To determine the associated equation/expression including any additional WordprocessingML formatting (the addition of a bookmark, for example), read all elements.

[Example: The following XML represents the value of the equationXml attribute representing a mathematical equation containing a fraction with numerator x and denominator y where the numerator is formatted red and the denominator is enclosed in a bookmark with the name “bookmark_name”:

<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:m= "http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" ><w:body><w:p><m:oMathPara><m:oMath><m:f ><m:fPr><m:ctrlPr><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><w:i/></w:rPr></m:ctrlPr ></m:fPr><m:num><m:r><w:rPr ><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><w:i/><w:color w:val="FF0000"/></w:rPr><m:t>x</m:t ></m:r></m:num><m:den><aml:annotation aml:id="0" w:type="Word.Bookmark.Start" w:name="bookmark_name"/><m:r><w:rPr ><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><w:i/></w:rPr><m:t>y</m:t ></m:r><aml:annotation aml:id="0" w:type="Word.Bookmark.End"/></m:den></m:f ></m:oMath></m:oMathPara></w:p></w:body ></w:wordDocument>

An application might choose to read just the Office Open XML math elements, in which case it would display the fraction but would lose the font color applied to the numerator and the bookmark located in the denominator:

Ff531163.8df5399e-7d83-44a0-91eb-f0cf202df02d(en-us,office.12).jpg

On the other hand, the application might choose to read all elements in which case it would display the font color and bookmark as well as the fraction:

Ff531163.86d1b7a8-142a-4ed4-ab2f-2b5c7eb8da0a(en-us,office.12).jpg

end example]

Show:
© 2014 Microsoft