Skip to content

Math: implement m:m matrix converter (community) #2601

@caio-pizzol

Description

@caio-pizzol

What

Implement the m:m (matrix) OMML → MathML converter.

OMML: m:mm:mPr (column count, justification, spacing) + m:mr rows, each with m:e cells
MathML: with rows and `` cells
Spec: §22.1.2.60
Difficulty: Hard

Details

  • m:mPr/m:mcs/m:mc/m:mcPr/m:count@m:val — column count
  • m:mPr/m:mcs/m:mc/m:mcPr/m:mcJc@m:val — column justification
  • m:mr — matrix row, contains m:e elements (one per cell)
  • Often wrapped in m:d (delimiter) for brackets: [matrix]

How to implement

  1. Create converters/matrix.ts
  2. Iterate m:mr rows → <mtr>, each m:e<mtd>
  3. Register as 'm:m': convertMatrix

Test Document

Download the test file and upload it to the SuperDoc dev app to verify your implementation renders correctly:

sd-2387-matrix.docx


Want to work on this? Check the Contributing Guide to get started. Comment on this issue to let us know you're picking it up.

Ref: SD-2387

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions