定制自己的BibTex Style (bst)

      虽然BibTex Style 式样丰富、种类繁多,但有时还是会需要制作自己的。.bst虽然是文本文件,但由于其语法比较底层,读起来比较吃力,相关文献也非常少,因此直接修改.bst虽然是最为自由可控的方法,但并不推荐。比较好的方式是使用makebst。它以命令行对话的方式交互式地让用户对引文格式的各个方面进行选择。

 

      安装好MikTex之后,在任一命令行窗口键入

latex makebst

以默认方法安装的MikTex这时会提示或直接安装包。安装好后,会出现如下提示:

***********************************
* This is Make Bibliography Style *
***********************************
It makes up a docstrip batch job to produce
a customized .bst file for running with BibTeX
Do you want a description of the usage? (NO)

/yn=

这时便开始进行对话。键入“y”会显示帮助,键入“n”或直接回车会直接进入格式指定的过程。在此过程中,程序会提许多问题,包括引文如何编号

STYLE OF CITATIONS:
(*) Numerical as in standard LaTeX
(a) Author-year with some non-standard interface
(b) Alpha style, Jon90 or JWB90 for single or multiple authors
(o) Alpha style, Jon90 even for multiple authors
(f) Alpha style, Jones90 (full name of first author)
(c) Cite key (special for listing contents of bib file)
  Select:

如何排序

ORDERING OF REFERENCES (if non-author/year and non-alph)
(*) Alphabetical by all authors
(c) Citation order (unsorted, like unsrt.bst)
(d) Year ordered and then by authors
(r) Reverse year ordered and then by authors
  Select:

作者姓名如何显示

AUTHOR NAMES:
(*) Full, surname last (John Frederick Smith)
(f) Full, surname first (Smith, John Frederick)
(i) Initials + surname (J. F. Smith)
(r) Surname + initials (Smith, J. F.)
(s) Surname + dotless initials (Smith J F)
(w) Surname + comma + spaceless initials (Smith, J.F.)
(x) Surname + pure initials (Smith JF)
(y) Surname + comma + pure initials (Smith, JF)
(z) Surname + spaceless initials (Smith J.F.)
(a) Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
(b) First name reversed, with full names (Smith, John Fred, Harry Kab Jones)
  Select:

日期格式

DATE FORMAT (if non author-year citations)
(*) Plain month and year without any brackets
(p) Date in parentheses as (May 1993)
(b) Date in brackets as [May 1993]
(c) Date preceded by colon as `: May 1993'
(d) Date preceded by period as `. May 1993'
(m) Date preceded by comma as `, May 1993'
(s) Date preceded by space only, as ` May 1993'
  Select:

等等。这些选项,对于一般的自定制要求来说足够了。

      在所有问题回答完毕之后,会出现如下提示:

Finished!!
Batch job written to file `tmp.dbj'
Shall I now run this batch job? (NO)

/yn=

这时选“y”程序便会处理方才的选择,生成两个文件,后缀分别是bst和dbj。这个bst文件已经可以使用。

 

      dbj文件中记录了上面所有问题的选择,如果需要进行微小的改动,可以直接在这个文件中找到对应的部分,注释掉不需要的选项,将需要的选项解除注释,然后运行

latex xxx.dbj

便会生成一个新的以该文件底部指定的名称为名的bst文件。

 

      可能希望让BibTex能够找到新的bst文件,这时,需要将其拷贝到MikTex的local目录中,比如(Win7)

c:/Users/(当前用户名)/AppData/Local/MiKTeX/2.9/bibtex/bst/

然后在命令行运行

texhash

即可。

转载来源:http://blog.csdn.net/cremesino/article/details/6122485 

posted on 2012-02-07 13:44  扶蘇  阅读(790)  评论(0编辑  收藏  举报

导航