Skip to content

Math: implement m:nary n-ary operator converter (community) #2602

@caio-pizzol

Description

@caio-pizzol

What

Implement the m:nary (n-ary operator) OMML → MathML converter. Covers integrals (∫), summations (∑), products (∏), unions (∪), etc.

OMML: m:narym:naryPr (chr, limLoc, grow, subHide, supHide) + m:sub + m:sup + m:e
MathML: (limits below/above) or (limits as sub/superscript) + `` for the operator
Spec: §22.1.2.70
Difficulty: Medium

Details

  • m:naryPr/m:chr@m:val — operator character (default ∫, U+222B)
  • m:naryPr/m:limLoc@m:val"undOvr"<munderover>, "subSup"<msubsup>
  • m:naryPr/m:subHide / m:supHide — hide lower/upper limit
  • m:sub — lower limit (e.g. i=1)
  • m:sup — upper limit (e.g. n)
  • m:e — integrand/summand

How to implement

  1. Create converters/nary.ts
  2. Read operator char and limLoc from m:naryPr
  3. Build <munderover> or <msubsup> with <mo>chr</mo> + sub + sup, then append m:e content
  4. Register as 'm:nary': convertNary

Test Document

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


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-2381

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions