BibTeX 是一個使用數據庫的的方式來管理參考文獻程序, 用於協調LaTeX的參考文獻處理.
BibTeX 文件的后綴名為 .bib . 先來看一個例子:
@article{Gettys90,
author = {Jim Gettys and Phil Karlton and Scott McGregor},
title = {The {X} Window System, Version 11},
journal = {Software Practice and Experience},
volume = {20},
number = {S2},
year = {1990},
abstract = {A technical overview of the X11 functionality. This is an update of the X10 TOG paper by Scheifler \& Gettys.}
}
說明:
第一行@article 告訴 BibTeX 這是一個文章類型的參考文獻. 還有其它格式, 例如 article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等.
接下來的"Gettys90", 就是你在正文中引用這個條目的名稱.
其它就是參考文獻里面的具體內容啦.
在LaTeX中使用BibTeX
為了在 LaTeX 中使用BibTeX 數據庫, 你必須先做下面三件事情:
1) 設置參考文獻的類型 (bibliography style). 標准的為 plain:
\bibliographystyle{plain}
其它的類型包括unsrt – 基本上跟 plain 類型一樣, 除了參考文獻的條目的編號是按照引用的順序, 而不是按照作者的字母順序.
alpha – 類似於 plain 類型, 當參考文獻的條目的編號基於作者名字和出版年份的順序.
abbrv – 縮寫格式 .
2) 標記引用 (Make citations). 當你在文檔中想使用引用時, 插入 LaTeX命令
\cite{引用文章名稱}
"引用文章名稱" 就是前邊定義@article后面的名稱.
3) 告訴 LaTeX 生成參考文獻列表 . 在 LaTeX 的結束前輸入
\bibliography{bibfile}
這里bibfile 就是你的 BibTeX 數據庫文件 bibfile.bib .
運行 BibTeX分為下面四步
1.用LaTeX編譯你的 .tex 文件 , 這是生成一個 .aux 的文件, 這告訴BibTeX 將使用那些引用.
2.用BibTeX 編譯 .bib 文件.
3.再次用LaTeX 編譯你的 .tex 文件, 這個時候在文檔中已經包含了參考文獻, 但此時引用的編號可能不正確.
4.最后用 LaTeX 編譯你的 .tex 文件, 如果一切順利的話, 這是所有東西都已正常了.
例子: 將上面的 BibTeX 的的例子保存為 bibfile.bib.
\documentclass{article}
\begin{document}
We cite \cite{name1} and \cite{name2}.
\bibliography{bibfile}
\bibliographystyle{plain}
\end{document}
將上面的內容保存為bibtex-example.tex .
latex編譯一次, bibtex 編譯一次, 再用 latex編譯兩次就大功告成了!
獲取bib文件
使用如下網址可以將springer文獻格式變成bibtex:
http://www.it.usyd.edu.au/~niu/cgi-bin/springer.cgi
關於文獻類型: (摘自TeXGuru的Latex2e用戶手冊)
@article條目為期刊或雜志上的一篇文章。
不可少域author, title, journal, year.
可省略域volume, number, pages, month, note.
@article{name,
author = {a and b},
title = {title},
journal = {journal name},
volume = {42},
number = {1},
year = {2008},
issn = {0110-0101},
pages = {1--8},
doi = {http://doi.xxx.org},
publisher = {ACM},
address = {New York, NY, USA},
};
@book條目為有確定出版社的書籍。
不可少域author或editor, title, publisher, year.
可省略域volume或number, series, address, edition, month, note.
@booklet條目為印制的有封皮的作品,但沒有出版社或贊助機構的名稱。
不可少域title.
可省略域author, howpublished, address, month, year, note.
@conference與下面的@inproceedings相同。
@inbook條目為一本書的一部分(章,節或某些頁)。
不可少域author或editor, title, chapter和/或pages, publisher,year.
可省略域volume或number, series, type, address, edition, month,note.
@incollection條目為一本書中有自己題目的一部分。
不可少域author, title, booktitle, publisher, year.
可省略域editor, volume或number,series, type, chapter, pages,address, edition, month, note.
@inproceedings條目為會議論文集中的一篇文章。
不可少域author, title, booktitle, year.
可省略域editor, volume或number, series, pages, address, month,
organization, publisher, note.
@InProceedings{b07name,
author = {a and b},
title = {title},
booktitle = {Proceedings of the conference},
address = {Sydney, Australia},
month = Nov,
year = 2008,
pages = {1-2},
affiliation = {Uni-name, Country},
URL = {http://url/}
};
@manual條目為科技文檔。
不可少域title.
可省略域author, organization, address, edition, month, year, note.
@mastersthesis條目為碩士論文。
不可少域author, title, school, year.
可省略域type, address, month, note.
@misc條目為不屬於其它任何類型的作品。
不可少域沒有。
可省略域author, title, howpublished, month, year, note.
@misc{name,
author = "a",
title = "title",
howpublished = "Website",
year = {2008},
note = {\url{https://www.mysite.org}}
};
@phdthesis條目為博士論文。
不可少域author, title, school, year.
可省略域type, address, month, note.
@proceedings條目為會議論文集。
不可少域title, year.
可省略域editor,volume或number, series, address, month,
organization, publisher, note.
@techreport條目為學校或其它研究機構印制的報告。
不可少域author, title, institution, year.
可省略域type, number, address, month, note.
@techreport{name,
author = {a and b}
title = {title},
institution = {institution rpt no.}
year = {2008}
};
@unpublished條目為有作者和標題的還未出版的作品。
不可少域author, title, note.
可省略域month, year.
在每項條目中還可以有可省略域key和crossref
沒有找到shtml中禁止復制的那行javascript,這個比較糾結了