Debian Codegraph @

texk/web2c/uptexdir/tests/jplain.bst

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