Closed truebluepl closed 1 month ago
This is a difficult one to fix.
The \left
and \right
commands are currently treated as a single command that begins with \left
and ends with \right
. So a \right)
is not recognized, because there is no matching \left
.
I intend to fix that some day.
In the meantime, the workarounds are to use \left.\right)
(an "invisible" left followed by a right), or a \big)
and variant, or a plain )
(and let smartfence figure out if it should get translated to a \right)
).
The problem is that putting "(" or ")" differ from "\left(" or "\right)" in the latex syntax. So for example we get:
(x+1)2 and \left(x+1\right)2
But I found fix. Changing key string to "[(]" or "[)]" solving problem (in the latex syntax we get "\left(" and "\right)".
Sorry, I should have been clearer. When using a "plain )
", I meant to use {key: ")"}
: this produces the same effect as if you typed )
on the keyboard, which will insert a \right)
if you have smartfence on and there is a matching \left
command.
Using "[)]"
will work as well, since it's a shortcut for {key: ")"}
with some variants added.
I'm sure I got different forms.
From virtual keyboard with "(" and ")" set : (x+1)2
From real keyboard: \left(x+1\right)2
When I set "[(]" and "[)]" for virtual keyboard it works like a charm.
Did you use the key
property?
No. Plain property or via latex property. Whatever - you can close thread:) Thank you!
Right, if you use the key
property, it will work. Closing now.
Actual Behavior
Setting
\\right)
as latex for virtual keyboard key causes generating\right)
as keycup and the same string is inserted into MathLive field. With\\left(
there is no problem.Expected Behavior
Latex string
\\right)
should generate just right parenthesis.