Guest User

Untitled

a guest
Sep 6th, 2011
594
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FUNCTION {format.names.author}
  2. {
  3. 's :=
  4.  
  5. #1 'nameptr :=
  6. s num.names$ 'numnames :=
  7.  
  8. numnames 'namesleft :=
  9. #0 'posothers :=
  10. { namesleft #0 > }
  11. { s nameptr "{ll,~}{ff}{vv}{jj}" format.name$ 't :=
  12. t "others" =
  13. { nameptr 'posothers := }
  14. 'skip$
  15. if$
  16. nameptr #1 + 'nameptr :=
  17. namesleft #1 - 'namesleft :=
  18. }
  19. while$
  20.  
  21. #0 'showetal :=
  22.  
  23. numnames #10 >
  24. { #10 'numnames :=
  25. #1 'showetal :=
  26. }
  27. { numnames #10 =
  28. { posothers #0 >
  29. { #1 'showetal :=
  30. #10 'numnames :=
  31. }
  32. 'skip$
  33. if$
  34. }
  35. { posothers #0 >
  36. { #1 'showetal :=
  37. #1 'numnames -
  38. }
  39. 'skip$
  40. if$
  41. }
  42. if$
  43. }
  44. if$
  45.  
  46. #1 'nameptr :=
  47. numnames 'namesleft :=
  48. { namesleft #0 > }
  49. { s nameptr "{ll,~}{ff}{vv}{jj}" format.name$ 't :=
  50. nameptr #1 >
  51. { namesleft #1 >
  52. { ", " * t * }
  53. { showetal #0 >
  54. { ", " * t * }
  55. { " and " * t * }
  56. if$
  57. }
  58. if$
  59. }
  60. 't
  61. if$
  62. nameptr #1 + 'nameptr :=
  63. namesleft #1 - 'namesleft :=
  64. }
  65. while$
  66.  
  67. showetal #0 >
  68. { " et~al." * }
  69. 'skip$
  70. if$
  71. }
RAW Paste Data