14

When I use the following preamble:

\documentclass{beamer}
\mode<presentation>
\usetheme{Berkeley}      
\usecolortheme{default} 
\usefonttheme{default}  
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
\usepackage{ragged2e}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
 \usepackage{hyperref}
\usepackage[colorlinks]{hyperref}
\hypersetup{citecolor=DeepPink4}
\hypersetup{linkcolor=DarkRed}
\hypersetup{urlcolor=DarkBlue}
\usepackage{cleveref}
\title[something]{something}
 \author{someone}
 \date{someday}
 \begin{document}
 \begin{frame}{}
 \titlepage
 \end{frame}
 \begin{frame}{something}
 \justifying
 \href{http://google.com}{Google}
  \end{frame}
 \end{document}

I receive the error:

`option clash for package hyperref. \hypersetup`

However, when I suppress \usepackage[colorlinks]{hyperref} it works, but without the colour.

Any ideas?

36

beamer already loads hyperref internally, so you attempt produces a clash. You can pass the options to the class using the hyperref key (there are also pgf, color and xcolor keys to pass options to the corresponding packages):

\documentclass[
  xcolor={svgnames},
  hyperref={colorlinks,citecolor=DeepPink4,linkcolor=DarkRed,urlcolor=DarkBlue}
  ]{beamer}
\mode<presentation>
\usetheme{Berkeley}      

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
\usepackage{cleveref}

 \title[something]{something}
 \author{someone}
 \date{someday}

 \begin{document}

 \begin{frame}{}
 \titlepage
 \end{frame}

 \begin{frame}{something}
 \href{http://google.com}{Google}
 \end{frame}

 \end{document}

enter image description here

| improve this answer | |
  • @unmark1: The usual way to say 'Thank you' is to accept the answer by clicking on the checkmark left on the answer post! ;-) – user31729 Aug 24 '16 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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