更改 elsarticle 中的引用顏色

更改 elsarticle 中的引用顏色

我喜歡在寫論文時使用 elsarticle,並且喜歡引用 Elsevier 出版期刊的顏色,如下所示。在此輸入影像描述

但是,我無法在 Latex 中使用以下命令來更改 citecolor:

\usepackage[colorlinks=true,linkcolor=black, citecolor=<my_color>, urlcolor=blue]{hyperref}

另外,我也不知道上圖的是什麼顏色。

請任何人建議如何做到這一點。

非常感謝。

答案1

您需要在開始文件時設定顏色,否則elsarticle選擇自己的顏色。

\begin{filecontents*}{\jobname.bib}
@article{GBU,
  author={Eastwood, Clint and Van Cleef, Lee and Wallach, Eli},
  title={How to find a tomb with a treasure},
  journal={J. Treasure Searching},
  year=1966,
}
@article{SLIH,
  author={Curtis, Tony and Lemmon, Jack},
  title={How to play bass and saxophone},
  journal={J. Chicago Mafia},
  year=1959,
}
\end{filecontents*}

\documentclass[authoryear]{elsarticle}

\usepackage[x11names]{xcolor}
\usepackage[
  colorlinks,
]{hyperref}

\AtBeginDocument{\hypersetup{citecolor=DodgerBlue4}}

\begin{document}

\begin{frontmatter}
\title{A title}
\author{A. Uthor}
\end{frontmatter}

We cite \citet{GBU} \citep{SLIH}.

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

在此輸入影像描述

相關內容