14

The following code fails Option clash for package graphicx, it seems to be an incompatibility between the package graphicx (when the option pdftex is used) and the package tikz.

\documentclass[a4paper,10pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{tikz}
\usepackage[pdftex]{graphicx}

\begin{document}

    The lazy dog...

\end{document}

I am currently working with Debian wheezy (updated as of 10th November 2012), and the latest TeXLive LaTeX distribution included.

Any ideas?

Heiko Oberdiek
  • 271,626
nsx
  • 671

2 Answers2

33

The tikz package already loaded the graphicx package, so you can't load it again. Trying to load it with different options will cause the "Option clash" error. You can use \PassOptionsToPackage{<options>}{graphicx} before loading tikz to pass any additional options to the internally loaded graphicx. However, you do not need and should not use the pdftex option manually with modern LaTeX distributions. Packages which are driver dependent are very well capable to detect the right driver by themselves and providing a wrong one causes all kinds of trouble.

Martin Scharrer
  • 262,582
  • Ok, thank you very much for your answer. I already found out that what you say is correct: I do not need to call {pdftex}{graphicx}, eps figures included are automatically and correctly converted to .pdf by {graphicx}. – nsx Nov 15 '12 at 09:05
3

Put the tikz package before the graphicx package, that's what I did when I had the same problem by using the final option of the graphicx packages with the tikz package and it works.