comparison paper/ipsjsort-e.bst @ 4:479585f6ef28

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