# What is the difference between \vskip and \vspace?

I found myself writing:

\vspace 1 \baselineskip


and then when it's not compiling changing without thinking to:

\vskip 1 \baselineskip


but what is the difference? Perhaps knowing this will make me write the right one from the start in the future...

• Sep 30 '11 at 11:46
• oh that's why I didn't find it. That one is on stackoverflow I only searched this site... Sep 30 '11 at 12:14
• @thiton: It is not possible to close a question as a duplicate of a question on a different stackexchange site. Sep 30 '11 at 12:32
• @MartinScharrer: I've flagged the SO question to be moved here, once that is done this question could be closed. Sep 30 '11 at 12:45
• possible duplicate of vspace vs. vskip Sep 30 '11 at 13:37

The syntax

\vspace 1\baselineskip


is incorrect, as \vspace (or, more precisely, the internal version \@vspace) is a command that takes one argument, so this would be equivalent to

\vspace{1}\baselineskip


which raises an error. However, also the two calls

\vspace{1\baselineskip}
\vskip 1\baselineskip


are not equivalent. The former will not force end-of-paragraph, if given in LR-mode (using LaTeX parlance; horizontal mode in TeX parlance), adding the stated vertical spacing under the line in which it appears in the typeset document. With \vskip, which is a primitive TeX command, the current paragraph will be terminated.

With \vspace you have also the *-version, providing a vertical space that won't disappear at a page break; spacing inserted with \vskip will always disappear at a page break.

In general it's best to issue \vspace between paragraphs, but the "in-paragraph" feature may come up handy in some cases.

Lastly,

\vskip 1\baselineskip
Plus one


will give some surprises to those who are not accustomed with Plain TeX lingo.

Note for the curious: \vglue 1\baselineskip ends the paragraph and produces spacing that won't disappear at a page break. It's not documented in the LaTeX manuals, and it's good it isn't.

• Why is it good it isn't? You piqued my curiosity... Sep 11 '12 at 9:40
• @jonalv The main problem is the "foreign" syntax. If you write \vglue{2\baselineskip} you'll get an error. And \vglue 2pt Minuscule beasts ... will puzzle you. Sep 11 '12 at 9:46
• That's why you always want to close assignments to numbers and dimensions with \relax, i suppose? Dec 3 '19 at 13:26
• @Lupino Yes, which is done by \vspace. Dec 3 '19 at 14:08

I’ve noticed this question because it popped up at the top of the list of active questions a few hours ago, and I would like to add another, minor remark to the excellent answer given by @egreg.

There is another difference between

\vskip \medskipamount % say


and

\vspace{\medskipamount}


and it is how they behave if an \addvspace and/or an \addpenalty command immediately follows them. Indeed, \vspace adds a second zero-length skip, which causes an ensuing \addvspace (resp., \addpenalty) command not to remove the preceding space before adding its own vertical space (resp., penalty). This zero-length skip is, of course, not added by \vskip, which is a primitive command, with the effect that an \addvspace that comes immediately after (that is, without intervening items in the current vertical list) will remove the vertical space added by \vskip if it shorter than the space specified in its own argument.

In other words, if you say

\vspace{\medskipamount}


both spaces will survive and you'll get a total vertical space of \medskipamount+\bigskipamount, whilst with

\vskip \medskipamount


only the taller of the two spaces will survive (\bigskipamount, in this case).

The behavior of \addpenalty is similar, but in order to see it clearly we need to look at the tracing produced by \showlists. Consider the following (almost) MWE:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
% \usepackage[ascii]{inputenc}

\showboxdepth = 10

\begin{document}

Short paragraph~\#1.

\vskip \medskipamount

Short paragraph~\#~2.

\vspace{\medskipamount}

Short paragraph~\#~3.

Let's now consider penalties.  To see the difference, you'll have to look at
the transcript file, and read the tracing produced by \verb|\showlists|.

Short paragraph~\#4.

\vskip \medskipamount

Short paragraph~\#~5.

\vspace{\medskipamount}

Short paragraph~\#~6.

\showlists

\end{document}


This is the excerpt of the tracing that pertains to the tract between the “Short paragraphs” #4 and #5:

\glue 6.0 plus 2.0 minus 2.0
\glue -7.94397 plus -2.0 minus -2.0
\penalty 123
\glue 1.94397
\glue 6.0 plus 2.0 minus 2.0
\glue -6.0 plus -2.0 minus -2.0
\glue 12.0 plus 4.0 minus 4.0
\glue(\parskip) 0.0 plus 1.0


As you see, there is a backspace of -7.94397 plus -2.0 minus -2.0 (points) before the penalty item: this backspace compensate both for the preceding vertical space of 6.0 plus 2.0 minus 2.0 (always points), that comes from \vskip \medskipamount, and for the depth of the last line of text (the latter being a recent correction of an old LaTeX bug). Note also the second backspace before \glue 12.0 plus 4.0 minus 4.0, which is the glue corresponding to \bigskipamount.

On the other hand, the corresponding excerpt for paragraphs #5 and #6 is

\glue 6.0 plus 2.0 minus 2.0
\glue 0.0
\penalty 123
\glue 12.0 plus 4.0 minus 4.0
\glue(\parskip) 0.0 plus 1.0


Here you can see the zero-length vertical space of which we spoke above, and no backspacing at all.

And here is another difference. \vskip generates \par in horizontal mode (in order to terminate it) but \vspace behaves as \vadjust{\vskip...}. The result is: \vskip has very understandable behaviour but \vspace is a source of many confusions. You can verify this by inspecting this forum about users confusions about \vspace and misunderstanding of horizontal/vertical mode in TeX.

• Note that @egreg’s answer already mentions this. Edit: +1 for explicitly mentioning \vadjust, however. :-)
– GuM
Apr 13 '16 at 21:00