Anybody know how revtex accomplishes its amazing citation handling. For instance, if I have a list of references in natbib using any bibstyle it looks like this [1,2,3,4,5] or [2,4,5,3,1] depending on the order of the \cite{key2,key4,key5,key3,key1}. However in revtex it takes that list, no matter the order and makes it [1-5] even for the \cite command I quote above (assuming they're already referenced).
I am trying to write a thesis which is not compatible with revtex, but I don't want to have to hunt down all my \cites and put them in order manually. Additoinally there is no way to "shorten" the list on first citation by simply doing \cite{ref1}--\cite{ref5} as it would read [1]-[2] if 2,3,4 haven't already been cited.
There must be a way to get the actually superscript reference numbers in order by just "borrowing" one of the revtex packages? Anyone know which one does it? An example from my thesis to illustrate:
Typically this material has been a high-κ dielectric [50,42,51,86,65,63,64].
which I would like to read:
Typically this material has been a high-κ dielectric [42,50,51,63-65,86].
Suggestions???