Generalhyperref package error

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
marbocam
Posts: 38
Joined: Thu Dec 19, 2024 11:14 am

hyperref package error

Post by marbocam »

I'm trying to make a PDF/A file, but I'm getting this error:

! LaTeX Error: Option clash for package hyperref.

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

Any ideas?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: hyperref package error

Post by Stefan Kottwitz »

Use \PassOptionsToPackage with the conflicting setting,

Stefan
LaTeX.org admin
marbocam
Posts: 38
Joined: Thu Dec 19, 2024 11:14 am

Re: hyperref package error

Post by marbocam »

To the preamble? Like this?

\usepackage[pdfa]{hyperref}
\usepackage[a-1b,latxmp,mathxmp]{pdfx}[2019/02/27]
\usepackage{colorprofiles}
\hypersetup{%
unicode=true,
pdftoolbar=false,
pdfmenubar=false,
pdffitwindow=true,
pdfstartview={FitH},
pdfnewwindow=true,
colorlinks=true,
linkcolor=black,
citecolor=black,
filecolor=black,
urlcolor=blue
}
\PassOptionsToPackage <----- I figured this needs to go before the \documentclass
marbocam
Posts: 38
Joined: Thu Dec 19, 2024 11:14 am

Re: hyperref package error

Post by marbocam »

I'm still getting some error, but it worked 8-) Had to cmd it with pdflatex.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: hyperref package error

Post by Stefan Kottwitz »

marbocam wrote: Fri Jan 17, 2025 5:50 pm \PassOptionsToPackage <----- I figured this needs to go before the \documentclass
That's right, but before that package would also be ok.

Stefan
LaTeX.org admin
marbocam
Posts: 38
Joined: Thu Dec 19, 2024 11:14 am

Re: hyperref package error

Post by marbocam »

Thank you, Stefan :)
Post Reply