Math

Answered

Math feature is not working in their sample

I downloaded the sample from  here

I am able to get the below output reflected in image.

I am able to detect integers like "5" and "3" also  mathematical operations like "+"  

Now finally "5+3=" is not getting reflected to its result as 8


Question ::

How to resolve this or is there any way to change the setting to get the result 


image




Best Answer

Dear Devrath,


my apologies, as i did not mention you shall use the Demo sample rather than the getStarted.


In the Demo sample, if you create a Text Document part, in "TOUCH" mode, you shall do a long press, and select "Add Math". This will create a Math block, in which you will be able to convert the equation you write.


Best regards,


Olivier


Answer

Dear Devrath,


my apologies, as i did not mention you shall use the Demo sample rather than the getStarted.


In the Demo sample, if you create a Text Document part, in "TOUCH" mode, you shall do a long press, and select "Add Math". This will create a Math block, in which you will be able to convert the equation you write.


Best regards,


Olivier


1 person likes this

HI  Olivier

If I do a long press in text document, math block is not getting created.
Can you show how a math block looks in the pic
Need more information of this

 

Dear Devrath,


currently, you have 2 possibilites:

-Either you create a "Math" part: contentPart = contentPackage.createPart("Math");

=>in that case, by default the solver will be activated, and after convert, you will have the result.

-Or, in your case, as you are in a "Text Document" part, you select the "TOUCH" button, do a long press, and create a Math block. You can then write in it, and in the same way, after convert, you will have the solved result.


Best regards,


Olivier

Hi Oliver, Thanks for your reply 

I tried the second approach ( Made no changes to code )

Here is what I tried 

  1. I wrote the equation "5-2=" using the "PEN" button 
  2. Then, I selected "TOUCH" button - > Area got selected as shown in the pic below 
  3. After that - > On Long Press of selected area -> Equation is not getting solved


Is there still anything more settings needed to be done here or procedure to be followed ?

image


Dear Devrath,


Currently, you shall do the long press first, whihc will allow to create a math block inside of your "Text Document".


You can then write your equation into this Math block.


Best regards,


Olivier