Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). You don't have to sign with your name since it automatically appears in the lower right corner of your post. –  egreg Nov 10 '12 at 11:19
2  
The pdftex option should never be passed to graphicx, which is able to guess it by itself. –  egreg Nov 10 '12 at 11:20
2  
TikZ loads graphicx automatically and both know what to do when you choose a driver. –  percusse Nov 10 '12 at 11:20

1 Answer 1

up vote 11 down vote accepted

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.

share|improve this answer
    
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}. –  Ricardo Nov 15 '12 at 9:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.