Discussion:
elsarticle.cls and cite package
Add Reply
RICHARD Dominique
2010-04-22 06:52:16 UTC
Reply
Permalink
Raw Message
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
2010-04-22 07:20:26 UTC
Reply
Permalink
Raw Message
Post by RICHARD Dominique
Hello,
Is there a documented incompatibility between the elsarticle class and the
cite package ?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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
elsarticle uses natbib, so you shouldn't be loading the cite package.
--
Joseph Wright
RICHARD Dominique
2010-04-22 07:58:59 UTC
Reply
Permalink
Raw Message
Post by Joseph Wright
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
2010-04-22 08:12:04 UTC
Reply
Permalink
Raw Message
Post by RICHARD Dominique
Post by Joseph Wright
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.
\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
According to the elsarticle documentation, you should use

\biboptions{sort&compress}

(see Section 4, "Usage").
--
Joseph Wright
RICHARD Dominique
2010-04-22 08:38:10 UTC
Reply
Permalink
Raw Message
Post by Joseph Wright
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
r***@gmail.com
2016-07-20 01:25:58 UTC
Reply
Permalink
Raw Message
Post by Joseph Wright
Post by RICHARD Dominique
Post by Joseph Wright
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.
\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
According to the elsarticle documentation, you should use
\biboptions{sort&compress}
Thank you it worked for me
(see Section 4, "Usage").
--
Joseph Wright
Armin
2016-08-01 08:30:17 UTC
Reply
Permalink
Raw Message
Post by Joseph Wright
Post by RICHARD Dominique
Post by Joseph Wright
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.
\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
According to the elsarticle documentation, you should use
\biboptions{sort&compress}
(see Section 4, "Usage").
--
Joseph Wright
Thank you, it works
Erwin
2010-04-22 08:13:37 UTC
Reply
Permalink
Raw Message
Post by RICHARD Dominique
Post by Joseph Wright
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.
\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
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}
y***@gmail.com
2017-06-13 15:43:04 UTC
Reply
Permalink
Raw Message
Post by RICHARD Dominique
Hello,
Is there a documented incompatibility between the elsarticle class and the
cite package ?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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
Thank you, it works

Loading...