[Tex/LaTex] Can’t create bibliography while using an elsevier template

bibliographieserrorsmiktextexmaker

I am using Texmaker 5.0.2.
I have downloaded "Elsevier reference styles" sample manuscript from
https://www.elsevier.com/authors/author-schemas/latex-instructions

However, I get the following error on compiling the original template-

! Missing number, treated as zero.
<to be read again> 
                   \X@mytitlenote 
l.72 \end{frontmatter}

?

If I try to play around with the elsarticle-template, I get the following error on compilation-

The file could not be saved. Please check if you have write permission.

Sometimes I am able to compile, but the references section and citations are blank.

Any help to create the Bibliography would be appreciated. Thank you.

Best Answer

(too long for a comment, hence posted as an answer)

Here's a condensed version of the file elsarticle-template.tex -- condensed in the sense that I've stripped out all material not related to creating numeric-style citation call-outs and the formatted bibliography -- along with a corrected form (more about this below) of the bib file that's distributed with the template file.

\RequirePackage{filecontents}
\begin{filecontents}{mybibfile.bib}
@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  = "Paul A. M. Dirac"
}
@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  = "Richard P. Feynman and Vernon, Jr., Frank L.", 
}
\end{filecontents}

\documentclass[review]{elsarticle}
\usepackage[colorlinks]{hyperref}
\bibliographystyle{elsarticle-num}

\begin{document}
Here are two sample references: \cite{Feynman1963118,Dirac1953888}.
\bibliography{mybibfile}
\end{document}

If MikTeX is installed correctly on your system, and if you run LaTeX, BibTeX, and LaTeX twice more, you should get the following output:

enter image description here

If you do not get this output, more likely than not something went wrong when you installed MikTeX. Try reinstalling it from scratch and recompiling this file.


It's somewhat instructive (and quite depressing, actually) to compare the corrected form of the sample bib file, shown above, with what's provided by the Elsevier template:

@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"
}

@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.}"
}

The following errors and sorry instances of outright sloppiness are readily apparent in in the Elsevier template version:

  • In the title field of the Dirac entry, note that we have lorentz instead of {Lorentz}. Since "Lorentz" is a person's surname (full name: Hendrik Antoon Lorentz; 1853-1928), it is not ok to lowercase it. Encasing "Lorentz" in curly braces prevents BibTeX from converting it to lowercase if sentence style is employed.

  • In the number field of the Dirac entry, one finds "1-–12" instead of "1--12". Note the weird presence of the unicode-type en-dash character, , after the first "dash" character,-`.

  • In the author field of the Feynman entry, one finds F.L {Vernon Jr.} instead of Vernon, Jr., F. L.. It is not ok to make the name's "junior component" a part of the surname.

  • The other author in the Feynman entry should be R. P. Feynman, not R.P Feynman. Do leave spaces between initials, and do terminate truncated names with a period (aka full stop).

  • Aside: You should make a habit of providing full first names, not just initials, for all authors and editors. Here: Paul Dirac, Richard Feynman, Frank Lee. That way, if you ever have to employ a bibliography style that writes out full first names, or if the journal you're submitting a paper to makes you use such a bibliography style, you won't have to start fiddling with the bib file to supply the missing information.

Happy BibTeXing!

Related Question