On 5/5/05, Paul A. Rubin <[EMAIL PROTECTED]> wrote: > > Hope this isn't too simple.... I'd like to define a quick way in Lyx of > > entering this construct for entering a system of equations: > > > > $\left\{ \begin{array}{rrrrr} > > \\\end{array}\right.$ > > > > Currently I achieve this by using the Math panel to insert an unmatched > > left squiggly brace, then a 2 x 5 matrix right justified by column, and > > this takes a boring number of keystrokes. > > > > I tried defining a macro, but of course I can't edit it. > > > > Is there any way of creating a macro that puts objects on the screen that > > you can edit? > > Alas, you can have nine editable entries but not 10. Had you asked for > a 2x4 matrix, there would be a way to do it with a macro. In the > minibuffer, type something like > > math-macro myArray 8 > > where the 8 indicates you will have 8 editable entries. In the macro > definition box, insert the left brace, the 2x4 array (with right > justification) and the right null delimiter. Then (still in the macro > definition box) switch into each cell and enter an argument index in the > form #1, #2, ..., #8. When you invoke the macro with \myArray inside a > math environment, you'll get editable cells in which to enter the eight > arguments. The limit is nine (the indexing must be '#' followed by a > single digit, and #0 won't fly).
It would be even more interesting to have a macro able to accept a variable number of entries, which would be chosen by the user. Is my idea feasible? Paul