LaTeX forum ⇒ Document ClassesOption clash for package graphicx

Information and discussion about specific document classes and how to create your own document classes.
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:
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 include all files.
Please somebody could download it and help me to solve this problem.
Test1 is my new report project and add two line commands
(53.49 KiB) Downloaded 526 times
latex usepage graphicx.JPG
latex usepage graphicx.JPG (8.51 KiB) Viewed 54080 times

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?


User avatar
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:
\ifpdf %%Einbindung von Grafiken mittels \includegraphics{datei}
	\usepackage[pdftex]{graphicx} %%Grafiken in pdfLaTeX
	\usepackage[dvips]{graphicx} %%Grafiken und normales LaTeX

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
	\pdffalse              %%normales LaTeX wird ausgef¸hrt
	\pdftrue               %%pdfLaTeX wird ausgef¸hrt

by this

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

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 7 guests