Skip to content

Instantly share code, notes, and snippets.

@aspose-words-gists
Last active February 3, 2025 09:04
Aspose.Words for .NET. Working with OfficeMath using C#.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "Office math.docx");
OfficeMath officeMath = (OfficeMath) doc.GetChild(NodeType.OfficeMath, 0, true);
// OfficeMath display type represents whether an equation is displayed inline with the text or displayed on its line.
officeMath.DisplayType = OfficeMathDisplayType.Display;
officeMath.Justification = OfficeMathJustification.Left;
doc.Save(ArtifactsDir + "WorkingWithOfficeMath.MathEquations.docx");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment