TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

The Plain TeX

$$ \sum_{i \in S \atop j \in T} i $$

seems to be usually typeset mathematically in LaTeX using the \substack macro from the AMS maths macros (accessed using \usepackage{amsmath})

\[ \sum_{\substack{i \in S\\ j \in T}} i \]

which gives slightly different results, most importantly in that the subscripts are scriptsized in the latter, but scriptscriptsized in the former.

Results like these can be obtained in ConTeXt using matrices, e.g.:

    \NC \scriptsize i \in S \NR
    \NC  \scriptsize i \in T \NR

But this is clunky (not to mention my code above giving ugly spacing) and defining a macro to do this risks being ad hoc. Is there an attractive and idiomatic way to do this in ConTeXt? I'd be most interested in a reasonably well-established way of translating AMS maths into ConTeXt.

share|improve this question
up vote 5 down vote accepted

You can use \startsubstack … \stopsubstack. The mathalign manual for a more detailed description and examples of this command.

      i \in S \NR
      i \in T \NR
share|improve this answer
Good - that looks much better. It's funny that searching the contextgarden.net wiki for substack did not come up with that. – Charles Stewart Dec 10 '12 at 14:33
Feel free to improve it, it's wiki! – Marco Dec 10 '12 at 15:18
I've created a stub: wiki.contextgarden.net/Command/startsubstack . Be cool if somebody could add a description, possibly expand the See Alsos. – Esteis Dec 11 '12 at 12:07

Your Answer


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.