Spacing\!

\!Command

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

n \! \!
Topic
Spacing
Available in
base, textmacros
Kind
prefix
Allowed mode
math, text
Frequency
1.50% of corpus formulasrank 40 of 263
Commonality
medium
Tags
spacing
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
textmacrosMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\!

Takes no arguments. Same argspec in base and textmacros. Reading argspecs

Common tasks#

How to tighten space around a factorial-like product#

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

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

How to pull a subscript closer to a large operator#

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

How to cancel a thin space before punctuation#

a\,=\,b\!.

Examples#

textmacros

\text{a\!b}

Package variants#

PackageSignatureAllowed modeNotes
basemathAdds a negative thin math space to tighten spacing between nearby symbols in formulas.
textmacrostextUsed to insert a negative thin space to tighten spacing in text fragments when default spacing is too loose.

In TeXForm#

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

Equivalent forms#

  • \negthinspaceexact

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

  • \negthinspaceexact

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

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\!Positive · baselinePassPassPass
textmacros
InputCaseMathJaxKaTeXXeTeX
\!Positive · baselinePassPassPass
All 32 in Spacing