What
Implement the m:sSub (subscript) OMML → MathML converter.
OMML: m:sSub → m:e (base) + m:sub (subscript)
MathML: <msub> with two children (base, subscript)
Spec: §22.1.2.101
Difficulty: Easy
Example
Word: a₁ → <m:sSub><m:e><m:r><m:t>a</m:t></m:r></m:e><m:sub><m:r><m:t>1</m:t></m:r></m:sub></m:sSub>
MathML: <msub><mi>a</mi><mn>1</mn></msub>
How to implement
- Create
packages/layout-engine/painters/dom/src/features/math/converters/subscript.ts
- Export
convertSubscript: MathObjectConverter
- Register in
converters/index.ts and omml-to-mathml.ts registry ('m:sSub': convertSubscript)
See converters/fraction.ts for the pattern.
Test Document
Download the test file and upload it to the SuperDoc dev app to verify your implementation renders correctly:
sd-2373-subscript.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-2373
What
Implement the
m:sSub(subscript) OMML → MathML converter.OMML:
m:sSub→m:e(base) +m:sub(subscript)MathML:
<msub>with two children (base, subscript)Spec: §22.1.2.101
Difficulty: Easy
Example
Word: a₁ →
<m:sSub><m:e><m:r><m:t>a</m:t></m:r></m:e><m:sub><m:r><m:t>1</m:t></m:r></m:sub></m:sSub>MathML:
<msub><mi>a</mi><mn>1</mn></msub>How to implement
packages/layout-engine/painters/dom/src/features/math/converters/subscript.tsconvertSubscript: MathObjectConverterconverters/index.tsandomml-to-mathml.tsregistry ('m:sSub': convertSubscript)See
converters/fraction.tsfor the pattern.Test Document
Download the test file and upload it to the SuperDoc dev app to verify your implementation renders correctly:
sd-2373-subscript.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-2373