How to change alignment of displayed equations in IPython Notebook?

You could try including a css file. For example, this set of notebooks pulls in this css file (see the final cell in the notebook) which does explicitly set the displayAlign tag, although it sets it to center.


Use \begin{align} and \end{align}. This does not exactly answer the question but it has the desired effect. For example try:

$
\begin{align}
\frac{1}{2} \times \frac{3}{2} = \frac{3}{4}
\end{align}
$

The above renders exactly the same as,

$$
\frac{1}{2} \times \frac{3}{2} = \frac{3}{4}
$$

except that it is left justified.

This approach has the added advantage that other alignments can be be added, as in:

$
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$

This last code block is from Motivating Examples in the Jupyter Notebook docs.

Other examples of aligning equations can be found here Aligning several equations


In Jupyter lab, I find that using a single $ left aligns, whereas double $ centers the equations

$
\begin{align}
c & = (0,\mu)+(a,b)\\
& =(a, b+\mu)
\end{align}
$

is left aligned whereas

$$
\begin{align}
c & = (0,\mu)+(a,b)\\
& =(a, b+\mu)
\end{align}
$$

is centered