# Left aligned multi line equations and \newenvironment

I'm building a table of integrals, for my own use. I need simple things: equations must be left aligned, sometimes I need alignment on the equal symbol and to save space sometimes I need 2 equations on the same line.

\begin{fleqn}[0pt]
\setlength{\jot}{6pt}
\begin{align*}
&\int f(x) \ldots \mbox{long expression here} \ldots dx = F(x) + C \\
&\int f(x) \ldots \mbox{long expression here} \ldots dx = F(x) + C \\
&\int f(x) dx = F(x) + C &&\int f(x) dx = F(x) + C \\
&\int f(x) \ldots \mbox{long expression here} \ldots dx = F_1(x) + C =  \\
\end{align*}
\end{fleqn}


First I'm not satisfied, I can't set the point of alignment with 2 equations in one line and I can't align the equations on the equal sign. Most environment (tabular, tabbed, split,...) do only one job and when I try to mix them I always get some errors.

Second I would like to create a new environment with

\newenvironment{mathtable}
{ \begin{fleqn}[0pt] \setlength{\jot}{6pt} \begin{align*} }
{ \end{align*} \end{fleqn} }


But it show me an error, it seems I can't use align inside newenvironment. Did a lot of research, used the environ package, used \csname and so on, but I don't know how to build this environment.

-
The amsmath documentation documents that in an environment definition you need to use the \align \endalign forms not \begin{align} \end{align} –  David Carlisle Sep 19 '12 at 16:43
But then I have a generic error on \begin{fleqn}... –  ColOfAbRiX Sep 20 '12 at 10:39
it's possible that the aligned environment of amsmath might be helpful, since it's meant to be embedded within another environment. –  barbara beeton Sep 24 '12 at 14:26
There is no fleqn environment. –  egreg Oct 13 '12 at 15:39
@egreg: There is a fleqn environment with \usepackage{nccmath}. –  Mafra Dec 6 '12 at 0:00

You give too little information for giving advice about the first point.

For what concerns the second point, here's how you can define your mathtable environment:

\documentclass{article}
\usepackage{nccmath}
\newenvironment{mathtable}
{\fleqn[0pt] \setlength{\jot}{6pt} \csname align*\endcsname}
{\csname endalign*\endcsname\endfleqn}

\begin{document}

\begin{mathtable}
&\int f(x) \ldots \mbox{long expression here} \ldots dx = F(x) + C \\
&\int f(x) \ldots \mbox{long expression here} \ldots dx = F(x) + C \\
&\int f(x) dx = F(x) + C &&\int f(x) dx = F(x) + C \\
&\int f(x) \ldots \mbox{long expression here} \ldots dx = F_1(x) + C =  \\

One can't use \begin{foo} and \end{foo} in the definition of a new environment, when foo is the name of an amsmath alignment environment. So one has to use the forms \foo and \endfoo in their places (or \csname foo*\endcsname and \csname endfoo*\endcsname for the *-variants).