# \mspace

Explicit math spacing with a manually chosen width.

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

## Metadata

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

## Syntax

### base

Argument specification: `m:L`

Explicit math spacing with a manually chosen width.

### textmacros

Argument specification: `m:L`

Used to insert explicit horizontal space by giving a dimension directly.

## Examples

```latex
\mspace 3mu
```

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

```latex
\mspace{3mu}
```

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

```latex
\text{\mspace 1em}
```

[Open in Playground](https://play.texform.dev/?input=%5Ctext%7B%5Cmspace+1em%7D)

```latex
\text{\mspace{1em}}
```

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

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base | m:L | math | Explicit math spacing with a manually chosen width. |
| textmacros | m:L | text | Used to insert explicit horizontal space by giving a dimension directly. |

## Renderer support

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

## In TeXForm

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

## Equivalent forms

```latex
\mskip #1
```

exact. MathJax maps both names to the same parse method with no extra unit check.

```latex
\mskip #1
```

exact. 

## See also

- [\\hskip](https://texform.dev/latex/commands/hskip)
- [\\hspace](https://texform.dev/latex/commands/hspace)
- [\\kern](https://texform.dev/latex/commands/kern)
- [\\mkern](https://texform.dev/latex/commands/mkern)
- [\\mskip](https://texform.dev/latex/commands/mskip)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \mspace{1pt} | Positive: baseline | Pass | Fail | Fail |
| \mspace 1pt | Positive: bare[0] | Pass | Fail | Fail |
| \mspace{a} | Negative: neg:L[0] | Fail | Fail | Fail |

### textmacros

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \mspace{1pt} | Positive: baseline | Pass | Fail | Fail |
| \mspace 1pt | Positive: bare[0] | Pass | Fail | Fail |
| \mspace{a} | Negative: neg:L[0] | Fail | Fail | Fail |
