2017-07-26 44 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