Skip to content

Math: implement m:rad radical/sqrt converter (community) #2598

@caio-pizzol

Description

@caio-pizzol

What

Implement the m:rad (radical / square root) OMML → MathML converter.

OMML: m:radm:radPr (optional, has m:degHide) + m:deg (degree) + m:e (radicand)
MathML: (when degree hidden) or (with degree)
Spec: §22.1.2.86
Difficulty: Easy

Example

Word: √x → ...
MathML: x

Word: ∛x → 3...
MathML: x3

How to implement

  1. Create packages/layout-engine/painters/dom/src/features/math/converters/radical.ts
  2. Check m:radPr/m:degHide — if hidden, use <msqrt>, otherwise <mroot>
  3. Register as 'm:rad': convertRadical

Test Document

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

sd-2375-radical.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-2375

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions