# \eqref

Referencing a numbered equation by label, typically producing a parenthesized equation number in AMS math input.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Labels and tags](https://texform.dev/latex/topics/cross-refs) |
| Packages | ams, textmacros |
| Allowed mode | math, text |
| Tags |  |
| Commonality | medium |
| Kind | prefix |

## Syntax

### ams

Argument specification: `m:N`

Referencing a numbered equation by label, typically producing a parenthesized equation number in AMS math input.

### textmacros

Argument specification: `m:N`

Used in prose to cite an equation label with AMS-style parenthesized formatting, e.g. '(3.2)'.

## Examples

```latex
\eqref x
```

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

```latex
\eqref{foo}
```

[Open in Playground](https://play.texform.dev/?input=%5Ceqref%7Bfoo%7D)

```latex
\text{\eqref{eq1}}
```

[Open in Playground](https://play.texform.dev/?input=%5Ctext%7B%5Ceqref%7Beq1%7D%7D)

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| ams | m:N | math | Referencing a numbered equation by label, typically producing a parenthesized equation number in AMS math input. |
| textmacros | m:N | text | Used in prose to cite an equation label with AMS-style parenthesized formatting, e.g. '(3.2)'. |

## Renderer support

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

## Usage frequency

<0.01% of formulas in the measured corpus contain this entry, rank 238 of 263 entries with frequency data.

## In TeXForm

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

## Equivalent forms

```latex
(\ref{#1})
```

approximate. Default tag formatting makes this behave like a parenthesized \ref, but MathJax's tagformat extension can customize the reference formatting.

## See also

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

## Test cases

### ams

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \eqref{a} | Positive: baseline | Pass | Fail | Pass |
| \eqref a | Positive: bare[0] | Pass | Fail | Pass |
| \eqref{\alpha} | Negative: neg:N[0] | Pass | Fail | Fail |

### textmacros

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \eqref{a} | Positive: baseline | Pass | Fail | Fail |
| \eqref a | Positive: bare[0] | Pass | Fail | Fail |
| \eqref{\alpha} | Negative: neg:N[0] | Pass | Fail | Fail |
