I am trying to add a block equation to my paper with an equation number 12. When I try the following in https://www.codecogs.com/latex/eqneditor.php, I get an invalid equation error.

I am new to LaTeX, so this may be entirely bad form.

L(\theta; y) = \prod\limit_{j=1}^n (\theta_j e^{-\theta_j y_j})^{\delta_j}(e^{-\theta_j y_j})^{1 - \delta_j}

The actual equation portion appears to be fine, but I get an error when using \align and label to number.

  • It would be much easier to debug if you made the example a complete small document that generated the error. also why are you using align here there is only one line and no alignment points (&) ? Nov 27, 2015 at 17:34
  • 1
    put it into the editor without the \begin{align} and \end{align}
    – user2478
    Nov 27, 2015 at 17:39
  • 1
    That site assumes you're already in mathmode, so the \begin{align} and \end{align} are unnecessary. Another thing: you can use semantic labels, e.g. \label{likelihood}, and refer to them with \ref{likelihood}; LaTeX will assign numbers automatically, and so you don't have to manually renumber everything if you add, remove, or rearrange text. Nov 27, 2015 at 17:50

1 Answer 1


The error is

! Undefined control sequence.
<argument>  L(\theta ; y) = \prod \limit 

as the command is \limits with an s although it would be more normal to use the default setting here so just delete \limit.

Note you should not use align unless it is a multiple line equation on which you want to align some operators. A one line equation should use equation.

You must log in to answer this question.

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