当使用带有 Natbib 和方括号的 Bibtex 时,有人知道如何更改方括号的颜色吗?
答案1
您可以使用\bibpunct
和\textcolor
:
\begin{filecontents*}{uvwxyz.bib}
@ARTICLE{example,
author = {Felix Lindlar and Armin Zimmermann},
title = {A code Generation Tool for Embedded Automotive Systems Based on Finite State Machines},
journal = {IEEE International Conference on Industrial Informatics},
year = {2008}
}
\end{filecontents*}
\documentclass{article}
\usepackage{natbib}
\usepackage{xcolor}
\bibpunct{\textcolor{red}{[}}{\textcolor{red}{]}}{,}{a}{}{;}
\begin{document}
\cite{example}
\bibliographystyle{plainnat}
\bibliography{uvwxyz}
\end{document}
答案2
调整上述内容,效果如下:
\definecolor{bleu_cite}{RGB}{34,111,212} % pure blue: {0,0,128}, light blue:{80,135,208}
\usepackage[
colorlinks=true,
allcolors = black,
citecolor=bleu_cite
]{hyperref}
\usepackage{natbib}
\bibpunct{\textcolor{bleu_cite}{[}}{\textcolor{bleu_cite}{]}}{,}{a}{}{;}