2017-07-26 39 views
0

我是使用乳胶的新手。我想导入文件reference.bib我的文件document.tex。以上是我的代码如何将bib文件导入Latex?

reference.bib

@article{lin1973, 
    author = "Shen Lin and Brian W. Kernighan", 
    title = "An Effective Heuristic Algorithm for the Travelling-Salesman Problem", 
    journal = "Operations Research", 
    volume = 21, 
    year = 1973, 
    pages = "498-516" 
} 

这里是我的document.tex

\documentclass[a4paper,12pt, fleqn]{scrreprt} 

\usepackage{natbib} 

\begin{document} 
\bibliographystyle{plainnat} 
\bibliography{reference} 
\end{document} 

但是,当我跑我的乳胶没有任何反应。谁能帮我。 在此先感谢^^

回答

1

有一个单独的平台要求LateX-related questions。 除此之外,这个问题非常模糊。

让我们开始没有内容您的文档。假设您的LateX环境已经正确设置,向文档添加内容应该可以做些事情。

编译,运行中文提供两次,重新编译了几次,你应该设置。 编辑:删除截图输出文件,因为它是不必要的占用空间。

中文提供构建通常是在你的解释中发现:

Something like this \的DocumentClass [A4纸上打印,12磅,fleqn] {scrreprt}

\usepackage{natbib} 

\begin{document} 
Blablabla happened because I need to cite \cite{lin1973}.. 
\bibliographystyle{plainnat} 
\bibliography{reference} 
\end{document} 
+0

我试过这种方法,但我收到:“Blablabla发生,因为有需要引用?“ –

+0

警告:引用'lin1973'undefined –

+0

更多编译我的朋友,更多编译。或者你还没有在你的bibtex文件上运行bibtex,或者你没有编译足够多的主代码 – Uvar