BibTeX, biblatex and biberIn-text citation: Change [1][2][3][4] to [1]-[4]

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

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

Post by iceui2 »

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?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

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

Post by php1ic »

The "cite" package will do what you want, although you will need to slightly alter how you input multiple citations.

Code: Select all

\cite{1,2,3,4}
will output [1-4]
iceui2
Posts: 2
Joined: Sun Aug 01, 2010 10:33 pm

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

Post by iceui2 »

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/CT ... e/cite.sty

And using "\usepackage[superscript]{cite}" solved the superscript problem.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

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

Post by localghost »

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
Post Reply