MathParagraph

MathParagraph class

数学段落,它是数学块(IMathBlock)的容器

public class MathParagraph : IMathParagraph

Constructors

NameDescription
MathParagraph()初始化 MathParagraph 类的新实例。
MathParagraph(IMathBlock)初始化 MathParagraph 类的新实例。

Properties

NameDescription
Count { get; }获取集合中实际包含的元素数量。只读 Int32。
Item { get; set; }获取指定索引处的项。只读 IMathBlock
Justification { get; set; }段落对齐 默认值:居中对齐

Methods

NameDescription
Add(IMathBlock)将 IMathBlock 添加到集合的末尾。
Clear()从集合中删除所有元素。
Contains(IMathBlock)确定集合是否包含特定值。
IndexOf(IMathBlock)确定集合中特定 IMathBlock 的索引。
Insert(int, IMathBlock)在指定索引处将 IMathBlock 插入集合。
Remove(IMathBlock)从集合中删除特定对象的第一次出现。
RemoveAt(int)删除集合中指定索引的项。
ToLatex()获取 LaTeX 格式的数学方程
WriteAsMathMl(Stream)将此 MathParagraph 的内容保存为 MathML

Examples

示例:

[C#]
IAutoShape shape = slide.Shapes.AddMathShape(x, y, width, height);
IMathParagraph mathParagraph = (shape.TextFrame.Paragraphs[0].Portions[0] as MathPortion).MathParagraph;
mathParagraph.Justification = MathJustification.LeftJustified;

See Also