# Re: Unsupported math environments

Dear Jacob.
However, I think that the solution suggested by Guy Rutenberg will only work
for math COMMANDS.  See the attached file, where I define a math macro \pFq in
order to write the symbol for generalized hypergeometric functions.

What I want and need is a means to implement the math ENVIRONMENTS defined by
the mathtools package and that are not explicitly supported by LyX.
Specifically for multiline equations.  LyX supports the standard AMS inner and
outer environments, such as align (outer) and aligned (inner).  However,
multline is only an outer env in the standard AMSmath.  The mathtools pack
defines the corresponding inner multlined environment, and it seems that there
is no way to use it other than ERTing the math input (see attached file).
I guess the same tweak can be applied in order to use the other new
environments defined by mathtools, such as dcases, rcases, drcases,
psmallmatrix, bsmallmatrix, etc.

The only other alternative I was able to find was this suggestion by Uwe Stôhr:
http://marc.info/?l=lyx-users&m=117565214529188&w=2
which would demand some tweaking with the default spaces of the multline
environment (see file).

I also tried to create first a tex file with

$\begin{multlined} a = \\ b \end{multlined}$

and then import it into LyX, but only the first line was used.  So, I guess
multlined is indeed unsupported.

On Thursday 26 June 2014 21:45:37 you wrote:
> On Thu, Jun 26, 2014 at 6:52 AM, Rudi Gaelzer <rgael...@gmail.com> wrote:
>
> > Using LyX 2.1.x, is it now possible to implement via ERT the
> > still-unsupported capabilities of the mathtools package, such as the
> > multlined (section 3.4.2), *smallmatrix (sec. 3.4.1) and *cases (sec.
> > 3.4.3) environments?
> >
>
> I'm not sure I understand the question. What you wrote seems to imply that
> it was not previously possible to use the capabilities of the mathtools
> package via ERT. As far as I know, it has *always* (or maybe just for a
> very long time) been possible to use the capabilities of *any* LaTeX
> package via ERT (as long as it doesn't conflict with another package that
> is in use). For example, here is a post of someone using the mathtools
> package in LyX over two years ago:
> http://www.guyrutenberg.com/2009/05/13/displaying-non-builtin-math-macros-in-lyx/
> . As another example for one of your specific scenarios, here is a post
> from another person using the cases environment from mathtools:
> http://tex.stackexchange.com/questions/127417/cases-environment-makes-latex-hang
> .
>
> Why don't you try it, and if you have trouble, post the specific problem
> here? I hope this helps.
>
> Jacob
--
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741

pres.lyx
Description: application/lyx