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

Possible Duplicate:
Separate long math text under sum symbol into different lines?

I'm trying to produce a product which has two subindices. Like this:

\[ \phi_n(X)=\prod_{z\in \mu_n \\ z \textup{primitive}} (X-z) \]

That doesn't work: the \\ is not recognized.

share|improve this question

marked as duplicate by Caramdir, Martin Scharrer Mar 27 '11 at 18:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

See if tex.stackexchange.com/questions/12344 explains what you need. – Andrey Vihrov Mar 27 '11 at 17:15
Wonderful, that's exactly what I needed. I guess I didn't search using the correct terms. Thanks! – Bruno Stonek Mar 27 '11 at 17:18
If the above linked question solved your problem this question should be closed as duplicate. I can do that if you don't mind. – Martin Scharrer Mar 27 '11 at 17:58

The line break \\ doesn't work inside math like that. You can use e.g. \shortstack to stack the indices:


\[ \phi_n(X)=\prod_{\shortstack{$\scriptstyle z\in \mu_n $\\$\scriptstyle z \textup{primitive}$}} (X-z) \]

share|improve this answer
What's the difference between this and \prod_{\substack{z\in \mu_n \\ z \textup{ primitive}}} (X-z) ? – Bruno Stonek Mar 27 '11 at 17:23
@Bruno: I didn't now \substack before. It seems to be the better solution. The \shortstack macro is however also useful in other situations (e.g. textmode) where things have to be stacked. – Martin Scharrer Mar 27 '11 at 17:25

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