# Why does this prod_ render in Jupyter but as PDF with texlive?

In a Jupyter notebook, I have

$$P' = \prod_\nolimits{i=0}^{m-1} \frac{(s-i)}{s}$$


which renders correctly (to me) in Jupyter as When I render the notebook as PDF, I get this on the console:

! Missing { inserted.
\nolimits
l.558 $P' = \prod_\nolimits {i=0}^{m-1} \frac{(s-i)}{s}$
?
! Emergency stop.
\nolimits
l.558 $P' = \prod_\nolimits {i=0}^{m-1} \frac{(s-i)}{s}$


I can't tell what's wrong and and various attempts to wrap prod_ arguments in {} have not been successful.

I'm using texlive 2018.20190227-1 from Ubuntu 19.04 and jupyter 4.4.0.

• The correct syntax is $$P' = \prod\nolimits_{i=0}^{m-1} \frac{(s-i)}{s}$$. In Jupyter it works because Jupyter doesn't use a proper TeX engine to render it. – Phelype Oleinik Jun 22 at 18:18
• Welcome to tex.sx. – barbara beeton Jun 22 at 19:49
• That's it @PhelypeOleinik. If you write as an answer, I'll accept it. Thanks! – Reece Jun 23 at 16:56
• @Reece Done! Reading your question again I notice you say \prod_, so (forgive me if I'm wrong) I think you understand \prod_ as an operator. The operator is actually just \prod. The _ symbol in TeX (usually) indicates that what follows is the lower limit of the operator (or subscript) and the ^ is the same for the upper limit (or the superscript), and they can be given in any order (for example \prod_a^b and \prod^b_a both produce the same) or not at all (for example \prod_a or \prod^b or even just \prod are all valid). – Phelype Oleinik Jun 23 at 19:20

Jupyter uses MathJax to render the formulas you type, and it is a well known fact that MathJax tries to emulate the behaviour of TeX but it just can't because it's not TeX, so some things that should not work end up working by accident (or not) and the other way around as well.

MathJax allows you to put \nolimits anywhere after the operator. All of these are valid in MathJax (tested at http://math.stackexchange.com): However The TeXBook says (emphasis mine):

You can change TeX's convention by simply typing \limits or \nolimits immediately after the large operator. For example, So the correct form is $$P' = \prod\nolimits_{i=0}^{m-1}\frac{(s-i)}{s}$$