4

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.

  • 1
    Welcome to TeX.SX. I am not quite sure what you are doing. Does that error appear with the template as downloaded? Or did you do some changes before? Where does the bibbliography come into play? – Johannes_B Aug 27 '18 at 4:20
  • 1
    I am still running TeX Live 2017, which is a bit out of date by now. But i don't get any errors. It works flawlessly. – Johannes_B Aug 27 '18 at 4:28
  • 1
    TeXmaker version is completely irrelevant. Your installation of TeX Live or MikTeX matters. – Johannes_B Aug 27 '18 at 4:33
  • 2
    No, i cannot. You have to wait for someone else to confirm the issue. – Johannes_B Aug 27 '18 at 4:42
  • 2
    @ArvindSharma - Please tell us which TeX distribution you employ. Do note that TeXmaker is just a front end to a TeX distribution; it is not a part of the TeX distribution itself. – Mico Aug 27 '18 at 7:16
1

(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!

  • Thanks a ton. Yes, I am able to properly compile your code. I am however curious why I need to run Latex, Bibtex, Latex, Latex, and finally QuickBuild to generate the output in Texmaker using MikTex? Also, if I switch to Tex Live 2018 too, I am not able to compile a biblography or get citations, though an output (all other sections) are properly generated. – Arvind Sharma Aug 27 '18 at 21:51
  • 2
    @ArvindSharma - The LaTeX-BibTeX-LaTeX-LaTeX compilation sequence is the standard method for creating (and subsequently updating) formatted bibliographies and citation call-outs. Please read any introduction to BibTeX to familiarize yourself with this topic. – Mico Aug 27 '18 at 22:16
  • 1
    @ArvindSharma - If you can’t create the bibliography and citation call-outs with TeXLive as the back-end, it’s most likely because (a) you’re not running BibTeX and/or (b) the document is missing a \bibliographystyle statement. What does the blg (bibliography log) file say? – Mico Aug 27 '18 at 22:21
  • @Mico- I am using your condensed version of Elsevier template in TexLive. I do not get any errors but the citations have ? and no reference section is generated. – Arvind Sharma Aug 28 '18 at 15:03
  • @ArvindSharma - So far, you still haven't stated with any kind of specificity how you actually compile your document. However, the presence of ? instead of real citation call-outs and the absence of a formatted bibliography are both entirely consistent with the hypothesis that you haven't run BibTeX -- or, at least, haven't run it correctly. As I asked in one or two earlier comments, what is in the file \jobname.blg? For sure, if there is no file named \jobname.blg, where \jobname is the name of your main tex file, then it's almost certain that you have not run BibTeX. – Mico Aug 28 '18 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.