我想为 Elsevier 乳胶模板中的参考书目列表中的特定参考文献添加颜色。
任何帮助都将不胜感激。非常感谢!
答案1
我刚刚找到了一个解决方案。代码如下:
\documentclass[review]{elsarticle}
\usepackage{xcolor,etoolbox}
\let\mybibitem\bibitem
\renewcommand{\bibitem}[1]{%
\ifstrequal{#1}{Zhu2016}{\color{blue}\mybibitem{#1}}
{\ifstrequal{#1}{Zhu2017}{\color{blue}\mybibitem{#1}}
{\color{black}\mybibitem{#1}}}%
}
\begin{document}
For example these are new references \cite{Zhu2016, Zhu2017} and should
appear in blue in the bibliography list. Other references should appear
normally in black \cite{Sauer2003, Barrios2011}.
\bibliographystyle{elsarticle-num}
\bibliography{TwoPhaseFlow}
\end{document}
输出如下:
您可以通过修改前面代码中的以下部分来简单地为更多引用添加颜色:
\let\mybibitem\bibitem
\renewcommand{\bibitem}[1]{%
\ifstrequal{#1}{Zhu2016}{\color{blue}\mybibitem{#1}}
{\ifstrequal{#1}{Zhu2017}{\color{blue}\mybibitem{#1}}
{\ifstrequal{#1}{Sauer2003}{\color{blue}\mybibitem{#1}}
{\color{black}\mybibitem{#1}}}}%
}
答案2
我们可以用另一种方式来实现。假设你已经创建了包含 Elsevier 格式参考文献的 .bbl 文件,例如:
\begin{thebibliography}{10}
\newcommand{\enquote}[1]{``#1''}
\bibitem{prudnikov}
A.~Prudnikov, Y.~Brychkov, and O.~Marichev, \enquote{Evaluation of integrals
and the mellin transform,} J. Sov. Math. \textbf{54}, 1239--1341 (1991).
... many others refs
\end{thebibliography}
此文件可以放在下列位置:
\bibliographystyle{elsarticle-num}
\bibliography{TwoPhaseFlow}
现在,您可以根据需要编辑单个引用:
\begin{thebibliography}{10}
\newcommand{\enquote}[1]{``#1''}
\bibitem{prudnikov}
\textcolor{red}{A.~Prudnikov}, Y.~Brychkov, and O.~Marichev, \textcolor{green}{\enquote{Evaluation of integrals and the mellin transform,}}
\textcolor{blue}{J. Sov. Math.} \textbf{54}, 1239--1341 \textcolor{pink}{(1991)}.
... many others refs
\end{thebibliography}
您可以获得类似这样的内容以供参考: