Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like the reference citation to appear like [1-4], rather than [1], [2], [3], [4].

Here is my MWE

\documentclass[a4paper,10pt]{book}
\begin{document}

 Some text

\bibliographystyle{unsrt}   
\bibliography{refer}    
\end{document}

How to solve this pooling of citations?

share|improve this question
4  
To achieve this with biblatex you can use the style numeric-comp. –  N.N. Feb 6 '12 at 6:22
    
use donald arseneau's cite.sty to do this with minimum effort; natbib.sty "sort+compress" option also does the job. see tex.ac.uk/cgi-bin/texfaq2html?label=citesort –  wasteofspace Feb 10 '12 at 15:54
add comment

1 Answer

up vote 11 down vote accepted

You need to use the style=numeric-comp for biblatex.

Here is the output from the numeric-comp.tex example file (without loading hyperref, for clarity):

Loading biblatex with style numeric-comp

The output is similar to that provided by the cite package.

share|improve this answer
    
I am using \bibliographystyle{unsrt} in my article to generate the references as they appear. but, if i use the one use have prescribed, i am not getting the references as they appear. –  Anil Feb 10 '12 at 9:55
    
@Anil: In your document preamble you should use \usepackage[style=numeric-comp]{biblatex}\addbibresource{refer.bib} and then only \printbibliography where you want the references printed in your document. \bibliographystyle is not used with biblatex. –  Werner Feb 10 '12 at 15:17
    
in that case, references will be cited as per the entry in .bib file and not as they appear in the manuscript. –  Anil Feb 10 '12 at 15:55
    
@Anil: As mentioned in my answer, you may be interested in the cite package then, rather than biblatex. –  Werner Feb 10 '12 at 16:34
2  
@Anil: What about \cite{ref1,ref2,ref3}? –  Werner Feb 11 '12 at 14:59
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.