Friday, January 18, 2008

Technical Post # 2: Creating Own Bibliography Style Files

We often use latex for writing our reports. Some of these reports require to have very strict format. I faced a problem where the bibliographical references were also had some strict foramts. Example: Author name required Last name, Initials of First Name, and in case of "Inproceeding..." no "In...". A lot other requirements may be there. I searched google and there was an obvious solution: create own .bst file.

Using MakeBST

A very usefull tool for creating BibTeX styles is makebst. It's use is extremly simple: you just have to run LaTeX: latex makebst and answer a bunch of questions. An output file of type .bst will be created for use as any other bibliographic style.

Here is an extract of the questions you have to answer:

$ latex makebst
* 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)

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.

Name of the final OUTPUT .bst file? (default extension=bst)


(*) 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)

(*) 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)
(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)
(*) All authors included in listing
(l) Limited authors (et al replaces missing names)
(*) Normal font for author names
(s) Small caps authors (\sc)
(i) Italic authors (\it or \em)
(b) Bold authors (\bf)
(u) User defined author font (\bibnamefont)


Now what you need is to put this file into your texmf directory.BIBTEX .bst files can be accessed system-wide when they are placed in the /bibtex/bst

Then for teTEX and fpTEX systems complete via executing


as root. MikTEX users can run:
$initexmf -u

In your latex file:


Alor Chhota said...

vai, ami latex shikhte chai...
masud hasan sir-er subject-e report likhte hobe :(
kobe shikhaben???

Swakkhar Shatabda said...

latex is very easy to learn and to teach. Kintu kothin holo installl kora. Age install kor.

Cygwin install kor, miketex korleo hobe :D

the best tutorial to start

Swakkhar Shatabda said...

Alor Chhota said...

amar kachhe kono resource nai (HDD formation hoye gesilo :(). by the way, i'll knock you when needed :)