goessner / mdmath

LaTeX Math for Markdown inside of Visual Studio Code.
MIT License
751 stars 56 forks source link

Support for MathJax #22

Closed RoyiAvital closed 7 years ago

RoyiAvital commented 7 years ago

Hello,

Any chance to add support for MathJax? Namely the user will be able to switch between KaTeX and MathJaX?

There are many features KaTeX lacks and MathJaX supports.

Thank You.

goessner commented 7 years ago

Hi,

I am a bit reluctant to integrate MathJax parallel to KaTeX, because of performance, since every keystroke in markdown editor renders the whole document again and again.

I am open to be able to switch renderer s though. But first on my list is AsciiMath. Maybe I test integration possibilities of MathJax in future. Maybe also, you consider to help here .. ?

Thanks.

RoyiAvital commented 7 years ago

Hi,

Of course I meant choice between and not having them both at once. I can tell, based on my experience with StackEdit, that MathJaX can work very fast and much better then KaTeX which lack many features.

I wish I could assist. My programming knowledge is limited to MATLAB.

What about borrowing it from StackEdit?

JohnTasto commented 7 years ago

@RoyiAvital The extension "Markdown Preview Enhanced" (VSCode, GitHub, Docs) allows you to choose between KaTeX and MathJax.

RoyiAvital commented 6 years ago

@JohnTasto , I will give it a try. Though it seems an overkill for my needs.

All I need is mdmath to have MathJaX support in addition to KaTeX and allow mode with spaces ($ ... $ and $$ ... $$).

goessner commented 6 years ago

@RoyiAvital ,

just a hint ... once you integrated MathJax into https://github.com/goessner/markdown-it-texmath, having it in mdmath also is a nobrainer.

I won't do it, as mdmath serves my personal needs very well and other projects of mine have a lot higher priority.

thanks

RoyiAvital commented 6 years ago

@goessner , Had I known to to write Hello World in JavaScript I'd would have done it.
You have many users and some of them are asking for this. I'm a user and unfortunately not able to contribute in code. If there was a place to contribute in PayPal money I'd contribute in that manner.

I understand KaTeX features are enough for you. Yet many students like me need a little bit more and VS Code + mdmath can be the perfect companion for Students doing research in the fields which require a lot of math.

Is there anything else I / Users can do to persuade you looking into it? MathJaX as opposed to KaTeX doens't need a parser. It can work on the HTML itself so integrating it might be easier?

Thank You.

goessner commented 6 years ago

@RoyiAvital:

RoyiAvital commented 6 years ago

@goessner , I know the "Big Resource" page (If you see I edited it few months ago). Let me point few remarks:

Thank You.

goessner commented 6 years ago

@RoyiAvital: 3 last points here ... :

RoyiAvital commented 6 years ago

@goessner , As I wrote, MathJaX on StackEdit was on version v4. On v5 the developer moved to KaTeX.

I have no idea how to do integrate MathJaX into VS Code. I only know how to program in MATLAB / Python / Julia. I'm EE student (Image / Signal Processing, Machine Learning) in other field and unfortunately have no idea on the workings of VS Code.

I only managed to make MathJaX work in this project - https://github.com/mike-ward/Markdown-Edit/wiki/13.-Templates (Wiki I wrote on how to enable MathJaX). I thought VS Code would be similar (Just changing the HTML Header of the HTML Page Template).

I'm not sure the point here is to persuade you use MathJaX as clearly you're satisfied with KaTeX. I'm just saying that for many users MathJaX will offer great advantage while the its disadvantage are something easy to live with.
So basically all I'm asking it adding:

  1. Choice of Math Rendering Engine - KaTeX (Default) / MathJaX.
  2. LaTeX Mode (Off by Default) which renders $ ... $ (Mind the spaces) (Wrote option for \$ as in LaTeX above).

Unfortunately, the only way I can support this is by testing and donation and not coding.

As written above, many engines (krmadown / Jupyer) chose MathJax and supporting the rendering as suggested. It seems their users (Which, profile wise, are like your extension) can handle the edge cases.

Thank You.

youqad commented 6 years ago

I'd also really appreciate having MathJax instead of (or along with) KaTeX. I can't use StackEdit anymore because of KaTeX, which doesn't support the MathJax features I need :-(

bika-c commented 2 years ago

@RoyiAvital @goessner, hey guys, finally it is the day. Last time I checked, MathJax3 is now now 3-4 times faster then KaTex on my Safari according to this page mentioned by @goessner.

bika-c commented 2 years ago

Can we reopen this issue? plz 🙏