Latex如何引用參考文獻

文章轉載自:http://blog.sina.com.cn/s/blog_7e4ac8b50102uxlg.html

http://blog.sina.com.cn/s/blog_4fa881040100wtty.html


BibTeX 是一種格式和一個程序, 用於協調LaTeX的參考文獻處理.

BibTeX 使用數據庫的的方式來管理參考文獻. BibTeX 文件的後綴名爲 .bib . 先來看一個例子

@article{name1,
author = {作者, 多個作者用 and 連接},
title = {標題},
journal = {期刊名},
volume = {卷20},
number = {頁碼},
year = {年份},
abstract = {摘要, 這個主要是引用的時候自己參考的, 這一行不是必須的}
}

@book{name2,
author =”作者”,
year=”年份2008″,
title=”書名”,
publisher =”出版社名稱”
}

說明:

  1. 第一行@article 告訴 BibTeX 這是一個文章類型的參考文獻. 還有其它格式, 例如 article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等.
  2. 接下來的”name1″, 就是你在正文中應用這個條目的名稱.
  3. 其它就是參考文獻裏面的具體內容啦.

在LaTeX中使用BibTeX
爲了在LaTeX中使用BibTeX 數據庫, 你必須先做下面三件事情:

1) 設置參考文獻的類型 (bibliography style). 標準的爲 plain:

\bibliographystyle{plain}

將上面的命令放在 LaTeX 文檔的 \begin{document}後邊. 其它的類型包括

  • unsrt – 基本上跟 plain 類型一樣, 除了參考文獻的條目的編號是按照引用的順序, 而不是按照作者的字母順序.
  • alpha – 類似於 plain 類型, 當參考文獻的條目的編號基於作者名字和出版年份的順序.
  • abbrv – 縮寫格式 .

2) 標記引用 (Make citations). 當你在文檔中想使用引用時, 插入 LaTeX 命令

\cite{引用文章名稱}

“引用文章名稱” 就是前邊定義@article後面的名稱.

3) 告訴LaTeX生成參考文獻列表 . 在 LaTeX 的結束前輸入

\bibliography{bibfile}

這裏bibfile 就是你的 BibTeX 數據庫文件 bibfile.bib .

運行 BibTeX
分爲下面四步

  • 用LaTeX編譯你的 .tex 文件 , 這是生成一個 .aux 的文件, 這告訴 BibTeX 將使用那些應用.
  • 用BibTeX 編譯 .bib 文件.
  • 再次用LaTeX 編譯你的 .tex 文件, 這個時候在文檔中已經包含了參考文獻, 但此時引用的編號可能不正確.
  • 最後用 LaTeX 編譯你的 .tex 文件, 如果一切順利的話, 這是所有東西都已正常了.

例子: 將上面的 BibTeX 的的例子保存爲 bibtex-example.bib .

\documentclass{article}
\usepackage{CJK}

將上面的內容保存爲bibtex-example.tex .

latex編譯一次, bibtex 編譯一次, 再用 latex編譯兩次就大功告成了


完整過程
1. Run latex: LaTeX finds the references that are cited in the .tex file and the declaration of the bibliography style file (.bst) and bibliography database (.bib) and records them in the .aux file.
2. Run bibtex: BibTeX reads the .aux file to determine what cited entries to pull from what .bib files, formats and sorts the cited references according to the rules in the .bst file, and write the .bbl file.
3. Run latex again: LaTeX now finds the .bbl file and will read it and write cross reference data to the .aux file.
4. Run latex once more: LaTeX now finds the cross reference data for the citations in the .aux file and will resolve the citations.
5. Run latex for one last time (not always needed): Sometimes step 4 causes changes in line or page breaks that affect cross refence data for page or section links; this final pass through LaTeX should resolve those changes.


按照cite順序自動排序文獻編號,用\bibliographystyle{unsrt}

Latex鈥斺斝rick(四)讓引用文獻按引用順序排號

其他幾種如下[轉]:

 

通過設置 bibliographystyle 就可以達到上述目的,Bibtex 自身已具備排序的功能,而且可以選擇自己想要的排序方式。Bibtex 已自帶有 8 種樣式,分別如下(下面內容摘自 LaTeX 編輯部):

1. plain,按字母的順序排列,比較次序爲作者、年度和標題

2. unsrt,樣式同plain,只是按照引用的先後排序

3. alpha,用作者名首字母+年份後兩位作標號,以字母順序排序

4. abbrv,類似plain,將月份全拼改爲縮寫,更顯緊湊:

5. ieeetr,國際電氣電子工程師協會期刊樣式:

6. acm,美國計算機學會期刊樣式:

7. siam,美國工業和應用數學學會期刊樣式:

8. apalike,美國心理學學會期刊樣式:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章