MathBlock class

MathBlock class

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.

Inheritance:MathBlock → MathElementBase

The MathBlock type exposes the following members:

Constructors

ConstructorDescription
__init__(self)Initializes a new instance of the MathBlock class.
__init__(self, math_element)Creates a new mathematical block and puts specified element in it
__init__(self, math_elements)

Properties

PropertyDescription
countGets the number of child math elements actually contained in the collection.
Read-only int.
is_read_onlyReturns false because child elements collection can be modified.

Gets or sets IMathElement at the specified index.

Indexer

NameDescription
[index]The zero-based index of the item

Methods

MethodDescription
join(self, math_element)Joins a mathematical element with this mathematical block
join(self, math_text)Joins a mathematical text with this mathematical block
divide(self, denominator)Creates a fraction with this numerator and specified denominator
divide(self, denominator)Creates a fraction with this numerator and specified denominator
divide(self, denominator, fraction_type)Creates a fraction of the specified type with this numerator and specified denominator
divide(self, denominator, fraction_type)Creates a fraction of the specified type with this numerator and specified denominator
enclose(self, beginning_character, ending_character)Encloses child elements of this block in specified characters such as parenthesis or another characters as framing
enclose(self, beginning_character, ending_character, separator_character)Encloses child elements of this block in specified characters such as parenthesis or another as framing
and delimit with a separator character
enclose(self)Encloses a math element in parenthesis
function(self, function_argument)Takes a function of an argument using this instance as the function name
function(self, function_argument)Takes a function of an argument using this instance as the function name
as_argument_of_function(self, function_name)Takes specified function using this instance as the argument
as_argument_of_function(self, function_name)Takes specified function using this instance as the argument
as_argument_of_function(self, function_type)Takes specified function using this instance as the argument
as_argument_of_function(self, function_type, additional_argument)Takes specified function using this instance as the argument and specified additional argument
as_argument_of_function(self, function_type, additional_argument)Takes specified function using this instance as the argument and specified additional argument
set_subscript(self, subscript)Creates subscript
set_subscript(self, subscript)Creates subscript
set_superscript(self, superscript)Creates superscript
set_superscript(self, superscript)Creates superscript
set_sub_superscript_on_the_right(self, subscript, superscript)Creates subscript and superscript on the right
set_sub_superscript_on_the_right(self, subscript, superscript)Creates subscript and superscript on the right
set_sub_superscript_on_the_left(self, subscript, superscript)Creates subscript and superscript on the left
set_sub_superscript_on_the_left(self, subscript, superscript)Creates subscript and superscript on the left
radical(self, degree)Specifies the mathematical root of the given degree from the specified argument.
radical(self, degree)Specifies the mathematical root of the given degree from the specified argument.
set_upper_limit(self, limit)Takes upper limit
set_upper_limit(self, limit)Takes upper limit
set_lower_limit(self, limit)Takes lower limit
set_lower_limit(self, limit)Takes lower limit
nary(self, type, lower_limit, upper_limit)Creates a N-ary operator
nary(self, type, lower_limit, upper_limit)Creates a N-ary operator
integral(self, integral_type, lower_limit, upper_limit, limit_locations)Takes the integral
integral(self, integral_type, lower_limit, upper_limit)Takes the integral
integral(self, integral_type)Takes the integral without limits
integral(self, integral_type, lower_limit, upper_limit, limit_locations)Takes the integral
integral(self, integral_type, lower_limit, upper_limit)Takes the integral
group(self)Places this element in a group using a bottom curly bracket
group(self, character, position, vertical_justification)Places this element in a group using a grouping character such as bottom curly bracket or another
to_border_box(self)Places this element in a border-box
to_border_box(self, hide_top, hide_bottom, hide_left, hide_right, strikethrough_horizontal, strikethrough_vertical, strikethrough_bottom_left_to_top_right, strikethrough_top_left_to_bottom_right)Places this element in a border-box
to_math_array(self)Puts child elements in a vertical array
accent(self, accent_character)Sets an accent mark (a character on the top of this element)
overbar(self)Sets a bar on the top of this element
underbar(self)Sets a bar on the bottom of this element
to_box(self)Places this element in a non-visual box (logical grouping)
which is used to group components of an equation or other instance of mathematical text.
A boxed object can (for example) serve as an operator emulator with or without an alignment point,
serve as a line break point, or be grouped such as not to allow line breaks within.
get_children(self)Get children elements
add(self, item)Adds a math element to the end of the collection.
clear(self)Removes all elements from the collection.
contains(self, item)Determines whether the collection contains a specific value.
copy_to(self, array, array_index)Copy to specified array.
remove(self, item)Removes the first occurrence of a specific object from the collection.
index_of(self, item)Determines the index of a specific math element in collection.
insert(self, index, item)Inserts a MathElement into the collection at the specified index.
remove_at(self, index)Removes the element at the specified index of the collection.
join_block(self, other)Joins another mathematical block with this one
delimit(self, separator_character)Delimits child elements with separator character (without the brackets)
write_as_math_ml(self, stream)Saves content of this MathBlock as MathML

See Also