Closed Yue-Zhengyuan closed 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
I'm sorry that we're having trouble in releasing a new version. #966
@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?
relationship
The math support essentially involves 3 parts:
Rendering: Compile LaTeX expressions to HTML.
Our fork of markdown-it-katex
: https://github.com/yzhang-gh/vscode-markdown/issues/943#issuecomment-844117075
Highlighting: Tokenize and stylize the text in editor.
TextMate grammar.
Completion: IntelliSense for LaTeX commands.
A naive CompletionItemProvider
.
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
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 forCD
environment, for example. Hope that it will be updated soon.