I'm using the ieee
style for biblatex
and when inserting citations I want
[1,2,6-10]
Right now I'm getting
[1],[2],[6-10].
How can I change this?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityYou should be OK by simply using the ieee
style for the bibliography but the standard numeric-comp
for the citations. For example
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{IEEEexample:bookwitheditor,
editor = "J. C. Candy and G. C. Temes",
title = "Oversampling Delta-Sigma Data Converters Theory,
Design and Simulation",
publisher = "{IEEE} Press.",
location = "New York",
year = "1992"
}
@article{IEEEexample:articlelargepages,
author = "A. Castaldini and A. Cavallini and B. Fraboni
and P. Fernandez and J. Piqueras",
title = "Midgap Traps Related to Compensation Processes in
{CdTe} Alloys",
journaltitle = "Phys. Rev. B.",
volume = "56",
number = "23",
year = "1997",
pages = "14897-14900"
}
@article{IEEEexample:TBPmisc,
author = "M. Coates and A. Hero and R. Nowak and B. Yu",
title = "Internet Tomography",
journaltitle = "IEEE J. Selected Areas Commun.",
month = 05,
year = "2002",
note = "to be published"
}
\end{filecontents*}•
\documentclass{article}
\usepackage[backend=bibtex,bibstyle=ieee,citestyle=numeric-comp]{biblatex}
\bibliography{\jobname}
\begin{document}
\cite{IEEEexample:bookwitheditor, IEEEexample:TBPmisc, IEEEexample:articlelargepages}
\printbibliography
\end{document}
(I've included some bibliography data purely to create a self-contained demo.)
Notice that for citations that should be bracketed together, compressed into a range and so on you should use one \cite
command and a comma-list of keys within the argument.
bibstyle=ieee
must come before citestyle=numeric-comp
also, or it doesn't work. (Or so it was for me.)
– kando
Jul 15 '17 at 15:33
Note that this answer is only for non-
biblatex
users, sincebiblatex
is incompatible with thecite
package! Thanks to @moewe for pointing that out.
What worked for me is simply adding
\renewcommand\citepunct{, }
to the preamble, as hinted in the cite.sty package documentation.
Here is a screenshot of the result
But note that I just tested this in conjunction with
\documentclass[10pt,final,journal,compsoc,a4paper]{IEEEtran}
biblatex
(which is what the OP is using), since cite
and biblatex
are incompatible.
– moewe
Apr 18 '19 at 16:40
biblatex
I consider it unlikely that those not using biblatex
would look at this question, but an alternative approach probably does not do any harm as long as it is pointed out cleraly that this approach here is indeed not compatible with biblatex
(and thus the premise of the question) at all and assumes a different underlying setup.
– moewe
Apr 24 '19 at 10:31
biblatex
style simply followsieeetran
in this regard). Are you submitting to the IEEE? – Joseph Wright♦ Jul 14 '14 at 16:23