OfficeMath로 작업하기
Contents
[
Hide
]
이제 OfficeMath Type Objects로 작업하는 것이 더욱 편리해졌습니다. 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-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_WorkingWithFields(); | |
Document doc = new Document(dataDir+ "MathEquations.docx"); | |
OfficeMath officeMath = (OfficeMath)doc.GetChild(NodeType.OfficeMath, 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.DisplayType = OfficeMathDisplayType.Display; // or OfficeMathDisplayType.Inline | |
// Gets/sets Office Math justification. | |
officeMath.Justification = OfficeMathJustification.Left; // Left justification of Math Paragraph. | |
doc.Save(dataDir + "MathEquations_out.docx"); |