# \vphantom

Used to reserve vertical space in a mathematical formula corresponding to the argument, while taking up zero horizontal space.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Spacing](https://texform.dev/latex/topics/spacing) |
| Packages | base, textmacros |
| Allowed mode | math, text |
| Tags | invisible, spacing |
| Commonality | medium |
| Kind | prefix |

## Syntax

### base

Argument specification: `m`

Used to reserve vertical space in a mathematical formula corresponding to the argument, while taking up zero horizontal space.

### textmacros

Argument specification: `m:T`

Used to match vertical height for delimiters or math structures across different lines or cells without adding horizontal space.

## Examples

```latex
\vphantom{x}
```

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

```latex
\vphantom{\sum}
```

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

```latex
\text{\vphantom{abc}}
```

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

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base | m | math | Used to reserve vertical space in a mathematical formula corresponding to the argument, while taking up zero horizontal space. |
| textmacros | m:T | text | Used to match vertical height for delimiters or math structures across different lines or cells without adding horizontal space. |

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## See also

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

## Test cases

### base

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

### textmacros

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