Insert

MathParagraph.Insert 方法

在指定索引处将 IMathBlock 插入集合中。

public void Insert(int index, IMathBlock mathBlock)
参数类型描述
indexInt32应插入项的零基础索引。
mathBlockIMathBlock要插入的 IMathBlock。

示例

示例:

[C#]
IAutoShape shape = slide.Shapes.AddMathShape(x, y, width, height);
IMathParagraph mathParagraph = (shape.TextFrame.Paragraphs[0].Portions[0] as MathPortion).MathParagraph;
IMathBlock block = new MathBlock(new MathematicalText("y"));
mathParagraph.Insert(0, block);

另请参阅