Helge Hafting wrote: > I hope the calculator window will be available > from the normal editor also
would be 'enter' key inside mathed enough? ;) while the other part need more work this showed as a very trivial thing, since we never use enter in mathed. that would be unintrusive change even for 2.0/1.6. simplistic attached version has two problems: 1. hardcoded maxima, but we support other backends as well. simple fix will add one combo "default math-extern engine" in prefs. 2. its not bound to enter, but to LFUN_BREAK_PARAGRAPH. it can be argued that math-extern should be put rather into bind file to "command-alternatives break-paragraph;math-extern" (getstatus changes of break-paragraph in mathed would be needed then). i think its overengineering, since enter key is not going to change its binding, but can go this route as well if wanted. unless there are some objections i intend to commit this with 1. fixed. opinions? pavel
commit 47cde5d0b8c2e43ec93735b6dc75bdda9291e365 Author: Pavel Sanda <[email protected]> Date: Sat Dec 11 15:31:53 2010 +0100 Trigger maxima computation on enter diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 04c5b82..a127b0e 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -29,6 +29,7 @@ #include "FuncRequest.h" #include "FuncStatus.h" #include "LaTeXFeatures.h" +#include "LyX.h" #include "LyXRC.h" #include "MacroTable.h" #include "output_xhtml.h" @@ -1277,6 +1278,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd) break; case LFUN_BREAK_PARAGRAPH: + lyx::dispatch(FuncRequest(LFUN_MATH_EXTERN, "maxima")); // just swallow this break;
