一、main.tex代码编写
(1)引用头文件:
\usepackage{cite}
(2)latex引用
我所用的latex模板中参考文献样式定义在模板文件夹 IEEEtran.cls中,我创建的.bib文件命名为reference.bib,放在当前文件夹中:
\bibliographystyle{IEEEtran} % argument is your BibTeX string definitions and bibliography database(s)
\bibliography{reference}
二、reference.bib文件的编写
打开谷歌学术,搜索对应的文献,并点击BibTeX生成对应的代码
生成的代码如下:
@article{
okamura2009haptic,
title={Haptic feedback in robot-assisted minimally invasive surgery},
author={Okamura, Allison M},
journal={Current opinion in urology},
volume={19},
number={1},
pages={102},
year={2009},
publisher={NIH Public Access}
}
论文中对参考文献的引用一般是:\cite{标签},这里如果要引用,则是\cite{.bib文件中大括号第一行}。例如,要引用参考文献[1],在文中需要插入“[1]”处写入代码:
\cite{okamura2009haptic}
示例:
An appropriate control strategy is expected to a suitable collaboration system between human and automatic controller\cite{okamura2009haptic} or a scheme through human multi-sensory collaboration not only visual channel.
三、编译生成reference
- compile 'main.tex' using latex or pdflatex => this step will generate main.aux file
- compile 'main.aux' (NOT 'ref.bib') using bibtex
- compile twice 'main.tex' using latex or pdflatex