source: doc/papers/AMA/AMA-stix/ama/WileyNJD-AMA.bst @ 9319a23

ADTast-experimental
Last change on this file since 9319a23 was cfc3e0f, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

referee responses

  • Property mode set to 100644
File size: 19.1 KB
RevLine 
[d5ccbe9]1%
2% THIS IS AN ALPHA VERSION!!!
3%
4% USE AT YOUR OWN RISK
5%
6% This should work for articles...I don't know if it works well for
7% books, etc (give it a try and see!).
8%
9% PLEASE COMPARE RESULTS WITH THE INSTRUCTIONS FOR AUTHORS FOR THE
10% JOURNAL YOU ARE SUBMITTING FOR...I CANNOT ACCEPT RESPONSIBILITY
11% FOR REJECTED MANUSCRIPTS (but I will try to fix it if you point out
12% a bug)
13%
14% AMA Manual of Style (JAMA, Cancer, many others..)
15%    -Up to 6 authors, otherwise 3 authors et al.
16%    -Title in italics
17%    -numeric labels
18%    -order-of-reference.
19%   
20%    Author L, Author S, Author D, et al. Title. Journal.
21%    YYYY;VOL(NUM):PPP-PPP.
22%
23%
24%   History
25%    9/30/85    (HWT)   IEETR Original version, by Howard Trickey.
26%    1/29/88    (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
27%    3/27/02    IEETR style used as framework.  Formats heavily changed by
28%               Eric Kort (eric.kort@vai.org)
29%
30%           THIS VERSION DOES NOT WORK WITH BIBTEX 0.98i.
31%
32
33ENTRY
34  { address
35    author
36    booktitle
37    chapter
38    edition
39    editor
40    howpublished
41    institution
42    journal
43    key
44    month
45    note
46    number
47    organization
48    pages
49    publisher
50    school
51    series
52    title
53    type
54    volume
55    year
56  }
57  {}
58  { label }
59
60INTEGERS { output.state before.all mid.sentence after.quote after.sentence
61        after.quoted.block after.block }
62
63FUNCTION {init.state.consts}
64{ #0 'before.all :=
65  #1 'mid.sentence :=
66  #2 'after.quote :=
67  #3 'after.sentence :=
68  #4 'after.quoted.block :=
69  #5 'after.block :=
70}
71
72STRINGS { s t }
73
74FUNCTION {output.nonnull}
75{ 's :=
76  output.state mid.sentence =
77    { "" * write$ }
78    { output.state after.quote =
79    { " " * write$ }
80    { output.state after.block =
81        { add.period$ write$
82          newline$
83          "\newblock " write$
84        }
85        { output.state before.all =
86        'write$
87        { output.state after.quoted.block =
88            { write$
89              newline$
90              "\newblock " write$
91            }
92            { add.period$ " " * write$ }
93          if$
94        }
95          if$
96        }
97      if$
98    }
99      if$
100      mid.sentence 'output.state :=
101    }
102  if$
103  s
104}
105
106FUNCTION {output}
107{ duplicate$ empty$
108    'pop$
109    'output.nonnull
110  if$
111}
112
113FUNCTION {output.check}
114{ 't :=
115  duplicate$ empty$
116    { pop$ "empty " t * " in " * cite$ * warning$ }
117    'output.nonnull
118  if$
119}
120
121FUNCTION {output.bibitem}
122{ newline$
123  "\bibitem{" write$
124  cite$ write$
125  "}" write$
126  newline$
127  ""
128  before.all 'output.state :=
129}
130
131FUNCTION {blank.sep}
132{ after.quote 'output.state :=
133}
134
135FUNCTION {fin.entry}
136{ output.state after.quoted.block =
137    'skip$
138    'add.period$
139  if$
140  write$
141  newline$
142}
143
144FUNCTION {new.block}
145{ output.state before.all =
146    'skip$
147    { output.state after.quote =
148    { after.quoted.block 'output.state := }
149    { after.block 'output.state := }
150      if$
151    }
152  if$
153}
154
155FUNCTION {new.sentence}
156{ output.state after.block =
157    'skip$
158    { output.state before.all =
159    'skip$
160    { after.sentence 'output.state := }
161      if$
162    }
163  if$
164}
165
166FUNCTION {not}
167{   { #0 }
168    { #1 }
169  if$
170}
171
172FUNCTION {and}
173{   'skip$
174    { pop$ #0 }
175  if$
176}
177
178FUNCTION {or}
179{   { pop$ #1 }
180    'skip$
181  if$
182}
183
184FUNCTION {new.block.checka}
185{ empty$
186    'skip$
187    'new.block
188  if$
189}
190
191FUNCTION {new.block.checkb}
192{ empty$
193  swap$ empty$
194  and
195    'skip$
196    'new.block
197  if$
198}
199
200FUNCTION {new.sentence.checka}
201{ empty$
202    'skip$
203    'new.sentence
204  if$
205}
206
207FUNCTION {field.or.null}
208{ duplicate$ empty$
209    { pop$ "" }
210    'skip$
211  if$
212}
213
214FUNCTION {emphasize}
215{ duplicate$ empty$
216    { pop$ "" }
217    { "{\it " swap$ * "}" * }
218  if$
219}
220
221INTEGERS { nameptr namesleft numnames etal}
222
223FUNCTION {format.names}
224{ 's :=  % push the name s, pop s and author (already on stack), assign author to s
225  #1 'nameptr :=
226  #0 'etal :=
227
228  s num.names$ 'numnames :=
229 
230  numnames #6 >
231    {#3 'numnames :=
232     #1 'etal :=
233    }
234    {}
235    %end if
236  if$
237 
238  numnames 'namesleft :=
239  { namesleft #0 > }
240
241  {s nameptr "{ll~}{ff}" format.name$ 't :=
242    namesleft #1 >
243    {t * ", " * }
244    {t}
245    %end if
246    if$
247    nameptr #1 + 'nameptr :=
248    namesleft #1 - 'namesleft :=
249  }
250  while$
251
252  etal
253    {", et al. "}
254    {". "}
255  if$
256  *
257}
258
259FUNCTION {format.editors.names}
260{ 's :=  % push the name s, pop s and author (already on stack), assign author to s
261  #1 'nameptr :=
262  #0 'etal :=
263
264  s num.names$ 'numnames :=
265 
266  numnames #6 >
267    {#3 'numnames :=
268     #1 'etal :=
269    }
270    {}
271    %end if
272  if$
273 
274  numnames 'namesleft :=
275  { namesleft #0 > }
276
277  {s nameptr "{ll~}{ff}" format.name$ 't :=
278    namesleft #1 >
279    {t * ", " * }
280    {t}
281    %end if
282    if$
283    nameptr #1 + 'nameptr :=
284    namesleft #1 - 'namesleft :=
285  }
286  while$
287
288  etal
289    {", et al. "}
290    {""}
291  if$
292  *
293}
294
295FUNCTION {format.authors}
296{ author empty$
297    { "" }
298    { author format.names }
299  if$
300}
301
302FUNCTION {format.editors}
303{ editor empty$
304    { "" }
305    { editor format.editors.names
306      editor num.names$ #1 >
307    { ", eds." * }
308    { ", ed." * }
309      if$
310    }
311  if$
312}
313
314FUNCTION {format.title}
315{ title empty$
316    { "" }
317    { title ". " *}% modified by SPi-Global on 12Jun2017
318  if$
319}
320
321FUNCTION {format.journal}
322{ journal empty$
323    { "" }
324    { journal ". " *}
325  if$
326}
327
328FUNCTION {format.title.p}
329{ title empty$
330    { "" }
331    { title " " *}
332  if$
333}
334
335FUNCTION {n.dashify}
336{ 't :=
337  ""
338    { t empty$ not }
339    { t #1 #1 substring$ "-" =
340    { t #1 #2 substring$ "--" = not
341        { "--" *
342          t #2 global.max$ substring$ 't :=
343        }
344        {   { t #1 #1 substring$ "-" = }
345        { "-" *
346          t #2 global.max$ substring$ 't :=
347        }
348          while$
349        }
350      if$
351    }
352    { t #1 #1 substring$ *
353      t #2 global.max$ substring$ 't :=
354    }
355      if$
356    }
357  while$
358}
359
360FUNCTION {format.date}
361{ year empty$
362    { "" }
[c5ce0ec]363    { " " * year }
[d5ccbe9]364  if$
365}
366
367FUNCTION {inproformat.date}
368{ year empty$
369    { "" }
370    { "; " * year }
371  if$
372}
373
374FUNCTION {format.btitle}
375%%{ title emphasize
376{ title % modified by SPi-Global on 12Jun2017
377}
378
379FUNCTION {tie.or.space.connect}
380{ duplicate$ text.length$ #3 <
381    { "~" }
382    { " " }
383  if$
384  swap$ * *
385}
386
387FUNCTION {either.or.check}
388{ empty$
389    'pop$
390    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
391  if$
392}
393
394FUNCTION {format.bvolume}
395{ volume empty$
396    { "" }
397    { series empty$
398    'skip$
399    { " " * series * ", vol. " volume * ": " *}
400      if$
401      "volume and number" number either.or.check
402    }
403  if$
404}
405
406FUNCTION {format.number.series}
407{ volume empty$
408    { number empty$
409    { series field.or.null }
410    { output.state mid.sentence =
411        { "no.~" }
412        { "No.~" }
413      if$
414      number *
415      series empty$
416        { "there's a number but no series in " cite$ * warning$ }
417        { " in " * series * }
418      if$
419    }
420      if$
421    }
422    { "" }
423  if$
424}
425
426FUNCTION {format.edition}
427{ edition empty$
428    { "" }
429    { edition "l" change.case$ "~ed." * }
430  if$
431}
432
433INTEGERS { multiresult }
434
435FUNCTION {multi.page.check}
436{ 't :=
437  #0 'multiresult :=
438    { multiresult not
439      t empty$ not
440      and
441    }
442    { t #1 #1 substring$
443      duplicate$ "-" =
444      swap$ duplicate$ "," =
445      swap$ "+" =
446      or or
447    { #1 'multiresult := }
448    { t #2 global.max$ substring$ 't := }
449      if$
450    }
451  while$
452  multiresult
453}
454
455FUNCTION {format.pages}
456{ pages empty$
457    { "" }
458    {":" pages *}
459  if$
460}
461
462FUNCTION {incollecformat.pages}
463{ pages empty$
464    { "" }
465    {" (pp. " pages * ")" *}
466  if$
467}
468
469FUNCTION {format.volume}
470{ volume empty$
471    { "" }
472    { "" volume * }
473  if$
474}
475
476FUNCTION {format.number}
477{ number empty$
478    { "" }
479    { "(" number * ")" *}
480  if$
481}
482
483FUNCTION {format.chapter.pages}
484{ chapter empty$
485    'format.pages
486    { type empty$
487    { "ch.~" chapter * }
488    { type "l" change.case$ chapter tie.or.space.connect }
489      if$
490      pages empty$
491    'skip$
492    { ", " * format.pages * }
493      if$
494    }
495  if$
496}
497
498FUNCTION {format.in.ed.booktitle}
499{ booktitle empty$
500    { "In: " }
501    { "In: "
502      editor empty$
[c5ce0ec]503      { booktitle emphasize * }
[cfc3e0f]504    { " " * format.editors * " " * booktitle emphasize * ", " * }
[d5ccbe9]505      if$
506    }
507  if$
508}
509
510FUNCTION {format.thesis.type}
511{ type empty$
512    'skip$
513    { pop$
514      output.state after.block =
515    { type "t" change.case$ }
516    { type "l" change.case$ }
517      if$
518    }
519  if$
520}
521
522FUNCTION {empty.misc.check}
523{ author empty$ title empty$ howpublished empty$
524  month empty$ year empty$ note empty$
525  and and and and and
526    { "all relevant fields are empty in " cite$ * warning$ }
527    'skip$
528  if$
529}
530
531FUNCTION {format.tr.number}
532{ type empty$
533    %%{ "Tech. Rep." }% modified by SPi-Global - 16Jun2017
534    { "" }
535    'type
536  if$
537  number empty$
538    { "l" change.case$ }
539    { number tie.or.space.connect }
540  if$
541}
542
543FUNCTION {format.addr.pub}
544{ publisher empty$
545    { "" }
546    { address empty$
547    { "" }
548    { address ": " * }
549      if$
550      publisher * " " *
551    }
552  if$
553}
554
555FUNCTION {format.book.addr.pub}
556{ publisher empty$
557    { "" }
558    { address empty$
559    { "" }
560    { address ": " * }
561      if$
562      publisher * "; " *
563    }
564  if$
565}
566
567FUNCTION {format.paddress}
568{ address empty$
569    { "" }
570    { "(" address * ")" * }
571  if$
572}
573
574FUNCTION {format.ppaddress}
575{ address empty$
576    { "" }
577    { "; " address * "" * }
578  if$
579}
580
581FUNCTION {format.article.crossref}
582{ key empty$
583    { journal empty$
584    { "need key or journal for " cite$ * " to crossref " * crossref *
585      warning$
586      ""
587    }
588    { "in {\em " journal * "\/}" * }
589      if$
590    }
591    { "in " key * }
592  if$
593  " \cite{" * crossref * "}" *
594}
595
596FUNCTION {format.crossref.editor}
597{ editor #1 "{vv~}{ll}" format.name$
598  editor num.names$ duplicate$
599  #2 >
600    { pop$ " {\em et~al.}" * }
601    { #2 <
602    'skip$
603    { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
604        { " {\em et~al.}" * }
605        { " and " * editor #2 "{vv~}{ll}" format.name$ * }
606      if$
607    }
608      if$
609    }
610  if$
611}
612
613FUNCTION {format.book.crossref}
614{ volume empty$
615    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
616      "In "
617    }
618    { "Vol.~" volume *
619      " of " *
620    }
621  if$
622  editor empty$
623  editor field.or.null author field.or.null =
624  or
625    { key empty$
626    { series empty$
627        { "need editor, key, or series for " cite$ * " to crossref " *
628          crossref * warning$
629          "" *
630        }
631        { "{\em " * series * "\/}" * }
632      if$
633    }
634    { key * }
635      if$
636    }
637    { format.crossref.editor * }
638  if$
639  " \cite{" * crossref * "}" *
640}
641
642FUNCTION {format.incoll.inproc.crossref}
643{ editor empty$
644  editor field.or.null author field.or.null =
645  or
646    { key empty$
647    { booktitle empty$
648        { "need editor, key, or booktitle for " cite$ * " to crossref " *
649          crossref * warning$
650          ""
651        }
652        { "in {\em " booktitle * "\/}" * }
653      if$
654    }
655    { "in " key * }
656      if$
657    }
658    { "in " format.crossref.editor * }
659  if$
660  " \cite{" * crossref * "}" *
661}
662
663FUNCTION {no.blank.or.punct}
664{  "" * before.all 'output.state :=
665}
666
667FUNCTION {add.semicolon}
668{
669  ";" *
670  no.blank.or.punct
671}
672
673FUNCTION {add.colon}
674{
675  ": " *
676  no.blank.or.punct
677}
678
679FUNCTION {add.space}
680{
681  " " *
682  no.blank.or.punct
683}
684
685FUNCTION {article}
686{ output.bibitem
687  format.authors "author" output.check
688  format.title "title" output.check
689  blank.sep
690  crossref missing$
691    { format.journal emphasize "journal" output.check
692      format.date add.semicolon "year" output.check
[cfc3e0f]693      blank.sep
[d5ccbe9]694      format.volume output
695      format.number output
696      format.pages output
697    }
698    { format.article.crossref output.nonnull
699      format.pages output
700    }
701  if$
702  new.block
703  note output
704  fin.entry
705}
706
707FUNCTION {book}
708{ output.bibitem
709  author empty$
710    { format.editors "author and editor" output.check }
711    { format.authors output.nonnull
712      crossref missing$
713    { "author and editor" editor either.or.check }
714    'skip$
715      if$
716    }
717  if$
718  format.btitle emphasize "title"  output.check
719  crossref missing$
720    { format.bvolume output
721      new.block
722      format.number.series output
723      format.book.addr.pub "publisher" output.check
724    }
725    { new.block
726      format.book.crossref output.nonnull
727    }
728  if$
729  format.edition output
730  format.date "year" output.check
731  new.block
732  note output
733  fin.entry
734}
735
736FUNCTION {booklet}
737{ output.bibitem
738  format.authors output
739  title empty$
740    { "empty title in " cite$ * warning$
741      howpublished new.sentence.checka
742    }
743    { howpublished empty$ not
744      address empty$ month empty$ year empty$ and and
745      or
746    { format.title.p output.nonnull }
747    { format.title output.nonnull }
748      if$
749      blank.sep
750    }
751  if$
752  howpublished output
753  address output
754  format.date output
755  new.block
756  note output
757  fin.entry
758}
759
760FUNCTION {inbook}
761{ output.bibitem
762  author empty$
763    { format.editors "author and editor" output.check }
764    { format.authors output.nonnull
765      crossref missing$
766    { "author and editor" editor either.or.check }
767    'skip$
768      if$
769    }
770  if$
771  format.btitle "title" output.check
772  crossref missing$
773    { format.bvolume output
774      format.chapter.pages "chapter and pages" output.check
775      new.block
776      format.number.series output
777      format.addr.pub "publisher" output.check
778    }
779    { format.chapter.pages "chapter and pages" output.check
780      new.block
781      format.book.crossref output.nonnull
782    }
783  if$
784  format.edition output
785  format.date "year" output.check
786  new.block
787  note output
788  fin.entry
789}
790
791FUNCTION {incollection}
792{ output.bibitem
793  format.authors "author" output.check
794  format.title "title" output.check
795  blank.sep
796  crossref missing$
797    { format.in.ed.booktitle "booktitle" output.check
798      format.number.series add.period$ add.space output
799      format.bvolume output
800      format.addr.pub "publisher" output.check
801      format.edition output
802      format.date "year" output.check
803      %%format.chapter.pages output
804      incollecformat.pages output
805    }
806    { format.incoll.inproc.crossref output.nonnull
807      format.chapter.pages output
808    }
809  if$
810  new.block
811  note output
812  fin.entry
813}
814
815FUNCTION {inproceedings}
816{ output.bibitem
817  format.authors "author" output.check
818  format.title "title" output.check
819  blank.sep
820  crossref missing$
821    { format.in.ed.booktitle "booktitle" output.check
[c5ce0ec]822      blank.sep
[d5ccbe9]823      format.bvolume output
824      format.number.series output
[c5ce0ec]825      new.block
[d5ccbe9]826      format.pages output
[cfc3e0f]827      new.block
[d5ccbe9]828      organization output
[cfc3e0f]829      new.block
[d5ccbe9]830      publisher output
831      inproformat.date "year" output.check
832      format.ppaddress output
833    }
834    { format.incoll.inproc.crossref output.nonnull
835      format.pages output
836    }
837  if$
838  new.block
839  note output
840  fin.entry
841}
842
843FUNCTION {conference} { inproceedings }
844
845FUNCTION {manual}
846{ output.bibitem
847  author empty$
[c5ce0ec]848    { new.block organization empty$
[d5ccbe9]849    'skip$
[c5ce0ec]850    { new.block organization output.nonnull
851      new.block address output
[d5ccbe9]852    }
853      if$
854    }
855    { format.authors output.nonnull }
856  if$
857  format.btitle "title" output.check
858  author empty$
[c5ce0ec]859    { new.block organization empty$
860    { new.block address new.block.checka
[d5ccbe9]861      address output
862    }
863    'skip$
864      if$
865    }
[c5ce0ec]866    { new.block organization new.block address new.block.checkb
[d5ccbe9]867      organization output
[cfc3e0f]868      new.block
[d5ccbe9]869      address output
870    }
871  if$
[c5ce0ec]872  new.block
[d5ccbe9]873  format.edition output
[c5ce0ec]874  new.block
[d5ccbe9]875  format.date output
876  new.block
877  note output
878  fin.entry
879}
880
881FUNCTION {mastersthesis}
882{ output.bibitem
883  format.authors "author" output.check
884  format.title "title" output.check
885  blank.sep
886  "Master's thesis" format.thesis.type output.nonnull
[c5ce0ec]887  new.block
[d5ccbe9]888  school "school" output.check
[cfc3e0f]889  new.block
[d5ccbe9]890  address output
891  format.date "year" output.check
892  new.block
893  note output
894  fin.entry
895}
896
897FUNCTION {format.note}
898{ note empty$
899    { "" }
900    { note "; " *}
901  if$
902}
903
904FUNCTION {misc}
905{ output.bibitem
906  format.authors output
907  title empty$
908    { howpublished new.sentence.checka }
909    { howpublished empty$ not
910      month empty$ year empty$ and
911      or
912    { format.title.p output.nonnull }
913    { format.title emphasize output.nonnull }
914      if$
915      blank.sep
916    }
917  if$
918  howpublished output
[c5ce0ec]919  new.block
[d5ccbe9]920  format.note output
[c5ce0ec]921  new.block
[d5ccbe9]922  format.date output
923  fin.entry
924  empty.misc.check
925}
926
927FUNCTION {phdthesis}
928{ output.bibitem
929  format.authors "author" output.check
930  format.btitle "title" output.check
931  new.block
932  "PhD thesis" format.thesis.type output.nonnull
933  school "school" output.check
[cfc3e0f]934  new.block
[d5ccbe9]935  address output
936  format.date "year" output.check
937  new.block
938  note output
939  fin.entry
940}
941
942FUNCTION {proceedings}
943{ output.bibitem
944  editor empty$
945    { organization output }
946    { format.editors output.nonnull }
947  if$
948  format.btitle "title" output.check
949  format.bvolume output
950  format.number.series output
951  format.paddress output
952  editor empty$
953    'skip$
954    { organization output }
955  if$
956  publisher output
957  format.date "year" output.check
958  new.block
959  note output
960  fin.entry
961}
962
963FUNCTION {add.spperiod}
964{
965  ". " *
966  no.blank.or.punct
967}
968
969FUNCTION {techreport}
970{ output.bibitem
971  format.authors "author" output.check
972  format.title emphasize "title" output.check
973  blank.sep
974  format.tr.number add.colon output.nonnull
975  institution "institution" output.check
976  address output
977  add.semicolon add.space format.date "year" output.check
978  new.block
979  note output
980  fin.entry
981}
982
983FUNCTION {unpublished}
984{ output.bibitem
985  format.authors "author" output.check
986  format.title.p "title" output.check
987  blank.sep
988  note "note" output.check
989  format.date output
990  fin.entry
991}
992
993FUNCTION {default.type} { misc }
994
995MACRO {jan} {"Jan."}
996
997MACRO {feb} {"Feb."}
998
999MACRO {mar} {"Mar."}
1000
1001MACRO {apr} {"Apr."}
1002
1003MACRO {may} {"May"}
1004
1005MACRO {jun} {"June"}
1006
1007MACRO {jul} {"July"}
1008
1009MACRO {aug} {"Aug."}
1010
1011MACRO {sep} {"Sept."}
1012
1013MACRO {oct} {"Oct."}
1014
1015MACRO {nov} {"Nov."}
1016
1017MACRO {dec} {"Dec."}
1018
1019MACRO {acmcs} {"ACM Computing Surveys"}
1020
1021MACRO {acta} {"Acta Informatica"}
1022
1023MACRO {cacm} {"Communications ACM"}
1024
1025MACRO {ibmjrd} {"IBM J. Research and Development"}
1026
1027MACRO {ibmsj} {"IBM Systems~J."}
1028
1029MACRO {ieeese} {"IEEE Trans. Software Engineering"}
1030
1031MACRO {ieeetc} {"IEEE Trans. Computers"}
1032
1033MACRO {ieeetcad}
1034 {"IEEE Trans. Computer-Aided Design"}
1035
1036MACRO {ipl} {"Information Processing Letters"}
1037
1038MACRO {jacm} {"J.~ACM"}
1039
1040MACRO {jcss} {"J.~Computer and System Sciences"}
1041
1042MACRO {scp} {"Science of Computer Programming"}
1043
1044MACRO {sicomp} {"SIAM J. Computing"}
1045
1046MACRO {tocs} {"ACM Trans. Computer Systems"}
1047
1048MACRO {tods} {"ACM Trans. Database Systems"}
1049
1050MACRO {tog} {"ACM Trans. Graphics"}
1051
1052MACRO {toms} {"ACM Trans. Mathematical Software"}
1053
1054MACRO {toois} {"ACM Trans. Office Information Systems"}
1055
1056MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
1057
1058MACRO {tcs} {"Theoretical Computer Science"}
1059
1060READ
1061
1062STRINGS { longest.label }
1063
1064INTEGERS { number.label longest.label.width }
1065
1066FUNCTION {initialize.longest.label}
1067{ "" 'longest.label :=
1068  #1 'number.label :=
1069  #0 'longest.label.width :=
1070}
1071
1072FUNCTION {longest.label.pass}
1073{ number.label int.to.str$ 'label :=
1074  number.label #1 + 'number.label :=
1075  label width$ longest.label.width >
1076    { label 'longest.label :=
1077      label width$ 'longest.label.width :=
1078    }
1079    'skip$
1080  if$
1081}
1082
1083EXECUTE {initialize.longest.label}
1084
1085ITERATE {longest.label.pass}
1086
1087FUNCTION {begin.bib}
1088{ preamble$ empty$
1089    'skip$
1090    { preamble$ write$ newline$ }
1091  if$
1092  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
1093}
1094
1095EXECUTE {begin.bib}
1096
1097EXECUTE {init.state.consts}
1098
1099ITERATE {call.type$}
1100
1101FUNCTION {end.bib}
1102{ newline$
1103  "\end{thebibliography}" write$ newline$
1104}
1105
1106EXECUTE {end.bib}
Note: See TracBrowser for help on using the repository browser.