# \over

Plain-TeX infix fraction form placed between a numerator on the left and a denominator on the right.

https://texform.dev/latex/commands/over

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Fractions and roots](https://texform.dev/latex/topics/fractions-roots) |
| Packages | base |
| Allowed mode | math |
| Tags | discouraged |
| Commonality | medium |
| Kind | infix |

## Syntax

### base

Argument specification: ``

Plain-TeX infix fraction form placed between a numerator on the left and a denominator on the right.

## Common tasks

### How to write a TeX-style fraction

Infix \over is primitive TeX; prefer \frac{a}{b} in LaTeX.

```latex
{a \over b}
```

[Open in Playground](https://play.texform.dev/?input=%7Ba+%5Cover+b%7D)

### How to write a derivative with \over

```latex
{dy \over dx}
```

[Open in Playground](https://play.texform.dev/?input=%7Bdy+%5Cover+dx%7D)

### How to nest an \over fraction

```latex
{{a \over b} \over {c \over d}}
```

[Open in Playground](https://play.texform.dev/?input=%7B%7Ba+%5Cover+b%7D+%5Cover+%7Bc+%5Cover+d%7D%7D)

## Examples

```latex
a \over b
```

[Open in Playground](https://play.texform.dev/?input=a+%5Cover+b)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | full | full |

## Usage frequency

1.18% of formulas in the measured corpus contain this entry, rank 45 of 263 entries with frequency data.

## In TeXForm

TeXForm parses this entry as infix syntax; the package determines its argument specification.

### Discouraged in base

This is a plain-TeX infix generalized fraction primitive. In LaTeX, brace-delimited commands such as \frac are preferred because the infix form has ambiguous scope and is easier to misuse.

```latex
$1 \over $2 -> \frac{$1}{$2}
```

\frac is the standard LaTeX form, uses explicit braced numerator/denominator arguments, and avoids the ambiguous grouping scope of infix generalized fraction primitives.

### [base/over-to-frac](https://texform.dev/rules/base/over-to-frac)

Rewrite infix over to an explicit frac command.

Level: authoring. Fidelity: render.

```latex
#1 \over #2
```

→

```latex
\frac{#1}{#2}
```

```latex
(x_1+\cdots+x_m)^2 \over \sum_{j=1}^{n}(y_j^2+1)
```

→

```latex
\frac{(x_1+\cdots+x_m)^2}{\sum_{j=1}^{n}(y_j^2+1)}
```

## Equivalent forms

```latex
\frac{$1}{$2}
```

exact. Equivalent for the intended generalized-fraction interpretation of the left and right operands.

```latex
\genfrac{}{}{}{}{$1}{$2}
```

exact. 

## See also

- [\\above](https://texform.dev/latex/commands/above)
- [\\abovewithdelims](https://texform.dev/latex/commands/abovewithdelims)
- [\\atop](https://texform.dev/latex/commands/atop)
- [\\atopwithdelims](https://texform.dev/latex/commands/atopwithdelims)
- [\\brace](https://texform.dev/latex/commands/brace)
- [\\brack](https://texform.dev/latex/commands/brack)
- [\\choose](https://texform.dev/latex/commands/choose)
- [\\overwithdelims](https://texform.dev/latex/commands/overwithdelims)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| a \over b | Positive: baseline | Pass | Pass | Pass |
