MathBlock

MathBlock 类

指定 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();

另见