tex-math-parser icon indicating copy to clipboard operation
tex-math-parser copied to clipboard

Support for mulit character variable names + symbol tests

Open Mastercuber opened this issue 11 months ago • 1 comments

It is possible to use the evaluateTex function with symbols (a, b, c), but a symbol out of multiple characters like aa are seems to get tokenized to single character variables and therefore is unable to find the symbol a, though provided through the scope object like with {aa: 2}.

This PR introduces some tests to show, it's working with single char symbols and throw an "undefined symbol a" error when a multi char symbol is provided.

A simple workaround for now seems to just map the variable names to single char names, since single char symbols are working fine.

Maybe there is a problem with parsing of multiplications, since aa could be a variable, but also the shorthand form of a * a

Mastercuber avatar Mar 24 '24 23:03 Mastercuber