IMathBlock

All Implemented Interfaces: com.aspose.slides.IMathElementCollection, com.aspose.slides.IMathElement

public interface IMathBlock extends IMathElementCollection, IMathElement

Specifies an instance of mathematical text that contained within a MathParagraph and starts on its own line. All math zones, including equations, expressions, arrays of equations or expressions, and formulas are represented by math block.


Example:
 
 IMathBlock mathBlock = new MathBlock();

Methods

MethodDescription
delimit(char separatorCharacter)Delimits all child elements with separator character (without the brackets)
enclose(char beginningCharacter, char endingCharacter, char separatorCharacter)Encloses child elements of this block in specified characters such as parenthesis or another as framing and delimit with a separator character
joinBlock(IMathBlock other)Joins another mathematical block with this one
writeAsMathMl(OutputStream stream)Saves content of this IMathBlock as MathML

delimit(char separatorCharacter)

public abstract IMathDelimiter delimit(char separatorCharacter)

Delimits all child elements with separator character (without the brackets)


Example:
 
 IMathBlock mathBlock = new MathematicalText("x").join("y");
 IMathDelimiter delimiterElement = mathBlock.delimit('|');

Parameters:

ParameterTypeDescription
separatorCharactercharCharacter used as a separator

Returns: IMathDelimiter - Instance of IMathDelimiter element

enclose(char beginningCharacter, char endingCharacter, char separatorCharacter)

public abstract IMathDelimiter enclose(char beginningCharacter, char endingCharacter, char separatorCharacter)

Encloses child elements of this block in specified characters such as parenthesis or another as framing and delimit with a separator character


Example:
 
 IMathBlock mathBlock = new MathematicalText("x").join("y");
 IMathDelimiter delimiterElement = mathBlock.enclose('{', '}', '%');

Parameters:

ParameterTypeDescription
beginningCharactercharBeginning character (usually left bracket)
endingCharactercharEnding character (usually right bracket)
separatorCharactercharSeparator character

Returns: IMathDelimiter - The math element of type IMathDelimiter which includes specified characters as framing and delimiter

joinBlock(IMathBlock other)

public abstract IMathBlock joinBlock(IMathBlock other)

Joins another mathematical block with this one


Example:
 
 IMathBlock block1 = new MathSuperscriptElement(new MathematicalText("c"), new MathematicalText("2")).join(new MathematicalText("="));
 IMathBlock block2 = new MathSuperscriptElement(new MathematicalText("a"), new MathematicalText("2")).join(new MathematicalText("+"))
 .join(new MathSuperscriptElement(new MathematicalText("b"), new MathematicalText("2")));
 IMathBlock block3 = block1.joinBlock(block2);

Parameters:

ParameterTypeDescription
otherIMathBlockThe joining block

Returns: IMathBlock - this mathematical block after joining

writeAsMathMl(OutputStream stream)

public abstract void writeAsMathMl(OutputStream stream)

Saves content of this IMathBlock as MathML

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamTarget stream