# \space

Inserts an explicit nonbreaking space in math input, typically when the author wants literal whitespace preserved between math atoms.

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

## Metadata

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

## Syntax

### base

Argument specification: ``

Inserts an explicit nonbreaking space in math input, typically when the author wants literal whitespace preserved between math atoms.

## Examples

```latex
\space
```

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

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

### [base/space-to-tilde](https://texform.dev/rules/base/space-to-tilde)

Collapse space to the explicit nonbreaking space token.

Level: authoring. Fidelity: render.

```latex
\space
```

→

```latex
~
```

```latex
Figure\space 2 shows the result
```

→

```latex
Figure~2 shows the result
```

## Equivalent forms

```latex
\ 
```

exact. Control-space is mapped to the same MathJax parse method.

```latex
~
```

exact. In MathJax math mode, ~ is handled by the same method and produces the same nonbreaking-space token.

## See also

- [\\ ](https://texform.dev/latex/commands/-20-)
- [\\~](https://texform.dev/latex/commands/-7e-)
- [\\nobreakspace](https://texform.dev/latex/commands/nobreakspace)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \space | Positive: baseline | Pass | Pass | Pass |
