I am trying to design a title page in book class. I want the title page exactly to look like the image attached. It is easily possible to create an array of rectangles in tikz. However I am having difficulty in the following.

  1. How to scale or fit tikz image to paper width and height?
  2. How to embed text inside rectangles?

Though I use LaTeX a lot, I am new to tikz. There are other alternatives which I am thinking of. For example to include the image with include graphics or to include single pdf page with the package pdfpages. However it would be nice to have such a title page natively with tikz. Any help would be appreciated. Thanks.

enter image description here

  • 1
    Welcome to TeX-SE! It is straightforward to achieve this with overlay,remember picture and using absolute page coordinates. However, it is tedious to add all the texts, the more so you were saying you already have something. Why don't you post the code that you already have?
    – user121799
    Jun 3, 2019 at 15:20
  • you may have a look at TikZ code in here tex.stackexchange.com/questions/484922/…. Also using \paperwidth and \paperheight (as in marmot's answer) is helpful
    – Black Mild
    Jun 4, 2019 at 15:00

2 Answers 2


With simple tubulars and rules:


    \begin{tabularx}{\linewidth}{@{} X |X |X |X @{}}
        \multicolumn{4}{@{} c @{}}{%
            \shortstack{\textcolor{white}{School of Mathematics}\\[1em] 
                \Large\textcolor{white}{XYZ University}}}\\\hline
        \multicolumn{3}{@{} r| @{}}{%
            \bfseries\textcolor{white}{\shortstack[l]{\HUGE Book Title\\[2cm]
                    \Large subtitle%
            }} \hspace*{1.5cm}}  & \cellcolor{ColC}\rule{\linewidth}{0pt}\\\hline
        \rule{0pt}{2cm}  & & & \Centering\large\bfseries\textcolor{white}{Course code}\\\hline
        \multicolumn{3}{@{} c| @{}}{%
            \bfseries\large\shortstack[l]{Email: \url{[email protected]}\\[0.5cm]
                Website: \\[0.5cm]Phone: }}  & \cellcolor{ColE}\rule{\linewidth}{0pt}\\\hline
        \multicolumn{4}{@{} l @{}}{%
            \cellcolor{ColA}\rule[-1cm]{0pt}{2.5cm} \large Address: }


enter image description here

  • @Red-Cloud Thanks. It works. I could get most of the code and edit it. How did you decide distances? How did you identify colors?
    – Maths89
    Jun 4, 2019 at 5:56
  • Distances by trial and error (only the last rectangle is important to get the whole page) and colors with gimp and its color pencil.
    – user187802
    Jun 4, 2019 at 6:02

This is to give you a start. I do not have to complete it but the rest is just repetition. One simple way to embed a text in a rectangle path is to use node[midway] as in

 \draw[white,fill=bookred] (current page.north west) rectangle
        ++(\paperwidth,-4cm) node[midway,font=\Large\bfseries,align=center]
        {School of Mathematics\\[1em] XYZ University};

or to add it midway to the diagonal of the rectangle

 \path ([yshift=-18cm,xshift=0.75*\paperwidth]current page.north west)
     -- ++ (0.25\paperwidth,-2)  node[midway,white,font=\bfseries,scale=1.5] {Course

Another way is to draw a node with node[draw,...].

\definecolor{bookred}{RGB}{129, 57, 55}
\definecolor{greentop}{RGB}{168, 197, 83}
\definecolor{greenbottom}{RGB}{128, 150, 64}
\definecolor{orangetop}{RGB}{230, 142, 54}
\definecolor{orangebottom}{RGB}{184, 110, 43}

\begin{tikzpicture}[overlay,remember picture,nodes={inner sep=0pt,outer sep=0pt}]
 \draw[white,fill=bookred] (current page.north west) rectangle
     ++(\paperwidth,-4cm) node[midway,font=\bfseries,align=center,scale=2]
     {School of Mathematics\\[0.5em] XYZ University};
 \draw[white,top color=greentop,bottom color=greenbottom] ([yshift=-4cm]current page.north west)
  rectangle   ++(0.75\paperwidth,-14cm);
 \draw[white,top color=orangetop,bottom color=orangebottom] ([yshift=-4cm]current
  page.north east) rectangle  ++(-0.25\paperwidth,-14cm);
 \draw[white,fill=bookred] ([yshift=-18cm]current page.north west)
 \node[scale=4,font=\bfseries,white] (title) at ([yshift=4cm]current page.center) {Book title};
 \node[scale=1.5,font=\bfseries,white,anchor=west]   at ([yshift=-2cm]title.west)
 \draw[white]  foreach \X  in {0.25,0.5,0.75}  
  {([yshift=-18cm,xshift=\X*\paperwidth]current page.north west)
  -- ++(0,-2)} coordinate(aux);
 \path ([yshift=-18cm,xshift=0.75*\paperwidth]current page.north west)
  -- ++ (0.25\paperwidth,-2)  node[midway,white,font=\bfseries,scale=1.5] {Course
 \draw[white,fill=bookred] (current page.south west) rectangle
 \draw[white,bottom color=bookred,top color=bookredtop] 
  ([yshift=2cm]current page.south west) rectangle (aux);
 \draw[white,bottom color=bluebottom,top color=bluetop] 
  ([yshift=2cm]current page.south east) rectangle (aux);
 \path ([yshift=2cm]current page.south west) -- (aux) node[midway,above
  left=-4em and -2em,align=left,scale=1.5] {Email: abc@xyz\\[1em]
  Website: \\[1em] Phone: \\[1em]};
 \path ([yshift=1cm,xshift=1em]current page.south

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .