Open AlienKevin opened 5 years ago
In addition, I feel that variable names shouldn't be separated from their subscripts. For example, guppy automatically hints the insertion of a pair of parentheses around "F" in "Fx" but the whole variable name should be "Fx" and it should be surrounded with parentheses. I think this behavior is inherited from superscript for powers. Again, I feel that subscripts should be treated separately from superscripts.
I discovered some problems regarding the representation of subscripts in plain text and asciimath formats when using
guppy.engine.get_content()
.Fg
(g is in subscript) to the editor returnsFg
when callingget_content("asciimath")
. I thinkFg
should instead be normaly rendered asF_g
in asciimath format.Fgx
(gx is in subscript) to the editor returns(F_(g * x))
. However, to my understanding, subscripts are used most of the time as name denoting the state of the variable or providing additional information. For instance, in physics,V0
(0 is in subscript) denotes the initial speed,Vf
(f is in subscript) denotes the final speed. In addition, this implicit multiplication messes up math calculations using the generated plain text and confuses other math libraries and functions.guppy.engine.get_content("text")
generates(F_g)
whenFg
is inputted into the editor.(F_g)
is rejected by the importtext() method and resulted in parsing error. The workaround is to always surround subscripts with a pair of parentheses, like `(F(g))`