TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get a nested alignment in math mode:

+----------------------------------------------------------------+
| ..... & ................                                       |
|       +--------------------------------------------------+     |
|       | ..... & .................                        |     |
|       |         .............................            |     |
|       +--------------------------------------------------+     |
+----------------------------------------------------------------+

Using

\startformula
  \startalign
    \NC ..... \NC ................ \NR
    \NC       \NC \startalign
              \NC ..... \NC ................. \NR
              \NC       \NC .............................
              \stopalign
  \stopalign
\stopformula

does not produce the desired result.

How can I achieve this alignment?

share|improve this question
2  
ConTeXt does not have an equivalent of amsmath's aligned environment; but the matrix environment should do what you want. Have a look at Section 9.3 of Using \startalign – Aditya Jul 12 '12 at 20:57
    
@Aditya: thanks! That did it. – Marko Jul 13 '12 at 15:14
up vote 5 down vote accepted

Based on Aditya's response I am now using

\starttext
\definemathmatrix
  [aligned]
  [n=2,distance=0pt,align={right,left},style=\displaystyle]

  \startformula
    \startalign
      \NC .... = \{ \NC ............. \NR
      \NC           \NC \startaligned
                          \NC |.........: \NC .................. \NR
                          \NC             \NC \land .........    \NR
                        \stopaligned \NR
      \NC \} \NC
    \stopalign
  \stopformula
\stoptext

which gives me precisely the layout I wanted.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.