I'm using a .bst file provided by my discipline (ametsoc2014.bst) to create my references section using BibTex. However, this file really is incomplete according to their suggested specifications. In particular, it doesn't allow for replacement of repeated authors with em-dashes. I've modified the code according to the suggestions of Mico here. This works when all authors for any two references are the same. However, the style guide for my discipline mandates that any references with the same first author (and any additional authors) have these authors replaced by dashes like:
Doswell, C. A., and E. N. Rasmussen, 1994: The Effect of Neglecting
the Virtual Temperature Correction on CAPE Calculations. Wea.
Forecast., 9, 625–629.
——, R. Davies-Jones, and D. L. Keller, 1990: On Summary Measures of
Skill in Rare Event Forecasting Based on Contingency Tables. Wea.
Forecast., 5, 576–585.
where both papers have the same first author (Doswell, C.A.), but have different authors after that. Or like:
Fawbush, E., and R. Miller, 1952: A mean sounding representative of the
tornadic airmass environment. Bull. Amer. Meteor. Soc, 33, 303–307.
——, and ——, 1954: The types of air masses in which North American
tornadoes form. Bull. Amer. Meteor. Soc, 35, 154–165.
——, ——, and L. Starrett, 1951: An empirical method of forecasting
tornado development. Bull. Amer. Meteor. Soc, 32, 1–9.
where all three papers have the same first 2 authors (Fawbush, E. and R. Miller), but the third paper has a third author, L. Starrett.
Is there any way to parse through the authors like this to add dashes when necessary?