For a small project, I'm trying to feel something as if it should be peanuts, but au contraire (Hey, this French, never thought that I remember some parts of it). The fact is that I want a latex layout where the header and footer cover the entire width of the page and have a background color, and can also have some elements to the left, center or right (for example, with fancyhdr). The thing is, I just can't get this to work without clogging the rest of the layout. What I want is more clear from the image located here (I still cannot include the image): http://img641.imageshack.us/img641/2128/exampletexfile.png
edit: added example.
Here is an example of what I have tried. The title does not display correctly because the background does not cover the entire width of the page. The footer is not displayed at all.
\documentclass[10pt,a4paper,notitlepage]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames]{color}
\usepackage{fancyhdr}
\usepackage{calc}
\usepackage{tikz}
\usepackage[landscape, top=0cm, bottom=3cm]{geometry}
\definecolor{logoGreen}{RGB}{218,226,87}
\newcommand{\HBG}{
\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-2cm] at (current page.north west)
{
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=logoGreen] (0,0) rectangle (\paperwidth,2cm);
\end{tikzpicture}
};
\end{tikzpicture}
}
\fancyhead{}
\fancyhead[L]{\HBG}
\fancyhead[C]{\includegraphics[height=1.2cm]{"img/headerimg"}}
\fancyfoot[C]{\includegraphics[height=1.2cm]{"img/footerimg"}}
\fancyhfoffset[]{1in+\hoffset+\oddsidemargin}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\headheight 3cm
\footskip -2cm
\pagestyle{fancy}
\begin{document}
\section{first section}
content
\end{document}
source
share