## LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ In-text citation: Change [1][2][3][4] to [1]-[4]

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
iceui2
Posts: 2
Joined: Sun Aug 01, 2010 10:33 pm

### In-text citation: Change [1][2][3][4] to [1]-[4]

Hey so I'm new to LaTeX and I'm having trouble changing the in-text references from [1][2][3][4] to [1]-[4].

Currently, I just add the citations like this\cite{1}\cite{2}\cite{3}\cite{4}, which produces [1][2][3][4]. What should I change so that it produces [1]-[4]? Thanks!

On a side note, is there a way to make the citations superscript instead of in regular font?

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm
The "cite" package will do what you want, although you will need to slightly alter how you input multiple citations.
`\cite{1,2,3,4}`

will output [1-4]

iceui2
Posts: 2
Joined: Sun Aug 01, 2010 10:33 pm
Cool thanks. I found that I actually had to download the package from here before I could use it: ftp://indian.cse.msu.edu/pub/mirrors/CTAN/macros/latex/contrib/cite/cite.sty

And using "\usepackage[superscript]{cite}" solved the superscript problem.

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Now that the problem is solved, please mark the topic accordingly as described in Section 3 of the Board Rules.

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1