Latex利用bibtex引用参考文献的方法。

第一步 准备参考文献

首先,新建一个后缀名为.bib的文件,准备放置参考文献。(可以新建一个.txt文件并更改后缀名)。

参考文献可以从google学术上直接导出,比如,我需要引用一篇mask-Rcnn相关的论文,在谷歌学术里搜索。找到对应的论文之后,点击栓双银引号图标,弹出对话框。在这里插入图片描述
如果用word写论文,可以直接复制第一个带格式的参考文献粘贴到word文献即可。对于Latex来说,还需要点击BibTex链接,得到BibTex格式文件。
在这里插入图片描述
点击之后,会弹出一个页面,格式如下。

@inproceedings{he2017mask,
  title={Mask r-cnn},
  author={He, Kaiming and Gkioxari, Georgia and Doll{\'a}r, Piotr and Girshick, Ross},
  booktitle={Proceedings of the IEEE international conference on computer vision},
  pages={2961--2969},
  year={2017}
}
  1. 第一行@article 告诉 BibTeX 这是一个 article 类型的参考文献,可用的候选类型包括 article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等。
  2. “he2017mask”,就是你在正文中应用这个条目的label。
  3. 其余的就是参考文献里面的具体内容。

将需要引用的所有文献都粘贴到.bib格式的文件中。

第二步 论文中插入必要的代码

在主文件中插入如下代码,用来在正文中导入.bib文件:

\addbibresource{你的文件名.bib}
\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

在文后加入如下代码用来生成参考文献列表:

\def\bibrangedash{ $\sim$ }
\printbibliography [ category = cited]

在论文的主文件中按照以下步骤编译:
在这里插入图片描述

第三步 引用论文

在论文的正文中,用\cite{论文标志}引用,论文标志就是每个论文开头的那一部分,比如,Mask-RCnn论文的引用就是:\cite{he2017mask}
一般引用论文时需要在右上角引用,可以在主文件中加上这句话:\newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}}
在正文中通过\upcite{he2017mask}引用即可。

另外,如果需要同时引用多篇论文,用逗号分隔,比如,我们还有Faster-RCNN和Mask-RCNN两篇论文:

@inproceedings{girshick2015fast,
  title={Fast r-cnn},
  author={Girshick, Ross},
  booktitle={Proceedings of the IEEE international conference on computer vision},
  pages={1440--1448},
  year={2015}
}

@inproceedings{ren2015faster,
  title={Faster r-cnn: Towards real-time object detection with region proposal networks},
  author={Ren, Shaoqing and He, Kaiming and Girshick, Ross and Sun, Jian},
  booktitle={Advances in neural information processing systems},
  pages={91--99},
  year={2015}
}

举一个栗子:

这是引用单篇论文\upcite{he2017maskh}示例;这是引用两篇论文\upcite{he2017mask,girshick2015fast}示例;这是引用多篇论文\upcite{he2017mask,girshick2015fast,ren2015faster}示例。

显示效果如下:
在这里插入图片描述

总结:

用这种方式引用论文最大的优势就是无需对参考文献排序,Latex会自动按照正文中的论文引用顺序将参考文献排序,但是如果需要引用的论文很多,以后需要从这一大堆论文中找出想要引用的论文还是有不小的难度。如果需要大量引用论文,建议使用可以直接导出bibtex的文献管理软件,比如Jabref等。

另外,也可以直接在文末添加参考文献,参见:citet and citep behaves like cite

对照阅读:

  1. Latex中用Bibtex来引用文献
  2. LaTeX中的参考文献
  3. Latex引用参考文献的5种方式
  4. Latex 同时引用多篇参考文献
发布了63 篇原创文章 · 获赞 189 · 访问量 27万+

猜你喜欢

转载自blog.csdn.net/u013044310/article/details/89526713