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 have \cite{b,c,a,d} which generates [2, 3, 1, 4].

Is it possible to automatically make them in increasing order without manually changing \cite{b,c,a,d} to \cite{a,b,c,d}.

Any help and suggestions will be much appreciated.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

If not using natbib, then add to the preamble:

\usepackage[sort,nocompress]{cite}

the nocompress option will prevent the default compression of consecutive numbers into ranges. If using natbib, load it using the sort option:

\usepackage[sort]{natbib}
share|improve this answer
    
Thanks. This will make [1]-[4]. But, I would like to see all [1,2,3,4]. Is this possible? –  Bill May 17 '12 at 3:50
    
I found the answer, \usepackage[sort,nocompress]{cite}. Thanks for the pointer and help. –  Bill May 17 '12 at 3:54
1  
@Bill I've added the nocompress option to the answer; I forgot cite activates compression automatically. –  Gonzalo Medina May 17 '12 at 4:43

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.