Multiple references

I have several references like \cite{a,b,c,d,e} which produces an output like [1], [2], [3], [4], [5].

Is there a way to automatically generate the above as [1]-[5]?

1 Answer

Based on your rudimentary information I guess you are using the style numeric-verb (Thanks lockstep). First of all I recommend to use the style numeric-comp which has the following output as default:

[1-5]

To obtain this output, see Combine reference citations. However it seems that you request the format

[1]-[5]

This is also possible by a modification of the command \cite:

Here is the example:

\documentclass{article}
\usepackage[style=numeric-comp,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\DeclareCiteCommand{\cite}[\mkbibbrackets]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{%
\renewrobustcmd*{\bibrangedash}{\bibclosebracket\textendash\bibopenbracket}%
\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
\usebibmacro{postnote}}

\begin{document}
\section{foo}
\cite{companion,knuth:ct,knuth:ct:a,knuth:ct:b,knuth:ct:c}

\parencite{companion,knuth:ct,knuth:ct:a,knuth:ct:b,knuth:ct:c}

\printbibliography
\end{document}


Compile with

(pdf)latex
biber
(pdf)latex
(pdf)latex