2

This question already has an answer here:

\documentclass{amsart}
\begin{document}
\[
\prod_{k=0,\ k\neq i}^{n}
\frac{x-c_{k}}{c_{i}-c_{k}}
\]
\end{document}

I would like to make the k \neq i, which is next to k=0, parallel to k = 0. I tried \\, \limits, and \begin{align*} ... \end{align*}, but somehow I did not get the desired result out of the actions.

marked as duplicate by Mico math-mode Jun 19 '15 at 4:16

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.

3

You should use \substack, with which you can make a multiline subscript or superscript. Note that you need to load amsmath package to use the command.

\documentclass{amsart}
\begin{document}
\[
\prod_{\substack{k=0\\ k\neq i}}^{n}
\frac{x-c_{k}}{c_{i}-c_{k}}
\]
\end{document}
  • Thank you. I am using amsart? Is not amsmath a built-in package? – Megadeth Jun 19 '15 at 4:07
  • @Chou I noticed you used amsart documentclass. Then, you don't need to write usepackage{amsart} in the preamble. – Merzong Jun 19 '15 at 4:08
  • No problem; thank you for taking time to write. – Megadeth Jun 19 '15 at 4:10
  • You should aim to make the answer code compilable and self-contained. If nothing else, that'll save you from having to address follow-up questions of the type above. In the case of your code, it would suffice to insert the instruction \documentclass{amsart} at the start of the code block. – Mico Jun 19 '15 at 4:13
  • @Mico Thank you for your advice. I updated the answer. – Merzong Jun 19 '15 at 4:18

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