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
\]
Anwen
December 26, 2023, 9:59am
2
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?
1 Like
Anwen
January 16, 2024, 2:37pm
5
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
Anwen
January 22, 2024, 8:33am
8
So I really don’t understand what you’re trying to achieve. Can you show a picture of what you would expect to have ?
holroy
January 22, 2024, 10:33am
9
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).
2 Likes
system
Closed
April 21, 2024, 10:34am
10
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.