Align (or aligned) in LaTeX

Hello,

Really struggling working without functionality to align equations in TeX. I found an old forum post

suggesting that “aligned” works, while “align” doesn’t. But I can’t get either to work.

I am using display mode ($$). I’ve tried both align and aligned. I’ve also tried pasting Tobias’ example from the above post:

$$
\begin{aligned}
\frac{\partial l_n}{\partial w}&=-[\frac{y_n}{\sigma(z)}\sigma’(z)x - \frac{1-y_n}{1-\sigma(z)}\sigma’(z)x] \
&= \frac{\sigma(z)-y_n}{\sigma(z)[1-\sigma(z)]}\sigma’(z)x \
\end{aligned}
$$

and it didn’t work.

Did this feature get removed?

Hi @tc0622, welcome to the Supernotes Community! :raised_hands:

Seems like you’re missing a second slash on the second line to denote a line break, so it’s appearing altogether rather than on separate lines.

$$  
\begin{aligned}  
\frac{\partial l_n}{\partial w}&=-[\frac{y_n}{\sigma(z)}\sigma’(z)x - \frac{1-y_n}{1-\sigma(z)}\sigma’(z)x] \\
&= \frac{\sigma(z)-y_n}{\sigma(z)[1-\sigma(z)]}\sigma’(z)x \  
\end{aligned}  
$$

Is that what you’re looking for?

Still no luck…

Hi @tc0622, what about if you finish the card? :wink:

Currently the inline LaTeX preview doesn’t render aligned equations but I’ve made a note for us to look into adding this.

Ahh. My bad… I forgot that live preview isn’t always a thing.

Thanks!

Blocks should now work in the editor’s LaTeX preview, as of Supernotes 3.1.8 :+1:

1 Like