Skip to content

Repository files navigation

VsTeXCommentsExtension

Intra-text adornment extension to the Visual Studio Editor for rendering TeX math comments inside editor.

Supports C#, F#, C, C++, VB.NET, MPL, Python, R, D and Fortran.

Extension is transforming all continuous code blocks where all lines starts with single line comment syntax (can be preceeded by white spaces) which for example in C# is '//' and the first line starts with '//tex:' prefix ('//' part is language dependent) to rendered image where math is rendered by MathJax. Math in this comments has to be surrounded by $ (for inline math) or $$ signs. Syntax of math is LaTex.

Examples:

  • C#, F#, C, C++, D:
//tex://Formula 1: $$(a+b)^2 = a^2 + 2ab + b^2$$//Formula 2: $$a^2-b^2 = (a+b)(a-b)$$
  • MPL, Python, R:
#tex:#Formula 1: $$(a+b)^2 = a^2 + 2ab + b^2$$#Formula 2: $$a^2-b^2 = (a+b)(a-b)$$
  • VB.NET:
'tex:'Formula 1: $$(a+b)^2 = a^2 + 2ab + b^2$$'Formula 2: $$a^2-b^2 = (a+b)(a-b)$$
  • Fortran:
 !tex:
!Formula 1: $$(a+b)^2= a^2+2ab+ b^2$$
!Formula 2: $$a^2-b^2= (a+b)(a-b)$$

Example of C# code:

alt tag

Source code for screenshot above looks like this: alt tag

About

TeX comments rendering inside Visual Studio.

Topics

Resources

Stars

60 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages