Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an option clash between package xcolor and another package, but I don't know which. Here is my MWE

\documentclass[10pt]{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{url}
\usepackage{color}
\usepackage[usenames]{xcolor}

\author{The author}
\title{Package conflicts}
\date{October 3rd, 2012}

\begin{document}

This is supposed to be \textcolor{olivegreen}{olivegreen}
\end{document}

And the error message is :

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./error_xcolor.tex
LaTeX2e <2009/09/24>
<blablabla>
! LaTeX Error: Option clash for package xcolor.

I hope this is enough log for you guys. At this time of the day, I'm hoping for America to save my french ass ... again : )

share|improve this question
add comment

2 Answers 2

up vote 12 down vote accepted

The beamer class loads xcolor per default. You can issue the option via a beamer-option

\documentclass[10pt,xcolor={usenames}]{beamer}

olivegreen on the other hand needs the dvipsnames option and is called OliveGreen:

\documentclass[10pt,xcolor={dvipsnames}]{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{url}

\author{The author}
\title{Package conflicts}
\date{October 3rd, 2012}

\begin{document}

This is supposed to be \textcolor{OliveGreen}{olivegreen}
\end{document}

You could do

\documentclass[10pt,xcolor={usenames,dvipsnames}]{beamer}

but don't (usenames is obsolete).
As Kurt already mentioned in a comment: TeXLive 2009 is old …

share|improve this answer
add comment

that is a problem with beamer which should pass the package option not in this way. You can use

\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[10pt]{beamer}
[...]

The same problem occurs if you want to load options for package graphicx. Then you also have to use the macro \PassOptionsToPackage

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.