Skip to content

Math: implement m:func function apply converter (community) #2603

@caio-pizzol

Description

@caio-pizzol

What

Implement the m:func (function apply) OMML → MathML converter. Used for named functions like sin, cos, log applied to an argument.

OMML: m:funcm:funcPr + m:fName (function name) + m:e (argument)
MathML: sin⁡argument
Spec: §22.1.2.39
Difficulty: Medium

Details

  • m:fName contains m:r runs with the function name (e.g. "sin", "cos", "log")
  • The invisible function application operator (U+2061) separates name from argument
  • Function names should use mathvariant="normal" (upright, not italic)

How to implement

  1. Create converters/function.ts
  2. Convert m:fName children, then append <mo>⁡</mo>, then convert m:e
  3. Register as 'm:func': convertFunction

Test Document

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

sd-2384-function.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-2384

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions