# How to get a colored box as the header?

I want to produce this particular template in LaTeX. With no page numbering, and rectangles in colours in a a4paper.

-
I think this question is too localised. "How to create this exact layout" is not a good question for the Q&A format. Perhaps rephrase the question to ask about one specific thing you're having trouble doing. What have you tried so far? –  Seamus Nov 1 '11 at 12:46
@Patrick: This question shows no effort whatsoever. At least getting rid of page numbers is trivial (to find out about), even for beginners. Finding out about headers isn't too hard, either. The colored box is trickier; asking about that would be a specific and valid question. The way it is now, it smells too much like "please do the work for me" if you're asking me. Thinking about tex.sx as a resource for other users, it's pretty unlikely other users will benefit a lot from this question, unless they're searching for "this particular template" ... –  doncherry Nov 1 '11 at 13:15
Have a look at Title page using TikZ which should also work for general headers. Just put the tikzpicture environment in the header. –  Martin Scharrer Nov 1 '11 at 13:28
No page numbering trivial: agree. Colored box trivial: agree. But this color box in header is not trivial for me, and that is the question, and I dont want "anyone do the work for me", maybe my english is poor (Im Chilean Math&Stat teacher at University) sorry for that but this Q&A format page is the best way to question for that... And I love this page (Is my Homepage in Safari!!). –  hsigrist Nov 1 '11 at 13:32
@Patrick If the question were rephrased to "How do I create a coloured header, then I think it would be a great, focused, answerable, useful question. How about it, @hsigrist? –  Seamus Nov 1 '11 at 15:19

Eventhough this question does not show a large amount of effort on your part, you can remove page numbering with \thispagestyle{empty}. To draw the box you desire at the top of the page, you can use TikZ.

\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\def\particulartemplate#1{
\thispagestyle{empty}
\begin{tikzpicture}[overlay, remember picture]
\draw let \p1 = (current page.west), \p2 = (current page.east) in
node[minimum width=\x2-\x1, minimum height=2cm, draw, rectangle, fill=blue!20, anchor=north west, align=left, text width=\x2-\x1] at ($(current page.north west)$) {\Large\bfseries \quad #1};
\end{tikzpicture}
}
\begin{document}
\chapter{Chapter one}
\particulartemplate{NATURAL SCIENCES}
\lipsum[1-7]
\end{document}


This will make every page on which you invoke \particulartemplate{Text for box} to be layed out according to your particular template. The example code provided will look like this:

It should be relatively straightforward to modify this code to be a little more flexible. (As in, take the color as an argument, whether or not there should be a border, how the text should be justified, etc.)

-
I use texlive2011, compile this code under PDFTeXify two times, then get the image. But when I compile it under XeLaTeX two times, the "NATURAL SCIENCES" is in the top of the box. Sometimes, XeLaTeX makes a problem. –  Pig Cry Nov 1 '11 at 14:12