diff --git a/pydocx/openxml/shared_math/__init__.py b/pydocx/openxml/shared_math/__init__.py new file mode 100644 index 00000000..b4ef1584 --- /dev/null +++ b/pydocx/openxml/shared_math/__init__.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.accent_properties import AccentProperties +from pydocx.openxml.shared_math.align import Align +from pydocx.openxml.shared_math.align_scripts import AlignScripts +from pydocx.openxml.shared_math.argument_properties import ArgumentProperties +from pydocx.openxml.shared_math.argument_size import ArgumentSize +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.bar_properties import BarProperties +from pydocx.openxml.shared_math.base_justification import BaseJustification +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.border_box_properties import BorderBoxProperties +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.box_properties import BoxProperties +from pydocx.openxml.shared_math.break_on_binary_operators import BreakOnBinaryOperators +from pydocx.openxml.shared_math.break_on_binary_subtraction import BreakOnBinarySubtraction +from pydocx.openxml.shared_math.brk import Break +from pydocx.openxml.shared_math.character import Character +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.default_justification import DefaultJustification +from pydocx.openxml.shared_math.degree import Degree +from pydocx.openxml.shared_math.delimiter_beginning_character import ( + DelimiterBeginningCharacter +) +from pydocx.openxml.shared_math.delimiter_ending_character import ( + DelimiterEndingCharacter +) +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.delimiter_properties import DelimiterProperties +from pydocx.openxml.shared_math.delimiter_separator_character import ( + DelimiterSeparatorCharacter +) +from pydocx.openxml.shared_math.denominator import Denominator +from pydocx.openxml.shared_math.differential import Differential +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.equation_array_properties import EquationArrayProperties +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.fraction_properties import FractionProperties +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.function_name import FunctionName +from pydocx.openxml.shared_math.function_properties import FunctionProperties +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.group_character_properties import GroupCharacterProperties +from pydocx.openxml.shared_math.grow import Grow +from pydocx.openxml.shared_math.hide_bottom import HideBottom +from pydocx.openxml.shared_math.hide_degree import HideDegree +from pydocx.openxml.shared_math.hide_left import HideLeft +from pydocx.openxml.shared_math.hide_placeholders import HidePlaceholders +from pydocx.openxml.shared_math.hide_right import HideRight +from pydocx.openxml.shared_math.sub_hide import SubHide +from pydocx.openxml.shared_math.sup_hide import SupHide +from pydocx.openxml.shared_math.hide_top import HideTop +from pydocx.openxml.shared_math.integral_limit_locations import IntegralLimitLocations +from pydocx.openxml.shared_math.inter_equation_spacing import InterEquationSpacing +from pydocx.openxml.shared_math.intra_equation_spacing import IntraEquationSpacing +from pydocx.openxml.shared_math.justification import Justification +from pydocx.openxml.shared_math.left_margin import LeftMargin +from pydocx.openxml.shared_math.limit import Limit +from pydocx.openxml.shared_math.literal import Literal +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.lower_limit_properties import LowerLimitProperties +from pydocx.openxml.shared_math.math_font import MathFont +from pydocx.openxml.shared_math.math_properties import MathProperties +from pydocx.openxml.shared_math.matrix_column import MatrixColumn +from pydocx.openxml.shared_math.matrix_column_count import MatrixColumnCount +from pydocx.openxml.shared_math.matrix_column_gap import MatrixColumnGap +from pydocx.openxml.shared_math.matrix_column_gap_rule import MatrixColumnGapRule +from pydocx.openxml.shared_math.matrix_column_justification import MatrixColumnJustification +from pydocx.openxml.shared_math.matrix_column_properties import MatrixColumnProperties +from pydocx.openxml.shared_math.matrix_column_spacing import MatrixColumnSpacing +from pydocx.openxml.shared_math.matrix_columns import MatrixColumns +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.matrix_properties import MatrixProperties +from pydocx.openxml.shared_math.matrix_row import MatrixRow +from pydocx.openxml.shared_math.maximum_distribution import MaximumDistribution +from pydocx.openxml.shared_math.nary_limit_location import NaryLimitLocation +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.nary_properties import NaryProperties +from pydocx.openxml.shared_math.no_break import NoBreak +from pydocx.openxml.shared_math.normal_text import NormalText +from pydocx.openxml.shared_math.numerator import Numerator +from pydocx.openxml.shared_math.object_distribution import ObjectDistribution +from pydocx.openxml.shared_math.omath import OMath +from pydocx.openxml.shared_math.omath_paragraph import OMathParagraph +from pydocx.openxml.shared_math.omath_paragraph_properties import ( + OMathParagraphProperties +) +from pydocx.openxml.shared_math.operator_emulator import OperatorEmulator +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.phantom_properties import PhantomProperties +from pydocx.openxml.shared_math.position import Position +from pydocx.openxml.shared_math.post_equation_spacing import PostEquationSpacing +from pydocx.openxml.shared_math.pre_equation_spacing import ( + PreEquationSpacing +) +from pydocx.openxml.shared_math.pre_sub_superscript_function import ( + PreSubSuperscriptFunction +) +from pydocx.openxml.shared_math.pre_sub_superscript_properties import ( + PreSubSuperscriptProperties +) +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.radical_properties import RadicalProperties +from pydocx.openxml.shared_math.right_margin import RightMargin +from pydocx.openxml.shared_math.row_spacing import RowSpacing +from pydocx.openxml.shared_math.row_spacing_rule import RowSpacingRule +from pydocx.openxml.shared_math.script import Script +from pydocx.openxml.shared_math.shape_delimiters import ShapeDelimiters +from pydocx.openxml.shared_math.show import Show +from pydocx.openxml.shared_math.small_fraction import SmallFraction +from pydocx.openxml.shared_math.strike_bltr import StrikeBLTR +from pydocx.openxml.shared_math.strike_h import StrikeH +from pydocx.openxml.shared_math.strike_tlbr import StrikeTLBR +from pydocx.openxml.shared_math.strike_v import StrikeV +from pydocx.openxml.shared_math.style import Style +from pydocx.openxml.shared_math.sub import Sub +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.sub_superscript_properties import SubSuperscriptProperties +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.subscript_properties import SubscriptProperties +from pydocx.openxml.shared_math.sup import Sup +from pydocx.openxml.shared_math.superscript import Superscript +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.shared_math.superscript_properties import SuperscriptProperties +from pydocx.openxml.shared_math.transparent import Transparent +from pydocx.openxml.shared_math.type import Type +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.upper_limit_properties import UpperLimitProperties +from pydocx.openxml.shared_math.use_display_math_defaults import UseDisplayMathDefaults +from pydocx.openxml.shared_math.vertical_justification import VerticalJustification +from pydocx.openxml.shared_math.wrap_indent import WrapIndent +from pydocx.openxml.shared_math.wrap_right import WrapRight +from pydocx.openxml.shared_math.zero_ascent import ZeroAscent +from pydocx.openxml.shared_math.zero_descent import ZeroDescent +from pydocx.openxml.shared_math.zero_width import ZeroWidth + + +__all__ = [ + 'Accent', + 'AccentProperties', + 'Align', + 'AlignScripts', + 'ArgumentProperties', + 'ArgumentSize', + 'Bar', + 'BarProperties', + 'BaseJustification', + 'BorderBox', + 'BorderBoxProperties', + 'Box', + 'BoxProperties', + 'BreakOnBinaryOperators', + 'BreakOnBinarySubtraction', + 'Break', + 'Character', + 'ControlProperties', + 'DefaultJustification', + 'Degree', + 'DelimiterBeginningCharacter', + 'DelimiterEndingCharacter', + 'DelimiterFunction', + 'DelimiterProperties', + 'DelimiterSeparatorCharacter', + 'Denominator', + 'Differential', + 'Element', + 'EquationArrayFunction', + 'EquationArrayProperties', + 'FractionFunction', + 'FractionProperties', + 'FunctionApplyFunction', + 'FunctionName', + 'FunctionProperties', + 'GroupCharacterFunction', + 'GroupCharacterProperties', + 'Grow', + 'HideBottom', + 'HideDegree', + 'HideLeft', + 'HidePlaceholders', + 'HideRight', + 'SubHide', + 'SupHide', + 'HideTop', + 'IntegralLimitLocations', + 'InterEquationSpacing', + 'IntraEquationSpacing', + 'Justification', + 'LeftMargin', + 'Limit', + 'Literal', + 'LowerLimitFunction', + 'LowerLimitProperties', + 'MathFont', + 'MathProperties', + 'MatrixColumn', + 'MatrixColumnCount', + 'MatrixColumnGap', + 'MatrixColumnGapRule', + 'MatrixColumnJustification', + 'MatrixColumnProperties', + 'MatrixColumnSpacing', + 'MatrixColumns', + 'MatrixFunction', + 'MatrixProperties', + 'MatrixRow', + 'MaximumDistribution', + 'NaryLimitLocation', + 'NaryOperatorFunction', + 'NaryProperties', + 'NoBreak', + 'NormalText', + 'Numerator', + 'Numerator', + 'ObjectDistribution', + 'OMath', + 'OMathParagraph', + 'OMathParagraphProperties', + 'OperatorEmulator', + 'PhantomFunction', + 'PhantomProperties', + 'Position', + 'PostEquationSpacing', + 'PreEquationSpacing', + 'PreSubSuperscriptFunction', + 'PreSubSuperscriptProperties', + 'RadicalFunction', + 'RadicalProperties', + 'RightMargin', + 'RowSpacing', + 'RowSpacingRule', + 'Script', + 'ShapeDelimiters', + 'Show', + 'SmallFraction', + 'StrikeBLTR', + 'StrikeH', + 'StrikeTLBR', + 'StrikeV', + 'Style', + 'Sub', + 'SubSuperscriptFunction', + 'SubSuperscriptProperties', + 'SubscriptFunction', + 'SubscriptProperties', + 'Sup', + 'Superscript', + 'SuperscriptFunction', + 'SuperscriptProperties', + 'Transparent', + 'Type', + 'UpperLimitFunction', + 'UpperLimitProperties', + 'UseDisplayMathDefaults', + 'VerticalJustification', + 'WrapIndent', + 'WrapRight', + 'ZeroAscent', + 'ZeroDescent', + 'ZeroWidth' +] diff --git a/pydocx/openxml/shared_math/accent.py b/pydocx/openxml/shared_math/accent.py new file mode 100644 index 00000000..d31dd7a3 --- /dev/null +++ b/pydocx/openxml/shared_math/accent.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent_properties import AccentProperties +from pydocx.openxml.shared_math.element import Element + + +class Accent(XmlModel): + XML_TAG = 'acc' + + children = XmlCollection( + AccentProperties, + Element + ) diff --git a/pydocx/openxml/shared_math/accent_properties.py b/pydocx/openxml/shared_math/accent_properties.py new file mode 100644 index 00000000..3dca943b --- /dev/null +++ b/pydocx/openxml/shared_math/accent_properties.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.character import Character +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class AccentProperties(XmlModel): + XML_TAG = 'accPr' + + chr = XmlChild(type=Character, attrname='val') + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/align.py b/pydocx/openxml/shared_math/align.py new file mode 100644 index 00000000..2ba865dc --- /dev/null +++ b/pydocx/openxml/shared_math/align.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Align(XmlModel): + XML_TAG = 'aln' diff --git a/pydocx/openxml/shared_math/align_scripts.py b/pydocx/openxml/shared_math/align_scripts.py new file mode 100644 index 00000000..2163984c --- /dev/null +++ b/pydocx/openxml/shared_math/align_scripts.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class AlignScripts(XmlModel): + XML_TAG = 'alnScr' diff --git a/pydocx/openxml/shared_math/argument_properties.py b/pydocx/openxml/shared_math/argument_properties.py new file mode 100644 index 00000000..154301a0 --- /dev/null +++ b/pydocx/openxml/shared_math/argument_properties.py @@ -0,0 +1,14 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlChild +from pydocx.openxml.shared_math.argument_size import ArgumentSize + + +class ArgumentProperties(XmlModel): + XML_TAG = 'argPr' + + arg_sz = XmlChild(type=ArgumentSize, attrname='val') diff --git a/pydocx/openxml/shared_math/argument_size.py b/pydocx/openxml/shared_math/argument_size.py new file mode 100644 index 00000000..dde71d51 --- /dev/null +++ b/pydocx/openxml/shared_math/argument_size.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class ArgumentSize(XmlModel): + XML_TAG = 'argSz' diff --git a/pydocx/openxml/shared_math/bar.py b/pydocx/openxml/shared_math/bar.py new file mode 100644 index 00000000..d8628897 --- /dev/null +++ b/pydocx/openxml/shared_math/bar.py @@ -0,0 +1,17 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.bar_properties import BarProperties +from pydocx.openxml.shared_math.element import Element + + +class Bar(XmlModel): + XML_TAG = 'bar' + children = XmlCollection( + BarProperties, + Element + ) diff --git a/pydocx/openxml/shared_math/bar_properties.py b/pydocx/openxml/shared_math/bar_properties.py new file mode 100644 index 00000000..50323192 --- /dev/null +++ b/pydocx/openxml/shared_math/bar_properties.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.position import Position + + +class BarProperties(XmlModel): + XML_TAG = 'barPr' + + pos = XmlChild(type=Position, attrname='val') + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/base_justification.py b/pydocx/openxml/shared_math/base_justification.py new file mode 100644 index 00000000..70f85be2 --- /dev/null +++ b/pydocx/openxml/shared_math/base_justification.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class BaseJustification(XmlModel): + XML_TAG = 'baseJc' diff --git a/pydocx/openxml/shared_math/border_box.py b/pydocx/openxml/shared_math/border_box.py new file mode 100644 index 00000000..bfb9dac9 --- /dev/null +++ b/pydocx/openxml/shared_math/border_box.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.border_box_properties import BorderBoxProperties +from pydocx.openxml.shared_math.element import Element + + +class BorderBox(XmlModel): + XML_TAG = 'borderBox' + + children = XmlCollection( + BorderBoxProperties, + Element + ) diff --git a/pydocx/openxml/shared_math/border_box_properties.py b/pydocx/openxml/shared_math/border_box_properties.py new file mode 100644 index 00000000..1e8fdfe8 --- /dev/null +++ b/pydocx/openxml/shared_math/border_box_properties.py @@ -0,0 +1,34 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.hide_bottom import HideBottom +from pydocx.openxml.shared_math.hide_left import HideLeft +from pydocx.openxml.shared_math.hide_right import HideRight +from pydocx.openxml.shared_math.hide_top import HideTop +from pydocx.openxml.shared_math.strike_h import StrikeH +from pydocx.openxml.shared_math.strike_v import StrikeV +from pydocx.openxml.shared_math.strike_bltr import StrikeBLTR +from pydocx.openxml.shared_math.strike_tlbr import StrikeTLBR + + +class BorderBoxProperties(XmlModel): + + XML_TAG = 'borderBoxPr' + + hide_top = XmlChild(type=HideTop, attrname='val') + hide_bot = XmlChild(type=HideBottom, attrname='val') + hide_left = XmlChild(type=HideLeft, attrname='val') + hide_right = XmlChild(type=HideRight, attrname='val') + strike_h = XmlChild(type=StrikeH, attrname='val') + strike_v = XmlChild(type=StrikeV, attrname='val') + strike_bltr = XmlChild(type=StrikeBLTR, attrname='val') + strike_tlbr = XmlChild(type=StrikeTLBR, attrname='val') + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/box.py b/pydocx/openxml/shared_math/box.py new file mode 100644 index 00000000..716dcf51 --- /dev/null +++ b/pydocx/openxml/shared_math/box.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.box_properties import BoxProperties + + +class Box(XmlModel): + + XML_TAG = 'box' + children = XmlCollection( + Element, + BoxProperties + ) diff --git a/pydocx/openxml/shared_math/box_properties.py b/pydocx/openxml/shared_math/box_properties.py new file mode 100644 index 00000000..379b92c8 --- /dev/null +++ b/pydocx/openxml/shared_math/box_properties.py @@ -0,0 +1,26 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.align import Align +from pydocx.openxml.shared_math.brk import Break +from pydocx.openxml.shared_math.differential import Differential +from pydocx.openxml.shared_math.no_break import NoBreak +from pydocx.openxml.shared_math.operator_emulator import OperatorEmulator +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class BoxProperties(XmlModel): + + XML_TAG = 'boxPr' + aln = XmlChild(type=Align, attrname='val') + brk = XmlChild(type=Break, attrname='val') + diff = XmlChild(type=Differential, attrname='val') + no_break = XmlChild(type=NoBreak, attrname='val') + op_emu = XmlChild(type=OperatorEmulator, attrname='val') + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/break_on_binary_operators.py b/pydocx/openxml/shared_math/break_on_binary_operators.py new file mode 100644 index 00000000..4617ed5b --- /dev/null +++ b/pydocx/openxml/shared_math/break_on_binary_operators.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class BreakOnBinaryOperators(XmlModel): + + XML_TAG = 'brkBin' diff --git a/pydocx/openxml/shared_math/break_on_binary_subtraction.py b/pydocx/openxml/shared_math/break_on_binary_subtraction.py new file mode 100644 index 00000000..edf470b7 --- /dev/null +++ b/pydocx/openxml/shared_math/break_on_binary_subtraction.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class BreakOnBinarySubtraction(XmlModel): + + XML_TAG = 'brkBinSub' diff --git a/pydocx/openxml/shared_math/brk.py b/pydocx/openxml/shared_math/brk.py new file mode 100644 index 00000000..7eee670c --- /dev/null +++ b/pydocx/openxml/shared_math/brk.py @@ -0,0 +1,13 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection + + +class Break(XmlModel): + + XML_TAG = 'brk' + children = XmlCollection() diff --git a/pydocx/openxml/shared_math/character.py b/pydocx/openxml/shared_math/character.py new file mode 100644 index 00000000..a49fe243 --- /dev/null +++ b/pydocx/openxml/shared_math/character.py @@ -0,0 +1,17 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Character(XmlModel): + """ + Can be a accent character, + Group character or + n-ary operator character + """ + + XML_TAG = 'chr' diff --git a/pydocx/openxml/shared_math/control_properties.py b/pydocx/openxml/shared_math/control_properties.py new file mode 100644 index 00000000..7d37d3fc --- /dev/null +++ b/pydocx/openxml/shared_math/control_properties.py @@ -0,0 +1,20 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.wordprocessing.deleted_run import DeletedRun +from pydocx.openxml.wordprocessing.inserted_run import InsertedRun +from pydocx.openxml.wordprocessing.run_properties import RunProperties + + +class ControlProperties(XmlModel): + XML_TAG = 'ctrlPr' + + children = XmlCollection( + DeletedRun, + InsertedRun, + RunProperties + ) diff --git a/pydocx/openxml/shared_math/default_justification.py b/pydocx/openxml/shared_math/default_justification.py new file mode 100644 index 00000000..69f90e79 --- /dev/null +++ b/pydocx/openxml/shared_math/default_justification.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class DefaultJustification(XmlModel): + + XML_TAG = 'defJc' diff --git a/pydocx/openxml/shared_math/degree.py b/pydocx/openxml/shared_math/degree.py new file mode 100644 index 00000000..bb4ca055 --- /dev/null +++ b/pydocx/openxml/shared_math/degree.py @@ -0,0 +1,54 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Degree(XmlModel): + XML_TAG = 'deg' + + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/delimiter_beginning_character.py b/pydocx/openxml/shared_math/delimiter_beginning_character.py new file mode 100644 index 00000000..39a445c8 --- /dev/null +++ b/pydocx/openxml/shared_math/delimiter_beginning_character.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class DelimiterBeginningCharacter(XmlModel): + + XML_TAG = 'begChr' diff --git a/pydocx/openxml/shared_math/delimiter_ending_character.py b/pydocx/openxml/shared_math/delimiter_ending_character.py new file mode 100644 index 00000000..db70e02d --- /dev/null +++ b/pydocx/openxml/shared_math/delimiter_ending_character.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class DelimiterEndingCharacter(XmlModel): + + XML_TAG = 'endChr' diff --git a/pydocx/openxml/shared_math/delimiter_function.py b/pydocx/openxml/shared_math/delimiter_function.py new file mode 100644 index 00000000..6f93c5b2 --- /dev/null +++ b/pydocx/openxml/shared_math/delimiter_function.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.delimiter_properties import DelimiterProperties + + +class DelimiterFunction(XmlModel): + XML_TAG = 'd' + + children = XmlCollection( + Element, + DelimiterProperties + ) diff --git a/pydocx/openxml/shared_math/delimiter_properties.py b/pydocx/openxml/shared_math/delimiter_properties.py new file mode 100644 index 00000000..b84c6c64 --- /dev/null +++ b/pydocx/openxml/shared_math/delimiter_properties.py @@ -0,0 +1,31 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlChild, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.delimiter_beginning_character import ( + DelimiterBeginningCharacter +) +from pydocx.openxml.shared_math.delimiter_separator_character import ( + DelimiterSeparatorCharacter +) +from pydocx.openxml.shared_math.delimiter_ending_character import DelimiterEndingCharacter +from pydocx.openxml.shared_math.grow import Grow +from pydocx.openxml.shared_math.shape import Shape + + +class DelimiterProperties(XmlModel): + XML_TAG = 'dPr' + + beg_chr = XmlChild(type=DelimiterBeginningCharacter, attrname='val') + sep_chs = XmlChild(type=DelimiterSeparatorCharacter, attrname='val') + end_chr = XmlChild(type=DelimiterEndingCharacter, attrname='val') + grow = XmlChild(type=Grow, attrname='val') + shape = XmlChild(type=Shape, attrname='val') + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/delimiter_separator_character.py b/pydocx/openxml/shared_math/delimiter_separator_character.py new file mode 100644 index 00000000..ea445f59 --- /dev/null +++ b/pydocx/openxml/shared_math/delimiter_separator_character.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class DelimiterSeparatorCharacter(XmlModel): + + XML_TAG = 'sepChr' diff --git a/pydocx/openxml/shared_math/denominator.py b/pydocx/openxml/shared_math/denominator.py new file mode 100644 index 00000000..86ab91fa --- /dev/null +++ b/pydocx/openxml/shared_math/denominator.py @@ -0,0 +1,56 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.argument_properties import ArgumentProperties +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Denominator(XmlModel): + XML_TAG = 'den' + + children = XmlCollection( + ArgumentProperties, + Accent, + Bar, + Box, + BorderBox, + ControlProperties, + DelimiterFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/differential.py b/pydocx/openxml/shared_math/differential.py new file mode 100644 index 00000000..9d15645c --- /dev/null +++ b/pydocx/openxml/shared_math/differential.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Differential(XmlModel): + + XML_TAG = 'diff' diff --git a/pydocx/openxml/shared_math/element.py b/pydocx/openxml/shared_math/element.py new file mode 100644 index 00000000..a4c61bda --- /dev/null +++ b/pydocx/openxml/shared_math/element.py @@ -0,0 +1,56 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Element(XmlModel): + XML_TAG = 'e' + + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + ControlProperties, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/equation_array_function.py b/pydocx/openxml/shared_math/equation_array_function.py new file mode 100644 index 00000000..a4794883 --- /dev/null +++ b/pydocx/openxml/shared_math/equation_array_function.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.equation_array_properties import EquationArrayProperties + + +class EquationArrayFunction(XmlModel): + XML_TAG = 'eqArr' + + children = XmlCollection( + Element, + EquationArrayProperties + ) diff --git a/pydocx/openxml/shared_math/equation_array_properties.py b/pydocx/openxml/shared_math/equation_array_properties.py new file mode 100644 index 00000000..d331f39a --- /dev/null +++ b/pydocx/openxml/shared_math/equation_array_properties.py @@ -0,0 +1,26 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.base_justification import BaseJustification +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.maximum_distribution import MaximumDistribution +from pydocx.openxml.shared_math.object_distribution import ObjectDistribution +from pydocx.openxml.shared_math.row_spacing_rule import RowSpacingRule +from pydocx.openxml.shared_math.row_spacing import RowSpacing + + +class EquationArrayProperties(XmlModel): + XML_TAG = 'eqArrPr' + + base_jc = XmlChild(type=BaseJustification, attrname='val') + rsp_rule = XmlChild(type=RowSpacingRule, attrname='val') + rsp = XmlChild(type=RowSpacing, attrname='val') + children = XmlCollection( + MaximumDistribution, + ObjectDistribution, + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/fraction_function.py b/pydocx/openxml/shared_math/fraction_function.py new file mode 100644 index 00000000..df426787 --- /dev/null +++ b/pydocx/openxml/shared_math/fraction_function.py @@ -0,0 +1,20 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.fraction_properties import FractionProperties +from pydocx.openxml.shared_math.numerator import Numerator +from pydocx.openxml.shared_math.denominator import Denominator + + +class FractionFunction(XmlModel): + XML_TAG = 'f' + + children = XmlCollection( + FractionProperties, + Numerator, + Denominator + ) diff --git a/pydocx/openxml/shared_math/fraction_properties.py b/pydocx/openxml/shared_math/fraction_properties.py new file mode 100644 index 00000000..fd0ef1ac --- /dev/null +++ b/pydocx/openxml/shared_math/fraction_properties.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.type import Type + + +class FractionProperties(XmlModel): + + XML_TAG = 'fPr' + type = XmlChild(type=Type, attrname='val') + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/function_apply_function.py b/pydocx/openxml/shared_math/function_apply_function.py new file mode 100644 index 00000000..6d70849e --- /dev/null +++ b/pydocx/openxml/shared_math/function_apply_function.py @@ -0,0 +1,24 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.function_properties import FunctionProperties + + +class FunctionApplyFunction(XmlModel): + XML_TAG = 'func' + + children = XmlCollection( + FunctionProperties, + Element + ) + + +# solves circular import +from pydocx.openxml.shared_math.function_name import FunctionName # noqa + +FunctionApplyFunction.children.types.add(FunctionName) diff --git a/pydocx/openxml/shared_math/function_name.py b/pydocx/openxml/shared_math/function_name.py new file mode 100644 index 00000000..f25e76d8 --- /dev/null +++ b/pydocx/openxml/shared_math/function_name.py @@ -0,0 +1,54 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class FunctionName(XmlModel): + XML_TAG = 'fName' + + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/function_properties.py b/pydocx/openxml/shared_math/function_properties.py new file mode 100644 index 00000000..82e1294f --- /dev/null +++ b/pydocx/openxml/shared_math/function_properties.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class FunctionProperties(XmlModel): + XML_TAG = 'funcPr' + + children = XmlCollection( + ControlProperties, + ) diff --git a/pydocx/openxml/shared_math/group_character_function.py b/pydocx/openxml/shared_math/group_character_function.py new file mode 100644 index 00000000..c4782d41 --- /dev/null +++ b/pydocx/openxml/shared_math/group_character_function.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.group_character_properties import GroupCharacterProperties + + +class GroupCharacterFunction(XmlModel): + XML_TAG = 'groupChr' + + children = XmlCollection( + Element, + GroupCharacterProperties + ) diff --git a/pydocx/openxml/shared_math/group_character_properties.py b/pydocx/openxml/shared_math/group_character_properties.py new file mode 100644 index 00000000..4e99e4cb --- /dev/null +++ b/pydocx/openxml/shared_math/group_character_properties.py @@ -0,0 +1,22 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.character import Character +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.position import Position +from pydocx.openxml.shared_math.vertical_justification import VerticalJustification + + +class GroupCharacterProperties(XmlModel): + XML_TAG = 'groupChrPr' + + chr = XmlChild(type=Character, attrname='val') + pos = XmlChild(type=Position, attrname='val') + vert_jc = XmlChild(type=VerticalJustification, attrname='val') + children = XmlCollection( + ControlProperties, + ) diff --git a/pydocx/openxml/shared_math/grow.py b/pydocx/openxml/shared_math/grow.py new file mode 100644 index 00000000..3a881fb8 --- /dev/null +++ b/pydocx/openxml/shared_math/grow.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Grow(XmlModel): + + XML_TAG = 'grow' diff --git a/pydocx/openxml/shared_math/hide_bottom.py b/pydocx/openxml/shared_math/hide_bottom.py new file mode 100644 index 00000000..9b438034 --- /dev/null +++ b/pydocx/openxml/shared_math/hide_bottom.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class HideBottom(XmlModel): + + XML_TAG = 'hideBot' diff --git a/pydocx/openxml/shared_math/hide_degree.py b/pydocx/openxml/shared_math/hide_degree.py new file mode 100644 index 00000000..56444462 --- /dev/null +++ b/pydocx/openxml/shared_math/hide_degree.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class HideDegree(XmlModel): + + XML_TAG = 'degHide' diff --git a/pydocx/openxml/shared_math/hide_left.py b/pydocx/openxml/shared_math/hide_left.py new file mode 100644 index 00000000..2fedfc5d --- /dev/null +++ b/pydocx/openxml/shared_math/hide_left.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class HideLeft(XmlModel): + + XML_TAG = 'hideLeft' diff --git a/pydocx/openxml/shared_math/hide_placeholders.py b/pydocx/openxml/shared_math/hide_placeholders.py new file mode 100644 index 00000000..39c8f9fd --- /dev/null +++ b/pydocx/openxml/shared_math/hide_placeholders.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class HidePlaceholders(XmlModel): + + XML_TAG = 'plcHide' diff --git a/pydocx/openxml/shared_math/hide_right.py b/pydocx/openxml/shared_math/hide_right.py new file mode 100644 index 00000000..7c37a887 --- /dev/null +++ b/pydocx/openxml/shared_math/hide_right.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class HideRight(XmlModel): + + XML_TAG = 'hideRight' diff --git a/pydocx/openxml/shared_math/hide_top.py b/pydocx/openxml/shared_math/hide_top.py new file mode 100644 index 00000000..885b7782 --- /dev/null +++ b/pydocx/openxml/shared_math/hide_top.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class HideTop(XmlModel): + + XML_TAG = 'hideTop' diff --git a/pydocx/openxml/shared_math/integral_limit_locations.py b/pydocx/openxml/shared_math/integral_limit_locations.py new file mode 100644 index 00000000..5e398b48 --- /dev/null +++ b/pydocx/openxml/shared_math/integral_limit_locations.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class IntegralLimitLocations(XmlModel): + + XML_TAG = 'intLim' diff --git a/pydocx/openxml/shared_math/inter_equation_spacing.py b/pydocx/openxml/shared_math/inter_equation_spacing.py new file mode 100644 index 00000000..8df639c2 --- /dev/null +++ b/pydocx/openxml/shared_math/inter_equation_spacing.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class InterEquationSpacing(XmlModel): + + XML_TAG = 'interSp' diff --git a/pydocx/openxml/shared_math/intra_equation_spacing.py b/pydocx/openxml/shared_math/intra_equation_spacing.py new file mode 100644 index 00000000..eabeed71 --- /dev/null +++ b/pydocx/openxml/shared_math/intra_equation_spacing.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class IntraEquationSpacing(XmlModel): + + XML_TAG = 'intraSp' diff --git a/pydocx/openxml/shared_math/justification.py b/pydocx/openxml/shared_math/justification.py new file mode 100644 index 00000000..cbd78262 --- /dev/null +++ b/pydocx/openxml/shared_math/justification.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Justification(XmlModel): + + XML_TAG = 'jc' diff --git a/pydocx/openxml/shared_math/left_margin.py b/pydocx/openxml/shared_math/left_margin.py new file mode 100644 index 00000000..db9d0148 --- /dev/null +++ b/pydocx/openxml/shared_math/left_margin.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class LeftMargin(XmlModel): + + XML_TAG = 'lMargin' diff --git a/pydocx/openxml/shared_math/limit.py b/pydocx/openxml/shared_math/limit.py new file mode 100644 index 00000000..326b0fd3 --- /dev/null +++ b/pydocx/openxml/shared_math/limit.py @@ -0,0 +1,55 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Limit(XmlModel): + XML_TAG = 'lim' + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) + +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction # noqa + +Limit.children.types.add(UpperLimitFunction) diff --git a/pydocx/openxml/shared_math/literal.py b/pydocx/openxml/shared_math/literal.py new file mode 100644 index 00000000..1039bb24 --- /dev/null +++ b/pydocx/openxml/shared_math/literal.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Literal(XmlModel): + + XML_TAG = 'lit' diff --git a/pydocx/openxml/shared_math/lower_limit_function.py b/pydocx/openxml/shared_math/lower_limit_function.py new file mode 100644 index 00000000..7e82fb10 --- /dev/null +++ b/pydocx/openxml/shared_math/lower_limit_function.py @@ -0,0 +1,23 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.lower_limit_properties import LowerLimitProperties + + +class LowerLimitFunction(XmlModel): + XML_TAG = 'limLow' + + children = XmlCollection( + Element, + LowerLimitProperties + ) + +# solves circular import +from pydocx.openxml.shared_math.limit import Limit # noqa + +LowerLimitFunction.children.types.add(Limit) diff --git a/pydocx/openxml/shared_math/lower_limit_properties.py b/pydocx/openxml/shared_math/lower_limit_properties.py new file mode 100644 index 00000000..e783441e --- /dev/null +++ b/pydocx/openxml/shared_math/lower_limit_properties.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class LowerLimitProperties(XmlModel): + XML_TAG = 'limLowPr' + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/math_font.py b/pydocx/openxml/shared_math/math_font.py new file mode 100644 index 00000000..1fb8e0b6 --- /dev/null +++ b/pydocx/openxml/shared_math/math_font.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MathFont(XmlModel): + + XML_TAG = 'mathFont' diff --git a/pydocx/openxml/shared_math/math_properties.py b/pydocx/openxml/shared_math/math_properties.py new file mode 100644 index 00000000..2e2fb6bd --- /dev/null +++ b/pydocx/openxml/shared_math/math_properties.py @@ -0,0 +1,47 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.break_on_binary_operators import BreakOnBinaryOperators +from pydocx.openxml.shared_math.break_on_binary_subtraction import BreakOnBinarySubtraction +from pydocx.openxml.shared_math.default_justification import DefaultJustification +from pydocx.openxml.shared_math.inter_equation_spacing import InterEquationSpacing +from pydocx.openxml.shared_math.intra_equation_spacing import IntraEquationSpacing +from pydocx.openxml.shared_math.integral_limit_locations import IntegralLimitLocations +from pydocx.openxml.shared_math.small_fraction import SmallFraction +from pydocx.openxml.shared_math.left_margin import LeftMargin +from pydocx.openxml.shared_math.math_font import MathFont +from pydocx.openxml.shared_math.nary_limit_location import NaryLimitLocation +from pydocx.openxml.shared_math.pre_equation_spacing import PreEquationSpacing +from pydocx.openxml.shared_math.post_equation_spacing import PostEquationSpacing +from pydocx.openxml.shared_math.right_margin import RightMargin +from pydocx.openxml.shared_math.use_display_math_defaults import UseDisplayMathDefaults +from pydocx.openxml.shared_math.wrap_indent import WrapIndent +from pydocx.openxml.shared_math.wrap_right import WrapRight + + +class MathProperties(XmlModel): + + XML_TAG = 'mathPr' + + children = XmlCollection( + BreakOnBinaryOperators, + BreakOnBinarySubtraction, + DefaultJustification, + InterEquationSpacing, + IntraEquationSpacing, + IntegralLimitLocations, + SmallFraction, + LeftMargin, + MathFont, + NaryLimitLocation, + PreEquationSpacing, + PostEquationSpacing, + RightMargin, + UseDisplayMathDefaults, + WrapIndent, + WrapRight, + ) diff --git a/pydocx/openxml/shared_math/matrix_column.py b/pydocx/openxml/shared_math/matrix_column.py new file mode 100644 index 00000000..97976047 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.matrix_column_properties import MatrixColumnProperties + + +class MatrixColumn(XmlModel): + XML_TAG = 'mc' + + children = XmlCollection( + MatrixColumnProperties + ) diff --git a/pydocx/openxml/shared_math/matrix_column_count.py b/pydocx/openxml/shared_math/matrix_column_count.py new file mode 100644 index 00000000..49fc1775 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column_count.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MatrixColumnCount(XmlModel): + + XML_TAG = 'count' diff --git a/pydocx/openxml/shared_math/matrix_column_gap.py b/pydocx/openxml/shared_math/matrix_column_gap.py new file mode 100644 index 00000000..7189b80f --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column_gap.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MatrixColumnGap(XmlModel): + + XML_TAG = 'cGp' diff --git a/pydocx/openxml/shared_math/matrix_column_gap_rule.py b/pydocx/openxml/shared_math/matrix_column_gap_rule.py new file mode 100644 index 00000000..3484e50c --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column_gap_rule.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MatrixColumnGapRule(XmlModel): + + XML_TAG = 'cGpRule' diff --git a/pydocx/openxml/shared_math/matrix_column_justification.py b/pydocx/openxml/shared_math/matrix_column_justification.py new file mode 100644 index 00000000..8c938138 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column_justification.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MatrixColumnJustification(XmlModel): + XML_TAG = 'mcJc' diff --git a/pydocx/openxml/shared_math/matrix_column_properties.py b/pydocx/openxml/shared_math/matrix_column_properties.py new file mode 100644 index 00000000..6384814c --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column_properties.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.matrix_column_count import MatrixColumnCount +from pydocx.openxml.shared_math.matrix_column_justification import MatrixColumnJustification + + +class MatrixColumnProperties(XmlModel): + XML_TAG = 'mcPr' + + children = XmlCollection( + MatrixColumnCount, + MatrixColumnJustification + ) diff --git a/pydocx/openxml/shared_math/matrix_column_spacing.py b/pydocx/openxml/shared_math/matrix_column_spacing.py new file mode 100644 index 00000000..7f56ce04 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_column_spacing.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MatrixColumnSpacing(XmlModel): + + XML_TAG = 'Csp' diff --git a/pydocx/openxml/shared_math/matrix_columns.py b/pydocx/openxml/shared_math/matrix_columns.py new file mode 100644 index 00000000..8f0a6257 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_columns.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.matrix_column import MatrixColumn + + +class MatrixColumns(XmlModel): + XML_TAG = 'mcs' + + children = XmlCollection( + MatrixColumn + ) diff --git a/pydocx/openxml/shared_math/matrix_function.py b/pydocx/openxml/shared_math/matrix_function.py new file mode 100644 index 00000000..1c0c1958 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_function.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.matrix_properties import MatrixProperties +from pydocx.openxml.shared_math.matrix_row import MatrixRow + + +class MatrixFunction(XmlModel): + + XML_TAG = 'm' + children = XmlCollection( + MatrixProperties, + MatrixRow + ) diff --git a/pydocx/openxml/shared_math/matrix_properties.py b/pydocx/openxml/shared_math/matrix_properties.py new file mode 100644 index 00000000..3a8fb053 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_properties.py @@ -0,0 +1,32 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.base_justification import BaseJustification +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.hide_placeholders import HidePlaceholders +from pydocx.openxml.shared_math.matrix_columns import MatrixColumns +from pydocx.openxml.shared_math.matrix_column_spacing import MatrixColumnSpacing +from pydocx.openxml.shared_math.matrix_column_gap_rule import MatrixColumnGapRule +from pydocx.openxml.shared_math.matrix_column_gap import MatrixColumnGap +from pydocx.openxml.shared_math.row_spacing import RowSpacing +from pydocx.openxml.shared_math.row_spacing_rule import RowSpacingRule + + +class MatrixProperties(XmlModel): + + XML_TAG = 'mPr' + base_jc = XmlChild(type=BaseJustification, attrname='val') + plc_hide = XmlChild(type=HidePlaceholders, attrname='val') + rsp_rule = XmlChild(type=RowSpacingRule, attrname='val') + cgp_rule = XmlChild(type=MatrixColumnGapRule, attrname='val') + rsp = XmlChild(type=RowSpacing, attrname='val') + csp = XmlChild(type=MatrixColumnSpacing, attrname='val') + cgp = XmlChild(type=MatrixColumnGap, attrname='val') + children = XmlCollection( + ControlProperties, + MatrixColumns, + ) diff --git a/pydocx/openxml/shared_math/matrix_row.py b/pydocx/openxml/shared_math/matrix_row.py new file mode 100644 index 00000000..2a78ffc3 --- /dev/null +++ b/pydocx/openxml/shared_math/matrix_row.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element + + +class MatrixRow(XmlModel): + XML_TAG = 'mr' + + children = XmlCollection( + Element + ) diff --git a/pydocx/openxml/shared_math/maximum_distribution.py b/pydocx/openxml/shared_math/maximum_distribution.py new file mode 100644 index 00000000..ceb296e3 --- /dev/null +++ b/pydocx/openxml/shared_math/maximum_distribution.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class MaximumDistribution(XmlModel): + XML_TAG = 'maxDist' diff --git a/pydocx/openxml/shared_math/nary_limit_location.py b/pydocx/openxml/shared_math/nary_limit_location.py new file mode 100644 index 00000000..c2a370f2 --- /dev/null +++ b/pydocx/openxml/shared_math/nary_limit_location.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class NaryLimitLocation(XmlModel): + + XML_TAG = 'limLoc' diff --git a/pydocx/openxml/shared_math/nary_operator_function.py b/pydocx/openxml/shared_math/nary_operator_function.py new file mode 100644 index 00000000..839d1ef2 --- /dev/null +++ b/pydocx/openxml/shared_math/nary_operator_function.py @@ -0,0 +1,22 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.nary_properties import NaryProperties +from pydocx.openxml.shared_math.sub import Sub +from pydocx.openxml.shared_math.superscript import Superscript + + +class NaryOperatorFunction(XmlModel): + XML_TAG = 'nary' + + children = XmlCollection( + Element, + NaryProperties, + Sub, + Superscript + ) diff --git a/pydocx/openxml/shared_math/nary_properties.py b/pydocx/openxml/shared_math/nary_properties.py new file mode 100644 index 00000000..61068ad4 --- /dev/null +++ b/pydocx/openxml/shared_math/nary_properties.py @@ -0,0 +1,25 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlChild, XmlCollection +from pydocx.openxml.shared_math.character import Character +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.grow import Grow +from pydocx.openxml.shared_math.sub_hide import HideSubscript +from pydocx.openxml.shared_math.sup_hide import HideSuperscript +from pydocx.openxml.shared_math.nary_limit_location import NaryLimitLocation + + +class NaryProperties(XmlModel): + + chr = XmlChild(type=Character, attrname='val') + lim_loc = XmlChild(type=NaryLimitLocation, attrname='val') + grow = XmlChild(type=Grow, attrname='val') + sub_hide = XmlChild(type=HideSubscript, attrname='val') + sup_hide = XmlChild(type=HideSuperscript, attrname='val') + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/no_break.py b/pydocx/openxml/shared_math/no_break.py new file mode 100644 index 00000000..567429f4 --- /dev/null +++ b/pydocx/openxml/shared_math/no_break.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class NoBreak(XmlModel): + + XML_TAG = 'noBreak' diff --git a/pydocx/openxml/shared_math/normal_text.py b/pydocx/openxml/shared_math/normal_text.py new file mode 100644 index 00000000..420ccd81 --- /dev/null +++ b/pydocx/openxml/shared_math/normal_text.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class NormalText(XmlModel): + + XML_TAG = 'nor' diff --git a/pydocx/openxml/shared_math/numerator.py b/pydocx/openxml/shared_math/numerator.py new file mode 100644 index 00000000..b299e061 --- /dev/null +++ b/pydocx/openxml/shared_math/numerator.py @@ -0,0 +1,55 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Numerator(XmlModel): + XML_TAG = 'num' + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + ControlProperties, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/object_distribution.py b/pydocx/openxml/shared_math/object_distribution.py new file mode 100644 index 00000000..0a1df4ab --- /dev/null +++ b/pydocx/openxml/shared_math/object_distribution.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class ObjectDistribution(XmlModel): + XML_TAG = 'objDist' diff --git a/pydocx/openxml/shared_math/omath.py b/pydocx/openxml/shared_math/omath.py new file mode 100644 index 00000000..bafefc24 --- /dev/null +++ b/pydocx/openxml/shared_math/omath.py @@ -0,0 +1,55 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class OMath(XmlModel): + + XML_TAG = 'oMath' + + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/omath_paragraph.py b/pydocx/openxml/shared_math/omath_paragraph.py new file mode 100644 index 00000000..4a27c00d --- /dev/null +++ b/pydocx/openxml/shared_math/omath_paragraph.py @@ -0,0 +1,19 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.omath import OMath +from pydocx.openxml.shared_math.omath_paragraph_properties import OMathParagraphProperties + + +class OMathParagraph(XmlModel): + + XML_TAG = 'mathPara' + + children = XmlCollection( + OMath, + OMathParagraphProperties + ) diff --git a/pydocx/openxml/shared_math/omath_paragraph_properties.py b/pydocx/openxml/shared_math/omath_paragraph_properties.py new file mode 100644 index 00000000..dfc92f32 --- /dev/null +++ b/pydocx/openxml/shared_math/omath_paragraph_properties.py @@ -0,0 +1,17 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.justification import Justification + + +class OMathParagraphProperties(XmlModel): + + XML_TAG = 'mathParaPr' + + children = XmlCollection( + Justification + ) diff --git a/pydocx/openxml/shared_math/operator_emulator.py b/pydocx/openxml/shared_math/operator_emulator.py new file mode 100644 index 00000000..e03b517f --- /dev/null +++ b/pydocx/openxml/shared_math/operator_emulator.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class OperatorEmulator(XmlModel): + + XML_TAG = 'opEmu' diff --git a/pydocx/openxml/shared_math/phantom_function.py b/pydocx/openxml/shared_math/phantom_function.py new file mode 100644 index 00000000..e7936cae --- /dev/null +++ b/pydocx/openxml/shared_math/phantom_function.py @@ -0,0 +1,19 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.phantom_properties import PhantomProperties + + +class PhantomFunction(XmlModel): + + XML_TAG = 'phant' + + children = XmlCollection( + Element, + PhantomProperties + ) diff --git a/pydocx/openxml/shared_math/phantom_properties.py b/pydocx/openxml/shared_math/phantom_properties.py new file mode 100644 index 00000000..311e0fc6 --- /dev/null +++ b/pydocx/openxml/shared_math/phantom_properties.py @@ -0,0 +1,28 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.show import Show +from pydocx.openxml.shared_math.zero_width import ZeroWidth +from pydocx.openxml.shared_math.zero_ascent import ZeroAscent +from pydocx.openxml.shared_math.zero_descent import ZeroDescent +from pydocx.openxml.shared_math.transparent import Transparent + + +class PhantomProperties(XmlModel): + + XML_TAG = 'phantPr' + + show = XmlChild(type=Show, attrname='val') + zero_wid = XmlChild(type=ZeroWidth, attrname='val') + zero_asc = XmlChild(type=ZeroAscent, attrname='val') + zero_desc = XmlChild(type=ZeroDescent, attrname='val') + transp = XmlChild(type=Transparent, attrname='val') + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/position.py b/pydocx/openxml/shared_math/position.py new file mode 100644 index 00000000..43cb4970 --- /dev/null +++ b/pydocx/openxml/shared_math/position.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Position(XmlModel): + + XML_TAG = 'pos' diff --git a/pydocx/openxml/shared_math/post_equation_spacing.py b/pydocx/openxml/shared_math/post_equation_spacing.py new file mode 100644 index 00000000..2a3c57bf --- /dev/null +++ b/pydocx/openxml/shared_math/post_equation_spacing.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class PostEquationSpacing(XmlModel): + + XML_TAG = 'postSp' diff --git a/pydocx/openxml/shared_math/pre_equation_spacing.py b/pydocx/openxml/shared_math/pre_equation_spacing.py new file mode 100644 index 00000000..9d7ffd9a --- /dev/null +++ b/pydocx/openxml/shared_math/pre_equation_spacing.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class PreEquationSpacing(XmlModel): + + XML_TAG = 'preSp' diff --git a/pydocx/openxml/shared_math/pre_sub_superscript_function.py b/pydocx/openxml/shared_math/pre_sub_superscript_function.py new file mode 100644 index 00000000..130a9a9a --- /dev/null +++ b/pydocx/openxml/shared_math/pre_sub_superscript_function.py @@ -0,0 +1,24 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.pre_sub_superscript_properties import ( + PreSubSuperscriptProperties +) +from pydocx.openxml.shared_math.sub import Sub +from pydocx.openxml.shared_math.superscript import Superscript + + +class PreSubSuperscriptFunction(XmlModel): + XML_TAG = 'sPre' + + children = XmlCollection( + Element, + PreSubSuperscriptProperties, + Sub, + Superscript + ) diff --git a/pydocx/openxml/shared_math/pre_sub_superscript_properties.py b/pydocx/openxml/shared_math/pre_sub_superscript_properties.py new file mode 100644 index 00000000..30433337 --- /dev/null +++ b/pydocx/openxml/shared_math/pre_sub_superscript_properties.py @@ -0,0 +1,15 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class PreSubSuperscriptProperties(XmlModel): + XML_TAG = 'sPrePr' + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/radical_function.py b/pydocx/openxml/shared_math/radical_function.py new file mode 100644 index 00000000..1286ef9c --- /dev/null +++ b/pydocx/openxml/shared_math/radical_function.py @@ -0,0 +1,19 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.degree import Degree +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.radical_properties import RadicalProperties + + +class RadicalFunction(XmlModel): + XML_TAG = 'rad' + children = XmlCollection( + Degree, + Element, + RadicalProperties, + ) diff --git a/pydocx/openxml/shared_math/radical_properties.py b/pydocx/openxml/shared_math/radical_properties.py new file mode 100644 index 00000000..a224251f --- /dev/null +++ b/pydocx/openxml/shared_math/radical_properties.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.hide_degree import HideDegree + + +class RadicalProperties(XmlModel): + XML_TAG = 'radPr' + + children = XmlCollection( + ControlProperties, + HideDegree + ) diff --git a/pydocx/openxml/shared_math/right_margin.py b/pydocx/openxml/shared_math/right_margin.py new file mode 100644 index 00000000..2161ef5d --- /dev/null +++ b/pydocx/openxml/shared_math/right_margin.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class RightMargin(XmlModel): + + XML_TAG = 'rMargin' diff --git a/pydocx/openxml/shared_math/row_spacing.py b/pydocx/openxml/shared_math/row_spacing.py new file mode 100644 index 00000000..91a41b41 --- /dev/null +++ b/pydocx/openxml/shared_math/row_spacing.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class RowSpacing(XmlModel): + XML_TAG = 'rSp' diff --git a/pydocx/openxml/shared_math/row_spacing_rule.py b/pydocx/openxml/shared_math/row_spacing_rule.py new file mode 100644 index 00000000..b3b1ace1 --- /dev/null +++ b/pydocx/openxml/shared_math/row_spacing_rule.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class RowSpacingRule(XmlModel): + XML_TAG = 'rSpRule' diff --git a/pydocx/openxml/shared_math/script.py b/pydocx/openxml/shared_math/script.py new file mode 100644 index 00000000..f4abb116 --- /dev/null +++ b/pydocx/openxml/shared_math/script.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Script(XmlModel): + + XML_TAG = 'scr' diff --git a/pydocx/openxml/shared_math/shape_delimiters.py b/pydocx/openxml/shared_math/shape_delimiters.py new file mode 100644 index 00000000..f0b4728b --- /dev/null +++ b/pydocx/openxml/shared_math/shape_delimiters.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class ShapeDelimiters(XmlModel): + + XML_TAG = 'shp' diff --git a/pydocx/openxml/shared_math/show.py b/pydocx/openxml/shared_math/show.py new file mode 100644 index 00000000..69741c14 --- /dev/null +++ b/pydocx/openxml/shared_math/show.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Show(XmlModel): + + XML_TAG = 'show' diff --git a/pydocx/openxml/shared_math/small_fraction.py b/pydocx/openxml/shared_math/small_fraction.py new file mode 100644 index 00000000..d0263f1c --- /dev/null +++ b/pydocx/openxml/shared_math/small_fraction.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class SmallFraction(XmlModel): + + XML_TAG = 'smallFrac' diff --git a/pydocx/openxml/shared_math/strike_bltr.py b/pydocx/openxml/shared_math/strike_bltr.py new file mode 100644 index 00000000..3b6c0c7e --- /dev/null +++ b/pydocx/openxml/shared_math/strike_bltr.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class StrikeBLTR(XmlModel): + + XML_TAG = 'strikeBLTR' diff --git a/pydocx/openxml/shared_math/strike_h.py b/pydocx/openxml/shared_math/strike_h.py new file mode 100644 index 00000000..c2bbfe03 --- /dev/null +++ b/pydocx/openxml/shared_math/strike_h.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class StrikeH(XmlModel): + + XML_TAG = 'strikeH' diff --git a/pydocx/openxml/shared_math/strike_tlbr.py b/pydocx/openxml/shared_math/strike_tlbr.py new file mode 100644 index 00000000..e2706812 --- /dev/null +++ b/pydocx/openxml/shared_math/strike_tlbr.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class StrikeTLBR(XmlModel): + + XML_TAG = 'strikeTLBR' diff --git a/pydocx/openxml/shared_math/strike_v.py b/pydocx/openxml/shared_math/strike_v.py new file mode 100644 index 00000000..47787102 --- /dev/null +++ b/pydocx/openxml/shared_math/strike_v.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class StrikeV(XmlModel): + + XML_TAG = 'strikeV' diff --git a/pydocx/openxml/shared_math/style.py b/pydocx/openxml/shared_math/style.py new file mode 100644 index 00000000..97f0b381 --- /dev/null +++ b/pydocx/openxml/shared_math/style.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Style(XmlModel): + + XML_TAG = 'sty' diff --git a/pydocx/openxml/shared_math/sub.py b/pydocx/openxml/shared_math/sub.py new file mode 100644 index 00000000..80430d1b --- /dev/null +++ b/pydocx/openxml/shared_math/sub.py @@ -0,0 +1,56 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Sub(XmlModel): + XML_TAG = 'sub' + + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + ControlProperties, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/sub_hide.py b/pydocx/openxml/shared_math/sub_hide.py new file mode 100644 index 00000000..f2ae6bf9 --- /dev/null +++ b/pydocx/openxml/shared_math/sub_hide.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class SubHide(XmlModel): + + XML_TAG = 'subHide' diff --git a/pydocx/openxml/shared_math/sub_superscript_function.py b/pydocx/openxml/shared_math/sub_superscript_function.py new file mode 100644 index 00000000..58c77584 --- /dev/null +++ b/pydocx/openxml/shared_math/sub_superscript_function.py @@ -0,0 +1,22 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.sub import Sub +from pydocx.openxml.shared_math.superscript import Superscript +from pydocx.openxml.shared_math.sub_superscript_properties import SubSuperscriptProperties + + +class SubSuperscriptFunction(XmlModel): + XML_TAG = 'sSubSup' + + children = XmlCollection( + Element, + Sub, + Superscript, + SubSuperscriptProperties + ) diff --git a/pydocx/openxml/shared_math/sub_superscript_properties.py b/pydocx/openxml/shared_math/sub_superscript_properties.py new file mode 100644 index 00000000..2727c6b5 --- /dev/null +++ b/pydocx/openxml/shared_math/sub_superscript_properties.py @@ -0,0 +1,18 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.align_scripts import AlignScripts +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class SubSuperscriptProperties(XmlModel): + XML_TAG = 'sSubSupPr' + + children = XmlCollection( + AlignScripts, + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/subscript_function.py b/pydocx/openxml/shared_math/subscript_function.py new file mode 100644 index 00000000..8f946266 --- /dev/null +++ b/pydocx/openxml/shared_math/subscript_function.py @@ -0,0 +1,20 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.sub import Sub +from pydocx.openxml.shared_math.subscript_properties import SubscriptProperties + + +class SubscriptFunction(XmlModel): + XML_TAG = 'sSub' + + children = XmlCollection( + Element, + Sub, + SubscriptProperties + ) diff --git a/pydocx/openxml/shared_math/subscript_properties.py b/pydocx/openxml/shared_math/subscript_properties.py new file mode 100644 index 00000000..fb50e331 --- /dev/null +++ b/pydocx/openxml/shared_math/subscript_properties.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class SubscriptProperties(XmlModel): + XML_TAG = 'sSubPr' + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/sup.py b/pydocx/openxml/shared_math/sup.py new file mode 100644 index 00000000..7edbff93 --- /dev/null +++ b/pydocx/openxml/shared_math/sup.py @@ -0,0 +1,56 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.accent import Accent +from pydocx.openxml.shared_math.bar import Bar +from pydocx.openxml.shared_math.box import Box +from pydocx.openxml.shared_math.border_box import BorderBox +from pydocx.openxml.shared_math.control_properties import ControlProperties +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.shared_math.equation_array_function import EquationArrayFunction +from pydocx.openxml.shared_math.fraction_function import FractionFunction +from pydocx.openxml.shared_math.function_apply_function import FunctionApplyFunction +from pydocx.openxml.shared_math.group_character_function import GroupCharacterFunction +from pydocx.openxml.shared_math.lower_limit_function import LowerLimitFunction +from pydocx.openxml.shared_math.upper_limit_function import UpperLimitFunction +from pydocx.openxml.shared_math.matrix_function import MatrixFunction +from pydocx.openxml.shared_math.nary_operator_function import NaryOperatorFunction +from pydocx.openxml.shared_math.phantom_function import PhantomFunction +from pydocx.openxml.shared_math.radical_function import RadicalFunction +from pydocx.openxml.shared_math.pre_sub_superscript_function import PreSubSuperscriptFunction +from pydocx.openxml.shared_math.subscript_function import SubscriptFunction +from pydocx.openxml.shared_math.sub_superscript_function import SubSuperscriptFunction +from pydocx.openxml.shared_math.superscript_function import SuperscriptFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Sup(XmlModel): + XML_TAG = 'sup' + + children = XmlCollection( + Accent, + Bar, + Box, + BorderBox, + ControlProperties, + DelimiterFunction, + EquationArrayFunction, + FractionFunction, + FunctionApplyFunction, + GroupCharacterFunction, + LowerLimitFunction, + UpperLimitFunction, + MatrixFunction, + NaryOperatorFunction, + PhantomFunction, + RadicalFunction, + PreSubSuperscriptFunction, + SubscriptFunction, + SubSuperscriptFunction, + SuperscriptFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/sup_hide.py b/pydocx/openxml/shared_math/sup_hide.py new file mode 100644 index 00000000..25a1acf4 --- /dev/null +++ b/pydocx/openxml/shared_math/sup_hide.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class SupHide(XmlModel): + XML_TAG = 'supHide' diff --git a/pydocx/openxml/shared_math/superscript.py b/pydocx/openxml/shared_math/superscript.py new file mode 100644 index 00000000..1d33e192 --- /dev/null +++ b/pydocx/openxml/shared_math/superscript.py @@ -0,0 +1,17 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.delimiter_function import DelimiterFunction +from pydocx.openxml.wordprocessing.run import Run + + +class Superscript(XmlModel): + XML_TAG = 'nary' + children = XmlCollection( + DelimiterFunction, + Run + ) diff --git a/pydocx/openxml/shared_math/superscript_function.py b/pydocx/openxml/shared_math/superscript_function.py new file mode 100644 index 00000000..817426d4 --- /dev/null +++ b/pydocx/openxml/shared_math/superscript_function.py @@ -0,0 +1,20 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.superscript import Superscript +from pydocx.openxml.shared_math.superscript_properties import SuperscriptProperties + + +class SuperscriptFunction(XmlModel): + XML_TAG = 'sSup' + + children = XmlCollection( + Element, + Superscript, + SuperscriptProperties + ) diff --git a/pydocx/openxml/shared_math/superscript_properties.py b/pydocx/openxml/shared_math/superscript_properties.py new file mode 100644 index 00000000..3cbc707e --- /dev/null +++ b/pydocx/openxml/shared_math/superscript_properties.py @@ -0,0 +1,17 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class SuperscriptProperties(XmlModel): + + XML_TAG = 'sSupPr' + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/transparent.py b/pydocx/openxml/shared_math/transparent.py new file mode 100644 index 00000000..2eb4dee1 --- /dev/null +++ b/pydocx/openxml/shared_math/transparent.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Transparent(XmlModel): + XML_TAG = 'transp' diff --git a/pydocx/openxml/shared_math/type.py b/pydocx/openxml/shared_math/type.py new file mode 100644 index 00000000..888f6e5f --- /dev/null +++ b/pydocx/openxml/shared_math/type.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class Type(XmlModel): + XML_TAG = 'type' diff --git a/pydocx/openxml/shared_math/upper_limit_function.py b/pydocx/openxml/shared_math/upper_limit_function.py new file mode 100644 index 00000000..265dd2fc --- /dev/null +++ b/pydocx/openxml/shared_math/upper_limit_function.py @@ -0,0 +1,24 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.element import Element +from pydocx.openxml.shared_math.upper_limit_properties import UpperLimitProperties + + +class UpperLimitFunction(XmlModel): + XML_TAG = 'limUpp' + + children = XmlCollection( + Element, + UpperLimitProperties + ) + + +# solves circular import +from pydocx.openxml.shared_math.limit import Limit # noqa + +UpperLimitFunction.children.types.add(Limit) diff --git a/pydocx/openxml/shared_math/upper_limit_properties.py b/pydocx/openxml/shared_math/upper_limit_properties.py new file mode 100644 index 00000000..65f9b4a8 --- /dev/null +++ b/pydocx/openxml/shared_math/upper_limit_properties.py @@ -0,0 +1,16 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel, XmlCollection +from pydocx.openxml.shared_math.control_properties import ControlProperties + + +class UpperLimitProperties(XmlModel): + XML_TAG = 'limUppPr' + + children = XmlCollection( + ControlProperties + ) diff --git a/pydocx/openxml/shared_math/use_display_math_defaults.py b/pydocx/openxml/shared_math/use_display_math_defaults.py new file mode 100644 index 00000000..c50e75e4 --- /dev/null +++ b/pydocx/openxml/shared_math/use_display_math_defaults.py @@ -0,0 +1,12 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class UseDisplayMathDefaults(XmlModel): + + XML_TAG = 'dispDef' diff --git a/pydocx/openxml/shared_math/vertical_justification.py b/pydocx/openxml/shared_math/vertical_justification.py new file mode 100644 index 00000000..6e19ce6c --- /dev/null +++ b/pydocx/openxml/shared_math/vertical_justification.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class VerticalJustification(XmlModel): + XML_TAG = 'vertJc' diff --git a/pydocx/openxml/shared_math/wrap_indent.py b/pydocx/openxml/shared_math/wrap_indent.py new file mode 100644 index 00000000..8bfe2639 --- /dev/null +++ b/pydocx/openxml/shared_math/wrap_indent.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class WrapIndent(XmlModel): + XML_TAG = 'wrapIndent' diff --git a/pydocx/openxml/shared_math/wrap_right.py b/pydocx/openxml/shared_math/wrap_right.py new file mode 100644 index 00000000..8259a92c --- /dev/null +++ b/pydocx/openxml/shared_math/wrap_right.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class WrapRight(XmlModel): + XML_TAG = 'wrapRight' diff --git a/pydocx/openxml/shared_math/zero_ascent.py b/pydocx/openxml/shared_math/zero_ascent.py new file mode 100644 index 00000000..130c9fb7 --- /dev/null +++ b/pydocx/openxml/shared_math/zero_ascent.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class ZeroAscent(XmlModel): + XML_TAG = 'zeroAsc' diff --git a/pydocx/openxml/shared_math/zero_descent.py b/pydocx/openxml/shared_math/zero_descent.py new file mode 100644 index 00000000..e0da903d --- /dev/null +++ b/pydocx/openxml/shared_math/zero_descent.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class ZeroDescent(XmlModel): + XML_TAG = 'zeroDesc' diff --git a/pydocx/openxml/shared_math/zero_width.py b/pydocx/openxml/shared_math/zero_width.py new file mode 100644 index 00000000..55a46f3b --- /dev/null +++ b/pydocx/openxml/shared_math/zero_width.py @@ -0,0 +1,11 @@ +from __future__ import ( + absolute_import, + print_function, + unicode_literals, +) + +from pydocx.models import XmlModel + + +class ZeroWidth(XmlModel): + XML_TAG = 'zeroWid' diff --git a/pydocx/openxml/wordprocessing/paragraph.py b/pydocx/openxml/wordprocessing/paragraph.py index af59dd7b..282b4069 100644 --- a/pydocx/openxml/wordprocessing/paragraph.py +++ b/pydocx/openxml/wordprocessing/paragraph.py @@ -6,6 +6,7 @@ ) from pydocx.models import XmlModel, XmlCollection, XmlChild +from pydocx.openxml.shared_math import OMath from pydocx.openxml.wordprocessing.hyperlink import Hyperlink from pydocx.openxml.wordprocessing.paragraph_properties import ParagraphProperties # noqa from pydocx.openxml.wordprocessing.run import Run @@ -24,6 +25,7 @@ class Paragraph(XmlModel): properties = XmlChild(type=ParagraphProperties) children = XmlCollection( + OMath, Run, Hyperlink, SmartTagRun,