Class NaryEquationNode
Contents
[
Hide
]NaryEquationNode class
This class specifies an n-ary operator equation consisting of an n-ary operator, a base (or operand), and optional upper and lower bounds.
public class NaryEquationNode : EquationNode
Properties
| Name | Description |
|---|---|
| EquationType { get; } | Get the equation type of the current node(Inherited from EquationNode.) |
| Font { get; } | Returns the font of this object.(Inherited from FontSetting.) |
| IsHideSubscript { get; set; } | Whether to display the lower bound |
| IsHideSuperscript { get; set; } | Whether to display the upper bound |
| Length { get; } | Gets the length of the characters.(Inherited from FontSetting.) |
| LimitLocation { get; set; } | This attribute specifies the location of limits in n-ary operators. Limits can be either centered above and below the n-ary operator, or positioned just to the right of the operator. |
| NaryGrow { get; set; } | This attribute specifies the growth property of n-ary operators at the document level. When off, n-ary operators such as integrals and summations do not grow to match the size of their operand height. When on, the n-ary operator grows vertically to match its operand height. |
| NaryOperator { get; set; } | an n-ary operator.e.g “∑”. It is strongly recommended to use attribute NaryOperatorType to set n-ary operator. Use this property setting if you cannot find the character you need in a known type. |
| NaryOperatorType { get; set; } | an n-ary operator.e.g “∑” |
| ParentNode { get; set; } | Specifies the parent node of the current node(Inherited from EquationNode.) |
| StartIndex { get; } | Gets the start index of the characters.(Inherited from FontSetting.) |
| TextOptions { get; } | Returns the text options.(Inherited from FontSetting.) |
| override Type { get; } | Represents the type of the node.(Inherited from EquationNode.) |
Methods
| Name | Description |
|---|---|
| AddChild(EquationNode) | Inserts the specified node at the end of the current node’s list of child nodes.(Inherited from EquationNode.) |
| AddChild(EquationNodeType) | Insert a node of the specified type at the end of the child node list of the current node.(Inherited from EquationNode.) |
| override Equals(object) | Determine whether the current equation node is equal to the specified node |
| GetChild(int) | Returns the node at the specified index among the children of the current node.(Inherited from EquationNode.) |
| InsertAfter(EquationNodeType) | Inserts the specified node after the current node.(Inherited from EquationNode.) |
| InsertBefore(EquationNodeType) | Inserts the specified node before the current node.(Inherited from EquationNode.) |
| InsertChild(int, EquationNodeType) | Inserts a node of the specified type at the specified index position in the current node’s child node list.(Inherited from EquationNode.) |
| Remove() | Removes itself from the parent.(Inherited from EquationNode.) |
| RemoveAllChildren() | Removes all the child nodes of the current node.(Inherited from EquationNode.) |
| RemoveChild(EquationNode) | Removes the specified node from the current node’s children.(Inherited from EquationNode.) |
| RemoveChild(int) | Removes the node at the specified index from the current node’s children.(Inherited from EquationNode.) |
| SetWordArtStyle(PresetWordArtStyle) | Sets the preset WordArt style.(Inherited from FontSetting.) |
| ToLaTeX() | Convert this equtation to LaTeX expression.(Inherited from EquationNode.) |
| ToMathML() | Convert this equtation to MathML expression.(Inherited from EquationNode.) |
Examples
using System;
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.Equations;
namespace AsposeCellsExamples
{
public class EquationsClassNaryEquationNodeDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add an equation shape
TextBox textBox = worksheet.Shapes.AddEquation(3, 0, 3, 0, 100, 200);
// Get the equation node
EquationNode mathNode = textBox.GetEquationParagraph().GetChild(0);
// Create a nary equation node
NaryEquationNode naryNode = (NaryEquationNode)mathNode.AddChild(EquationNodeType.Nary);
// Set nary properties
naryNode.NaryOperator = "∫";
naryNode.IsHideSubscript = true;
naryNode.IsHideSuperscript = true;
naryNode.NaryGrow = false;
// Add base component
EquationNode baseNode = naryNode.AddChild(EquationNodeType.Base);
TextRunEquationNode baseText = (TextRunEquationNode)baseNode.AddChild(EquationNodeType.Text);
baseText.Text = "x";
// Save the workbook
workbook.Save("NaryEquationDemo.xlsx");
Console.WriteLine("Nary equation demo created successfully.");
}
}
}
See Also
- class EquationNode
- namespace Aspose.Cells.Drawing.Equations
- assembly Aspose.Cells