# Error:Option Clash for package color

I am new to LaTeX.I was trying to make my first presentation using beamer.I downloaded the required packages ,but I was getting this error

!Latex Error:Option clash for package color.


Here is the code, which I copied from here

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{beamerthemesplit}
\usecolortheme{crane}
\RequirePackage{amssymb}
\RequirePackage{amsfonts}
\RequirePackage{amsmath}
\RequirePackage[pdftex]{color,graphicx}

\begin{document}

\end{document}


I read about this error here. I also read this post,but I don't know which packages are using the color package and which package (beamerthemesplit,amsfonts,amssynb) is causing this conflict.

What should I do?

-
remove [pdftex] the system will detect that it is on pdftex and supply it automatically, and the option clash will go away –  David Carlisle Jul 16 '12 at 12:37
All the packages you're requiring are already loaded by beamer, except color, but the class loads xcolor. Say \usepackage in documents, rather than \RequirePackage. All the common packages are able to automatically supply the correct option corresponding to the TeX engine used, so passing pdftex is very rarely needed (and only for some rather esoteric package). –  egreg Jul 16 '12 at 12:50
add comment

## 2 Answers

In addition to David's suggestion, I think this is not a standard beamer code. Consider the following:

\documentclass{beamer}
\usepackage{amssymb,amsfonts,amsmath}
\usepackage{graphicx}

\usetheme{split}
\usecolortheme{crane}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}{Title}{Subtitle}
Content
\end{frame}
\end{document}


-
thanks,worked for me. –  abhi120 Jul 16 '12 at 18:13
add comment

From beameruserguide, section "2.6 Compatibility with Other Packages and Classes" (page 16).

\usepackage{color}

PRESENTATION: The color package is automatically loaded by beamer.cls. This makes it impossible to pass options to color in the preamble of your document in the normal manner. To pass a list of options to color, you can use the following class option:

\documentclass[color=⟨list of options⟩]{beamer}

Causes the list of options to be passed on to the color package. If the list of options contains more than one option you must enclose it in curly brackets.

ARTICLE: The color package is not loaded automatically if beamerarticle is loaded with the noxcolor option.

So, you should use \documentclass[color=pdftex]{beamer}, although as David already commented, pdftex option is not needed.

-
add comment