[Tex/LaTex] Usage of \vspace command from top of the page

vertical alignment

I am triying to write my thesis in Latex. I want to create a title page. In my title page i have some space with the texts. I tried to give it with \vspace but it works between text not from top of the page. Can you suppose me a way to do this?

enter image description here

Best Answer

In order to add space at the top of the page you have to say

\vspace*{3cm}

because the simple \vspace is removed at page breaks.

If you want precise positioning with respect to the page margins, you can use textpos. For instance

\documentclass{book}
\usepackage{textpos}

\newcommand{\fromtop}[1]{%
  \dimexpr-1in-\topskip-\topmargin-\headheight-\headsep+#1\relax
}
\newcommand{\fromleft}[1]{%
  \dimexpr-1in-\oddsidemargin+#1\relax
}

\begin{document}

\begin{titlepage}
\setlength{\parindent}{0pt}

\begin{textblock*}{0pt}(\fromleft{2cm},\fromtop{3cm})
\makebox[0pt][l]{Text at the top}
\end{textblock*}

\begin{textblock*}{\textwidth}(\fromleft{5cm},\fromtop{6.5cm})
\makebox[0pt][l]{Text in the middle}
\end{textblock*}

\begin{textblock*}{\textwidth}(\fromleft{3cm},\fromtop{9.5cm})
\makebox[0pt][l]{Text at the bottom}
\end{textblock*}

\end{titlepage}

\end{document}

enter image description here

Another example, for centering the texts with respect to the page borders:

\documentclass{book}
\usepackage{textpos}

\newcommand{\fromtop}[1]{%
  \dimexpr-1in-\topskip-\topmargin-\headheight-\headsep+#1\relax
}
\newcommand{\fromleft}[1]{%
  \dimexpr-1in-\oddsidemargin+#1\relax
}

\begin{document}

\begin{titlepage}
\setlength{\parindent}{0pt}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{3cm})
\centering
Text at the top
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{6.5cm})
\centering
Text in the middle\\
with new line
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{9.5cm})
\centering
Text at the bottom\\
with new line
\end{textblock*}

\end{titlepage}

\end{document}

enter image description here

Related Question