Comment Formula
Introduction
A VSCode extensions to preview LaTeX formulas within the lines of your editor.
Render Engine: MathJax
Feature
Usage
You are supposed to write formulas between $$ and $$ .
[!IMPORTANT]
Two ways to enable highlight:
- Use MathJax Highlight. (Recommended)
- Config
scopes in User Settings, see MathJax Highlight Configurations for scopes configuration guide.
Configurations
Key |
Description |
Type |
Default |
comment-formula.color |
Color of rendered formulas. |
string |
"auto" |
comment-formula.inline |
When will the inline formula preview be displayed. |
string |
"all" |
comment-formula.languages |
Enable comment-formula in these languages. LanguageId: https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers |
array |
["c","cpp","java","python"] |
comment-formula.scopes |
Enable highlight in these scopes. |
array |
[] |
comment-formula.interval |
Formula update interval(ms). |
number |
200 |
comment-formula.code |
Style of matched LaTeX code. |
string |
"font-weight: bold;" |
comment-formula.preview |
Style of the inline formula preview. |
string |
"" |
comment-formula.annotation |
Enable render formula for preview or not. |
boolean |
true |
comment-formula.completion |
Enable intelligent completion. |
boolean |
true |
comment-formula.multiple |
Set preview position of multiple line LaTeX or disable it. |
string |
"after" |
comment-formula.single |
Set preview position of single line LaTeX or disable it. |
string |
"after" |
comment-formula.hidden |
Enable hiding code when selections are out of range. |
string |
"scope" |
comment-formula.autotab |
Enable auto tabbing rendered formulas. |
boolean |
true |
comment-formula.scale |
Scale factor of the preview formula. |
number |
1 |
comment-formula.api.prefix |
API prefix (Experimental). |
string |
"" |
comment-formula.api.suffix |
API suffix (Experimental). |
string |
"" |
comment-formula.preload |
Paths to files containing LaTeX preamble to preload. |
array |
[] |
Feel free to open an issue if you encounter any problem or have any suggestion.
Reference
VSCode Iconify | MathJax | KaTeX | VSCode Markdown | LaTeX Workshop | VSCode Markdown Math
License
Code is under the MIT License.
Logo using carbon:function as an element is under the Apache License 2.0.
Fonts used in feature image are Dancing Script (for Before and After ) under the Open Font License and Input (for code) under the Input Font License.
Support
If you find this project useful, please consider giving it a star on GitHub. Your support is greatly appreciated! 
| |