2

References should be arranged first alphabetically and then further sorted chronologically if necessary.

I have been asked to sort the references. Despite I have followed the solution here, it did not work for me.

The result is not ordered by surname of the author(s).

Please consider that I cannot change the documentclass.

\documentclass[3p,times,twocolumn,authoryear]{elsarticle}
\usepackage{ecrc}
\volume{00}
\firstpage{1}
\journal{Expert Systems with Applications}
\runauth{Me et al.}
\jid{eswa}
\jnltitlelogo{Expert Systems with Applications}
\usepackage{amssymb}
\usepackage[figuresright]{rotating}
\usepackage{lipsum}
\usepackage{etoolbox}
\AtBeginDocument{%
  % \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
  \patchcmd{\MaketitleBox}{\vspace*{-20pt}\fi}{\fi}{}{}%
}

\begin{document}

\begin{frontmatter}
\dochead{}
\title{title  title title}
\author{}
\address{}
\begin{abstract}
Text of abstract
\end{abstract}
\begin{keyword}
k1, k2, k3
\end{keyword}
\end{frontmatter}

\section{first section}

\citep{Feynman1963118,Dirac1953888}

%\bibliographystyle{apsrev}
%\bibliographystyle{plainnat}
%\bibliographystyle{natbib}
\bibliographystyle{elsarticle-num-names}
\bibliography{mybibfile}


\end{document}

mybibfile.bib

@article{Feynman1963118,
  title   = "The theory of a general quantum system interacting with a linear dissipative system",
  journal = "Annals of Physics ",
  volume  = "24",
  pages   = "118--173",
  year    = "1963",
  doi     = "10.1016/0003-4916(63)90068-X",
  author  = "R.P Feynman and F.L {Vernon Jr.}"
}

@article{Dirac1953888,
  title   = "The lorentz transformation and absolute time",
  journal = "Physica ",
  volume  = "19",
  number  = "1-–12",
  pages   = "888--896",
  year    = "1953",
  doi     = "10.1016/S0031-8914(53)80099-6",
  author  = "P.A.M. Dirac"
}

enter image description here

ar2015
  • 962

1 Answers1

3

(Edited to incorporate information received via comments after I posted an initial answer.)

According to the final link you provided in the comments, the bibliographic entries must not only be sorted alphabetically by authors' surnames, but they must also be formatted according to APA-6 guidelines. Moreover, the citation call-outs must use authoryear style rather than, say, some numeric style.

The Elsevier template you've linked to provides eight [8!] candidate bibliography styles, but only three of them do not contain num in their filenames. This leaves three candidate bibliography styles: model2-names, model4-names, and model5-names. (Annoyingly, Elsevier doesn't seem to provide a list of what the various bib style files do.) Testing them one after the other reveals that you should be using model5-names.

Aside: I couldn't help but notice that both of the sample bib entries contain syntax and content errors. I realize you copied these entries from a template file, so it's moderately disturbing that Elsevier would distribute such faulty sample bib entries. E.g., there is a non-ASCII character in the number field of the "Dirac" entry, Lorentz should be encased in curly braces to keep it from being lower-cased, and spaces should be inserted between first and middle name initials of all authors. (Otherwise, only the first initial is printed; that's probably not what's called for.) Also, it's a really bad idea to combine the surname and "junior" components of an author's full name. In the code below, I've tried to fix some of these errors.


enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybibfile.bib}
@article{Feynman1963118,
  title   = "The theory of a general quantum system 
             interacting with a linear dissipative system",
  journal = "Annals of Physics",
  volume  = "24",
  pages   = "118--173",
  year    = "1963",
  doi     = "10.1016/0003-4916(63)90068-X",
  author  = "R. P. Feynman and Vernon, Jr., F. L.",
}
@article{Dirac1953888,
  title   = "The {Lorentz} transformation and absolute 
             time",
  journal = "Physica",
  volume  = "19",
  number  = "1--12",
  pages   = "888--896",
  year    = "1953",
  doi     = "10.1016/S0031-8914(53)80099-6",
  author  = "P. A. M. Dirac",
}
\end{filecontents}

\documentclass[3p,times,twocolumn,authoryear]{elsarticle}
\bibliographystyle{model5-names}
\usepackage{ecrc} % required by journal
\usepackage[spaces,hyphens,obeyspaces]{url}
\usepackage[colorlinks,allcolors=blue]{hyperref}

\begin{document}
\section{First section}
\citep{Feynman1963118,Dirac1953888}
\bibliography{mybibfile}
\end{document}
Mico
  • 506,678
  • Thanks. It works. Is there any referencing style closest to here? In this journal the year is in parenthesis – ar2015 Jul 09 '16 at 14:09
  • apacite has conflict with elsarticle resulting into error – ar2015 Jul 09 '16 at 14:13
  • because I am submitting paper to Elsevier. following the template – ar2015 Jul 09 '16 at 14:16
  • But my paper was rejected coz of referencing which makes no sense to me. – ar2015 Jul 09 '16 at 14:22
  • They have no proper template but a lot of requirements. I have no idea what others do. but I just give them content as close as possible to what they want. – ar2015 Jul 09 '16 at 14:25
  • An accepted answer coupled with a single downvote -- now that's a first for any answer of mine. Interesting... – Mico Jul 09 '16 at 20:01
  • Last night, I was too sleepy so I both accepted and downvoted your answer by mistake. The citation must be like (Smith, 2016) and not a number like [1]. – ar2015 Jul 10 '16 at 00:17
  • @ar2015 - According to the instructions in the template for which you provided a link, the bibliography style elsarticle-num should be used. By design, it can really only generate numeric-style citation call-outs. Does this instruction not apply after all and why doesn't it apply? – Mico Jul 10 '16 at 06:32
  • I have to follow this journal's guides which asks us to use APA. – ar2015 Jul 10 '16 at 06:36
  • @ar2015 - Why aren't you using the bibliography style model5-names? It comes very very close to the full APA6 formatting guidelines. Put differently, why have you been using the elsarticle-num-names style so far? – Mico Jul 10 '16 at 07:06
  • Thanks, I tried model5-names and it seems to be what I needed. It also sorted my references. – ar2015 Jul 10 '16 at 07:16
  • @ar2015 - I've updated my answer to incorporate the additional information you've provided and to point out that model5-names is the bibliography style to use. – Mico Jul 10 '16 at 07:32