5

I'm trying to cite a couple of authors for the same thing using biblatex. What I get is something like this:

[21,22,23,24,25]

Instead I want it to look like this:

[21-25]

For BibTeX my research revealed that I should use the package cite, but that isn't compatible with biblatex. I guess there is an easy way for biblatex as well but I just can't find it. Thanks for your help in advance!

Edit: I am using bibstyle=ieee, maybe it's a style setting?

Sral
  • 75
  • Off-topic: This connector may look like a hyphen, but it's not. It's an en-dash, which is to be used to indicate a span (pages, dates, references, ...). – barbara beeton Nov 28 '19 at 19:57
  • See also https://tex.stackexchange.com/q/191418/35864, https://tex.stackexchange.com/q/439086/35864, https://tex.stackexchange.com/q/191418/35864. – moewe Nov 28 '19 at 20:47

1 Answers1

7

Yes, this is indeed a property of the selected style.


By default biblatex-ieee compresses multiple citations, but the brackets look a bit differently from what you describe in the question.

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

\usepackage[style=ieee, backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{sigfridsson,worman,geer,nussbaum}
\printbibliography
\end{document}

[1]–[4]


If you want the brackets as described in the question, you can set the citestyle to numeric-comp.

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

\usepackage[style=ieee, citestyle=numeric-comp, backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{sigfridsson,worman,geer,nussbaum}
\printbibliography
\end{document}

[1–4]

moewe
  • 175,683
  • Thanks a lot! Somehow by default I get what I stated above and not your version but numeric-comp is working fine. – Sral Nov 29 '19 at 07:59