0

To make reference list, I am using biblatex package:

\usepackage[ natbib=true, style=numeric,sorting=none]{biblatex}
\addbibresource{name.bib}

I found a way to colour the reference brackets:

\usepackage{color}
\usepackage{hyperref}
\usepackage{cite}
\renewcommand{\citeleft}{\textcolor{red}{[}}
\renewcommand{\citeright}{\textcolor{red}{]}}

I do get the brackets coloured, but the reference shows as [?]. I read that cite package is incompatible with biblatex, but I cannot find how to do it using biblatex. How do I do it?

user
  • 241
  • 1
  • 9

1 Answers1

0

The biblatex-ext package has the handy \DeclareOuterCiteDelims macro:

\documentclass{article}

\usepackage[natbib=true,style=ext-numeric,sorting=none]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{color}

\DeclareOuterCiteDelims{cite}{\textcolor{green}{\bibopenbracket}}{\textcolor{red}{\bibclosebracket}}

\begin{document}

\cite{knuth:ct}

\printbibliography

\end{document}

enter image description here

  • 1
    It doesn't work as intended. I get the coloured brackets, but inside them are not numbers but the name of the citation I put on .bib file. Why? – user Oct 26 '21 at 21:38
  • either because you did not run biber or because you are ignoring error messages - as I asked you before, we need a [mre] from you – samcarter_is_at_topanswers.xyz Oct 26 '21 at 21:42
  • I also get the colored brackets, but inside them are not numbers but the name of the citation. I can't seem to color the number and the brackets. – Michael Douma Oct 20 '22 at 17:48