yzhang-gh / vscode-markdown

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

Update KaTeX Version #981

Closed Yue-Zhengyuan closed 3 years ago

Yue-Zhengyuan commented 3 years ago

Proposal

Visual Studio Code now directly supports KaTeX equations in Markdown. The built-in KaTeX renderer is newer (0.13.0, latest), supporting some new features such the commutative diagrams (the CD environment, see this documentation for sample codes). However, VSCode still does not (seem to) support custom macros, KaTeX auto-completion, etc, so this extension is still useful. But the version of KaTeX of this extension is old (0.11.1), without support for CD environment, for example. Hope that it will be updated soon.

Lemmingh commented 3 years ago

Duplicate of #943

Please try the latest dev build, which includes KaTeX 0.13.11. https://github.com/yzhang-gh/vscode-markdown/blob/f560819acc2175691dd5d5d809e3329c50d18039/package.json#L519

See also

955

967

Lemmingh commented 3 years ago

I'm sorry that we're having trouble in releasing a new version. #966

memeplex commented 2 years ago

@Lemmingh Could you clarify what will be the relationship between this extension and upstream regarding LaTeX now that some features overlap (KaTeX, syntax highlighting)? Will the extension leverage the builtin KaTeX and highlighter or replace them instead?

Lemmingh commented 2 years ago

relationship

The math support essentially involves 3 parts:

Unfortunately, they are now implemented by 3 separate components, and I hope we'll be able to organize the internal into one provider.


Will the extension leverage the builtin KaTeX

No. We cannot due to incompatible design.


highlighter

If you're interested in VS Code's architecture of syntax highlighting:

I'd like to migrate to Semantic Highlighting as soon as possible, believing it's the appropriate way to provide syntax highlighting for Markdown. But I have no idea of removing the barrier.


replace them

Hard to say. It depends on VS Code's resolution logic.

Currently, our renderer contributed via extendMarkdownIt() can override the built-in vscode.markdown-math.

But the TextMate grammar contributed via injection goes conflicting: https://github.com/yzhang-gh/vscode-markdown/issues/1008#issuecomment-912735309