[Tex/LaTex] Changing the colours used in hyperlinked cross-references

cross-referencinghyperreflinks

This is a simplified example of the Latex code for my document. I want to change the colours of the different links (made through \ref and \hyperlink).

Specifically, I want to have

-equations: black (not blue)

-sections: black (not blue)

-authors: blue but lighter than the one I have now

-footnote: red (not black). (Also, the link for the footnotes does not seem to work. I think it is because of the multiple option of footmisc. Any idea on how to fix this?)

\documentclass[10 pt,a4paper,oneside,openany, notitlepage]{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{amsmath, amssymb, graphics}
\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\linespread{1.5}
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in 
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}               
\usepackage[multiple]{footmisc}


\begin{document}
\section{Section 1}
\label{sec1}
This main result\footnote{There are other minor results.} of \hyperlink{Tom}{Tom (2017)} is summarised by equation (\ref{main}). Similar arguments are discussed in Section \ref{sec2}.
\begin{equation}
\label{main}
A=B
\end{equation}

\section{Section 2}
\label{sec2}

\newpage
\begin{center}
\section*{References}
\end{center}

\begin{description}
\item \hypertarget{Tom}{ } Tom, 2017, Journal. 
\end{description}


\end{document}

Best Answer

I suggest you make use of this answer by Marco Daniel to define a hyperref parameter called "footnotecolor". I further suggest you use the \cite machinery of the natbib package to create citation call-outs. (Better yet, learn how to use BibTeX -- and let BibTeX and LaTeX create both the formatted bibliography and all citation call-outs.)

enter image description here

\documentclass[10pt,a4paper,oneside,openany,notitlepage]{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{amsmath,amssymb,graphics}
\usepackage[multiple]{footmisc}
\usepackage[textwidth=6.5in,textheight=8.5in]{geometry}
\usepackage[authoryear,round]{natbib}

\usepackage{hyperref}
%% The following code is from a posting by Marco Daniel;
%% see https://tex.stackexchange.com/a/117959/5001.
\makeatletter
\def\@footnotecolor{red} % default color to use: '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

\hypersetup{colorlinks = true,
            allcolors  = black, % default color
            citecolor  = blue,
            footnotecolor = red}        

\begin{document}
\section{First} \label{sec1}

This main result\footnote{There are other, minor results.} of \citet{Tom} is summarised by equation \eqref{main}. Similar arguments are discussed in Section~\ref{sec2}.

\begin{equation} \label{main} 
A=B 
\end{equation}

\section{Second} \label{sec2}

\begin{thebibliography}{9}

\bibitem[Tom(2017)]{Tom} Tom, 2017, Journal. 

\end{thebibliography}

\end{document}
Related Question