参考
问AI!
一、\color{red} \color{black}
确实可以,但是,它的名字是全称啊
@ARTICLE{Abdisarabshali2024,
author={\color{red}Abdisarabshali, Payam and Liwang, Minghui and Rajabzadeh, Amir and Ahmadi, Mahmood and Hosseinalipour, Seyyedali},
journal={IEEE/ACM Trans. Networking},
title={Decomposition Theory Meets Reliability Analysis: Processing of Computation-Intensive Dependent Tasks Over Vehicular Clouds With Dynamic Resources},
year={\color{black}2024},
month={Feb.},
volume={32},
number={1},
pages={475-490},
keywords={Reliability;Switched mode power supplies;Vehicle dynamics;Mathematical models;Dynamic scheduling;Computational modeling;Stochastic processes;Event stochastic algebra;decomposition theory;vehicular cloud;semi-Markov process;stochastic analysis;reliable service provisioning;directed acyclic graphs (DAG) tasks/applications;undirected graph (UG) tasks/applications},
doi={10.1109/TNET.2023.3286709}}
第一个字母没有变色!
@ARTICLE{Abdisarabshali2024,
author={\color{red}{Abdisarabshali, Payam and Liwang, Minghui and Rajabzadeh, Amir and Ahmadi, Mahmood and Hosseinalipour, Seyyedali}},
journal={IEEE/ACM Trans. Networking},
title={Decomposition Theory Meets Reliability Analysis: Processing of Computation-Intensive Dependent Tasks Over Vehicular Clouds With Dynamic Resources},
year={\color{black}2024},
month={Feb.},
volume={32},
number={1},
pages={475-490},
keywords={Reliability;Switched mode power supplies;Vehicle dynamics;Mathematical models;Dynamic scheduling;Computational modeling;Stochastic processes;Event stochastic algebra;decomposition theory;vehicular cloud;semi-Markov process;stochastic analysis;reliable service provisioning;directed acyclic graphs (DAG) tasks/applications;undirected graph (UG) tasks/applications},
doi={10.1109/TNET.2023.3286709}}
这样的话,名字又变成全称了,这和其他的又不统一了,烦就烦在这了!!!
一种新方法
\usepackage{color}
\usepackage{cite}
\usepackage{etoolbox}
% 备份原始 \bibitem 命令
\let\oldbibitem\bibitem
%重新定义 \bibitem,使某些特定文献变色
\renewcommand{\bibitem}[1]{%
\ifstrequal{#1}{Liu2023rfid} {\color{blue}\oldbibitem{#1}}
{\ifstrequal{#1}{Liwang2024} {\color{red}\oldbibitem{#1}}
{\color{black}\oldbibitem{#1}}}%
}
\renewcommand{\bibitem}[1]{%
\ifstrequal{#1}{Liu2023rfid}
{\color{blue}\oldbibitem{#1}} % Liu2023rfid 变蓝色
{\ifstrequal{#1}{Liwang2024}
{\color{red}\oldbibitem{#1}} % Wang2024 变红色
{\ifstrequal{#1}{Gao2022}
{\color{green}\oldbibitem{#1}} % Zhang2025 变绿色
{\color{black}\oldbibitem{#1}} % 其他文献默认黑色
}%
}%
}
使用这个嵌套吧!看起来确实是麻烦些,如果又很多需要变色的话,但ai给的方案我试了都没有效果,只能先用这种方法凑合了,如果大家有更好的解决方法也可以分享在评论区!
ai的其他解决方案!我测试无效,不清楚是不是IEEE Trans.模板有某种限制!