MathBlock

MathBlock class

指定包含在 MathParagraph 中并独立起始于一行的数学文本实例。所有数学区域,包括方程、表达式、方程或表达式的数组以及公式,都通过数学块表示。

public sealed class MathBlock : MathElementBase, IMathBlock

构造函数

名称描述
MathBlock()初始化 MathBlock 类的新实例。
MathBlock(IEnumerable<IMathElement>)创建一个新的数学块并将指定元素放入其中
MathBlock(IMathElement)创建一个新的数学块并将指定元素放入其中

属性

名称描述
Count { get; }获取集合中实际包含的子数学元素的数量。只读 Int32。
IsReadOnly { get; }返回 false,因为子元素集合可以被修改。
Item { get; set; }获取或设置指定索引处的 IMathElement。

方法

名称描述
Accent(char)设置一个重音符(此元素顶部的字符)
Add(IMathElement)将数学元素添加到集合的末尾。
AsArgumentOfFunction(IMathElement)以此实例作为参数接受指定函数
AsArgumentOfFunction(MathFunctionsOfOneArgument)以此实例作为参数接受指定函数
AsArgumentOfFunction(string)以此实例作为参数接受指定函数
AsArgumentOfFunction(MathFunctionsOfTwoArguments, IMathElement)以此实例作为参数接受指定函数和指定额外参数
AsArgumentOfFunction(MathFunctionsOfTwoArguments, string)以此实例作为参数接受指定函数和指定额外参数
Clear()从集合中移除所有元素。
Contains(IMathElement)确定集合是否包含特定值。
CopyTo(IMathElement[], int)复制到指定的数组。
Delimit(char)用分隔字符(不带括号)定界子元素
Divide(IMathElement)创建一个以此为分子和指定分母的分数
Divide(string)创建一个以此为分子和指定分母的分数
Divide(IMathElement, MathFractionTypes)创建一个指定类型的分数,以此为分子和指定分母
Divide(string, MathFractionTypes)创建一个指定类型的分数,以此为分子和指定分母
Enclose()将数学元素用括号括起来
override Enclose(char, char)将此块的子元素用指定字符(如括号或其他字符)括起来
Enclose(char, char, char)将此块的子元素用指定字符(如括号或其他字符)括起来,并用分隔字符定界
Function(IMathElement)以此实例作为函数名接受一个参数的函数
Function(string)以此实例作为函数名接受一个参数的函数
GetChildren()获取子元素
Group()使用底部大括号将此元素放入组中
Group(char, MathTopBotPositions, MathTopBotPositions)使用分组字符如底部大括号或其他将此元素放入组中
IndexOf(IMathElement)确定集合中特定数学元素的索引。
Insert(int, IMathElement)在指定索引处将 MathElement 插入集合。
Integral(MathIntegralTypes)不带限制地取积分
Integral(MathIntegralTypes, IMathElement, IMathElement)取积分
Integral(MathIntegralTypes, string, string)取积分
Integral(MathIntegralTypes, IMathElement, IMathElement, MathLimitLocations)取积分
Integral(MathIntegralTypes, string, string, MathLimitLocations)取积分
override Join(IMathElement)将数学元素与此数学块连接
override Join(string)将数学文本与此数学块连接
JoinBlock(IMathBlock)将另一个数学块与此块连接
Nary(MathNaryOperatorTypes, IMathElement, IMathElement)创建 N-元操作符
Nary(MathNaryOperatorTypes, string, string)创建 N-元操作符
Overbar()在此元素的顶部设置一条横杠
Radical(IMathElement)指定从指定参数计算的给定次数的数学根。
Radical(string)指定从指定参数计算的给定次数的数学根。
Remove(IMathElement)从集合中移除特定对象的第一次出现。
RemoveAt(int)移除集合中指定索引处的元素。
SetLowerLimit(IMathElement)取下限
SetLowerLimit(string)取下限
SetSubscript(IMathElement)创建下标
SetSubscript(string)创建下标
SetSubSuperscriptOnTheLeft(IMathElement, IMathElement)在左侧创建下标和上标
SetSubSuperscriptOnTheLeft(string, string)在左侧创建下标和上标
SetSubSuperscriptOnTheRight(IMathElement, IMathElement)在右侧创建下标和上标
SetSubSuperscriptOnTheRight(string, string)在右侧创建下标和上标
SetSuperscript(IMathElement)创建上标
SetSuperscript(string)创建上标
SetUpperLimit(IMathElement)取上限
SetUpperLimit(string)取上限
ToBorderBox()将此元素放入边框框中
ToBorderBox(bool, bool, bool, bool, bool, bool, bool, bool)将此元素放入边框框中
ToBox()将此元素放入一个非可视框(逻辑分组),用于分组方程或其他数学文本实例的组件。一个框住的对象可以(例如)充当一个操作符仿真器,无论有无对齐点,充当换行点,或者被分组以禁止换行。
override ToMathArray()将子元素放入垂直数组
Underbar()在此元素的底部设置一条横杠
WriteAsMathMl(Stream)将此 MathBlock 的内容保存为 MathML

示例

示例:

[C#]
MathBlock mathBlock = new MathBlock();

另请参阅