Ask Your Question
0

How can math equations be left-aligned in Github markdown using MathJax?

asked 2022-12-17 11:00:00 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-07-15 08:00:00 +0000

ladyg gravatar image

You can left-align math equations in Github markdown using MathJax by adding the following code before the equation:

```{=latex} \begin{aligned}


And then adding the following code after the equation:

```{=latex}
\end{aligned}

For example, consider the following equation:

$$f(x) = \frac{1}{x^2 + 1}$$

To left-align this equation using MathJax, you can modify the code as follows:

```{=latex} \begin{aligned} f(x) &= \frac{1}{x^2 + 1} \ &= \frac{1}{(x+i)(x-i)} \end{aligned}


This will produce the following left-aligned equation using MathJax:

\begin{aligned} f(x) &= \frac{1}{x^2 + 1} \ &= \frac{1}{(x+i)(x-i)} \end{aligned} ```

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-12-17 11:00:00 +0000

Seen: 9 times

Last updated: Jul 15 '21