# How to control LaTeX titlepage top margin spacing

As a brief note to self, when you need to control spacing at the top of the title page (titlepage) in a LaTeX document, use the \vspace command, as shown in this example:

\begin{titlepage}
\centering
\vspace*{20mm}    %special incantation for title page spacing
{\titleFont
Hello, Scala\\
}
\vskip6.5cm
{\myNameFont
Alvin Alexander\\
}
\vskip1cm
{\mdseries\Large\itshape\color{SubTitleColor}\setlength{\parskip}{1.6em}
A simple, quick introduction\\
to the Scala programming language\\
}

\end{titlepage}

In this example I have custom fonts defined name titleFont and myNameFont, but the purpose is to show how to control vertical spacing with commands like vspace and vskip. vskip didn’t work to control top margin spacing, but I found that vspace does work.

As of June, 2018, I can confirm that this approach works to adjust the top margin titlepage spacing when creating a PDF with the LaTeX latexmk and xelatex commands.