4

I've been trying to follow the other SO questions here and here but nothing works for some reason. I'm new to LaTex and trying to change the color of the citations from black to blue.

Currently each citation is a number: [1] with a hyperref, so when I click on it it moves me to the last page.

I'm currently using the following packages for citations:

\usepackage {hyperref}
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\addbibresource{mybib.bib}

And writing each citation as \cite{*}

I tried using this package \usepackage[hidelinks,colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref} but it doesn't seem to do anything

I'm not sure what other code to add here as I'm new in this community, but let me know if there's anything else I should add.

3
  • 2
    Note that hyperref should generally be the last package you load in the preamble.
    – moewe
    Commented Aug 5, 2021 at 18:44
  • Anyway, we'll need to see a small yet compilable example document that shows what you are doing at the moment with as little excess code as possible (a so-called MWE: tex.meta.stackexchange.com/q/228/35864). I just tried gist.github.com/moewew/8f737f16d89101874a087ef10a72795a and the citation numbers are blue as expected. If you are using a template or heavily customised document class it is very possible that it applies additional hyperref options (behind the scenes) that counter your document settings.
    – moewe
    Commented Aug 5, 2021 at 18:45
  • Ah that was silly of me and a really easy fix. I moved hyperref to be the last package as you said and everything works! Thanks a lot
    – Penguin
    Commented Aug 5, 2021 at 18:49

1 Answer 1

2

The package hyperref should generally be the last package you load (there are a few documented exceptions like cleveref, which should be loaded after hyperref).

In the following example the citations are blue as expected

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\usepackage[hidelinks,colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}


\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson}

\printbibliography
\end{document}

Blue citation number 1

At least in this example things still work fine if you load hyperref before biblatex, so there must be something else going on in your actual document. But since it was discussed in the comments that loading hyperref last helped, I thought I'd still post an answer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .