latx参考文献标红
使用latex排版时,修订手稿给参考文献标红
代码
%导言区加入
\usepackage{xcolor}
\usepackage{xpatch}
\makeatletter
\def\changeBibColor#1{%
\in@{#1}{ref1, ref2,ref3,ref4,ref5,ref6,ref7}% 想标红的文献
\ifin@\color{red}\else\normalcolor\fi
}
\xpatchcmd\@bibitem
{\item}
{\changeBibColor{#1}\item}
{}{}
\xpatchcmd\@lbibitem
{\item}
{\changeBibColor{#2}\item}
{}{}
\makeatother
%bib文件加入
\begin{filecontents}{mybib.bib}
end{filecontents}{mybib.bib}