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

This question already has an answer here:

What is the difference between \vspace{-1em} and \vskip -1em, for example? I guess the first is LaTeX, and the latter is TeX. When is the proper time to use one and not the other, and why?

share|improve this question

migrated from stackoverflow.com Sep 30 '11 at 13:32

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

marked as duplicate by egreg tex-core Nov 20 '15 at 16:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I voted to close this question because @egreg has provided a canonical answer for the "question originally asked at tex.sx". – lockstep Sep 30 '11 at 14:27
up vote 105 down vote accepted

At any point in its processing, TeX is in some mode. There are six modes, divided in three categories:

  1. horizontal mode and restricted horizontal mode,
  2. vertical mode and internal vertical mode, and
  3. math mode and display math mode.

When not typesetting mathematics, TeX is in horizontal or vertical mode. Horizontal mode is typically used to make lines of text; vertical mode is typically used to stack the lines of a paragraph on top of each other.

\vskip inserts a glue in a vertical list of the lines. Therefore \vskip breaks the horizontal mode and goes to the vertical mode.

\vspace can work in horizontal mode and vertical mode. In horizontal mode \vspace 1mm is equivalent to \vadjust{\vskip 1mm \vskip 0pt} and inserts a space after the current line. In vertical mode \vspace 1mm is equivalent to \vskip 1mm \vskip 0pt

\vskip 0pt is needed so \removelastskip can not remove your vertical space.

Full definition:

\vspace : -> \@ifstar \@vspacer \@vspace 

Without * case (\vspace 1mm):

\@vspace: #1->\ifvmode \vskip #1 \vskip \z@skip \else \@bsphack \vadjust {\@restore
par \vskip #1 \vskip \z@skip }\@esphack \fi 

Note \z@skip equal to 0pt, \@bsphack is needed to save big horizontal space after period. \@esphack is needed to return big space settings.

With * case (\vspace* 1mm):

\@vspacer:#1->\ifvmode \dimen@ \prevdepth \hrule \@height \z@ \nobreak \vskip #1 \v
skip \z@skip \prevdepth \dimen@ \else \@bsphack \vadjust {\@restorepar \hrule     @height \z@ \nobreak \vskip #1 \vskip \z@skip }\@esphack \fi 
share|improve this answer
Above and beyond. Thank you for the detail. – Geoff Jun 11 '10 at 16:17
So if they are used outside of a paragraph (that is, in vertical mode), then the output would be exactly the same? – ceiling cat Oct 30 '15 at 5:52

\vspace is a LaTeX command and \vskip is a TeX command. Both can be used in LaTeX. When \vspace is used within a paragraph, it inserts space after the current line. But if \vskip is used within a paragraph it ends the paragraph and inserts the space immediately.

share|improve this answer
Why does \vskip start a new line? Is this a side effect of what Charles refers to as "vertical mode?" – Geoff Jun 11 '10 at 13:52
@Geoff: \vskip start a new line by design. vskip is a vertical skip. Donald Knuth decided so. – Alexey Malistov Jun 11 '10 at 14:05

Exactly as Rob says; to rephrase, \vskip should be used when you are in, or want to start setting in, vertical mode, and \vspace makes sense within a paragraph.

The (an?) implementation of \vspace is discussed in Eijkhout 1990, TUGboat 11(4), p618.

share|improve this answer

The difference by example :

\documentclass[preview, border=7mm]{standalone}


    \textcolor{red}{Line with \texttt{vspace} :} \vspace{1cm} \blindtext


    \textcolor{red}{Line with \texttt{vskip} :} \vskip 1cm \blindtext


enter image description here

share|improve this answer

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