How can I represent a matrix in Github markdown?
Asked Answered
P

1

9

I am trying to represent a basic vector, the following code works in Visual Studio Code.

I am using the following line $\begin{bmatrix}X\\Y\end{bmatrix}$

All whitespace removed. It should look like this,

enter image description here

However, when pushed to Github it does not render correctly and instead just renders to entire text letter for letter like it is unsupported. Does anybody know how to get get the following vector to display correctly?

Parallax answered 24/10, 2022 at 7:6 Comment(1)
Does this answer your question? LaTeX matrix not rendering correctly on Github MarkdownTetragon
F
4

just replace \\ with \\\

\vec{v} = \begin{bmatrix} X \\\ Y \end{bmatrix}

Firebrand answered 18/9, 2023 at 2:34 Comment(2)
I couldn't get the column separators of & to work though even with escaping attempts. I could only get it to work in a ```math blockInordinate
it works for me, thanksJepson

© 2022 - 2025 — McMap. All rights reserved.