I'd like to have a colored box in the upper part of every page. Even though it's a simple task, I cannot make it work. Having looked for answers here and in the eso-pic package discription does not bring me any further.
Neither playing around with minipages as suggested here http://en.wikibooks.org/wiki/LaTeX/Tips_and_Tricks#Sidebar_with_information has solved it.
This is what I came up with so far:
\documentclass[12pt,a5paper]{article}
\usepackage{geometry}
\usepackage{eso-pic,xcolor,lipsum}
\pagestyle{empty}
\AddToShipoutPictureBG{
\AtPageUpperLeft{
{\color{red}%
\rule[-1cm]%offset PageBorder
{\paperwidth}%{14.8cm}
{1cm}%height
}
}
}
\begin{document}
\lipsum
\end{document}
When I run pdfLaTeX, I always have a small gap, say .1mm on the left border. Did not dare to try that How to I reduce space before and after HRule? , though.
Any help is greatly appreciated.
%symbol:\AtPageUpperLeft{%– cmhughes Jun 11 '14 at 19:45Anyhow, there are still two questions; (1) Would you solve the issue in a more elegant way and (2) can you mark this as an answer for me to give you points?
– lactea Jun 11 '14 at 19:50