[Tex/LaTex] What does Misplaced \cr in latex error mean


What does it mean

! Misplaced \cr.
\math@cr@@@ ->\cr 
In latex error.

in this document

     \begin{pmatrix }
    \int_0^1 f(s) ds  \\
    int_0^\om g(s) ds 


Best Answer

Your example generates

! LaTeX Error: Environment pmatrix   undefined.

because of the spurious space in \begin{pmatrix } and

! Undefined control sequence.

because \om is not defined.

It does only generates the error in the subject line if you ignore those errors and let TeX recover. Subsequent errors are nearly always spurious.

In this case \cr is the TeX primitive for a new line in an aligment which is used in the definition of \\. because the inner pmatrix did not start because of the first error, TeX takes the \\ as ending the outer alignment row inside the group, which is an error.