Spacing\kern

\kernCommand

Fine manual spacing or kerning in math where the inserted space should inhibit a line break.

\kern 10pt
Topic
Spacing
Available in
base, textmacros
Kind
prefix
Allowed mode
math, text
Frequency
Not measured
Commonality
low
Tags
spacing
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Partial
textmacrosMathJax: FullKaTeX: FullXeTeX: Partial
About the test scope

Syntax#

\kernm:L{1em}dimension

Argspec m:L — one mandatory argument. Same argspec in base and textmacros. Reading argspecs

Examples#

base

\kern{10pt}

base

a \kern 2em b

textmacros

\text{\kern 1em}

textmacros

\text{\kern{1em}}

Package variants#

PackageSignatureAllowed modeNotes
basem:LmathFine manual spacing or kerning in math where the inserted space should inhibit a line break.
textmacrosm:LtextUsed for fine horizontal kerning adjustments in text.

In TeXForm#

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

Equivalent forms#

  • \mkern 10muapproximate

    \mkern is typically used for math units (mu)

  • \hspace{#1}approximate

    \hspace may allow line breaks whereas \kern is typically unbreakable unless followed by glue.

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\kern{1pt}Positive · baselinePassPassFail
\kern 1ptPositive · bare[0]PassPassPass
\kern{a}Negative · neg:L[0]FailFailFail
textmacros
InputCaseMathJaxKaTeXXeTeX
\kern{1pt}Positive · baselinePassPassFail
\kern 1ptPositive · bare[0]PassPassPass
\kern{a}Negative · neg:L[0]FailFailFail
All 32 in Spacing