Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Align math equations left in Github markdown/mathjax

How can I align math equations to the left in Github markdown syntax? My attempt using "align" doesn't work. My equations are always centered horizontally.

$$
\begin{align}
sin⁡(α)={opposite \over hypotenuse}={h0 \over c}={h2 \over b}
\end{align}
$$

EDIT: Issue posted to GitHub at https://github.com/github/markup/issues/1570

like image 765
sw1337 Avatar asked Oct 16 '25 19:10

sw1337


1 Answers

The Math support in Markdown is fairly recent (May 2022) and the block expression syntax $$ seems to always render a centered result.

You might need to consider an inline expression syntax instead.

$\sqrt{3x-1}+(1+x)^2$     <=== # two trailing whitespace
$\sqrt{3x-1}+(1+x)^2$

For a bigger size, using as a workaround the title header ##:

## $\sqrt{3x-1}+(1+x)^2$     <=== # two trailing whitespace
## $\sqrt{3x-1}+(1+x)^2$
like image 185
VonC Avatar answered Oct 19 '25 12:10

VonC