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'm very new to LaTeX, and I'm having a problem which seems to originate from the following lines of code.

\RequirePackage[usenames]{color}
\RequirePackage{fancyhdr}
\RequirePackage{nomencl}
\RequirePackage{titlesec}
\RequirePackage{titletoc}
\RequirePackage{url}
\urlstyle{tt}

Option clash for package color. \RequirePackage error ocurred at line \RequirePackage{fancyhdr}. Any idea?

Corresponding log output is this:

l.73 \RequirePackage
                    {fancyhdr}
The package color has already been loaded with options:
  []
There has now been an attempt to load it with options
  [usenames]
Adding the global options:
  ,usenames
to your \documentclass declaration may fix this.
Try typing  <return>  to proceed.
share|improve this question
2  
Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. –  Jubobs Dec 6 '13 at 10:48
3  
A side note (probably not a solution to your problem, but important nonetheless): you wrote that you were new to LaTeX, but you use \RequirePackage, which is most commonly used only in class files (.cls) or packages (.sty); the common way to load a package in a .tex file is with \usepackage. Did you mean to use \usepackage instead of \RequirePackage? –  Jubobs Dec 6 '13 at 10:54

2 Answers 2

fancyhdr has nothing to do with the problem. Some package you load earlier already loads color without the usenames option.

The error message shows \RequirePackage, because this command scans for a possible optional argument; the complete syntax is

\RequirePackage[<options>]{<package>}[<YY>/<MM>/<DD>]

So when processing your command, LaTeX absorbs \RequirePackage[usenames]{color} and examines the next token in order to see if it is [. Since it isn't, it processes the call and stops because of the error; the error message shows the last token read by TeX.

share|improve this answer

The error message clearly says what is wrong and what should be done to fix it. Try changing the \documentclass declaration to something similar to

\documentclass[11pt,a4paper,usenames]{article}

The exact declaration will vary but essentially adding the option usenames should fix the issue.

share|improve this answer

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.