javalent / admonitions

Adds admonition block-styled content to Obsidian.md
MIT License
1.07k stars 70 forks source link

Admonition to Callout conversion converts block MathJax equations to in-line #238

Closed anzhulin closed 1 year ago

anzhulin commented 2 years ago

When converting Code Block Admonitions to Callouts, equations embedded in $$...$$ split across multiple lines becomes $...$ and is then rendered incorrectly.

Code Block Admonition: image Converted to Callout: image

J-MR-T commented 2 years ago

I would really like to see this fixed, I'm running into the same issue

sigrunixia commented 1 year ago

@J-MR-T and @anzhulin Are you both experiencing issues with this still?

J-MR-T commented 1 year ago

At the moment, I have just accepted the old codeblock syntax as legacy code in my vault, but I'll test it again later today, thanks for your interest in solving this :).

J-MR-T commented 1 year ago

Sorry, lost track of this, but now I've tested it, and the issue persists:

Original 'legacy' callout codeblock:

```ad-note
title: Definition: Example
1. A set: $\Omega=\set{\omega_1,\omega_2,\dots}$.
2. Every element $\omega_i$ gets a probability: $\Pr[\omega_i]$, we require $0\leq \Pr[\omega_i]\leq 1$ and
    $$
    \sum_{\omega\in\Omega}\Pr[\omega]=1
    $$
\```

Rendered: image

Converted:

> [!note] Definition: Example
> 1. A set: $\Omega=\set{\omega_1,\omega_2,\dots}$.
> 2. Every element $\omega_i$ gets a probability: $\Pr[\omega_i]$, we require $0\leq \Pr[\omega_i]\leq 1$ and
>   $
>   \sum_{\omega\in\Omega}\Pr[\omega]=1
>   $

image

The $$ environment gets converted to a single $.

sigrunixia commented 1 year ago

No problem on the delay and thank you! This is very helpful!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.