In LyX you have the option to call an external math program(CAS or numerical) on a formula. In inline mode it works fine - it takes the last part of your equation, computes it, and appends it after an equation symbol. In display mode, however, it has a different behaviour - it takes the first part of the equation, computes it, deletes everything after it, and puts the result, together with the first part, in an
For example, if I have
x+x=1+1, and I run
math-extern maxima in inline mode, I get
x+x=1+1=2 - like expected. But if I do the same thing in display mode, I get
x+x=2x - which is not what I want.
Now, I've managed to partially solve it by using a command sequence to switch to inline mode, compute, and switch back to display mode:
command-sequence math-display; math-extern maxima; math-display. But while this keymap fixes display mode - it wrecks inline mode, because when I run it in inline mode it does the exact opposite...
So, is there a way to make both modes behave like the default behaviour of inline mode?