vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
813 stars 129 forks source link

Add support for KaTeX #430

Closed thekalinga closed 6 years ago

thekalinga commented 7 years ago

Currently there is no way to write math formulas in markdown documents.

If you add support for KaTeX, it will be much easier for people to mix markdown with LaTeX.

KaTeX performs far better than MathJax.

Source

vsch commented 7 years ago

@thekalinga, support for LaTeX in markdown depends on the final markdown processor and adding it to the plugin will not help unless the plugin is used to generate the final HTML. This is the reason I have not been able to settle on a LaTeX implementation.

The plugin does allow for processor independent way of displaying LaTeX using a web service in an image URL:

![alt](http://latex.codecogs.com/gif.latex?
\begin{align*}
x^2 + y^2 &= 1 \\
y &= \sqrt{1 - x^2} \\
\end{align*}
"Image Title")

GitHub does not display such elements however, the Markdown to HTML intention can be used to convert it to HTML:

image

Result is an HTML element that is processor independent:

<img src="http://latex.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D%0Ax%5E2%20%2B%20y%5E2%20&amp;=%201%20%5C%5C%0Ay%20&amp;=%20%5Csqrt%7B1%20-%20x%5E2%7D%20%5C%5C%0A%5Cend%7Balign*%7D%0A" alt="alt" title="Image Title" />

Which displays as: alt

The HTML can be converted back to Markdown for modification using an intention:

image

thekalinga commented 7 years ago

Did u check this?

https://github.com/mjbvz/vscode-markdown-katex

One of the developer on vscode added support for katex (on experimental basis)

Not sure if this will be on any help..

vsch commented 7 years ago

@thekalinga, the issue with adding LaTeX support to the plugin is the decision on which syntax to use since GitHub does not support LaTeX and there is no standard yet for this extension.

Since the plugin is used for GitHub preview with a few users using it for Jekyll projects I would lean more towards using a Jekyll compatible implementation so it is at least usable for some user's application processors.

vsch commented 6 years ago

@thekalinga, added GitLab Flavoured Markdown parsing and rendering functionality

EAP update with a fix for the issue is available.

To enable EAP update channel:

  1. Select "Early Access Program" in Check updates for:
  2. Then make the IDE check for updates.

Screen Shot Settings Update Channel

jsinkers commented 4 years ago

Wondering if there is support (or likely to be) for math with katex using $ $ and $$ $$ delimiter syntax? This would be enable me to get markdown preview + pandoc + jekyll all working happily together. Or maybe I'm missing a better approach?