# \rlap

Used to place material flush-right in zero width so it overlaps neighboring math without contributing horizontal width, typically for manual annotations or adjusted symbol placement.

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

## Metadata

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

## Syntax

### base

Argument specification: `m`

Used to place material flush-right in zero width so it overlaps neighboring math without contributing horizontal width, typically for manual annotations or adjusted symbol placement.

### textmacros

Argument specification: `m:T`

Used in text-mode material to place content in a zero-width box that protrudes to the right, so it overlaps surrounding text without taking horizontal space.

## Examples

```latex
\rlap{ab}
```

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

```latex
\text{\rlap{a}}
```

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

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base | m | math | Used to place material flush-right in zero width so it overlaps neighboring math without contributing horizontal width, typically for manual annotations or adjusted symbol placement. |
| textmacros | m:T | text | Used in text-mode material to place content in a zero-width box that protrudes to the right, so it overlaps surrounding text without taking horizontal space. |

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## See also

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

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \rlap{a} | Positive: baseline | Pass | Pass | Pass |
| \rlap a | Positive: bare[0] | Pass | Pass | Pass |

### textmacros

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \rlap{a} | Positive: baseline | Pass | Pass | Pass |
| \rlap a | Positive: bare[0] | Pass | Pass | Pass |
| \rlap{a^2} | Negative: neg:T[0] | Fail | Fail | Fail |
