uniword 1.0.11 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/font_metadata.yml +56 -0
- data/lib/uniword/accessibility/rules/descriptive_headings_rule.rb +1 -1
- data/lib/uniword/assembly/toc.rb +4 -14
- data/lib/uniword/assembly/variable_substitutor.rb +3 -4
- data/lib/uniword/batch/stages/normalize_styles_stage.rb +4 -2
- data/lib/uniword/builder/base_builder.rb +25 -0
- data/lib/uniword/builder/chart_builder.rb +33 -14
- data/lib/uniword/builder/deterministic_id.rb +17 -0
- data/lib/uniword/builder/document_builder.rb +129 -34
- data/lib/uniword/builder/footnote_builder.rb +22 -23
- data/lib/uniword/builder/header_footer_builder.rb +10 -10
- data/lib/uniword/builder/image_builder.rb +24 -16
- data/lib/uniword/builder/list_builder.rb +2 -1
- data/lib/uniword/builder/paragraph_builder.rb +95 -20
- data/lib/uniword/builder/run_utils.rb +97 -0
- data/lib/uniword/builder/section_builder.rb +40 -67
- data/lib/uniword/builder/table_builder.rb +32 -13
- data/lib/uniword/builder/table_cell_builder.rb +19 -0
- data/lib/uniword/builder.rb +27 -19
- data/lib/uniword/cli/diff_cli.rb +0 -1
- data/lib/uniword/cli/generate_cli.rb +0 -1
- data/lib/uniword/cli/headers_cli.rb +0 -1
- data/lib/uniword/cli/images_cli.rb +0 -1
- data/lib/uniword/cli/main.rb +6 -7
- data/lib/uniword/cli/protect_cli.rb +0 -1
- data/lib/uniword/cli/resources_cli.rb +0 -1
- data/lib/uniword/cli/review_cli.rb +0 -1
- data/lib/uniword/cli/spellcheck_cli.rb +0 -1
- data/lib/uniword/cli/styleset_cli.rb +0 -1
- data/lib/uniword/cli/template_cli.rb +0 -1
- data/lib/uniword/cli/theme_cli.rb +0 -1
- data/lib/uniword/cli/toc_cli.rb +0 -1
- data/lib/uniword/cli/watermark_cli.rb +0 -1
- data/lib/uniword/cli.rb +6 -17
- data/lib/uniword/diff/document_differ.rb +23 -5
- data/lib/uniword/diff/package_differ.rb +0 -1
- data/lib/uniword/diff.rb +4 -0
- data/lib/uniword/document_factory.rb +16 -25
- data/lib/uniword/docx/document_statistics.rb +42 -54
- data/lib/uniword/docx/id_allocator.rb +143 -0
- data/lib/uniword/docx/package.rb +42 -6
- data/lib/uniword/docx/package_defaults.rb +15 -25
- data/lib/uniword/docx/package_serialization.rb +131 -127
- data/lib/uniword/docx/reconciler/body.rb +197 -0
- data/lib/uniword/docx/reconciler/fix_codes.rb +74 -0
- data/lib/uniword/docx/reconciler/helpers.rb +337 -0
- data/lib/uniword/docx/reconciler/notes.rb +301 -0
- data/lib/uniword/docx/reconciler/package_structure.rb +322 -0
- data/lib/uniword/docx/reconciler/parts.rb +484 -0
- data/lib/uniword/docx/reconciler/referential_integrity.rb +449 -0
- data/lib/uniword/docx/reconciler/tables.rb +162 -0
- data/lib/uniword/docx/reconciler/theme.rb +141 -0
- data/lib/uniword/docx/reconciler.rb +44 -1097
- data/lib/uniword/docx.rb +3 -0
- data/lib/uniword/drawingml/color_scheme.rb +38 -5
- data/lib/uniword/hyperlink.rb +27 -26
- data/lib/uniword/infrastructure/zip_packager.rb +41 -38
- data/lib/uniword/lazy_loader.rb +36 -62
- data/lib/uniword/math.rb +3 -86
- data/lib/uniword/mhtml/document.rb +1 -3
- data/lib/uniword/model_attribute_access.rb +27 -0
- data/lib/uniword/ooxml/namespaces.rb +62 -2
- data/lib/uniword/ooxml/relationships/package_relationships.rb +7 -0
- data/lib/uniword/presentationml/slide_id.rb +0 -1
- data/lib/uniword/presentationml/slide_master_id.rb +0 -1
- data/lib/uniword/properties/bold.rb +0 -2
- data/lib/uniword/properties/boolean_formatting.rb +0 -2
- data/lib/uniword/properties/borders.rb +1 -1
- data/lib/uniword/properties/italic.rb +0 -2
- data/lib/uniword/properties/numbering_properties.rb +1 -1
- data/lib/uniword/properties/style_reference.rb +13 -0
- data/lib/uniword/quality/rules/heading_hierarchy_rule.rb +1 -1
- data/lib/uniword/quality/rules/style_consistency_rule.rb +1 -1
- data/lib/uniword/review/review_manager.rb +0 -2
- data/lib/uniword/template/helpers/loop_helper.rb +2 -2
- data/lib/uniword/template/variable_resolver.rb +14 -1
- data/lib/uniword/theme/theme_xml_parser.rb +1 -1
- data/lib/uniword/toc/toc_generator.rb +3 -14
- data/lib/uniword/transformation/mhtml_element_renderer.rb +94 -37
- data/lib/uniword/transformation/mhtml_metadata_builder.rb +1 -1
- data/lib/uniword/transformation/ooxml_to_html_converter.rb +3 -5
- data/lib/uniword/validation/checkers/internal_link_checker.rb +2 -3
- data/lib/uniword/version.rb +1 -1
- data/lib/uniword/visitor/text_extractor.rb +2 -1
- data/lib/uniword/watermark/manager.rb +2 -2
- data/lib/uniword/wordprocessingml/allow_png.rb +14 -0
- data/lib/uniword/wordprocessingml/body.rb +51 -34
- data/lib/uniword/wordprocessingml/body_div.rb +17 -0
- data/lib/uniword/wordprocessingml/div_border.rb +23 -0
- data/lib/uniword/wordprocessingml/div_borders.rb +24 -0
- data/lib/uniword/wordprocessingml/divs_child.rb +17 -0
- data/lib/uniword/wordprocessingml/document_root.rb +4 -3
- data/lib/uniword/wordprocessingml/endnote.rb +1 -1
- data/lib/uniword/wordprocessingml/endnotes.rb +4 -0
- data/lib/uniword/wordprocessingml/footer.rb +4 -0
- data/lib/uniword/wordprocessingml/footer_reference.rb +0 -1
- data/lib/uniword/wordprocessingml/footnote.rb +1 -1
- data/lib/uniword/wordprocessingml/footnotes.rb +4 -0
- data/lib/uniword/wordprocessingml/header.rb +4 -0
- data/lib/uniword/wordprocessingml/header_reference.rb +0 -1
- data/lib/uniword/wordprocessingml/hyperlink.rb +2 -2
- data/lib/uniword/wordprocessingml/instr_text.rb +20 -5
- data/lib/uniword/wordprocessingml/level.rb +2 -0
- data/lib/uniword/wordprocessingml/mar_bottom.rb +17 -0
- data/lib/uniword/wordprocessingml/mar_left.rb +17 -0
- data/lib/uniword/wordprocessingml/mar_right.rb +17 -0
- data/lib/uniword/wordprocessingml/mar_top.rb +17 -0
- data/lib/uniword/wordprocessingml/num.rb +4 -0
- data/lib/uniword/wordprocessingml/numbering.rb +1 -22
- data/lib/uniword/wordprocessingml/optimize_for_browser.rb +14 -0
- data/lib/uniword/wordprocessingml/page_defaults.rb +39 -0
- data/lib/uniword/wordprocessingml/paragraph.rb +16 -13
- data/lib/uniword/wordprocessingml/paragraph_properties.rb +12 -8
- data/lib/uniword/wordprocessingml/run.rb +32 -36
- data/lib/uniword/wordprocessingml/run_properties/merging.rb +45 -0
- data/lib/uniword/wordprocessingml/run_properties.rb +8 -5
- data/lib/uniword/wordprocessingml/section_properties.rb +3 -3
- data/lib/uniword/wordprocessingml/separator_char.rb +21 -0
- data/lib/uniword/wordprocessingml/settings.rb +19 -17
- data/lib/uniword/wordprocessingml/styles/style_definition.rb +1 -1
- data/lib/uniword/wordprocessingml/styles/style_library.rb +16 -0
- data/lib/uniword/wordprocessingml/table_defaults.rb +44 -0
- data/lib/uniword/wordprocessingml/text.rb +8 -2
- data/lib/uniword/wordprocessingml/web_div.rb +41 -0
- data/lib/uniword/wordprocessingml/web_divs.rb +18 -0
- data/lib/uniword/wordprocessingml/web_encoding.rb +17 -0
- data/lib/uniword/wordprocessingml/web_settings.rb +5 -21
- data/lib/uniword/wordprocessingml/zoom.rb +2 -0
- data/lib/uniword/wordprocessingml.rb +23 -0
- data/lib/uniword.rb +27 -0
- metadata +46 -70
- data/lib/uniword/math/accent.rb +0 -25
- data/lib/uniword/math/accent_properties.rb +0 -25
- data/lib/uniword/math/argument_properties.rb +0 -22
- data/lib/uniword/math/bar.rb +0 -25
- data/lib/uniword/math/bar_properties.rb +0 -25
- data/lib/uniword/math/begin_char.rb +0 -22
- data/lib/uniword/math/border_box.rb +0 -25
- data/lib/uniword/math/border_box_properties.rb +0 -39
- data/lib/uniword/math/box.rb +0 -25
- data/lib/uniword/math/box_properties.rb +0 -33
- data/lib/uniword/math/char.rb +0 -22
- data/lib/uniword/math/control_properties.rb +0 -27
- data/lib/uniword/math/degree.rb +0 -26
- data/lib/uniword/math/delimiter.rb +0 -25
- data/lib/uniword/math/delimiter_properties.rb +0 -33
- data/lib/uniword/math/denominator.rb +0 -26
- data/lib/uniword/math/element.rb +0 -61
- data/lib/uniword/math/end_char.rb +0 -22
- data/lib/uniword/math/equation_array.rb +0 -25
- data/lib/uniword/math/equation_array_properties.rb +0 -33
- data/lib/uniword/math/fraction.rb +0 -27
- data/lib/uniword/math/fraction_properties.rb +0 -25
- data/lib/uniword/math/function.rb +0 -27
- data/lib/uniword/math/function_name.rb +0 -26
- data/lib/uniword/math/function_properties.rb +0 -23
- data/lib/uniword/math/group_char.rb +0 -25
- data/lib/uniword/math/group_char_properties.rb +0 -29
- data/lib/uniword/math/lim.rb +0 -26
- data/lib/uniword/math/lower_limit.rb +0 -27
- data/lib/uniword/math/lower_limit_properties.rb +0 -23
- data/lib/uniword/math/math_break.rb +0 -22
- data/lib/uniword/math/math_font.rb +0 -22
- data/lib/uniword/math/math_properties.rb +0 -53
- data/lib/uniword/math/math_run.rb +0 -42
- data/lib/uniword/math/math_run_properties.rb +0 -37
- data/lib/uniword/math/math_simple_int_val.rb +0 -24
- data/lib/uniword/math/math_simple_val.rb +0 -24
- data/lib/uniword/math/math_style.rb +0 -22
- data/lib/uniword/math/math_text.rb +0 -23
- data/lib/uniword/math/matrix.rb +0 -25
- data/lib/uniword/math/matrix_column.rb +0 -23
- data/lib/uniword/math/matrix_column_properties.rb +0 -24
- data/lib/uniword/math/matrix_columns.rb +0 -23
- data/lib/uniword/math/matrix_properties.rb +0 -37
- data/lib/uniword/math/matrix_row.rb +0 -23
- data/lib/uniword/math/nary.rb +0 -29
- data/lib/uniword/math/nary_properties.rb +0 -33
- data/lib/uniword/math/numerator.rb +0 -26
- data/lib/uniword/math/o_math.rb +0 -65
- data/lib/uniword/math/o_math_para.rb +0 -25
- data/lib/uniword/math/o_math_para_properties.rb +0 -22
- data/lib/uniword/math/phantom.rb +0 -25
- data/lib/uniword/math/phantom_properties.rb +0 -33
- data/lib/uniword/math/pre_sub_superscript.rb +0 -29
- data/lib/uniword/math/pre_sub_superscript_properties.rb +0 -23
- data/lib/uniword/math/radical.rb +0 -27
- data/lib/uniword/math/radical_properties.rb +0 -25
- data/lib/uniword/math/separator_char.rb +0 -22
- data/lib/uniword/math/sub.rb +0 -26
- data/lib/uniword/math/sub_superscript.rb +0 -29
- data/lib/uniword/math/sub_superscript_properties.rb +0 -25
- data/lib/uniword/math/subscript.rb +0 -27
- data/lib/uniword/math/subscript_properties.rb +0 -23
- data/lib/uniword/math/sup.rb +0 -26
- data/lib/uniword/math/superscript.rb +0 -27
- data/lib/uniword/math/superscript_properties.rb +0 -23
- data/lib/uniword/math/upper_limit.rb +0 -27
- data/lib/uniword/math/upper_limit_properties.rb +0 -23
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Math text content
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:t>
|
|
11
|
-
class MathText < Lutaml::Model::Serializable
|
|
12
|
-
# Pattern 0: Attribute BEFORE xml mapping
|
|
13
|
-
attribute :value, :string
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "t"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
|
|
19
|
-
map_content to: :value
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
data/lib/uniword/math/matrix.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Mathematical matrix
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:m>
|
|
11
|
-
class Matrix < Lutaml::Model::Serializable
|
|
12
|
-
attribute :properties, MatrixProperties
|
|
13
|
-
attribute :rows, MatrixRow, collection: true, initialize_empty: true
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "m"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
mixed_content
|
|
19
|
-
|
|
20
|
-
map_element "mPr", to: :properties, render_nil: false
|
|
21
|
-
map_element "mr", to: :rows, render_nil: false
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Matrix column properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:mc>
|
|
11
|
-
class MatrixColumn < Lutaml::Model::Serializable
|
|
12
|
-
attribute :column_properties, MatrixColumnProperties
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "mc"
|
|
16
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
17
|
-
mixed_content
|
|
18
|
-
|
|
19
|
-
map_element "mcPr", to: :column_properties, render_nil: false
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Matrix column formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:mcPr>
|
|
11
|
-
class MatrixColumnProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :count, :integer
|
|
13
|
-
attribute :column_jc, :string
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "mcPr"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
|
|
19
|
-
map_attribute "val", to: :count
|
|
20
|
-
map_attribute "val", to: :column_jc
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Matrix column properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:mcs>
|
|
11
|
-
class MatrixColumns < Lutaml::Model::Serializable
|
|
12
|
-
attribute :columns, MatrixColumn, collection: true, initialize_empty: true
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "mcs"
|
|
16
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
17
|
-
mixed_content
|
|
18
|
-
|
|
19
|
-
map_element "mc", to: :columns, render_nil: false
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Matrix formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:mPr>
|
|
11
|
-
class MatrixProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :base_jc, :string
|
|
13
|
-
attribute :plc_hide, :string
|
|
14
|
-
attribute :row_spacing_rule, :integer
|
|
15
|
-
attribute :row_spacing, :integer
|
|
16
|
-
attribute :column_gap_rule, :integer
|
|
17
|
-
attribute :column_gap, :integer
|
|
18
|
-
attribute :matrix_columns, MatrixColumns
|
|
19
|
-
attribute :ctrl_pr, ControlProperties
|
|
20
|
-
|
|
21
|
-
xml do
|
|
22
|
-
element "mPr"
|
|
23
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
24
|
-
mixed_content
|
|
25
|
-
|
|
26
|
-
map_attribute "val", to: :base_jc
|
|
27
|
-
map_attribute "val", to: :plc_hide
|
|
28
|
-
map_attribute "val", to: :row_spacing_rule
|
|
29
|
-
map_attribute "val", to: :row_spacing
|
|
30
|
-
map_attribute "val", to: :column_gap_rule
|
|
31
|
-
map_attribute "val", to: :column_gap
|
|
32
|
-
map_element "mcs", to: :matrix_columns, render_nil: false
|
|
33
|
-
map_element "ctrlPr", to: :ctrl_pr, render_nil: false
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Matrix row
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:mr>
|
|
11
|
-
class MatrixRow < Lutaml::Model::Serializable
|
|
12
|
-
attribute :elements, Element, collection: true, initialize_empty: true
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "mr"
|
|
16
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
17
|
-
mixed_content
|
|
18
|
-
|
|
19
|
-
map_element "e", to: :elements, render_nil: false
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
data/lib/uniword/math/nary.rb
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# N-ary operator (sum, integral, product)
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:nary>
|
|
11
|
-
class Nary < Lutaml::Model::Serializable
|
|
12
|
-
attribute :properties, NaryProperties
|
|
13
|
-
attribute :sub, Sub
|
|
14
|
-
attribute :sup, Sup
|
|
15
|
-
attribute :element, Element
|
|
16
|
-
|
|
17
|
-
xml do
|
|
18
|
-
element "nary"
|
|
19
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
20
|
-
mixed_content
|
|
21
|
-
|
|
22
|
-
map_element "naryPr", to: :properties, render_nil: false
|
|
23
|
-
map_element "sub", to: :sub, render_nil: false
|
|
24
|
-
map_element "sup", to: :sup, render_nil: false
|
|
25
|
-
map_element "e", to: :element
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# N-ary operator formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:naryPr>
|
|
11
|
-
class NaryProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :chr, Char
|
|
13
|
-
attribute :lim_loc, MathSimpleVal
|
|
14
|
-
attribute :grow, MathSimpleVal
|
|
15
|
-
attribute :sub_hide, MathSimpleVal
|
|
16
|
-
attribute :sup_hide, MathSimpleVal
|
|
17
|
-
attribute :ctrl_pr, ControlProperties
|
|
18
|
-
|
|
19
|
-
xml do
|
|
20
|
-
element "naryPr"
|
|
21
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
22
|
-
mixed_content
|
|
23
|
-
|
|
24
|
-
map_element "chr", to: :chr, render_nil: false
|
|
25
|
-
map_element "limLoc", to: :lim_loc, render_nil: false
|
|
26
|
-
map_element "grow", to: :grow, render_nil: false
|
|
27
|
-
map_element "subHide", to: :sub_hide, render_nil: false
|
|
28
|
-
map_element "supHide", to: :sup_hide, render_nil: false
|
|
29
|
-
map_element "ctrlPr", to: :ctrl_pr, render_nil: false
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Fraction numerator
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:num>
|
|
11
|
-
class Numerator < Lutaml::Model::Serializable
|
|
12
|
-
# Pattern 0: Attributes BEFORE xml mappings
|
|
13
|
-
attribute :arg_properties, ArgumentProperties
|
|
14
|
-
attribute :runs, MathRun, collection: true, initialize_empty: true
|
|
15
|
-
|
|
16
|
-
xml do
|
|
17
|
-
element "num"
|
|
18
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
19
|
-
mixed_content
|
|
20
|
-
|
|
21
|
-
map_element "argPr", to: :arg_properties, render_nil: false
|
|
22
|
-
map_element "r", to: :runs, render_nil: false
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
data/lib/uniword/math/o_math.rb
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
require_relative "../has_run_position"
|
|
5
|
-
|
|
6
|
-
module Uniword
|
|
7
|
-
module Math
|
|
8
|
-
# Office Math object - container for mathematical expressions
|
|
9
|
-
#
|
|
10
|
-
# Generated from OOXML schema: math.yml
|
|
11
|
-
# Element: <m:oMath>
|
|
12
|
-
class OMath < Lutaml::Model::Serializable
|
|
13
|
-
include Uniword::HasRunPosition
|
|
14
|
-
|
|
15
|
-
# Pattern 0: Attributes BEFORE xml mappings
|
|
16
|
-
attribute :runs, MathRun, collection: true, initialize_empty: true
|
|
17
|
-
attribute :functions, Function, collection: true, initialize_empty: true
|
|
18
|
-
attribute :fractions, Fraction, collection: true, initialize_empty: true
|
|
19
|
-
attribute :superscripts, Superscript, collection: true,
|
|
20
|
-
initialize_empty: true
|
|
21
|
-
attribute :subscripts, Subscript, collection: true, initialize_empty: true
|
|
22
|
-
attribute :sub_superscripts, SubSuperscript, collection: true,
|
|
23
|
-
initialize_empty: true
|
|
24
|
-
attribute :delimiters, Delimiter, collection: true, initialize_empty: true
|
|
25
|
-
attribute :radicals, Radical, collection: true, initialize_empty: true
|
|
26
|
-
attribute :narys, Nary, collection: true, initialize_empty: true
|
|
27
|
-
attribute :boxes, Box, collection: true, initialize_empty: true
|
|
28
|
-
attribute :accents, Accent, collection: true, initialize_empty: true
|
|
29
|
-
attribute :bars, Bar, collection: true, initialize_empty: true
|
|
30
|
-
attribute :group_chars, GroupChar, collection: true,
|
|
31
|
-
initialize_empty: true
|
|
32
|
-
attribute :border_boxes, BorderBox, collection: true,
|
|
33
|
-
initialize_empty: true
|
|
34
|
-
attribute :matrices, Matrix, collection: true, initialize_empty: true
|
|
35
|
-
attribute :equation_arrays, EquationArray, collection: true,
|
|
36
|
-
initialize_empty: true
|
|
37
|
-
|
|
38
|
-
# Transient: position among sibling runs (used by MHTML renderer)
|
|
39
|
-
attribute :run_position, :integer
|
|
40
|
-
|
|
41
|
-
xml do
|
|
42
|
-
element "oMath"
|
|
43
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
44
|
-
mixed_content
|
|
45
|
-
|
|
46
|
-
map_element "r", to: :runs, render_nil: false
|
|
47
|
-
map_element "func", to: :functions, render_nil: false
|
|
48
|
-
map_element "f", to: :fractions, render_nil: false
|
|
49
|
-
map_element "sSup", to: :superscripts, render_nil: false
|
|
50
|
-
map_element "sSub", to: :subscripts, render_nil: false
|
|
51
|
-
map_element "sSubSup", to: :sub_superscripts, render_nil: false
|
|
52
|
-
map_element "d", to: :delimiters, render_nil: false
|
|
53
|
-
map_element "rad", to: :radicals, render_nil: false
|
|
54
|
-
map_element "nary", to: :narys, render_nil: false
|
|
55
|
-
map_element "box", to: :boxes, render_nil: false
|
|
56
|
-
map_element "acc", to: :accents, render_nil: false
|
|
57
|
-
map_element "bar", to: :bars, render_nil: false
|
|
58
|
-
map_element "groupChr", to: :group_chars, render_nil: false
|
|
59
|
-
map_element "borderBox", to: :border_boxes, render_nil: false
|
|
60
|
-
map_element "m", to: :matrices, render_nil: false
|
|
61
|
-
map_element "eqArr", to: :equation_arrays, render_nil: false
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Office Math paragraph - block-level math container
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:oMathPara>
|
|
11
|
-
class OMathPara < Lutaml::Model::Serializable
|
|
12
|
-
attribute :para_properties, OMathParaProperties
|
|
13
|
-
attribute :math_objects, OMath, collection: true, initialize_empty: true
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "oMathPara"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
mixed_content
|
|
19
|
-
|
|
20
|
-
map_element "oMathParaPr", to: :para_properties, render_nil: false
|
|
21
|
-
map_element "oMath", to: :math_objects, render_nil: false
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Math paragraph properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:oMathParaPr>
|
|
11
|
-
class OMathParaProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :justification, MathSimpleVal
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "oMathParaPr"
|
|
16
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
17
|
-
|
|
18
|
-
map_element "jc", to: :justification, render_nil: false
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
data/lib/uniword/math/phantom.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Phantom object (zero width/height)
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:phant>
|
|
11
|
-
class Phantom < Lutaml::Model::Serializable
|
|
12
|
-
attribute :properties, PhantomProperties
|
|
13
|
-
attribute :element, Element
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "phant"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
mixed_content
|
|
19
|
-
|
|
20
|
-
map_element "phantPr", to: :properties, render_nil: false
|
|
21
|
-
map_element "e", to: :element
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Phantom formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:phantPr>
|
|
11
|
-
class PhantomProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :show, MathSimpleVal
|
|
13
|
-
attribute :zero_wid, MathSimpleVal
|
|
14
|
-
attribute :zero_asc, MathSimpleVal
|
|
15
|
-
attribute :zero_desc, MathSimpleVal
|
|
16
|
-
attribute :transp, MathSimpleVal
|
|
17
|
-
attribute :ctrl_pr, ControlProperties
|
|
18
|
-
|
|
19
|
-
xml do
|
|
20
|
-
element "phantPr"
|
|
21
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
22
|
-
mixed_content
|
|
23
|
-
|
|
24
|
-
map_element "show", to: :show, render_nil: false
|
|
25
|
-
map_element "zeroWid", to: :zero_wid, render_nil: false
|
|
26
|
-
map_element "zeroAsc", to: :zero_asc, render_nil: false
|
|
27
|
-
map_element "zeroDesc", to: :zero_desc, render_nil: false
|
|
28
|
-
map_element "transp", to: :transp, render_nil: false
|
|
29
|
-
map_element "ctrlPr", to: :ctrl_pr, render_nil: false
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Pre-subscript and superscript object
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:sPre>
|
|
11
|
-
class PreSubSuperscript < Lutaml::Model::Serializable
|
|
12
|
-
attribute :properties, PreSubSuperscriptProperties
|
|
13
|
-
attribute :sub, Sub
|
|
14
|
-
attribute :sup, Sup
|
|
15
|
-
attribute :element, Element
|
|
16
|
-
|
|
17
|
-
xml do
|
|
18
|
-
element "sPre"
|
|
19
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
20
|
-
mixed_content
|
|
21
|
-
|
|
22
|
-
map_element "sPrePr", to: :properties, render_nil: false
|
|
23
|
-
map_element "sub", to: :sub
|
|
24
|
-
map_element "sup", to: :sup
|
|
25
|
-
map_element "e", to: :element
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Pre-sub-superscript formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:sPrePr>
|
|
11
|
-
class PreSubSuperscriptProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :ctrl_pr, ControlProperties
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "sPrePr"
|
|
16
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
17
|
-
mixed_content
|
|
18
|
-
|
|
19
|
-
map_element "ctrlPr", to: :ctrl_pr, render_nil: false
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
data/lib/uniword/math/radical.rb
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Radical object (square root, nth root)
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:rad>
|
|
11
|
-
class Radical < Lutaml::Model::Serializable
|
|
12
|
-
attribute :properties, RadicalProperties
|
|
13
|
-
attribute :degree, Degree
|
|
14
|
-
attribute :element, Element
|
|
15
|
-
|
|
16
|
-
xml do
|
|
17
|
-
element "rad"
|
|
18
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
19
|
-
mixed_content
|
|
20
|
-
|
|
21
|
-
map_element "radPr", to: :properties, render_nil: false
|
|
22
|
-
map_element "deg", to: :degree, render_nil: false
|
|
23
|
-
map_element "e", to: :element
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Radical formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:radPr>
|
|
11
|
-
class RadicalProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :deg_hide, MathSimpleVal
|
|
13
|
-
attribute :ctrl_pr, ControlProperties
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "radPr"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
mixed_content
|
|
19
|
-
|
|
20
|
-
map_element "degHide", to: :deg_hide, render_nil: false
|
|
21
|
-
map_element "ctrlPr", to: :ctrl_pr, render_nil: false
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Separator delimiter character
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:sepChr>
|
|
11
|
-
class SeparatorChar < Lutaml::Model::Serializable
|
|
12
|
-
attribute :val, :string
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "sepChr"
|
|
16
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
17
|
-
|
|
18
|
-
map_attribute "val", to: :val
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
data/lib/uniword/math/sub.rb
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Subscript content
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:sub>
|
|
11
|
-
class Sub < Lutaml::Model::Serializable
|
|
12
|
-
# Pattern 0: Attributes BEFORE xml mappings
|
|
13
|
-
attribute :arg_properties, ArgumentProperties
|
|
14
|
-
attribute :runs, MathRun, collection: true, initialize_empty: true
|
|
15
|
-
|
|
16
|
-
xml do
|
|
17
|
-
element "sub"
|
|
18
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
19
|
-
mixed_content
|
|
20
|
-
|
|
21
|
-
map_element "argPr", to: :arg_properties, render_nil: false
|
|
22
|
-
map_element "r", to: :runs, render_nil: false
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Subscript and superscript object
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:sSubSup>
|
|
11
|
-
class SubSuperscript < Lutaml::Model::Serializable
|
|
12
|
-
attribute :properties, SubSuperscriptProperties
|
|
13
|
-
attribute :element, Element
|
|
14
|
-
attribute :sub, Sub
|
|
15
|
-
attribute :sup, Sup
|
|
16
|
-
|
|
17
|
-
xml do
|
|
18
|
-
element "sSubSup"
|
|
19
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
20
|
-
mixed_content
|
|
21
|
-
|
|
22
|
-
map_element "sSubSupPr", to: :properties, render_nil: false
|
|
23
|
-
map_element "e", to: :element
|
|
24
|
-
map_element "sub", to: :sub
|
|
25
|
-
map_element "sup", to: :sup
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Uniword
|
|
6
|
-
module Math
|
|
7
|
-
# Sub-superscript formatting properties
|
|
8
|
-
#
|
|
9
|
-
# Generated from OOXML schema: math.yml
|
|
10
|
-
# Element: <m:sSubSupPr>
|
|
11
|
-
class SubSuperscriptProperties < Lutaml::Model::Serializable
|
|
12
|
-
attribute :aln_scr, :string
|
|
13
|
-
attribute :ctrl_pr, ControlProperties
|
|
14
|
-
|
|
15
|
-
xml do
|
|
16
|
-
element "sSubSupPr"
|
|
17
|
-
namespace Uniword::Ooxml::Namespaces::MathML
|
|
18
|
-
mixed_content
|
|
19
|
-
|
|
20
|
-
map_attribute "val", to: :aln_scr
|
|
21
|
-
map_element "ctrlPr", to: :ctrl_pr, render_nil: false
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|