- If the math-panel has the focus I can type text but not switch into
math-mode or use some of the other keyboard-shortcuts.
-- In the default-configuration there are shortcuts for al greek characters
- _except_ varphi wich is used extensively as a default-variable-name.
+// - In the default-configuration there are shortcuts for al greek characters
+// _except_ varphi wich is used extensively as a default-variable-name.
From: Álvaro Tejero Cantero <alvaro@antalia.com>
majority of cases.
-- undo-redo seems too coarse in math-mode. You end up losing substantial
- fragments of your formula. I hate that when it affects tensors,;).
+// - undo-redo seems too coarse in math-mode. You end up losing substantial
+// fragments of your formula. I hate that when it affects tensors,;).
- cut&paste inside math-mode doesn't work the X fashion (middle button doesn't
paste anything).
}
else if (t.cat() == catBegin) {
- array.push_back(MathAtom(new MathBraceInset));
- parse_into(array.back()->cell(0), FLAG_BRACE_LAST);
+ MathArray ar;
+ parse_into(ar, FLAG_BRACE_LAST);
+#ifndef WITH_WARNINGS
+#warning this might be wrong in general!
+#endif
+ // ignore braces around simple items
+ if (ar.size() == 1 || (ar.size() == 2 && ar.back()->asScriptInset())) {
+ array.push_back(ar);
+ } else {
+ array.push_back(MathAtom(new MathBraceInset));
+ array.back()->cell(0).swap(ar);
+ }
}
else if (t.cat() == catEnd) {