参考项未添加任何编号

参考项未添加任何编号

我正在使用 texmaker。代码文本sample.bib如下,

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

现在*.tex我在文件的末尾添加了以下代码以供引用,

\bibliographystyle{abbrv} 
\bibliography{sample} 

编译后,输出如下,

在此处输入图片描述

我如何在每个项的左侧添加数字?

答案1

使用以下 MWE(包filecontents中用于在一个 MWE 中包含 TeX 代码和 Bib 文件):

\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}

使用常用命令进行编译

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

得出以下参考书目:

由此产生的书目

相关内容