# \middle

Used inside a \left...\right pair to insert an automatically sized internal separator, such as in set-builder notation or bra-ket style expressions.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Delimiters](https://texform.dev/latex/topics/delimiters) |
| Packages | base |
| Allowed mode | math |
| Tags |  |
| Commonality | medium |
| Kind | prefix |

## Syntax

### base

Argument specification: `m:D`

Used inside a \left...\right pair to insert an automatically sized internal separator, such as in set-builder notation or bra-ket style expressions.

## Examples

```latex
\left( x \middle| y \right)
```

[Open in Playground](https://play.texform.dev/?input=%5Cleft%28+x+%5Cmiddle%7C+y+%5Cright%29)

```latex
\left\langle a \middle| b \right\rangle
```

[Open in Playground](https://play.texform.dev/?input=%5Cleft%5Clangle+a+%5Cmiddle%7C+b+%5Cright%5Crangle)

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## See also

- [\\left](https://texform.dev/latex/commands/left)
- [\\right](https://texform.dev/latex/commands/right)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \left( a \middle\| b \right) | Positive: ctx:with-left-right | Pass | Pass | Pass |
