OfficeMathでの作業

Contents
[ ]

OfficeMath 型オブジェクトの操作がさらに便利になりました。Aspose.Words では、顧客は簡単に位置合わせでき、数式をインラインで表示するか別の行で表示するかを管理することもできます。さらに、MathObjectType が利用できるようになったことで、このマトリックス オブジェクトを使用して便利なコントロールを実装できます。

次のコード例は、これらのプロパティを使用する方法を示しています:

// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(UseOfficeMathProperties.class);
Document doc = new Document(dataDir + "MathEquations.docx");
OfficeMath officeMath = (OfficeMath) doc.getChild(NodeType.OFFICE_MATH, 0, true);
// Gets/sets Office Math display format type which represents whether an equation is displayed inline with the text or displayed on its own line.
officeMath.setDisplayType(OfficeMathDisplayType.DISPLAY); // or OfficeMathDisplayType.Inline
// Gets/sets Office Math justification.
officeMath.setJustification(OfficeMathJustification.LEFT); // Left justification of Math Paragraph.
doc.save(dataDir + "MathEquations_out.docx");