On Tue, Oct 16, 2001 at 03:51:43PM -0400, Matej Cepl wrote: > However, when working on my assignements, I usually had in other > gnome-terminal window started octave for calculating determinants etc. > While working on these assignements, I begun to dream about an > improvement of LyX which would allow me to work with Octave exactly in > LyX (something what could be done with much more primitive GNU Calc in > Emacs). For example, let's have following in MathEd: > > [ 1 2 3 ] > A = | 2 3 1 | > [ 3 1 2 ] > |A| = > > Now when pressing some hotkey, I would love that LyX would insert -18 > (determinant of the matrix A). I believe that such functionality would > be something further moving LyX from "just better editor" to real > killer-application.
Would it? Well... I suppose so ;-} That's what the 'math-extern' LyXfunc is supposed to support: Mathed can write (some of its) math in some special "normal" format which is easy to parse (the actual parsing is a one-liner in Tcl...). You need to provide a 'lyx2octave' external program which translates this format into octave syntax and calls octave. The result has to be math in LaTeX format which is read back by lyx. There is a 'lyx2maple' script in src/mathed which s There are, of course, massive problem with translating LyX/LaTeX's layout oriented representation of formulae into something that makes sense "math wise". And, due to the feature freeze, development in this area is currently completely stalled. > OK, I am sure, that it is so complicated, that a huge rewrite of Mathed > would be required. This deed is done... > Therefore, let's keep it as a dream for some future > situation, when LyX will be so polished, that no programmer would > anything to do :-). And of course, that I see some pitfalls (I do not > want octave being started just for a name of variable being inserted -- > e.g., when just inline equation - Ctrl-M - is edited). No... as you mentioned. You will have to press some hotkey... > However, I would have some much less complicated proposal. Would it be > possible to persuade Mathed, that it would insert in Clipboard (Ctrl-C) > matrix, equation, formula, etc. so that it may be easily inserted into > octave? I mean, that for above shown matrix, a content of clipboard > (when whole first line is selected) would be a=[1,2,3;2,3,1;3,1,2]? I won't put any Maple/Octave/whatever specific code into mathed. You'l get the "normal" format and have to provide the converter yourself.. Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]