Am Montag, 2. Oktober 2006 21:40 schrieb Georg Baum:
> Am Montag, 2. Oktober 2006 20:29 schrieb Yang:
> > Can I insert environments like {lgathered} or {gathered}[t] without
> > resorting to raw TeX? E.g., how would I go about adding the following
> > into my document?
> > 
> > \begin{align}
> >   x &=
> > \begin{lgathered}[t]
> >      a + b + c \\
> >      d + e + \begin{gathered}[t]
> >                f + g + h \\
> >                i + j + k
> >              \end{gathered}
> >    \end{lgathered}
> > \end{align}
> 
> In principle it works like this:
> Copy it into your document, select all of it and press C-M.
> 
> If you already have a math formula you can enter every latex command by 
its 
> name followed by a space. Environments work a bit different, for gathered 
> you type
> 
> \gathered
> 
> followed by a space.
> 
> However, LyX has a problem with lgathered, and also with the optional 
> argument of gathered, so currently there is no way to input it without 
> ERT.

Actually this is not true. Add the lines

lgathered         matrix      none
rgathered         matrix      none

to the symbols file (found e.g. in /usr/share/lyx), and the procedure with 
C-M works. It looks a bit strange on screen, especially you will see the 
optional arguments in the first cell, but the output is correct, and you 
can put in other math constructs as you like.


Georg

Reply via email to