On 27 March 2012 18:58, Frank Küster <frank@debian.org> wrote: > 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: > yeah, graphics.sty is loaded , but not graphicx.sty :-) > (/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. > It did fix the error , but led to another error. \includegraphics cannot load the file . To simplify the problem and still keep the situation I come across: files: test.tex and sequence.1(generated by metapost) 1. $ cat test.tex \documentclass[11pt]{article} \usepackage{fontspec} \usepackage{listings} \usepackage{color} %\usepackage[BoldFont,SlantFont,CJKchecksingle]{xeCJK} \usepackage{amsmath} \usepackage[dvips]{graphicx} \begin{document} foo\\ \includegraphics{sequence.1} \end{document} it compiles with error : ! LaTeX Error: Option clash for package graphicx. 2. put the \usepackage[dvips]{graphicx} before fontspec, and save it as test1.tex . $ diff test1.tex test.tex 2d1 < \usepackage[dvips]{graphicx} 7a7 > \usepackage[dvips]{graphicx} it compiles with error: ! Unable to load picture or PDF file 'sequence.1'. 3. put the dvips option in \documentclass and remove the \usepackage[dvips]{graphicx}, then save it as test2.tex. $ diff test2.tex test.tex 1c1 < \documentclass[11pt,dvips]{article} --- > \documentclass[11pt]{article} 6a7 > \usepackage[dvips]{graphicx} it compile fine and generated the expected PDF with sequece.1 in it. Anyway, graphicx is loaded earlier than I expect and putting it before fontspec cannot fix the problem completely. > Regards, Frank > -- > Frank Küster > Sprecher B90/Grüne OV Miltenberg und Umgebung > VCD Miltenberg, ADFC Aschaffenburg-Miltenberg > Debian Developer (TeXLive) -- ________________________ Yes, I use Debian GNU/L wolf python london(WPL) Do as you soul should do ! ________________________
Attachment:
test.tex
Description: TeX document
Attachment:
test1.tex
Description: TeX document
Attachment:
test2.tex
Description: TeX document
Attachment:
sequence.1
Description: Binary data