[Tex/LaTex] Title Page with TikZ that fits on A4 Paper Size

paper-sizetikz-pgftitles

Using the following TikZ code or background image, I would like to add some information to it and use as my title page such that it fits perfectly on an A4 paper size.

\begin{tikzpicture}
\shadedraw [left color=red,right color=blue] (0,0) rectangle (10,13);
\end{tikzpicture}

I would like to add:

  1. My book's title centered around the top: "This is my Book's Title" in white text.
  2. Then below that the author, also centered and in white: "Author XY". I am using the standard book class.
  3. And finally down below the date also in white and centered.

How can I achieve this?

Thanks in advance.

Best Answer

You don't have to do everything with tikz. In fact, it is not advisable. Draw the shaded region with tikz and type every thing else using titlepage environment. This way you get more control.

\documentclass{book}
\usepackage{tikz}
\usepackage[a4paper,margin=1in]{geometry}
\begin{document}
  \begin{titlepage}
    \centering  \sffamily
    \begin{tikzpicture}[remember picture,overlay]
    \shade [top color=red,bottom color=blue] (current page.south west) rectangle (current page.north east); 
  \end{tikzpicture}
  {\Huge\textcolor{white}{This is my book'stitle}}
  \par\vspace{0.5in}
  {\large \textcolor{white}{This is my subtitle}}
  \par\vspace{\stretch{1}}
  {\Large \textcolor{white}{Author XY}}
  \par
  \vfill
  \textcolor{white}{\today} 
\end{titlepage}
\end{document}

enter image description here

Related Question