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

Problem with references - elsarticle

3,260 views
Skip to first unread message

Luis Felipe

unread,
Nov 14, 2009, 6:59:02 PM11/14/09
to
Hi,
I am writing an article using the elsarticle.cls style and elsarticle-
harv.bst, but the title 'References' is not printed when I generate
the pdf file. I use the following example:

------
\documentclass[preprint,authoryear,12pt]{elsarticle}
\journal{Nuclear Physics B}
\begin{document}

\section{This is a test}

Test kjkjk \citep{dawkins82}

\bibliographystyle{elsarticle-harv}
\bibliography{myb}
\end{document}
------

with the bib file:

@BOOK{dawkins82,
AUTHOR = {Richard Dawkins},
TITLE = {The Extended Phenotype: The Long Reach of the Gene},
PUBLISHER = {W.H. Freeman \& Company},
YEAR = {1982},
}


Thanks for your help.


Luis Felipe

Enrico Gregorio

unread,
Nov 14, 2009, 7:26:21 PM11/14/09
to
Luis Felipe <luisp...@gmail.com> wrote:

elsarticle.cls ends with

\@ifpackageloaded{amsrefs}%
{}
{\let\bibsection\relax%
\AtBeginDocument{\def\cites@b#1#2,#3{%
\begingroup[%
\toks@{\InnerCite{#2}#1}%
\ifx\@empty#3\@xp\@gobble\fi
\cites@c#3%
}}}

This is what makes the heading disappear, since natbib redefines
the thebibliography environment to start with \bibsection, which
is responsible for the typesetting of the bibliography heading.

I don't know if this is a design decision or simply a mistake.
To recover natbib's definition of \bibsection you may try to
write

\newcommand\bibsection{%
\section*{\bibname\markright{\MakeUppercase{\bibname}}}}

in the preamble of your document. It's \newcommand and not
\renewcommand as one might expect.

Ciao
Enrico

Alan Munn

unread,
Nov 14, 2009, 7:39:23 PM11/14/09
to
In article
<f805af49-e872-4e74...@j24g2000yqa.googlegroups.com>,
Luis Felipe <luisp...@gmail.com> wrote:

> Hi,
> I am writing an article using the elsarticle.cls style and elsarticle-
> harv.bst, but the title 'References' is not printed when I generate
> the pdf file.
>

> Luis Felipe

Did you run latex then bibtex and the latex again?

Alan

Alan Munn

unread,
Nov 14, 2009, 8:52:01 PM11/14/09
to
In article <151120090126219991%greg...@math.unipd.it>,
Enrico Gregorio <greg...@math.unipd.it> wrote:

What version of elsarticle is this? Luis' sample file compiled fine for
me and the References section showed up. My version of elsarticle
doesn't have the code snippet you give above. Maybe the problem is an
older version?

*File List*
elsarticle.cls 2008/05/22, 1.0.1: Elsevier Science
article.cls 2005/09/16 v1.4f Standard LaTeX document class
size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
pdftex.def 2008/09/08 v0.04l Graphics/color for pdfTeX
pifont.sty 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR)
upzd.fd 2001/06/04 font definitions for U/pzd.
upsy.fd 2001/06/04 font definitions for U/psy.
elsart.spl
natbib.sty 2009/02/02 8.3 (PWD, AO)
supp-pdf.tex
elsart.bbl

Robin Fairbairns

unread,
Nov 15, 2009, 5:19:44 AM11/15/09
to
Alan Munn <am...@msu.edu> writes:
>What version of elsarticle is this?

the current one, i imagine.

>Luis' sample file compiled fine for
>me and the References section showed up. My version of elsarticle
>doesn't have the code snippet you give above. Maybe the problem is an
>older version?
>
> *File List*
>elsarticle.cls 2008/05/22, 1.0.1: Elsevier Science

current is 2009/12/01, 1.20
--
Robin Fairbairns, Cambridge

Enrico Gregorio

unread,
Nov 15, 2009, 5:48:45 AM11/15/09
to
Alan Munn <am...@msu.edu> wrote:

No, the problem is in a newer version:

*File List*
elsarticle.cls 2009/09/17, 1.2.0: Elsevier Ltd
article.cls 2007/10/19 v1.4h Standard LaTeX document class
...
natbib.sty 2009/07/16 8.31 (PWD, AO)

In elsarticle.dtx we find

% \changes{v1.2}{2009/09/17}{Documentation, templates, and *.bst
% has been seperated from this .dtx. Incompatibility problems
% with amsref.sty, fncylab.sty have been fixed. Some bugs related
% to author/affiliation part have been fixed.}

which accounts for the change. In amsrefs.sty there's a bibsection
environment and, probably, the authors of elsarticle.cls forgot that
\bibsection is the command used by natbib to introduce the bibliography.

Ciao
Enrico

Luis Felipe

unread,
Nov 15, 2009, 9:20:41 PM11/15/09
to
Thank you very much!

ri...@river-valley.org

unread,
Jul 25, 2014, 12:49:07 AM7/25/14
to
On Monday, 16 November 2009 07:50:41 UTC+5:30, Luis Felipe wrote:
> Thank you very much!

The above problem has been resolved. You may find the modified classfile in the following location.

http://download.river-valley.com/elsarticle/elsarticle.cls

Also see:

http://support.river-valley.com/wiki/index.php?title=Elsarticle.cls

Axel Berger

unread,
Jul 25, 2014, 3:28:01 AM7/25/14
to
ri...@river-valley.org wrote:
> You may find the modified classfile in the following location.
> http://download.river-valley.com/elsarticle/elsarticle.cls

It's a better idea to get the full package, not just the isolated class
file:
http://download.river-valley.com/elsarticle/elsarticle-v1.21-ELS.zip

Also I have just found that the relevant MiKTeX packages are seriously
dated. It might be a good idea to update them to the current (now
already several years old) version.

Axel
0 new messages