yzhang-gh / vscode-markdown

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

Support theorem environment #1094

Open dualer opened 2 years ago

dualer commented 2 years ago

Proposal

Can you add some basic support for theorem environment? E.g.

::: {.theorem #label name="name"}
math: $\pi$

or

<div class="theorem" data-attribution="name">\label{label}
math: $\pi$
<\div>

Then, I can use pandoc to get the beautiful pdf document. More details see this.

References

yzhang-gh commented 2 years ago

Well, this is too specialized a kind of syntax. Please see https://github.com/yzhang-gh/vscode-markdown#q-which-markdown-syntax-is-supported for more information about how we support additional Markdown syntaxes.

:::-like syntax is supported by markdown-it-container and a VS Code extension.

{.class}-like syntax is supported by markdown-it-attrs.

Apparently the "theorem" syntax is still out of the scope of the above two extensions. You need to find (or write) a markdown-it plugin to support it.