[Tex/LaTex] No number is added with reference items

bibitembibtexnumbering

I am using texmaker. the text of the sample.bib code is below,

@article{seqnn,
  author =       {Ilya Sutskever and Oriol Vinyals and Quoc },
  title =        {Sequence to sequence learning with neural networks},
  journal =      {Neural Information Processing Systems},
  year =         {2014}
}

@article{encdec,
  author =       {Kyunghyun Cho and Bart Van Merrienboer and Caglar Gulcehre and Dzmitry Bahdanau and Fethi Bougares and Holger Schwenk and Yoshua Bengio},
  title =        {Learning phrase representations using RNN encoder-decoder for statistical machine translation},
  journal =      {Conference on Empirical Methods in Natural Language Processing(EMNLP)},
  year =         {2014}
} 

@article{nmt,
  author =       {Dzmitry Bahdanau and Kyunghyun Cho and Yoshua Bengio},
  title =        {Neural machine translation by jointly learning to align and translate},
  journal =      {International Conference on Learning Representations},
  year =         {2015}
}

Now in the *.tex file I have added the following code at the end of the document to cite,

\bibliographystyle{abbrv} 
\bibliography{sample} 

After compiling, the output is like below,

enter image description here

How can I add numbers at the left side of the each bibitem?

Best Answer

With the following MWE (package filecontents used to have TeX code and Bib file in one MWE):

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@article{seqnn,
  author =  {Ilya Sutskever and Oriol Vinyals and Quoc },
  title =   {Sequence to sequence learning with neural networks},
  journal = {Neural Information Processing Systems},
  year =    {2014},
}
@article{encdec,
  author =  {Kyunghyun Cho and Bart Van Merrienboer and Caglar Gulcehre and Dzmitry Bahdanau and Fethi Bougares and Holger Schwenk and Yoshua Bengio},
  title =   {Learning phrase representations using RNN encoder-decoder for statistical machine translation},
  journal = {Conference on Empirical Methods in Natural Language Processing(EMNLP)},
  year =    {2014},
} 
@article{nmt,
  author =  {Dzmitry Bahdanau and Kyunghyun Cho and Yoshua Bengio},
  title =   {Neural machine translation by jointly learning to align and translate},
  journal = {International Conference on Learning Representations},
  year =    {2015},
}
\end{filecontents*}


\documentclass[10pt,a4paper]{article}

\usepackage{hyperref}

\begin{document}

This is text with \cite{Goossens} and \cite{adams}.

\nocite{*} % to test all bib entrys
\bibliographystyle{plain} % abbrv
\bibliography{\jobname}

\end{document}

commpiled with the usual commands

pdflatex mwe.tex
bibtex mwe
pdflatex mwe.tex
pdflatex mwe.tex

results in the following bibliography:

resulting bibliography