使用 OfficeMath
Contents
[
Hide
]
现在使用 OfficeMath 类型对象更加方便。在 Aspose.Words 中,客户可以轻松地进行 Justify,还可以管理方程是内联显示还是单独行显示。更重要的是,随着 MathObjectType 的可用性;可以通过使用此矩阵对象来实现有用的控件。
以下代码示例展示了如何使用这些属性:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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") |