Following an answer from @Mico (sorry Mico but it doesn't seem to like recognising your name) on [Bibliography has inconsistent formatting](https://tex.stackexchange.com/questions/539904/bibliography-has-inconsistent-formatting) I am attempting to use the `elsarticle-num` bibliography style with the natbib package (with numbers option). Unfortunately when compiled it results in a document with no bibliography. Can anyone help me fix this?

There are many similar questions like [Elsarticle - number bibliography not working](https://tex.stackexchange.com/questions/103664/elsarticle-number-bibliography-not-working) and [Referencing not working with Natbib](https://tex.stackexchange.com/questions/277145/referencing-not-working-with-natbib) but all the ones I could find refer to slightly different scenarios like in an `elsarticle` document class, using `\citep`, or different bibliography styles to name a few.

The following code produces an example output.

```
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{afterpage}
\usepackage{hyperref}
\graphicspath{ {images/} }
\usepackage[numbers]{natbib}        %Calls bibliography commands 

\begin{document}
\title{Inconsistant bibliography formatting example}
\author{Author}
\maketitle

\noindent Citation one \cite{Darwin2010}.
\\
\\
\noindent Citation two \cite{ReesChalkley2019}.

%\begin{figure}[h]
%   \centering
%   \includegraphics[width=0.5\textwidth]{spiral}
%   \caption{Example of a parametric plot ($\sin (x), \cos(x), x$)}
%\end{figure}

\bibliography{/home/oli/Dropbox/Documents/PhD/thesis/contemporary_version/thesis_corrections/pre-final/bib_problem_recreation/bib_dir/example.bib}
\bibliographystyle{elsarticle-num}
%\bibliographystyle{unsrt}

\end{document}

```

The following image shows that the bibliography does not get created.

[![example of bibliography not being created](https://i.stack.imgur.com/GMxVN.png)](https://i.stack.imgur.com/GMxVN.png)

Using `\bibliographystyle{unsrt}` correctly produces a bibliography.

The example.bib file is as follows:

```
@article{ReesChalkley2019,
abstract = {In the future, entire genomes tailored to specific functions and environments could be designed using computational tools. However, computational tools for genome design are currently scarce. Here we present algorithms that enable the use of design-simulate-test cycles for genome design, using genome minimisation as a proof-of-concept. Minimal genomes are ideal for this purpose as they have a simple functional assay, the cell either replicates or not. We used the first (and currently only published) whole-cell model, for the bacterium Mycoplasma genitalium . Our computational design-simulate-test cycles discovered novel in-silico minimal genomes smaller than JCVI-Syn3.0 , a bacteria with, currently, the smallest genome that can be grown in pure culture. In the process, we identified 10 low essentiality genes, 18 high essentiality genes, and produced evidence for at least two Mycoplasma genitalium in-silico minimal genomes. This work brings combined computational and laboratory genome engineering a step closer.},
author = {Rees, Joshua and Chalkley, Oliver and Landon, Sophie and Purcell, Oliver and Marucci, Lucia and Grierson, Claire},
doi = {10.1101/344564},
file = {:home/oli/.local/share/data/Mendeley Ltd./Mendeley Desktop/Downloaded/Rees et al. - 2019 - Designing Minimal Genomes Using Whole-Cell Models.pdf:pdf},
journal = {bioRxiv},
month = {mar},
pages = {344564},
publisher = {Cold Spring Harbor Laboratory},
title = {{Designing Minimal Genomes Using Whole-Cell Models}},
url = {https://www.biorxiv.org/content/10.1101/344564v3},
year = {2019}
}
@book{Darwin2010,
abstract = {Title from publishers bibliographic system (viewed on 11 Apr 2014). Charles Darwin (1809–1882) first published this work in 1868 in two volumes. The book began as an expansion of the first two chapters of On the Origin of Species: 'Variation under Domestication' and 'Variation under Nature' and it developed into one of his largest works; Darwin referred to it as his 'big book'. In volume 2, concerned with how species inherit particular characteristics, Darwin first published his 'provisional hypothesis' of pangenesis. This theory of 'gemmules' was not met with much acceptance and today is not valuable as scientific explanation, but it was important in laying down the key questions that needed to be answered regarding the processes of genetic inheritance. Darwin also used volume 2 to challenge the theories of evolution by design, expounded by the botanist Asa Gray. Darwin's arguments were some of the very first in a long debate that remains hot today.},
author = {Darwin, Charles},
isbn = {1108014232},
pages = {500},
publisher = {Cambridge University Press},
title = {{The Variation of Animals and Plants under Domestication Volume 2}},
url = {https://books.google.co.uk/books?hl=en{\&}lr={\&}id={\_}uON0AO7qwYC{\&}oi=fnd{\&}pg=PA1{\&}dq=Variation+of+Animals+and+Plants+under+Domestication{\&}ots=hqeZySDFfI{\&}sig=YY5rjn06wS5HccnZ8kvVEMC7bpU{\#}v=onepage{\&}q=Variation of Animals and Plants under Domestication{\&}f=false},
year = {2010}
}

```

Document is compiled on Ubuntu with the following script:

```
#/bin/bash

# declare filename so that you only need to change it once in the file
filename=example

# Clean up files
shopt -s extglob 
rm ${filename}.!(tex)

# build latex files
pdflatex -interaction=nonstopmode ${filename}.tex
bibtex ${filename}.aux
makeglossaries ${filename}
pdflatex ${filename}.tex
pdflatex ${filename}.tex
pdflatex ${filename}.tex

```

and has been run 5 times.

`example.blg` shows that `I couldn't open style file elsarticle-num.bst`: 

```
This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
The top-level auxiliary file: example.aux
I couldn't open style file elsarticle-num.bst
---line 22 of file example.aux
 : \bibstyle{elsarticle-num
 :                         }
I'm skipping whatever remains of this command
I found no style file---while reading file example.aux
You've used 2 entries,
            0 wiz_defined-function locations,
            89 strings with 685 characters,
and the built_in function-call counts, 0 in all, are:
= -- 0
> -- 0
< -- 0
+ -- 0
- -- 0
* -- 0
:= -- 0
add.period$ -- 0
call.type$ -- 0
change.case$ -- 0
chr.to.int$ -- 0
cite$ -- 0
duplicate$ -- 0
empty$ -- 0
format.name$ -- 0
if$ -- 0
int.to.chr$ -- 0
int.to.str$ -- 0
missing$ -- 0
newline$ -- 0
num.names$ -- 0
pop$ -- 0
preamble$ -- 0
purify$ -- 0
quote$ -- 0
skip$ -- 0
stack$ -- 0
substring$ -- 0
swap$ -- 0
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 0
warning$ -- 0
while$ -- 0
width$ -- 0
write$ -- 0
(There were 2 error messages)

```