# Spacing

Horizontal and vertical space, phantoms, and struts.

https://texform.dev/latex/topics/spacing

This topic has 32 commands from the base, textmacros, and ams packages. Commands show whether MathJax, KaTeX, and XeTeX render them. Entries are ordered by how often they appear in corpus formulas.

Packages: base (29), textmacros (21), ams (3).

| Name | Kind | Definition | Packages | MathJax | KaTeX | XeTeX | Frequency |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [\\\\](https://texform.dev/latex/commands/-5c-) | command |  | base, textmacros | full | full | partial | 24.30% |
| [\\,](https://texform.dev/latex/commands/-2c-) | command | Adds a thin math space between nearby symbols for fine typographic adjustment in formulas. | base, textmacros | full | full | full | 13.92% |
| [\\ ](https://texform.dev/latex/commands/-20-) | command | Used as control-space to insert an explicit nonbreaking space, especially when a literal space would be ignored or to force spacing after a control word. | base, textmacros | full | full | full | 5.97% |
| [\\;](https://texform.dev/latex/commands/-3b-) | command | Adds a thick math space between nearby symbols for manual spacing in formulas. | base, textmacros | full | full | full | 3.97% |
| [\\!](https://texform.dev/latex/commands/-21-) | command | Adds a negative thin math space to tighten spacing between nearby symbols in formulas. | base, textmacros | full | full | full | 1.50% |
| [\\:](https://texform.dev/latex/commands/-3a-) | command | Adds a medium math space between nearby symbols for manual spacing in formulas. | base, textmacros | full | full | full | 0.54% |
| [\\enspace](https://texform.dev/latex/commands/enspace) | command | Used to insert a half-em horizontal space in math expressions when manual spacing is desired. | base, textmacros | full | full | full | 0.10% |
| [\\>](https://texform.dev/latex/commands/-3e-) | command | Adds a medium math space in math mode as an alternate medium-space command. | base, textmacros | full | full | full | 0.06% |
| [\\phantom](https://texform.dev/latex/commands/phantom) | command | Used to reserve space in mathematical formulas equal to the size of the argument without printing it. | base, textmacros | full | full | full | 0.05% |
| [\\thinspace](https://texform.dev/latex/commands/thinspace) | command | Used to insert a small positive horizontal space in math when explicit fine spacing is needed. | base, textmacros | full | full | full | 0.04% |
| [\\hfill](https://texform.dev/latex/commands/hfill) | command | Used inside an array-like cell to mark a horizontal fill position that MathJax later converts into cell alignment metadata; at the start or end of a cell it can force right/left alignment, and markers at both ends center the entry. | base | full | none | full | 0.03% |
| [\\vphantom](https://texform.dev/latex/commands/vphantom) | command | Used to reserve vertical space in a mathematical formula corresponding to the argument, while taking up zero horizontal space. | base, textmacros | full | full | full | 0.03% |
| [\\hphantom](https://texform.dev/latex/commands/hphantom) | command | Used to reserve horizontal space in a mathematical formula corresponding to the argument, while taking up zero vertical space. | base, textmacros | full | full | full | 0.02% |
| [\\quad](https://texform.dev/latex/commands/quad) | command | Used to insert a one-em horizontal space between parts of a math formula or displayed equation. | base, textmacros | full | full | full | <0.01% |
| [\\hspace](https://texform.dev/latex/commands/hspace) | command | Manual horizontal spacing around symbols or subexpressions in math formulas. | base, textmacros | partial | partial | partial | <0.01% |
| [\\mathstrut](https://texform.dev/latex/commands/mathstrut) | command | Used as an invisible math strut to force consistent height and depth in formulas, arrays, or aligned material | base | full | full | full | <0.01% |
| [\\strut](https://texform.dev/latex/commands/strut) | command | Used to insert a vertical space with standard height and depth without affecting horizontal spacing, often useful inside tabular environments or fractions to prevent layout collapsing. | base | full | none | full | <0.01% |
| [\\negthinspace](https://texform.dev/latex/commands/negthinspace) | command | Used to insert a small negative horizontal space in math to tighten spacing between adjacent symbols. | base, textmacros | full | full | full | <0.01% |
| [\\negthickspace](https://texform.dev/latex/commands/negthickspace) | command | Used in AMS math expressions to tighten spacing by a thick negative amount between adjacent symbols or subexpressions. | ams | full | full | full | <0.01% |
| [\\qquad](https://texform.dev/latex/commands/qquad) | command | Used to insert a double-em horizontal space in math displays, often to separate larger formula parts. | base, textmacros | full | full | full | <0.01% |
| [\\negmedspace](https://texform.dev/latex/commands/negmedspace) | command | Used in AMS math expressions to tighten spacing by a medium negative amount between adjacent symbols or subexpressions. | ams | full | full | full | <0.01% |
| [\\hfil](https://texform.dev/latex/commands/hfil) | command | Used as the lower-level TeX primitive form of \hfill inside an array-like cell; in MathJax it marks a fill position that later affects the cell's alignment. | base | full | none | full | <0.01% |
| [\\space](https://texform.dev/latex/commands/space) | command | Inserts an explicit nonbreaking space in math input, typically when the author wants literal whitespace preserved between math atoms. | base | full | full | full | <0.01% |
| [\\nonscript](https://texform.dev/latex/commands/nonscript) | command | Used before a space command to suppress that spacing in subscripts, superscripts, or other script styles while keeping it in the main math style. | base | full | none | full | <0.01% |
| [\\nobreakspace](https://texform.dev/latex/commands/nobreakspace) | command | Used to insert an explicit nonbreaking space in math expressions, especially where ordinary spaces would be ignored. | ams | full | full | full | <0.01% |
| [\\hfilll](https://texform.dev/latex/commands/hfilll) | command | MathJax compatibility alias for array-cell fill markers; used like \hfill inside an array-like cell when input contains the nonstandard name \hfilll. | base | full | none | none | — |
| [\\hsize](https://texform.dev/latex/commands/hsize) | command | Used in TeX-style box constructions to set the horizontal size/line width that subsequent \vbox, \vtop, or \vcenter content should use for wrapping. | base | full | none | partial | — |
| [\\hskip](https://texform.dev/latex/commands/hskip) | command | Low-level manual horizontal spacing in math expressions or macro definitions. | base, textmacros | full | full | partial | — |
| [\\kern](https://texform.dev/latex/commands/kern) | command | Fine manual spacing or kerning in math where the inserted space should inhibit a line break. | base, textmacros | full | full | partial | — |
| [\\mkern](https://texform.dev/latex/commands/mkern) | command | Fine math kerning between symbols where the inserted space should not become a line-break opportunity. | base, textmacros | full | full | none | — |
| [\\mskip](https://texform.dev/latex/commands/mskip) | command | Manual math spacing between atoms using an explicit dimension. | base, textmacros | full | full | none | — |
| [\\mspace](https://texform.dev/latex/commands/mspace) | command | Explicit math spacing with a manually chosen width. | base, textmacros | full | none | none | — |
