27. Creating custom title pages

LaTeX has the capability of defining quite good looking title pages. Not easy but doable. LaTeX comes with a standard title page, but you can create your own custom title page. Using the settings in this topics, you can create a title page similar to the following. The background is a dark blue while the text is an orange colour. It makes for a striking colour contrast for the title page, but a white colour would be just as good, if not better. However, what is set here is a branding colour

Sample title page.

## Creating a title page

Here is the source that created the title page shown above.

## Adding the title page in project root file

When you create a title page, such as titlepage.tex, place it in its own subdirectory of the project directory. Then in the project root file use the \include command to add the title page to the project output.

Note: The \fancyhead command is defined within the stylesheet.

## Defining the title page colours in the stylesheet

First add the xcolor package. Next, define the colours that will be used on the title page. Of course, the background colour on the title page can be white and text colour can be black, but you can set them to whatever you want as a defined colour.

Before you include the command \input{subdir/titlepage.tex} the typesetter needs to know the depth of the Table of Contents. You do this using the following command. In this example it is set to three levels.