4 ms·
> For example you need to escape the backslashes, so it takes 4 backslashes to make a newline in your matrix. > $$\begin{bmatrix} a & b \\\\ c & d\end{bmatrix}
by thaumasiotes 5y ago
> For example you need to escape the backslashes, so it takes 4 backslashes to make a newline in your matrix.
> $$\begin{bmatrix} a & b \\\\ c & d\end{bmatrix}$$
This example doesn't make sense. You need to escape the backslashes in the end-of-row command \\, but you don't need to escape the backslashes in \begin and \end?
The post clearly shows that backslashes in \left, \right, \sum, and \sqrt do not need to be escaped. What's different about \\?
- dllu 5y agoNo idea, but if you have only two backslashes instead of four, the matrix would appear as a single row, like [a bc d]. That said, \\begin renders the same as \begin.
- thaumasiotes 5y agoOh, this is an experimental result? You've found a bug in Github's parser. You should call it a "bug", not an "annoyance".
- fn-mote 5y agoThis is a pretty aggressive tone. I don't think it's warranted. As a data point: I have the same experience using MathJax in my own blog (Hugo, Goldmark markdown engine), so I'm assuming there's some structural reason for it, not blaming Github.
- xigoi 5y agoMaybe in GitHub Markdown, backslashes have to be escaped only if they could be interpreted as an escape character?