12.18.2007

Bib Tex 使用笔记(引)

这里记录一下今天练习使用BibTex,插入Latex文件的经历。另外,也建议大家,如果的话,不要直接跑盗版软件摊,先搜一下google的free software,估计这种软件的存在。是不是?不做开发者,但是好的使用者也会让作者有激情继续下去。

我是在sourceforge.net找到的JabRef,是一个java程序。


另外,找到一个教程,叫做how to use Bibtex,网址是:

http://cmtw.harvard.edu/Documentation/TeX/Bibtex/Example.html

我首先做的是安装BiBtex,因为先前已经安装了Latex,现在只需要apt-get 一下Bibtex就好了,另外选了几个相关的工具包,包括一个python的图形界面的工具,但是感觉没有JabRef强。名字叫做pyBibliographer。

笔记:

先建立一个bib文件,命名为qhe.bib,内容大家熟悉html或者latex的话,应该很容易理解。内容为:


@STRING(PRL="Phys. Rev. Lett.")
@STRING(RMP="Rev. Mod. Phys.")

@ARTICLE{klitzing:qhe,
AUTHOR="K. von Klitzing and G. Dorda and M. Pepper",
TITLE="New method for high accuracy determination of fine structure
constant based on quantised hall resistance",
JOURNAL=PRL,
VOLUME=45,
PAGES=494,
YEAR=1980
}

@ARTICLE{klitzing:nobel,
AUTHOR="Klaus von Klitzing",
TITLE="The Quantised Hall Effect",
JOURNAL=RMP,
VOLUME=58,
PAGES=519,
YEAR=1986
}



然后建立tex文件,在文件里用~\cite去引用参考文献。每个bibliography都有一个key,这个就是代号,用于引用作用。见例子:



\documentstyle{article}
\begin{document}

\bibliographystyle{prsty} % Choose Phys. Rev. style for bibliography

\section{Introduction}
The discovery of the Quantised Hall Effect was made by
Klitzing~\cite{klitzing:qhe} for which he was awarded the 1985 Nobel
prize for physics~\cite{klitzing:nobel}.

\bibliography{qhe} % qhe.bib is the name of our database

\end{document}



然后执行命令:

1. latex example
2. bibtex example
3. latex example
4. latex example

以后使用就是在JabRef生成bib文件,然后在lyx,或者latex源文件里引用就可以了。很方便。
JabRef可以用于搜索和整理。而且可以链接网址和pdf文件。虽然不一定非要pdf文件格式,因为我试验了其他的格式。

没有评论: