0

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!

  • thanks, I know it, but some links seem broken and the only left file just does not work at all, I have tons of errors for no reason, as my bib file works perfectly with at least 10 bibliography styles. It seems that the remained files are in draft of alpha version or something. Thanks anyway. – Adakite Jan 27 '14 at 15:28
  • If you provide a minimum working exmaple of what you've tried so far, others can have a look at it without having to guess what you're trying to do. – user10274 Jan 27 '14 at 15:45
  • I changed the original post by adding the name.format function I currently have in the bst file. It needed to be changed in order to add a comma but I do not know how. – Adakite Jan 27 '14 at 16:03
  • Is this what you're looking for? See: tex.stackexchange.com/questions/7871/… Hope this helps. – TSherry Jan 27 '14 at 21:46
1

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., []).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.