yzhang-gh / vscode-markdown

Markdown All in One
https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
MIT License
2.9k stars 324 forks source link

Math syntax (delimiter style) is not compatible with GitLab #570

Open toger5 opened 4 years ago

toger5 commented 4 years ago

Git lab requires $`19+1=20`$ but markdown all in one does not is expects $19+1=20$ .

yzhang-gh commented 4 years ago

There is no unified syntax for Math (in Markdown) so we probably can't have a good solution on this.

toger5 commented 4 years ago

Is it possible to provide it as an option in the vs code markdown renderer? math-syntax-flavor = {gitlab | basic}

yzhang-gh commented 4 years ago

It is a bit hard. We are currently relying on markdown-it-katex for math rendering.

NeroBurner commented 4 years ago

maybe we could switch to markdown-it-texmath

the texmath project provides a possibility to select the delimiter one wants to use

Screenshot_20200309_163919

on a fast check the texmath repo has more recent updates:

yzhang-gh commented 4 years ago

I would suggest Markdown+Math extension, from the author of markdown-it-texmath 😂.

NeroBurner commented 4 years ago

maybe invite @goessner to work together on one extension using markdown-it-texmath. Then you'd have one more developer, one less competing extension, more user option (specify inline math delimiter) and a very good connection to the backend developer

just a suggestion :man_shrugging:

yzhang-gh commented 4 years ago

I'm open to the collaboration of course. It just looks like Markdown+Math has already covered its target users (who need better math support), while this extension targets common Markdown users.

toger5 commented 4 years ago

what about users who want math support and the features if vscode-markdown. are they compatible?

yzhang-gh commented 4 years ago

I have added an option math.enabled. They should be compatible now (in terms of the VSCode's builtin preview).

(the dev build)

yxs commented 4 years ago

dev build is not accessible. Project not found or access denied. I try to access other projects such as https://ci.appveyor.com/project/benvanik/xenia and it's accessible.

yzhang-gh commented 4 years ago

It has been moved to https://github.com/yzhang-gh/vscode-markdown/actions/runs/64661491.

goessner commented 4 years ago

I implemented markdown-it-texmath intentionally as a standalone plugin for markdown-it-texmath usable with node.js and in browsers.

So if it serves the needs of you and your users ... go ahead and take it.

Thanks for your interest.

yzhang-gh commented 4 years ago

Thanks you @goessner. Your extension provides a very nice support of math in Markdown. Let's first see whether our two extensions can work seamlessly now. Further, we can also work together if integration is needed for better user experience.

goessner commented 4 years ago

Hmm ... I am totally happy with my mdmath vscode extension, so it doesn't need to work together with your extension from my point of view.

I only make an offer, that you can use my markdown-it plugin markdown-it-texmath in your vscode extension ... that's all. Of course you need to test for possible conflicts.

thanks

yzhang-gh commented 4 years ago

Hmm ... I am totally happy with my mdmath vscode extension, so it doesn't need to work together with your extension from my point of view.

I totally agree. I just wanted to say I'm willing to do something if collaboration would be needed 😅. I've made some changes to my plugin so that some users can use this one in parallel to mdmath. That's the solution I suggested earlier under this issue. Sorry for the confusion.

digitalmoksha commented 2 years ago

Just ran across this issue. Just fyi, we're working on adding $ and $$ support in GitLab, https://gitlab.com/gitlab-org/gitlab/-/issues/21757