함께 작업 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-C | |
// The path to the documents directories. | |
System::String inputDataDir = GetInputDataDir_WorkingWithFields(); | |
System::String outputDataDir = GetOutputDataDir_WorkingWithFields(); | |
System::SharedPtr<Document> doc = System::MakeObject<Document>(inputDataDir + u"MathEquations.docx"); | |
System::SharedPtr<OfficeMath> officeMath = System::DynamicCast<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->set_DisplayType(OfficeMathDisplayType::Display); | |
// or OfficeMathDisplayType.Inline | |
// Gets/sets Office Math justification. | |
officeMath->set_Justification(OfficeMathJustification::Left); | |
// Left justification of Math Paragraph. | |
System::String outputPath = outputDataDir + u"UseOfficeMathProperties.docx"; | |
doc->Save(outputPath); |