Thursday, September 16, 2010

Bibtex styles: alpha + abbrv = alphaabbr

When using the alpha style for bibtex I came across the following problem.
Almost every entry in my bibliography file have abbreviated author's names and they appear like this:

[KK90] K.S.Narendra and K.Parthsarathy. Identification and control of dynamical system using neural networks.  IEENN, 1(1):4–27, 1990. 

However in some rare occasions the entry contain the complete author's name, and the entry becomes unpleasantly long:

[dlVP79] Charles Louis Xavier Joseph de la Vall´ee Poussin, 1879. A strong form of the prime number theorem,  19th century. 

I've searched across the bibtex styles and there is no style that suits my needs, so I had to make my own style which produces:

[dlVP79] C.L.X.J. de la Vall´ee Poussin, 1879. A strong form of the prime number theorem,  19th century. 


Bibliography style: alphaabbr
It is exactly the alpha style (i.e. citations like [dlVP79]) but without full names 
in the bibliography section.

* This is done by changing the NAME_FULL flag in btxbst.doc here is the difference:
+++ btxbst.doc 2010-09-16 17:14:50.000000000 +0200
@@ -95,7 +95,7 @@
 % alpha style (sorted short alphabetics)
 #   define LAB_ALPH 1
 #   define SORTED 1
-#   define NAME_FULL 1
+#   define NAME_FULL 0
 #   define ATIT_LOWER 1
 #   define MONTH_FULL 1
 #   define JOUR_FULL 1

* Then compile the style:
cpp -P -DALPHA btxbst.doc alphaabbr.bst

* Use it as always:   \bibliographystyle{alphaabbr}

5 comments:

  1. Thanks for sharing this, I found it quite useful information!

    ReplyDelete
  2. This is perfect! You just saved me hours of manual labour!

    ReplyDelete
  3. I love this post. Thank you for the amazingly useful work.

    ReplyDelete
  4. This is what I was looking for!!! Thank you very much!

    ReplyDelete