Enable Obsidian to display multiple-line math equations with double dollar signs directly

display multiple-line math equations

As a new user, I want to display multiple-line math equations with double dollar signs, as follows

$$
a\\
b
$$

It is supported in many markdown editors, typora, quiver, leannote…

instead of using align envieronemnt.

Things I have tried

Following is also not supported.

\[
a\\
b
\]

It’s currently supported, are you sure you didn’t forget a dollar sign? Because for me it currently works with this:

$$
a\\
b
$$

I want to show it with two lines: i.e. ‘a/nb’

but you see

Have you tried Reading view?

If you want a fraction, it’s like this :

$$
\frac{a}{b}
$$

thank you. but it is not a fraction, it is an two-line equation

Yes. Both reading view and editing view

PS: OS = MacOS10.15; Obsidian = latest

So I really don’t understand what you’re trying to achieve. Can you show a picture of what you would expect to have ?

Here are two variants for showing multi-line equations using MathJax within Obsidian:

$$
\begin{matrix}
E = mc^2 \\
a^2 + b^2 = c^2
\end{matrix}
$$

Or alternatively, if you want them aligned on the equal sign (or similar):
$$
\begin{eqnarray}
E &=& mc^2 \\
a^2 + b^2 &=& c^2
\end{eqnarray}
$$

These will show as:

Notice the difference in the latter that here they’re aligned on the equal sign ( or more precisely what’s inbetween the ampersands, &, in the text).

If you’re interested, see also mathjax - How to create multi-line equation blocks in GitHub? - Stack Overflow for some more related informations (although I’m not entirely sure all of that applies for the rendition of MathJax that Obsidian implements, but I believe it’s quite close).