# graphics in style file

I aim to create a reporting template for other TeX users to use at our work. My objective is creating an `.sty` file. The specifications are fairly simple but one is causing grief: that is including our logo in the upper left for a header. I've used the `fancyhdr` program to create a fancyhead like the following:

``````\RequirePackage{fancyhdr}
\fancypagestyle{everypage}{
\fancyhf{}
\fancyhead[L]{\huge{Report name} \\ \normalsize{\today}}

\fancyfoot[L]{XXX}
\fancyfoot[C]{YYY}
\fancyfoot[R]{ZZZ}

\renewcommand{\textheight}{6in}
}
\pagestyle{everypage}
\AtBeginDocument{\thispagestyle{everypage}}
``````

But when compiling a `tex` document with this, I get the following error:

``````[Loading MPS to PDF converter (version 2006.09.02).]
) <LOGO.JPG, id=1, 154.6578pt x 51.0708pt> <use LOGO.JPG>
! You can't use `the character .' after \the.
``````

Any idea what's going on here?

-
Werner's answer is good, of course; but also don't set the two lengths as part of `everypage`; just put the (correct) declarations after the closing brace or use `geometry`. Your `\AtBeginDocument` does nothing. –  egreg Sep 24 '12 at 20:37

``````\setlength{\headheight}{.5in}
not `\renewcommand`. Also, consider setting document elements affecting the page margins/size via `geometry`.