4
\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.

0

1 Answer 1

5

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}
5
  • Thank you. I am using amsart? Is not amsmath a built-in package?
    – Yes
    Jun 19, 2015 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, 2015 at 4:08
  • No problem; thank you for taking time to write.
    – Yes
    Jun 19, 2015 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, 2015 at 4:13
  • @Mico Thank you for your advice. I updated the answer.
    – Merzong
    Jun 19, 2015 at 4:18

Not the answer you're looking for? Browse other questions tagged .