# Can't get \fancyheadoffset to work

I have loaded the `fancyhdr` package and I want to make the headers and footers wider (clamp them to the margin), so I inserted the following line after the package has loaded:

`\fancyheadoffset[LE,RO]{\marginparsep + \marginparwidth}`

This is from an example in the document Page layout in LaTeX. But when I try to compile I get the following error:

`Missing number, treated as zero`

two times, and equally many plus signs in my document. When I enter `\marginparsep` in the body text, I also found that this gave the same error message. Why is it missing? I need it! :P

-
If you look closely, the line above the one you mention from the document you cite is precisely `\usepackage{calc}`. It's always best to try making a minimal example: very often this allows to sort out the problem. –  egreg May 29 '12 at 21:35
Please consider accepting those answers that you think best solved your problems; in case of doubt, please see How do you accept an answer?. –  Gonzalo Medina May 30 '12 at 13:50
@Gonzalo Medina: Done. For some reason almost no buttons on this page work from the computer I normally use so I couldn't accept your answer until now. –  StrawberryFieldsForever Jun 1 '12 at 8:12
@StrawberryFieldsForever no problem, and thanks for accepting the answer. I will delete this comment and my previous one shortly. –  Gonzalo Medina Jun 1 '12 at 20:18

You have two options:

1. Load the `calc` package:

``````\usepackage{calc}
2. Use the e-TeX `\dimexpr`:
``````\fancyheadoffset[LE,RO]{\dimexpr\marginparsep+\marginparwidth\relax}