
Bibtex を Natbib と角括弧とともに使用する場合、角括弧の色を変更する方法をご存知の方はいらっしゃいますか?
答え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}{}{;}