# \!

Adds a negative thin math space to tighten spacing between nearby symbols in formulas.

https://texform.dev/latex/commands/-21-

## Metadata

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

## Syntax

### base

Argument specification: ``

Adds a negative thin math space to tighten spacing between nearby symbols in formulas.

### textmacros

Argument specification: ``

Used to insert a negative thin space to tighten spacing in text fragments when default spacing is too loose.

## Common tasks

### How to tighten space around a factorial-like product

\! is a negative thin space; it is not the factorial glyph.

```latex
n!\,=\,n\times(n-1)!
```

[Open in Playground](https://play.texform.dev/?input=n%21%5C%2C%3D%5C%2Cn%5Ctimes%28n-1%29%21)

### How to pull a subscript closer to a large operator

```latex
\int\!\!\! f(x)\,dx
```

[Open in Playground](https://play.texform.dev/?input=%5Cint%5C%21%5C%21%5C%21+f%28x%29%5C%2Cdx)

### How to cancel a thin space before punctuation

```latex
a\,=\,b\!.
```

[Open in Playground](https://play.texform.dev/?input=a%5C%2C%3D%5C%2Cb%5C%21.)

## Examples

```latex
n \! \!
```

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

```latex
\text{a\!b}
```

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

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base |  | math | Adds a negative thin math space to tighten spacing between nearby symbols in formulas. |
| textmacros |  | text | Used to insert a negative thin space to tighten spacing in text fragments when default spacing is too loose. |

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## Equivalent forms

```latex
\negthinspace
```

exact. Both base mappings call BaseMethods.Spacer with MATHSPACE.negativethinmathspace.

```latex
\negthinspace
```

exact. In the textmacros mappings, \negthinspace is sent to the same Spacer method with the same negative thin-space width.

## See also

- [\\,](https://texform.dev/latex/commands/-2c-)
- [\\;](https://texform.dev/latex/commands/-3b-)
- [\\:](https://texform.dev/latex/commands/-3a-)
- [\\>](https://texform.dev/latex/commands/-3e-)
- [\\enspace](https://texform.dev/latex/commands/enspace)
- [\\negmedspace](https://texform.dev/latex/commands/negmedspace)
- [\\negthickspace](https://texform.dev/latex/commands/negthickspace)
- [\\negthinspace](https://texform.dev/latex/commands/negthinspace)
- [\\qquad](https://texform.dev/latex/commands/qquad)
- [\\quad](https://texform.dev/latex/commands/quad)
- [\\thinspace](https://texform.dev/latex/commands/thinspace)

## Test cases

### base

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

### textmacros

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