TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that \: in LaTeX produces a space when rendered.

Are there any alternatives, because my LaTeX renderer doesn't support \: (it renders it as text), and there is no help / FAQ that I can find.

share|improve this question

migrated from stackoverflow.com Sep 27 '12 at 13:49

This question came from our site for professional and enthusiast programmers.

up vote 428 down vote accepted

There are a number of horizontal spacing macros for LaTeX:

  1. \, inserts a \thinspace (equivalent to .16667em) in text mode, or \thinmuskip (equivalent to 3mu) in math mode;
  2. \! inserts a negative \thinmuskip in math mode;
  3. \> inserts \medmuskip (equivalent to 4.0mu plus 2.0mu minus 4.0mu) in math mode;
  4. \; inserts \thickmuskip (equivalent to 5.0mu plus 5.0mu) in math mode;
  5. \: is equivalent to \> (see above);
  6. \enspace inserts a space of .5em in text or math mode;
  7. \quad inserts a space of 1em in text or math mode;
  8. \qquad inserts a space of 2em in text or math mode;
  9. \kern <len> inserts a skip of <len> (may be negative) in text or math mode (a plain TeX skip);
  10. \hskip <len> (similar to \kern);
  11. \hspace{<len>} inserts a space of length <len> (may be negative) in math or text mode (a LaTeX \hskip);
  12. \hphantom{<stuff>} inserts space of length equivalent to <stuff> in math or text mode. Should be \protected when used in fragile commands (like \caption and sectional headings);
  13. \  inserts what is called a "control space" (in text or math mode);
  14. ~ inserts an "unbreakable" space (similar to an HTML &nbsp;) (in text or math mode);
  15. \hfill inserts a so-called "rubber length" or stretch between elements (in text or math mode). Note that you may need to provide a type of anchor to fill from/to; see What is the difference between \hspace*{\fill} and \hfill?;

Your usage should work in math mode, so try $\:$.

enter image description here


There are a number of horizontal spacing macros for LaTeX:

  \verb|a\,b| & a\,b \\
  \verb|$a\,b$| & $a\,b$ \\
  \verb|a\thinspace b| & a\thinspace b \\
  \verb|$a\thinspace b$| & $a\thinspace b$ \\
  \verb|$a\!b$| & $a\!b$ \\
  \verb|$a\mkern-\thinmuskip b$| & $a\mkern-\thinmuskip b$ \\
  \verb|$a\>b$| & $a\>b$ \\
  \verb|$a\mkern\medmuskip b$| & $a\mkern\medmuskip b$ \\
  \verb|$a\;b$| & $a\;b$ \\
  \verb|$a\mkern\thickmuskip b$| & $a\mkern\thickmuskip b$ \\
  \verb|$a\:b$| & $a\:b$ \\
  \verb|$a\mkern\medmuskip b$| & $a\mkern\medmuskip b$ \\
  \verb|a\enspace b| & a\enspace b \\
  \verb|$a\enspace b$| & $a\enspace b$ \\
  \verb|a\quad b| & a\quad b \\
  \verb|$a\quad b$| & $a\quad b$ \\
  \verb|a\qquad b| & a\qquad b \\
  \verb|$a\qquad b$| & $a\qquad b$ \\
  \verb|a\hskip 1em b| & a\hskip 1em b \\
  \verb|$a\hskip 1em b$| & $a\hskip 1em b$ \\
  \verb|a\kern 1pc b| & a\kern 1pc b \\
  \verb|$a\kern 1pc b$| & $a\kern 1pc b$ \\
  \verb|a\hspace{35pt}b| & a\hspace{35pt}b \\
  \verb|$a\hspace{35pt}b$| & $a\hspace{35pt}b$ \\
  \verb|axyzb| & axyzb \\
  \verb|a\hphantom{xyz}b| & a\hphantom{xyz}b \\
  \verb|$axyzb$| & $axyzb$ \\
  \verb|$a\hphantom{xyz}b$| & $a\hphantom{xyz}b$ \\
  \verb|a\ b| & a\ b \\
  \verb|$a\ b$| & $a\ b$ \\
  \verb|a~b| & a~b \\
  \verb|$a~b$| & $a~b$ \\
  \verb|a\hfill b| & a\hfill b \\
  \verb|$a\hfill b$| & $a\hfill b$
share|improve this answer
May I add \hfil and \hfill – deshmukh Oct 10 '12 at 6:13
@Werner -- \ (backslash space) inserts a space equivalent to a word space; would be usefully added. also, in tabbing, \> will "add space" as a function of skipping to the next "tab stop"; adding this information may or may not be useful. – barbara beeton Jan 28 '14 at 15:14
How about italics correction, with \/? – Magnus Lie Hetland Mar 22 '14 at 12:04
Don't forget \kern and \mkern for text and math modes, respectively, when you wish to prevent the inadvertent addition of glue. – Steven B. Segletes May 8 '14 at 0:28
I just noticed that \hfil has already been suggested but it hasn't been included in your table. It's worthy to mention the construct a\hfill\hfill b\hfill c and the similar use of \hfil -- a\hfil\hfil b\hfil c – corporal May 8 '14 at 5:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.