Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

elsarticle.cls and cite package

6,252 views
Skip to first unread message

RICHARD Dominique

unread,
Apr 22, 2010, 2:52:16 AM4/22/10
to
Hello,
Is there a documented incompatibility between the elsarticle class and the
cite package ?
For example, the following MCE produces the error :

Paragraph ended before \@citex was complete

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\listfiles
\documentclass[review]{elsarticle}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{cite}

\begin{document}

Few studies have been dedicated to bla bla bla ~\cite{Myref1,Myref2,Myref3}
so far.

\bibliographystyle{elsarticle-num}
\bibliography{/home/myself/mybibfile}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
with

*File List*
elsarticle.cls 2009/09/17, 1.20b: Elsevier Ltd
article.cls 2007/10/19 v1.4h Standard LaTeX document class

cite.sty 2009/08/29 v 5.2

Any help or tip will be welcomed

--
Dominique RICHARD

Joseph Wright

unread,
Apr 22, 2010, 3:20:26 AM4/22/10
to

elsarticle uses natbib, so you shouldn't be loading the cite package.
--
Joseph Wright

RICHARD Dominique

unread,
Apr 22, 2010, 3:58:59 AM4/22/10
to
Joseph Wright wrote:

> elsarticle uses natbib, so you shouldn't be loading the cite package.
Thanks,
OK, I had forgotten this, so no cite package (from natbib doc: "It is
impossible to make the cite and natbib packages compatible,
since both reimplement \cite from scratch. ").

But my problem remains, I would like to get [1-5] instead of [1,2,3,4,5] in
the text.
So I had a (maybe too) quick look at the natbib doc and tried :
\setcitestyle{compress}
(since the nat bib package is already loaded by elsarticle, I suppose that I
should not use \usepackage[compress]{natbib})
but this did not give the expected result

any clue ?

--
Dominique RICHARD


Joseph Wright

unread,
Apr 22, 2010, 4:12:04 AM4/22/10
to

According to the elsarticle documentation, you should use

\biboptions{sort&compress}

(see Section 4, "Usage").
--
Joseph Wright

Erwin

unread,
Apr 22, 2010, 4:13:37 AM4/22/10
to

Try \biboptions{}. Some template from Elsevier gives some hints, see
below.
Erwin

%% natbib.sty is loaded by default. However, natbib options can be

%% provided with \biboptions{...} command. Following options are
%% valid:

%% round - round parentheses are used (default)
%% square - square brackets are used [option]
%% curly - curly braces are used {option}
%% angle - angle brackets are used <option>
%% semicolon - multiple citations separated by semi-colon
%% colon - same as semicolon, an earlier confusion
%% comma - separated by comma
%% numbers- selects numerical citations
%% super - numerical citations as superscripts
%% sort - sorts multiple citations according to order in ref.
list
%% sort&compress - like sort, but also compresses numerical
citations
%% compress - compresses without sorting
%%
%% \biboptions{comma,round}

RICHARD Dominique

unread,
Apr 22, 2010, 4:38:10 AM4/22/10
to
Joseph Wright wrote:

> According to the elsarticle documentation, you should use
> \biboptions{sort&compress}
> (see Section 4, "Usage").

Thank you Joseph and Erwin,
It works !
I had a look at the wrong doc (natbib instead of elsarticle)

--
Dominique RICHARD

rajg...@gmail.com

unread,
Jul 19, 2016, 9:26:03 PM7/19/16
to
> Thank you it worked for me

Armin

unread,
Aug 1, 2016, 4:30:21 AM8/1/16
to
Dne četrtek, 22. april 2010 10.12.04 UTC+2 je oseba Joseph Wright napisala:
Thank you, it works

y.echc...@gmail.com

unread,
Jun 13, 2017, 11:43:08 AM6/13/17
to
Thank you, it works

NiceDay

unread,
Apr 18, 2018, 7:25:06 PM4/18/18
to
Thanks, that worked perfectly.

NiceDay

unread,
Apr 18, 2018, 7:26:10 PM4/18/18
to
Thank you
0 new messages