Discussion:
Help with hyperref
(too old to reply)
SOP
2006-02-28 10:58:00 UTC
Permalink
Hi guys!

I have been searching for a way to remove the boxes that appear around
links when I compile using pdfLaTeX. I have tried the hyperref package,
but it doesn't seem to work with pdfLaTeX, only with pdfTeX.

When I try to compile my TeX-file with pdfLaTeX I get an error message
saying:
! LaTeX Error: Option clash for package hyperref.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.

The package hyperref has already been loaded with options:
[]
There has now been an attempt to load it with options
[colorlinks]
Adding the global options:
,colorlinks
to your \documentclass declaration may fix this.


I'm also using the following packages:
\documentclass[a4paper,titlepage, 12pt]{article}
\usepackage[swedish]{babel}
\usepackage[latin1]{inputenc}
\usepackage{amssymb, amsmath, amsfonts, verbatim, fancyhdr, graphicx,
fancybox}
\usepackage{latexsym, subfigure, float, here, url}
\usepackage{rotating}
\usepackage{hvfloat}
\usepackage[font=small, labelfont=bf]{caption}

Any help would be apreciated!

Cheers!

//SOP
SOP
2006-02-28 11:12:22 UTC
Permalink
Apparently hyperref was in conflict with the harvard package, so when I
removed it everything seems to work as expected. Does anyone know why
this is so and if it can be mitigated some how?

Cheers once again!
Enrico Gregorio
2006-02-28 11:33:30 UTC
Permalink
Post by SOP
Apparently hyperref was in conflict with the harvard package, so when I
removed it everything seems to work as expected. Does anyone know why
this is so and if it can be mitigated some how?
You didn't include harvard in the list on your previous post!!!!
And it doesn't give any error to me.

Please, give full information when asking here.

Ciao
Enrico
Axel Sommerfeldt
2006-02-28 11:34:26 UTC
Permalink
Post by SOP
Apparently hyperref was in conflict with the harvard package, so when I
removed it everything seems to work as expected. Does anyone know why
this is so and if it can be mitigated some how?
Just swap the load order: havard first, hyperref afterwards.

HTH,
Axel
Enrico Gregorio
2006-02-28 11:25:27 UTC
Permalink
Post by SOP
Hi guys!
I have been searching for a way to remove the boxes that appear around
links when I compile using pdfLaTeX. I have tried the hyperref package,
but it doesn't seem to work with pdfLaTeX, only with pdfTeX.
When I try to compile my TeX-file with pdfLaTeX I get an error message
! LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
[]
There has now been an attempt to load it with options
[colorlinks]
,colorlinks
to your \documentclass declaration may fix this.
\documentclass[a4paper,titlepage, 12pt]{article}
\usepackage[swedish]{babel}
\usepackage[latin1]{inputenc}
\usepackage{amssymb, amsmath, amsfonts, verbatim, fancyhdr, graphicx,
fancybox}
\usepackage{latexsym, subfigure, float, here, url}
\usepackage{rotating}
\usepackage{hvfloat}
\usepackage[font=small, labelfont=bf]{caption}
Any help would be apreciated!
I get no error with your preamble, adding at the end
\usepackage[colorlinks]{hyperref}

I see nothing that would load hyperref. Please, try to prepare
a minimal example, by deleting anything (mostly packages) which
does not cause the error.

At the end either you or us will be able to spot what is going wrong.

Add also a \listfiles command at the end of the preamble and report
its output (it is clearly recognizable after compilation).

Ciao
Enrico
Axel Sommerfeldt
2006-02-28 11:30:28 UTC
Permalink
Post by SOP
When I try to compile my TeX-file with pdfLaTeX I get an error message
! LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
[]
There has now been an attempt to load it with options
[colorlinks]
Some package you use try to load the hyperref package with the option
`colorlinks', but the hyperref package was already loaded without that
option. A package which causes this could be for example the listings,
pdfscreen or pdfslide package. What package is actually causing this in
your case is the package that will be loaded just before the error
message comes up. (Just take a look at your log file.)
Post by SOP
,colorlinks
to your \documentclass declaration may fix this.
2. Load the package which causes the error message at a more previous
point within your document.
Post by SOP
\usepackage{latexsym, subfigure, float, here, url}
\usepackage[font=small, labelfont=bf]{caption}
Please note that the float package already contains the `here' style, so
you don't need to load the latter one. And to give the caption package a
perfect match you should use the subfig package instead of the (obsolete)
subfigure package.

HTH,
Axel
Heiko Oberdiek
2006-02-28 14:49:06 UTC
Permalink
Post by SOP
When I try to compile my TeX-file with pdfLaTeX I get an error message
! LaTeX Error: Option clash for package hyperref.
[]
There has now been an attempt to load it with options
[colorlinks]
,colorlinks
to your \documentclass declaration may fix this.
One possibility to solve the problem is already meantioned in the
help text. Others strategies are:

* Identify the first loading of hyperref and add the missing option
colorlinks. If this is not possible (hyperref is loaded by other
package, ...), then you force the loading of hyperref with
the correct options yourself:
\usepackage[colorlinks]{hyperref}
\usepackage{foobar}% a package that loads hyperref without options
But in case of hyperref, package order can matter, so easier is the
next hint:

* Before the first loading of hyperref (or before \documentclass) you
can pass options to the package:

\PassOptionsToPackage{colorlinks}{hyperref}
\documentclass[...]{...}
\usepackage{hyperref}% will also use colorlinks
\usepackage[colorlinks]{hyperref} % no conflict now

Yours sincerely
Heiko <***@uni-freiburg.de>

Loading...