# No 'References' title using Elsevier document class

I'm trying to compile an article using the elsarticle document class. The references work ok, but I can't get the article to show the References section title and I don't know why.

Here's a very small working example of my files. Main .tex file:

\documentclass[final,5p,times,twocolumn]{elsarticle}
\journal{Elsevier Journal}

\begin{document}
\begin{frontmatter}

\title{The title}
\author[first]{Author}

\begin{abstract}
The abstract.
\end{abstract}

\end{frontmatter}

\bibliographystyle{elsarticle-num}

\section{Introduction}
The intro \citep{areference}.

\section{One section}
Some text in this section.

\section{Last section}
Some more text in this other section.

\bibliography{biblio}

\end{document}


the biblio.bib file looks like this:

@article{areference,
title = {{Ref title}},
volume = {3},
journal = {Some journal},
author = {Last, A. B.},
year = {1999},
pages = {1-2},
}


And this is the output:

My compilation command is this:

pdflatex "%f" && bibtex "%e" && pdflatex "%f" && pdflatex "%f"


What am I doing wrong?

-
Could'nt you just add a \section{References} before the \bibliography{biblio} ? (or the starred version \section*{References} if you do not want to attach a numbr to it.) –  Clément Jul 8 at 22:23
I guess I could add a \section*{References} command (so it won't be numbered) but I don't think I should. Shouldn't the section title be added automatically? –  Gabriel Jul 8 at 22:29
Instead of providing a separate bib file, you can enclose it in your MWE, by adding \RequirePackage{filecontents} \begin{filecontents*}{biblio.bib} @article{areference, title = {{Ref title}}, volume = {3}, journal = {Some journal}, author = {Last, A. B.}, year = {1999}, pages = {1-2}, } \end{filecontents*} between \journal{Elsevier Journal} and \begin{document}. –  Clément Jul 8 at 22:46

This is the expected behavior with this class. If you look in the template they provide, the elsarticle-template.tex file, you should see 4 lines before the end of the file:

Here are two sample references: \cite{Feynman1963118,Dirac1953888}.

\section*{References}

\bibliography{mybibfile}

\end{document}

-
Well that settles that then. Thank you! –  Gabriel Jul 8 at 22:50

I am not sure, if it is an expected behaviour. If we take class from here http://www.latextemplates.com/template/elseviers-elsarticle-document-class, the title References appears.

-
This is another good point. So am I doing something wrong? I don't think I should redefine the command as Christian proposes since that would be too invasive. Am completely lost as to what the true expected behavior is right now. –  Gabriel Jul 8 at 22:59
@Gabriel I remember, than the title References appeared, when I took the class from the Elsevier's page. Alas, I do not remember the date. If your article should be addressed to Elsevier, probably acting according the instructions on their page is the best solution. –  Przemysław Scherwentke Jul 8 at 23:04

It is a class feature, but it is possible, to redefine \bibliography of course in order to automatically add a \section*:

\documentclass[final,5p,times,twocolumn]{elsarticle}
\journal{Elsevier Journal}

\renewcommand{\bibname}{References}%

\let\ElseVierBibliography\bibliography%
\renewcommand{\bibliography}[1]{%
\section*{\bibname}%
\ElseVierBibliography{#1}%
}%

\begin{document}
\begin{frontmatter}

\title{The title}
\author[first]{Author}

\begin{abstract}
The abstract.
\end{abstract}

\end{frontmatter}

\bibliographystyle{elsarticle-num}

\section{Introduction}
The intro \citep{Lam94}%

\section{One section}
Some text in this section.

\section{Last section}
Some more text in this other section.

\bibliography{biblio}

\end{document}


-
The answer by Clément is more in line with the question asked so i marked it as accepted, but this one is a really great answer in terms of LaTeX coding. Thanks! –  Gabriel Jul 8 at 22:50
@Gabriel: I do not understand, although it is your choice ;-) –  Christian Hupfer Jul 8 at 22:52
@ChristianHupfer : even if this modification is innocent, I guess in general it is preferable not to redefine commands from an editor class, for that could mess with their formatting and annoy them. Do you agree? –  Clément Jul 8 at 22:54
@Clément: For sure, but they will be annoyed at that point already, when they see References heading too, most probably, so I don't care about that, apart from license issues. –  Christian Hupfer Jul 8 at 22:55
What Clément said is precisely what I was just about to say. That's why I asked if I was doing something wrong rather than help redefining a command. Your point about the now apparently extra 'References' heading is a good one too. I'll just have to wait and see what they say. Thank you both! –  Gabriel Jul 8 at 22:57