使用 OfficeMath

Contents
[ ]

现在使用 OfficeMath 类型对象更加方便。在 Aspose.Words 中,客户可以轻松地进行 Justify,还可以管理方程是内联显示还是单独行显示。更重要的是,随着 MathObjectType 的可用性;可以通过使用此矩阵对象来实现有用的控件。

以下代码示例展示了如何使用这些属性:

# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET
doc = aw.Document(docs_base.my_dir + "Office math.docx")
officeMath = doc.get_child(aw.NodeType.OFFICE_MATH, 0, True).as_office_math()
# OfficeMath display type represents whether an equation is displayed inline with the text or displayed on its line.
officeMath.display_type = aw.math.OfficeMathDisplayType.DISPLAY
officeMath.justification = aw.math.OfficeMathJustification.LEFT
doc.save(docs_base.artifacts_dir + "WorkingWithOfficeMath.math_equations.docx")