Comment FormulaIntroductionA VSCode extensions to preview LaTeX formulas within the lines of your editor.
Feature
UsageYou are supposed to write formulas between HIGHLIGHT: Install MathJax Highlight to highlight LaTeX code in comments. Reload the Window to make the highlight work when update 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 extension in these languages id. | array |
["c","cpp","java","python"] |
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.defines |
Define Language with glob file patterns, where key is language id, value is a list of glob pattern. | object |
{} |
comment-formula.capture |
Set RegExp for capturing math for rendering in comments. | object |
{} |
comment-formula.message.playground |
Display link of mathjax-playground in hover message. | boolean |
true |
comment-formula.message.preview |
Display rendered formula in hover message. | string |
"partial" |
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!