latex参考文献顺序不对_Latex-引用文献按引用顺序排号
文章轉(zhuǎn)載自:http://blog.sina.com.cn/s/blog_7e4ac8b50102uxlg.html
http://blog.sina.com.cn/s/blog_4fa881040100wtty.html
BibTeX 是一種格式和一個(gè)程序, 用于協(xié)調(diào)LaTeX的參考文獻(xiàn)處理.
BibTeX 使用數(shù)據(jù)庫的的方式來管理參考文獻(xiàn). BibTeX 文件的后綴名為 .bib . 先來看一個(gè)例子
@article{name1,
author = {作者, 多個(gè)作者用 and 連接},
title = {標(biāo)題},
journal = {期刊名},
volume = {卷20},
number = {頁碼},
year = {年份},
abstract = {摘要, 這個(gè)主要是引用的時(shí)候自己參考的, 這一行不是必須的}
}
@book{name2,
author =”作者”,
year=”年份2008″,
title=”書名”,
publisher =”出版社名稱”
}
說明:
第一行@article 告訴 BibTeX 這是一個(gè)文章類型的參考文獻(xiàn). 還有其它格式, 例如 article, book,
booklet, conference, inbook, incollection, inproceedings, manual,
misc, mastersthesis, phdthesis, proceedings, techreport,
unpublished 等等.
接下來的”name1″, 就是你在正文中應(yīng)用這個(gè)條目的名稱.
其它就是參考文獻(xiàn)里面的具體內(nèi)容啦.
在LaTeX中使用BibTeX
為了在LaTeX中使用BibTeX 數(shù)據(jù)庫, 你必須先做下面三件事情:
1) 設(shè)置參考文獻(xiàn)的類型 (bibliography style). 標(biāo)準(zhǔn)的為 plain:
\bibliographystyle{plain}
將上面的命令放在 LaTeX 文檔的 \begin{document}后邊. 其它的類型包括
unsrt – 基本上跟 plain 類型一樣, 除了參考文獻(xiàn)的條目的編號(hào)是按照引用的順序,
而不是按照作者的字母順序.
alpha – 類似于 plain 類型, 當(dāng)參考文獻(xiàn)的條目的編號(hào)基于作者名字和出版年份的順序.
abbrv – 縮寫格式 .
2) 標(biāo)記引用 (Make citations). 當(dāng)你在文檔中想使用引用時(shí), 插入 LaTeX 命令
\cite{引用文章名稱}
“引用文章名稱” 就是前邊定義@article后面的名稱.
3) 告訴LaTeX生成參考文獻(xiàn)列表 . 在 LaTeX 的結(jié)束前輸入
\bibliography{bibfile}
這里bibfile 就是你的 BibTeX 數(shù)據(jù)庫文件 bibfile.bib .
運(yùn)行 BibTeX
分為下面四步
用LaTeX編譯你的 .tex 文件 , 這是生成一個(gè) .aux 的文件, 這告訴 BibTeX
將使用那些應(yīng)用.
用BibTeX 編譯 .bib 文件.
再次用LaTeX 編譯你的 .tex 文件, 這個(gè)時(shí)候在文檔中已經(jīng)包含了參考文獻(xiàn), 但此時(shí)引用的編號(hào)可能不正確.
最后用 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 寫成中文的”參考文獻(xiàn)”
%如果文檔類是article之類的,
用\renewcommand\refname{參考文獻(xiàn)}
%如果文檔類是book之類的,
用\renewcommand\bibname{參考文獻(xiàn)}
\renewcommand\refname{參考文獻(xiàn)}
\bibliographystyle{plain}
\bibliography{ bibtex-example.bib}
\end{CJK}
\end{document}
將上面的內(nèi)容保存為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順序自動(dòng)排序文獻(xiàn)編號(hào),用\bibliographystyle{unsrt}
Latex鈥斺斝rick(四)讓引用文獻(xiàn)按引用順序排號(hào)
其他幾種如下[轉(zhuǎn)]:
通過設(shè)置 bibliographystyle 就可以達(dá)到上述目的,Bibtex
自身已具備排序的功能,而且可以選擇自己想要的排序方式。Bibtex 已自帶有 8 種樣式,分別如下(下面內(nèi)容摘自 LaTeX
編輯部):
1. plain,按字母的順序排列,比較次序?yàn)樽髡摺⒛甓群蜆?biāo)題
2. unsrt,樣式同plain,只是按照引用的先后排序
3. alpha,用作者名首字母+年份后兩位作標(biāo)號(hào),以字母順序排序
4. abbrv,類似plain,將月份全拼改為縮寫,更顯緊湊:
5. ieeetr,國際電氣電子工程師協(xié)會(huì)期刊樣式:
6. acm,美國計(jì)算機(jī)學(xué)會(huì)期刊樣式:
7. siam,美國工業(yè)和應(yīng)用數(shù)學(xué)學(xué)會(huì)期刊樣式:
8. apalike,美國心理學(xué)學(xué)會(huì)期刊樣式:
總結(jié)
以上是生活随笔為你收集整理的latex参考文献顺序不对_Latex-引用文献按引用顺序排号的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Matlab】除法取整函数用法
- 下一篇: 在django中使用celery