Skip to content

Math: implement m:d delimiter converter (community) #2611

@caio-pizzol

Description

@caio-pizzol

What

Implement the m:d (delimiter) OMML → MathML converter. Delimiters are parentheses, brackets, braces, and other enclosing characters around math content.

OMML: m:dm:dPr (begChr, endChr, sepChr, grow) + one or more m:e (content)
MathML: ( ... ) (use `` for open/close/separator chars)
Spec: §22.1.2.24
Difficulty: Medium

Details

  • m:dPr/m:begChr@m:val — opening character (default ()
  • m:dPr/m:endChr@m:val — closing character (default ))
  • m:dPr/m:sepChr@m:val — separator between multiple m:e elements (default |)
  • Multiple m:e children are separated by the separator character

How to implement

  1. Create converters/delimiter.ts
  2. Read begChr/endChr/sepChr from m:dPr (with defaults)
  3. Build <mrow> with <mo>begChr</mo>, converted children with separators, <mo>endChr</mo>
  4. Register as 'm:d': convertDelimiter

Test Document

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

sd-2380-delimiter.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-2380

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions