A VSCode extension to render LaTeX formula in comment. Now you can use it in python.
This extension is modified from vscode-iconify and use markdown-it and markdown-it-mathjax3 to render formula.
You are supposed to write formula between $$
and $$
.
Now just support write formula in one-line comment in python.
Fonts in the image are from monaspace.
In
partial inline mode
, if the formula is too large(height is much higher than the line-height in your editor), hover the formula and you can find it's rendered in the message box, just like the second formula in the above example.
comment-formula.inlineColor
: The color of the rendered formula inline the editor. Default isauto
.comment-formula.messageColor
: The color of the rendered formula in message. Default isauto
.comment-formula.inline
: The inline mode of the rendered formula. Default ispartial
.all
: Render all formula in inline mode.none
: You can just hover on the formula to preview it.partial
: Render formula in inline mode if the formula isn't too large.
For example:
{
"comment-formula.inlineColor": "#667466",
"comment-formula.messageColor": "auto",
"comment-formula.inline": "partial",
}
- When you install or enable this extension, you may find that ms-python's connection to server got closed. Just restart VSCode and it will be fine.