Whenever I try to compile a document containing the geometry package, no matter how simple it may be, I always get an error message. I've never had this problem before.




Error message:

! Undefined control sequence. \Gm@detectdriver ...driver: auto-detecting}\ifpdf \ifx \pdfextension @undef... l.4 \begin{document} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., '\hobx'), type 'I' and the correct spelling (e.g., 'I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Extra \fi.

  • Can you show your complete .log file?
    – Kate
    Feb 7, 2020 at 14:25
  • 2
    Works fine for me on a current texsystem. You probably have outdated packages. Feb 7, 2020 at 14:25
  • Not the problem, but 14pt does not exist by default
    – Kate
    Feb 7, 2020 at 14:26
  • No problem here either on an up to date TeXLive 2019. My guess: you're on miktex. Please make sure to update miktex in both miktex user mode and miktex admin mode. Additionally you'll probably need to manually update the package list before that. It is all in the menus of the miktex console programme.
    – daleif
    Feb 7, 2020 at 14:34
  • 1
    is that the first error or did you get an earlier error about a missing ifpdf.sty file? Feb 7, 2020 at 14:55

1 Answer 1


I have reinstalled MikTeX 2.9 and updated it many times. But I still get a similar error:



(C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-dvips.def) No file geo.aux. geometry driver: auto-detecting ! Undefined control sequence. \Gm@detectdriver ...driver: auto-detecting}\ifpdf \ifx \pdfextension >@undef... l.4 \begin{document}

  • You should post another question instead post an answer here.
    – Tom
    Jun 20, 2022 at 2:39
  • This is not an answer to the question. Please post your own.
    – Ingmar
    Jun 20, 2022 at 4:41

You must log in to answer this question.

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