参考及致谢
LaTex: Undefined citation warnings 解决方法
Paperpile
运行环境
使用方法演示
Step1
在空文件夹中新建一个latex文件
Step2
下载latex格式文件,下载链接
点击图中圈出的链接下载。将下载好的IEEEtran.bst文件拷贝到Step1中新建的文件夹下。
Step3
之后,我们在文件夹下新建一个BibTex文件,命名为sampleBibFile.bib
用记事本打开.bib文件,将以BibTex格式从网站导出的论文引用复制到.bib文件中并保存。这里以IEEE网站为例,其他学术网站同理。
Step4
打开最初创建的latex文件,向其中复制以下内容
\documentclass[a4paper,10pt]{article}
\begin{document}
This is an example of a paragraph with in-text
citations using the IEEEtran BibTeX style.
Here is a reference to a journal article with
a single author \cite{article1}.
\bibliographystyle{IEEEtran}
\bibliography{sampleBibFile}
\end{document}
注意倒数第二行,格式为:\bibliography{.bib文件的名称}
将上面示例代码中的article1替换成bibTex中文章的代号。如下图所示。
所以替换之后的代码是:
\documentclass[a4paper,10pt]{article}
\begin{document}
This is an example of a paragraph with in-text
citations using the IEEEtran BibTeX style.
Here is a reference to a journal article with
a single author \cite{7892683}.
\bibliographystyle{IEEEtran}
\bibliography{sampleBibFile}
\end{document}
Step6
此时如果你直接点击“build&view” (我用的是TexStudio),编译能够正常运行并退出,如果报错,请检查之前的步骤。
但输出的pdf不能正常显示引用的内容,如下图所示:
Step7
使用键盘"Win" + “R” 输入cmd,打开命令行。
使用cd命令定位到存放latex文件的目录下(为了方便演示,我在桌面新建了名为citation的目录用于存放之前提到的文件)。
因为最初新建的.tex文件的名称是citation,执行如下命令。
pdflatex citation # 使用pdflatex compile
bibtex citation # 使用bibtex compile
pdflatex citation
pdflatex citation
tex结尾的命令后面跟的参数是.tex文件名。
Step8
手动打开目录下面已经编译好的pdf文件,引用和文字内容一切正常,可以直接复制到word。
其他
或者也可以试一下Cite This For Me这个网站。