On Sun, 26 Aug 2007, WN wrote:
> Aditya,
>
> This confuses me, I thought when using 3 columns I have to set n=3 otherwise
> I get errors about extra tab found etc.
> However doing as you suggested, seems to work.
This is due to the m key. m=2 tells context that there are two blocks
of equations. n=2 says that each block has two columns. So, in all
there should be n*m = 4 \NC in the equation (I had only put three,
which led to the wrong equation number alignment).
> Then another question, the formula numbering is not aligned with the other
> formula's in my text
> like in the code below. How can I force the sub formula numbering to be right
> aligned ?
See above: This was due to mistake in my code. This works. (Though it
will be nice if such mistakes do not cause these kinds of errors)
\def\ms{\,}
\starttext
\placeformula[calcb-chapter4-eqn2]
\startformula
f(x) = \sum_{n = - \infty}^{+\infty} c_{n} e^{\displaystyle i n
\frac{\pi}{L} x} \quad \text{,} \quad c_{n} = \frac{1}{2L}
\int\limits_{-L}^{L} f(x) \ms e^{- \displaystyle in\frac{\pi}{L} x }
dx
\stopformula
Formula number is not right aligned with the previous formula
\placesubformula
\startformula
\startalign[n=2,m=2,distance=2em]
%\startalign[n=3]
\NC f(x) \NC = \frac{1}{2\pi} \int\limits_{-\infty}^{+\infty} g(y) \ms
e^{i y x} \ms dy \NC\NC (x \in \reals) \NR[calcb-chapter4-eqn5:i][i]
\NC g(y) \NC = \int\limits_{-\infty}^{+\infty} f(x) \ms e^{-i y x} d x
\NC\NC ( y \in \reals) \NR[calcb-chapter4-eqn5:ii][ii]
\NC \int\limits_{-\infty}^{+\infty} |f(x)|^{2} dx \NC =
\frac{1}{2\pi}
\int\limits_{-\infty}^{+\infty} \Big| g(y) \Big|^{2} \ms d y \NC\NC
\quad
\NR[calcb-chapter4-eqn5:iii][iii]
\stopalign
\stopformula
\stoptext
Do you know about subformulas? For example,
\setupsubformulas[conversion=romannumerals]
\def\ms{\,}
\starttext
\startsubformulas[calcb-chapter-4-eqn5]
\placeformula
\startformula \startalign[n=2,m=2,distance=2em]
\NC f(x) \EQ \frac{1}{2\pi} \int\limits_{-\infty}^{+\infty} g(y) \ms
e^{i y x} \ms dy
\NC\NC (x \in \reals)
\NR[calcb-chapter4-eqn5:i]
\NC g(y) \EQ \int\limits_{-\infty}^{+\infty} f(x) \ms e^{-i y x} d x
\NC\NC ( y \in \reals)
\NR[calcb-chapter4-eqn5:ii]
\NC \int\limits_{-\infty}^{+\infty} |f(x)|^{2} dx
\EQ \frac{1}{2\pi} \int\limits_{-\infty}^{+\infty}
\Big| g(y) \Big|^{2} \ms d y
\NC\NC
\NR[calcb-chapter4-eqn5:iii]
\stopalign \stopformula
\stopsubformulas
You can also refer to the whole equation~\in[calcb-chapter-4-eqn5], or
an individual number~\in[calcb-chapter4-eqn5:iii].
\stoptext
BTW, why no \ms before dx, and a \ms before dy?
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________