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.
\begin{align}
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}
\label{12}
\end{align}
The actual equation portion appears to be fine, but I get an error when using \align
and label
to number.
align
here there is only one line and no alignment points (&
) ?\begin{align}
and\end{align}
\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.