latex参考文献顺序不对_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 =”出版社名稱”
}
說明:
第一行@article 告訴 BibTeX 這是一個文章類型的參考文獻. 還有其它格式, 例如 article, book,
booklet, conference, inbook, incollection, inproceedings, manual,
misc, mastersthesis, phdthesis, proceedings, techreport,
unpublished 等等.
接下來的”name1″, 就是你在正文中應用這個條目的名稱.
其它就是參考文獻里面的具體內容啦.
在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}
\begin{document}
\begin{CJK}{UTF8}{gkai}
%我是在linux下用使用latex的,
window用戶將上一行改為\begin{CJK}{GBK}{kai}
text\cite{name1}\cite{name2}
中文
把Latex中的 Reference 寫成中文的”參考文獻”
%如果文檔類是article之類的,
用\renewcommand\refname{參考文獻}
%如果文檔類是book之類的,
用\renewcommand\bibname{參考文獻}
\renewcommand\refname{參考文獻}
\bibliographystyle{plain}
\bibliography{ bibtex-example.bib}
\end{CJK}
\end{document}
將上面的內容保存為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,美國心理學學會期刊樣式:
總結
以上是生活随笔為你收集整理的latex参考文献顺序不对_Latex-引用文献按引用顺序排号的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Matlab】除法取整函数用法
- 下一篇: 在django中使用celery