> For AI agents: the complete documentation index is available at https://docs.flashnerd.com/llms.txt, the full documentation bundle is available at https://docs.flashnerd.com/llms-full.txt.

# TeX

Use a **TeX** field to render mathematical expressions. Enter the formula itself rather than an entire LaTeX document.

## Add a formula

1. Add a TeX field to your template and assign its side.
2. In the card editor, type a mathematical expression. The keyboard toolbar provides math-symbol insertion and bracket navigation.
3. Inspect **Card Preview** or **Full Preview**.
4. Save the card when the expression renders as intended.

For a card asking for the quadratic formula, place the question in a front-side Text field and this TeX in a back-side field:

```tex
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
```

Other simple expressions include `a^2 + b^2 = c^2` and `\frac{1}{2}`. Keep supporting prose in a Text, Rich Text, or Note field.

## Fit the formula on the card

In the field's settings, **Auto Scale** scales the rendered formula down to fit the available width. With Auto Scale off, a wide formula can be scrolled horizontally instead.

If automatic scaling makes an expression too small, shorten it, split the learning task into several cards, or turn scaling off and check the scrolling result.

## If the formula does not render

When parsing fails, the field falls back to showing the source text. Check balanced braces, command spelling, and the expression's structure. Flashnerd is a math renderer, not a full LaTeX document processor; a document preamble or arbitrary package commands are not an appropriate field value.

Related: [Rich Text](https://docs.flashnerd.com/reference/fields/rich-text.md) for simple subscript/superscript formatting and [Field settings](https://docs.flashnerd.com/guide/cards/field-settings.md) for card overrides.
