最近学习 LaTeX ,遇到了很多问题,其中就包括要制作一个符合学校参考文献的bst文件,苦恼了很久,在网上没有找到相似的问题整理。遂做个小小的总结。
bst 采用了堆栈式语言
WinEdt中可以编写这个文件,也可以用其他的
如何制作bst文件
安装了 ctex 套装后, 在目录 custom-bib 下有一个名为 makebst.tex 的文件.
1) 在 WinEdt 窗口打开该文件, 点击 TeX 键编译该文件.
编译过程中, DOS 窗口会出现数十个问题. 比如, 需要您给定文件输出名. 每个文献格式问题都提供了选择项及说明, 您只需一一选择作答即可.
2) 假设文件输出名为 mybib, 上述编译、作答完成后, 得到一个名为 mybib.dbj 的文件.
3) 在 WinEdt 窗口打开 mybib.dbj,
可以看到您所有的选择项答案, 这时您还可以修改您的选项: 改动各问题选项前的注释符号” %” 即可.
4) 在 DOS 窗口用 tex 命令编译 mybib.dbj 文件, 得到文件 mybib.bst, 即为您所需的参考文献格式.
在主文档导言区加入 \bibliographystyle{mybib} 就可以编译使用了.
下面是选项日志,中文部分是直译的,有些翻译感觉不太对,还是以英文为重点。
Command Line: latex.exe --src --interaction=errorstopmode --synctex=1 "makebst.tex"
Startup Folder: C:\Users\tinkle\Desktop\custom-bib\custom-bib
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
entering extended mode
(C:\Users\tinkle\Desktop\custom-bib\custom-bib\makebst.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for loaded.
***********************************
* 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=no
In the interactive dialogue that follows,
you will be presented with a series of menus.
In each case, one answer is the default, marked as (*),
and a mere carriage-return is sufficient to select it.
(If there is no * choice, then the default is the last choice.)
For the other choices, a letter is indicated
in brackets for selecting that option. If you select
a letter not in the list, default is taken.
The final output is a file containing a batch job
which may be (La)TeXed to produce the desired BibTeX
bibliography style file. The batch job may be edited
to make minor changes, rather than running this program
once again.
Enter the name of the MASTER file (default=merlin.mbs)
\mfile=
Name of the final OUTPUT .bst file? (default extension=bst)
\ofile=mybib3
Give a comment line to include in the style file.
Something like for which journals it is applicable.
\ans=
Do you want verbose comments? (NO)
\yn=
(C:\Users\tinkle\Desktop\custom-bib\custom-bib\merlin.mbs
<<< For more information about the meanings of
<<< the various options, see the section on
<<< Menu Information in the .mbs file documentation.
EXTERNAL FILES:
Name of language definition file (default=merlin.mbs)
\cfile=
Name of language file: \cfile=.
Include file(s) for extra journal names? (NO)
\yn=
No included files.
INTERNAL LANGUAGE SUPPORT (if no external language file)
(*) English words used explicitly
(b) Babel (words replaced by commands defined in babelbst.tex)
Select:
\ans=
You have selected: English
1. 引文的风格
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:
\ans=
You have selected: Numerical
2. HTML输出
HTML OUTPUT (if non author-year citations)
(*) Normal LaTeX output
(h) Hypertext output, in HTML code, in paragraphs
(n) Hypertext list with sequence numbers
(k) Hypertext with keys for viewing databases
Select:
\ans=
You have selected: Normal LaTeX
3. 语言区域(感觉这样翻译不太对)
LANGUAGE FIELD
(*) No language field
(l) Add language field to switch hyphenation patterns temporarily
Select:
\ans=
You have selected: No language field
4. 附加说明(或者说注释)
ANNOTATIONS:
(*) No annotations will be recognized
(a) Annotations in annote field or in .tex file of citekey name
Select:
\ans=
You have selected: No annotations
5. 排序方式
ORDERING OF REFERENCES (if non-author/year and non-alph)
(*) Alphabetical by all authors 按照英文字母排序
(c) Citation order (unsorted, like un