comparison jssst.bst @ 0:50a9279c19eb

hg init and added section of Monotonic-Tree Modification
author Shoshi TAMAKI <shoshi@cr.ie.u-ryukyu.ac.jp>
date Sun, 07 Aug 2011 01:55:35 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:50a9279c19eb
1 % jssst.bst tomura@etl.go.jp (Satoru Tomura)
2 % BibTeX standard bibliography style `jplain'
3 % version 0.10 for JBibTeX versions 0.10 or later, JLaTeX version 2.09.
4 % by Shouichi Matsui, matsui@denken.junet
5
6 ENTRY
7 { address
8 author
9 booktitle
10 chapter
11 edition
12 editor
13 howpublished
14 institution
15 journal
16 key
17 month
18 note
19 number
20 organization
21 pages
22 publisher
23 school
24 series
25 title
26 type
27 volume
28 year
29 yomi
30 }
31 {}
32 { label }
33
34 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
35
36 FUNCTION {init.state.consts}
37 { #0 'before.all :=
38 #1 'mid.sentence :=
39 #2 'after.sentence :=
40 #3 'after.block :=
41 }
42
43 STRINGS { s t }
44
45 FUNCTION {output.nonnull}
46 { 's :=
47 output.state mid.sentence =
48 { ", " * write$ }
49 { output.state after.block =
50 { add.period$ write$
51 newline$
52 "\newblock " write$
53 }
54 { output.state before.all =
55 'write$
56 { add.period$ " " * write$ }
57 if$
58 }
59 if$
60 mid.sentence 'output.state :=
61 }
62 if$
63 s
64 }
65
66 FUNCTION {output}
67 { duplicate$ empty$
68 'pop$
69 'output.nonnull
70 if$
71 }
72
73 FUNCTION {required.argument}
74 { 't :=
75 empty$
76 {"Missing required argument " t * " in " * cite$ * warning$}
77 'skip$
78 if$
79 }
80
81 FUNCTION {required.exclusive.or.argument}
82 { 't :=
83 empty$
84 { 's :=
85 empty$
86 { t " or " * s * " is missing in " * cite$ * warning$}
87 'skip$
88 if$
89 }
90 { 's :=
91 empty$
92 'skip$
93 { "You can use only one of " t * " and " * s * " in " * cite$ * warning$}
94 if$
95 }
96 if$
97 }
98
99 FUNCTION {required.and.or.argument}
100 { 't := empty$
101 { 's := empty$
102 { "there's no " t * " and/or " * s * cite$ * warning$ }
103 'skip$
104 if$
105 }
106 { pop$ pop$ }
107 if$
108 }
109
110 FUNCTION {optional.series.volume.number.argument}
111 { series empty$
112 { volume empty$
113 { number empty$
114 'skip$
115 { "there's a number but no series in " cite$ * warning$ }
116 if$
117 }
118 { number empty$
119 { "there's a volume but no series in " cite$ * warning$ }
120 { "you can use only one of volume and number in " cite$ * warning$}
121 if$
122 }
123 if$
124 }
125 { volume empty$
126 { number empty$
127 { "there's a series but neither volume nor number in " cite$ * warning$ }
128 'skip$
129 if$
130 }
131 { number empty$
132 'skip$
133 { "you can use only one of volume and number in " cite$ * warning$ }
134 if$
135 }
136 if$
137 }
138 if$
139 }
140
141 FUNCTION {output.bibitem}
142 { newline$
143 "\bibitem{" write$
144 cite$ write$
145 "}" write$
146 newline$
147 before.all 'output.state :=
148 }
149
150 FUNCTION {fin.entry}
151 { add.period$
152 write$
153 newline$
154 }
155
156 FUNCTION {new.block}
157 { output.state before.all =
158 'skip$
159 { after.block 'output.state := }
160 if$
161 }
162
163 FUNCTION {new.sentence}
164 { output.state after.block =
165 'skip$
166 { output.state before.all =
167 'skip$
168 { after.sentence 'output.state := }
169 if$
170 }
171 if$
172 }
173
174 FUNCTION {not}
175 { { #0 }
176 { #1 }
177 if$
178 }
179
180 FUNCTION {and}
181 { 'skip$
182 { pop$ #0 }
183 if$
184 }
185
186 FUNCTION {or}
187 { { pop$ #1 }
188 'skip$
189 if$
190 }
191
192 FUNCTION {new.block.checka}
193 { empty$
194 'skip$
195 'new.block
196 if$
197 }
198
199 FUNCTION {new.block.checkb}
200 { empty$
201 swap$ empty$
202 and
203 'skip$
204 'new.block
205 if$
206 }
207
208 FUNCTION {new.sentence.checka}
209 { empty$
210 'skip$
211 'new.sentence
212 if$
213 }
214
215 FUNCTION {new.sentence.checkb}
216 { empty$
217 swap$ empty$
218 and
219 'skip$
220 'new.sentence
221 if$
222 }
223
224 FUNCTION {field.or.null}
225 { duplicate$ empty$
226 { pop$ "" }
227 'skip$
228 if$
229 }
230
231 FUNCTION {emphasize}
232 { duplicate$ empty$
233 { pop$ "" }
234 { "{\it " swap$ * "}" * }
235 if$
236 }
237
238 FUNCTION {is.kanji}
239 %%%{ #1 text.prefix$ chr.to.int$ #127 > }
240 %%%{ #1 #1 substring$ chr.to.int$ #127 > }
241 { purify$ #1 text.prefix$ chr.to.int$ #127 >}
242
243 INTEGERS { nameptr namesleft numnames }
244
245 FUNCTION {format.names}
246 { 's :=
247 #1 'nameptr :=
248 s num.names$ 'numnames :=
249 numnames 'namesleft :=
250 { namesleft #0 > }
251 { s nameptr
252 s nameptr "{ll}" format.name$ is.kanji
253 { "{ff}{vv}{ll}" }
254 { "{vv~}{ll}{, jj}{, f.}" }
255 if$
256 format.name$ 't :=
257 nameptr #1 >
258 { namesleft #1 >
259 { ", " * t * }
260 { numnames #2 >
261 { "," * }
262 'skip$
263 if$
264 numnames #3 <
265 { t is.kanji
266 {"," * "" *} 'skip$ if$
267 }
268 'skip$
269 if$
270 t "others" =
271 { s is.kanji
272 {"ほか" * }
273 {" et~al." * }
274 if$
275 }
276 { s is.kanji
277 {" " * t * }
278 {" and " * t * }
279 if$
280 }
281 if$
282 }
283 if$
284 }
285 't
286 if$
287 nameptr #1 + 'nameptr :=
288 namesleft #1 - 'namesleft :=
289 }
290 while$
291 }
292
293 FUNCTION {format.authors}
294 { author empty$
295 { "" }
296 { author format.names }
297 if$
298 }
299
300 FUNCTION {format.editors}
301 { editor empty$
302 { "" }
303 { editor format.names
304 editor num.names$ #1 >
305 { editor is.kanji
306 {"(編)" * } %%{", editors" * } if$
307 {"(eds.)" *} if$
308 }
309 { editor is.kanji
310 {"(編)" *} %%{", editor" * } if$
311 {"(ed.)" *} if$
312 }
313 if$
314 }
315 if$
316 }
317
318 FUNCTION {n.dashify}
319 { 't :=
320 ""
321 { t empty$ not }
322 { t #1 #1 substring$ "-" =
323 { t #1 #2 substring$ "--" = not
324 { "--" *
325 t #2 global.max$ substring$ 't :=
326 }
327 { { t #1 #1 substring$ "-" = }
328 { "-" *
329 t #2 global.max$ substring$ 't :=
330 }
331 while$
332 }
333 if$
334 }
335 { t #1 #1 substring$ *
336 t #2 global.max$ substring$ 't :=
337 }
338 if$
339 }
340 while$
341 }
342
343 FUNCTION {format.date}
344 { year empty$
345 { month empty$
346 { "" }
347 { "there's a month but no year in " cite$ * warning$
348 month
349 }
350 if$
351 }
352 { month empty$
353 'year
354 { month " " * year * }
355 if$
356 }
357 if$
358 }
359
360 FUNCTION {tie.or.space.connect}
361 { duplicate$ text.length$ #3 <
362 { "~" }
363 { " " }
364 if$
365 swap$ * *
366 }
367
368 FUNCTION {output.volume}
369 {
370 volume empty$
371 'skip$
372 { "Vol.~" volume * output}
373 if$
374
375 }
376
377 FUNCTION {output.number}
378 {
379 number empty$
380 'skip$
381 { "No.~" number * output}
382 if$
383 }
384
385 FUNCTION {output.series.volume.number}
386 { series empty$
387 { output.volume
388 output.number }
389 { series is.kanji
390 volume empty$
391 number empty$
392 or
393 and
394 { series " " * volume * number * output}
395 { series output
396 output.volume
397 output.number}
398 if$
399 }
400 if$
401 }
402
403 FUNCTION {format.edition}
404 { edition empty$
405 { "" }
406 { output.state mid.sentence =
407 { edition "l" change.case$ " edition" * }
408 { edition "t" change.case$ " edition" * }
409 if$
410 }
411 if$
412 }
413
414 INTEGERS { multiresult }
415
416 FUNCTION {multi.page.check}
417 { 't :=
418 #0 'multiresult :=
419 { multiresult not
420 t empty$ not
421 and
422 }
423 { t #1 #1 substring$
424 duplicate$ "-" =
425 swap$ duplicate$ "," =
426 swap$ "+" =
427 or or
428 { #1 'multiresult := }
429 { t #2 global.max$ substring$ 't := }
430 if$
431 }
432 while$
433 multiresult
434 }
435
436 FUNCTION {format.pages}
437 { pages empty$
438 { "" }
439 { pages multi.page.check
440 { "pp.~" pages n.dashify tie.or.space.connect }
441 { "pp.~" pages tie.or.space.connect }
442 if$
443 }
444 if$
445 }
446
447 FUNCTION {format.volume.number.year.pages}
448 { volume empty$
449 { number empty$
450 { year empty$
451 { "" }
452 { "(" year * ")" * }
453 if$}
454 { year empty$
455 { "No.~" number * }
456 { "No.~" number * "(" * year * ")" * }
457 if$}
458 if$}
459 { number empty$
460 { year empty$
461 { "Vol.~" volume * }
462 { "Vol.~" volume * "(" * year * ")" * }
463 if$}
464 { year empty$
465 {"Vol.~" volume * ", " * "No.~" * number * }
466 {"Vol.~" volume * ", " * "No.~" * number * "(" * year * ")" * }
467 if$}
468 if$}
469 if$
470 pages empty$
471 'skip$
472 { duplicate$ empty$
473 { pop$ format.pages }
474 { "," * " pp.~" * pages n.dashify * }
475 if$
476 }
477 if$
478 }
479
480 FUNCTION {format.chapter.pages}
481 { chapter empty$
482 'format.pages
483 { type empty$
484 { "chapter" chapter tie.or.space.connect }
485 { type is.kanji
486 { chapter type tie.or.space.connect }
487 { type "l" change.case$ chapter tie.or.space.connect }
488 if$
489 }
490 if$
491 pages empty$
492 'skip$
493 { ", " * format.pages * }
494 if$
495 }
496 if$
497 }
498
499 FUNCTION {format.in.ed.booktitle}
500 { booktitle empty$
501 { "" }
502 { editor empty$
503 { booktitle is.kanji
504 { " " booktitle emphasize * }
505 { " " booktitle emphasize * }
506 if$
507 }
508 { booktitle is.kanji
509 { booktitle emphasize ", " * format.editors * "" *}
510 { booktitle emphasize ", " * format.editors * "" *}
511 if$
512 }
513 if$
514 }
515 if$
516 }
517
518 FUNCTION {empty.misc.check}
519 { author empty$ title empty$ howpublished empty$
520 month empty$ year empty$ note empty$
521 and and and and and
522 key empty$ not and
523 { "all relevant fields are empty in " cite$ * warning$ }
524 'skip$
525 if$
526 }
527
528 FUNCTION {format.thesis.type}
529 { type empty$
530 'skip$
531 { pop$
532 type "t" change.case$
533 }
534 if$
535 }
536
537 FUNCTION {format.tr.number}
538 { type empty$
539 { title empty$
540 { "Technical Report" }
541 { title is.kanji
542 { "技術報告" }
543 { "Technical Report" }
544 if$
545 }
546 if$
547 }
548 {type}
549 if$
550 number empty$
551 { "t" change.case$ }
552 { number tie.or.space.connect }
553 if$
554 }
555
556 FUNCTION {format.article.crossref}
557 { key empty$
558 { journal empty$
559 { "need key or journal for " cite$ * " to crossref " * crossref *
560 warning$
561 ""
562 }
563 { "In {\it " journal * "\/}" * }
564 if$
565 }
566 { "In " key * }
567 if$
568 " \cite{" * crossref * "}" *
569 }
570
571 FUNCTION {format.crossref.editor}
572 { editor #1 "{vv~}{ll}" format.name$
573 editor num.names$ duplicate$
574 #2 >
575 { editor is.kanji
576 {pop$ " ほか" *} {pop$ " et~al." * } if$
577 }
578 { #2 <
579 'skip$
580 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
581 { editor is.kanji
582 {" ほか" *} {"et~al." * } if$
583 }
584 { editor is.kanji
585 {" " * editor #2 "{vv~}{ll}" format.name$ * }
586 {" and " * editor #2 "{vv~}{ll}" format.name$ * }
587 if$
588 }
589 if$
590 }
591 if$
592 }
593 if$
594 }
595
596 FUNCTION {format.book.crossref}
597 { volume empty$
598 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
599 title is.kanji
600 {" "} {"In "} if$
601 }
602 { "Volume" volume tie.or.space.connect
603 " of " *
604 }
605 if$
606 editor empty$
607 editor field.or.null author field.or.null =
608 or
609 { key empty$
610 { series empty$
611 { "need editor, key, or series for " cite$ * " to crossref " *
612 crossref * warning$
613 "" *
614 }
615 { "{\it " * series * "\/}" * }
616 if$
617 }
618 { key * }
619 if$
620 }
621 { format.crossref.editor * }
622 if$
623 " \cite{" * crossref * "}" *
624 }
625
626 FUNCTION {format.incoll.inproc.crossref}
627 { editor empty$
628 editor field.or.null author field.or.null =
629 or
630 { key empty$
631 { booktitle empty$
632 { "need editor, key, or booktitle for " cite$ * " to crossref " *
633 crossref * warning$
634 ""
635 }
636 { booktitle is.kanji
637 {" {\it " booktitle * "\/}" * }
638 {"In {\it " booktitle * "\/}" * }
639 if$
640 }
641 if$
642 }
643 { "In " key * }
644 if$
645 }
646 { title is.kanji
647 {" " format.crossref.editor * }
648 {"In " format.crossref.editor * }
649 if$
650 }
651 if$
652 " \cite{" * crossref * "}" *
653 }
654
655 FUNCTION {article}
656 {
657 %%%%
658 author "author" required.argument
659 title "title" required.argument
660 journal "journal" required.argument
661 year "year" required.argument
662 %%%% jssst
663 volume "volume"
664 number "number"
665 required.and.or.argument
666 pages "pages" required.argument
667 %%%%
668 output.bibitem
669 format.authors ": " *
670 title output
671 crossref missing$
672 { journal emphasize output
673 format.volume.number.year.pages output
674 }
675 { format.article.crossref output.nonnull
676 format.pages output
677 }
678 if$
679 new.block
680 note output
681 fin.entry
682 }
683
684 FUNCTION {book}
685 {
686 %%%%
687 author "author"
688 editor "editor"
689 required.exclusive.or.argument
690 title "title" required.argument
691 publisher "publisher" required.argument
692 year "year" required.argument
693 optional.series.volume.number.argument
694 %%%%
695 output.bibitem
696 author empty$
697 { format.editors}
698 { format.authors}
699 if$
700 ": " *
701 title emphasize output
702 crossref missing$
703 { output.series.volume.number
704 publisher output
705 address output
706 }
707 { new.block
708 format.book.crossref output.nonnull
709 }
710 if$
711 format.edition output
712 format.date output
713 new.block
714 note output
715 fin.entry
716 }
717
718 FUNCTION {booklet}
719 {
720 %%%%
721 title "title" required.argument
722 %%%% jssst
723 author "author" required.argument
724 %%%%
725 output.bibitem
726 format.authors ": " *
727 title output
728 howpublished output
729 address output
730 format.date output
731 new.block
732 note output
733 fin.entry
734 }
735
736 FUNCTION {inbook}
737 {
738 %%%%
739 author "author"
740 editor "editor"
741 required.exclusive.or.argument
742 title "title" required.argument
743 chapter "chapter"
744 pages "pages"
745 required.and.or.argument
746 publisher "publisher" required.argument
747 year "year" required.argument
748
749 optional.series.volume.number.argument
750 %%%%
751 output.bibitem
752 author empty$
753 { format.editors}
754 { format.authors}
755 if$
756 ": " *
757 title emphasize output
758 crossref missing$
759 { output.series.volume.number
760 publisher output
761 }
762 { format.chapter.pages output
763 new.block
764 format.book.crossref output.nonnull
765 }
766 if$
767 format.edition output
768 format.date output
769 format.chapter.pages output
770 new.block
771 note output
772 fin.entry
773 }
774
775 FUNCTION {incollection}
776 {
777 %%%%
778 author "author" required.argument
779 title "title" required.argument
780 booktitle "booktitle" required.argument
781 publisher "publisher" required.argument
782 year "year" required.argument
783
784 optional.series.volume.number.argument
785 %%%%
786 output.bibitem
787 format.authors ": " *
788 title output
789 crossref missing$
790 { format.in.ed.booktitle output
791 output.series.volume.number
792 publisher output
793 address output
794 format.edition output
795 format.date output
796 }
797 { format.incoll.inproc.crossref output.nonnull
798 format.chapter.pages output
799 }
800 if$
801 format.chapter.pages output
802 new.block
803 note output
804 fin.entry
805 }
806
807 FUNCTION {inproceedings}
808 {
809 %%%%
810 author "author" required.argument
811 title "title" required.argument
812 booktitle "booktitle" required.argument
813 year "year" required.argument
814
815 optional.series.volume.number.argument
816 %%%%
817 output.bibitem
818 format.authors ": " *
819 title output
820 crossref missing$
821 { format.in.ed.booktitle output
822 output.series.volume.number
823 address output
824 organization output
825 publisher output
826 format.date output
827 format.pages output
828 }
829 { format.incoll.inproc.crossref output.nonnull
830 format.pages output
831 }
832 if$
833 new.block
834 note output
835 fin.entry
836 }
837
838 FUNCTION {conference} { inproceedings }
839
840 FUNCTION {manual}
841 {
842 %%%%
843 title "title" required.argument
844 %%%% jssst
845 author "author"
846 organization "organazaion"
847 required.exclusive.or.argument
848 %%%%
849 output.bibitem
850 author empty$
851 { organization}
852 { format.authors}
853 if$
854 ": " *
855 title emphasize output
856 author empty$
857 'skip$
858 { organization output }
859 if$
860 address output
861 format.edition output
862 format.date output
863 new.block
864 note output
865 fin.entry
866 }
867
868 FUNCTION {mastersthesis}
869 {
870 %%%%
871 author "author" required.argument
872 title "title" required.argument
873 school "school" required.argument
874 year "year" required.argument
875 %%%%
876 output.bibitem
877 format.authors ": " *
878 title output
879 author empty$
880 { "Master's thesis" }
881 { author is.kanji
882 { "修士論文" }
883 { "Master's thesis" }
884 if$
885 }
886 if$
887 format.thesis.type output.nonnull
888 school output
889 address output
890 format.date output
891 new.block
892 note output
893 fin.entry
894 }
895
896 FUNCTION {misc}
897 {
898 %%%%
899 %%%% jssst
900 author "author" required.argument
901 title "title" required.argument
902 %%%%
903 output.bibitem
904 format.authors
905 ": " *
906 title output
907 howpublished output
908 format.date output
909 new.block
910 note output
911 fin.entry
912 empty.misc.check
913 }
914
915 FUNCTION {phdthesis}
916 {
917 %%%%
918 author "author" required.argument
919 title "title" required.argument
920 school "school" required.argument
921 year "year" required.argument
922 %%%%
923 output.bibitem
924 format.authors ": " *
925 title emphasize output
926 author empty$
927 { "PhD Thesis" }
928 { author is.kanji
929 { "博士論文" }
930 { "PhD Thesis" }
931 if$
932 }
933 if$
934 format.thesis.type output.nonnull
935 school output
936 address output
937 format.date output
938 new.block
939 note output
940 fin.entry
941 }
942
943 FUNCTION {proceedings}
944 {
945 %%%%
946 title "title" required.argument
947 year "year" required.argument
948
949 optional.series.volume.number.argument
950 %%%% jssst
951 editor "editor"
952 organization "organization"
953 required.exclusive.or.argument
954 %%%%
955 output.bibitem
956 editor empty$
957 { organization }
958 { format.editors }
959 if$
960 ": " *
961 title emphasize output
962 output.series.volume.number
963 address output
964 editor empty$
965 'skip$
966 { organization output }
967 if$
968 publisher output
969 format.date output
970 new.block
971 note output
972 fin.entry
973 }
974
975 FUNCTION {techreport}
976 {
977 %%%%
978 author "author" required.argument
979 title "title" required.argument
980 institution "institution" required.argument
981 year "year" required.argument
982 %%%%
983 output.bibitem
984 format.authors ": " *
985 title output
986 format.tr.number output.nonnull
987 institution output
988 address output
989 format.date output
990 new.block
991 note output
992 fin.entry
993 }
994
995 FUNCTION {unpublished}
996 {
997 %%%%
998 author "author" required.argument
999 title "title" required.argument
1000 note "note" required.argument
1001 %%%%
1002 output.bibitem
1003 format.authors ": " *
1004 title output
1005 format.date output
1006 new.block
1007 note output
1008 fin.entry
1009 }
1010
1011 FUNCTION {default.type} { misc }
1012
1013 MACRO {jan} {"January"}
1014
1015 MACRO {feb} {"February"}
1016
1017 MACRO {mar} {"March"}
1018
1019 MACRO {apr} {"April"}
1020
1021 MACRO {may} {"May"}
1022
1023 MACRO {jun} {"June"}
1024
1025 MACRO {jul} {"July"}
1026
1027 MACRO {aug} {"August"}
1028
1029 MACRO {sep} {"September"}
1030
1031 MACRO {oct} {"October"}
1032
1033 MACRO {nov} {"November"}
1034
1035 MACRO {dec} {"December"}
1036
1037 MACRO {acmcs} {"ACM Computing Surveys"}
1038
1039 MACRO {acta} {"Acta Informatica"}
1040
1041 MACRO {cacm} {"Communications of the ACM"}
1042
1043 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1044
1045 MACRO {ibmsj} {"IBM Systems Journal"}
1046
1047 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1048
1049 MACRO {ieeetc} {"IEEE Transactions on Computers"}
1050
1051 MACRO {ieeetcad}
1052 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1053
1054 MACRO {ipl} {"Information Processing Letters"}
1055
1056 MACRO {jacm} {"Journal of the ACM"}
1057
1058 MACRO {jcss} {"Journal of Computer and System Sciences"}
1059
1060 MACRO {scp} {"Science of Computer Programming"}
1061
1062 MACRO {sicomp} {"SIAM Journal on Computing"}
1063
1064 MACRO {tocs} {"ACM Transactions on Computer Systems"}
1065
1066 MACRO {tods} {"ACM Transactions on Database Systems"}
1067
1068 MACRO {tog} {"ACM Transactions on Graphics"}
1069
1070 MACRO {toms} {"ACM Transactions on Mathematical Software"}
1071
1072 MACRO {toois} {"ACM Transactions on Office Information Systems"}
1073
1074 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1075
1076 MACRO {tcs} {"Theoretical Computer Science"}
1077
1078 READ
1079
1080 FUNCTION {sortify}
1081 { purify$
1082 "l" change.case$
1083 }
1084
1085 INTEGERS { len }
1086
1087 FUNCTION {chop.word}
1088 { 's :=
1089 'len :=
1090 s #1 len substring$ =
1091 { s len #1 + global.max$ substring$ }
1092 's
1093 if$
1094 }
1095
1096 FUNCTION {sort.format.names}
1097 { 's :=
1098 yomi empty$
1099 'skip$
1100 { yomi 's := }
1101 if$
1102
1103 #1 'nameptr :=
1104 ""
1105 s num.names$ 'numnames :=
1106 numnames 'namesleft :=
1107 { namesleft #0 > }
1108 { nameptr #1 >
1109 { " " * }
1110 'skip$
1111 if$
1112 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1113 nameptr numnames = t "others" = and
1114 { "et al" * }
1115 { t sortify * }
1116 if$
1117 nameptr #1 + 'nameptr :=
1118 namesleft #1 - 'namesleft :=
1119 }
1120 while$
1121 }
1122
1123 FUNCTION {sort.format.title}
1124 { 't :=
1125 "A " #2
1126 "An " #3
1127 "The " #4 t chop.word
1128 chop.word
1129 chop.word
1130 sortify
1131 #1 global.max$ substring$
1132 }
1133
1134 FUNCTION {author.sort}
1135 { author empty$
1136 { key empty$
1137 { "to sort, need author or key in " cite$ * warning$
1138 ""
1139 }
1140 { key sortify }
1141 if$
1142 }
1143 { author sort.format.names }
1144 if$
1145 }
1146
1147 FUNCTION {author.editor.sort}
1148 { author empty$
1149 { editor empty$
1150 { key empty$
1151 { "to sort, need author, editor, or key in " cite$ * warning$
1152 ""
1153 }
1154 { key sortify }
1155 if$
1156 }
1157 { editor sort.format.names }
1158 if$
1159 }
1160 { author sort.format.names }
1161 if$
1162 }
1163
1164 FUNCTION {author.organization.sort}
1165 { author empty$
1166 { organization empty$
1167 { key empty$
1168 { "to sort, need author, organization, or key in " cite$ * warning$
1169 ""
1170 }
1171 { key sortify }
1172 if$
1173 }
1174 { "The " #4 organization chop.word sortify }
1175 if$
1176 }
1177 { author sort.format.names }
1178 if$
1179 }
1180
1181 FUNCTION {editor.organization.sort}
1182 { editor empty$
1183 { organization empty$
1184 { key empty$
1185 { "to sort, need editor, organization, or key in " cite$ * warning$
1186 ""
1187 }
1188 { key sortify }
1189 if$
1190 }
1191 { "The " #4 organization chop.word sortify }
1192 if$
1193 }
1194 { editor sort.format.names }
1195 if$
1196 }
1197
1198 FUNCTION {presort}
1199 { type$ "book" =
1200 type$ "inbook" =
1201 or
1202 'author.editor.sort
1203 { type$ "proceedings" =
1204 'editor.organization.sort
1205 { type$ "manual" =
1206 'author.organization.sort
1207 'author.sort
1208 if$
1209 }
1210 if$
1211 }
1212 if$
1213 " "
1214 *
1215 year field.or.null sortify
1216 *
1217 " "
1218 *
1219 title field.or.null
1220 sort.format.title
1221 *
1222 #1 entry.max$ substring$
1223 'sort.key$ :=
1224 }
1225
1226 ITERATE {presort}
1227
1228 SORT
1229
1230 STRINGS { longest.label }
1231
1232 INTEGERS { number.label longest.label.width }
1233
1234 FUNCTION {initialize.longest.label}
1235 { "" 'longest.label :=
1236 #1 'number.label :=
1237 #0 'longest.label.width :=
1238 }
1239
1240 FUNCTION {longest.label.pass}
1241 { number.label int.to.str$ 'label :=
1242 number.label #1 + 'number.label :=
1243 label width$ longest.label.width >
1244 { label 'longest.label :=
1245 label width$ 'longest.label.width :=
1246 }
1247 'skip$
1248 if$
1249 }
1250
1251 EXECUTE {initialize.longest.label}
1252
1253 ITERATE {longest.label.pass}
1254
1255 FUNCTION {begin.bib}
1256 { preamble$ empty$
1257 'skip$
1258 { preamble$ write$ newline$ }
1259 if$
1260 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1261 }
1262
1263 EXECUTE {begin.bib}
1264
1265 EXECUTE {init.state.consts}
1266
1267 ITERATE {call.type$}
1268
1269 FUNCTION {end.bib}
1270 { newline$
1271 "\end{thebibliography}" write$ newline$
1272 }
1273
1274 EXECUTE {end.bib}
1275
1276