Skip to content

Allow defining symbols that break out of exp#151

Open
JMSS-Unknown wants to merge 4 commits intodaniel3735928559:masterfrom
JMSS-Unknown:chars_break_exp
Open

Allow defining symbols that break out of exp#151
JMSS-Unknown wants to merge 4 commits intodaniel3735928559:masterfrom
JMSS-Unknown:chars_break_exp

Conversation

@JMSS-Unknown
Copy link
Contributor

The given symbols or strings will break out of an exponential. For example, if you type 2^2 and then press =, the result will be 2^{2}= instead of 2^{2=} as before

The editor also removed trailing white space automatically, sorry about that.

The editor also removed trailing whitespace automatically, which is probably undesired.
@daniel3735928559
Copy link
Owner

It isn't clear to me that exponentials are special in this regard. For example, entering s i n ( x = 2 probably should also result in output sin(x) = 2.

I think what's actually going on is that some nodes/characters should be restricted to being children only of the top-level c node and when they are entered, they should always trigger breaking out of wherever they are back up to the top-level c-node and be placed there.

For example, in this PR, if I enter 2 ^ 2 ^ x = then I end up with 2^(2^x = )

@JMSS-Unknown
Copy link
Contributor Author

I made it that some symbols like = can only be in the top most node as you said, but my main focus of this pull request was that if you type 2 ^ 3 + the output is {2}^{3}+. This is limited to superscripts and subscripts (which it now support)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants