Spacing\phantom

\phantomCommand

Used to reserve space in mathematical formulas equal to the size of the argument without printing it.

\phantom{x}
Topic
Spacing
Available in
base, textmacros
Kind
prefix
Allowed mode
math, text
Frequency
0.05% of corpus formulasrank 133 of 263
Commonality
medium
Tags
invisible, spacing
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
textmacrosMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\phantomm{a}math content

Argspec m — one mandatory argument. In base. Reading argspecs

\phantomm:T{a}text content

Argspec m:T — one mandatory argument. In textmacros. Reading argspecs

Examples#

textmacros

\text{\phantom{abc}}

Package variants#

PackageSignatureAllowed modeNotes
basemmathUsed to reserve space in mathematical formulas equal to the size of the argument without printing it.
textmacrosm:TtextUsed for manual alignment and spacing tweaks in equations.

In TeXForm#

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

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\phantom{a}Positive · baselinePassPassPass
\phantom aPositive · bare[0]PassPassPass
textmacros
InputCaseMathJaxKaTeXXeTeX
\phantom{a}Positive · baselinePassPassPass
\phantom aPositive · bare[0]PassPassPass
\phantom{a^2}Negative · neg:T[0]FailFailFail
All 32 in Spacing