On Wed, Feb 04, 2004 at 09:45:06AM -0500, Fred Nastos wrote:
> On February 4, 2004 09:23 am, Andre Poenitz wrote:
> > On Wed, Feb 04, 2004 at 09:11:21AM -0500, Fred Nastos wrote:
> > > Hi,
> > >
> > > I am very new to LyX, but familiar with LaTeX and the AMS extensions.
> > > Normally, when I am LaTeXing I like to use the split environment for
> > > multiline display. For example I might have something like:
> > > \begin{equation}\begin{split}
> > > z & = \cos(a+b) \\
> > > & = \cos(a)\cos(b) - \sin(a)\sin(b)
> > > \end{split}\end{equation}
> > >
> > > In LyX though, I cannot see how to invoke this. Under "Insert -> Math"
> > > I find AMS gather, AMS align, AMS alginat, etc. but I do not see an
> > > AMS split option invoked? Is it possible in LyX to use this environment?
> >
> > Just type \split<space> and add colums/rows to it as usual.
>
> Thanks for your help. This sort-of works. There seems to be some errors
> with a simple file. Here are my steps:
> 1) File -> New
> 2) Insert -> Math -> Display Formula. Cursor should be inside math box.
> 3) Type "\split" then a space
> 4) Edit -> Tabular -> Add Column
M-m c i is faster...
> 5) Edit -> Tabular -> Add Row. There are now 4 math boxes.
M-m w i or even C-Return is faster...
> 6) Fill the boxes with characters (I used letters "a", "b", "c", "d")
> 7) View -> DVI
>
> There are 4 errors generated. I exported the document to a LaTeX file to
> try to fix the errors. The two steps I took to fix this are:
> 1) added: \usepackage{amsmath}
Such stuff can usually be put in the document preamble. But don't do
that in this particular case as:
> 2) commented out: \newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}
> (since this is definedin amsmath).
Layout->Document->Extra 'use AMS' is better.
> I notice that if I start a fresh LyX file, and I use one of the menued APS
> features (for example the AMS gather Environment), the resulting exported
> LaTeX file has the \usepackage{amsmath} included and the
> \newcommand{\boldsmbol} is not included.
>
> So, when someone uses \split inside Math Display made, shouldn't LyX
> be making sure that \usepackage{amsmath} is included?
Sort of. It's not as simple as it sounds, though, as the \split in the
formula may not be the one from AMS and automatically including AMS in
this case may lead to other, then unsolvable conflicts.
Andre'