0

Consider this paper: https://www.sciencedirect.com/science/article/pii/S0960077922011948

How do we achieve this light blue colour for links?

From the answer to this question: Extend the hyperref link to Figure and a, b, c:

\documentclass[10pt,a4paper]{book}
    \usepackage[T1]{fontenc}
    \usepackage{lmodern}
    \usepackage{todonotes}
    \usepackage[colorlinks,linkcolor=black,anchorcolor=black,citecolor=black,filecolor=black,urlcolor=blue]{hyperref}
\newcommand*{\figref}[2][]{%
  \hyperref[{fig:#2}]{%
    Figure~\ref*{fig:#2}%
    \ifx\\#1\\%
    \else
      \,#1%
    \fi
  }%
}

\begin{document} \hypersetup{linkcolor=blue} \chapter{one}

\begin{figure}[t]
   \missingfigure[figwidth=6cm]{- << Ciel, mon mari >> dit-elle !}
\caption{a: Missing figure, and b: still missing figure.}
\label{fig:missing Figure}
\end{figure}

The figure \figref{missing Figure} contains two subfigures.
Something in \figref[a]{missing Figure} and some other thing in
Figure \figref[b]{missing Figure}.

\end{document}

Math
  • 765
  • 1
    See manual at https://ctan.org/pkg/hyperref, ch. 7.20, which directs you to https://www.ctan.org/pkg/hycolor . // See also https://tex.stackexchange.com/questions/tagged/hyperref+color . – MS-SPO May 30 '23 at 10:49
  • @MS-SPO I had a look but couldn't figure it out. I have the normal blue working but cant get the light blue. – Math May 30 '23 at 10:59
  • 1
    @Math Please add a small, but compilable test document to your question so we can see how far you got. – samcarter_is_at_topanswers.xyz May 30 '23 at 11:13
  • @samcarter_is_at_topanswers.xyz Added in. – Math May 30 '23 at 11:15
  • \usepackage{hycolor}, use the color picker tool of any bitmap editor, set it using \hypersetup{linkbordercolor=[rgb]{1,0,0}} , see p. 2 in said manual, where 1 probably corresponds to 255 in ordinary RGB-speak. (And check the hyperref manual again, taking the next comment into account ...) – MS-SPO May 30 '23 at 11:18
  • @Math Your code does not produce "normal blue" links – samcarter_is_at_topanswers.xyz May 30 '23 at 11:18
  • @samcarter_is_at_topanswers.xyz My bad, I just edited. – Math May 30 '23 at 11:21
  • @MS-SPO could you try it then answer below? – Math May 30 '23 at 16:40
  • 1
    load xcolor (todonotes does it already), define a lightblue color and then use linkcolor=lightblue – Ulrike Fischer May 30 '23 at 16:56
  • @UlrikeFischer Yeah, I used \hypersetup{linkcolor=[rgb]{0,0.5,0.73}} which is my closest match. If someone can do better, feel free to comment :) – Math May 30 '23 at 17:30

1 Answers1

1

So, apparently you solved your problem yourself, taking together your code and last comment ... which can be easily verified by using instead for some pinkish:

\hypersetup{linkcolor=[rgb]{1,0.5,0.73}}% ;-)

result

\documentclass[10pt,a4paper]{book}
    \usepackage[T1]{fontenc}
    \usepackage{lmodern}
    \usepackage{todonotes}
    \usepackage[colorlinks,linkcolor=black,anchorcolor=black,
    citecolor=black,filecolor=black,urlcolor=blue]{hyperref}
\newcommand*{\figref}[2][]{%
  \hyperref[{fig:#2}]{%
    Figure~\ref*{fig:#2}%
    \ifx\\#1\\%
    \else
      \,#1%
    \fi
  }%
}

\begin{document} %\hypersetup{linkcolor=blue} \hypersetup{linkcolor=[rgb]{0,0.5,0.73}}% <<<<<<<<<<<<<< \chapter{one}

\begin{figure}[t]
   \missingfigure[figwidth=6cm]{- &lt;&lt; Ciel, mon mari &gt;&gt; dit-elle !}
\caption{a: Missing figure, and b: still missing figure.}
\label{fig:missing Figure}
\end{figure}

The figure \figref{missing Figure} contains two subfigures.
Something in \figref[a]{missing Figure} and some other thing in
Figure \figref[b]{missing Figure}.

\end{document}

MS-SPO
  • 11,519