datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
750 stars 92 forks source link

multiline formula support #556

Closed miptctx closed 9 months ago

miptctx commented 10 months ago

Latex has multline option to render formulas on few lines. Obsidian also support this option but flowershow doesn't. For example, this works in obsidian:

$$
\begin{multline}
some\ very\ very\ very\ very\ very\ very\ very\ very\ very\ very\ very\ very\ \\
very\ very\ very\ very\ very\ very\ very\ very\ long\ formula
b=c
\end{multline}
$$

And obsidian will draw such view: image

But flowershow will not process this option correctly and it will make such view: image

At the same time the split options works in flowershow, but this option does not render formula such perfect line multline does:

$$
\begin{multline}
some\ very\ very\ very\ very\ very\ very\ very\ very\ very\ very\ very\ very\ \\
very\ very\ very\ very\ very\ very\ very\ very\ long\ formula
b=c
\end{multline}
$$

This will give such view in flowershow: image

Is it possible to add multline support?

Thanks.

olayway commented 9 months ago

@miptctx Unfortunately, it's not possible to add support for it. Flowershow uses KaTeX library to render LaTeX in the browser, and while it's primarily designed for LaTeX it doesn't support all the LaTeX syntax due to it's focus on performance.

But thank you so much for flagging this! Thanks to you, I realized the equations weren't even styled properly as I forgot to import KaTeX styles 🤦‍♀️.

olayway commented 9 months ago

@miptctx also, here is the full list of all supported functions: https://katex.org/docs/support_table