Back to Devexpress

Templates for LaTeX Formula Creation

coderushforroslyn-400713-coding-assistance-code-templates-templates-for-latex-formula-creation.md

latest3.6 KB
Original Source

Templates for LaTeX Formula Creation

  • Jan 31, 2023
  • 2 minutes to read

This topic describes templates you can use to facilitate LaTeX formula creation in Rich Comments.

The LaTeX Formulas Support (beta) feature ships disabled by default. You can enable LaTeX formula support on the Rich Comments options page.

Important

Visual Studio IntelliSense has priority over CodeRush templates. For information on how to prioritize a CodeRush template over Visual Studio IntelliSense , refer to the following topic section: Expand a Template Instead of Visual Studio IntelliSense.

LaTeX Formula Creation

The following templates create formatted formulas inside code comments:

TemplateDescriptionExpansionExample
/fLaTeX formula in C#.// <formula >
‘fLaTeX formula in VB.‘ <formula >
!fLaTeX formula in XAML.<!– <formula > –>
.Centered dot\cdot
..Three centered dots\cdots
\8Infinity\infty
\bBraces{}
\bcaBig Cap\bigcap_{lower}^{upper}
\bcuBig Cup\bigcup_{lower}^{upper}
\cpCo-product\coprod_{lower}^{upper}
\fFraction\frac{numerator}{denominator}
\lLimit\lim_{x\to\infty}
\lrLeft & Right Parens\left( \right)
\nrnth Root\sqrt[root]{value}
\oCircle symbol\circ
\oiContour integral\oint
\pProduct\prod_{lower}^{upper}
\sSum\sum_{lower}^{upper}
\sqSquare Root\sqrt{value}
\vVector\vec{numerator}

Example

The screencast below demonstrates how to use “/f”, “\f” and “\sq” templates to create a quadratic formula in rich comments.

Greek Symbols in LaTeX Formula

CodeRush supports Greek letters in LaTeX formulas.

How to Use

To use a Greek letter in a formula, enter a “.” followed by the letter (or letter abbreviation).

For example, to reference the Greek alpha, use “.a”.

Use an uppercase letter after the dot to get an uppercase Greek letter.

For example, use “.D” to get an uppercase Delta symbol.

Template Configuration

You can find a complete list of supported Greek symbols on the CodeRush Templates options page.