tex-math-parser
tex-math-parser copied to clipboard
Support for mulit character variable names + symbol tests
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