[Tex/LaTex] Nature-style bibliography

bibliographiesbibtex

I need to adjust my bibliography style according to Nature requirements.

Here is what it need to be in the ref list:

39. Lucas, A., Mangeney, A., Mège, D., & Bouchut, F. Influence of the scar geometry on landslide dynamics and deposits: Application to martian landslides. J. Geophys. Res. - Planets, **116**, E10001, (2011).

Currently, I have something really close:

[39] Lucas A., Mangeney A., Mège D., & Bouchut F. Influence of the scar geometry on landslide dynamics and deposits: Application to martian landslides. J. Geophys. Res. - Planets, **116**, E10001, (2011).

But, I need a comma after each name and initials and change the [39] into 39.

Basically, I currently use

\usepackage[superscript]{cite}

and

\bibliographystyle{unsrt}

I guess I need to edit the unsrt (i.e. make my own copy and then edit it). Actually I already changed it in order to obtain the ampersand instead of "and" as well as all years in brackets which is not the case with unsrt. I'm getting close but I'm kinda stuck to be honest.

Here is how looks the bst file, as people can see, ampersand and years in brackets have been added to the original unsrt.bst:

 FUNCTION {format.date}
 { year empty$
{ month empty$
    { "" }
    { "there's a month but no year in " cite$ * warning$
      month
    }
  if$
}
{ month empty$
     { "(" year * ")" * }
      {month " "  * "(" year * }
  if$
}
  if$
}


 FUNCTION {format.names}
 { 's :=
   #1 'nameptr :=
   s num.names$ 'numnames :=
   numnames 'namesleft :=
   { namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  nameptr #1 >
    { namesleft #1 >
        { ", " * t * }
        { numnames #2 >
            { "," * }
            'skip$
          if$
          t "others" =
            { "{\it et~al.}" * }
            { " \& " * t * }
          if$
        }
      if$
    }
    't
  if$
  nameptr #1 + 'nameptr :=
  namesleft #1 - 'namesleft :=
}
while$
 }

So how should I change the format.name function in order to add a "," after each surname and initials? bst is really cryptic for me.

thanks for any help!

Best Answer

Ok, this is now working as I changed the bst file as followed:

 FUNCTION {format.names}
  { 's :=
 #1 'nameptr :=
 s num.names$ 'numnames :=
numnames 'namesleft :=
  { namesleft #0 > }
 %   { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=  % TDS
 { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first
   nameptr #1 >
     { namesleft #1 >
        { ", " * t * }
        { numnames #2 >
            { "," * }
            'skip$
          if$
          t "others" =
            { " et~al." * }
            { " \& " * t * }
          if$
        }
      if$
    }
    't
  if$
  nameptr #1 + 'nameptr :=
  namesleft #1 - 'namesleft :=
}
while$
}

Still have to work on the format of the numbering (i.e., []).

Related Question