# gather

Displayed groups of equations on separate centered lines without shared alignment points.

https://texform.dev/latex/environments/gather

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Alignment](https://texform.dev/latex/topics/alignment) |
| Packages | ams |
| Allowed mode | math |
| Tags | math-alignment |
| Commonality | medium |
| Body mode | math |

## Syntax

### ams

Argument specification: ``

Displayed groups of equations on separate centered lines without shared alignment points.

## Common tasks

### How to center several equations without aligning

```latex
\begin{gather} a=b \\ c=d+e \end{gather}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Bgather%7D+a%3Db+%5C%5C+c%3Dd%2Be+%5Cend%7Bgather%7D)

### How to gather short identities

Use gather when there is no shared alignment point.

```latex
\begin{gather} \sin^2 x+\cos^2 x=1 \\ e^{i\pi}+1=0 \end{gather}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Bgather%7D+%5Csin%5E2+x%2B%5Ccos%5E2+x%3D1+%5C%5C+e%5E%7Bi%5Cpi%7D%2B1%3D0+%5Cend%7Bgather%7D)

## Examples

```latex
\begin{gather} a = b \end{gather}
```

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

## Renderer support

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

## Usage frequency

0.43% of formulas in the measured corpus contain this entry, rank 14 of 31 entries with frequency data.

## In TeXForm

TeXForm reads the environment body in math mode.

## See also

- [align](https://texform.dev/latex/environments/align)
- [align*](https://texform.dev/latex/environments/align-star)
- [eqnarray](https://texform.dev/latex/environments/eqnarray)
- [eqnarray*](https://texform.dev/latex/environments/eqnarray-star)
- [gather*](https://texform.dev/latex/environments/gather-star)
- [split](https://texform.dev/latex/environments/split)

## Test cases

### ams

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \begin{gather} a \\ b \end{gather} | Positive: ctx:no-ampersand | Pass | Fail | Pass |
