Use xcolor for colorlinks option

Beamer loads `xcolor` rather than `color`, and thus the `dvipsnames` option doesn't take effect. This also provides a wider range of colour selections with the `svgnames` option. Closes #3877.
This commit is contained in:
Andrew Dunning 2017-09-07 22:06:51 +01:00 committed by GitHub
parent a89aa1a681
commit 3654c4373a

View file

@ -1,7 +1,7 @@
\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{usenames,dvipsnames}{color}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
$endif$
%
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
@ -126,6 +126,9 @@ $endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
$if(colorlinks)$
\usepackage{xcolor}
$endif$
\usepackage{hyperref}
\hypersetup{
$if(title-meta)$
@ -348,7 +351,7 @@ $if(beamer)$
$else$
{
$if(colorlinks)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
$endif$
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents