Debian Codegraph @

texmf-dist/bibtex/bst/computational-complexity/cc.bst

raw
1 % File name: cc.bst
2 %
3 % cc.bst style file for BibTeX.
4 % February 6, 1996
5 % This style file provides the following citation facilities:
6 % Usage in Tex Output:
7 % file:
8 % \cite Cook (1990)
9 % \citeauthor Cook
10 % \citeyear 1990
11 % \citemul Cook (1990, 1991a, 1991b)
12 % \shortcite Cook 1990
13 % \parencite (Cook 1990)
14 % \nocite
15
16 % It was prepared by modifying previous style files.
17 % Here are acknowledgements:
18 %> BibTeX `named' style file for BibTeX version 0.99c, LaTeX version 2.09
19 %> Place it in a file called named.bst in the BibTeX search path. (Placing it
20 %> in the same directory as the LaTeX document should also work.)
21 %> Support for named citations is provided by named.sty
22
23 %> This version was made by modifying the master file made by
24 %> Oren Patashnik ([email protected])
25
26 %> Copyright (C) 1985, all rights reserved.
27 %> Modifications Copyright 1988, Peter F. Patel-Schneider
28 %> Copying of this file is authorized only if either
29 %> (1) you make absolutely no changes to your copy, including name, or
30 %> (2) if you do make changes, you name it something other than
31 %> btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
32 %> This restriction helps ensure that all standard styles are identical.
33
34 %> There are undoubtably bugs in this style. If you make bug fixes,
35 %> improvements, etc. please let me know. My e-mail address is:
36 %> [email protected]
37
38 ENTRY
39 { address
40 author
41 booktitle
42 chapter
43 edition
44 editor
45 howpublished
46 institution
47 journal
48 key
49 month
50 note
51 number
52 organization
53 pages
54 publisher
55 school
56 series
57 title
58 type
59 volume
60 year
61 }
62 {}
63 { label extra.label sort.label }
64
65 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
66
67 FUNCTION {init.state.consts}
68 { #0 'before.all :=
69 #1 'mid.sentence :=
70 #2 'after.sentence :=
71 #3 'after.block :=
72 }
73
74 STRINGS { mode s t }
75
76 %FUNCTION {message}
77 %{
78 % duplicate$ top$
79 %}
80
81 FUNCTION {output.nonnull}
82 { 's :=
83 output.state mid.sentence =
84 { ", " * write$ }
85 { output.state after.block =
86 { add.period$ write$
87 newline$
88 "\newblock " write$
89 }
90 { output.state before.all =
91 'write$
92 { add.period$ " " * write$ }
93 if$
94 }
95 if$
96 mid.sentence 'output.state :=
97 }
98 if$
99 s
100 }
101
102 FUNCTION {output}
103 { duplicate$ empty$
104 'pop$
105 'output.nonnull
106 if$
107 }
108
109 FUNCTION {output.check}
110 { 't :=
111 duplicate$ empty$
112 { pop$ "empty " t * " in " * cite$ * warning$ }
113 'output.nonnull
114 if$
115 }
116
117 FUNCTION {output.bibitem}
118 { newline$
119
120 "\bibitem[" write$
121 label write$
122 "]{" write$
123
124 cite$ write$
125 "}" write$
126 newline$
127 ""
128 before.all 'output.state :=
129 }
130
131 FUNCTION {fin.entry}
132 { add.period$
133 write$
134 newline$
135 }
136
137 FUNCTION {new.block}
138 { output.state before.all =
139 'skip$
140 { after.block 'output.state := }
141 if$
142 }
143
144 FUNCTION {semi.block}
145 { %%%%"semi.block" top$
146 mid.sentence 'output.state :=
147 }
148
149 %FUNCTION {semi.block}
150 %{ output.state mid.sentence =
151 % 'skip$
152 % { after.block 'output.state := }
153 % if$
154 %}
155
156 FUNCTION {new.sentence}
157 { output.state after.block =
158 'skip$
159 { output.state before.all =
160 'skip$
161 { after.sentence 'output.state := }
162 if$
163 }
164 if$
165 }
166
167 FUNCTION {not}
168 { { #0 }
169 { #1 }
170 if$
171 }
172
173 FUNCTION {and}
174 { 'skip$
175 { pop$ #0 }
176 if$
177 }
178
179 FUNCTION {or}
180 { { pop$ #1 }
181 'skip$
182 if$
183 }
184
185 FUNCTION {new.block.checka}
186 { empty$
187 'skip$
188 'new.block
189 if$
190 }
191
192 FUNCTION {new.block.checkb}
193 { empty$
194 swap$ empty$
195 and
196 'skip$
197 'new.block
198 if$
199 }
200
201 FUNCTION {new.semiblock.checkb}
202 { empty$
203 swap$ empty$
204 and
205 'skip$
206 'semi.block
207 if$
208 }
209
210 FUNCTION {new.sentence.checka}
211 { empty$
212 'skip$
213 'new.sentence
214 if$
215 }
216
217 FUNCTION {new.sentence.checkb}
218 { empty$
219 swap$ empty$
220 and
221 'skip$
222 'new.sentence
223 if$
224 }
225
226 FUNCTION {field.or.null}
227 { duplicate$ empty$
228 { pop$ "" }
229 'skip$
230 if$
231 }
232
233 FUNCTION {emphasize}
234 { duplicate$ empty$
235 { pop$ "" }
236 { "{\sl " swap$ * "}" * }
237 if$
238 }
239
240 FUNCTION {bold}
241 { duplicate$ empty$
242 { pop$ "" }
243 { "{\bf " swap$ * "}" * }
244 if$
245 }
246
247 INTEGERS { nameptr namesleft numnames }
248
249 FUNCTION {format.names}
250 { 's :=
251 #1 'nameptr :=
252 s num.names$ 'numnames :=
253 "{\sc " *
254 numnames 'namesleft :=
255 { namesleft #0 > }
256
257 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
258
259 nameptr #1 >
260 { namesleft #1 >
261 { ", " * t * }
262 { numnames #2 >
263 { "," * }
264 'skip$
265 if$
266 t "others" =
267 { " et~al." * }
268 { " and " * t * }
269 if$
270 }
271 if$
272 }
273 't
274 if$
275 nameptr #1 + 'nameptr :=
276 namesleft #1 - 'namesleft :=
277 }
278 while$
279 "}" *
280 }
281
282 FUNCTION {format.authors}
283 { author empty$
284 { "" }
285 { author format.names }
286 if$
287 }
288
289 FUNCTION {format.editors}
290 { editor empty$
291 { "" }
292 { "ed.\ "
293 editor format.names *
294 }
295 if$
296 }
297
298 FUNCTION {format.editors.reverse}
299 { editor empty$
300 { "" }
301 { editor format.names
302 ", ed." *
303 }
304 if$
305 }
306
307 FUNCTION {format.editors.simple}
308 { editor empty$
309 { "" }
310 { editor format.names }
311 if$
312 }
313
314 FUNCTION {format.title}
315 { title empty$
316 { "" }
317
318 { title "t" change.case$ }
319
320 if$
321 }
322
323 FUNCTION {n.dashify}
324 { 't :=
325 ""
326 { t empty$ not }
327 { t #1 #1 substring$ "-" =
328 { t #1 #2 substring$ "--" = not
329 { "--" *
330 t #2 global.max$ substring$ 't :=
331 }
332 { { t #1 #1 substring$ "-" = }
333 { "-" *
334 t #2 global.max$ substring$ 't :=
335 }
336 while$
337 }
338 if$
339 }
340 { t #1 #1 substring$ *
341 t #2 global.max$ substring$ 't :=
342 }
343 if$
344 }
345 while$
346 }
347
348 FUNCTION {format.date}
349 { year empty$
350 { month empty$
351 { "" }
352 % { "there's a month but no year in " cite$ * warning$
353 % month
354 % }
355 { }
356 if$
357 }
358 % { month empty$
359 % {year extra.label * }
360 % { month " " * year * extra.label *}
361 % if$
362 % }
363 { year extra.label * }
364 if$
365 }
366
367 FUNCTION {format.btitle}
368 { title emphasize
369 }
370
371 FUNCTION {tie.or.space.connect}
372 { duplicate$ text.length$ #3 <
373 { "~" }
374 { " " }
375 if$
376 swap$ * *
377 }
378
379 FUNCTION {either.or.check}
380 { empty$
381 'pop$
382 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
383 if$
384 }
385
386 %FUNCTION {format.bvolume}
387 %{ volume empty$
388 % { "" }
389 % { series empty$
390 % 'skip$
391 % {series emphasize ",\ vol.\ " * volume *}
392 % if$
393 % "volume and number" number either.or.check
394 % }
395 % if$
396 %}
397 %FUNCTION {format.bvolume}
398 %{ volume empty$
399 % { "" }
400 % { series empty$
401 % 'skip$
402 % {series emphasize "\ " * volume bold *}
403 % if$
404 % "volume and number" number either.or.check
405 % }
406 % if$
407 %}
408 FUNCTION {format.bvolume}
409 { volume empty$
410 { "" }
411 { "vol." volume tie.or.space.connect
412 series empty$
413 'skip$
414 { " of " * series emphasize * }
415 if$
416 "volume and number" number either.or.check
417 }
418 if$
419 }
420
421 %FUNCTION {format.number.series}
422 %{ volume empty$
423 % { number empty$
424 % { series field.or.null }
425 % { output.state mid.sentence =
426 % { "number" }
427 % { "Number" }
428 % if$
429 % number tie.or.space.connect
430 % series empty$
431 % { "there's a number but no series in " cite$ * warning$ }
432 % { " in " * series * }
433 % if$
434 % }
435 % if$
436 % }
437 % { "" }
438 % if$
439 %}
440 FUNCTION {format.number.series}
441 { volume empty$
442 { number empty$
443 { series field.or.null }
444 { series empty$
445 { "there's a number but no series in " cite$ * warning$ }
446 { series "\ " * number bold * }
447 if$
448 }
449 if$
450 }
451 { "" }
452 if$
453 }
454
455 FUNCTION {format.edition}
456 { edition empty$
457 { "" }
458 { output.state mid.sentence =
459 { edition "l" change.case$ " edition" * }
460 { edition "t" change.case$ " edition" * }
461 if$
462 }
463 if$
464 }
465
466 INTEGERS { multiresult }
467
468 FUNCTION {multi.page.check}
469 { 't :=
470 #0 'multiresult :=
471 { multiresult not
472 t empty$ not
473 and
474 }
475 { t #1 #1 substring$
476 duplicate$ "-" =
477 swap$ duplicate$ "," =
478 swap$ "+" =
479 or or
480 { #1 'multiresult := }
481 { t #2 global.max$ substring$ 't := }
482 if$
483 }
484 while$
485 multiresult
486 }
487
488 FUNCTION {format.pages}
489 { pages empty$
490 { "" }
491 { pages multi.page.check
492 { pages n.dashify }
493 { "p." pages tie.or.space.connect }
494 if$
495 }
496 if$
497 }
498
499
500 FUNCTION {format.vol.num.year}
501 { volume field.or.null bold
502 number empty$
503 'skip$
504 { "(" number * ")\," * *
505 volume empty$
506 { "there's a number but no volume in " cite$ * warning$ }
507 'skip$
508 if$
509 }
510 if$
511 year empty$
512 'skip$
513 { "\ (" * format.date * ")" * }
514 if$
515 }
516
517
518 FUNCTION {format.vol.num.pages}
519 { volume field.or.null bold
520 number empty$
521 'skip$
522 { "(" number * ")" * *
523 volume empty$
524 { "there's a number but no volume in " cite$ * warning$ }
525 'skip$
526 if$
527 }
528 if$
529 pages empty$
530 'skip$
531 { duplicate$ empty$
532 { pop$ format.pages }
533 { ",\, pp.\, " * pages n.dashify * }
534 if$
535 }
536 if$
537 }
538
539 FUNCTION {format.chapter.pages}
540 { chapter empty$
541 'format.pages
542 { type empty$
543 { "chapter" }
544 { type "l" change.case$ }
545 if$
546 chapter tie.or.space.connect
547 pages empty$
548 'skip$
549 { ", " * format.pages * }
550 if$
551 }
552 if$
553 }
554
555
556 FUNCTION {format.in.ed.booktitle}
557 { booktitle empty$
558 { "" }
559 { editor empty$
560 { "In " booktitle emphasize * }
561 { "In " booktitle emphasize * ", " * format.editors * }
562 if$
563 }
564 if$
565 }
566
567 FUNCTION {empty.misc.check}
568 { author empty$ title empty$ howpublished empty$
569 month empty$ year empty$ note empty$
570 and and and and and
571
572 key empty$ not and
573
574 { "all relevant fields are empty in " cite$ * warning$ }
575 'skip$
576 if$
577 }
578
579 FUNCTION {format.publisher.address}
580 { address empty$
581 'publisher
582 { publisher ", " * address * }
583 if$
584 }
585
586 FUNCTION {format.thesis.type}
587 { type empty$
588 'skip$
589 { pop$
590 type "t" change.case$
591 }
592 if$
593 }
594
595 FUNCTION {format.tr.number}
596 { type empty$
597 { "Technical Report" }
598 'type
599 if$
600 number empty$
601 { "t" change.case$ }
602 { number tie.or.space.connect }
603 if$
604 }
605
606 FUNCTION {format.article.crossref}
607 { key empty$
608 { journal empty$
609 { "need key or journal for " cite$ * " to crossref " * crossref *
610 warning$
611 ""
612 }
613 { "In {\em " journal * "\/}" * }
614 if$
615 }
616 { "In " key * }
617 if$
618 " \shortcite{" * crossref * "}" *
619 }
620
621 FUNCTION {format.crossref.editor}
622 { editor #1 "{vv~}{ll}" format.name$
623 editor num.names$ duplicate$
624 #2 >
625 { pop$ " et~al." * }
626 { #2 <
627 'skip$
628 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
629 { " et~al." * }
630 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
631 if$
632 }
633 if$
634 }
635 if$
636 }
637
638 FUNCTION {format.book.crossref}
639 { volume empty$
640 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
641 "In "
642 }
643 { "Volume" volume tie.or.space.connect
644 " of " *
645 }
646 if$
647 editor empty$
648 editor field.or.null author field.or.null =
649 or
650 { key empty$
651 { series empty$
652 { "need editor, key, or series for " cite$ * " to crossref " *
653 crossref * warning$
654 "" *
655 }
656 { "{\em " * series * "\/}" * }
657 if$
658 }
659 { key * }
660 if$
661 }
662 { format.crossref.editor * }
663 if$
664 " \shortcite{" * crossref * "}" *
665 }
666
667 FUNCTION {format.incoll.inproc.crossref}
668 { editor empty$
669 editor field.or.null author field.or.null =
670 or
671 { key empty$
672 { booktitle empty$
673 { "need editor, key, or booktitle for " cite$ * " to crossref " *
674 crossref * warning$
675 ""
676 }
677 { "In {\em " booktitle * "\/}" * }
678 if$
679 }
680 { "In " key * }
681 if$
682 }
683 { "In " format.crossref.editor * }
684 if$
685 " \shortcite{" * crossref * "}" *
686 }
687
688 FUNCTION {article}
689 { output.bibitem
690 format.authors "author" output.check
691 semi.block
692 format.title "title" output.check
693 new.block
694 crossref missing$
695 { journal emphasize "\ " * format.vol.num.year * "journal" output.check
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
707 FUNCTION {book}
708 { output.bibitem
709 author empty$
710 { format.editors.simple "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 semi.block
719 format.btitle "title" output.check
720 crossref missing$
721 { format.bvolume output
722 new.block
723 format.number.series output
724 new.sentence
725 format.publisher.address "publisher" output.check
726 }
727 { new.block
728 format.book.crossref output.nonnull
729 }
730 if$
731 format.edition output
732 format.date "year" output.check
733 new.block
734 note output
735 fin.entry
736 }
737
738 FUNCTION {booklet}
739 { output.bibitem
740 format.authors output
741 semi.block
742 format.title "title" output.check
743 howpublished address new.block.checkb
744 howpublished output
745 address output
746 format.date output
747 new.block
748 note output
749 fin.entry
750 }
751
752 FUNCTION {inbook}
753 { output.bibitem
754 author empty$
755 { format.editors "author and editor" output.check }
756 { format.authors output.nonnull
757 crossref missing$
758 { "author and editor" editor either.or.check }
759 'skip$
760 if$
761 }
762 if$
763 semi.block
764 format.btitle "title" output.check
765 crossref missing$
766 { format.bvolume output
767 format.chapter.pages "chapter and pages" output.check
768 new.block
769 format.number.series output
770 new.sentence
771 format.publisher.address "publisher" output.check
772 }
773 { format.chapter.pages "chapter and pages" output.check
774 new.block
775 format.book.crossref output.nonnull
776 }
777 if$
778 format.edition output
779 format.date "year" output.check
780 new.block
781 note output
782 fin.entry
783 }
784
785 FUNCTION {incollection}
786 { output.bibitem
787 format.authors "author" output.check
788 semi.block
789 format.title "title" output.check
790 new.block
791 crossref missing$
792 { format.in.ed.booktitle "booktitle" output.check
793 format.bvolume output
794 format.number.series output
795 format.chapter.pages output
796 new.sentence
797 format.publisher.address "publisher" output.check
798 format.edition output
799 format.date "year" output.check
800 }
801 { format.incoll.inproc.crossref output.nonnull
802 format.chapter.pages output
803 }
804 if$
805 new.block
806 note output
807 fin.entry
808 }
809
810 FUNCTION {inproceedings}
811 { output.bibitem
812 format.authors "author" output.check
813 semi.block
814 format.title "title" output.check
815 new.block
816 crossref missing$
817 { format.in.ed.booktitle "booktitle" output.check
818 format.bvolume output
819 format.number.series output
820 address empty$
821 { organization publisher new.sentence.checkb
822 organization output
823 publisher output
824 format.date output
825 }
826 { address output.nonnull
827 format.date output
828 organization output
829 publisher output
830 }
831 if$
832 format.pages 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
843 FUNCTION {conference} { inproceedings }
844
845 FUNCTION {manual}
846 { output.bibitem
847 author empty$
848 { organization empty$
849 'skip$
850 { organization output.nonnull
851 address output
852 }
853 if$
854 }
855 { format.authors output.nonnull }
856 if$
857 semi.block
858 format.btitle "title" output.check
859 author empty$
860 { organization empty$
861 { address new.block.checka
862 address output
863 }
864 'skip$
865 if$
866 }
867 { organization address new.block.checkb
868 organization output
869 address output
870 }
871 if$
872 format.edition output
873 format.date output
874 new.block
875 note output
876 fin.entry
877 }
878
879 FUNCTION {mastersthesis}
880 { output.bibitem
881 format.authors "author" output.check
882 semi.block
883 format.title "title" output.check
884 new.block
885 "Master's thesis" format.thesis.type output.nonnull
886 school "school" output.check
887 address output
888 format.date "year" output.check
889 new.block
890 note output
891 fin.entry
892 }
893
894 FUNCTION {misc}
895 { output.bibitem
896 format.authors "author" output.check
897 title howpublished new.semiblock.checkb
898 format.title output
899 howpublished new.block.checka
900 howpublished output
901 format.date output
902 new.block
903 note output
904 fin.entry
905 empty.misc.check
906 }
907
908 FUNCTION {phdthesis}
909 { output.bibitem
910 format.authors "author" output.check
911 semi.block
912 format.btitle "title" output.check
913 new.block
914 "PhD thesis" format.thesis.type output.nonnull
915 school "school" output.check
916 address output
917 format.date "year" output.check
918 new.block
919 note output
920 fin.entry
921 }
922
923 FUNCTION {proceedings}
924 { output.bibitem
925 editor empty$
926 { organization output }
927 % { format.editors output.nonnull }
928 { format.editors.reverse output.nonnull }
929 if$
930 semi.block
931 format.btitle "title" output.check
932 format.bvolume output
933 format.number.series output
934 address empty$
935 { editor empty$
936 { publisher new.sentence.checka }
937 { organization publisher new.sentence.checkb
938 organization output
939 }
940 if$
941 publisher output
942 format.date "year" output.check
943 }
944 { address output.nonnull
945 format.date "year" output.check
946 new.sentence
947 editor empty$
948 'skip$
949 { organization output }
950 if$
951 publisher output
952 }
953 if$
954 new.block
955 note output
956 fin.entry
957 }
958
959 FUNCTION {techreport}
960 { output.bibitem
961 format.authors "author" output.check
962 semi.block
963 format.title "title" output.check
964 new.block
965 format.tr.number output.nonnull
966 institution "institution" output.check
967 address output
968 format.date "year" output.check
969 new.block
970 note output
971 fin.entry
972 }
973
974 FUNCTION {unpublished}
975 { output.bibitem
976 format.authors "author" output.check
977 semi.block
978 format.title "title" output.check
979 new.block
980 note "note" output.check
981 format.date output
982 fin.entry
983 }
984
985 FUNCTION {default.type} { misc }
986
987
988 MACRO {jan} {"January"}
989 MACRO {feb} {"February"}
990 MACRO {mar} {"March"}
991 MACRO {apr} {"April"}
992 MACRO {may} {"May"}
993 MACRO {jun} {"June"}
994 MACRO {jul} {"July"}
995 MACRO {aug} {"August"}
996 MACRO {sep} {"September"}
997 MACRO {oct} {"October"}
998 MACRO {nov} {"November"}
999 MACRO {dec} {"December"}
1000
1001
1002
1003 READ
1004
1005 FUNCTION {sortify}
1006 { purify$
1007 "l" change.case$
1008 }
1009
1010 INTEGERS { len }
1011
1012 FUNCTION {chop.word}
1013 { 's :=
1014 'len :=
1015 s #1 len substring$ =
1016 { s len #1 + global.max$ substring$ }
1017 's
1018 if$
1019 }
1020
1021 INTEGERS { et.al.char.used }
1022
1023 FUNCTION {initialize.et.al.char.used}
1024 { #0 'et.al.char.used :=
1025 }
1026
1027 EXECUTE {initialize.et.al.char.used}
1028
1029 FUNCTION {format.lab.names}
1030 {
1031 's :=
1032 s num.names$ 'numnames :=
1033
1034 mode "cite" =
1035 { numnames #1 =
1036 { s #1 "{vv }{ll}" format.name$ }
1037 { numnames #2 =
1038 { s #1 "{vv }{ll }\& " format.name$ s #2 "{vv }{ll}" format.name$ * }
1039 { s #1 "{vv }{ll }\bgroup \em et al.\egroup " format.name$ }
1040 if$
1041 }
1042 if$
1043 }
1044 { numnames #1 =
1045 { s #1 "{ll}" format.name$ }
1046 { numnames #2 =
1047 { s #1 "{ll }\& " format.name$ s #2 "{ll}" format.name$ * }
1048 { s #1 "{ll }\bgroup \em et al.\egroup " format.name$ }
1049 if$
1050 }
1051 if$
1052 }
1053 if$
1054 }
1055
1056 FUNCTION {author.key.label}
1057 { author empty$
1058 { key empty$
1059
1060 { cite$ #1 #3 substring$ }
1061
1062 { key }
1063 if$
1064 }
1065 { author format.lab.names }
1066 if$
1067 }
1068
1069 FUNCTION {author.editor.key.label}
1070 { author empty$
1071 { editor empty$
1072 { key empty$
1073
1074 { cite$ #1 #3 substring$ }
1075
1076 { key }
1077 if$
1078 }
1079 { editor format.lab.names }
1080 if$
1081 }
1082 { author format.lab.names }
1083 if$
1084 }
1085
1086 FUNCTION {author.key.organization.label}
1087 { author empty$
1088 { key empty$
1089 { organization empty$
1090
1091 { cite$ #1 #3 substring$ }
1092
1093 { "The " #4 organization chop.word #3 text.prefix$ }
1094 if$
1095 }
1096 { key }
1097 if$
1098 }
1099 { author format.lab.names }
1100 if$
1101 }
1102
1103 FUNCTION {editor.key.organization.label}
1104 { editor empty$
1105 { key empty$
1106 { organization empty$
1107
1108 { cite$ #1 #3 substring$ }
1109
1110 { "The " #4 organization chop.word #3 text.prefix$ }
1111 if$
1112 }
1113 { key }
1114 if$
1115 }
1116 { editor format.lab.names }
1117 if$
1118 }
1119
1120 FUNCTION {calc.label}
1121 {
1122 "cite" 'mode :=
1123 type$ "book" =
1124 type$ "inbook" =
1125 or
1126 'author.editor.key.label
1127 { type$ "proceedings" =
1128 'editor.key.organization.label
1129 { type$ "manual" =
1130 'author.key.organization.label
1131 'author.key.label
1132 if$
1133 }
1134 if$
1135 }
1136 if$
1137
1138 "\protect\citeauthoryear{" swap$ * "}{" *
1139 year field.or.null purify$ * % CHANGED - pfps - 15 Feb 1989
1140 'label :=
1141
1142 "sort" 'mode :=
1143 type$ "book" =
1144 type$ "inbook" =
1145 or
1146 'author.editor.key.label
1147 { type$ "proceedings" =
1148 'editor.key.organization.label
1149 { type$ "manual" =
1150 'author.key.organization.label
1151 'author.key.label
1152 if$
1153 }
1154 if$
1155 }
1156 if$
1157 " " *
1158 year field.or.null purify$ *
1159 sortify 'sort.label :=
1160 }
1161
1162 FUNCTION {sort.format.names}
1163 { 's :=
1164 #1 'nameptr :=
1165 ""
1166 s num.names$ 'numnames :=
1167 numnames 'namesleft :=
1168 { namesleft #0 > }
1169 { nameptr #1 >
1170 { " " * }
1171 'skip$
1172 if$
1173
1174 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1175
1176 nameptr numnames = t "others" = and
1177 { "et al" * }
1178 { t sortify * }
1179 if$
1180 nameptr #1 + 'nameptr :=
1181 namesleft #1 - 'namesleft :=
1182 }
1183 while$
1184 }
1185
1186 FUNCTION {sort.format.title}
1187 { 't :=
1188 "A " #2
1189 "An " #3
1190 "The " #4 t chop.word
1191 chop.word
1192 chop.word
1193 sortify
1194 #1 global.max$ substring$
1195 }
1196
1197 FUNCTION {author.sort}
1198 { author empty$
1199 { key empty$
1200 { "to sort, need author or key in " cite$ * warning$
1201 ""
1202 }
1203 { key sortify }
1204 if$
1205 }
1206 { author sort.format.names }
1207 if$
1208 }
1209
1210 FUNCTION {author.editor.sort}
1211 { author empty$
1212 { editor empty$
1213 { key empty$
1214 { "to sort, need author, editor, or key in " cite$ * warning$
1215 ""
1216 }
1217 { key sortify }
1218 if$
1219 }
1220 { editor sort.format.names }
1221 if$
1222 }
1223 { author sort.format.names }
1224 if$
1225 }
1226
1227 FUNCTION {author.organization.sort}
1228 { author empty$
1229 { organization empty$
1230 { key empty$
1231 { "to sort, need author, organization, or key in " cite$ * warning$
1232 ""
1233 }
1234 { key sortify }
1235 if$
1236 }
1237 { "The " #4 organization chop.word sortify }
1238 if$
1239 }
1240 { author sort.format.names }
1241 if$
1242 }
1243
1244 FUNCTION {editor.organization.sort}
1245 { editor empty$
1246 { organization empty$
1247 { key empty$
1248 { "to sort, need editor, organization, or key in " cite$ * warning$
1249 ""
1250 }
1251 { key sortify }
1252 if$
1253 }
1254 { "The " #4 organization chop.word sortify }
1255 if$
1256 }
1257 { editor sort.format.names }
1258 if$
1259 }
1260
1261 FUNCTION {presort}
1262
1263 { calc.label
1264 sort.label
1265
1266 " "
1267 *
1268 type$ "book" =
1269
1270 type$ "inbook" =
1271 or
1272 'author.editor.sort
1273 { type$ "proceedings" =
1274 'editor.organization.sort
1275 { type$ "manual" =
1276 'author.organization.sort
1277 'author.sort
1278 if$
1279 }
1280 if$
1281 }
1282 if$
1283
1284 *
1285
1286 " "
1287 *
1288 year field.or.null sortify
1289 *
1290 " "
1291 *
1292 cite$
1293 *
1294 " "
1295 *
1296 title field.or.null
1297 sort.format.title
1298 *
1299 #1 entry.max$ substring$
1300 'sort.key$ :=
1301 }
1302
1303 ITERATE {presort}
1304
1305 SORT
1306
1307 STRINGS { longest.label last.sort.label next.extra }
1308
1309 INTEGERS { longest.label.width last.extra.num }
1310
1311 FUNCTION {initialize.longest.label}
1312 { "" 'longest.label :=
1313 #0 int.to.chr$ 'last.sort.label :=
1314 "" 'next.extra :=
1315 #0 'longest.label.width :=
1316 #0 'last.extra.num :=
1317 }
1318
1319 FUNCTION {forward.pass}
1320 { last.sort.label sort.label =
1321 { last.extra.num #1 + 'last.extra.num :=
1322 last.extra.num int.to.chr$ 'extra.label :=
1323 }
1324 { "a" chr.to.int$ 'last.extra.num :=
1325 "" 'extra.label :=
1326 sort.label 'last.sort.label :=
1327 }
1328 if$
1329 }
1330
1331 FUNCTION {reverse.pass}
1332 { next.extra "b" =
1333 { "a" 'extra.label := }
1334 'skip$
1335 if$
1336 label extra.label * "}" * 'label := % CHANGED - pfps 15 Feb 1989
1337 label width$ longest.label.width >
1338 { label 'longest.label :=
1339 label width$ 'longest.label.width :=
1340 }
1341 'skip$
1342 if$
1343 extra.label 'next.extra :=
1344 }
1345
1346 EXECUTE {initialize.longest.label}
1347
1348 ITERATE {forward.pass}
1349
1350 REVERSE {reverse.pass}
1351
1352 FUNCTION {begin.bib}
1353
1354 { et.al.char.used
1355 { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
1356 'skip$
1357 if$
1358 preamble$ empty$
1359
1360 'skip$
1361 { preamble$ write$ newline$ }
1362 if$
1363
1364 "\begin{thebibliography}{}\small" write$ newline$
1365
1366 }
1367
1368 EXECUTE {begin.bib}
1369
1370 EXECUTE {init.state.consts}
1371
1372 ITERATE {call.type$}
1373
1374 FUNCTION {end.bib}
1375 { newline$
1376 "\end{thebibliography}" write$ newline$
1377 }
1378
1379 EXECUTE {end.bib}