# 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]?

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Joseph Wright Apr 17 '12 at 16:23
Use the style numeric-comp. –  Marco Daniel Apr 17 '12 at 16:24
possible duplicate of Combine reference citations –  Werner Apr 17 '12 at 16:27
@Werner: Not really ;-) [1]-[5] isn't the default output of numeric-comp. Of course you can use it as a basic. –  Marco Daniel Apr 17 '12 at 16:31
@Werner: It seems the OP uses numeric-verb and wants to combine its features and that of numeric-comp. –  lockstep Apr 17 '12 at 16:37
show 7 more comments

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}

\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


-