\documentclass[5p]{elsarticle}
\usepackage{hyperref}
\hypersetup{colorlinks = true, allcolors = blue}
\usepackage[nameinlink,noabbrev]{cleveref}
\Crefformat{figure}{#2Fig.~#1#3}
\Crefmultiformat{figure}{Figs.~#2#1#3}{ and~#2#1#3}{, #2#1#3}{ and~#2#1#3}
\usepackage{lineno}
\modulolinenumbers[5]
\journal{Journal of \LaTeX\ Templates}
\usepackage{subfig}
\usepackage{float}
\usepackage{graphicx}
\usepackage{color}
\usepackage{pgf,tikz}
\usepackage{multirow}
\usepackage{amsmath,amsfonts,amsthm,bm}
\bibliographystyle{elsarticle-num}
%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\captionsetup[figure]{labelfont={bf},labelformat={default},labelsep=period,name={Fig.}}%used to ref Figure 1: to Fig.1.
\section{Introduction}
In \Cref{figure}, in ref \cite{allik_hughes_1}, in \Cref{table} and in equation Eq. \ref{equation}
\begin{align}
M=\frac{a{b}c}{2}. dE, \label{equation}
\end{align}
\begin{figure}[H]
\centering
\includegraphics[height=1.0 in, width=2.0 in]{bimorph_series_no_metal.png}
\caption{Static deflection of the bimorph actuator: Accuracy analysis} \label{figure}.
\end{figure}
\begin{table}[H]
%\begin{table}[H]
\caption{Accuracy : Static } \label{table}
\centering
\begin{tabular}{c c c c c c}
\hline
\multirow{3}{*}{none} &\multicolumn{2}{c}{none}\\ \cline{2-3}&a($\mu$m)&relative error[\%]\\ \cline{2-3} \cline{4-5}
&b&b\\
\hline
1000&1000&100& \\
\hline
\end{tabular}
%\end{table}
\end{table}
\section*{References}
\bibliography{mybibfile}
\end{document}
您好,我想将交叉引用和参考文献中的 doi 颜色从蓝色改为青色。我尝试使用 \hypersetup{colorlinks = true, allcolors = cyan} 用许多其他颜色代替蓝色,但得到的仍然是蓝色。请在附件中找到 mybibfile 提前谢谢您
答案1
您可以使用\hypersetup{allcolors = cyan}
after\begin{document}
将所有链接更改为青色。
\documentclass[5p]{elsarticle}
\usepackage{hyperref}
\hypersetup{colorlinks = true, allcolors = cyan}
\usepackage[nameinlink,noabbrev]{cleveref}
\begin{document}
\hypersetup{allcolors = cyan}
\Cref{figure}
\begin{figure}[htbp]
\caption{Static deflection of the bimorph actuator: Accuracy analysis.} \label{figure}
\end{figure}
\end{document}