SAMPLE.BST
This is a sample bibliography style file meant to help you construct a new style. It creates a bibliography in which entries appear as follows:
[Jones79] Jones, R. L. and Richards, P. Q. The Birds and the Bees. {\it Journal of Irreproducible Results 4}, 2 (Jan. 1979), 27-33.
[Jones82a] Jones, P. G. The Bees and the Trees ... (1982).
[Jones82b] Jones, R. L. The Trees and the Peas ... (1982).
[Krist74] Kristofferson, R. P. Peopl and Places ... (1974)
It should illustrate how you write a style file. The functions are described in an informal Pascal-like style in comments. Because of the way while loops and if-then-else statements must use functions, the following convention is used. If a while loop is labeled 'foo' in the informal description, then its test and body are the functions named 'foo.test' and 'foo.body'. If an if statement is labeled 'foo', then its two clauses are the functions named 'foo.then' and 'foo.else'. (Null clauses just use the 'skip$' function.) Note that because functions have to be defined in terms of already-defined functions, the actual function definitions are given in a 'bottom-up' order.