# \vspace doesn't work

This is a very simple document. Yet, \vspace doesn't work:

\begin{titlepage}
Dies ist ein Test.
\vspace{5cm}
Dies ist ein Test.
\end{titlepage}


Whats wrong here?

• If you insert a blank line imediately before or after the \vspace command, you will get the expected result. May 31, 2018 at 14:14
• Why is this nowhere documented? May 31, 2018 at 14:21
• You have read all of these books in "What are good learning resources for a LaTeX beginner?"? May 31, 2018 at 14:30
• It still doesn't work when i delete the first line. May 31, 2018 at 14:49
• It's not a bug...it's a feature! Welcome to the site. May 31, 2018 at 14:59

Quoting from Leslie Lamport’s LaTeX: A Document Preparation System, p. 216,:

\vspace {len}
\vspace*{len}

Add a vertical space of length len. If the command appears in the middle of a paragraph, then the space is added after the line containing it.

This is what happens in your case.

Edit: The quotation continues:

The space produced by \vspace is removed if it falls at a page break; that produced by \vspace* is not.

Now, this is exactly the case if you remove the first line “Dies ist ein Test.”: indeed, the titlepage environment forces a page break at its beginning. So, if you want the space not to disappear there, you must use \vspace*.