[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: option clash for package graphicx



Frank Küster <frank@debian.org> wrote:

> wolf python london <lyh19901223@gmail.com> wrote:
>
>> when compiling it with xelatex, it shows** ! LaTeX Error: Option clash
>> for package graphicx**.
>> Obviously , graphicx has been loaded before \usepackage[dvips]{graphix}.
>
> Yes, looks like.
>
>> However , it compiles fine in Funtoo, which has texlive-2011-r1.
>> I'm not sure whether this is a bug or anything else. Can any
>> maintainer point something out for
>> me? 
>
> I tried with this document:
[...]
> and got no error and this log:

Rubbish, that was on a stable system, sorry.

However, on an unstable system, I get a different error:

(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd)kpathsea: Invalid fontname `[lmroman10-regular]', contains '['

! Font EU1/lmr/m/n/10=[lmroman10-regular]:mapping=tex-text at 10.0pt not loadab
le: Metric (TFM) file or installed font not found.
<to be read again> 
                   relax 
l.100 \fontencoding\encodingdefault\selectfont
                                              
? 
But anyway the log shows that graphics.sty is loaded early:

(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3names.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetex-def/xetex.def))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty

Actually fontspec requires expl3.sty, and that has now a 

\ifodd \l@expl@native@drivers@bool \relax
\else
  \RequirePackage { color , graphics }
\fi

I don't grok the boolean setting, but anyway moving the graphics line
before loading fontspec "fixes" the error for me. Meaning I still get
the font errors, and it still writes a PDF which doesn't make any sense
with a dvips driver.

Regards, Frank
-- 
Frank Küster
Sprecher B90/Grüne OV Miltenberg und Umgebung
VCD Miltenberg, ADFC Aschaffenburg-Miltenberg
Debian Developer (TeXLive)


Reply to: