jhuix / vscode-markdown-preview-showdown

A excellent markdown preview extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=jhuix.markdown-preview-showdown
Other
7 stars 1 forks source link

AsciiMath inline equation rendering issue #2

Closed sebi5361 closed 4 years ago

sebi5361 commented 4 years ago

With

```AsciiMath
y=f(x)

for *display math* and `` `@y=f(x)@` `` for *inline math*,
only *display math* is rendered properly in *vscode-markdown-preview-showdown*. See picture below:
![image](https://user-images.githubusercontent.com/18078043/95664246-36352180-0b46-11eb-90cc-13cc4eb9fde8.png)
jhuix commented 4 years ago

@sebi5361 Thanks for your feedback. Inline math of AsciiMath and LaTeX can be rendered properly in the current version of mdps, but the delimiters of inline math is \~...\~ for asciimath and $$...$$ for latex that cannot be allowed in the `...` delimiters for code.

sebi5361 commented 4 years ago

Thank you very much! Good to know. I guess there is no real standard for this and you had to make a clever choice, am I right?

jhuix commented 4 years ago

Thank you very much! Good to know. I guess there is no real standard for this and you had to make a clever choice, am I right?

Yes, there is no standard for inline math in markdown syntax, so all kinds of markdown parsers are custom private syntax.

sebi5361 commented 4 years ago

BTW: Really nice job!

jhuix commented 4 years ago

This issue has been enhanced by the >= 1.3.3 version, please try it.

Inline LaTex math syntax compatible with KaTex default delimiters: $$...$$ or \[...\] or \(...\).

Inline ascii math syntax is changed to @@...@@ or \~...\~.