simpleclub / math_keyboard

Math expression editing using an on-screen software keyboard or physical keyboard input in a typeset input field in Flutter.
https://simpleclub.github.io/math_keyboard
BSD 3-Clause "New" or "Revised" License
134 stars 50 forks source link

Error when I want to convert a math problem to an expression #39

Open musiolmarco opened 2 years ago

musiolmarco commented 2 years ago

Hello and thank you first of all that you have put so much effort into the package and make it available to us.

Actually everything works very well, I only have a single problem. To help you understand the problem, maybe I should briefly describe my situation: I am currently working on a math app and get a LaTeX string result, which I would like to edit with your package. So as soon as a MathField is created, I want to give it a MathFieldEditingController and change the value with mathFieldEditingController.updateValue('...'); with my LaTeX value when initializing the class. This all works very well, if I take the examples from your or the math_expressions package.

But if I want to take the LaTeX string from me and convert it to an expression I always get an error. I tried it with the TeXParser('...').parse();, as well as the Expression expression = parser.parse('...'); method. I also tried several times to transform the string somehow so that the expression can be created, however it did not work.

Of course it could be that I don't understand the method somehow, but can someone help me and tell me how to put the LaTeX string from me into your MathField?

Here you also have a few examples with the values and the exceptions that occurred, so that you understand even better what exactly I mean: Code_Pbf3y60e7d

Code_Kr4Wn0SeOP

Code_UY4ab2n0IQ

Code_uA9rspSxjP

Code_KjWr6FUvBp

Code_qdmSoacKuN

github-actions[bot] commented 2 years ago

Hi πŸ‘‹πŸ½ Thank you for opening your first issue with simpleclub/math_keyboard ❀

You can expect triage from us soon πŸ™‚ In the meantime, you can try to search for similar issues in our issue database.