10

This is my first time to try and write documentation by using LaTeX. The generated PDF is quite impressive, but there is one thing I have no idea of how to do it:

I would like to have the left 1/3 of my title page (created by titlepage) filled with color (no left and top, bottom margin), and then put the title text on it. The title will be centered, so its left part could overlap with the colored left 1/3 of the page.

Is it doable? What is the best way? Can the picture environment do this?

(The documentclass is [a4paper]{report}.)

lockstep
  • 250,273
murphytalk
  • 203
  • 2
  • 5

2 Answers2

15

You can use TikZ for this (although I'm almost certain that if all you need is a coloured rectangle, someone else will come up with a solution that does not require a full-fledged graphics package).

The TikZ command needs to be supplied to the \title{} entry to make sure it gets drawn with the title page.

\documentclass[a4paper]{report}
\usepackage{tikz}

\title{\tikz[remember picture,overlay] \draw [fill,red!20] (current page.north west) rectangle +(0.33\paperwidth,-\paperheight);%
Rather Long Document Title to Show that the Colour is Behind the Title}
\author{John Doe}

\begin{document}
\maketitle

\end{document}

Title Page, one third red, with TikZ

Jake
  • 232,450
  • Thank you for your prompt answer! Too bad that the tetex @ cygwin I am using doesn't come with this package,but it is still a elegant way to address my problem.Thank you! – murphytalk Feb 09 '11 at 13:49
  • 3
    @murphytalk if at all possible you should switch from tetex to a newer distribution like TeXlive – Seamus Feb 24 '11 at 14:58
15

A simple solution, without complex drawing packages:

\documentclass{report}
\usepackage{xcolor}
\usepackage{eso-pic}

\begin{document}

\begin{titlepage}
\AddToShipoutPictureBG*{\AtPageLowerLeft{%
  \color{blue!20}\rule{.33\paperwidth}{\paperheight}}}
Title
\end{titlepage}

bar
\newpage

blah

\end{document}
Leo Liu
  • 77,365