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 know hyperref is a problematic package and there are many discussion on how to avoid potential problems.

However, in this small piece of code, I am not event loading any package, and yet, I get the option clash error for the hyperref package.

Can someone please help me figure out what the problem is? If I can get this one to work, I will try my main document with many packages!

\documentclass[12pt]{report}

\usepackage{hyperref}
\hypersetup{urlcolor=blue}

\begin{document}

\chapter{chapter one}
Figure \ref{fig1} shows ...

\begin{figure}
\centering
FIGURE HERE!
\caption{caption for figure one}
\label{fig1}
\end{figure}

\end{document}
share|improve this question

closed as too localized by doncherry, Speravir, Werner, morbusg, Thorsten Mar 1 '13 at 6:52

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I work in TexMaker and use PDFLatex to compile! Any idea why I am getting this error?! –  Salman Mar 1 '13 at 1:09
1  
the actual version is Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2013.2.25). You should update ... –  Kurt Mar 1 '13 at 1:34
1  
@Salman Try deleting the auxiliary files and compiling again. –  doncherry Mar 1 '13 at 2:01
2  
@Kurt Just to avoid confusion in the future: German aktuell = English current. English actual = German eigentlich (e.g. Der eigentliche Zweck seines Besuchs war ein ganz anderer.) –  doncherry Mar 1 '13 at 2:03
1  
@doncherry thank you! I got rid of the auxiliary files and they error went away! –  Salman Mar 1 '13 at 2:43

1 Answer 1

The option clash error requires that the same package is loaded twice. The second time with at least one new option that was not given at the time, when the package was loaded first (LaTeX loads a package the first time, at subsequent loading requests it only checks the options).

Only one package is specified by the example file, thus the second load request has to be in an automatically loaded configuration file. Since option colorlinks is not given, the only configuration file is hyperref.cfg. Perhaps you are using \usepackage[...]{hyperref} there to set some options. That's pointless, LaTeX does not load the package twice. Use \hypersetup instead.

share|improve this answer

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