Take the 2-minute tour ×
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.

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

1 Answer 1

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.