Skip to content

Instantly share code, notes, and snippets.

@jesshart
Last active March 13, 2023 12:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesshart/8dd0fd56feb6afda264a0f7c3683abbf to your computer and use it in GitHub Desktop.
Save jesshart/8dd0fd56feb6afda264a0f7c3683abbf to your computer and use it in GitHub Desktop.
LaTeX matrix in GitHub

This Does Not Work
$\begin{bmatrix}X\Y\end{bmatrix}$

This Does
See how using the math "language" for syntax renders what you want.

This is the code:

```math
\begin{bmatrix}X\\Y\end{bmatrix}
```

This is how it renders:

$$\begin{bmatrix}X\\Y\end{bmatrix}$$
@LdDl
Copy link

LdDl commented Mar 13, 2023

Another workaround to place new lines

$$x_{k} = \begin{bmatrix}
x_{k} \\
x'_{k}
\end{bmatrix} = \begin{bmatrix}
x_{k-1} + x'_{k-1}\Delta t + \frac{x''_{k-1}(\Delta t^2)}{2} \\
x'_{k-1} + x''_{k-1}t
\end{bmatrix} \tag{15}$$

$$x_{k} = \begin{bmatrix}
x_{k} \
x'{k}
\end{bmatrix} = \begin{bmatrix}
x
{k-1} + x'{k-1}\Delta t + \frac{x''{k-1}(\Delta t^2)}{2} \
x'{k-1} + x''{k-1}t
\end{bmatrix} \tag{15}$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment