OfficeMath작업
Contents
[
Hide
]
이제OfficeMath유형의 객체로 작업하는 것이 더욱 편리합니다. Aspose.Words에서 고객은 쉽게 정당화 할 수 있으며 방정식이 인라인 또는 별도의 라인에 표시되는지 관리 할 수 있습니다. 더 나아가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-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"); |