Hyperref footnotes and section ref colors
You can define a new key footnotecolor
which allow you such a setting.
The code is:
\makeatletter
\def\@footnotecolor{red}
\define@key{Hyp}{footnotecolor}{%
\HyColor@HyperrefColor{#1}\@footnotecolor%
}
\def\@footnotemark{%
\leavevmode
\ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
\stepcounter{Hfootnote}%
\global\let\Hy@saved@currentHref\@currentHref
\hyper@makecurrent{Hfootnote}%
\global\let\Hy@footnote@currentHref\@currentHref
\global\let\@currentHref\Hy@saved@currentHref
\hyper@linkstart{footnote}{\Hy@footnote@currentHref}%
\@makefnmark
\hyper@linkend
\ifhmode\spacefactor\@x@sf\fi
\relax
}%
\makeatother
After this definition you can use:
\hypersetup{footnotecolor=blue}
If you work with the package etoolbox
or xpatch
you can make the code clearer. Here the suggestion using etooltbox
:
\usepackage{etoolbox}
\makeatletter
\def\@footnotecolor{red}
\define@key{Hyp}{footnotecolor}{%
\HyColor@HyperrefColor{#1}\@footnotecolor%
}
\patchcmd{\@footnotemark}{\hyper@linkstart{link}}{\hyper@linkstart{footnote}}{}{}
\makeatother
Here an example:
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{epsfig,graphics}
\usepackage{etoolbox}
\usepackage{hyperref}
\hypersetup{colorlinks=true, urlcolor=Cerulean, citecolor=Cerulean}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\makeatletter
\def\@footnotecolor{red}
\define@key{Hyp}{footnotecolor}{%
\HyColor@HyperrefColor{#1}\@footnotecolor%
}
\patchcmd{\@footnotemark}{\hyper@linkstart{link}}{\hyper@linkstart{footnote}}{}{}
\makeatother
\hypersetup{footnotecolor=blue}
\begin{document}
\section{foo}\label{foo}
\ref{foo}\footnote{footnote}
\section{bar}\label{bar}
\ref{bar}\footnote{footnote}
\end{document}