summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/ptex/pbibtex/jbtxbst.doc
blob: e7bb79dce2e2cd4a23c1717acd6667eefa5d3bf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
% JBibTeX `jplain' family
	% version 0.30 for JBibTeX versions 0.30 or later, LaTeX version 2.09.
	% Copyright (C) 1990, all rights reserved.
	%
	% This file is derived from btxbst.doc of BibTeX 0.99c
	%
	% Copying of this file is authorized only if either
	% (1) you make absolutely no changes to your copy, including name, or
	% (2) if you do make changes, you name it something other than
	% jbtxbst.doc, jplain.bst, junsrt.bst, jalpha.bst, jabbrv.bst,
	% tipsj.bst, jipsj.bst, tieice.bst, jname.bst, jorsj.bst
	%
	% This restriction helps ensure that all standard styles are identical.
	% The file jbtxbst.doc has the documentation for this style.
	%
	% Please notify Shouichi MATSUI(matsui@denken.or.jp) of any bugs in
	% these standard styles or in this documentation file.
	% $B>>0f(B $B@50l(B  ($B:b(B) $BEENOCf1{8&5f=j!!>pJs8&5f=j(B  $B>pJs2J3XIt(B
	% Last update 1994-10-25
%
% $B$3$N%U%!%$%k(B jbtxbst.doc $B$O;29MJ88%%9%?%$%k$NM}2r$r=u$1$k$?$a!$(Bcpp $B$J$I$r(B
% $B;H$C$F!$0c$&%9%?%$%k$r:n@.$9$k>l9g$N?w7?$H$7$F;H$&$?$a$NJ*$G$"$k!%(B
% Oren Patashnik $B;a$K$h$k!$(Bbtxbst.doc $B$rK]Lu$9$k$H$H$b$K!$F|K\8lMQ$K=$@5!$DI2C(B
% $B$r2C$($?$b$N$G$"$k!%(B
%
% $BI8=`%9%?%$%k$O0J2<$N$h$&$K$7$F@8@.$7$?8e!$(B
%	cpp -P -DJPLAIN jbtxbst.doc jplain.txt
%	cpp -P -DJUNSRT jbtxbst.doc junsrt.txt
%	cpp -P -DJALPHA jbtxbst.doc jalpha.txt
%	cpp -P -DJABBRV jbtxbst.doc jabbrv.txt
%	cpp -P -DTIPSJ jbtxbst.doc tipsj.txt
%	cpp -P -DJIPSJ jbtxbst.doc jipsj.txt
%	cpp -P -DTIEICE jbtxbst.doc tieic.txt
%	cpp -P -DJORSJ jbtxbst.doc jorsj.txt
%	cpp -P -DJNAME jbtxbst.doc jname.txt
% $BITMW$J%3%a%s%H9T!$6u9T$r:o=|$7$?8e!$%U%!%$%kL>$rJQ99$9$l$P@8@.$G$-$k!%(B
% ($B<B:]$K$O8e=R$N(B cpp.awk $B$r;H$C$F(B gawk $B$G@8@.$7$?!K!%(B
% 
% ASCII $BHG$N(B versinn 0.98 $B$K4p$E$/(B Kanji BibTeX $B$G;H$o$l$F$$$k(B jplain, jalpha,
% junsrt, jabbrv $B$K6a$$7A$N(B bst $B%U%!%$%k$r:n$k$K$O!$(B
%
%	cpp -P -DJPLAIN -DASCII98 jbtxbst.doc jplain98.txt
%
% $B$H$$$&$h$&$K(B, -DASCII98 $B$rDI2C$9$k!%40A4$KF1$8$G$O$J$$$,!$$+$J$j6a$$7A$N(B
% $BJ88%%j%9%H%G!<%?(B(bbl)$B$,F@$i$l$k$h$&$J%9%?%$%k%U%!%$%k$rF@$k$3$H$,$G$-$k!%(B
%
% cpp $B$r;}$C$F$$$J$$$H$+!$(B(PC $BMQ$N(B)C $B%3%s%Q%$%i!<$N(B cpp $B$K$h$C$F$O>e5-$NMM$K(B
% $B=hM}$G$-$J$$>l9g$,$"$k!%(BTurbo C 2.0 $B$N(B cpp $B$O8-$32a$.$F!$>e5-$NL\E*(B
% $B$K$O;H$($J$$!%$^$?9TF,$K(B # $B$,$J$/$F$b$=$l$r(B cpp $B$X$N;XNa$@$H$_$J$9=hM}7O$G$b(B
% $B$&$^$/$$$+$J$$>l9g$,$"$k!%(B
% cpp $B$G$&$^$/=hM}$G$-$J$$>l9g$K;H$($k(B gawk $BMQ$N%9%/%j%W%H$r(B bst/cpp.awk $B$H$$$&(B
% $B7A$GMQ0U$7$F$"$k!%;H$$J}$K$D$$$F$O(B bst/generate.[bat|sh] $B$r8+$h!*(B
%
% UNIX $B$N(B cpp $B$G$O=hM}$G$-$k$3$H$r4|BT$9$k!%>/$J$/$H$b(B SUN $B$N(B cpp $B$G$O(B
% $B=hM}$G$-$?!%(B
%
% $BIT9,$K$7$F(B cpp $B$,;H$($J$$$H$+!$(B gawk $B$b$J$$$H$+$N>l9g$K$O!$0J2<$N@bL@$r(B
% $B;29M$K$7$F?M4V(B cpp $B$K$J$C$F!$(Beditor $B$r;H$C$FJT=8$7$F:n$j=P$;$P$$$$!%(B
% ($B$3$s$JIT9,$J$3$H$O$J$$$G$7$g$&$M!)!K(B
%
% cpp $B$N=PNO$OFCDj$N9T$,:o=|$5$l$k!J$"$k$$$O6uGr9T$,IU2C$5$l$k!K$3$H$r=|$1$P(B
% $BF~NO$HF1$8$G$"$k!%0J2<$N%7!<%/%(%s%9$O!$(B# $BJ8;z$,Bh#1%+%i%`$K$"$k$H$7$F!$(B
%	#if VAR
%	    VAR $B$,(B 0 $B$G$J$$;~$K4^$a$k9T(B
%	#else
%	    VAR $B$,(B 0 $B$N;~$K4^$a$k9T(B
%	#endif
%
% VAR $B$NCM$K1~$8$F$I$A$i$N9T72$,;H$o$l$k$+!$4^$^$l$k$h$&$K$J$k$+$r<($9!%(B
% #else $BItJ,$O$J$/$F$b$h$$!%(B#else, #endif $B$N8e$K$O%3%a%s%H$r=q$/;v$,$G$-$k!%(B
% $BJQ?t$O(B
%	#define VAR value
% $B$GCM$r@_Dj$G$-!$(B #ifdef VAR $B$G(B VAR $B$,CM$r;}$C$F$$$k$+!JDj5A$5$l$F$$$k$+!K!$(B
% #ifndef VAR $B$G(B VAR $B$,CM$r;}$C$F$$$J$$$+!JL$Dj5A$+!K$rD4$Y$k$3$H$,$G$-$k!%(B
% $B$3$N%U%!%$%kCf$G;H$C$F$$$k$b$&#1$D$N7A<0$O(B #if !VAR $B$G$"$j!$$3$l$O(B VAR $B$N(B
% $BCM$,(B 0 $B$N;~$K8eB3$N9T72$r4^$a$k$h$&$K$9$k$b$N$G$"$k!%(B
%
% $B5,Ls(B: $B%W%j%W%m%;%C%5$N$?$a$NJQ?t$H$7$F$O!$$9$Y$FBgJ8;z$r;H$&$3$H$K$9$l$P!$(B
% $B!!!!!!$I$3$K$"$k$+8+$D$1$k$N$,4JC1$K$J$k!%(B
%
% $B8@$$Lu(B: cpp $B$N5!G=$r%U%k$K;H$&$h$&$K=q$1$P!$$3$N%U%!%$%k$O$b$C$H>.$5$/$G$-$k!%(B
%         $B$7$+$7!$:n6H$7$?4D6-$G$O$A$c$s$H;H$($k(B cpp $B$,$J$+$C$?$N$G!$(B
%         $B%*%j%8%J%k$G;H$C$F$$$J$+$C$?5!G=$O;H$C$F$$$J$$!%(B
%
% cpp $B$X$N(B(gawk $B$X$N(B)$B%3%^%s%I9T$G$O!$(BJPLAIN, JUNSRT, JALPHA, JABBRV, JIPSJ,
% TIPSJ, TIEICE, JNAME, JORSJ $B$N$$$:$l$+$r;XDj$7$F$*$/$3$H!J$I$l$G$b$J$$$H!$(B
% JPLAIN $B$r%G%#%U%)!<%k%H$H$7$F;H$&$h$&$K$J$C$F$$$k!%=>$C$F?7$7$$%9%?%$%k$r(B
% $B:n$j=P$9>l9g$K$O!$$3$N%G%#%U%)%k%H$r@_Dj$7$F$$$kItJ,$r=q$-49$($k$3$H!K!%(B
%
% $B$=$l$>$l$NO@M}JQ?t$O!$$=$l$>$l$N%9%?%$%k$G!$??(B(1)$B$+56(B(0)$B$K@_Dj$7$F$*$/$3$H!%(B
% $B8=:_;H$C$F$$$kJQ?t$H$=$N0UL#$O0J2<$NDL$j$G$"$k!%(B
%
%	LAB_ALPH:	$BJ8;zNs%i%Y%k$r@8@.(B($B$3$l$,56$J$i?t;z%i%Y%k$K$J$k(B)
%	SORTED:		($B?t;z%i%Y%k$G$J$$$J$i!K%i%Y%k!$Cx<T$J$I$N>pJs$r(B
%			$B;H$C$F$K%=!<%H$9$k(B($B56$J$i%=!<%H$5$l$:$K!$=P8==g$KJB$V(B)
%	NAME_FULL:	$BCx<T!$JT<T$NL>A0$H$7$F(B bibliography file $BCf$K=q$+$l$?(B
%			$BJ*$r$=$N$^$^;H$&(B($B56$J$i@+0J30$O%$%K%7%c%k$@$1$K$J$k!%(B
%			$B4A;zI=5-$5$l$?Cx<T$N>l9g$K$O!$@+$HL>$N4V$K%9%Z!<%9$,(B
%			$B$"$l$P!$@+$@$1$K$J$k(B)
%	ATIT_LOWER:	$BK\0J30!JO@J8$J$I!K$N%?%$%H%k$O@hF,$NJ8;z!$%3%m%s$N8e$N(B
%			$B:G=i$NJ8;z0J30$O>.J8;z$K$9$k(B($B56$J$i(B database $BCf$N$^$^(B)
%	MONTH_FULL:	$B7n$NL>A0$r>JN,7A$H$7$J$$(B($B56$J$i>JN,7A(B)
%	JOUR_FULL:	$BO@J8;o!$;(;o$J$I$r>JN,7A$H$7$J$$(B($B56$J$i>JN,7A!$8=:_$O(B
%			$B$=$N7A<0$O(B ACM $B$N=PHGJ*$K$"$k7A<0$G$"$k(B)
%----------------------------------------------------------------------
% $B>>0f$K$h$kDI2CJ,(B
%	 IN_LOWER:		In $B$G$J$/(B in$B!!$r;H$&!%(B
%	 ONE_SENTENCE:  	1$BJ8$N7A$K$9$k!%(B
%	 ED_SHORT:		Editor $B$G$J$/(B Ed.
%	 FAMILY_FIRST:		$B1Q8lI=5-Cx<T$N@+$r@h$K!$L>$r8e$K$9$k!%(B
%        FIRST_FAMILY_FIRST:    $B1Q8lI=5-Cx<T$NBh0lCx<T$@$1@+$r@h$K$9$k!%(B
%	 NO_COM_AND:		3$BL>0J>e$NCx<T$N;~(B and $B$NA0$K(B , $B$rF~$l$J$$!%(B
%	 SMALL_CAP:		$BI=Bj$O(B small cap $B%U%)%s%H!%(B
%	 KANJI_FULL_NAME:	$B4A;zCx<TL>$OL>$^$G=P$9!%(B
%	 ED_IN_PAR :		$BJT=8<TL>$r3g8L$KF~$l$k!%(B
%	 NO_EM:			$BK\!$;(;oL>$H$+$K6/D4;XDj(B($B%$%?%j%C%/(B)$B$O;H$o$J$$!%(B
%	 YEAR_IN_PAR:		$BG/$r3g8L$G0O$`!%(B
%	 ZENKAKU_PUN:		$BF|K\8lJ88%$KBP$7$F$OA43Q$N(B"$B!$(B","$B!%(B","$B!'(B"$B$r;H$&!%(B
%	 ZENKAKU_COLON:		$B#1J87A<0$N;~!$F|K\8lCx<T$N8e$K$OA43Q$N%3%m%s$r(B
%				$BIU$1$k!%(B
%	 JIPSJ_LIKE:    	JIPSJ $B$N$h$&$JC;$$(B Vol., pp. $B;2>H7A<0(B
%				Vol.=V, No.=N, pp. C--D, year=Y, month=M $B$r(B
%				V, N(M Y), C--D $B$N$h$&$J=gHV$GJB$Y$k!%(B
%	 USE_FIRST_ONLY:	$BJ8;zNs%i%Y%k$K$OBh#1Cx<T$7$+;H$o$J$$!%(B
%	 USE_KANJI_HOKA:	``$B$[$+(B''$B$G$J$/(B``$BB>(B''$B$r;H$&(B
%	 SHOW_BOOK_PAGES:	BOOK $B$N%Z!<%8?t$b=PNO$9$k!%(B
%----------------------------------------------------------------------
%
% $B%G%#%U%)!<%k%H$N%9%?%$%k$N;XDj!J?7$7$$%9%?%$%k$r2C$($k>l9g$K$O$3$3$r(B
% $BJQ99$9$kI,MW$,$"$k!%JQ99$7$F$*$+$J$$$H(B jplain $B$K$J$C$F$7$^$&!*!K(B
%
#ifndef JUNSRT
#   ifndef JALPHA
#	ifndef JABBRV
#           ifndef TIPSJ
#	       ifndef JIPSJ
#		  ifndef TIEICE
#		    ifndef JNAME
#		      ifndef JORSJ
#		        define JPLAIN 1
#		      endif  JORSJ
#		    endif  JNAME
#		  endif  TIEICE
#	       endif  JIPSJ
#           endif  TIPSJ
#	endif  JABBRV
#   endif  JALPHA
#endif
%
% ASSCII98 $B$,Dj5A$5$l$F$$$l$P!$(BASCII $BHG$N(B 0.98 $B$K4p$E$/(B Kanji BibTeX $B$N(B
% $B%9%?%$%k%U%!%$%k$r;H$C$FF@$i$l$k7k2L$K6a$$$b$N$,F@$i$l$k$h$&$K$9$k!%(B
% $B$^$C$?$/F1$8$K$J$k$H4|BT$7$F$O$$$1$J$$!*!*!*(B
%
#ifdef ASCII98
#   define ZENKAKU_PUN 1
#   define ZENKAKU_COLON 1
#else !ASCII98
#   define ZENKAKU_PUN 0
#endif
%
#ifdef JPLAIN
% jplain $B%9%?%$%k(B ($B%=!<%H$5$l$??tCM%i%Y%k(B)
#   define LAB_ALPH 0
#   define SORTED 1
#   define NAME_FULL 1
#   define ATIT_LOWER 1
#   define MONTH_FULL 1
#   define JOUR_FULL 1
%--------------------------------------
#   define IN_LOWER  0
#   define ONE_SENTENCE 0
#   define ED_SHORT 0
#   define FAMILY_FIRST 0
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 0
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 0
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 0
#   define JIPSJ_LIKE 0
#   define USE_KANJI_HOKA 0
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JPLAIN
%
#ifdef JUNSRT
% junsrt $B%9%?%$%k(B ($B%=!<%H$5$l$J$$?tCM%i%Y%k(B)
#   define LAB_ALPH 0
#   define SORTED 0
#   define NAME_FULL 1
#   define ATIT_LOWER 1
#   define MONTH_FULL 1
#   define JOUR_FULL 1
%--------------------------------------
#   define IN_LOWER  0
#   define ONE_SENTENCE 0
#   define ED_SHORT 0
#   define FAMILY_FIRST 0
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 0
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 0
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 0
#   define JIPSJ_LIKE 0
#   define USE_KANJI_HOKA 0
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JUNSRT
%
#ifdef JALPHA
% jalpha $B%9%?%$%k(B ($B%=!<%H$5$l$?J8;zNs%i%Y%k(B)
#   define LAB_ALPH 1
#   define SORTED 1
#   define NAME_FULL 1
#   define ATIT_LOWER 1
#   define MONTH_FULL 1
#   define JOUR_FULL 1
%--------------------------------------
#   define USE_FIRST_ONLY 0
#   define IN_LOWER  0
#   define ONE_SENTENCE 0
#   define ED_SHORT 0
#   define FAMILY_FIRST 0
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 0
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 0
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 0
#   define JIPSJ_LIKE 0
#   define USE_KANJI_HOKA 0
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JALPHA
%
#ifdef JABBRV
% jabbrv $B%9%?%$%k(B ($B%=!<%H$5$l$??tCM%i%Y%k$G!$>JN,7A<0(B)
#   define LAB_ALPH 0
#   define SORTED 1
#   define NAME_FULL 0
#   define ATIT_LOWER 1
#   define MONTH_FULL 0
#   define JOUR_FULL 0
%--------------------------------------
#   define IN_LOWER  0
#   define ONE_SENTENCE 0
#   define ED_SHORT 1
#   define FAMILY_FIRST 0
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 0
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 0
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 0
#   define JIPSJ_LIKE 0
#   define USE_KANJI_HOKA 1
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JABBRV
%
#ifdef TIPSJ
% tipsj $B%9%?%$%k(B ($B%=!<%H$5$l$J$$?tCM%i%Y%k$G!$>JN,7A!$#1J87A<0(B)
% $B>pJs=hM}3X2qO@J8;o!$>pJs=hM}3X2q;oMQ(B
#   define LAB_ALPH 0
#   define SORTED 0
#   define NAME_FULL 0
#   define ATIT_LOWER 0
#   define MONTH_FULL 0
#   define JOUR_FULL 0
%--------------------------------------
#   define IN_LOWER  1
#   define ONE_SENTENCE 1
#   define ED_SHORT 1
#   define FAMILY_FIRST 1
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 1
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 1
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 1
#   define JIPSJ_LIKE 0
#   define ZENKAKU_COLON 1
#   define USE_KANJI_HOKA 1
#   define SHOW_BOOK_PAGES 1
%--------------------------------------
#endif TIPSJ
%
#ifdef JIPSJ
% jipsj $B%9%?%$%k(B ($B%=!<%H$5$l$??tCM%i%Y%k$G!$>JN,7A$r;H$&!$#1J87A<0(B)
% Journal of Information Processing ($B>pJs=hM}3X2q(B)
#   define LAB_ALPH 0
#   define SORTED 1
#   define NAME_FULL 0
#   define ATIT_LOWER 0
#   define MONTH_FULL 0
#   define JOUR_FULL 0
%--------------------------------------
#   define IN_LOWER  1
#   define ONE_SENTENCE 1
#   define ED_SHORT 1
#   define FAMILY_FIRST 1
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 1
#   define SMALL_CAP 1
#   define KANJI_FULL_NAME 1
#   define ED_IN_PAR  1
#   define NO_EM 0
#   define YEAR_IN_PAR 1
#   define JIPSJ_LIKE 1
#   define ZENKAKU_COLON 0
#   define USE_KANJI_HOKA 1
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JIPSJ
%
#ifdef TIEICE
% tieic $B%9%?%$%k(B ($B%=!<%H$5$l$J$$?tCM%i%Y%k$G!$>JN,7A$r;H$&!$#1J87A<0(B)
% $BEE;R>pJsDL?.3X2qO@J8;o(B
#   define LAB_ALPH 0
#   define SORTED 0
#   define NAME_FULL 0
#   define ATIT_LOWER 1
#   define MONTH_FULL 0
#   define JOUR_FULL 0
%--------------------------------------
#   define IN_LOWER  1
#   define ONE_SENTENCE 1
#   define ED_SHORT 1
#   define FAMILY_FIRST 0
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 1
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 0
#   define ED_IN_PAR  1
#   define NO_EM 1
#   define YEAR_IN_PAR 1
#   define JIPSJ_LIKE 0
#   define ZENKAKU_COLON 1
#   define USE_KANJI_HOKA 1
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif TIEICE
%
#ifdef JNAME
% jname $B%9%?%$%k(B ($B%=!<%H$5$l$?J8;zNs%i%Y%k$G!$>JN,7A$r;H$&!$#1J87A<0(B)
% $BJ8;zNs%i%Y%k$K$OBh#1Cx<T$NL>A0$7$+;H$o$J$$!%(B
#   define LAB_ALPH 1
#   define SORTED 1
#   define NAME_FULL 0
#   define ATIT_LOWER 0
#   define MONTH_FULL 0
#   define JOUR_FULL 0
%--------------------------------------
#   define USE_FIRST_ONLY 1
#   define IN_LOWER  1
#   define ONE_SENTENCE 1
#   define ED_SHORT 1
#   define FAMILY_FIRST 0
#   define FIRST_FAMILY_FIRST 1
#   define NO_COM_AND 0
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 0
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 0
#   define JIPSJ_LIKE 0
#   define ZENKAKU_COLON 1
#   define USE_KANJI_HOKA 1
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JNAME
%
#ifdef JORSJ
% jorsj $B%9%?%$%k(B ($B%=!<%H$5$l$??tCM%i%Y%k$G!$>JN,7A$r;H$&!$#1J87A<0(B)
% Journal of the Operations Research Society of Japan
% $BF|K\%*%Z%l!<%7%g%s%:%j%5!<%A3X2qO@J8;o!J1QJ8!$OBJ8$N$I$A$i$G$bNI$$!*!K(B
#   define LAB_ALPH 0
#   define SORTED 1
#   define NAME_FULL 0
#   define ATIT_LOWER 0
#   define MONTH_FULL 0
#   define JOUR_FULL 0
%--------------------------------------
#   define IN_LOWER  1
#   define ONE_SENTENCE 1
#   define ED_SHORT 1
#   define FAMILY_FIRST 1
#   define FIRST_FAMILY_FIRST 0
#   define NO_COM_AND 1
#   define SMALL_CAP 0
#   define KANJI_FULL_NAME 1
#   define ED_IN_PAR  0
#   define NO_EM 0
#   define YEAR_IN_PAR 0
#   define JIPSJ_LIKE 1
#   define ZENKAKU_COLON 1
#   define USE_KANJI_HOKA 1
#   define SHOW_BOOK_PAGES 0
%--------------------------------------
#endif JORSJ
%
%   $B%(%s%H%j$N%U%)!<%^%C%H7A<0!'(B Mary-Claire van Leunen $B$,(B
%	"A Handbook for Scholars" $B$G?d>)$7$F$$$k7A<0$K6a$$!%K\$NCg4V$NI=Bj$O(B
%	$B%$%?%j%C%/BN$G(B($B6/D4$5$l$F(B)$B!$$=$l0J30$NI=Bj$O(B($BEE;R>pJsDL?.3X2qO@J8;o$r(B
%	$B=|$$$F!$0zMQId$J$7$G!KJ8$N7A<0$GBgJ8;z!$>.J8;z$,;H$o$l$k!%(B
%	$B$3$N%U%!%$%k$G$O!$#1J8$N7A<0$G%U%)!<%^%C%H$9$k%9%?%$%k0J30$G$O!$(B
%	$B<g$?$k%V%m%C%/$N4V$K(B \newblock(\newline $B$d(B \newpage $B$K;w$?L>A0(B)$B$r(B
%	$B=PNO$9$k$N$G!$(B\ducumentstyle $B$N0z?t$H$7$F(B `openbib' $B%*%W%7%g%s$r;XDj(B
%	$B$9$k$3$H$G!$(Bopen $B7A<0$N%j%9%H!$$9$J$o$A%V%m%C%/4V$G2~9T$5$l!$%V%m%C%/(B
%	$BFb$G$O%$%s%G%s%H$5$l$?7A<0$N%j%9%H$rF@$k;v$,$G$-$k!%(B
%	$B%G%#%U%)!<%k%H$O(B closed $B7A<0$G$"$j!$%V%m%C%/Kh$K2~9T$5$l$?$j$7$J$$!%(B
%
%   $BJ88%%j%9%H$NJ8;zNs%i%Y%k$N7A<0$O0J2<$NDL$j!%(B
%		[Knu73] $BCx<T!JJT<T!$%-!<!K$,#1?M$N;~(B
%		[AHU83] $BJ#?tCx<T$N;~$O@+$NF,J8;z$rJB$Y$?$b$N(B
%			(Aho, Hopcroft, Ulman $B$N>l9g$K$O(B AHU $B$H$J$k(B)
%
%   $BJ88%%j%9%H$N?tCM%i%Y%k$N7A<0$O0J2<$NDL$j!%(B
%		[number]
%
%   $BJ8;zNs%i%Y%k$N7A<0$N%=!<%H$O0J2<$NDL$j!J<!$N=g$GJ88%$,JB$V!K!%(B
%		$B<g%-!<$,%i%Y%k!$<!$,Cx<T!JJT<T$J$I$N>l9g$b$"$k!K!$(B
%		$B$=$N<!$,G/!$:G8e$,I=Bj$N%"%k%U%!%Y%C%H=g$GJB$Y$i$l$k!%(B
%
%		$B4A;zCx<TL>$N>l9g$K$O(B yomi $B%U%#!<%k%I$K%m!<%^;zI=5-$rF~$l$F(B
%		$BCV$/;v$G!$J8;zNs%i%Y%k$N%i%Y%k$K$J$k!%=q$-J}$r9)IW$9$l$P!$(B
%		$BF|K\8l$N%i%Y%k$H$9$k$3$H$b$G$-!$$5$i$K#5#02;=g$KJB$Y$k$3$H$b(B
%		$B$G$-$k!%>\$7$/$O(B jbtxdoc.tex $B$r8+$h!%(B
%
%   $B?tCM%i%Y%k$N7A<0$N%=!<%H$O0J2<$NDL$j!J<!$N=g$GJ88%$,JB$V!K!%(B
%		$B<g%-!<$,Cx<T!JJT<T$J$I$N>l9g$b$"$k!K!$<!$,G/!$:G8e$,I=Bj$N(B
%		$B%"%k%U%!%Y%C%H=g$GJB$Y$i$l$k!%(B
%
%		$B4A;zCx<TL>$N>l9g$K$O(B yomi $B%U%#!<%k%I$K%m!<%^;zI=5-$rF~$l$F(B
%		$BCV$/;v$G!$%"%k%U%!%Y%C%H=g$K$J$k!%=q$-J}$r9)IW$9$l$P!$#5#02;(B
%		$B=g$KJB$Y$k$3$H$b$G$-$k!%>\$7$/$O(B jbtxdoc.tex $B$r8+$h!%(B
%
%   $B%=!<%H$5$l$J$$>l9g$NJ88%$N=gHV!'(B
%		$BK\J8Cf$N0zMQ=g!%(B
%
%   History
%   12/16/84	(HWT)	Original `plain' version, by Howard Trickey.
%   12/23/84	(LL)	Some comments made by Leslie Lamport.
%    2/16/85	(OP)	Changes based on LL's comments, Oren Patashnik.
%    2/17/85	(HWT)	Template file and other standard styles made.
%    3/28/85	(OP)	First release, version 0.98b for BibTeX 0.98f.
%    5/ 9/85	(OP)	Version 0.98c for BibTeX 0.98i:
%			fixed Theoretical Computer Science macro name;
%			fixed the format.vol.num.pages function.
%    1/24/88	(OP)	Version 0.99a for BibTeX 0.99a, main changes:
%			assignment operator (:=) arguments reversed;
%			the preamble$ function outputs the database PREAMBLE;
%			entry.max$ and global.max$ (built-in) variables replace
%			entry.string.max and global.string.max functions;
%			alphabetizing by year then title, not just title;
%			many unnecessary ties removed; \it ==> \em;
%			the `alpha' style uses a superscripted `+' instead of a
%			`*' for unnamed names in constructing the label;
%			the `abbrv' style now uses "Mar." and "Sept.";
%			the functions calc.label and presort now look at just
%			the fields they're supposed to;
%			BOOKLET, MASTERSTHESIS, TECHREPORT use nonbook titles;
%			INBOOK and INCOLLECTION take an optional type (e.g.
%			type = "Section"), overriding the default "chapter";
%			BOOK, INBOOK, INCOLLECTION, and PROCEEDINGS now allow
%			either volume or number, not just volume;
%			INCOLLECTION now allows an edition and series field;
%			PROCEEDINGS and INPROCEEDINGS now use the address field
%			to tell where a conference was held;
%			INPROCEEDINGS and PROCEEDINGS now allow either volume
%			or number, and also a series field;
%			MASTERSTHESIS and PHDTHESIS accept types other than
%			"Master's thesis" and "PhD thesis";
%			UNPUBLISHED now outputs, in one block, note then date;
%			MANUAL now prints out the organization in
%			the first block if the author field is empty;
%			MISC can't be empty---it requires some optional field.
%
%  $B0J>e$O1Q8lHG$N(B btxbst.doc $B$NJQ99MzNr$G$"$k!%(B
%
%	1989-06-02 $B>>0f@50l(B(Shouichi Matsui)
%			C version 0.20 $BMQ$KJQ99!$#3$D$N%9%?%$%k$rDI2C(B	
%	1991-01-01 $B>>0f@50l(B(Shouichi Matsui) 
%			C version 0.30 $BMQ$KJQ99$HHyD4@0B??t!*?7$?$J%9%?%$%k$b(B
%			$BDI2C!*(B
%
% $B%(%s%H%j$N%U%#!<%k%I$N@k8@(B
%
%   (April '84 edition $B$N(B 231-232 $B%Z!<%8$K=R$Y$i$l$F$$$k(B) Scribe $B$H(B
%   $BF1$8$h$&$J$b$N$G$"$k$,!$(B(J)BibTeX $B$OL>A0$N=hM}5!G=$r;}$C$F$$$k$N$G!$(B
%   fullauthor $B$"$k$$$O(B editors $B%U%#!<%k%I$O$J$$!%(B
%   annote $B%U%#!<%k%I$OCm<aIU$-$NJ88%%j%9%H%9%?%$%k$r:n$k>l9g$K$O;H$o$l$k$,!$(B
%   $B$3$N%U%!%$%k$GDj5A$7$F$$$k%9%?%$%k$G$O;H$C$F$$$J$$$N$G!$%3%a%s%H%"%&%H(B
%   $B$5$l$F$$$k!%$3$3$K<($7$?%U%#!<%k%I$NB>$K!$AH$_9~$_$NJ88%%j%9%HFb;2>H(B
%   (CROSSREF)$B%U%#!<%k%I$b$"$k$,!$$3$l$K$D$$$F$O8e$G@bL@$9$k!%(B

ENTRY
% $B%U%#!<%k%I72(B:
% $B!!!!0J2<$N@bL@$G!I?7$?$JJ8$r3+;O$9$k!I$N$O#1J87A<0$G%U%)!<%^%C%H$7$J$$!$(B
% $B!!!!%9%?%$%k$N>l9g$K$N$_$"$F$O$^$k!%(B
  { address
%	$BDL>o$O=PHG<R!$5!4X$N=;=j$rF~$l$k!%FI<T$N0Y$K$J$k>l9g$K$N$_F~$l$k$3$H!%(B
%	$BNc$($P!$Bg$-$J=PHG<R$N>l9g$K$O>JN,$9$Y$-$G$"$k!%$7$+$7!$(BPROCEEDINGS
%	$B$^$?$O(B INPROCEEDINGS $B$N>l9g$K$O$3$3$K$O2q5D$N3+:ECO$r=q$/!%$3$N#2$D$N(B
%	$B%(%s%H%j$N7?$G$O!$=PHG<T!$5!4X$N=;=j$,I,MW$J$i!$(Bpublisher $B$+(B
%	organization $B%U%#!<%k%I$K4^$a$k$3$H!%(B
%    annote
%	$BD9$$Cm<a(B($BCm<aIU$-J88%%j%9%HMQ!$?7$?$JJ8$r3+;O$9$k(B)$B!%(B
    author
%	(J)BibTeX $B7A<0$G=q$$$?!$Cx<T$NL>A0(B
    booktitle
%	$B;2>H$5$l$F$$$k$N$,K\A4BN$G$J$$>l9g$K!$K\$NI=Bj$rF~$l$k!%K\A4It$r(B
%	$B;2>H$7$F$$$k>l9g$K$O!$$3$l$G$J$/(B title $B%U%#!<%k%I$r;H$&$3$H!%(B
    chapter
%	$B>O(B($B$"$k$$$O@a$J$I(B)$B$NHV9f!%(B
    edition
%	$BK\$NHG!$(B("Second" $B$J$I$N(B) $B=g=x?t$G$J$$$H$$$1$J$$!%(B
    editor
%	(J)BibTeX $B7A<0$G=q$$$?!$JT<T$NL>A0!%(Bauthor $B%U%#!<%k%I$b$"$k>l9g$K$O(B
%	$BCx:n$,H/I=$5$l$?K\$J$I$NJT<T$NL>A0$r=q$/!%(B
    howpublished
%	$B$3$N4qL/$JJ*$,$I$&$7$F=PHG$5$l$?$+!J?7$?$JJ8$r3+;O$9$k!K!%(B
    institution
%	$B%F%/%K%+%k%l%]!<%H$N%5%]!<%H5!4XL>(B
    journal
%	$BO@J8;o!$;(;o$NL>A0(B($B$$$/$D$+%^%/%m$,MQ0U$5$l$F$$$k(B)$B!%(B
    key
%	$B%"%k%U%!%Y%C%H=g$KJB$Y$k;~!$%i%Y%k$r:n$k;~!$J88%%j%9%HFb;2>H$N%-!<$H$7$F(B
%	$B;H$o$l$k!JCx<T!$JT<T$,$J$$$H$-$KI,MW$G$"$k!K!%(B
    month
%	$B7n(B($B%^%/%m$,MQ0U$5$l$F$$$k(B)$B!%(B
    note
%	$BFI<T$,;2>HJ88%$r8+$D$1$k$N$KLrN)$D>pJs!J?7$?$JJ8$r3+;O$9$k!K!%(B
    number
%	$BO@J8;o!$;(;o!$%F%/%K%+%k%l%]!<%H$NHV9f!$$"$k$$$O%7%j!<%:Cf$NHV9f!%(B
    organization
%	$B2q5D$N%9%]%s%5!<!J$"$k$$$O%^%K%e%"%k$N=PHG<R!K$N5!4XL>$G!$Cx<T!JJT<T!K$,(B
%	$B$J$$>l9g$G!$$3$N>pJs$+$i$G$O%i%Y%k$,4qL/$K$J$k>l9g!$$"$k$$$OJ88%%j%9%HFb(B%	$B;2>H$9$k>l9g$K$O!$E,Ev$J4J7i$J5!4XL>$r(B key $B%U%#!<%k%I$KF~$l$k$3$H!%(B
    pages
%	$B%Z!<%8HV9f!$%Z!<%8?t!$$"$k$$$O%Z!<%8HO0O!JHO0O$O(B `--'  $B$r;H$C$F!$(B
%	$BC1=c$JHO0O$G$O$J$$>l9g$K$O8e$m$K(B `+' $B$rIU$1$F<($9$3$H!K!%(B
    publisher
%	$B=PHG<R(B($B<gBN(B)$B$NL>A0!%(B
    school
%	$B3X9;(B($BBg3X(B)$B$NL>A0!J3X0LO@J8MQ!K!%(B
    series
%	$BJ#?t4,$+$i$J$kK\$N%7%j!<%:L>!$3F!9$NK\$O3F!9$NI=Bj$r;}$C$F$$$k$O$:!%(B
    title
%	$B;2>H$7$F$$$k$b$N$NI=Bj!%(B
    type
%	$B%F%/%K%+%k%l%]!<%H$N>l9g$K%G%#%U%)%k%H$G;H$o$l$k(B "Technical Report"
%	$B$NBe$o$j$NL>>N!JNc$($P(B "Research Note"$B!K!$$"$k$$$O3X0LO@J8$N<oN`!$(B
%	$B$"$k$$$OK\$N%Q!<%H$NL>A0!%(B
    volume
%	$BO@J8;o$J$I$N4,?t!$$"$k$$$OJ#?t4,$N=qJ*$N4,?t!%(B
    year
%	$BG/$O?t;z$@$1$G$J$$$H$$$1$J$$!J@55,2=$7$?8e$G$O!$#4$D$N?t;z$G=*$o$i$J$$(B
%	$B$H$$$1$J$$!%?7$?$JJ8$r3+;O$7$J$$!K!%(B
%	$B><OB(B53$B$H$+$r;H$C$F$b$+$^$o$J$$$,!$(Bjalpha $B$J$I$G@8@.$5$l$k%i%Y%k$,JQ$J(B
%	$B$b$N$K$J$k$3$H$,$"$k$N$GCm0U$9$k$3$H!%(B
    yomi
%	$BCx<T!$JT=8<TL>$N!VFI$_!W$r(Bauthor, editor$B$J$I$N=q<0$G(B
%	$B1Q8lIw$K=q$/!%$R$i$,$J$G=q$1$P0J30$G$O8^==2;=g$N(B
%	$B%=!<%H$b$G$-$k!%>\$7$/$O(B jbtxdoc.tex $B$r8+$h!%(B
  }

% $BF|K\8l$NJ88%$+$I$&$+$N%U%i%0(B
  {is.kanji.entry}

% $B0J2<$NJ8;z7?JQ?t$O0zMQ%i%Y%k$r:n@.$9$k$?$a$K;H$o$l$k!%%a%b%j$,B-$j$J$$(B
% $B>l9g$K$O!$(Bsort.label $B$O(B on the fly $B$K4JC1$K:n@.$G$-$k!%(B

#if LAB_ALPH
#if SORTED
  { label extra.label sort.label }
#else !SORTED

% $BJ8;zNs%i%Y%k$r;H$&>l9g$K!$0zMQ=g$KJB$Y$k$N$ONI$$$H$O;W$($J$$$,!$(B
% $B$=$N>l9g$K$O!$$A$g$C$HJL$N$d$jJ}$G%i%Y%k$r:n$i$J$/$F$O$J$i$J$$!%(B

  { label }
#endif SORTED
#else !LAB_ALPH
  { label }
#endif LAB_ALPH

% $B$=$l$>$l$N%(%s%H%j$N7?$KBP1~$7$?4X?t$O!$@h$:(B output.bibitem $B$r8F$s$G(B
% \bibitem $B$H$=$N0z?t$r(B .BBL $B%U%!%$%k$K=q$-=P$9!%<!$KMM!9$J%U%#!<%k%I$,(B
% $B%U%)!<%^%C%H$5$l(B output $B$+(B output.check $B$K$h$C$F=q$-=P$5$l$k!%$3$l$i$N(B
% $B=PNO4X?t$O6uJ8;zNs$,EO$5$l$F$$$J$$$3$H$r3NG'$7$J$,$i!$6h@Z$j5-9f!J%+%s%^!$(B
% $B%T%j%*%I!$%3%m%s!$(B\newblock$B!K$r=q$-=P$9=hM}$r9T$&!%:G8e$K(B fin.entry $B$,(B
% $B8F$P$l!$J8$N=*$o$j$N%T%j%*%I$r=q$-$@$7$F!$=hM}$,=*N;$9$k!%(B
%
% $B;29MJ88%$O$$$/$D$+$N%V%m%C%/$H$7$F%U%)!<%^%C%H$5$l$k!'(B
% open $B7A<0$G$O!$%V%m%C%/$O?7$7$$9T$r3+;O$7!$%V%m%C%/Cf$G$O%$%s%G%s%H$5$l$k!%(B
% $B%V%m%C%/Cf$K$OJ#?t$NJ8$,$"$C$F$h$$!J$H$O$$$C$F$bJ8K!E*$K$$$&J8$G$O$J$/!$(B
% $B%T%j%*%I$G=*$o$kC18lNs$G$O$"$k$,!K!%%(%s%H%j4X?t$O:G=i$N%V%m%C%/0J30$N(B
% $B%V%m%C%/$r=PNO$9$kA0$K$O(B new.block $B$r8F$P$M$P$J$i$J$$!%(B
% $B$^$??7$7$$J8$r3+;O$9$k>l9g$K$O(B new.sentence $B$r8F$P$M$P$J$i$J$$!%(B
% $B=PNO%k!<%A%s$O!$%T%j%*%I$,#2$DB3$$$?$j$7$J$$$h$&$K!$#2$D$N(B new.sentence
% $B$N4V$K$O!$6uJ8;zNs$G$J$$$b$N$,$"$k$3$H$r3NG'$9$kI,MW$,$"$k!%(B
% new.block $B$K$D$$$F$bF1$8$G$"$k!%(B
%
% $B=PNO%k!<%A%s$O$=$N0z?t$rD>$A$K=PNO$7$J$$!%$=$N$+$o$j$KDL>o$O(B
% $B%9%?%C%/$KCV$-!$(B($B6h@Z$j5-9f$H$7$F2?$,I,MW$+J,$+$C$?;~E@$G(B)$B<!$N(B
% $B=PNO%k!<%A%s$,=PNO$9$k!%=>$C$F=PNO%k!<%A%s$O%9%?%C%/>e$N%G!<%?$K(B
% $BI,MW$J6h@Z$j5-9f$rIU2C$7$F=q$-=P$9I,MW$,$"$k!%(B
%
% $B$I$N6h@Z$j5-9f$,I,MW$+$rH=Dj$9$k$?$a$K!$(Boutput.state $B$r;H$&!%(B
% $B$=$NCM$O0J2<$N$$$:$l$+!%(B
%	before.all		\bibitem $B$ND>8e(B
%	mid.sentence		$BJ8$NESCf!$8eB3$,$"$k>l9g$K$O%+%s%^$,I,MW(B
%	after.sentence		$BJ8$ND>8e!%%T%j%*%I$,I,MW(B
%	after.block		$B%V%m%C%/(B($BJ8(B)$B$ND>8e!%%T%j%*%I$H(B\newblock $B$,I,MW(B
%------------------------------------------------------------------------
%	after.author		$BCx<TL>$N8e(B(: $B$rIU$1$k$N$K;H$&(B)
%------------------------------------------------------------------------
%
%*****************************************************************************
%$BCm0U!'(B
%
%  $B0J2<$N%3%a%s%HCf$G=R$Y$i$l$F$$$k%"%k%4%j%:%`$O!$F|K\8lMQ$N%9%?%$%k%U%!%$%k(B
%  $B$N:n@.$N$?$a$K!$%3!<%I$N$_JQ99$7$?ItJ,$,$"$k$N$G!$<B:]$N%3!<%I$HI,$:$7$b(B
%  $BF1$8$b$N$G$O$J$$!%(B
%
%*****************************************************************************
%
% VAR: output.state : INTEGER		-- $B=PNO$N>uBVJQ?t(B
%
% output.nonnull $B4X?t$O!JEO$5$l$?J*$,6uJ8;zNs$G$J$$$H$7$F!K!$0z?t$r%9%?%C%/(B
% $B$KJ]B8$7!$J]B8$7$F$*$$$?J8;zNs$KI,MW$H$5$l$kE,Ev$J6h@Z$j5-9f$r8e$m$K(B
% $BIU2C$7$F=q$-=P$9!%%F%9%H$N=gHV$OIQEY=g$K$J$C$F$$$k!%(B
%
% $B#1J8$N7A$K$9$k>l9g(B(ONE_SENTENCE$B$,??$N>l9g(B)$B$K$O!$0J2<$H0[$J$k%"%k%4%j%:%`$G(B
% $B$"$k!%<B:]$N%3!<%I$r;2>H$N$3$H!*(B
%
% output.nonnull(s) ==
%  BEGIN
%	s := argument on stack
%	if output.state = mid.sentence then
%	    write$(pop() * ", ")
%		  -- "pop" $B$O4X?t$G$O$J$$!%%9%?%C%/%H%C%W$N%G!<%?$r;H$&!%(B
%	else
%	    if output.state = after.block then
%		write$(add.period$(pop()))
%		newline$
%		write$("\newblock ")
%	    else
%		if output.state = before.all then
%		    write$(pop())
%		else	    -- output.state $B$O(B after.sentence $B$N$O$:(B
%		    write$(add.period$(pop()) * " ")
%		fi
%	    fi
%	    output.state := mid.sentence
%	fi
%	push s on stack
%  END
%
% output $B$O(B $B0z?t$,6u$G$J$$$J$i!J0z?t$OL$Dj5A%U%#!<%k%I$+$b$7$l$J$$$N$G!$(B
% $BI,$:$7$bJ8;zNs$G$O$J$$!K!$(B output.nonnull $B$r8F$S=P$9!%(B
%
% output(s) ==
%  BEGIN
%	if not empty$(s) then output.nonnull(s)
%	fi
%  END
%
% output.check $B$O$[$H$s$I(B output $B4X?t$HF1$8$G$"$k$,!$I,MW$J%U%#!<%k%I$,(B
% $B$J$$$3$H$r%f!<%6!<$K7Y9p$9$k!%!J$3$l$O$=$N%U%#!<%k%I$N$J$$J88%>pJs$O(B
% $BNI$$$b$N$G$O$J$$$3$H$rCN$i$;$k$?$a!$$^$?$=$N%U%#!<%k%I$,$J$/$F$b!$=PNO$5$l$k(B
% $B%U%)!<%^%C%H7A<0$,$^$"$^$"$NJ*$K$J$k$h$&$K$9$k$?$a$G$"$k!K!%(B
%
% output.check(s,t) ==
%  BEGIN
%	if empty$(s) then
%	    warning$("empty " * t * " in " * cite$)
%	else output.nonnull(s)
%	fi
%  END
%
% output.bibitem $B4X?t$O8=:_$N%(%s%H%j$KBP$9$k(B \bibitem $B$r=q$-=P$7(B
%  ($B%i%Y%k$O4{$K$G$-$F$$$k$H2>Dj$9$k(B)$B!$>uBV$K1~$8$?6h@Z$j5-9f$r@_Dj$9$k!%(B
% $B=PNO$N5,Ls$K=>$C$?J8;zNs$r%9%?%C%/$K;D$9!%(B
%
% output.bibitem ==
%  BEGIN
%	newline$
%	write$("\bibitem[")	% $B0J2<#39T$OJ8;zNs%i%Y%kMQ(B
%	write$(label)		%
%	write$("]{")		%
%	write$("\bibitem{")	% $B$3$N9T$O?tCM%i%Y%k$N;~(B
%	write$(cite$)
%	write$("}")
%	push "" on stack
%	output.state := before.all
%  END
%
% fin.entry $B4X?t$O%9%?%C%/$K;D$C$F$$$kJ8;zNs$K%T%j%*%I$rIU2C$7!$%(%s%H%j$N(B
% $B=hM}$r=*$($k!%$b$7>uBV$,$^$@(B before.all $B$G$"$l$P$3$N%(%s%H%j$KBP$7$F$O2?$b(B
% $B=PNO$5$l$F$$$J$$$N$G!$7k2L$OJQ$J$b$N$K$J$k$,!$MxMQ<T$O$=$l$K5$$E$/!%(B
% $BJ88%$O0zMQ$5$l$F$$$k$N$G$"$k$+$i!$0zMQ%i%Y%k$r:n$k$?$a$K(B bibitem $B$O(B
% $BI,MW$G$"$k$+$i!$%(%s%H%j$r>JN,$7$?$j$7$J$$!%(B
%
% fin.entry ==
%  BEGIN
%	write$(add.period$(pop()))
%	newline$
%  END
%
% new.block $B4X?t$O=PNO$9$k?7$?$J%V%m%C%/$N=`Hw$r9T$$!$(B
% new.sentence $B$O?7$?$J%;%s%F%s%9$N=`Hw$r9T$&!%(B
%
% new.block ==
%  BEGIN
%	if output.state <> before.all then
%	    output.state := after.block
%	fi
%  END
%
% new.sentence ==
%  BEGIN
%	if output.state <> after.block then
%	    if output.state <> before.all then
%		output.state :=  after.sentence
%	    fi
%	fi
%  END
%
#if    ONE_SENTENCE
INTEGERS { output.state before.all mid.sentence after.sentence after.block
           after.author}
#else !ONE_SENTENCE
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
#endif ONE_SENTENCE

% $B0J2<$N#3$D$N4X?t$O(B AND, OR, NOT $B$N$?$a$N$b$N$G$"$k!%(B

FUNCTION {not}
{   { #0 }
    { #1 }
  if$
}

FUNCTION {and}
{   'skip$
    { pop$ #0 }
  if$
}

FUNCTION {or}
{   { pop$ #1 }
    'skip$
  if$
}

FUNCTION {init.state.consts}
{ #0 'before.all :=
  #1 'mid.sentence :=
  #2 'after.sentence :=
  #3 'after.block :=
#if    ONE_SENTENCE
  #4 'after.author :=
#endif ONE_SENTENCE
}

% s, t  $B$O:n6HMQ$NJ8;zNsJQ?t(B
STRINGS { s t }

% $BA43Q$N(B"$B!$(B","$B!%!I$r;H$&;~$N$?$a$N4X?t(B
% $B;29MJ88%$O%3%s%Q%/%H$KAH$_$?$$$N$G!$;d$O$3$l$O9%$-$G$O$J$$$,!$(B
% ASCII $BHG$N(B 0.98 $B$G$O$3$N5!G=$,$"$C$?$N$G!%(B

#if   ZENKAKU_PUN
FUNCTION {add.kanji.period}
{
  add.period$ duplicate$
  #-1 #1 substring$ "." =
    {#-2 global.max$ substring$ "$B!%(B" *}
    'skip$
  if$
}
#endif ZENKAKU_PUN

% $BA43Q$N%3%m%s$r;H$&>l9g$K$O$3$NDj5A$O$3$3$K$J$$$H$$$1$J$$!%(B
#if    ZENKAKU_COLON
FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}
#endif ZENKAKU_COLON

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
#if    ZENKAKU_PUN
    { is.kanji.entry
        { "$B!$(B" * write$ }
        { ", " * write$ }
      if$
    }
#else !ZENKAKU_PUN
    { ", " * write$ }
#endif ZENKAKU_PUN
    { output.state after.block =
	{ 
#if    ZENKAKU_PUN
	  is.kanji.entry
            {add.kanji.period write$}
            {add.period$ write$}
	  if$
#else !ZENKAKU_PUN
          add.period$ write$
#endif ZENKAKU_PUN
	  newline$
	  "\newblock " write$
	}
#if    ONE_SENTENCE
	{ output.state after.author =
#ifdef JIPSJ
	    { " " * write$
#else !JIPSJ
	    { author empty$ editor empty$ and organization empty$ and
		{write$}
#if    ZENKAKU_COLON
		{ author field.or.null is.kanji.str$ 
		  editor field.or.null is.kanji.str$ or
		  organization field.or.null is.kanji.str$ or
		    {"$B!'(B" * write$}
		    {": " * write$}
		  if$
		}
#else !ZENKAKU_COLON
		{": " * write$}
#endif ZENKAKU_COLON
	      if$
#endif JIPSJ
	      mid.sentence 'output.state :=
	    }
	    'write$
	  if$
	}
#else !ONE_SENTENCE
	{ output.state before.all =
	    'write$
#if    ZENKAKU_PUN
	    { is.kanji.entry
		{ add.kanji.period  write$ }
		{ add.period$ " " * write$ }
	      if$
	    }
#else !ZENKAKU_PUN
	    { add.period$ " " * write$ }
#endif ZENKAKU_PUN
	  if$
	}
#endif ONE_SENTENCE
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}

FUNCTION {output}
{ duplicate$ empty$
    'pop$
    'output.nonnull
  if$
}

FUNCTION {output.check}
{ 't :=
  duplicate$ empty$
    { pop$ "empty " t * " in " * cite$ * warning$ }
    'output.nonnull
  if$
}

FUNCTION {output.bibitem}
{ newline$
#if LAB_ALPH
  "\bibitem[" write$
  label write$
  "]{" write$
#else !LAB_ALPH
  "\bibitem{" write$
#endif LAB_ALPH
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

% $B$3$N4X?t$O%(%s%H%j$N=PNO$r=*$j$K$9$k(B

FUNCTION {fin.entry}
{ 
#if    ZENKAKU_PUN
  is.kanji.entry
    {add.kanji.period}
    {add.period$}
  if$
#else !ZENKAKU_PUN
  add.period$
#endif ZENKAKU_PUN
  write$
  newline$
}

FUNCTION {new.block}
{ output.state before.all =
#if    ONE_SENTENCE
    { after.author 'output.state := }
    'skip$
#else !ONE_SENTENCE
    'skip$
    { after.block 'output.state := }
#endif ONE_SENTENCE
  if$
}

FUNCTION {new.sentence}
{ output.state after.block =
    'skip$
    { output.state before.all =
	'skip$
	{ after.sentence 'output.state := }
      if$
    }
  if$
}

% $B;~$H$7$F!$%V%m%C%/$,==J,$KD9$$>l9g$K$N$_?7$?$J%V%m%C%/$r3+;O$7$J$$$H$$$1$J$$!%(B
% new.block.checka $B4X?t$O$=$N0z?t$,6u$G$J$$>l9g$K(B new.block $B$r<B9T$9$k!%(B
% new.block.checkb $B4X?t$O$=$N#2$D$N0z?t$,$I$A$i$b6u$K$J$$>l9g$K(B new.block $B$r(B
%		   $B<B9T$9$k!%(B

FUNCTION {new.block.checka}
{ empty$
    'skip$
    'new.block
  if$
}

FUNCTION {new.block.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.block
  if$
}

% new.sentence.check $B4X?t72$bF1$8$h$&$J$b$N(B

FUNCTION {new.sentence.checka}
{ empty$
    'skip$
    'new.sentence
  if$
}

FUNCTION {new.sentence.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.sentence
  if$
}

% $B%(%s%H%j$N%G!<%?72$r%U%)!<%^%C%H$9$k$?$a$N4X?t72(B
% $B$3$l$i$N4X?t72$G$O!$%+%s%^$"$k$$$O%T%j%*%I!J%T%j%*%I$N8e$K%T%j%*%I$,B3$$$?$j(B
% $B$7$J$$$h$&$K(B add.period$ $B$r;H$C$F!K$rIU$1$i$l$k$h$&$K!$J8;zNs$+6uJ8;zNs(B
% $B$r=PNO$9$k$3$H$r5,Ls$H$9$k!%(B
%
% $BLr$K$?$DJd=u4X?t(B field.or.null $B$O0z?t$,L$Dj5A%U%#!<%k%I!J%G!<%?%Y!<%9$+$i(B
% $B%G!<%?$rFI$s$@;~$KCM$N@_Dj$5$l$F$$$J$$%U%#!<%k%I!K$+$I$&$+!$$"$k$$$O(B
% $B6uGr0J30$NJ8;z$r4^$^$J$$J8;zNs$+$I$&$+$r%A%'%C%/$7!$$=$&$G$"$l$P6uJ8;zNs(B
% $B$rCM$H$7$FJV$9!%(B
% $B$3$N4X?t$N<g$?$kL\E*$O!J$=$l$@$1$G$O$J$$$,!K%9%?%C%/%H%C%W$K;D$C$F$$$k(B
% $BCM$,L$Dj5A%U%#!<%k%I$G$J$/!$J8;zNs$G$"$k$3$H$rJ]>Z$9$k$?$a$3$H$G$"$k!%(B
%
% field.or.null(s) ==
%  BEGIN
%	if empty$(s) then return ""
%	else return s
%  END
%
% $B$b$&#1$D$NJd=u4X?t(B emphasize $B$O0z?t$,6uJ8;zNs$G$J$1$l$P$=$l$K6/D4;XDj$r(B
% $BIU2C$7$?CM$rJV$9!%6uJ8;zNs$J$i6uJ8;zNs$rJV$9!%%$%?%j%C%/Jd@5$OIU2C$7$J$$(B
% $B$N$G!$6h@Z$j5-9f$,B3$/>l9g$K$N$_;H$&$3$H!%(B
%
% $B4A;z$r4^$`J8;zNs$N;~$K$O6/D4;XDj$rIU2C$7$J$$!%$^$?(B NO_EM $B$,Dj5A$5$l$F$$$l$P(B
% $B6/D4;XDj$rIU2C$7$J$$!%(B
%
% emphasize(s) ==
%  BEGIN
%	if empty$(s) then return ""
%	else
%          if is.kanji.str$(s) then return s
% #if    NO_EM
%          return s
% #else !NO_EM
%          else return "{\em " * s * "}"
% #endif NO_EM
%
% format.names $B4X?t$O!$4pK\E*$K$O(B((J)BibTeX $B$NL>A07A<0$G=q$+$l$?!K0z?t$r!$%+%s%^(B
% $B$G6h@Z$j$J$,$i!$$^$?:G8e$NL>A0$NA0$K$O(B and $B$rA0$KIU$1$F!J:G8e$,(B others $B$G(B
% $B$"$l$P(B et~al. $B$H$7$F(B and $B$rIU$1$:$K!(4A;zCx<TL>$N>l9g$K$O(B et~al. $B$G$O$J$/$F!$(B
%  "$B$[$+(B"$B$"$k$$$O(B"$BB>(B" $B$r;H$$!$%+%s%^$G6h@Z$k$@$1$G(B and $B$OIU$1$:$K!K!$(B
% "First Von Last, Junior" $B$N7A$K%U%)!<%^%C%H$9$k!%!JL>A0$N%U%)!<%^%C%H7A<0(B
% $B$N;XDj$K$h$C$F$O(B First $B$O>JN,7A$H$5$l$k$3$H$b$"$k!K!%(B
% $B0z?t$K$O:GDc#1$D$NL>A0$,$J$1$l$P$J$i$J$$!%(B
%
% $B0J2<$N%"%k%4%j%:%`$OF|K\8l$KBP1~$9$k!$?7$7$/F3F~$7$?%9%$%C%A!JJQ?t!K$KBP1~(B
% $B$9$k!$$?$a$K%3!<%IItJ,$,BgI}$K=q$-49$($i$l$F$$$k$N$G!$%3!<%I$H$OI,$:$7$b(B
% $B0lCW$7$F$$$J$$!%$7$+$74pK\E*$J=hM}$NN.$l$OJQ$o$C$F$$$J$$!%(B
%
% VAR: nameptr, namesleft, numnames: INTEGER
% pseudoVAR: nameresult: STRING		(it's what's accumulated on the stack)
%
% format.names(s) ==
%  BEGIN
%	nameptr := 1
%	numnames := num.names$(s)
%	namesleft := numnames
%	while namesleft > 0
%	  do
% $BL>A0$r%U%)!<%^%C%H$9$k7A<0$,Bg$-$/JQ99$5$l$F$$$k(B
%				% for full names:
%	    t := format.name$(s, nameptr, "{ff~}{vv~}{ll}{, jj}")
%				% for abbreviated first names:
%	    t := format.name$(s, nameptr, "{f.~}{vv~}{ll}{, jj}")
%
%	    if nameptr > 1 then
%		if namesleft > 1 then nameresult := nameresult * ", " * t
%		else if numnames > 2
%		       then nameresult := nameresult * ","
%		     fi
%            % $B$3$NItJ,$bBg$-$/JQ99$5$l$F$$$k(B
%            % $B4A;zCx<T$J$i(B and $B$rIU$1$J$$!$(B et~al. $B$G$J$/(B"$B$[$+(B/$BB>(B"$B$H$9$k!%(B
%		     if t = "others"
%		       then nameresult := nameresult * " et~al."
%		       else nameresult := nameresult * " and " * t
%		     fi
%		fi
%	    else nameresult := t
%	    fi
%	    nameptr := nameptr + 1
%	    namesleft := namesleft - 1
%	  od
%	return nameresult
%  END
%
% format.authors $B$O(B author $B$,$"$l$P(B format.names(author) $B$NCM$r!$$J$1$l$P(B
% $B6uJ8;zNs$rJV$9(B
%
% format.authors ==
%  BEGIN
%	if empty$(author) then return ""
%	else return format.names(author)
%	fi
%  END
%
% format.editors $B$O(B format.authors $B$HF1$8$G$"$k$,!$(B editor $B%U%#!<%k%I$r(B
% $B;H$$!$$^$?8e$m$K(B ed., eds. $B$J$I$rIU$1$k!%(B
%
% $BJT=8<T$r3g8L$KF~$l$k$J$I$N=hM}$,IU2C$5$l$F$$$k!%$^$?(Bed., eds. $B$J$I$N(B
% $B>JN,7A$r;H$&$H$+!$4A;zCx<T$N>l9g$K$O!JJT!K$K$9$k$H$+$NJQ99$b$J$5$l$F$$$k!%(B
%
% format.editors ==
%  BEGIN
%	if empty$(editor) then return ""
%	else
%	    if num.names$(editor) > 1 then
%		return format.names(editor) * ", editors"
%	    else
%		return format.names(editor) * ", editor"
%	    fi
%	fi
%  END
%
% $BB>$N%U%)!<%^%C%H4X?t$bF1$8$h$&$J$b$N$J$N$G!$%3%a%s%H%P!<%8%g%s$O<($5$J$$!%(B
%
% $B$3$N4X?t$NCf$N(B `pop$' $BL$Dj5ACM$r<h$j5n$j6uJ8;zNs$rJV$9$?$a$K!$(B
% `skip$' $B$O%3%T!<$7$?(B(duplicate$$B$7$?(B)$BCM$=$N$b$N$rJV$9$?$a$K;H$o$l$F$$$k!%(B

% $BA43Q$N%3%m%s$r;H$o$J$1$l$P!$$3$NDj5A$O$3$3$K$"$l$P$h$$!%(B
#if    !ZENKAKU_COLON
FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}
#endif !ZENKAKU_COLON

#if    NO_EM
FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}
#else  !NO_EM
FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { duplicate$ is.kanji.str$
	'skip$
	{ "{\em " swap$ * "}" * }
      if$
    }
  if$
}
#endif NO_EM

INTEGERS { nameptr namesleft numnames }

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
% $B$^$@L>A0$,;D$C$F$$$l$P(B
    { namesleft #0 > }
% $B@h$:8=:_CmL\$7$F$$$k=gHV$NL>A0$r%U%)!<%^%C%H$9$k!%(B
#if NAME_FULL
    { s nameptr "{ff}{ll}" format.name$ is.kanji.str$
	{s nameptr "{ff}{ll}" format.name$ 't :=}
 	{s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=}
      if$
#else !NAME_FULL
    { s nameptr "{ff}{ll}" format.name$ is.kanji.str$
#if    KANJI_FULL_NAME
	{s nameptr "{ff}{ll}" format.name$ 't :=}
#else !KANJI_FULL_NAME
 	{s nameptr "{ff}" format.name$ 't :=
 	  t empty$
 	    { s nameptr "{ll}" format.name$ 't :=
	      t " $B$K$O!$@+$HL>$N4V$K6uGr$,$J$$$h!)(B in " * cite$ * warning$
	    }
 	    'skip$
 	  if$
 	}
#endif KANJI_FULL_NAME
#if     FAMILY_FIRST
 	{s nameptr "{ll,~~}{vv~}{f.}{, jj}" format.name$ 't :=}
#else  !FAMILY_FIRST
#if     FIRST_FAMILY_FIRST
 	{ nameptr #1 =
 	    {s nameptr "{ll,~~}{vv~}{f.}{, jj}" format.name$ 't :=}
	    {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
	  if$
	}
#else  !FIRST_FAMILY_FIRST
 	{s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=}
#endif  FIRST_ERV
#endif FAMILY_FIRST
      if$
#endif NAME_FULL
% $BBh#2HVL\0J9_!)(B
      nameptr #1 >
% $BBh#2HVL\0J9_(B
% $B$^$@#2?M0J>e;D$C$F$$$k!)(B
	{ namesleft #1 >
%   $B$^$@#2?M0J>e;D$C$F$$$k(B
#if    ZENKAKU_PUN
	    { is.kanji.entry
		{"$B!$(B" * t * }
		{", " * t * }
	      if$
	    }
#else !ZENKAKU_PUN
	    {", " * t * }
#endif ZENKAKU_PUN
%   $B$b$&:G8e$N#1?M$@!*(B
%     $B:G8e$NL>A0$,(B others $B$+$J!)(B
#if    FAMILY_FIRST
	    { t "others" = t "others,~" = or
#else !FAMILY_FIRST
	    { t "others" =
#endif FAMILY_FIRST
%       $B$=$&$@!*(B
 		{ s is.kanji.str$
#if    USE_KANJI_HOKA
 			{"$BB>(B" * }
#else !USE_KANJI_HOKA
 			{"$B$[$+(B" * }
#endif USE_KANJI_HOKA
#if    SMALL_CAP
 			{"{\rm, et~al.}" * }
#else !SMALL_CAP
 			{", et~al." * }
#endif SMALL_CAP
 		  if$
 		}
%        others $B$G$J$$$>!*(B
 		{ s is.kanji.str$
#if    ZENKAKU_PUN
 		    {"$B!$(B" * t * }
#else !ZENKAKU_PUN
 		    {", " * t * }
#endif ZENKAKU_PUN
% Small caps $B$r;H$&>l9g$G$b(B and $B$O(B roman $B$G$J$$$H$$$1$J$$(B
#if    SMALL_CAP
#if    NO_COM_AND
 		    {"{\rm\ and }" * t * }
#else !NO_COM_AND
		    { numnames #2 =
 			{"{\rm\ and }" * t * }
 			{",{\rm\ and }" * t * }
		      if$
		    }
#endif NO_COM_AND
#else !SMALL_CAP
#if    NO_COM_AND
 		    {" and " * t * }
#else !NO_COM_AND
		    { numnames #2 =
 			{" and " * t * }
 			{", and " * t * }
		      if$
		    }
#endif NO_COM_AND
#endif SMALL_CAP
 		   if$
 		}
	      if$
	    }
	  if$
	}
% $B:G=i$NL>A0$@!*(B
	't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

FUNCTION {format.authors}
{ author empty$
    { "" }
% Small caps $B$N>l9g$K$O(B {\sc, } $B$G0O$`(B
#if    SMALL_CAP
    { "{\sc " author format.names * "}" * }
#else !SMALL_CAP
    { author format.names }
#endif SMALL_CAP
  if$
}

FUNCTION {format.editors}
{ editor empty$
    { "" }
#if    SMALL_CAP
    { "{\sc " editor format.names * "}" *
#else !SMALL_CAP
    { editor format.names
#endif SMALL_CAP
      editor num.names$ #1 >
 	{ editor is.kanji.str$
#if    ED_SHORT
% $BEE;R>pJsDL?.3X2qO@J8;o$G$O(B editor, editors $B$N7A<0$,0c$&!*(B
#ifdef TIEICE
 		{"$B!JJT!K(B" * } {" Eds." * } if$
#else !TIEICE
 		{"$B!JJT!K(B" * } {" eds." * } if$
#endif TIEICE
#else !ED_SHORT
 		{"$B!JJT!K(B" * } {", editors" * } if$
#endif ED_SHORT
 	}
 	{ editor is.kanji.str$
#if    ED_SHORT
#ifdef TIEICE
 		{"$B!JJT!K(B" *} {" Ed." * } if$
#else !TIEICE
 		{"$B!JJT!K(B" *} {" ed." * } if$
#endif !EIEIC
#else !ED_SHORT
 		{"$B!JJT!K(B" *} {", editor" * } if$
#endif ED_SHORT
 	}
      if$
    }
  if$
}

% $BJT=8<T$r3g8L$G$/$/$k>l9g(B
#if    ED_IN_PAR
FUNCTION {format.in.ed.editors}
{ editor empty$
    { "" }
    { editor format.names
      editor num.names$ #1 >
	{ editor is.kanji.str$
% $BEE;R>pJsDL?.3X2qO@J8;o$G$O(B editor, editors $B$N7A<0$,0c$&!*(B
#ifdef TIEICE
		{"$B!JJT!K(B" *} {"Eds.\ by " swap$ * } if$
#else !TIEICE
		{"$B!JJT!K(B" *} {"eds." swap$ * } if$
#endif TIEICE
	}
	{ editor is.kanji.str$
#ifdef TIEICE
		{"$B!JJT!K(B" *} {"Ed.\ by " swap$ *} if$
#else !TIEICE
		{"$B!JJT!K(B" *} {"ed." swap$ *} if$
#endif TIEICE
	}
      if$
    }
  if$
}

#endif ED_IN_PAR

% format.title $B4X?t$OK\$NCg4V$G$J$$$b$N$NI=Bj$r%U%)!<%^%C%H$9$k$N$K;H$o$l$k!%(B
% $BKX$I$N%9%?%$%k$G$O!J:G=i$NJ8;z$H%3%m%s$N8e!J%9%Z!<%9$,B3$$$F$$$k$+$b(B
% $B$7$l$J$$!K$N:G=i$NJ8;z$r=|$$$F!K!$JQ49$5$l$FM_$7$/$J$$BgJ8;z$OCf3g8L(B
%  `{', `{' $B$G0O$^$l$F$$$k$H4|BT$7$F!$%?%$%H%k$NBgJ8;z$r>.J8;z$KJQ49$9$k!%(B
% $B$$$/$D$+$N%9%?%$%k$G$O$3$NJQ49$O9T$o$:$K!$%G!<%?%Y!<%9Cf$N$^$^$H$9$k!%(B
%
% $BEE;R>pJsDL?.3X2q$N%9%?%$%k$G$O%?%$%H%k$r(B``''$B$G0O$`!%(B

FUNCTION {format.title}
% $B#1J87A<0$N>l9g$K$O%?%$%H%k$N=PNO>uBV$r(B after.author $B$K$7$F$+$i!$=hM}3+;O(B
#if    ONE_SENTENCE
{ after.author 'output.state :=
  title empty$
#else !ONE_SENTENCE
{ title empty$
#endif ONE_SENTENCE
    { "" }
#if ATIT_LOWER
#ifdef TIEICE
    { "``" title "t" change.case$ * "''" * }
#else !TIEICE
    { title "t" change.case$ }
#endif TIEICE
#else !ATIT_LOWER
    'title
#endif ATIT_LOWER
  if$
}

% $B%G%#%U%)%k%H$G(B (J)BibTeX $B$OBg0hJQ?t(B global.max$ $B$NCM$r(B (J)BibTeX $B$NDj?t$G$"$k(B
% glob_str_size $B$K@_Dj$9$k!%F1MM$K(B entry.max$ $B$NCM$r%(%s%H%j$NJ8;zNs$N:GBgD9$G(B
% $B$"$k(B ent_str_size $B$K@_Dj$9$k!%(B
% $B$=$s$J$3$H$O$J$$$H$O;W$&$,!$$3$l$rJQ99$7$F$b$h$$!%(B
%
% n.dashify $B4X?t$OJ8;zNsCf$N(B `-' $B$r(B `--' $B$KJQ49$9$k!%(B
%
% pseudoVAR: pageresult: STRING		(it's what's accumulated on the stack)
%
% n.dashify(s) ==
%  BEGIN
%	t := s
%	pageresult := ""
%	while (not empty$(t))
%	  do
%	    if (first character of t = "-")
%	      then
%		if (next character isn't)
%		  then
%		    pageresult := pageresult * "--"
%		    t := t with the "-" removed
%		  else
%		    while (first character of t = "-")
%		      do
%			pageresult := pageresult * "-"
%			t := t with the "-" removed
%		      od
%		fi
%	      else
%		pageresult := pageresult * the first character
%		t := t with the first character removed
%	    fi
%	  od
%	return pageresult
%  END

FUNCTION {n.dashify}
{ 't :=
  ""
    { t empty$ not }
    { t #1 #1 substring$ "-" =
	{ t #1 #2 substring$ "--" = not
	    { "--" *
	      t #2 global.max$ substring$ 't :=
	    }
	    {   { t #1 #1 substring$ "-" = }
		{ "-" *
		  t #2 global.max$ substring$ 't :=
		}
	      while$
	    }
	  if$
	}
	{ t #1 #1 substring$ is.kanji.str$
	  { t #1 #2 substring$ *
	    t #3 global.max$ substring$ 't :=
	  }

	  { t #1 #1 substring$ *
	    t #2 global.max$ substring$ 't :=
	  }
	  if$
	}
      if$
    }
  while$
}

% format.data $B4X?t$O7n$HG/$r%U%)!<%^%C%H$9$k$?$a$N$b$N$G$"$j!$7n$@$1$"$C$F!$(B
% $BG/$,$J$$>l9g$K$O7Y9p%a%C%;!<%8$r=P$7!$$I$A$i$b$J$1$l$P6uJ8;zNs$rJV$9!%(B
%
% $BJ88%$r(B1$BJ8$N7A<0$H$9$k>l9g$K$O86B'E*$K$OG/7n$O3g8L$KF~$l$k!%(B
% $B$^$?>pJs=hM}3X2q1QJ8O@J8;o0J30$N(B1$BJ87A<0$G$O7n$OI=<($7$J$$!%(B

FUNCTION {format.date}
#if    ONE_SENTENCE
{ before.all 'output.state :=
  year empty$
     { "there's no year in " cite$ * warning$
       ""
     }
% $B>pJs=hM}3X2q1QJ8O@J8;o$G$O3g8L$NCf$K(B month year $B$rJB$Y$k(B
#ifdef JIPSJ
     { month empty$
	{ " (" year * ")" *}
	{ " (" month * " " * year * ")" * }
       if$
     }
#else !JIPSJ
#if   YEAR_IN_PAR
     { " (" year * ")" * }
#else !YEAR_IN_PAR
#if  ZENKAKU_PUN
     { is.kanji.entry
	{"$B!$(B" year *  }
	{", " year *  }
       if$
     }
#else !ZENKAKU_PUN
     {", " year *  }
#endif ZENKAKU_PUN
#endif YEAR_IN_PAR
#endif JIPSJ
  if$
}
#else !ONE_SENTENCE
{ year empty$
    { month empty$
	{ "" }
	{ "there's a month but no year in " cite$ * warning$
	  month
	}
      if$
    }
    { month empty$
	'year
	{ month " " * year * }
      if$
    }
  if$
}
#endif ONE_SENTENCE

% format.btitle $B4X?t$OK\$NCg4V$N%(%s%H%j$NI=Bj$r%U%)!<%^%C%H$9$k!%BgJ8;z(B
% $B>.J8;z$O$=$N$^$^$K$7$F$*$-!$6/D4;XDj$rIU$1$k(B(NO_EM $B$,;XDj$5$l$F$$$l$P!$(B
% \em $B$OIU2C$5$l$J$$$3$H$K$J$C$F$$$k!K!%(B
%
% $BEE;R>pJsDL?.3X2qO@J8;o$G$O%?%$%H%k$OFs=E0zMQId$G0O$`(B

FUNCTION {format.btitle}
#if    ONE_SENTENCE
{after.author 'output.state :=
#ifdef TIEICE
"``" title * "''" *
#else !TIEICE
title emphasize
#endif TIEICE
}
#else !ONE_SENTENCE
{ title emphasize
}
#endif ONE_SENTENCE

% $B$$$/$D$+$N4X?t$G$O#2$D$NJ8;zNs$rO"7k$9$k;~$K!$8e$m$NJ8;zNs$,D9$$$b$N$G(B
% $B$J$$!J#3J8;zL$K~!K$N;~$K%?%$(B(~)$B$r4V$KF~$l$F!$$=$l$h$jD9$1$l$P!$6uGr$r(B
% $B4V$KF~$l$F!$O"7k$9$kI,MW$,$"$k!%O"7k7k2L$O%9%?%C%/$KCV$/!%(B
%
% \bibliography $B$G$O%T%j%*%I(B `.' $B$N8e$KM>J,$J6uGr$O$D$12C$($i$l$J$$$N$G!$(B
% \sfcode`\.=1000 $B$,;XDj$5$l$F$$$k$N$G!$>JN,7A$N8e$G$bC1$J$k6uGr$G$h$$!%(B
%
% tie.or.space.connect(str1,str2) ==
%    BEGIN
%	if text.length$(str2) < 3
%	  then return the concatenation of str1, "~", and str2
%	  else return the concatenation of str1, " ", and str2
%    END

FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
    { "~" }
    { " " }
  if$
  swap$ * *
}

% either.or.check $B4X?t$O$$$:$l$+0lJ}$7$+;H$($J$$%U%#!<%k%I$,N>J};H$o$l$F(B
% $B$$$?>l9g$KJ86g$r$$$&!%(B
%
% either.or.check(t,s) ==
%  BEGIN
%	if not empty$(s) then   --- $B%*%j%8%J%k$G$O(B not $B$,H4$1$F$$$?!J%P%0!K(B
%	    warning$(can't use both " * t * " fields in " * cite$)
%	fi
%  END

FUNCTION {either.or.check}
{ empty$
    'pop$
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  if$
}

% format.bvolume $B4X?t$O(B volume, $B$=$7$F$*$=$i$/$OJ#?t4,$+$i$J$k%7%j!<%:$N(B
% $B%7%j!<%:L>$r%U%)!<%^%C%H$9$k$?$a$K;H$o$l$k!%(Bvolume $B$H(B series $B$N%U%#!<%k%I$,(B
% $BN>J}$"$k>l9g$K$O!$(Bseries $B$O%7%j!<%:$NI=Bj$G$"$k(B($B;2>H$7$F$$$k4,$NI=Bj$O(B title
% $B$K=q$+$l$F$$$k!K$H2>Dj$7(B "of $B%7%j!<%:I=Bj(B" $B$rIU2C$9$k!%$3$N4X?t$OJ8$NESCf$G(B
% $B8F$P$l$k!%(B
%
% $BF|K\8l$N%9%?%$%k$G$O!$(Bvolume $B$G$J$/!$(B Vol. $B$r;H$&!%%7%j!<%:L>(B, Vol. $B$N(B
% $B7A<0$H$9$k!%(B

FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { volume is.kanji.str$
	{ volume }
	{ is.kanji.entry
	    {"$BBh(B" volume * "$B4,(B" *}
	    {"Vol." volume tie.or.space.connect}
	  if$
	}
      if$
      series empty$
	'skip$
	{ series is.kanji.str$
	    { volume empty$
		{series swap$ * }
#if    ZENKAKU_PUN
		{series "$B!$(B" * swap$ * }
#else !ZENKAKU_PUN
		{series ", " * swap$ * }
#endif ZENKAKU_PUN
	      if$
	    }
	    { " of " * series emphasize * }
	  if$
	}
      if$
      "volume and number" number either.or.check
    }
  if$
}

% format.number.series $B4X?t$O%7%j!<%:L>(B, $B$=$7$F$*$=$i$/$O%7%j!<%:Cf$G$NHV9f$r(B
% $B%U%)!<%^%C%H$9$k$?$a$K;H$o$l$k!%$3$l$O(B format.bvolume $B$K;w$F$$$k$,!$(B
% $B$3$N4X?t$G$O(B series $B$OB8:_$7!$(Bvolume $B$O$"$C$F$O$J$i$J$$(B(volume $B$,$"$l$P(B
% $B6uJ8;zNs$rJV$9(B)$B!%(Bnumber $B%U%#!<%k%I$,6u$G$"$l$P!$(Bseries $B$r$=$N$^$^=PNO$9$k(B
% ($B6u$+$bCN$l$J$$(B)$B!%(Bseries $B$K$O%7%j!<%:$NI=Bj$,F~$C$F$$$k(B(title $B%U%#!<%k%I$K(B
% $B;2>H$7$F$$$k$b$N$NI=Bj$,F~$C$F$$$k!K$H2>Dj$7$F!$(B"in <series>" $B$N7A$G=PNO$9$k!%(B
% $B$3$N4X?t$OJ8$N@hF,$G;H$o$l$k$N$G!$(B Number $B$N:G=i$OBgJ8;z$G$"$k!%(B
%
% $BF|K\8l$N%7%j!<%:I=Bj$J$i!$(B<series>, <number> $B$N7A$K$J$k!%(B
% $BF|K\8l$N%9%?%$%k$G$O(B number, Number $B$G$J$/!$(B No. $B$r;H$&$h$&$KJQ99$7$?!%(B

FUNCTION {format.number.series}
{ volume empty$
    { number empty$
	{ series field.or.null }
	{ number is.kanji.str$ 
	    { number }
	    {"No." number tie.or.space.connect}
	  if$
	  series empty$
	    { "there's a number but no series in " cite$ * warning$ }
	    { series is.kanji.str$
#if    ZENKAKU_PUN
	        { series "$B!$(B" * swap$ * }
#else !ZENKAKU_PUN
	        { series ", " * swap$ * }
#endif ZENKAKU_PUN
	        { " in " * series * }
	      if$
	    }
	  if$
	}
      if$
    }
    { "" }
  if$
}

% format.edition $B4X?t$O(B edition $B$,$"$l$P(B " edition " $BJ8;zNs$rIU2C$9$k!%(B
% $B$3$l$OJ8$N@hF,$G;H$o$l$J$$$N$G!$(Bedition $B$O>.J8;z$KJQ49$9$k!%(B
% $BF|K\8l$N(B edition $B$KBP$7$F$O(B " edition" $B$OIU2C$7$J$$!%(B

FUNCTION {format.edition}
{ edition empty$
    { "" }
    { edition is.kanji.str$
	{ edition }
        { is.kanji.entry
	    {"$BBh(B" edition * "$BHG(B" *}
	    { output.state mid.sentence =
	      { edition "l" change.case$ " edition" * }
	      { edition "t" change.case$ " edition" * }
              if$
	    }
	  if$
        }
      if$
    }
  if$
}

% format.pages $B4X?t$OK\$N%Z!<%8HO0O$r%U%)!<%^%C%H$9$k!J4u$KO@J8(B/$B5-;v$N%Z!<%8(B
% $BHO0O$N%U%)!<%^%C%H$K$b;H$o$l$k(B).
%
% multi.page.check $B4X?t$O(B "page/p." $B$+(B "pages/pp. " $B$N$I$A$i$r;H$&$N$,E,@Z$+(B
% $BH=CG$9$k$?$a$K(B page $B%U%#!<%k%I$K(B "-", ",", "+" $B$NJ8;z$,4^$^$l$F$$$k$+$I$&$+(B
% $BD4$Y$k!%F|K\8lMQ$N%9%?%$%k$G$O(B page/pages $B$NBe$o$j$K(B p./pp. $B$r;H$C$F$$$k!%(B
%
% $BCm0U!'$3$3$G;H$C$F$$$k(B global.max$ $B$OJ8;zNs$N;D$jA4It$H$$$&0UL#$G;H$C$F$$$k!%(B
%
% VAR: multiresult: INTEGER	(actually, a boolean)
%
% multi.page.check(s) ==
%  BEGIN
%	t := s
%	multiresult := false
%	while ((not multiresult) and (not empty$(t)))
%	  do
%	    if (first character of t = "-" or "," or "+")
%	      then multiresult := true
%	      else t := t with the first character removed
%	    fi
%	  od
%	return multiresult
%  END

INTEGERS { multiresult }

FUNCTION {multi.page.check}
{ 't :=
  #0 'multiresult :=
    { multiresult not
      t empty$ not
      and
    }
    { t #1 #1 substring$
      duplicate$ "-" =
      swap$ duplicate$ "," =
      swap$ "+" =
      or or
	{ #1 'multiresult := }
	{ t #2 global.max$ substring$ 't := }
      if$
    }
  while$
  multiresult
}

% $BF|K\8l$N%9%?%$%k$G$O86B'$H$7$F(B page/pages $B$G$J$/(B p./pp. $B$r;H$&!%(B
% $B>pJs=hM}3X2q1QJ8O@J8;o$G$O(B pp. $B$O>JN,$9$k!%(B

FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
#if    JIPSJ_LIKE
	{ " " pages n.dashify * }
	{ " " pages * }
#else !JIPSJ_LIKE
 	{ "pp." pages n.dashify tie.or.space.connect }
	{ "p." pages tie.or.space.connect }
#endif JIPSJ_LIKE
      if$
    }
  if$
}

% format.vol.num.pages $B4X?t$OO@J8;o!$;(;o$NO@J8!$5-;v$N(B volume, number,
% $B%Z!<%8HO0O$r%U%)!<%^%C%H$9$k!%$=$N7A<0$O%9%?%$%k$G0[$J$k$N$G!$%3!<%I$r(B
% $B;2>H$N$3$H!%(B
%
% $B!!>pJs=hM}3X2q1QJ8O@J8;o$G$O(B volume, number (year), pages $B$N7A$GJB$Y$k(B
% $B$^$?(B volume $B$O(B Vol.$B$rIU$1$:$K(B bold $B$G%?%$%W%;%C%H$9$k!%(B No. $B$bIU$1$J$$!%(B
% $B!!EE;R>pJsDL?.3X2qO@J8;o$G$O(B volume $B$O(B Vol.$B$rIU$1$:$K(B bold $B$G%?%$%W%;%C%H$7!$(B
% No. $B$bIU$1$J$$!%(B
% $B!!F|K\%*%Z%l!<%7%g%s%:%j%5!<%A3X2qO@J8;o$G$O!$>pJs=hM}3X2q1QJ8O@J8;o$H(B
% $BF1$8$h$&$J7A$G$"$k$,!$(Bvolume $B$r(B bold $B$G%?%$%W%;%C%H$;$:$K!$(B Vol. $B$r;H$&!%(B

#ifdef JABBRV

FUNCTION {format.vol.num.pages}
{ volume field.or.null
  number empty$
    'skip$
    { "(" number * ")" * *
      volume empty$
	{ "there's a number but no volume in " cite$ * warning$ }
	'skip$
      if$
    }
  if$
  pages empty$
    'skip$
    { duplicate$ empty$
	{ pop$ format.pages }
	{ ":" * pages n.dashify * }
      if$
    }
  if$
}

#else !JABBRV

#if    JIPSJ_LIKE
FUNCTION {format.vol.num.year.pages}
{ volume empty$
    {""}
#ifdef JORSJ
    { volume is.kanji.str$
	{ volume }
	{"Vol." volume tie.or.space.connect }
      if$
    }
#else !JORSJ
    {", {\bf " volume * "}" * }
#endif JORSJ
  if$
#ifndef JORSJ
  number empty$
    'skip$
    {", " number * * }
  if$
#endif
  year empty$
    { "there's no year in " cite$ * warning$ }
%
% JORSJ $B$G$O(B book $B$NCg4V$OG/$r3g8L$KF~$l$J$$$N$G!$O@J8$J$I$O$3$3$GG/$K(B
% $B3g8L$rIU$1$k(B
%
#ifdef JORSJ
    { " (" year * ")" * *}
#else !JORSJ
    { format.date *  }
#endif JORSJ
  if$
  pages empty$
    'skip$
    { duplicate$ empty$
	{ pop$ format.pages }
	{ ", " * pages n.dashify * }
      if$
    }
  if$
}

#else  !JIPSJ_LIKE
%
FUNCTION {format.vol.num.pages}
{ volume empty$
     {""}
#ifdef TIEICE
     {"{\bf " volume * "}, " * }
#else !TIEICE
#if    ZENKAKU_PUN
     { volume is.kanji.str$
	{ is.kanji.entry
	    {volume "$B!$(B" * }
	    {volume ", " * }
	  if$
	}
	{ is.kanji.entry
	    {"Vol." volume tie.or.space.connect "$B!$(B" * }
	    {"Vol." volume tie.or.space.connect ", " * }
	  if$
	}
     }
#else !ZENKAKU_PUN
     { volume is.kanji.str$
        {volume  ", " * }
        {"Vol." volume tie.or.space.connect ", " * }
       if$
     }
#endif ZENKAKU_PUN
#endif TIEICE
  if$
  number empty$
    'skip$
#ifdef TIEICE
    { number  *
#else !TIEICE
    { number is.kanji.str$
        {number *}
        {"No." number tie.or.space.connect *}
      if$
#endif TIEICE
      volume empty$
	{ "there's a number but no volume in " cite$ * warning$ }
	'skip$
      if$
    }
  if$
  pages empty$
    'skip$
    { duplicate$ empty$
	{ pop$ format.pages }
	{ number empty$
#if    ZENKAKU_PUN
  	    { format.pages * }
	    { is.kanji.entry
 		{ "$B!$(B" * format.pages * }
 		{ ", " * format.pages * }
	      if$
	    }
#else !ZENKAKU_PUN
 	    { format.pages * }
 	    { ", " * format.pages * }
#endif ZENKAKU_PUN
	  if$
	}
      if$
    }
  if$
}
#endif JIPSJ_LIKE

#endif JABBRV

% format.chapter.pages $B4X?t$O(B chapter $B$,6u$G$J$1$l$P!$$=$NA0$K(B type $B%U%#!<%k%I(B
% $B$NJ8;zNs!J$=$l$,6u$J$i(B "chapter"$B$r(B)$BIU2C$9$k!%(Bpages $B$,$"$l$P$=$l$r8e$m$K(B
% $B2C$($k!%?7$?$JJ8$r3+;O$7$?$j$7$J$$!%(B
%
% chapter $B$,F|K\8lJ8;zNs$N>l9g$K$O(B "chapter" $B$OIU2C$7$J$$!%(B

FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
	{ chapter is.kanji.str$
	    { "" }
	    { is.kanji.entry
		{"$B>O(B"}
		{"chapter"}
	      if$
	    }
	  if$
	}
	{ type "l" change.case$ }
      if$
      chapter is.kanji.str$ not is.kanji.entry and
          {"$BBh(B" chapter * swap$ *}
          { chapter is.kanji.str$
		{chapter *}
		{chapter tie.or.space.connect}
	    if$
	  }
      if$
      pages empty$
	'skip$
#if    ZENKAKU_PUN
	{ is.kanji.entry
	    { "$B!$(B" * format.pages * }
	    { ", " * format.pages * }
	  if$
	}
#else !ZENKAKU_PUN
	{ ", " * format.pages * }
#endif ZENKAKU_PUN
      if$
    }
  if$
}

% format.in.ed.booktitle $B4X?t$O!$(Beditor $B%U%#!<%k%I$,$"$l$P$=$l$rI=Bj$NA0$K(B
% $BCV$$$F!$(B"In <booktitle>" $B$N7A$G;O$^$kJ8$r3+;O$9$k$?$a$K;H$o$l$k!%(B
%
% $B>pJs=hM}3X2q1QJ8O@J8;o!$EE;R>pJsDL?.3X2qO@J8;o$J$I$G$O(B ED_IN_PAR $B$r(B 1 $B$K(B
% $B$7$F$*$/$3$H$G!$JT=8<TL>$O3g8L$KF~$l$k(B
% $BK\$N%?%$%H%k$,F|K\8l$J$i(B In$B!!$OIU$1$J$$!##1J87A<0$G%U%)!<%^%C%H$9$k>l9g$J$I$K(B
% In... $B$G$J$/(B in ... $B$N7A<0$H$9$k$K$O!$(BIN_LOWER $B$r(B 1 $B$K$7$F$*$/!%(B

#if    ED_IN_PAR
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
    { "" }
    { editor empty$
        { booktitle }
	{ booktitle " (" * format.in.ed.editors * ")" *  }
     if$
    }
  if$
}
#else !ED_IN_PAR
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
    { "" }
    { editor empty$
 	{ booktitle is.kanji.str$
 	    { " " booktitle emphasize * }
#if    IN_LOWER
 	    { "in " booktitle emphasize * }
#else !IN_LOWER
 	    { "In " booktitle emphasize * }
#endif IN_LOWER
 	  if$
 	}
 	{ booktitle is.kanji.str$
#if    ZENKAKU_PUN
 	    { " " format.editors * "$B!$(B" * booktitle * }
#else !ZENKAKU_PUN
 	    { " " format.editors * ", " * booktitle * }
#endif ZENKAKU_PUN
#if    IN_LOWER
 	    { "in " format.editors * ", " * booktitle emphasize * }
#else !IN_LOWER
 	    { "In " format.editors * ", " * booktitle emphasize * }
#endif IN_LOWER
 	  if$
 	}
      if$
    }
  if$
}
#endif ED_IN_PAR

% empty.misc.check $B4X?t$O%=!<%H$5$l$k;~!$J8;zNs%i%Y%k;H$&;~$K(B key $B%U%#!<%k%I$,(B
% $B6u$G$J$$$N$K!$#6$D$N%U%#!<%k%I$,A4It6u$J$iJ86g$r$$$&!%%=!<%H$5$l$J$$!$(B
% $B?tCM%i%Y%k$N;~$K$O#6$D$N%U%#!<%k%I$,A4It6u$J$iJ86g$r$$$&!%(B

FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
  month empty$ year empty$ note empty$
  and and and and and
#if SORTED
  key empty$ not and
#else !SORTED
#if LAB_ALPH
  key empty$ not and
#endif LAB_ALPH
#endif SORTED
    { "all relevant fields are empty in " cite$ * warning$ }
    'skip$
  if$
}

% format.thesis.type $B4X?t$O(B type $B%U%#!<%k%I$,6u$G$J$1$l$P(B($BBgJ8;z!$>.J8;zJQ49(B
% $B$7$?(B) type $B%U%#!<%k%I$NCM$r!$$=$&$G$J$1$l$P4{$K%9%?%C%/$K@Q$^$l$F$$$k(B
% ("Master's thesis" $B$d(B "PhD thesis"$B$J$I$N(B)$BJ8;zNs$rJV$9!%(B

FUNCTION {format.thesis.type}
{ type empty$
    'skip$
    { pop$
      type "t" change.case$
    }
  if$
}

% format.tr.number $B4X?t$O(B type $B$,6u$G$J$1$l$P$=$NCM$G!$6u$J$i(B "Technical Report"
% $B$G;O$^$j!$(Bnumber $B$,$"$l$P$=$l$,8e$KB3$/J8;zNs$rJV$9!%(B number $B$,$J$1$l$P(B
% $B@hF,$rBgJ8;z$K$7$?A0=R$NJ8;zNs$rJV$9!%J8$N@hF,$G;H$o$l$k!%(B

FUNCTION {format.tr.number}
{ type empty$
    { "Technical Report" }
    'type
  if$
  number empty$
    { "t" change.case$ }
    { number tie.or.space.connect }
  if$
}

% $B$5$FJ88%%j%9%HFb;2>HMQ$N4X?t$N@bL@$G$"$k!%$3$l$i$N4X?t$OJ88%%G!<%?%Y!<%9(B
% $BCf$N%(%s%H%j$G!$B>$N%(%s%H%j$N%G!<%?%Y!<%9%-!<$,(B crossref $B%U%#!<%k%I$K(B
% $B=q$+$l$F$$$k;~$K!$5/F0$5$l$k!%$3$N5!G=$K$h$C$FO@J8=8$J$I$NCf$NO@J8$+$i(B
% $BO@J8=8$J$I$r;2>H$9$k$3$H$,$G$-$k!%$3$N%U%!%$%kCf$N%9%?%$%k$G$O0J2<$N(B
% $B#5$D$N%1!<%9$,A[Dj$5$l$F$$$k!%(B
% (1) ARTICLE $B$,B>$N(B ARTICLE $B$r;2>H$7$F$$$k(B;(2) BOOK, (3) INBOOK, $B$"$k$$$O(B
% (4) INCOLLECTION $B$,B>$N(B BOOK $B$r;2>H$7$F$$$k(B;(5) INPROCEEDINGS $B$,(B PROCEEDINGS
% $B$r;2>H$7$F$$$k!%$=$l$>$l$K$D$$$F8e$G>\$7$/@bL@$9$k!%(B
%
% ARTICLE $B%(%s%H%j%?%$%W$OB>$N(B ARTICLE $B%(%s%H%j$rJ88%%j%9%HFb;2>H$7$F$b$h$$!%(B
% $B$3$l$OO@J8;o(B/$B;(;o$,$"$k#1$D$NOCBj$NFC=8$K$J$C$F$$$k;~$K!$(BJOURNAL $B%?%$%W$J$I(B
% $B$H$$$&$b$N$O$J$$$+$i!$$3$l$rCx<T!$I=Bj$N$J$$(B ARTICLE $B$H$7$F07$o$J$1$l$P$J$i(B
% $B$J$$$+$i$G$"$k!%$3$N;~$K$O$=$N(B journal $B$,;2>HJ88%%j%9%H$K4^$^$l$F$$$k>l9g$K!$(B
% $B7Y9p%a%C%;!<%8$,(B2$B$D=P$5$l$k!%$G$b@$$NCf$J$s$F$7$g$;$s$3$s$J$b$N$5!%(B
%
% "In" $B$G$J$/(B "in $B$K$9$k$H$+!$(B\em $B$rIU$1$J$$$h$&$K$9$k$H$+$G$-$k$h$&$K(B
% $B%3!<%I$OJQ99$5$l$F$*$j!$I,$:$7$b0J2<$N%"%k%4%j%:%`$H0lCW$7$J$$!%(B
%
% format.article.crossref ==
%  BEGIN
%	if empty$(key) then
%	    if empty$(journal) then
%		warning$("need key or journal for " * cite$ *
%						" to crossref " * crossref)
%		return(" \cite{" * crossref * "}")
%	    else
%		return("In " * emphazise.correct (journal) *
%						" \cite{" * crossref * "}")
%		fi
%	else
%	    return("In " * key * " \cite{" * crossref * "}")
%	fi
%  END
%
% $BB>$NJ88%%j%9%HFb;2>HMQ$N4X?t$bF1$8$h$&$J$b$N$J$N$G!$%3%a%s%H%P!<%8%g%s$O$J$$!%(B

FUNCTION {format.article.crossref}
{ key empty$
    { journal empty$
	{ "need key or journal for " cite$ * " to crossref " * crossref *
	  warning$
	  ""
	}
 	{ title is.kanji.str$
 	    { " " journal *  }
#if    IN_LOWER
#if    NO_EM
  	    { " " journal * }
#else !NO_EM
  	    { "in {\em " journal * "\/}" * }
#endif NO_EM
#else  !IN_LOWER
  	    { "In {\em " journal * "\/}" * }
#endif IN_LOWER
          if$
	}
      if$
    }
    { title is.kanji.str$
 	{ " " key * }
#if    IN_LOWER
  	{ "in " key * }
#else  !IN_LOWER
  	{ "In " key * }
#endif IN_LOWER
      if$
    }
  if$
  " \cite{" * crossref * "}" *
}

% $BJ88%%j%9%HFb;2>H$5$l$F$$$k$b$N$NJT<TL>$H$7$F$O@+$N$_$r!$JT<T$N?M?t$K(B
% $B1~$8$F!$(B"editor", "editor1 and editor2", "editor1 et~al." $B$N7A<0$GI=8=$9$k!%(B
%
% $BEE;R>pJsDL?.3X2qO@J8;o$G$O;2>H@h$NCx<TL>$b%U%k%M!<%`$G=PNO$9$k!%(B

FUNCTION {format.crossref.editor}
{ editor is.kanji.str$
#ifdef TIEICE
     {editor #1 "{ff}{ll}" format.name$ duplicate$
#else !TIEICE
     {editor #1 "{ff}" format.name$ duplicate$
#endif TIEICE
      empty$
 	{pop$ editor #1 "{ll}" format.name$}
 	'skip$
      if$
      }
#ifdef TIEICE
      {editor #1 "{f. }{vv~}{ll}{ , jj}" format.name$}
#else !TIEICE
      {editor #1 "{vv~}{ll}" format.name$}
#endif TIEICE
  if$
  editor num.names$ duplicate$
  #2 >
    { editor is.kanji.str$
#if    USE_KANJI_HOKA
	  {pop$ "$BB>(B" *} {pop$ ", et~al." * } if$
#else !USE_KANJI_HOKA
	  {pop$ "$B$[$+(B" *} {pop$ ", et~al." * } if$
#endif USE_KANJI_HOKA
    }
    { #2 <
	'skip$
#ifdef TIEICE
	{ editor #2 "{f. }{vv }{ll}{, jj}" format.name$ "others" =
#else !TIEICE
	{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
#endif TIEICE
 	    { editor is.kanji.str$
#if    USE_KANJI_HOKA
 		{"$BB>(B" *} {", et~al." * } if$
#else !USE_KANJI_HOKA
 		{"$B$[$+(B" *} {", et~al." * } if$
#endif USE_KANJI_HOKA
 	    }
 	    { editor is.kanji.str$
 		{
#if    ZENKAKU_PUN
		  "$B!$(B" *
#else !ZENKAKU_PUN
		  ", " *
#endif ZENKAKU_PUN
 		   editor #2 "{ff}" format.name$ duplicate$
 		   empty$
 			{pop$ editor #2 "{ll}" format.name$}
 			'skip$
 		   if$
 		 *
 		}
 		{" and " * editor #2 "{vv~}{ll}" format.name$ * }
 	      if$
 	    }
	  if$
	}
      if$
    }
  if$
}

% BOOK (INBOOK) $B%(%s%H%j7?$G$O(B($BJ#?t4,$+$i$J$k$b$N$N0lIt$G$"$k$H$7$F(B)$BB>$N(B
% BOOK($BJ#?t4,A4It(B) $B$rJ88%%j%9%HFb;2>H$7$F$b$h$$!%(B
% $BIaDL$O(B editor $B$,$"$k$+$i!$$=$N;~$O;2>H>pJs$K$=$l$r;H$&!%$J$1$l$P(B key
% $B%U%#!<%k%I$,6u$G$J$1$l$P(B key $B$r!$(Bkey $B$,6u$J$i(B($B%7%j!<%:$KJ#?t4,$NI=Bj$,F~$C$F(B
% $B$$$k$O$:$@$+$i(B) series $B%U%#!<%k%I$r;H$&!%(B

FUNCTION {format.book.crossref}
{ volume empty$
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
       title is.kanji.str$
#if    IN_LOWER
 	{"  "} {"in "} if$
#else !IN_LOER
 	{"  "} {"In "} if$
#endif IN_LOWER
    }
    { volume is.kanji.str$
	{ volume }
	{ is.kanji.entry
	    {"$BBh(B" volume * "$B4,(B" *}
	    {"Vol." volume tie.or.space.connect " of " *  }
	  if$
	}
      if$
    }
  if$
  editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
	{ series empty$
	    { "need editor, key, or series for " cite$ * " to crossref " *
	      crossref * warning$
	      "" *
	    }
#if    NO_EM
	    { series is.kanji.str$
#if    ZENKAKU_PUN
		{ series "$B!$(B" * swap$ * }
#else !ZENKAKU_PUN
		{ series ", " * swap$ * }
#endif ZENKAKU_PUN
	        { series * }
	      if$
	    }
#else !NO_EM
	    { series is.kanji.str$
#if    ZENKAKU_PUN
		{ series "$B!$(B" * swap$ * }
#else !ZENKAKU_PUN
		{ series ", " * swap$ * }
#endif ZENKAKU_PUN
	        { "{\em " * series * "\/}" * }
	      if$
	    }
#endif NO_EM
	  if$
	}
	{ key * }
      if$
    }
    { format.crossref.editor * }
  if$
  " \cite{" * crossref * "}" *
}

% INCOLLECTION $B%(%s%H%j7?$G$O(B BOOK ($BO@J8=8$G$"$k$H$7$F(B) $B$rJ88%%j%9%HFb;2>H$7$F(B
% $B$b$h$$!$$"$k$$$O(B INPROCEEDINGS $B$O(B PROCEEDING $B$rJ88%%j%9%HFb;2>H$7$F$b$h$$!%(B
% editor $B$,IaDL$O$"$k$+$i!$$=$l$r;2>H>pJs$H$7$F;H$&!%(Bkey $B%U%#!<%k%I$,6u$G$J$1(B
% $B$l$P(B key $B$r!$(Bkey $B$,6u$J$i(B($B$=$3$K;2>H$7$F$$$k$b$N$NI=Bj$,F~$C$F$$$k$O$:$@$+$i(B)
% booktitle $B%U%#!<%k%I$r;H$&!%(B

FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
	{ booktitle empty$
	    { "need editor, key, or booktitle for " cite$ * " to crossref " *
	      crossref * warning$
	      ""
	    }
 	    { booktitle is.kanji.str$
 		{ booktitle }
#if    IN_LOWER
#if    JISPJ_LIKE
 		{"in " booktitle * }
#else  !JIPSJ_LIKE
#if    NO_EM
 		{ booktitle }
#else !NO_EM
 		{"in {\em " booktitle * "\/}" * }
#endif NO_EM
#endif JIPSJ_LIKE
#else !IN_LOWER
 		{"In {\em " booktitle * "\/}" * }
#endif IN_LOWER
 	       if$
 	    }
	  if$
	}
#if    IN_LOWER
	{ "in " key * }
#else  !IN_LOWER
	{ "In " key * }
#endif IN_LOWER
      if$
    }
    { title is.kanji.str$
 	{" " format.crossref.editor * }
#if    IN_LOWER
 	{"in " format.crossref.editor * }
#else !IN_LOWER
 	{"In " format.crossref.editor * }
#endif IN_LOWER
      if$
    }
  if$
  " \cite{" * crossref * "}" *
}

% $B$3$3$+$i(B .BIB $B%U%!%$%kCf$K=q$+$l$k2DG=@-$N$"$k%(%s%H%j$N7?(B(ARTICLE $B$H$+(B
% BOOK $B$H$+(B)$BKh$K!$4X?t$rDj5A$9$k!%$3$l$i$N4X?t$,(B .BBL $B%U%!%$%k$K=PNO$r9T$&!%(B
% $B$3$l$i$N4X?t$NDj5A$O(B READ $B%3%^%s%I$h$jA0$K$J$1$l$P$J$i$J$$!%$5$i$K%9%?%$%k(B
% $B@_7W<T$H$7$F$O!$L$Dj5A$N7?MQ$K(B default.type $B$H$$$&4X?t$bDj5A$9$kI,MW$,$"$k!%(B
% $BCm0U(B: $B0J2<$G<($5$l$F$$$k%U%#!<%k%I$N=gHV$O(B(inbook, proceedings$B$GFC$K(B
%       $BCG$C$F$J$$8B$j(B)$B!$=PNO$5$l$k=gHV$KJB$s$G$$$k!%(B
%
% $B3X2q;o$N7A<0$K9g$o$;$F%3!<%I$,=$@5$5$l$F$$$k$N$G!$%"%k%4%j%:%`$H$OI,$:$7$b(B
% $B0lCW$7$J$$!%(B
%
% article $B4X?t$O(B ARTICLE $BMQ$G$"$j!$B>$N(B ARTICLE $B$rJ88%%j%9%HFb;2>H$7$F$h$$!%(B
%	$BI,?\(B: author, title, journal, year
%	$BG$0U(B: volume, number, pages, month, note
%
% article ==
%  BEGIN
%	output.bibitem
%	output.check(format.authors,"author")
%	new.block
%	output.check(format.title,"title")
%	new.block
%	if missing$(crossref) then
%	    output.check(emphasize(journal),"journal")
%	    output(format.vol.num.pages)
%	    output.check(format.date,"year")
%       else
%	    output.nonnull(format.article.crossref)
%	    output(format.pages)
%	fi
%	new.block
%	output(note)
%	fin.entry
%  END
%
% book $B4X?t$OK\A4BN$N;2>HMQ!%(BBOOK $B$G$OB>$N(B BOOK $B$rJ88%%j%9%HFb;2>H$7$F$h$$!%(B
%	$BI,?\(B: author or editor, title, publisher, year
%	$BG$0U(B: volume or number, series, address, edition, month, note
%             SHOW_BOOK_PAGES $B$,(B 1 $B$J$i!$(Bpages $B$bG$0U%U%#!<%k%I(B
%
% book ==
%  BEGIN
%	if empty$(author) then output.check(format.editors,"author and editor")
%	else	output.check(format.authors,"author")
%		if missing$(crossref) then
%		    either.or.check("author and editor",editor)
%		fi
%	fi
%	new.block
%	output.check(format.btitle,"title")
%	if missing$(crossref) then
%	    output(format.bvolume)
%	    new.block
%	    output(format.number.series)
%	    new.sentence
%	    output.check(publisher,"publisher")
%	    output(address)
%       else
%	    new.block
%	    output.nonnull(format.book.crossref)
%	fi
%	output(format.edition)
% #if    SHOW_BOOK_PAGES
%        output(pages)
% #endif SHOW_BOOK_PAGES
%	output.check(format.date,"year")
%	new.block
%	output(note)
%	fin.entry
%  END
%
% $BB>$N%(%s%H%j4X?t$bF1$8$h$&$JJ*$J$N$G!$%3%a%s%H%P!<%8%g%s$O$J$$!%(B
% $B>pJs=hM}3X2q1QJ8O@J8;o$G$O(B volume, number, year, pages $B$N=g$G=PNO$9$k!%(B

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { journal emphasize "journal" output.check
#if    JIPSJ_LIKE
      format.vol.num.year.pages output
#else !JIPSJ_LIKE
      format.vol.num.pages output
      format.date "year" output.check
#endif JIPSJ_LIKE
}
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
#ifdef TIEICE
  after.block 'output.state :=
#endif !TIEICE
  new.block
  note output
  fin.entry
}

#if    SHOW_BOOK_PAGES
FUNCTION {format.book.pages}
{ pages empty$
    { "" }
    { pages " pp." *}
  if$
}
#endif SHOW_BOOK_PAGES

FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
	{ "author and editor" editor either.or.check }
	'skip$
      if$
    }
  if$
  new.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      new.block
      format.number.series output
#if    ONE_SENTENCE
      new.block
#else  !ONE_SENTENCE
      new.sentence
#endif ONE_SENTENCE
      publisher "publisher" output.check
      address output
    }
    { new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
#if    SHOW_BOOK_PAGES
  format.book.pages output
#endif SHOW_BOOK_PAGES
  format.date "year" output.check
#ifdef TIEICE
  after.block 'output.state :=
#endif !TIEICE
  new.block
  note output
  fin.entry
}

% booklet $B$O@=K\$5$l$F$O$$$k$,!$=PHG<R!$%9%]%s%5!<5!4XL>$N$J$$$b$N(B
%	$BI,?\(B: title
%	$BG$0U(B: author, howpublished, address, month, year, note

FUNCTION {booklet}
{ output.bibitem
  format.authors output
  new.block
  format.title "title" output.check
  howpublished address new.block.checkb
  howpublished output
  address output
  format.date output
#ifdef TIEICE
  after.block 'output.state :=
#endif !TIEICE
  new.block
  note output
  fin.entry
}

% conference $B%?%$%W$K$D$$$F$O(B inproceedings $B$r;2>H$;$h!%(B

% inbook $B$OK\$N#1It(B($B>O!$@a(B and/or $B%Z!<%8HO0O(B)$B$r;2>H$9$k$?$a$N$b$N$G$"$j!$(B
% BOOK $B$rJ88%%j%9%HFb;2>H$7$F$$$F$b$h$$!%(B volume $B%U%#!<%k%I$,$J$$>l9g$K$O!$(B
% type $B%U%#!<%k%I$N>pJs$,(B number $B$d(B series $B$h$j$bA0$KJB$Y$i$l$k!%(B
%	$BI,?\(B: author or editor, title, chapter and/or pages, publisher,year
%	$BG$0U(B: volume or number, series, type, address, edition, month, note

FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
	{ "author and editor" editor either.or.check }
	'skip$
      if$
    }
  if$
  new.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
#if    !JIPSJ_LIKE
      format.chapter.pages "chapter and pages" output.check
#endif !JIPSJ_LIKE
      new.block
      format.number.series output
#if    ONE_SENTENCE
      new.block
#else !ONE_SENTENCE
      new.sentence
#endif ONE_SENTENCE
      publisher "publisher" output.check
      address output
    }
#if    JIPSJ_LIKE
    {
#else !JIPSJ_LIKE
    { format.chapter.pages "chapter and pages" output.check
#endif JIPSJ_LIKE
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
#if    JIPSJ_LIKE
      format.chapter.pages "chapter and pages" output.check
#endif JIPSJ_LIKE
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% INCOLLECTION $B$O(B INBOOK $B$HF1$8$h$&$J$b$N$G$O$"$k$,!$;2>H$7$F$$$k$b$N$,(B
% $B$=$l8GM-$NI=Bj$r;}$D$b$N$G$"$k(B($B$?$V$sA4BN$NJT<T$b$"$k(B)$B!%(B
% INCOLLECTION $B$O(B BOOK $B$rJ88%%j%9%HFb;2>H$7$F$b$h$$!%(B 
%	$BI,?\(B: author, title, booktitle, publisher, year
%	$BG$0U(B: editor, volume or number, series, type, chapter, pages,
%			address, edition, month, note

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
#if    !JIPSJ_LIKE
#ifndef TIEICE
      format.chapter.pages output
#endif  TIEICE
#endif !JIPSJ_LIKE
#if    ONE_SENTENCE
      new.block
#else !ONE_SENTENCE
      new.sentence
#endif ONE_SENTENCE
      publisher "publisher" output.check
      address output
      format.edition output
#ifdef TIEICE
      format.chapter.pages output
#endif TIEICE
      format.date "year" output.check
#if    JIPSJ_LIKE
      format.chapter.pages output
#endif JIPSJ_LIKE
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% INPROCEEDINGS $B$O2q5D$NO@J8(B/$BM=9F=8$K:\$C$F$$$kO@J8$G!$O@J8(B/$BM=9F=8$rJ88%%j%9%H(B
% $BFb;2>H$7$F$b$h$$!%(Baddress $B%U%#!<%k%I$,$J$1$l$P(B month (&year) $B$,(B note $B$ND>A0(B
% $BCV$+$l$k!%(B
%	$BI,?\(B: author, title, booktitle, year
%	$BG$0U(B: editor, volume or number, series, pages, address, month,
%	      organization, publisher, note

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
#if    JIPSJ_LIKE
      mid.sentence 'output.state :=
#else !JIPSJ_LIKE
#ifndef TIEICE
      format.pages output
#endif TIEICE
#endif JIPSJ_LIKE

#if    ONE_SENTENCE
      new.block
#endif ONE_SENTENCE
      address empty$
	{ organization publisher new.sentence.checkb
#if    ONE_SENTENCE
          new.block
#endif ONE_SENTENCE
	  organization output
#if    ONE_SENTENCE
#if    JIPSJ_LIKE
          new.block
	  mid.sentence 'output.state :=
#else !JIPSJ_LIKE
	  mid.sentence 'output.state :=
          new.block
#endif JIPSJ_LIKE
#endif ONE_SENTENCE
	  publisher output
#ifdef TIEICE
	  format.pages output
	  format.date "year" output.check
#else !TIEICE
	  format.date "year" output.check
#endif TIEICE
	}
	{ address output.nonnull
#ifndef TIEICE
	  format.date "year" output.check
#endif TIEICE
#if    ONE_SENTENCE
          new.block
#else !ONE_SENTENCE
	  new.sentence
#endif ONE_SENTENCE
	  organization output
#if    ONE_SENTENCE
	  mid.sentence 'output.state :=
          new.block
#endif ONE_SENTENCE
	  publisher output
#ifdef TIEICE
	  format.pages output
	  format.date "year" output.check
#endif TIEICE
	}
      if$
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% conference $B4X?t$O(B Scribe $B$H$N8_49@-$N$?$a$K$"$k!%(B

FUNCTION {conference} { inproceedings }

% manual $B$O%^%K%e%"%k!%(B
%	$BI,?\(B: title
%	$BG$0U(B: author, organization, address, edition, month, year, note

FUNCTION {manual}
{ output.bibitem
  author empty$
    { organization empty$
	'skip$
	{ organization output.nonnull
	  address output
	}
      if$
    }
    { format.authors output.nonnull }
  if$
  new.block
  format.btitle "title" output.check
  author empty$
    { organization empty$
	{ address new.block.checka
	  address output
	}
	'skip$
      if$
    }
    { organization address new.block.checkb
      organization output
      address output
    }
  if$
  format.edition output
  format.date output
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% mastersthesis $B$O=$;NO@J8(B
%	$BI,?\(B: author, title, school, year
%	$BG$0U(B: type, address, month, note

FUNCTION {mastersthesis}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  "Master's thesis" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% misc $B$OB>$N$I$l$K$b$"$F$O$^$i$J$$J*(B
%	$BI,?\(B: $BG$0U%U%#!<%k%I$N>/$J$/$H$b#1$D(B
%	$BG$0U(B: author, title, howpublished, month, year, note

FUNCTION {misc}
{ output.bibitem
  format.authors output
  title howpublished new.block.checkb
  format.title output
  howpublished new.block.checka
  howpublished output
  format.date output
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
  empty.misc.check
}

% phdthesis($BGn;NO@J8(B) $B$O(B mastersthesis $B$N$h$&$JJ*!%(B
%	$BI,?\(B: author, title, school, year
%	$BG$0U(B: type, address, month, note

FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.btitle "title" output.check
  new.block
  "PhD thesis" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% proceedings $B$O2q5D$NO@J8(B/$BM=9F=8$G$"$k!%(B
% organization $B%U%#!<%k%I$,$"$C$F!$(B editor $B%U%#!<%k%I$,$J$$;~$K$O!$(B
% organization $B%U%#!<%k%I$,G$0U%U%#!<%k%I$N:G=i$N$b$N$H$7$F;H$o$l$k(B
% ($B:G=i$N%V%m%C%/$r6u$K$O$7$J$$$h$&$K$9$k!K!%(B
% address $B%U%#!<%k%I$,$J$1$l$P!$(Bmonth (& year) $B$,(B note $B$ND>A0$KJB$V!%(B
%	$BI,?\(B: title, year
%	$BG$0U(B: editor, volume or number, series, address, month,
%	      organization, publisher, note

FUNCTION {proceedings}
{ output.bibitem
  editor empty$
    { organization output }
    { format.editors output.nonnull }
  if$
  new.block
  format.btitle "title" output.check
  format.bvolume output
  format.number.series output
  address empty$
    { editor empty$
	{ publisher new.sentence.checka }
	{ organization publisher new.sentence.checkb
	  organization output
	}
      if$
      publisher output
      format.date "year" output.check
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
    }
    { address output.nonnull
      format.date "year" output.check
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
#if    ONE_SENTENCE
      new.block
#else !ONE_SENTENCE
      new.sentence
#endif ONE_SENTENCE
      editor empty$
	'skip$
	{ organization output }
      if$
      publisher output
    }
  if$
  new.block
  note output
  fin.entry
}

% techreport $B$O%F%/%K%+%k%l%]!<%H(B
%	$BI,?\(B: author, title, institution, year
%	$BG$0U(B: type, number, address, month, note

FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  format.tr.number output.nonnull
  institution "institution" output.check
  address output
  format.date "year" output.check
#ifdef TIEICE
  after.block 'output.state :=
#endif TIEICE
  new.block
  note output
  fin.entry
}

% unpublished $B$O=PHG$5$l$F$$$J$$$b$N!%(B
%	$BI,?\(B: author, title, note
%	$BG$0U(B: month, year

FUNCTION {unpublished}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  note "note" output.check
  format.date output
  fin.entry
}

% $BJ,N`ITL@$N%(%s%H%j$KBP$7$F$O(B `misc' $B$r;H$&!%(B(J)BibTeX $B$O7Y9p$r=P$9!%(B

FUNCTION {default.type} { misc }

% $B%9%?%$%k$G0[$J$k$+$bCN$l$J$$$,!$0lHLE*$J%^%/%m$,0J2<$KJB$s$G$$$k!%(B
% $BMxMQ<T$O$3$l$i$N%^%/%m$r;H$&$N$,K>$^$7$$!%(B
%
% $B7n$NL>A0$O%U%k%9%Z%k$+>JN,7A$G=q$/!%(B

#if MONTH_FULL

MACRO {jan} {"January"}

MACRO {feb} {"February"}

MACRO {mar} {"March"}

MACRO {apr} {"April"}

MACRO {may} {"May"}

MACRO {jun} {"June"}

MACRO {jul} {"July"}

MACRO {aug} {"August"}

MACRO {sep} {"September"}

MACRO {oct} {"October"}

MACRO {nov} {"November"}

MACRO {dec} {"December"}

#else !MONTH_FULL

MACRO {jan} {"Jan."}

MACRO {feb} {"Feb."}

MACRO {mar} {"Mar."}

MACRO {apr} {"Apr."}

MACRO {may} {"May"}

MACRO {jun} {"June"}

MACRO {jul} {"July"}

MACRO {aug} {"Aug."}

MACRO {sep} {"Sept."}

MACRO {oct} {"Oct."}

MACRO {nov} {"Nov."}

MACRO {dec} {"Dec."}

#endif MONTH_FULL

% $BO@J8;oL>$O%U%k%9%Z%k$+>JN,7A$GI=<($9$k!%>JN,7A$O(B ACM $B$N=PHGJ*$K$"$k7A!%(B
% $B$3$l$H$^$C$?$/0c$&%;%C%H$N>JN,7A$r;H$&>l9g$K$O!$$=$NDj5A$N$_$+$i$J$k(B
% .bib $B%U%!%$%k$r:n$k$N$,0lHV$$$$$@$m$&!%$=$&$9$l$PMxMQ<T$O(B \bibliography
% $B%3%^%s%I$N#1HVL\$N0z?t$H$7$F$=$l$r;XDj$7$F!$$3$l$i$r<h$j9~$a$k!%(B

#if JOUR_FULL

MACRO {acmcs} {"ACM Computing Surveys"}

MACRO {acta} {"Acta Informatica"}

MACRO {cacm} {"Communications of the ACM"}

MACRO {ibmjrd} {"IBM Journal of Research and Development"}

MACRO {ibmsj} {"IBM Systems Journal"}

MACRO {ieeese} {"IEEE Transactions on Software Engineering"}

MACRO {ieeetc} {"IEEE Transactions on Computers"}

MACRO {ieeetcad}
 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}

MACRO {ipl} {"Information Processing Letters"}

MACRO {jacm} {"Journal of the ACM"}

MACRO {jcss} {"Journal of Computer and System Sciences"}

MACRO {scp} {"Science of Computer Programming"}

MACRO {sicomp} {"SIAM Journal on Computing"}

MACRO {tocs} {"ACM Transactions on Computer Systems"}

MACRO {tods} {"ACM Transactions on Database Systems"}

MACRO {tog} {"ACM Transactions on Graphics"}

MACRO {toms} {"ACM Transactions on Mathematical Software"}

MACRO {toois} {"ACM Transactions on Office Information Systems"}

MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}

MACRO {tcs} {"Theoretical Computer Science"}

MACRO {tieice} {"$BEE;R>pJsDL?.3X2qO@J8;o(B"}
MACRO {tipsj}  {"$B>pJs=hM}3X2qO@J8;o(B"}
MACRO {jipsj}  {"Journal of Informatin Processing Society of Japan"}
MACRO {jorsj}  {"Journal of the Operations Research Society of Japan"}

#else !JOUR_FULL

MACRO {acmcs} {"ACM Comput. Surv."}

MACRO {acta} {"Acta Inf."}

MACRO {cacm} {"Commun. ACM"}

MACRO {ibmjrd} {"IBM J. Res. Dev."}

MACRO {ibmsj} {"IBM Syst.~J."}

MACRO {ieeese} {"IEEE Trans. Softw. Eng."}

MACRO {ieeetc} {"IEEE Trans. Comput."}

MACRO {ieeetcad}
 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}

MACRO {ipl} {"Inf. Process. Lett."}

MACRO {jacm} {"J.~ACM"}

MACRO {jcss} {"J.~Comput. Syst. Sci."}

MACRO {scp} {"Sci. Comput. Programming"}

MACRO {sicomp} {"SIAM J. Comput."}

MACRO {tocs} {"ACM Trans. Comput. Syst."}

MACRO {tods} {"ACM Trans. Database Syst."}

MACRO {tog} {"ACM Trans. Gr."}

MACRO {toms} {"ACM Trans. Math. Softw."}

MACRO {toois} {"ACM Trans. Office Inf. Syst."}

MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}

MACRO {tcs} {"Theoretical Comput. Sci."}

MACRO {tieice} {"$B?.3XO@(B"}
MACRO {tipsj}  {"$B>pJs=hM}3X2qO@J8;o(B"}
MACRO {jipsj}  {"J.~Info. Proc. Soc. of Japan"}
MACRO {jorsj}  {"Journal of the O. R. Society of Japan"}

#endif JOUR_FULL

% .BBL $B%U%!%$%k$N%(%s%H%j$rFI$_9~$`(B

READ

% $BFI$_9~$^$l$?J88%$N%G!<%?$,4A;z$N$b$N$+$I$&$+%A%'%C%/$7$F%U%i%0$r@_Dj$9$k!%(B
% ASCII $BHG$N(B 0.98 $BMQ$N$b$N$r=$@5$7$?!%(B

FUNCTION {set.is.kanji.entry}
{
  author    field.or.null is.kanji.str$
  title     field.or.null is.kanji.str$ or
  editor    field.or.null is.kanji.str$ or
  journal   field.or.null is.kanji.str$ or
  booktitle field.or.null is.kanji.str$ or
  series    field.or.null is.kanji.str$ or
  'is.kanji.entry :=
}

ITERATE {set.is.kanji.entry}

% sortify $B4XAG$O0z?t$r(B purify$ $B$7$?8e$K>.J8;z$KJQ49$9$k!%%=!<%H$N$?$a!$(B
% $B$"$k$$$O%=!<%H8e$K%i%Y%k$r:n$k;~$K;H$o$l$k!%(B
%
% chop.word(w,len,s) $B$O(B s $B$=$N$b$N$+!$$"$k$$$O(B s $B$N:G=i$N(B len $BJ8;z$,(B w $B$H(B
% $BEy$7$1$l$P(B($B$3$NHf3S$O4X?t$NDj5A$N(B3$B9TL\$G9T$o$l$k(B w $B$h$j8e$m$N(B s $B$N(B
% $BItJ,J8;zNs$rJV$9(B

#if SORTED

FUNCTION {sortify}
{ purify$
  "l" change.case$
}

INTEGERS { len }

FUNCTION {chop.word}
{ 's :=
  'len :=
  s #1 len substring$ =
    { s len #1 + global.max$ substring$ }
    's
  if$
}

#else !SORTED
#if LAB_ALPH

% $B%=!<%H$5$l$J$$J8;zNs%i%Y%k$D$-J88%%j%9%HMQ$N(B chop.word
% $B$3$s$J$NC/$,;H$&$N!)(B

INTEGERS { len }

FUNCTION {chop.word}
{ 's :=
  'len :=
  s #1 len substring$ =
    { s len #1 + global.max$ substring$ }
    's
  if$
}

#endif LAB_ALPH
#endif SORTED

% $B0J2<$ND9$$%3%a%s%H$OJ8;zNs%i%Y%k$N>l9g$N$_$K$"$F$O$^$k!%(B
%
% format.lab.names $B4X?t$OL>A0$N(B von $B$H(B last $B%Q!<%H$NF,J8;z$r;H$C$FC;$$%i%Y%k(B
% $B$r:n$k(B($BL>A0$N?t$,#40J>e$N>l9g$K$O#3$D$G@Z$j!$(B"+" $B$r8*IU$-$G2C$($k!%L>A0$,(B
% $BJ#?t$"$j!$:G8e$,(B "others" $B$G$"$k>l9g$bF1MM$K(B "+" $B$rIU$1$k!K!%(B
% $BL>A0$,#1$D$7$+$J$/!$(Bvon $B$H(B last $B%Q!<%H$+$i$J$kL>A0%H!<%/%s$,#1$D$7$+$J$$$H!$(B
% ("Knuth" $B$O#1$D!$(B"Brinch Hansen"$B$O#2$D(B) $B@+(B(last name)$B$NF,#3J8;z$+$i%i%Y%k$r(B
% $B:n$k!%(Bet.al.char.used $B$OI,MW$K1~$8$F(B LaTeX $B%^%/%m$r=q$-=P$9$?$a$K!$(B"+" $B$,(B
% $B;H$o$l$?$+$I$&$+$rJ];}$9$kO@M}7?$NJQ?t$G$"$k!%(B
% 
% $B4A;zCx<TL>$N>l9g$K$O(B yomi $B%U%#!<%k%I$N>pJs$r;H$C$F>e$HF1MM$K%i%Y%k$r:n$k!%(B
% yomi $B%U%#!<%k%I$,$J$1$l$P!$Bh0lCx<T$N@+$N$_$+$i%i%Y%k$r:n$k!%(B
%
% format.lab.names(s) ==
%  BEGIN
%    if not empty$(yomi) then s := yomi fi
%    if is.kanji.str$(s) then return $BBh0lCx<T$N@+(B fi
%    else do
%	numnames := num.names$(s)
%	if numnames > 1 then
%	    if numnames > 4 then
%		namesleft := 3
%	    else
%		namesleft := numnames
%	    nameptr := 1
%	    nameresult := ""
%	    while namesleft > 0
%	      do
%		if (name_ptr = numnames) and
%		     format.name$(s, nameptr, "{ff }{vv }{ll}{ jj}") = "others"
%		   then nameresult := nameresult * "{\etalchar{+}}"
%			et.al.char.used := true
%		   else nameresult := nameresult *
%				format.name$(s, nameptr, "{v{}}{l{}}")
%		nameptr := nameptr + 1
%		namesleft := namesleft - 1
%	      od
%	    if numnames > 4 then
%		nameresult := nameresult * "{\etalchar{+}}"
%		et.al.char.used := true
%	else
%	    t := format.name$(s, 1, "{v{}}{l{}}")
%	    if text.length$(t) < 2 then	% there's just one name-token
%		nameresult := text.prefix$(format.name$(s,1,"{ll}"),3)
%	    else
%		nameresult := t
%	    fi
%	fi
%	return nameresult
%    od
%  END
%
% $B%i%Y%k$N<gMWItJ,$r:n$k;~$K$I$N%U%#!<%k%I$KCmL\$9$k$+$O%(%s%H%j$N7?$G0[$J$k!%(B
% $B$3$l$K$h$C$F!$$I$N7?$G$bF1$8>pJs$r;H$&(B($BNc$($P(B author, editor, key $B$N=g$K;H$&(B)
% $B>l9g$KHf$Y$F!$(BLaTeX book $B$G=R$Y$i$l$F$$$k!VL5;k$5$l$k!W%U%#!<%k%I$,K\Ev$K(B
% $B!VL5;k$G$-$k!W$h$&$K$J$C$F$$$k!%(BMISC $B$NH=Dj$O(B calc.label $B4X?tCf$N(B if $B$N(B
%  $B:G8e$N(B else $BIt$KCV$+$l$F$$$k$+$i!$%G!<%?%Y!<%9Cf$N@5$7$/$J$$%(%s%H%j7?$G$b(B
% $B$A$c$s$H=hM}$G$-$k$h$&$K$J$C$F$$$k!%(B
%
% $B%U%#!<%k%I$r8+$F$$$/=gHV$O#4$D$"$k$,!$$=$l$>$l$KBP1~$7$?Jd=u4X?t$,MQ0U$5$l$F(B
% $B$$$k!%:G=i$N4X?t$O@h$:(B author $B%U%#!<%k%I$rD4$Y!$I,MW$J>l9g$K$O(B key $B%U%#!<%k%I(B
% $B$rD4$Y$k!%B>$N#3$D$NJd=u4X?t$bF1$8$h$&$J$b$N$G$"$k$,!$:G=i$K#2$D$N%U%#!<%k%I(B
% $B$rD4$Y!$$=$N8e$K(B key $B%U%#!<%k%I$rD4$Y$k$h$&$K$J$C$F$$$?$j!$(Bkey $B%U%#!<%k%I(B
% $B$r(B organization $B%U%#!<%k%I$h$j@h$KD4$Y$k$h$&$J7A$K$J$C$F$$$k$N$b$"$k!%(B
% (key $B$,@h$J$N$O%i%Y%k$KBP$7$F$NOC$G!$%=!<%HMQ$N%i%Y%k$G$O$J$$$3$H$KCm0U!K!%(B
%
% calc.label $B4X?t$O0J2<$N$h$&$K$7$F%(%s%H%j$NM=HwE*$J%i%Y%k$r:n$k!%(B
% ($B$I$N%U%#!<%k%I$,6u$+$K$h$k$,!$$^$?(B organization $BCf$N(B "The"$B$OL5;k$9$k$,(B)
% author $B$"$k$$$O(B editor $B$"$k$$$O(B organization $B$+$i#3J8;z<h$j=P$7(B($B$3$l$i$,(B
% $B4A;z$N>l9g$K$O!$(Byomi $B%U%#!<%k%I$,6u$G$J$1$l$P(B yomi $B%U%#!<%k%I$r(B author,
% editor, organization $B$NBe$o$j$K;H$C$F#3J8;z<h$j=P$7!$6u$J$i$P#24A;z<h$j=P$7(B)
% $B$F:n$C$?$b$N$N8e$m$K(B year $B$N:G8e$N#2J8;z$rIU$12C$($k!%I,MW$J(B author, editor,
% organization, key $B$,$J$1$l$P%(%i!<$G$"$k$,!$$=$N>l9g$K$O(B citt$ $B$N:G=i$N(B
% $B#3J8;z$r;H$&!%(B 
%
% $BF@$i$l$k%i%Y%k$N(B year $BItJ,$K$O(B purify$ $B$,E,MQ$5$l$F$$$k$,!$(B name $BItJ,$K$O(B
% purify$ $B$OE,MQ$5$l$F$$$J$$!%(B(year $B$KBP$7$F(Bpurify$ $B$rE,MQ$9$k$N$G!$$3$l$rMxMQ(B
% $B$7$FMxMQ<T$O%=!<%H4X?t$r$@$^$7$F!$=gHV$r<+J,$NET9g$NNI$$$h$&$K$G$-$k!K!%(B
%
% $B$3$l$i$N4X?t$G$O%=!<%H$G;H$&%i%Y%k$b:n@.$9$k!%(B
%
% $B:G=*E*$J%i%Y%k$K$O6hJL$N$?$a$K(B 'a', 'b' $B$J$I$r8e$m$K$D$1$kI,MW$b$"$k$,!$(B
% $B$3$N(B extra.label $B$O%=!<%H$7$?8e$G:n$k!%(B
%
% calc.label ==
%  BEGIN
%	if type$ = "book" or "inbook" then
%	    author.editor.key.label
%	else if type$ = "proceedings" then
%	    editor.key.organization.label
%	else if type$ = "manual" then
%	    author.key.organization.label
%	else
%	    author.key.label
%	fi fi fi
%	label := label * substring$(purify$(field.or.null(year)), -1, 2)
%		% assuming we will also sort, we calculate a sort.label
%	sort.label := sortify(label), but use the last four, not two, digits
%  END

#if LAB_ALPH

INTEGERS { et.al.char.used }

FUNCTION {initialize.et.al.char.used}
{ #0 'et.al.char.used :=
}

EXECUTE {initialize.et.al.char.used}

FUNCTION {format.lab.names}
{ 's :=
% yomi $B%U%#!<%k%I$,6u$G$J$1$l$P$=$l$r;H$&(B
  yomi empty$
     'skip$
     { yomi 's :=}
  if$
#if   USE_FIRST_ONLY
%
% $BF|K\8lJ8;zNs$N>l9g$K$O!$Bh0lCx<T$N@+$N$_$H$9$k(B
%
  s  is.kanji.str$
    { s #1 "{ff}" format.name$ #4 text.prefix$ duplicate$ empty$
	{ pop$ s #1 "{ll}" format.name$ #4 text.prefix$
	  s #1 "{ll}" format.name$ " $B$K$O!$@+$HL>$N4V$K6uGr$,$J$$$h!)(B in " *
             cite$ * warning$
        }
	'skip$
     if$
    }
% $BF|K\8lJ8;zNs$G$J$$>l9g$N=hM}(B
    { s #1 "{ll}" format.name$ #3 text.prefix$ }
  if$
#else !USE_FIRST_ONLY
%
% $BF|K\8lJ8;zNs$N>l9g$K$O!$Bh0lCx<T$N@+$N$_$H$9$k(B
%
  s  is.kanji.str$
    { s #1 "{ff}" format.name$ #4 text.prefix$ duplicate$ empty$
	{pop$ s #1 "{ll}" format.name$ #4 text.prefix$}
	'skip$
     if$
    }
% $BF|K\8lJ8;zNs$G$J$$>l9g$N=hM}(B
    {
      s num.names$ 'numnames :=
      numnames #1 >
	{ numnames #4 >
	    { #3 'namesleft := }
	    { numnames 'namesleft := }
	  if$
	  #1 'nameptr :=
	  ""
	    { namesleft #0 > }
	    { nameptr numnames =
		{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
		    { "{\etalchar{+}}" *
		      #1 'et.al.char.used :=
		    }
		    { s nameptr "{v{}}{l{}}" format.name$ * }
		  if$
		}
		{ s nameptr "{v{}}{l{}}" format.name$ * }
	      if$
	      nameptr #1 + 'nameptr :=
	      namesleft #1 - 'namesleft :=
	    }
	  while$
	  numnames #4 >
	    { "{\etalchar{+}}" *
	      #1 'et.al.char.used :=
	    }
	    'skip$
	  if$
	}
	{ s #1 "{v{}}{l{}}" format.name$
	  duplicate$ text.length$ #2 <
	    { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
	     'skip$
	  if$
	}
      if$
    }
  if$
#endif USE_FIRST_ONLY
}


FUNCTION {author.key.label}
{ author empty$
    { key empty$
#if SORTED
	{ cite$ #1 #3 substring$ }
#else !SORTED		% $B8e$G$O7Y9p$r=P$5$J$$$+$i$3$3$G=P$7$F$*$/(B
	{ "for label, need author or key in " cite$ * warning$
	  cite$ #1 #3 substring$
	}
#endif SORTED
	{ key #3 text.prefix$ }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {author.editor.key.label}
{ author empty$
    { editor empty$
	{ key empty$
#if SORTED
	    { cite$ #1 #3 substring$ }
#else !SORTED		% $B8e$G$O7Y9p$r=P$5$J$$$+$i$3$3$G=P$7$F$*$/(B
	    { "for label, need author, editor, or key in " cite$ * warning$
	      cite #1 #3 substring$
	    }
#endif SORTED
	    { key #3 text.prefix$ }
	  if$
	}
	{ editor format.lab.names }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {author.key.organization.label}
{ author empty$
    { key empty$
	{ organization empty$
#if SORTED
	    { cite$ #1 #3 substring$ }
#else !SORTED		% $B8e$G$O7Y9p$r=P$5$J$$$+$i$3$3$G=P$7$F$*$/(B
	    { "for label, need author, key, or organization in " cite$ *
								warning$
	      cite #1 #3 substring$
	    }
#endif SORTED
	    { "The " #4 organization chop.word #3 text.prefix$ }
	  if$
	}
	{ key #3 text.prefix$ }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {editor.key.organization.label}
{ editor empty$
    { key empty$
	{ organization empty$
#if SORTED
	    { cite$ #1 #3 substring$ }
#else !SORTED		% $B8e$G$O7Y9p$r=P$5$J$$$+$i$3$3$G=P$7$F$*$/(B
	    { "for label, need editor, key, or organization in " cite$ *
								warning$
	      cite #1 #3 substring$
	    }
#endif SORTED
	    { "The " #4 organization chop.word #3 text.prefix$ }
	  if$
	}
	{ key #3 text.prefix$ }
      if$
    }
    { editor format.lab.names }
  if$
}

FUNCTION {calc.label}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.key.label
    { type$ "proceedings" =
	'editor.key.organization.label
	{ type$ "manual" =
	    'author.key.organization.label
	    'author.key.label
	  if$
	}
      if$
    }
  if$
  duplicate$
  year field.or.null purify$ #-1 #2 substring$
  *
  'label :=
  year field.or.null purify$ #-1 #4 substring$
  *
  sortify 'sort.label :=
}

% $BJ8;zNs%i%Y%k$r;H$&>l9g$K!$0zMQ=g$KJB$Y$k$N$ONI$$$H$O;W$($J$$$,!$(B
% $B$=$N>l9g$K$O!$$A$g$C$HJL$N$d$jJ}$G%i%Y%k$r:n$i$J$/$F$O$J$i$J$$!%(B

#if !SORTED

ITERATE {calc.label}

#endif !SORTED

#endif LAB_ALPH

% $B%=!<%F%#%s%0$G$O(B presort $B$r3F!9$N%(%s%H%j$KBP$7$F<B9T$9$k$3$H$G(B sortkey
% $B$r5a$a$k!%(Bpresort $B%-!<$K$OJ#?t$N%V%i%s%/$G6h@Z$i$l$?(B sortify $B$5$l$?(B
% $B$$$/$D$+$NJ8;zNs$,4^$^$l$k!%$3$l$K$h$C$F(B "brinch  per" $B$NJ}$,(B
% "brinch hansen  per" $B$h$jA0$K$J$k!%(B
%
% $B$3$3$G;H$o$l$F$$$k%U%#!<%k%I72$O0J2<$NDL$j!%J8;zNs%i%Y%k$N>l9g$K$O(B
% (calc.label $B$G5a$a$?(B) sort.label, $BB3$$$F%(%s%H%j$N7?$"$k$$$O2?$,7g$1$F$$$k$+(B
% $B$G0[$J$k$,!$Cx<TL>(B($BJT<T!$@hF,$N(B "The" $B$r=|$$$?5!4XL>$N$3$H$b$"$k(B)$B$^$?$O(B
% key $B%U%#!<%k%I!$<!$,G/!$$=$7$F(B($B@hF,$N(B "The ", "A ", or "An " $B$r=|$$$?(B)
% $BI=Bj$N0lItJ,$G$"$k!%(B.
% $BL>A0$O(B Von Last First Junior $B$N$h$&$K%U%)!<%^%C%H$5$l$k!%(B
% $BL>A0$NCGJR$O(B("brinch hansen")$B$N$h$&$K#1$D$N6uGr$G6h@Z$i$l!$L>A0$N9=@.MWAG$O(B
% (von $B$H@+$NItJ,$r=|$$$F(B)$B#2$D$N6uGr$G6h@Z$i$l!$J#?t$NL>A0$N4V$K$O#3$D$N6uGr(B
% $B$,A^F~$5$l!$L>A0$HG/(B($BJ8;zNs%i%Y%k$N>l9g$K$O%i%Y%k$HL>A0!K$N4V$K$O(B
% $B#4$D$N6uGr$,A^F~$5$l!$$^$?G/$HI=Bj$N4V$K$b#4$D$N6uGr$,A^F~$5$l$k!%(B
%
% sort.format.names $B4X?t$O(B (J)BibTeX $B$NL>A07A<0$G=q$+$l$?0z?t$r$H$j!$(B
% $B>e=R$N7A<0$N(B "  " $B$G6h@Z$i$l$?J8;zNs$rJV$9!%(B format.names$B$H$[$H$s$IF1$8!%(B
%
%
#if SORTED

FUNCTION {sort.format.names}
{ 's :=
%
% yomi $B%U%#!<%k%I$,6u$G$J$1$l$P$=$l$r;H$&(B
%
  yomi empty$
     'skip$
     { yomi 's := }
  if$
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { nameptr #1 >
	{ ", " * }
	'skip$
      if$
#if NAME_FULL
      s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
#else !NAME_FULL
      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
#endif NAME_FULL
      nameptr numnames = t "others" = and
 	{ s is.kanji.str$
#if    USE_KANJI_HOKA
 		{"$BB>(B" * }
#else !USE_KANJI_HOKA
 		{"$B$[$+(B" * }
#endif USE_KANJI_HOKA
 		{"et~al." *}
	  if$
 	}
	{ t sortify * }
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

% sort.format.title $B$O0z?t$+$i@hF,$N(B "A ", "An ", "The " $B$r<h$j=|$$$?(B
% $BJ8;zNs$rJV$9!%(B
% chop.word $B$,JQ?t(B s $B$r;H$C$F$$$k$N$G!$JL$NJ8;zNsJQ?t(B t $B$r;H$&!%(B

FUNCTION {sort.format.title}
{ 't :=
  "A " #2
    "An " #3
      "The " #4 t chop.word
    chop.word
  chop.word
  sortify
  #1 global.max$ substring$
}

% $B$3$3$N%=!<%H$NA0=hM}MQ$NJd=u4X?t72$O!$(Bcalc.label $B$N$b$N$HF1$8$h$&$J(B
% $B$b$N$G$"$k$,!$$3$3$G$O(B key $B%U%#!<%k%I$h$j(B organization $B%U%#!<%k%I$,M%@h(B
% $B$9$k!%$^$?%=!<%H$N$?$a$K(B organization $B%U%#!<%k%I$N@hF,$N(B "The "$B$O(B
% $B<h$j=|$/!%(B

FUNCTION {author.sort}
{ author empty$
    { key empty$
	{ "to sort, need author or key in " cite$ * warning$
	  ""
	}
	{ key sortify }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {author.editor.sort}
{ author empty$
    { editor empty$
	{ key empty$
	    { "to sort, need author, editor, or key in " cite$ * warning$
	      ""
	    }
	    { key sortify }
	  if$
	}
	{ editor sort.format.names }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {author.organization.sort}
{ author empty$
    { organization empty$
	{ key empty$
	    { "to sort, need author, organization, or key in " cite$ * warning$
	      ""
	    }
	    { key sortify }
	  if$
	}
	{ "The " #4 organization chop.word sortify }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {editor.organization.sort}
{ editor empty$
    { organization empty$
	{ key empty$
	    { "to sort, need editor, organization, or key in " cite$ * warning$
	      ""
	    }
	    { key sortify }
	  if$
	}
	{ "The " #4 organization chop.word sortify }
      if$
    }
    { editor sort.format.names }
  if$
}

% sort.key$ $B$J$I$N%(%s%H%j$NJ8;zNsJQ?t$ND9$5$K$O(B entry.max$ $B$N>e8B$,$"$k!%(B
% $B$=$3$G!$@8@.$9$k%-!<$ND9$5$r$=$l0JFb$H$9$k!%$=$l$@$1$ND9$5$,$"$l$P(B
% 1$B$D$7$+%^%C%A$9$k$3$H$O$J$$$H2>Dj$9$k!%(B

FUNCTION {presort}
#if LAB_ALPH
{ calc.label
  sort.label
  "    "
  *
  type$ "book" =
#else !LAB_ALPH
{ type$ "book" =
#endif LAB_ALPH
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
	'editor.organization.sort
	{ type$ "manual" =
	    'author.organization.sort
	    'author.sort
	  if$
	}
      if$
    }
  if$
#if LAB_ALPH
  *
#endif LAB_ALPH
  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

ITERATE {presort}

% $B%=!<%H$N=`Hw$O@0$C$?!%(B

SORT

#endif SORTED

% $B$3$NCm<a$O%=!<%H$5$l$?J8;zNs%i%Y%k$r:n$k;~$N$_$"$F$O$^$k!%(B
%
% $BJ8;zNs%i%Y%k$N:G=*%9%F!<%8$G$"$j!$I,MW$K1~$8$F(B 'a', 'b' $B$J$I$r(B
% $BIU2C$9$k!%(B2$B$D$N%Q%9$+$i$J$k!%(B 'b', 'c' $B$rIU2C$9$k$?$a$NA08~$-%Q%9$H!$(B
% 'a' $B$rIU2C$9$k$?$a$N8e8~$-%Q%9$+$i$J$k!%(B('b' $B$,$J$1$l$P(B'a'$B$OIU2C$9$k(B
% $BI,MW$O$J$$(B)
% "thebibliography"$B4D6-$N$?$a$K(B width$ $B$G7W$C$F:G$bD9$$%i%Y%k$r5a$a$F$*$/!%(B
%
% VAR: longest.label, last.sort.label, next.extra: string
%      longest.label.width, last.extra.num: integer
%
% initialize.longest.label ==
%  BEGIN
%	longest.label := ""
%	last.sort.label := int.to.chr$(0)
%	next.extra := ""
%	longest.label.width := 0
%	last.extra.num := 0
%  END
%
% forward.pass ==
%  BEGIN
%	if last.sort.label = sort.label then
%	    last.extra.num := last.extra.num + 1
%	    extra.label := int.to.chr$(last.extra.num)
%	else
%	    last.extra.num := chr.to.int$("a")
%	    extra.label := ""
%	    last.sort.label := sort.label
%	fi
%  END
%
% reverse.pass ==
%  BEGIN
%	if next.extra = "b" then
%	    extra.label := "a"
%	fi
%	label := label * extra.label
%	if width$(label) > longest.label.width then
%	    longest.label := label
%	    longest.label.width := width$(label)
%	fi
%	next.extra := extra.label
%  END

#if LAB_ALPH

#if SORTED

STRINGS { longest.label last.sort.label next.extra }

INTEGERS { longest.label.width last.extra.num }

FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
  #0 int.to.chr$ 'last.sort.label :=
  "" 'next.extra :=
  #0 'longest.label.width :=
  #0 'last.extra.num :=
}

FUNCTION {forward.pass}
{ last.sort.label sort.label =
    { last.extra.num #1 + 'last.extra.num :=
      last.extra.num int.to.chr$ 'extra.label :=
    }
    { "a" chr.to.int$ 'last.extra.num :=
      "" 'extra.label :=
      sort.label 'last.sort.label :=
    }
  if$
}

FUNCTION {reverse.pass}
{ next.extra "b" =
    { "a" 'extra.label := }
    'skip$
  if$
  label extra.label * 'label :=
  label width$ longest.label.width >
    { label 'longest.label :=
      label width$ 'longest.label.width :=
    }
    'skip$
  if$
  extra.label 'next.extra :=
}

EXECUTE {initialize.longest.label}

ITERATE {forward.pass}

REVERSE {reverse.pass}

#else !SORTED

% $BJ8;zNs%i%Y%k$r;H$&;~$K$O!V0zMQ=g!W$N;29MJ88%%j%9%H$H$9$k$N$O(B
% $B$"$^$jNI$/$J$$!%$7$+$7$=$N>l9g$KHw$($F:G$bD9$$%i%Y%k$r5a$a$F$*$/!%(B

STRINGS { longest.label }

INTEGERS { longest.label.width }

FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
  #0 'longest.label.width :=
}

FUNCTION {longest.label.pass}
{ label width$ longest.label.width >
    { label 'longest.label :=
      label width$ 'longest.label.width :=
    }
    'skip$
  if$
}

EXECUTE {initialize.longest.label}

ITERATE {longest.label.pass}

#endif SORTED

#else !LAB_ALPH


% $B?t;z%i%Y%k$r5a$a$k!%%=!<%H$5$l$?=gHV!$$"$k$$$O85$N=gHV$G=hM}$9$k!%(B
% "thebibliography" environment $B$GI,MW$J>pJs$G$"$k!$(B
% width$ $B$G7W$C$F:G$bD9$$%i%Y%k$bF1;~$K5a$a$F$*$/!%(B

STRINGS { longest.label }

INTEGERS { number.label longest.label.width }

FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
  #1 'number.label :=
  #0 'longest.label.width :=
}

FUNCTION {longest.label.pass}
{ number.label int.to.str$ 'label :=
  number.label #1 + 'number.label :=
  label width$ longest.label.width >
    { label 'longest.label :=
      label width$ 'longest.label.width :=
    }
    'skip$
  if$
}

EXECUTE {initialize.longest.label}

ITERATE {longest.label.pass}

#endif LAB_ALPH

% .BBL $B%U%!%$%k$K=q$-=P$9=`Hw$,@0$C$?!%(B
% $B@h$:J8;zNs%i%Y%k$G>JN,$5$l$?L>A0$r<($9$N$K;H$&(B LaTeX $B%^%/%m$rI,MW$K(B
% $B1~$8$F=q$-$@$7!$<!$K%G!<%?%Y!<%9Cf$N(B `preamble' $B%3%^%s%I$NCf?H$r=q$-=P$9!%(B
% $B$=$7$F(B
%     \begin{thebibliography}{...}
% $B$r=q$-=P$9!%$3$3$G(B `...'$B$O(B width$ $B$G7W;;$7$F:G$bD9$$%i%Y%k$G$"$k!%(B

FUNCTION {begin.bib}
#if LAB_ALPH
{ et.al.char.used
    { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
    'skip$
  if$
  preamble$ empty$
#else !LAB_ALPH
{ preamble$ empty$
#endif LAB_ALPH
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

% $BA4$F$N%(%s%H%j$r=PNO$9$k!%(B

ITERATE {call.type$}

% $B:G8e$K(B `\end{thebibliography}' $B%3%^%s%I$r=q$-=P$7$F$*$7$^$$!*(B

FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}

EXECUTE {end.bib}