OfficeMathEquationXmlEncoding Property

Gets/sets an encoding that was used to encode equation XML, if this office math object is read from equation XML. We use the encoding on saving a document to write in same encoding that it was read.

Namespace:  Aspose.Words.Math
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public Encoding EquationXmlEncoding { get; set; }

Property Value

Type: Encoding
Examples
Shows how to set office math display formatting.
Document doc = new Document(MyDir + "Office math.docx");

OfficeMath officeMath = (OfficeMath) doc.GetChild(NodeType.OfficeMath, 0, true);

// OfficeMath nodes that are children of other OfficeMath nodes are always inline
// The node we are working with is a base node, so its location and display type can be changed
Assert.AreEqual(MathObjectType.OMathPara, officeMath.MathObjectType);
Assert.AreEqual(NodeType.OfficeMath, officeMath.NodeType);
Assert.AreEqual(officeMath.ParentNode, officeMath.ParentParagraph);

// Used by OOXML and WML formats
Assert.IsNull(officeMath.EquationXmlEncoding);

// We can change the location and display type of the OfficeMath node
officeMath.DisplayType = OfficeMathDisplayType.Display;
officeMath.Justification = OfficeMathJustification.Left;

doc.Save(ArtifactsDir + "Shape.OfficeMath.docx");
See Also