markup
markup copied to clipboard
LaTeX `\\` requires escaping
\\ is often used to indicate matrix rows. It currently works at the end of a line:
$$
\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}
$$
$$ \begin{bmatrix} 1 & 2 \ 3 & 4 \end{bmatrix} $$
however it doesn't work in the middle
$$
\begin{bmatrix}
1 & 2 \\ 3 & 4
\end{bmatrix}
$$
$$ \begin{bmatrix} 1 & 2 \ 3 & 4 \end{bmatrix} $$
Escaping backslashes as in \\\\ helps, but I believe this is not expected.
I think it doesn't work in the middle in order to guarantee readability
Also the \, command escaping backslash. This command is used to introduce some extra space. The workaround is to write it as \\,.
\int f(x)\,x\mathrm{d}
is rendered as
$$ \int f(x),\mathrm{d}x $$
But should be rendered as
$$ \int f(x)\, \mathrm{d}x $$