# [NTG-context] linking to equations with leqalignno?

Otared Kavian otared at gmail.com
Sat Sep 4 23:29:11 CEST 2010

Hi Pau,

You should not use \leqaligno, but rather setup the location of the formulas' numbers to the left and then use \eqalign: the following works fine:

%%-------------
\setupformulas[location=left]

\define[1]\eqref{(\in[#1])} % this definition is optional…

\starttext

\placeformula[nohair]
\startformula
\eqalign{
- M^{}_{\bullet}a^{2}_{\bullet} = & M^{}_{2} = -
\frac{J^{2}_{1}}{M^{}_{0}} \,, \cr
- M^{}_{\bullet}a^{3}_{\bullet} = & J^{}_{3} =
\frac{M^{}_{2}J^{}_{1}}{M^{}_{0}}\,. \cr
}
\stopformula
As one may see from equation (\in[nohair]), we have\dots

It is more handy to use \type{\eqref}: as one sees in equation \eqref{nohair}, we have\dots
\stoptext
%%-------------
Consider also using the ConTeXt math alignment commands for which Aditya has written a very nice My Way:
http://dl.contextgarden.net/myway/mathalign.pdf

http://dl.contextgarden.net/myway/context-latex-math.pdf
Best regards: OK

On 4 sept. 2010, at 23:06, Pau wrote:

> Hello,
>
> I am a bit lost. I am using this format for an equation:
>
> -----------------------------------------------------------------
> \placeformula[nohair]
> \startformula
> \leqalignno{
> - M^{}_{\bullet}a^{2}_{\bullet} = & M^{}_{2} = -
> \frac{J^{2}_{1}}{M^{}_{0}} \,, \cr
> - M^{}_{\bullet}a^{3}_{\bullet} = & J^{}_{3} =
> \frac{M^{}_{2}J^{}_{1}}{M^{}_{0}}\,. \cr
>           }
> \stopformula
> -----------------------------------------------------------------
>
> but then,using  \in[nohair] to link to the equation in the text of the
> document does not work.
>
> I get a [??]
>
> I think this is related to leqalignno, because \in[] works fine without it.
>
> What should I do in this case?
>
> thanks,
>
> Pau