Skip to content

MathLive: a closing parentheses after a function application is ignored #101

@rs-mobitech

Description

@rs-mobitech

My application has logging code and I noticed what I think is a problem with .simplify(). Here is the code, and below that are results for two expressions. One of the expressions is missing an ending parenthesis:

          let mathLatex = mf1.getValue('latex')
          let mathJson  = mf1.getValue('math-json')
          let mfExpression = mf1.expression
          let mfNLatex = MathfieldElement.computeEngine.parse(mathLatex).N().latex
          let mfSLatex = MathfieldElement.computeEngine.parse(mathLatex).simplify().latex
          let mfELatex = MathfieldElement.computeEngine.parse(mathLatex).evaluate().latex
          MathfieldElement.computeEngine.latexOptions = { precision: 6 }
          
          mf2.setValue(mfNLatex)
          mf3.setValue(mfSLatex)
          mf4.setValue(mfELatex)
          mf5.setValue(mathJson)

          logToConsole("mathLatex:" + mathLatex);
          logToConsole("mfExpression:" + mfExpression);
          logToConsole("mfNLatex:" + mfNLatex);
          logToConsole("mfSLatex:" + mfSLatex);
          logToConsole("mathJson:" + mathJson)
Screenshot 2023-08-25 at 17 47 36 Screenshot 2023-08-25 at 17 46 44

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions