# \cr

Used to terminate rows in primitive TeX alignment structures, sometimes seen in legacy matrix environments.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Layout and breaks](https://texform.dev/latex/topics/layout) |
| Packages | base |
| Allowed mode | math |
| Tags | discouraged |
| Commonality | low |
| Kind | prefix |

## Syntax

### base

Argument specification: ``

Used to terminate rows in primitive TeX alignment structures, sometimes seen in legacy matrix environments.

## Examples

```latex
\begin{matrix} a \cr b \end{matrix}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Bmatrix%7D+a+%5Ccr+b+%5Cend%7Bmatrix%7D)

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

### Discouraged in base

\cr is a low-level plain-TeX row separator; LaTeX usage conventionally prefers \\ for row breaks.

```latex
\cr -> \\
```

\\ is the standard LaTeX row-break form in matrices, arrays, and alignments, and it additionally supports the familiar starred and optional [dimen] variants.

## Equivalent forms

```latex
\\
```

approximate. \\ supports an optional spacing argument, while \cr is a TeX primitive that does not in MathJax.

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \begin{matrix} a \cr b \end{matrix} | Positive: ctx:in-matrix | Pass | Pass | Fail |
