Skip to main content

Templates for LaTeX Formula Creation

  • 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:

Template Description Expansion Example
/f LaTeX formula in C#. // <formula >
‘f LaTeX formula in VB. ‘ <formula >
!f LaTeX formula in XAML. <!– <formula > –>
\. Centered dot \cdot centered-dot
\.. Three centered dots \cdots three-centered-dots
\8 Infinity \infty infinity
\b Braces {}
\bca Big Cap \bigcap_{lower}^{upper} big-cap
\bcu Big Cup \bigcup_{lower}^{upper} big-cup
\cp Co-product \coprod_{lower}^{upper} co-prodict
\f Fraction \frac{numerator}{denominator} fraction
\l Limit \lim_{x\to\infty} limit
\lr Left & Right Parens \left( \right) left-right-parens
\nr nth Root \sqrt[root]{value} nth-root
\o Circle symbol \circ circle-symbol
\oi Contour integral \oint contour-integral
\p Product \prod_{lower}^{upper} product
\s Sum \sum_{lower}^{upper} sum
\sq Square Root \sqrt{value} square-root
\v Vector \vec{numerator} vector

Example

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

laTeX-example

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”.

greek-example

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

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

delta-example

Template Configuration

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

laTeX-example