LyXContract references from [1,2,3,4,5] to [1-5]

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
traveller
Posts: 3
Joined: Wed Feb 08, 2012 1:38 am

Contract references from [1,2,3,4,5] to [1-5]

Post by traveller »

Hi,

When I add references to the text it looks like [1,2,3,4,5]. Is there a way to contract this to [1-5]?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Contract references from [1,2,3,4,5] to [1-5]

Post by Stefan Kottwitz »

You could use the cite package:

Code: Select all

\usepackage{cite}
It compresses reference ranges by default.

Stefan
LaTeX.org admin
Post Reply