2

I get an option clash between the hyperref option colorlinks when I load transparent (before or after). Here are the other packages I load.

\documentclass[english]{beamer}
\usepackage{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{comment}
\usepackage{sagetex}
\usepackage{multicol}
\usepackage{transparent}
\usepackage[colorlinks]{hyperref}
\usepackage{lmodern}
\usepackage{textpos}

My workaround for now is to just not use the hyperref package because I don't need it that bad, but I'm curious. Neither this question nor this quite comprehensive question (nor even the link to the documentation in it) seem to have any indication that transparent would cause trouble. But knowing LaTeX (and especially beamer's habit of loading the kitchen sink), it could be anything!

Hopefully no one will object to the absence of a MWE since the point is that nothing Ws in my Es with these packages, M or otherwise.

kcrisman
  • 415
  • The fact that you get that warning means that hyperref is already loaded (by beamer actually) so the \usepackage[colorlinks]{hyperref} line, if it did not generate an error, would do nothing at all as latex never includes a package twice. So deleting this line is a good fix but not because "you do not need hyperref" but rather because hyperref is already loaded. – David Carlisle Jan 09 '18 at 15:08
  • The W does not mean it has to be working, rather that it should work in theory. Therefore it would have been nice to make a complete document, including \begin{document} and \end{document} instead of a code fragment, which everbody willing to help you first has to fix before starting with your actual problem. – samcarter_is_at_topanswers.xyz Jan 09 '18 at 15:29
  • Yes, I understand that very well, but we all have time limitations as well, and I believe all that was missing was the begin/end doc. (Tested now that I have a more stable connection.) – kcrisman Jan 10 '18 at 02:40
  • Aargh, what doesn't beamer load? – kcrisman Jan 10 '18 at 02:40

1 Answers1

5

hyperref is already in the "kitchen sink", as you called it - so no need to load it yourself (and provoke the option clash), just pass the options you want via hyperref={colorlinks} to the beamer class.

Btw: color and graphicx are also in the "kitchen sink", so not necessary. Probably \usepackage{multicol} is also unnecessary, as beamer has its own columns mechanism.

\documentclass[english,hyperref={colorlinks}]{beamer}
%\usepackage{color}
\usepackage{amssymb}
%\usepackage{graphicx}
\usepackage{comment}
\usepackage{sagetex}
%\usepackage{multicol}
\usepackage{transparent}
%\usepackage[colorlinks]{hyperref}
\usepackage{lmodern}
\usepackage{textpos}


\begin{document}


\begin{frame}
content...
\end{frame}


\end{document}

Warning:

Using colourlinks will destroy the carefully chosen colours of most beamer themes. Please check carefully if everything is still readable and consistent with the chosen colour scheme. Also you will no longer be able to use the \setbeamercolor mechanism to control the colour of certain elements.

Cautionary tale:

\documentclass[
hyperref={colorlinks}
]{beamer}

\usetheme{Warsaw}

\begin{document}

\section{test}
\begin{frame}
    abc
\end{frame} 

\end{document}

-> the red link colour is hard to read on the dark background.

enter image description here