Bibtex使用方法簡要說明(linux)

第一步:建立.bib文件 
格式以下:javascript

以用{}包含具體內容
@article {name1,
author = {做者, 多個做者用 and 鏈接},
title = {標題},
journal = {期刊名},
volume = {卷20},
number = {頁碼},
year = {年份},
}
也能夠直接用雙引號「」包含具體內容
@book {name2,
author ="做者",
year ="年份2008",
title ="書名",
publisher ="出版社名稱"
}php

紅色字體如article, book 表示所引用的參考文獻的類型. bibtex共支持以下14種類型的參考文獻,每種參考文獻包括必須的條目(藍色字體)也在後文中給出。接下來的"name1", 就是你在正文中引用這個文獻的名稱. 在文中,應當爲/cite{name1}。java

Bibliography entries included in a .bib file are split by types. The following types are understood by virtually all BibTeX styles:app

參考文獻類型 說明 Required fields 必填內容 Optional fields 選填內容
article An article from a journal or magazine. author, title, journal, year volume, number, pages, month, note, key
book A book with an explicit publisher. author/editor, title, publisher, year volume, series, address, edition, month, note, key, pages
booklet A work that is printed and bound, but without a named publisher or sponsoring institution. title author, howpublished, address, month, year, note, key
conference The same as inproceedings , included for Scribe compatibility author, title, booktitle, year editor, pages, organization, publisher, address, month, note, key
inbook A part of a book, usually untitled. May be a chapter (or section or whatever) and/or a range of pages.  author/editor, title, chapter/pages, publisher, year volume, series, address, edition, month, note, key
i ncollection A part of a book having its own title. author, title, booktitle, year editor, pages, organization, publisher, address, month, note, key
inproceedings An article in a conference proceedings. author, title, booktitle, year editor, pages, organization, publisher, address, month, note, key
manual Technical documentation. title author, organization, address, edition, month, year, note, key
mastersthesis Master's thesis . author, title, school, year address, month, note, key
misc For use when nothing else fits none author, title, howpublished, month, year, note, key
phdthesis Ph.D. thesis author, title, school, year address, month, note, key
proceedings The proceedings of a conference. title, year editor, publisher, organization, address, month, note, key
t ec hreport A report published by a school or other institution, usually numbered within a series author, title, institution, year type, number, address, month, note, key
unpublished A document having an author and title, but not formally published. author, title, note 
month, year, key

bibtex支持的參考文獻的條目:less

Item  說明
address Publisher's address (usually just the city, but can be the full address for lesser-known publishers)
annote An annotation for annotated bibliography styles
author The name(s) of the author(s) (in the case of more than one author, separated byand )
booktitle The title of the book, if only part of it is being cited
chapter The chapter number
crossref The key of the cross-referenced entry
edition The edition of a book, long form (such as "first" or "second")
editor The name(s) of the editor(s)
eprint A specification of an electronic publication, often a preprint or a technical report
howpublished How it was published, if the publishing method is nonstandard
institution The institution that was involved in the publishing, but not necessarily the publisher
journal The journal or magazine the work was published in
key A hidden field used for specifying or overriding the alphabetical order of entries (when the "author" and "editor" fields are missing). Note that this is very different from the key (mentioned just after this list) that is used to cite or cross-reference the entry.
month The month of publication (or, if unpublished, the month of creation)
note Miscellaneous extra information
number The "number" of a journal, magazine, or tech-report, if applicable. (Most publications have a "volume", but no "number" field.)
organization The conference sponsor
pages Page numbers, separated either by commas or double-hyphens. For books, the total number of pages.
publisher  The publisher's name
school The school where the thesis was written
series The series of books the book was published in (e.g. "The Hardy Boys " or "Lecture Notes in Computer Science ")
title  The title of the work
type The type of tech-report, for example, "Research Note"
url The WWW address
volume The volume of a journal or multi-volume book
year The year of publication (or, if unpublished, the year of creation)

第二步:在.tex文件中引用

1) 設置參考文獻的類型 (bibliography style). 標準的爲 plain:
     /bibliographystyle{plain}
將上面的命令放在 LaTeX 文檔的 /begin{document}後邊. 其它的類型包括
     unsrt -- 基本上跟 plain 類型同樣, 除了參考文獻的條目的編號是按照引用的順序, 而不是按照做者的字母順序.
     alpha --相似於 plain 類型, 當參考文獻的條目的編號基於做者名字和出版年份的順序.
     abbrv --縮寫格式 .
2) 標記引用 (Make citations). 當你在文檔中想使用引用時, 插入 LaTeX 命令
    /cite{引用文章名稱}  --"引用文章名稱" 就是前邊定義@article後面的名稱.
3) 告訴 LaTeX 生成參考文獻列表 . 在 LaTeX 的結束前輸入
     /bibliography{mybibfile}electron

第三步:編譯字體

若是你的.tex文件名爲myarticle.tex; 你的.bib文件名爲mybibfile.bibui

那麼須要執行的命令以下:this

latex myarticle.texurl

bibtex myarticle

latex myarticle.tex

latex myarticle.tex

實例(源於[2]):

1. 創建.bib文件--mybibfile.bib

@misc{ Nobody06,

 author = "Nobody Jr",

 title = "My Article",

 year = "2006" }

2. 創建.tex文件myarticle.tex並在文中引用.bib文件

/documentclass[11pt]{article}

/usepackage{cite}

 /begin{document}

/title{My Article}

 /author{Nobody Jr.}

/date{Today}

/maketitle Blablabla said Nobody ~/cite{Nobody06}.

/bibliography{mybibfile}{}

/bibliographystyle{plain}

/end{document}

3. 編譯:

[ysong@ECEL216D-2076 Desktop]$ latex myarticle.tex

 

  1. This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode   
  2. (./myarticle.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded.   
  3. (/usr/share/texmf/tex/latex/base/article.cls   
  4. Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/cite/cite.sty)   
  5. No file myarticle.aux.   
  6. LaTeX Warning: Citation `Nobody06' on page 1 undefined on input line 11. No file myarticle.bbl. [1] (./myarticle.aux)   
  7. LaTeX Warning: There were undefined references.)   
  8. Output written on myarticle.dvi (1 page, 468 bytes).   
  9. Transcript written on myarticle.log.   

 

[ysong@ECEL216D-2076 Desktop]$ bibtex myarticle

  1. This is BibTeX, Version 0.99c (Web2C 7.5.4) The top-level auxiliary file: myarticle.aux The style file: plain.bst Database file #1: mybibfile.bib   

 

[ysong@ECEL216D-2076 Desktop]$ latex myarticle.tex

 

  1. This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./myarticle.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls   
  2. Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/cite/cite.sty) (./myarticle.aux) LaTeX Warning: Citation `Nobody06' on page 1 undefined on input line 11. (./myarticle.bbl) [1] (./myarticle.aux)   
  3. LaTeX Warning: There were undefined references.   
  4. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.)   
  5. Output written on myarticle.dvi (1 page, 592 bytes).   
  6. Transcript written on myarticle.log.   

 

[ysong@ECEL216D-2076 Desktop]$ latex myarticle.tex

  1. This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode   
  2. (./myarticle.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls   
  3. Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/cite/cite.sty) (./myarticle.aux) (./myarticle.bbl) [1] (./myarticle.aux) )   
  4. Output written on myarticle.dvi (1 page, 548 bytes).   
  5. Transcript written on myarticle.log.  

生成的PDF文件以下圖所示

mybib_pdf 
[1] BibTeX使用介紹

[2] http://www.bibtex.org/Format

[3] http://en.wikipedia.org/wiki/BibTeX

[4] http://bbs.ctex.org/viewthread.php?tid=26056

相關文章
相關標籤/搜索