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

enter image description here

When I render the notebook as PDF, I get this on the console:

! Missing { inserted.
<to be read again> 
l.558 \[P' = \prod_\nolimits
                            {i=0}^{m-1} \frac{(s-i)}{s}\]
! Emergency stop.
<to be read again> 
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.

  • 5
    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
  • 2
    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
  • 1
    @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):

enter image description here

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,

enter image description here

So the correct form is $$P' = \prod\nolimits_{i=0}^{m-1}\frac{(s-i)}{s}$$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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