3

I am working off a template. I recently updated my TeXLive from 2009 to 2012. One issue I am having is with the following like

\usepackage[usenames,dvipsnames]{color}

When I use this I get now numerous errors. Errors that didn't exist when I use xeLaTeX in TeXLive 2009. The errors look like:

) (/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))
(/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))

! LaTeX Error: Option clash for package color.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

If I change the package name color to xcolor it fixes the issue. Why is this?

MWE:

% compile with xelatex
\documentclass[11pt]{article}
\usepackage{fancyhdr}                   % url not needed if hyperref used
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[usenames,dvipsnames]{color}
\usepackage{hyperref}                   % added to generate the error message
\begin{document}
\texttt{\href{mailto:bob@gmail.com}{bob@gmail.com}}
\end{document}
percusse
  • 157,807
Bobdul
  • 3,217
  • 4
    This question is very similar to When to use the xcolor package instead of the color package?. Please take a look at it as the information there might help you. If so, that's great, and we'll probably close this question as a duplicate just to keep the place tidy and to help people find answers quickly. – doncherry Jan 11 '13 at 03:04
  • That questions answers one of my questions. I still would like to learn if possible why it fails with color but works fine with xcolor. – Bobdul Jan 11 '13 at 03:11
  • 1
    @Bobdul can you provide a complete MWE for folks to play with? – cmhughes Jan 11 '13 at 03:36
  • @cmhughes please see OP. I added it there for formatting – Bobdul Jan 11 '13 at 03:48
  • 1
    Probably, one of the packages implicitly loads color package before you load it explicitly and that creates an option clash. – percusse Jan 11 '13 at 03:59
  • @Bobdul Fair enough; in this case, I recommend changing the question title to something more specific, probably aiming at a specific (alleged) incompatibility. In your MWE, however, the only error I get is about \href not being defined, both with MiKTeX 2.9 and TeX Live 2012. – doncherry Jan 11 '13 at 04:01

0 Answers0