Insert

MathParagraph.Insert method

将 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);

也可以看看