I am trying to use hyperref in my tex file.. here is a minimal working example.. which gives me the option clash error
\documentclass[12pt]{report}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=black,
citecolor=black,
filecolor=black,
urlcolor=black,
}
\begin{document}
\end{document}
Everything was working fine earlier, but I had to reinstall my Ubuntu and now when I compile I get the error Option clash for package hyperref
I am NOT explicitly calling hyperref twice. I only want to call it once. The thing is I had fixed the problem many months back, and now I just do not remember how I did it 🙁 and this is driving me crazy.
UPDATE:
This is my precise output from command line pdflatex.exe with the above MWE. I get the same error for the MWE. The line 102 mentioned below is from hyperref.sty .. i found out by grepping in the folder.. what does that mean?
! LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.102 \usepackage
[numbered]{hypdoc}
? H
The package hyperref has already been loaded with options:
[]
There has now been an attempt to load it with options
[colorlinks,hyperindex=false,pdfusetitle,pdfpagelabels]
Adding the global options:
,colorlinks,hyperindex=false,pdfusetitle,pdfpagelabels
to your \documentclass declaration may fix this.
Try typing <return> to proceed.
Best Answer
I guess you have an outdated system or you have an local tree, which containes an outdated package
hyperref
, callinghypdoc
as you can see in the error message, you cited.With the current MiKTeX, version
pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2015.7.19)
I added a command\listfiles
(before\documentclass{}
) to get a ist of used packages and versions on my system. You will found this list at the end of your.log
file:Please compare with you system. I guess you will find some differences ...