I try to follow this scheme :

If not DeclareOption

but have an error of this type :

I get an error when using `\ExecuteOptions` together with `\usepackage{geometry}`

but I don't understand how to fix it.

Here is my MWE :

\usepackage[marginparsep=3pt, top=2cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}








\fancyhead[R]{27 mai 2015}
\fancyhead[C]{\textbf{Devoir commun}}

  • Is the first snippet supposed to be bob.sty?
    – Johannes_B
    May 7, 2015 at 8:40

1 Answer 1


The problem seems very similar to SF298 package giving undefined control sequence error and seems due to the same problem: both geometry and totpages do some tricks with \ExecuteOptions which end up with \CurrentOption defined as \@nil.

As soon as you load any other package after geometry this problem vanishes, but it's clearly a bug.

Minimal example:


which shows, on the terminal,

> \CurrentOption=macro:
->\@nil .

Workaround: add \def\CurrentOption{} after loading geometry or move the call to geometry before calling fontenc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .