XeTeXmemoir, pdfpages | Option Clash with XeTeX

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
uwezi
Posts: 2
Joined: Thu Nov 10, 2011 11:54 am

memoir, pdfpages | Option Clash with XeTeX

Post by uwezi »

Hello!

Since yesterday I am a convert from pdfLaTeX to XeTeX because I have to write a report in certain MS Windows fonts... So far I wonder why I haven't tried XeTeX earlier!

But using the memoir class and the pdfpages package I get an option clash error in the graphicx package which is loaded twice. Even if I give the global xetex option, memoir appears to be loading graphicx without this option.

Minimal not-working example

Code: Select all

\documentclass[xetex]{memoir}
\XeTeXinputencoding latin1 %
\usepackage{fontspec}
\usepackage{pdfpages}

\begin{document}
  Hello world!
\end{document}
XeTeX output
! LaTeX Error: Option clash for package graphicx.
...
The package graphicx has already been loaded with options:
[]
There has now been an attempt to load it with options
[xetex]
Adding the global options:
,xetex
to your \documentclass declaration may fix this.
Minimal working example

Code: Select all

\PassOptionsToPackage{xetex}{graphicx}
\documentclass[xetex]{memoir}
\XeTeXinputencoding latin1 %
\usepackage{fontspec}
\usepackage{pdfpages}

\begin{document}
  Hello world!
\end{document}


Uwe.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir, pdfpages | Option Clash with XeTeX

Post by localghost »

No problem here. But what do you expect from the »xetex« option for the document class? Where is the added value?


Best regards and welcome to the board
Thorsten
uwezi
Posts: 2
Joined: Thu Nov 10, 2011 11:54 am

memoir, pdfpages | Option Clash with XeTeX

Post by uwezi »

Hi Thorsten and thanks!

I forgot to mention my system: MikTeX 2.9 on Windows 7 with up-to-date packages as of November 2011. Especially
  • XeTeX, Version 3.1415926-2.3-0.9997.5
  • memoir 2011/03/06 v3.6j
  • fontspec 2011/09/18 v2.2a
  • pdfpages 2011/03/10 v0.4n
  • graphicx 1999/02/16 v1.0f ?
Well, I don't know what to expect from the xetex option, since I do not have an insight in all class and packages codes, but the option is provided by many packages.

...and in the old times (late 1990s) when I converted from LaTeX to pdfLaTeX it was important to give the corresponding class option, especially with regard to the inclusion of graphics(x)...

Uwe.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir, pdfpages | Option Clash with XeTeX

Post by localghost »

uwezi wrote:[…] I forgot to mention my system: MikTeX 2.9 on Windows 7 with up-to-date packages as of November 2011. Especially
  • XeTeX, Version 3.1415926-2.3-0.9997.5
  • memoir 2011/03/06 v3.6j
  • fontspec 2011/09/18 v2.2a
  • pdfpages 2011/03/10 v0.4n
  • graphicx 1999/02/16 v1.0f ?
[…]
I'm not able to make use of that because I'm not running a Wind0ws system (see my signature). My version of the XeTeX engine on Linux is the same as yours. Here is a complete list of the used files. Packages might not be completely up to date.

Code: Select all

 *File List*
  memoir.cls    2011/03/06 v3.6j configurable book, report, article document class
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
   mem10.clo    2008/01/30 v0.3 memoir class 10pt size option
mempatch.sty    2009/07/24 v6.0f Patches for memoir class v1.6180339
fontspec.sty    2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX
   expl3.sty    2011/04/09 v2222 L3 Experimental code bundle wrapper
 l3names.sty    2011/01/08 v2122 L3 Experimental Naming Scheme for TeX Primitives
l3basics.sty    2011/04/23 v2246 L3 Experimental basic definitions
 l3expan.sty    2011/04/09 v2223 L3 Experimental Argument Expansion module
    l3tl.sty    2011/04/09 v2223 L3 Experimental Token Lists
   l3int.sty    2011/04/11 v2229 L3 Experimental Integer module
 l3quark.sty    2011/04/14 v2234 L3 Experimental Quark Commands
   l3seq.sty    2011/04/21 v2245 The LaTeX3 kernel: sequences and stacks
  l3toks.sty    2011/04/09 v2223 L3 Experimental Token Registers
   l3prg.sty    2011/04/09 v2223 L3 Experimental control structures
 l3clist.sty    2011/04/09 v2223 L3 Experimental comma separated lists
 l3token.sty    2011/04/09 v2223 L3 Experimental token investigation and manipulation
  l3prop.sty    2011/04/09 v2223 L3 Experimental Property Lists
   l3msg.sty    2010/10/02 v2052 L3 Experimental LaTeX Messages module
    l3io.sty    2010/10/03 v2063 L3 Experimental i/o module
  l3skip.sty    2011/02/15 v2149 L3 Experimental skip registers
   l3box.sty    2011/04/09 v2223 L3 Experimental Box module
l3keyval.sty    2011/04/09 v2223 L3 Experimental keyval processing
  l3keys.sty    2010/11/11 v2082 L3 Experimental key-value support
l3precom.sty    2011/04/09 v2223 L3 Experimental precompilation module
  l3xref.sty    2011/04/09 v2223 L3 Experimental cross referencing
  l3file.sty    2011/04/21 v2242 The LaTeX3 kernel: file operations
    l3fp.sty    2011/03/19 v2201 L3 Experimental floating-point operations
l3luatex.sty    2010/07/18 v1985 L3 Experimental LuaTeX functions
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
  xparse.sty    2011/04/08 v2219 Generic document command parser
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
fontspec-patches.sty    2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX
fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
 fontenc.sty
  eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
  eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty    2010/11/06 v0.96 provides access to latin accents and many other characters in Unicode lower plane
fontspec.cfg
pdfpages.sty    2011/03/10 v0.4n Insert pages of external PDF documents (AM)
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
 eso-pic.sty    2010/10/06 v2.0c eso-pic (RN)
atbegshi.sty    2011/01/30 v1.15 At begin shipout hook (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)
 ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
   xetex.def    2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)

graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
 ppxetex.def    2011/03/10 v0.4n Pdfpages driver for XeTeX (AM)
 ***********
You can obtain this list by adding the \listfiles command as very first line to your example and searching the log file. The list is located near the end of the log.
uwezi wrote:[…] Well, I don't know what to expect from the xetex option, since I do not have an insight in all class and packages codes, but the option is provided by many packages.

...and in the old times (late 1990s) when I converted from LaTeX to pdfLaTeX it was important to give the corresponding class option, especially with regard to the inclusion of graphics(x) […]
Welcome to LaTeX in the 21st century! Nowadays those driver options like »xetex« are not necessary any more since packages which could use them detect on their own which compiler engine is running. So it won't do harm if you drop it. I can't advise any further since the problem you described does not exist for me.
Post Reply