In a \documentclass{article} Latex document, the \usepackage{cite} will automatically compact your citations from [1, 2, 3, 4] to [1-4] for example (check here to learn more about it).

Now if you are using the \documentclass{elsarticle} to send your manuscript to an Elsevier journal, the previous solution does not work. The reason is that the elsarticle.cls class document is designed to work with natbib which uses the cite command and creates a conflict with \usepackage{cite}. A solution to get your compacted citations to work without \usepackage{cite} is provided in the elsarticle class documentation, add the following line before the document’s end:

\biboptions{sort&compress}

PS: I tested everything with bibtex.

If you liked this post, you can share it with your followers or follow me on Twitter!