LaTeX forum ⇒ Document ClassesOption clash for package graphicx

Information and discussion about specific document classes and how to create your own document classes.
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Option clash for package graphicx

Postby akira32 » Thu Jun 19, 2008 7:35 am

I Add the line as below:
\usepackage{graphicx}
But it appears a error message as the attached picture:
LaTex Error: option clash for package graphicx.

My report project is a new project that just add the line of " \usepackage{graphicx} " and " \includegraphics[width=\textwidth , bb= 20 20 575 575]{test.jpg}".
I compress my report project to test1.zip include all files.
Please somebody could download it and help me to solve this problem.
Attachments
Test1.rar
Test1 is my new report project and add two line commands
(53.49 KiB) Downloaded 523 times
latex usepage graphicx.JPG
\usepackage{graphicx}
latex usepage graphicx.JPG (8.51 KiB) Viewed 53724 times

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Postby balf » Thu Jun 19, 2008 10:11 am

Probably you have another package or your document class that loads graphicx with an option. What is your preamble?

B.A.

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Thu Jun 19, 2008 10:47 am

You are loading the graphicx package twice, the first one right after \documentclass and the second one here:
  1. \ifpdf %%Einbindung von Grafiken mittels \includegraphics{datei}
  2. \usepackage[pdftex]{graphicx} %%Grafiken in pdfLaTeX
  3. \else
  4. \usepackage[dvips]{graphicx} %%Grafiken und normales LaTeX
  5. \fi

By the way, you are using obsolete patterns. LaTeX can detect automatically if compilation is done via pdfLaTeX or via normal LaTeX. So graphicx is loaded with the appropriate driver. The \ifpdf conditional is not really necessary. If you do want to keep it, at least replace this
  1. \newif\ifpdf
  2. \ifx\pdfoutput\undefined
  3. \pdffalse %%normales LaTeX wird ausgef¸hrt
  4. \else
  5. \pdfoutput=1
  6. \pdftrue %%pdfLaTeX wird ausgef¸hrt
  7. \fi

by this
  1. \usepackage{ifpdf}

You don't need the \DeclareGraphicsExtensions command too... Or \pagestyle{empty} before \maketitle.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Postby akira32 » Thu Jun 19, 2008 11:11 am

Thank you! I had solved this problem.
I remove the line of " \usepackage{graphicx} ", then no error appears.


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 6 guests