Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Option clash in memoir and graphicx

103 views
Skip to first unread message

Troels Pedersen

unread,
Aug 5, 2008, 8:01:25 AM8/5/08
to
Hi all

I want to use the draft mode in memoir, but would like to see the
figures. I have therefore in the preamble

\documentclass[draft]{memoir}
.
.
.
\usepackage[final]{graphicx}
.
.
.


I get this error:
! LaTeX Error: Option clash for package graphicx.


In the manual of graphicx it says that the draft or final option
overrides the option given in the documentclass...

Any suggestions?

/Troels

Martin Heller

unread,
Aug 5, 2008, 8:19:04 AM8/5/08
to
Troels Pedersen skrev:

> In the manual of graphicx it says that the draft or final option
> overrides the option given in the documentclass...
>
> Any suggestions?

\PassOptionsToPackage{final}{graphicx}
\documentclass[draft]{memoir}
\usepackage{graphicx}

But I think you should report this to Peter Wilson, the author of
memoir.

Ulrike Fischer

unread,
Aug 5, 2008, 8:26:45 AM8/5/08
to
Am Tue, 05 Aug 2008 14:01:25 +0200 schrieb Troels Pedersen:

> Hi all
>
> I want to use the draft mode in memoir, but would like to see the
> figures. I have therefore in the preamble
>
> \documentclass[draft]{memoir}

> \usepackage[final]{graphicx}

> I get this error:
> ! LaTeX Error: Option clash for package graphicx.

\documentclass[draft]{memoir}
\usepackage[final]{graphicx}

\begin{document}
x
\end{document}

works fine for me. So I guess the clash is somewhere else.

--
Ulrike Fischer

Martin Heller

unread,
Aug 5, 2008, 8:34:47 AM8/5/08
to
Martin Heller skrev:

> But I think you should report this to Peter Wilson, the author of
> memoir.

Maybe not. I think memoir is working correctly but you are
loading some package that loads graphicx before you pass the
final option

For example:

\documentclass[draft]{memoir} % or book, or...
%\usepackage[final]{graphicx} % works
\usepackage{overpic} % loads graphicx
\usepackage[final]{graphicx} % throws an error

\begin{document}
Foo
\end{document}

Heiko Oberdiek

unread,
Aug 5, 2008, 8:45:40 AM8/5/08
to
Troels Pedersen <tro...@es.auc.dk> wrote:

> I want to use the draft mode in memoir, but would like to see the
> figures. I have therefore in the preamble
>
> \documentclass[draft]{memoir}
> .
> .
> .
> \usepackage[final]{graphicx}

> I get this error:


> ! LaTeX Error: Option clash for package graphicx.

memoir doesn't load package graphicx (version 2008/07/23
v1.6180339). Probably you are using an other package in
between that loads graphicx (see your .log file).

> In the manual of graphicx it says that the draft or final option
> overrides the option given in the documentclass...

But if the package is already loaded with the wrong option,
LaTeX doesn't load it twice, it just checks the options for
clashes.

> Any suggestions?

Load graphicx earlier:

\documentclass[draft]{memoir}
\usepackage[final]{graphicx}

Or use Martin Heller's idea with \PassOptionsToPackage.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Troels Pedersen

unread,
Aug 5, 2008, 9:13:15 AM8/5/08
to

Thanks Ulrike!

By accident I also loaded the epsfig package somewhere before I loaded
graphics. epsfig uses the draft option which apparantly affects graphicx.

As usual the error is never where you think it is ;-)

Thanks again
/Troels

Lars Madsen

unread,
Aug 5, 2008, 11:53:40 AM8/5/08
to

epsfig is just a compatibility interface to graphicx

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

Troels Pedersen

unread,
Aug 5, 2008, 12:38:20 PM8/5/08
to
Lars Madsen wrote:
> Troels Pedersen wrote:
>> Ulrike Fischer wrote:
>>> Am Tue, 05 Aug 2008 14:01:25 +0200 schrieb Troels Pedersen:
>>>
>>>> Hi all
>>>>
>>>> I want to use the draft mode in memoir, but would like to see the
>>>> figures. I have therefore in the preamble
>>>>
>>>> \documentclass[draft]{memoir}
>>>
>>>> \usepackage[final]{graphicx}
>>>
>>>> I get this error:
>>>> ! LaTeX Error: Option clash for package graphicx.
>>>
>>> \documentclass[draft]{memoir}
>>> \usepackage[final]{graphicx}
>>>
>>> \begin{document}
>>> x
>>> \end{document}
>>>
>>> works fine for me. So I guess the clash is somewhere else.
>>
>> Thanks Ulrike!
>>
>> By accident I also loaded the epsfig package somewhere before I loaded
>> graphics. epsfig uses the draft option which apparantly affects graphicx.
>>
>> As usual the error is never where you think it is ;-)
>>
>> Thanks again
>> /Troels
>
> epsfig is just a compatibility interface to graphicx
>
>
>
I know that- but I did not spot the \includepackage{epsfig} in my
titanic preamble. Apparently epsfig used the draft option whereas
graphicx used the final option.

/Troels

Lars Madsen

unread,
Aug 6, 2008, 4:28:05 AM8/6/08
to

it is quite a good idea to keep these preambles cleanup and documented

Robin Fairbairns

unread,
Aug 6, 2008, 10:34:37 AM8/6/08
to
Troels Pedersen <tro...@es.auc.dk> writes:

>Lars Madsen wrote:
>> epsfig is just a compatibility interface to graphicx

or a "serious nuisance" (as i like to think of it).

>I know that- but I did not spot the \includepackage{epsfig} in my
>titanic preamble. Apparently epsfig used the draft option whereas
>graphicx used the final option.

in fact, the rule is that you mayn't specify any option that isn't in
the stored list for the package. thus you get the error if you say:

\usepackage{graphicx}
\usepackage[final]{graphicx}

even though the first load used 'final' because it's the default.
--
Robin Fairbairns, Cambridge

Troels Pedersen

unread,
Aug 6, 2008, 11:06:12 AM8/6/08
to

>> I know that- but I did not spot the \includepackage{epsfig} in my
>> titanic preamble. Apparently epsfig used the draft option whereas
>> graphicx used the final option.
>>
>> /Troels
>
> it is quite a good idea to keep these preambles cleanup and documented
>
>
Again I agree - however I am collecting inputs from about 50 others -
they all used different packages, costum defined commands, etc. ...
A lot of tedious work.

For the record, this particular problem has solved now.

/Troels

Lars Madsen

unread,
Aug 6, 2008, 12:01:54 PM8/6/08
to

tell me about it.

might have been better to use pdfpages or the combine class. Then each
document could be prepared on its own and then combined, a bit easier
than trying to merge 50 contributions.

especially if one author uses \R for one thing, and another uses it for
something completely different.

Out of interest, what are you creating since it has EU requirements?

Troels Pedersen

unread,
Aug 7, 2008, 5:27:31 AM8/7/08
to
Lars Madsen wrote:
> tell me about it.
>
> might have been better to use pdfpages or the combine class. Then each
> document could be prepared on its own and then combined, a bit easier
> than trying to merge 50 contributions.
A no-go the individual contributions are sections/subsection parts of a
single report. There is some \ref's between sections aswell.

> especially if one author uses \R for one thing, and another uses it for
> something completely different.

Luckily this gives a compilation error (been there done that ;-)

>
> Out of interest, what are you creating since it has EU requirements?
>

A deliverable for an EU financed project.

/Troels

0 new messages