# Making math-extern in LyX behave in display mode like it does in inline mode [closed]

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 eqnarray.

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?

-
And the link to TeX is? –  Joseph Wright Apr 15 '12 at 9:49
@JosephWright The link to TeX is that LyX is a TeX editor. –  Idan Arye Apr 15 '12 at 16:46
My point is that this looks like a Lyx bug. In general, bugs in software (including LaTeX packages) are 'too localised' as they cannot be fixed here, only by the author(s) of the code. Have you reported this on the Lyx list? –  Joseph Wright Apr 15 '12 at 17:18
This is an intended behaviour, not a bug, since it's a behaviour that makes sense - I just want it to behave differently. –  Idan Arye Apr 15 '12 at 18:08