summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/camel/camel.dtx
blob: a780437cb706a4cd4255446c030af5950e509ad1 (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
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\usepackage{camel}
\usepackage{array}
\pagenumbering{roman}

\def\fileversion{1.0t}
\def\filedate{97/02/17}

%\EnableCrossrefs         
\DisableCrossrefs         % Say \DisableCrossrefs if index is ready
\RecordChanges              % Gather update information
\CodelineIndex             % Index code by line number
%\OnlyDescription            % comment out for implementation details
\begin{document}
\citationstyle{law}
\citationdata{camel}
\title{User's Guide to the {\sc Camel} Citator\thanks{%
    This file is version number \fileversion{}.  The
    documentation was last revised on \filedate.}}
\author{Frank G. Bennett, Jr.\thanks{The text and source code
    contained in this file are \copyright~1992--1995 by Frank G.
    Bennett, Jr.  This file can be freely distributed; the sole
    condition of use is that acknowledgement to the author be
    made in any published work produced using {\sc Camel}.  The
    author wishes to thank Pedro Aphalo, Steve Bellovin, George
    Greenwade and Boris Pevzner and David Rhead for their helpful
    comments on versions of \LexiTeX, the predecessor to {\sc
      Camel}.  In addition, David Rhead provided a mass of
    information on bibliographic conventions, which was used in
    shaping the options supported by this package.  Gratitude is
    also owed to Marcia Elliot and Yoshiko Makino, LL.B.
    finalists in the Law Department of the School of Oriental and
    African Studies in 1993 and 1994 respectively, who prepared
    extended essays using early releases of \LexiTeX.}}
 \maketitle
 \DocInput{camel.dtx}
\end{document}
%</driver>
% \fi
% \CheckSum{3488}
%
%\iffalse
%
% Copyright (C) 1992-1995 by Frank Bennett.  All rights reserved.
%
% IMPORTANT NOTICE:
% 
% You are not allowed to change this file.  You may however copy
% this file to a file with a different name and then change the
% copy if (a) you do not charge for the modified code, (b) you
% acknowledge Camel and its author(s) in the new file, if it
% is distributed to others, and (c) you attach these same
% conditions to the new file.
% 
% You are not allowed to distribute this file alone.  You are not
% allowed to take money for the distribution or use of this file
% (or a changed version) except for a nominal charge for copying
% etc.
% 
% You are allowed to distribute this file under the condition that
% it is distributed with all of its contents, intact.
% 
% For error reports, or offers to help make Camel a more powerful,
% friendlier, and altogether more thrilling package, please contact me on
% fb@soas.ac.uk
% 
%\fi
%
%
% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
% \DoNotIndex{\@flushglue,\@gobble,\@input}
% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
% \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
% \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
% \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
% \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
% \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
% \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
% \DoNotIndex{\cal,\csname,\def,\documentstyle,\dospecials,\edef}
% \DoNotIndex{\egroup}
% \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
% \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
% \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
% \DoNotIndex{\ifcase}
% \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
% \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
% \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
% \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
% \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
% \DoNotIndex{\strutbox}
% \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
% \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
% \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
% \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
% \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
% \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
% \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
% \DoNotIndex{\nopagebreak}
% \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
% \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
% \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
% \DoNotIndex{\[,\{,\},\]}
% \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
% \DoNotIndex{\baselineskip,\begin,\tw@}
% \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
% \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
% \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
% \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
% \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
% \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
% \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
% \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
% \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
% \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
% \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
% \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
% \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
% \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
% \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
% \DoNotIndex{\bfdefault}
% \setcounter{StandardModuleDepth}{1}
% \MakeShortVerb{\"}
%
%
% \def\bs{\char`\\}
% \begin{abstract}
% \noindent This is the core 
% documentation for {\sc Camel}, a \LaTeX{} macro package
% that drastically simplifies the typesetting of
% citations and bibliographies in a wide variety of styles and formats.
% {\sc Camel} is similar in look and feel to standard \BibTeX{},
% but introduces a number of long-desired enhancements. 
% When the document is printed,
% {\sc Camel} allows the generation of 
% subdivided bibliographies,
% separate bibliographies for each subdivision
% of a larger work, in-footnote cross-referenced
% citations, bibliographies indexed to the pages where
% citations to the relevant work occur, and much else.  This is
% the only fully supported bibliography package for \LaTeX{} that
% provides full support for legal citations.
% The package also provides genuinely helpful error messages
% and an extremely simple syntax for adding details like page
% numbers and the like to citation tags.
% {\sc Camel} provides the logical engine and
% skeleton macros that make these things possible;
% a separate style package is required to actually typeset documents.
%  For an example of a working style 
% package, see {\tt law.dtx} in the {\tt camel}
% subdirectory on CTAN.
% \end{abstract}
%
% 
% \tableofcontents
% \newpage
% 
% 
% 
% \bigskip
% \forcefootnotes
% \hfill {``Now comes the fun part.''}\par
% \smallskip
% {\hfill ---Donald Knuth}\source{knuth}[176].%
% 
% \bigskip
%
% \section*{Preface to release 1.0}
% Welcome to {\sc Camel}, a comprehensive bibliography
% manager developed as a prototype citation engine
% for the \LaTeX3 project.
% The {\sc Camel} engine offers a highly flexible
% yet straightforward syntax for entering citation
% keys into a \LaTeX{} document.  The {\sc Camel} engine
% is designed to support a wide range of 
% citation styles.  Documents prepared
% for {\sc Camel} can be converted into virtually any
% supported bibliography or citation style, usually by editing only
% a few toggles at the top of the document.\footnote{This is
% potentially exciting (he said), but as of this writing only one
% module --- {\tt law.dtx}, the legal citation module used for
% beta-testing the {\sc Camel} engine --- exists.  Some followers
% of {\sc Camel} development have expressed serious interest in
% developing other modules, but I cannot make any promises
% about when additional styles will appear.  I've done my work,
% it is now up to the wider world.}
%
% Within the \LaTeX3 project, an extensive
% survey of bibliographic styles was carried out by
% David Rhead.   Pedro Aphalo, Task Coordinator
% for bibliographic support on the \LaTeX3 Project,
% first proposed adopting 
% a unified syntax for all bibliographic
% styles.  {\sc Camel} itself
% is the brainchild of Frank Bennett, and is
% based upon his earlier work on the \LexiTeX{} style
% engine for legal materials.
% This package completely supercedes \LexiTeX{}, and that
% earlier style package will no longer be supported.
% The new package should be referred to as
% ``the {\sc Camel} citator''.\footnote{%
% Why {\sc Camel}?
% The first point to make, I suppose, is that the {\sc Camel}
% citator has absolutely \textit{nothing} to do with
% \texttt{Perl}.  I had never heard of \texttt{Perl} when {\sc
% Camel} development began, and scarcely knew anything about it
% by the time most of {\sc Camel} had been finished.  I didn't
% even realize I was in Larry Wall's space when I used the
% \texttt{Perl} camel logo for the {\sc Camel} home page!
% 
% That aside, I can offer several reasons for the name,
% and users may take their pick.
% The style operates by gathering citation details
% that it carries with it through the desert of plain
% text, until the bibliography engine reaches its oasis
% at document's end.  Alternatively, in his daily work
% the author uses 
% the multi-lingual enchancement of Emacs,
% which is called ``Mule''.  It's nice for one critter to
% have the company of another in the stable.  A third
% arbitrary explanation is that the Japanese word for
% ``camel'' is {\em rakuda}.  These syllables, with a
% different intonation, mean ``dead easy''.  Since the
% design goal of {\sc Camel} is to make bibliography
% management as easy, as fool-proof and as robust
% as possible, this cross-lingual pun seems fitting.}
%
% The core {\sc Camel} package provides hooks for the development of
% style options that satisfy all bibliographic requirements
% that have come to the attention of the \LaTeX3 bibliography
% team.
% The foundation
% has been laid, but much work remains to
% be done in drafting {\sc Camel} modules to meet 
% all known bibliographic requirements in all fields
% (and in all languages) for which \LaTeX{} is used.
% This work will involve the drafting or modification
% of {\tt .bst} files in the reverse polish notation
% used by \BibTeX{}, and of {\sc Camel} style
% modules written in \TeX{}.  If you want to contribute to
% a project that will dramatically enhance the
% utility of \LaTeX{} as an author's productivity tool,
% get involved!  The
% developers' email addresses are as follows:
%
% \begin{itemize}
% \item Frank
% Bennett: {\tt fb@soas.ac.uk}.
% \item Pedro Aphalo: {\tt aphalo@cc.joensuu.fi}.
% \item David Rhead: {\tt  David\_Rhead@vme.ccc.nottingham.ac.uk}.
% \end{itemize}
%
% A programmer's reference
% guide for drafting {\sc Camel} styles is included in this
% manual.
% Don't delay---start coding today.
%
% \newpage
% \pagenumbering{arabic}
%
% \section{Introduction}
% This guide explains the use of the {\sc Camel} Citator.
% It covers all commands available in the style.  This should be
% the only user manual that you need to prepare a document for
% use with any {\sc Camel} bibliography style.
% The package provides eight commands, listed in the table at the
% bottom of this page.  The opening commands may be combined in a
% variety of ways, but a typical document heading might look like
% this:
%
% \begin{quote}
% \begin{verbatim}
% \documentclass{article}
% \usepackage{camel}
% \citationsubject{english}{Materials in English}
% \citationsubject{german}{Materials in German}
% \begin{document}
% \citationstyle{law}
% \citationdata{gorp,slush,fodder}
% \forcefootnotes
% \end{verbatim}
% \end{quote}
%
% You should be careful to decide on the subject classification,
% if any,
% that you wish to apply to your citations, before you begin
% your writing.  With that in hand, you can begin entering
% "\source" commands into the document, adjusting the style
% parameters at print time.  A detailed description of command
% usage follows.  Throughout this guide, it is assumed that
% the
% reader has a general familiarity with \BibTeX{}
% and its use in preparing bibliographies with
% standard-issue \LaTeX{}.  If you need to learn more about
% \BibTeX, a number of excellent sources of information are
% available.\source{latex-book},
% \source{latex-companion}, \source{oren-user} and
% \source{oren-hackers}  The treatment given to the
% programming language tends to be quite brief, but you should
% not be put off by this; the language is, in fact, quite simple
% to use, and the {\sc Camel} programming library makes things
% even easier.
%
% \begin{table}[b]
% {\small
% \setlength{\extrarowheight}{3pt}
% \begin{tabular}{|lll|}
% \hline
% \multicolumn{3}{|c|}{\large\bf {\sc Camel} commands}\\\hline\hline
% "\citationsubject["\meta{options}"]{"\meta{nickname}"}{"\meta{heading text}"}"  & optional & preamble \\
% "\citationstyle{"\meta{style package name}"}" & required    &
% doc top\\\hline
% "\citationdata{"\meta{bib1,bib2\ldots}"}"     & alternative &
% doc top\\ 
% "\bibliographymanager{"\meta{product name}"}" & alternative &
% doc top\\\hline
% "\forcefootnotes" & optional & doc top\\
% "\newinterword{"\meta{nickname}"}{"\meta{text}"}" & optional &
% doc top\\
% "\printbibliography{"\meta{nickname}"}" & optional & anywhere\\
% "\source["\meta{options}"]{"\meta{nickname}"}["\meta{page numbers}"]"
% & n/a & anywhere\\\hline
% \end{tabular}
% }
% \end{table}
%
% \subsection{Commands}
% \DescribeMacro{\citationstyle}
% The "\citationstyle" command is used to tell both
% \BibTeX{} and the {\sc Camel} engine how your citations
% should be formatted; its argument is the name of a {\sc Camel}
% module (contained in a {\tt .cst}, a {\tt .cit} and a {\tt
% .bst} file) such as `{\tt law}'. 
% In this respect, it is similar to
% a ``document class'', but for citations instead of whole
% documents.
% This declaration may be make more than once.\footnote{This
% feature (support for multiple citation styles in a single
% document) will be added after the release of \BibTeX~1.0.}
%
% \DescribeMacro{\citationdata}
% This command is used to indicate the ".bib" files
% from which citation entries should be drawn.
% As in the "\bibliography" command of standard
% \LaTeX{}, the "\citationdata" command
% takes one option, which is a comma-separated list
% of bibliographies for use in the documents.  Each
% refers to a {\tt .bib} file, each of which should
% be in the path of your local \BibTeX{}.
%
% \DescribeMacro{\bibliographymanager}
% While we hope that you find \BibTeX{} the most satisfactory
% means of formatting your citations, you might prefer to use
% some other software product
% for the separate task of 
% managing a large citation database.
% {\sc Camel} has been designed so that it can be used
% with a number of such utilities.  If you are using an
% external bibiliography manager, you should declare
% the name of the package at the top of the document
% using the "\bibliographymanager" command.  Supported
% managers, and their corresponding nicknames for this
% command, are:
% 
% \begin{itemize}
% \item Reference Manager ({\tt referencemanager})
% \item Papyrus ({\tt papyrus})
% \item ProCite ({\tt procite})
% \item EndNote ({\tt endnote})
% \end{itemize}
%
% The details on how
% to join external bibliography managers with 
% {\sc Camel} are
% below at page \pageref{processing:documents}.
%
% If you use the "\bibliographymanager" command,
% you should not use the "\citationdata" command.
% This is not felt to be a serious limitation; if you use a
% bibliography manager, you might as well put
% {\em all\/} of your citations into it anyway, and use
% it as the sole source of citations in your
% documents.
%
% \DescribeMacro{\citationsubject}
% You may wish to produce a bibliography classified
% into subheadings by subject or by type of
% material.  To do this, place a set of "\citationsubject"
% commands at the top of your document, or after a
% "\printbibliography" command.  Each command takes
% two mandatory arguments and one optional argument. The first
% mandatory argument indicates the nickname that you
% will use in your document to attach a citation to
% the category.  The second is the section heading
% that you wish to see displayed for that section
% of the bibliography.
%
% The optional argument may be used for two purposes.  First, you
% may want to further divide your bibliography into
% sub-subheadings.  You can specify a such a subcategory by
% putting a "2" as the optional argument to the
% "\citationsubject" command.  Otherwise, a first-level header is used.
% Where the "\printbibliography" command is issued,
% the parts and sub-parts of the bibiliography will be produced in the 
% order in which they were declared.
%
% For some types of citation, you may wish to produce
% a table that shows more detail about citations made.
% With {\sc
% Camel}, simply add an optional argument to
% the "\citationsubject" command applicable to your desired table
% which includes an {\tt o=} argument of three letters (giving
% the extension of the raw data output file), and an {\tt i=}
% argument of three letters (giving the extension of the {\tt
% makeindex}-processed input file).  Optionally, you may also
% include arguments of {\tt p} or {\tt P}.
%   With {\tt p}, the output
% file will be passed the page or section numbers given in
% pinpoint arguments to the "\source" command.
% With {\tt P}, index-style page references to the main text are turned
% on.
% With or without the {\tt P} or {\tt p},\footnote{The syntax of these options is the same as for
% options to the {\tt\bs source} command, discussed above.} the 
% export file should be processed with {\tt makeindex} using 
% {\sc Camel}'s own "camel.ist" file to produce the
% import file.
% This table-creation feature exists principally for typesetting
% tables of statutes.
%
% \DescribeMacro{\forcefootnotes}
% If you are preparing a document that is to be, or may 
% be, prepared with citations in footnotes at the bottom
% of the page, you can save yourself some typing (and
% make it easier to produce the same document in other
% formats) by using the "\forcefootnotes" command at
% the top of the document.  In some styles this command
% has no effect since, for example,
%  a footnote containing only
% ``[2]'' would look rather peculiar.
%
% \DescribeMacro{\newinterword}
% In a string citation, you may want to use a connecting
% word that is not already in {\sc Camel}'s internal list.
% You can add a word to this list with the "\newinterword"
% command.  This command takes two mandatory arguments.
% The first is the nickname you wish to give to the
% word and its associated punctuation.  The second is
% the text to be inserted when you use the new
% connecting word between two "\source" commands.
% 
% The connecting word may appear either at the beginning
% of a citation string (as the argument to a
% {\tt !=} option in the first "\source" command of a
% string), or in the middle, between
% two citations.  Two special characters are used to
% control the appearance of the word in these two
% positions.  A leading punctuation mark should be
% preceded by a {\tt\string_} character.  This will
% suppress such a punctuation mark, and the space
% following it, if the connecting word is used 
% as a prefix to an initial citation in a string.
% The {\tt\string^} character should precede the
% first word of the phrase associated with the 
% connecting word, and that character should be
% capitalized.  The first character of the phrase will
% then be forced to lower case if the connecting word
% is used between two "\source" commands.
%
%  The following examples may be useful for guidance:
%
%  \begin{itemize}
% \item "\newinterword{cf}{_; ^C.f.~}"
%
% \item "\newinterword{see-generally}{_. ^See generally\ }"
% \end{itemize}
%
% \DescribeMacro{\printbibliography}
% Place a "\printbibliography" command in your document
% wherever you would like the bibliography to appear.
% The "\printbibliography" command takes one optional argument,
% "labels".  In the "keyval=" syntax, this may be set to either
% {\tt labels=false} or {\tt labels=true}.  This toggles the
% appearance of bracketed numerical or shorthand labels in front
% of each bibliography item.
%
% If no "\citationsubject" commands are used at the top of
% the document, "\printbibliography{all}" will produce
% a full bibliography of all references made in the
% document up to that point.  If "\citationsubject" has been
% used, then "\printbibliography{all}" will produce the
% same bibliography, but classified by subject, with the headers
% specified in the "\citationsubject" commands at the top of the
% document.
%
% You may also specify a subject to the "\printbibliography"
% command, instead of "all".  This will produce a bibliography
% formatted as requested in the "\citationsubject" command.  Note
% that, if the "i=" and "o=" options are used with
% "\citationsubject", "makeindex" must be used to generate the
% input file that will be expected for that subject.  Note also
% that such external tables will be ignored by
% "\printbibliography{all}" where citation subjects are used.
%
%
% \DescribeMacro{\source}
% The most common command for {\sc Camel} users is the "\source"
% command, which replaces the "\cite" command of standard \LaTeX.
% It is used to identify the citation in the {\tt .bib} data
% files, and to provide a logical description of any
% `fine-tuning' of the citation form that the user might desire.
% Because it is frequently used, and must be accessible to
% authors with more interest in the content of what they are
% writing than the inner workings of  \LaTeX,  much
% effort has gone into making the command as simple to use as
% possible.
%
% \subsubsection*{Options}
% The valid options that may be placed inside the
% first set of square braces are shown below.
%
% \medskip
% \label{sourceoptions}
% \newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
% {\hyphenpenalty=200\setlength{\extrarowheight}{3pt}
% \noindent\begin{tabular}
% {|>{\tt }r@{ --- }
%  >{\small}p{4.4in}|}\hline
% \multicolumn{2}{|c|}{\large\bf Single character options}\\
% \hline\hline
% a & Supress printing of author's name in the document.\\
% t & Suppress printing of the title in the document.\\
% l & Force automatically generated abbreviations to
%     lower case.\\
% n & Suppress printing of the citation in the document
%     (equivalent to {\tt \char`\\nocite} in standard
%     \LaTeX{}).\\
% f & Force the full form of the citation to be printed
%     in the document.\\
% h & Suppress automated footnote generation and the use of
% interwords for the current and following citations.  This
% option should not be used in the middle of a string of
% citations linked with interwords.\\\hline
%  \multicolumn{2}{l}{}\\\hline
% \multicolumn{2}{|c|}{\large\bf String options}\\
% \hline\hline
% s= & Associate the citation with the specified subject.
%      This option can be freely specified, but only has
%      significance when a classified bibliography is
%      being produced.  When these subject tags are being
%      used for that purpose, they must be declared at
%      the top of the document, and a given source must
%      be associated with the same subject throughout
%      the document; specifying a different subject
%      from that used in the first use of the citation will
%      produce an error message from \LaTeX{}.\\
% v= & Give a volume number for use in the citation.
%      {\tt BOOK} entries in a \BibTeX{} database
%      may be given a volume number.  Such citations are
%      assumed to be multi-volume works, and a volume
%      number should be supplied when citing them; the volume
%      number given in a {\tt BOOK} entry itself ignored, and an
%      error message will be produced if an explicit volume
%      number is not given using this option.\\
% != & Precede the citation with the interword given in
%      the argument.\\\hline
% \end{tabular}}
%
% \medskip
% These options may be entered in the option braces
% in any order,
% with the single requirement that
% a comma must separate all options.\footnote{Separating
% commas are required from version 1.0r, because this
% is the syntax of the \texttt{keyval} package.}
%
% The number of possible citation forms that can
% be generated using these command options is
% very large, and varies from one style to another.
% The best way of familiarizing yourself with them
% is to finish reading the next section of this guide,
% and then do a little experimentation with the
% various options.  This will serve you much better
% than a verbose set of illustrations here, which would
% not stick in the memory, would be difficult to use
% as a reference, and could not
% in any case cover all of the possibilities.
%
%  The following
% citations are all valid:
%
% \begin{itemize}
% \item "\source[ats=school]{ucla}"
% \item "\source[av=8,t]{harvard}"
% \item "\source[s=town,nat]{oxford}"
% \end{itemize}
%
% A string of citations applying to a particular statement
% may be entered as follows:
%
% \begin{itemize}
% \item "\source["\meta{options}"]{"\meta{nickname}"}["\meta{page numbers}"]"\\
% \meta{interword}\\
% "\source["\meta{options}"]{"\meta{nickname}"}["\meta{page numbers}"]" 
% \end{itemize}
%
% \subsubsection*{Keys}
% The key given in the squiggly braces should correspond
% to the key that identifies the entry in the \BibTeX{}
% or other database that you are using.  If you have
% a series of citations to make, and do not need to
% give separate options to any of them, you can enter
% them as a comma-delimited string, in the following
% manner:
%
% \begin{quote}
% "\source[s=stooges]{joe,curly,moe}"
% \end{quote}
%
%
% \subsubsection*{Pinpoints}
%
% For most citations, pinpoint references are simply typed
% between the second pair of square braces, using
% normal punctuation marks ({\tt\ ,\ \& -\ }).  Spacing
% is irrelevant, so long as the punctuation marks
% are entered.  A valid simple
% pinpoint citation might look as follows:
%
% \begin{quote}
% "\source{major}[2, 7, 9 & 23]"
% \end{quote}
%
% In some
% very special situations, {\sc Camel} needs more information
% to handle pinpoint references correctly.  
% Suppose
% you are entering a citation for a statute, and you intend
% to produce a table showing where references to each cited
% section of the statute are made in the text.  If your
% citation includes references to more than one section of
% the statute, {\sc Camel} will produce a table entry
% for each cited section automatically.  But what if you
% are citing a {\em range\/} of sections?  {\sc Camel}
% cannot know whether the range is continuous, or has
% gaps in it where provisions have been repealed.
% You therefore need to tell {\sc Camel} explicitly about
% each section number---but you don't want the numbers
% to be printed in the text.  To feed citation numbers
% to the table, but suppress printing in the document,
% separate the numbers to  ``hidden'' from the rest
% with a ``fence''  in the form of the "|" character.
% A typical citation of this
% kind might look like this:
%
% \begin{quote}
% "\source{SaleofGoodsAct}[19-25 | 20, 21, 22, 23, 24]"
% \end{quote}
%
% There are two other situations, also related only to
% the production of tables, where special markings may
% need to be included in the pinpointing string.  These
% are (a) where you want material to appear only in
% the text, and (b) where you want material to appear
% only in the table.  The first case may arise where
% you are citing subsections of a statute.  In this
% situation, you can enclose in {\tt \string^} characters
% any text that you want to withhold from the table.
% A simple citation of this kind might look as
% follows:
%
% \begin{quote}
% "\source{VehicleCode}[23(A)^(3)(a)(i)^]"
% \end{quote}
%
% Where material should appear only in the table,
% enclose that pinpoint material in {\tt\string_}
% characters.  This might be necessary where, for
% example, you are citing two subsections of the same
% statute.  An example might look as follows:
%
%  \begin{quote}
% "\source{LawofPropertyAct}[70(1)(f) & _70(1)_(g)]"
%\end{quote}
%
% Finally, there is one more feature that applies only to
% `parallel citations' to law cases.  If a law case to which you are
% referring is reported in more than one location (see below),
% and you want to give a pinpoint to
% each location, you can do so by using the the {\tt =} sign
% between the pinpoint strings.  For example:
%
% \begin{quote}
% "\source{bloggvkermit}[20-25 = 125-26 ]"
% \end{quote}
%
% If more parallel pinpoints are given than exist in the
% \BibTeX{} entry for the case nicknames {\tt bloggvkermit}, the
% extra pinpoints will be ignored.  Similarly, if you give fewer
% pinpoints than there are parallels in the \BibTeX{} entry, the
% portions of the entry with no matching pinpoints will be
% omitted.  No warnings are issued, although they could be
% if there is a demand for it.
%
% \subsection{\BibTeX{} features}
%
% A number of enhancements for processing \BibTeX{}
% entries have been incorporated into the {\sc Camel} \BibTeX{}
% programmer's library.  These enhancements are drawn upon by the
% {\tt law.bst} style, and should also be used by subsequent {\sc
% Camel} style modules.  These features are described briefly
% here.  Please see the \BibTeX{} documentation for more
% information on the format of \BibTeX{} entries et cetera.
%
% \subsubsection*{Cases}
%
% A new entry type, {\tt @CASE}, has been added.  This entry type
% should be used for reported law cases.  Although citation forms
% vary widely between jurisdictions, {\sc Camel} bases the
% formatting of the citation on the information contained in the
% citation, rather than a tag indicating the jurisdiction.
%
% A result of this approach is that there are no `required'
% fields in the usual sense that \BibTeX{} will complain if
% something is missing.  Instead, is a set of 
% `core' fields for each of three different formatting styles.
% For someone familiar with legal resources, this is actually
% quite intuitively straightforward.
%
% For reported U.S. law cases, the core fields are {\tt title}, {\tt volume},
% {\tt journal}, {\tt pages} and {\tt year}.  In addition, you
% may wish to specify {\tt court}.\footnote{This is not yet
% implemented, but can be and should be.}  Procedural histories may not
% be represented in the \BibTeX{} entry.
%
% For reported Commonwealth cases, use {\tt number} instead of
% {\tt volume}.  The effect of this will be to place the year at
% the front of the citation in square braces, with the {\tt
% number} and {\tt journal} following it.  Again, you may specify
% {\tt court} optionally.
%
% For cases reported in ephemeral media such as newspapers, leave
% out {\tt volume} and {\tt number}, and give the full date in
% the {\tt year} field instead (see below for the formatting of
% dates).  The formatting of the citation will adjust
% accordingly.\footnote{I'm not sure whether this works with
% parallels yet.  If it doesn't but you need it to, let me know
% and I'll fix it.}
%
% For cases reported in jurisdictions such as Japan that refer to
% cases by date rather than title, use {\tt casedate}, {\tt
% court}, {\tt journal}, {\tt volume}, {\tt pages} and {\tt
% year}.  Optionally, you may also wish to include {\tt divno}
% and {\tt division}, to specify the exact identity of the
% deciding court.
%
% \subsubsection*{Statutes}
%
% Support for statutes is still in its infancy.  You need, at
% minimum, to enter {\tt title}, {\tt year} and {\tt
% jurisdiction}.  Supported jurisdictions are {\tt japan}, {\tt
% singapore} and {\tt england}.
%
% \subsubsection*{Dates}
%
% The entry of dates has been considerably simplified in {\sc
% Camel} \BibTeX{} entries.  Always use the {\tt year} field (or,
% if appropriate, the {\tt casedate} field).  Months may be
% entered as numbers or as a three-character string.  The following date
% forms are all valid:
%
% \begin{quote}
% \begin{verbatim}
% year = {10 jun 1995},
% year = {jun 10 1995},
% year = {jun 1995},
% year = {1995},
% year = {10/06/95},
% \end{verbatim}
% \end{quote}
%
% \subsubsection*{Parallel citations}
%
% For {\tt @CASE} entries, it is possible to enter multiple citations in a
% single \BibTeX{} entry using a short form of citation in a
% field called {\tt cites}, separating entries with a {\tt =}
% character.\footnote{It actually does work.  \source{halsall-v-brizell}.}
%  There are several valid syntaxes for
% this field, which closely follow the citation format used in
% the Blue Book for the relevant sources.  They are:
%
% \begin{quote}
% \begin{verbatim}
% cites = {[1995] 1 All ER 25 = [1995] 2 WLR 125},
% cites = {123 Cal.3d 237 (1995) = 124 S.W.2d 235 (1995)},
% \end{verbatim}
% \end{quote}
%
% You can string together an arbitrary number of parallel citations in
% this way.\footnote{Cross-references are complex to format, but
% they work correctly.  \source{halsall-v-brizell}.  In a competition for
% speed and accuracy between typists equipped with \LaTeX/{\sc
% Camel} and with WordPerfect, who do you reckon would win?}
% Be sure to read the notes on pinpointing, above,
% for details on how to specify pinpoint references to parallel
% citations.
%
% \subsection{Processing documents}
%
% \subsubsection*{Ordinary processing}
%
% For a simple document containing no cross-references
% other than those produced by {\sc Camel},
% printing requires one run of \LaTeX{}, one run of
% \BibTeX{}, and a second run of \LaTeX{}.  Because
% {\sc Camel} absorbs all citation information 
% at the start of the document (at the point of the "\citationdata"
% or "\bibliographymanager" commands), there is no need for
% the third \LaTeX{} run required in the standard
% \LaTeX{} setup.  You may, however, need additional
% runs of \LaTeX{} to resolve other cross-references
% in the document, or to work out misspellings and other
% errors.
%
% \subsubsection*{Producing tables}
% \label{processing:documents}
% When the "o=" and "i=" options are used for
% one or more declared citation subjects, those subjects
% will be excluded from the bibliography.  Instead,
% {\sc Camel} will write an external table file according
% to the specifications given in the "\citationsubject"
% command.  Any such files
%  must then be processed into properly formatted
% lists using {\tt makeindex} before they will appear
% in the printed document.\footnote{The documentation for
% {\tt makeindex} will explain how it should be set
% up for your system.  On a UNIX or DOS installation,
% the basic requirements are that the {\tt makeindex}
% program be in your search path, and that the appropriate
% environment variable (usually {\tt indexstyle}) be
% set---this tells {\tt makeindex} where to find the style
% files that tell it exactly how to format the finished
% table lists.}  On a UNIX or DOS system you would type the
% following for a table declared with the export
% extension ".atb" and the input extension ".art":
% \begin{quote}
% \small
% {\tt makeindex -s camel.ist -o} \meta{file name}".art" \meta{file name}".atb"
% \end{quote}
% If the subject associated with this table is "article",
% the table can then be placed in the document 
% for the next \LaTeX{} run using the
% command:
%
% \begin{itemize}
% \item "\printcitationtable{article}".
% \end{itemize}
%
% When the option "p" is used with the
% "\citationsubject" command and the "i=" and "o=" options,
% the table will include any section or other numbers
% given as optional arguments to "\source" commands in the
% document.  Because "makeindex" sorts alphabetically,
% not numerically, the section numbers may be out of
% their proper order in the "makeindex"-processed file. 
%  This must be corrected by hand.
% 
%\newpage
% \section{Notes for Implementors}
%
% \subsection{Getting started}
%
% The purpose of this section is to provide style designers
% with all of the information required to write a new
% bibliography style from scratch, drawing on the powerful
% facilities available in \BibTeX{} and the {\sc Camel}
% style engine.\footnote{As of this writing, however, I've not received
% any feedback on the whether this documentation is any
% use.  If you are attempting to draft a style and feel
% at sea, \textit{complain to me}!  It's the only way
% we can make things easier for the others.}  Before you start,
% you should have a
% sound knowledge of \BibTeX{} primitives, and of the
% programmer's function library contained in the
% file {\tt camel.dtx}.  A bibliography style consists of a
% {\tt .bst} file, a ".cst" file and a ".cit" file.
% The ".bst" file should produce entries suitable
% for digestion by {\sc Camel} for all of the \BibTeX{}
% entry types supported by the style.
%
% The modules of the {\sc Camel} system work
% together in an integrated fashion to  format citations.
% Raw citation details are kept in {\tt .bib} databases.  The
% function of the {\em Camel}  system is to massage those details
% into formatted citations, and include them in appropriate
% locations in typeset pages.  When a document invoking the {\sc
% Camel} package encounters a "\citationstyle" command, the
% relevant ".cst" and ".cit" files are loaded.  A corresponding "\bibstyle"
% entry is also written on the {\tt .aux} file.  A
% "\citationdata" command causes a relevant "\bibdata" command to
% be written there as well.  If a "\bibliographymanager"
% declaration is used instead, a "\bibdata" entry calling on the
% file "camel.bib" is written to {\tt .aux}.
% When a "\source" command is
% encountered during processing, code contained in
% {\tt camel.sty} writes a "\citation" entry for that citation on
% the {\tt .aux} file.  In this way, an orthodox set of entries
% and files for use with \BibTeX{} is generated.
%
% If an external bibliography manager is used, the file
% "camel.bib" must be converted into a valid {\tt .bib} file,
% using whatever tools for finding and replacing key entries the
% database manager has to offer.
%
% \BibTeX{} must then be run on the document.  This reads the
% entries on the {\tt .aux} file, opens the {\tt .bib} databases,
% reads them, and writes the result of its ruminations on a {\tt
% .bbl} file.  At this point, the operation of {\sc Camel}
% diverges sharply from that of conventional \LaTeX{}
% bibliography tools.  With {\sc Camel}, \BibTeX{} is used to
% generate "\lexibib" entries on the {\tt .bbl} file.  Such
% entries parse the citation into logical typesetting units, but
% the typefaces used within the units, and the punctuation that
% appears between them, is not determined by \BibTeX.  The tasks
% of punctuation and typeface selection are carried out on the
% second run of \LaTeX{} on the document, using the details
% specified in the {\tt .cit} file for the {\sc Camel} citation style
% being used.
%
% It is worth spending some time pondering this programming flow;
% there are good reasons for spreading the formatting work 
% over 
% a number of different modules in this way, and it is important
% to understand the design before embarking on the drafting of a style.
%
% \subsection{The {\tt .cst} file}
%
%  The ".cst"
% file should contain, at least, the following
% macros:
%
% \begin{description}
% \item[{\tt\bs @law@print}:]  This is the macro that
% actually prints the citations in the document and in
% the bibliography.  Its structure is discussed below
% in the commented code listing of the default
% "\@law@print" command, which draws on most of the
% conditional handles provided by {\sc Camel}.
% \item[{\tt\bs @law@wordlist}:] This is a list macro consisting
% of paired interword nicknames and corresponding punctuation/text
% sets.  Possible changes you may wish to make to this
% file are discussed in the commented code description of
% this macro.
% \end{description}
% Additional macros (including re-definitions of
% the macros contained in the {\sc Camel} engine)
% may be included in the ".cst" file.  Be sure to
% document your work, however; {\sc Camel} is among the
% more complex packages written for use with \TeX{},
% and documentation is essential if problems that arise
% are to be sorted out quickly and efficiently.
%
% Concerning the "\@law@wordlist" macro, it is best to examine
% the existing macro in "law.dtx", and read the 
% user documentation on the "\newinterword" command.
% With this information, you should be able to make
% any changes you require in the behaviour of the list
% to suit your new style.  You should not omit items from
% the list---this is important to maintain compatibility
% between styles.  You may want to add to the list,
% and this is welcomed---drop a note to Frank Bennett
% on "fb@soas.ac.uk" to assure that your new addition is
% incorporated into the "law.dtx" list, which is used as
% a model, so others will
% include it in their styles too.
%
% Drafting the "\@law@print" macro may be difficult to
% approach at first.  If you examine the example in the
% "law.dtx" file, you may be somewhat intimidated by the
% size and complexity of the macro listed there.  But in
% fact for most styles this macro should be reasonably simple
% to write; the "law.dtx" example is complex because it
% automates a very complex set of style rules applying to
% legal materials.
%
% Essentially, what "\@law@print" does is print a citation
% in a particular form according to a set of conditions
% that can be recognized from toggles in effect when
% the macro is run by the {\sc Camel} engine.  The toggles
% that may be drawn upon are described here.  For further
% information, study the example in "law.dtx"---bearing in
% mind that your own macro will probably be simpler to
% draft.
%
% \subsection{Toggles and hooks for the {\tt .cit} file}
% \def\lawtrue{{\tt true}\ }
%
%\subsubsection{Citation history}
%{\def\PrintDescribeMacro#1{\strut\MacroFont\bs #1\ }
%\DescribeMacro{if@law@firstuseofcite}
% This  is \lawtrue during the first expansion of a citation
% nickname in the text.
%
%\DescribeMacro{if@justabove}
% This is set to \lawtrue where (a) the author, title, source, page
% and citation trailer are identical in the last citation used
% in a footnote and in the current citation, (b) the last
% citation used in a footnote was the only citation in that
% footnote, and (c) a pinpoint was not used in the previous citation
% or, if there was such a pinpoint, a pinpoint is also used in
% the current citation.
%
%\DescribeMacro{if@l@quiteexact}
% This is set to \lawtrue where (a) "\@law@justabove" is set \lawtrue
% and (b) a pinpoint was used in both citations, and (c) the
% pinpoints match exactly.
%
%\subsubsection{Formatting toggles}
%
%\DescribeMacro{if@law@printcite}
% If this is \lawtrue the citation should print.  Otherwise it
% should not.  It should also trigger suppression of footnote forcing.
%
%\DescribeMacro{if@law@printauthor}
% If this is \lawtrue the name of the author prints.
%
%\DescribeMacro{if@law@printtitle}
% If this is \lawtrue the title of the work prints.
%
%\DescribeMacro{if@law@longcite}
% If this is \lawtrue the citation should be printed in its full
% form.  This is set \lawtrue by the "f" option to the "\source" command.
%  }
%\subsubsection{typefaces}
%
%\DescribeMacro{\@ltok@authormainface}
% This is the typeface set in the {\tt .cit} file for author
% names.  It, and all other "\@ltok@" control strings are token
% registers that must be expanded using "\the".
%
%\DescribeMacro{\@ltok@authoroptionface}
% This is the typeface selected by enclosing text in the author
% portion of the citation within "\\" commands in the current
% citation's type (i.e.~as defined in its "\newcitestyle" entry).
%
%\DescribeMacro{\@ltok@titlemainface}
% The typeface used for the title portion of the citation.
%
%\DescribeMacro{\@ltok@titleoptionface}
% The alternative "\\" typeface within the title argument to "\lexibib".
%
%\DescribeMacro{\@ltok@citefirstmainface}
% The typeface used for the source portion of the citation.
%
%\DescribeMacro{\@ltok@citefirstoptionface}
% The alternative for the source portion of the citation.
%
%\DescribeMacro{\@law@firstslash}
%\DescribeMacro{\@law@secondslash}
% These two commands should be defined as follows in your
% "\@law@print" command
% before citation elements are expanded.  This could be done
% within {\sc Camel} itself, but this gives you a little more
% hands-on control in style design maybe.
%  \begin{quote}
%    "\def\@law@firstslash{\begingroup\def\\{\@law@secondslash}%"\\
%    "\the\ltokspecialface}%"\\
%    "\def\@law@secondslash{\endgroup\def\\{\@law@firstslash}}%"\\
%    "\def\\{\@law@firstslash}%"
%  \end{quote}
%
%\subsubsection{Citation details}
%
%\DescribeMacro{\@ltok@whereitsat}
% This actually contains the text that is used to flag either a
% note or a page number (i.e.~"{\ note\ }" or "{\ page\ }").
% This is used only where citation cross-referencing is required.
%
%\DescribeMacro{\@ltok@stylename}
% This stores the citation type used to declare the citation
% with "\lexibib".  This is mainly used for internal purposes by
% {\sc Camel}, but if you're printing a style or proof sheet, or
% are just trying to debug a style, you
% may have a use for it.
%
%\DescribeMacro{\@ltok@nickname}
% This stores the nickname of the citation.
%
%\DescribeMacro{\@ltok@author}
% This stores the author portion of the citation.
%
%\DescribeMacro{\@ltok@name}
% This stores the title portion of the citation.
%
%\DescribeMacro{\@ltok@citefirst}
% This stores the source portion of the citation.
%
%\DescribeMacro{\@ltok@citepage}
% This stores the page number ({\em not\/} the pinpoint!) of the citation.
%
%\DescribeMacro{\@ltok@citelast}
% This stores the citation trailer.
%
%\DescribeMacro{\@ltok@pageorfootno}
% This stores either the page or the footnote number at which the
% citation first occurred.
%
%\subsubsection{Bridges}
%
%\DescribeMacro{\@ltok@atot}
% This contains the punctuation bridge, declared in the {\tt
% .cit} file for the current citation type, that is to be placed between the author and the
% title elements of the citation.
%
%\DescribeMacro{\@ltok@ttocone}
% This contains the bridge that is to be placed between the title
% and the source.
%
%\DescribeMacro{\@ltok@conetop}
% This contains the (singular) bridge that goes between the
% source and the page number.
%
%\DescribeMacro{\@ltok@conetopplural}
% This contains the alternative plural bridge that goes between
% the source and the page number.
%
%\DescribeMacro{\@ltok@ptop}
% This contains the bridge that goes between a page reference
% giving the location of an article, for example, and the
% pinpoint reference.
%
%\DescribeMacro{\@ltok@ptoctwo}
% This contains the bridge that goes between any page numbers and
% the citation trailer.
%
%\DescribeMacro{\@ltok@atbridge}
% This contains the bridge that goes between an abbreviated
% citation (i.e.~{\em Id.}\ or somesuch) and a pinpoint.
%
%\DescribeMacro{\@ltok@atbridgeplural}
% This contains the plural bridge for abbreviated citations.
%
%\subsubsection{Pinpoint printing}
%
%\DescribeMacro{\@law@barkill}
% The pinpoint information is contained in the token register
% "\@ltok@argtwo".  To print the pinpoint, you should always use
% the following form, which will induce the correct behaviour of
% the string expansion engine within {\sc Camel}.
%
%  \begin{quote}
%    "\@law@barkill\the\@ltok@argtwo\relax"
%  \end{quote}
%
% \subsection{The {\tt .cit} file}
%
% The ".cit" file should 
% contain instances of the "\newcitestyle" command
% and associated arguments.  This defines a {\sc Camel}
% style instance for each of the entry types supported
% by the style's ".bst" file.  If you find it necessary to add
% a new entry type to the style defined in the {\tt .bst}
% file for your style, you must also define a {\sc Camel}
% style instance in the ".cit" file applying to
% this new entry type.
%
% \newpage
%  The arguments to the "\newcitestyle" command
% have the functions described in the following footnoted
% illustration:
%
% \medskip
% {\small
% \newlength{\cardwidth}
% \setlength{\cardwidth}{\textwidth}
% \addtolength{\cardwidth}{-4\columnsep}
% \begin{tabular}{|c|} \hline
% \begin{minipage}{\cardwidth}
%  \renewcommand{\thefootnote}{\alph{footnote}}
% {\tolerance=1500\raggedright
% "\newcitestyle{article"\footnotemark[1]"}%"\\
% " {rsirsr"\footnotemark[2]"A"\footnotemark[3]"}%"\\
% " {[a],\ "\footnotemark[4]"[t],\ "\footnotemark[4]
% "[c]\ "\footnotemark[4]
% "[p],\ "\footnotemark[4]
% "(pl),\ "\footnotemark[4]
% "[rp]\ "\footnotemark[4]
% "[e]:[id]\ at~"\footnotemark[4]
% "(pl)\ at~"\footnotemark[4]
% "[xrf]}%"\\
% " {6}"\footnotemark[5]"%"\\
% "{{#1}"\footnotemark[6]"{#2}"\footnotemark[6]%
% "{#3}"\footnotemark[6]"{#4}"\footnotemark[6]%
% "{#5}"\footnotemark[6]"{(#6)}"\footnotemark[6]"}%"}\\
% \footnotetext[1]{This gives the name of the citation template to be generated.}
% \footnotetext[2]{The first part of this list of arguments consists always of exactly six
% letters: the first three pairs set the main and alternative typefaces for
% the author, title
%   and first-cite-part portions of the citation.  {\tt r}, {\tt s}, {\tt b} and
%   {\tt i} select roman, small caps, boldface and italic type.
%  These letter flags are not case sensitive.
%   The alternative typefaces may then be specially selected in the text 
%  arguments to a citation using
%   {\tt\string\\...\string\\}.}
% \footnotetext[3]{The last letter in this list sets the classification
%  of citations declared with the resulting style macro. {\tt a}, {\tt b}, {\tt
%     c} and {\tt s} will classify all citations generated by this
%   citation template as being to articles, books, cases or statutes,
%   respectively. This letter flag is not case sensitive.}
% \footnotetext[4]{These are the citation bridges that
%   will be placed between the portions of the citation indicated.  Two
%   bridges, singular and plural, are given between {\tt [p]}
% (page) and
%   {\tt [rp]} (reference page), and between {\tt [id]} ({\em id.}
% or {\em supra\/}) and {\tt [xrf]} (cross-reference).}
% \footnotetext[5]{This argument states how many arguments the finished citation
%   template will accept.  It must be a number between {\tt 1} and {\tt
%     6}.}
% \footnotetext[6]{Six pairs of matched braces must appear inside this
%   argument.  Any other than the first (which represents the citation
%   nickname) may be left empty, but the bridges must of course take this
%   into account.  The number of arguments inserted here must correspond
%   with the number stated on the line above.}
% \vspace{3pt}
% \end{minipage}\\ \hline
% \end{tabular}}
%
% \subsection{The {\tt .bst} file}
% \subsubsection{Entry types}
% Most of the work in drafting a new style is in writing entry
% type functions for inclusions in the {\tt .bst} file.  This is,
% inevitably, an arduous task, because of the number of
% possibilities that must be covered.  The task is made easier,
% however, by the {\tt .bst} file programming library contained in
% the file {\tt camel.dtx}.  This library provides a set of
% functions for the manipulation of fields pushed onto the stack
% in the entry type functions themselves.  This approach
% increases the transparency of your code, because you can see in
% the entry type function itself exactly what fields are being
% used, and what logical and formatting operations are being
% carried out on them.
%
% Using the library is highly recommended.  If you find that
% you require functions that are not presently available in the
% library, you can make your solutions available to others by
% adhering to a few design guidelines, and passing the function
% on to {\tt fb@soas.ac.uk} for inclusion in the {\sc Camel}
% distribution.  The guidelines are actually quite simple.  No
% library function should directly manipulate a field, but should
% instead expect to find the field on the stack when it is
% invoked.  No library function should make assumptions about the
% setting of variables; any parameters should also be passed to
% the stack before the library function is invoked.  When
% finished, a library function should always leave a fixed number
% of items on the stack, in a fixed order.  And a library
% function should not pass data to subsequent functions in the
% form of variables.  Finally, a function
% should be documented concerning (a) the number of items it
% expects to find on the stack, and in what order, (b) the number
% of items it leaves on the stack, and in what order, and (c) the
% effect of any toggle strings that may be fed to the function.
%
% You may find it necessary, in drafting a function, to divide
% its operation into sub-functions.  As between sub-functions,
% the ban on passing data through variables need not be followed,
% so long as the set of functions adheres to the rule.
%
% \subsubsection{About cross-referencing}
% About cross-referencing, Oren Patashnik wrote:
% \begin{quote}
% Now come the cross-referencing functions (these are invoked
% because one entry in the database file(s) cross-references
% another, by giving the other entry's database key in a 
% "crossref"
% field).  This feature allows one or more titled things that are
% part of a larger titled thing to cross-reference the larger
% thing.  These styles allow for five posibilities:
% 
% \begin{enumerate}
% \item an {\bf article} may cross-reference an {\bf article};
% 
% \item a cross-reference to a {\bf book} may be made in an
% entry for:
% 
% \begin{enumerate} 
% \item a {\bf book};
% \item an {\bf inbook}; or
% \item an {\bf incollection}; and
% \end{enumerate}
%
% \item
% an {\bf inproceedings} may cross-reference a {\bf proceedings}.
% \end{enumerate}
%  Each of
% these is explained in more detail later.
% \end{quote}
%
% This is the authoritative statement on the proper use of
% cross-referencing within a ".bib" file.  The further comments I
% have to offer
% here are a non-authoritative gloss, but do accurately reflect
% the assumptions I made in writing the ".bst" code for the
% "law.dtx" file.
%
% \begin{description}
% \item[{\tt article}:] A cross-reference from one "article"
% entry to another may be used for special issues of a journal,
% such as those dedicated to a single topic. The referenced
% entry should include all details relevant to the issue as a
% whole, including "volume", "journal" and "booktitle" (this last
% for the name or topic description of a special issue), and
% "type" (this defaults to ``"Special issue"'').
% \item [{\tt book}:] This cross-reference is not recognized by
% the "law.dtx" style.  It could logically be used for a series,
% but this is little trouble to type into the original "@book"
% entry itself, and a series is not something that should
% appear separately on the reference list.
%\item[{\tt inbook}:] This is used for cross-referencing a
%  chapter or other subdivision within a work by a single author
%  to that work.
%\item[{\tt incollection}:] This is used for cross-referencing a
%  work by multiple authors.  The typeface conventions used in the
%  Blue Book style differ for "inbook" and "incollection"
%  citations, as defined here, so this distinction should be
%  honored in building a database.
%\item[{\tt inproceedings}:] This is used only cross-referencing
%  articles appearing to a proceedings volume to that volume.
% \end{description}
%
%
%\StopEventually{\setcounter{IndexColumns}{2}\PrintIndex}
%
% \section{The Citation Engine: {\tt camel.sty}}
%
% \subsection{Initialization}
% \subsubsection{Hello!}
% To start things off on the right foot, we tell the world
% who we are.
%    \begin{macrocode}
%<*lexitex>
\NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{camel}
[1997/02/17 v1.0t General bibliography engine (Frank Bennett)]
\@ifclassloaded{ltxdoc}{}{\RequirePackage{index}[1995/09/28]}
\RequirePackage{keyval}[1995/09/21]
\RequirePackage{overword}
%    \end{macrocode}
% \subsubsection{Customizable text elements}
% \begin{macro}{\supra}
% The following definition specifies the string used to refer to
% a cite that occurs in a previous footnote, or in a preceding
% citation to the same source within the same footnote.  It is
% not used in cross-referencing cases and statutes.  The extra
% internal braces only serve to limit the scope of
% {\tt\string\em}.  An italic space ("\/") is not added, since
% this might be followed by a period.
%    \begin{macrocode}
\def\supra{, {\em supra}}%
%    \end{macrocode}
% \end{macro}
% The {\tt\string\Id} macro defined here is used in referring to
% immediately preceding works, in the same or in a preceding
% footnote.  If the context demands that {\em Id.} be lower case
% when it occurs, the user can switch it to lower case by entering
% {\tt\string\lowcase} immediately before an in-text citation
% declaration or citation nickname.  The lower case macro thus
% invoked turns itself off after {\em id.} has printed, so no
% grouping is required.
%    \begin{macrocode}
\def\Id{{\em\@law@lettercase Id.}}%
%    \end{macrocode}
% These two tokens hold the text used to indicate the note or
% page number where a previous reference occurs.  These are only
% used in short-form citations.
%    \begin{macrocode}
\newtoks\@ltok@userconetop%
\newtoks\@ltok@userconetopplural%
\newtoks\@ltok@userptop%
\newtoks\@ltok@userptoctwo%
\newtoks\@ltok@useratbridge%
\newtoks\@ltok@useratbridgeplural%
\newtoks\@ltok@usercitefirst
\newtoks\@ltok@usercitepage
\newtoks\@ltok@usercitelast
\newtoks\@ltok@infoot \@ltok@infoot={\ note\ }
\newtoks\@ltok@onpage \@ltok@onpage={\ page\ }
%    \end{macrocode}
% The following tokens are used in making proof sheets.
% Change the content of these to taste.
%    \begin{macrocode}
\newtoks\@ltok@proofcitelast
 \@ltok@proofcitelast{{Editor, publisher and stuff, 1994}}
\newtoks\@ltok@proofpage
 \@ltok@proofpage{{12345}}
\newtoks\@ltok@proofciteone
 \@ltok@proofciteone{{Source}}
\newtoks\@ltok@prooftitle
 \@ltok@prooftitle{{Title of work}}
\newtoks\@ltok@proofauthor
 \@ltok@proofauthor{{Author's name}}
%    \end{macrocode}
% \subsubsection{User selectable switches}
% The Blue Book\source{bluebook}{} allows us to refer
% to statutes in a long form or a short form in subsequent
% references.  The long form consists of the name of the Act (if
% any) plus its source details and the section number.  The short
% form consists of the source details alone.\footnote{{\em See}
% \source{bluebook}[25].}
% I'm all in favour 
% of saving ink; the default is for short form statute citations.
% You can have long form subsequent cites by setting
% "\statuteverboseon" at the top of your document.  If you need
% some other form, let me know; statutes are complex, and rather
% than trying to do everything from the get-go, this really has
% to be demand led.
%    \begin{macrocode}
\global\let\@law@delim\relax
\global\let\@law@pingroup\relax
\global\let\@law@pinstart\relax
\global\let\@law@pinend\relax
\newif\if@law@statuteverbose
\def\statuteverboseon{\@law@statuteverbosetrue}
\def\statuteverboseoff{\@law@statuteverbosefalse}
\statuteverboseoff
%    \end{macrocode}
% \begin{macro}{\forcefootnotes}
% This fun little item is used to toggle the "\source"
% macros to create a footnote if none was typed literally
% into the text.  Great finger-saver for shortie footnotes.
% Conceived on a whim, implementing this turned out to be
% non-trivial.  I hope you find it useful!
%    \begin{macrocode}
\newif\if@law@forcefootnotes
\def\forcefootnotes{\global\@law@forcefootnotestrue}
\def\noforcefootnotes{\global\@law@forcefootnotesfalse}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Shorthanding essentials}
% The following definitions are established as a means
% of cutting text using the "_", "^" and "|" characters.
% Although we make them active here, they are {\em not\/}
% read as active characters.  {\sc Camel} should in no way
% interfere with styles that require these characters
% to be set active.  The active characters created here
% are used only for ``internal purposes''.
%    \begin{macrocode}
{
 \catcode`\_=13
 \catcode`\^=13
 \catcode`\|=13
 \gdef\@law@barkill{\def\@law@comma{, }%
                    \def\@law@ampersand{\ \& }%
                    \def\@law@dash{--}%
                    \def\@law@delim{}\def_##1_{}\def|##1\relax{}\def^{}}%
 \gdef\@law@barnil{\def_{}\def^##1^{}\def|{}}
 \gdef\@law@barinfull{\def^{}}
 \gdef\@law@barinshort{\def^##1^{}} 
}
%    \end{macrocode}
%    \begin{macrocode}
\def\bridges#1#2#3#4#5#6{%
 \@ltok@userconetop{#1}%
 \@ltok@userconetopplural{#2}%
 \@ltok@userptop{#3}%
 \@ltok@userptoctwo{#4}%
 \@ltok@useratbridge{#5}%
 \@ltok@useratbridgeplural{#6}%
}
%    \end{macrocode}
% \subsubsection{Miscellaneous other macros}
% Sometimes it might be nice to avoid using {\tt--} for some
% reason, so a macro is defined here.  Same thing for exclamation
% points.  One possible use for the latter is to avoid errors
% when an exported table is sorted by {\tt makeindex}.
%    \begin{macrocode}
\def\dash{--}
\def\exclaim{!}%
%    \end{macrocode}
% The {\tt\string\Id} macro contains its own period.  Therefore a
% period supplied by the user becomes redundant.  This macro is
% redefined to gobble this extra period when necessary.
%    \begin{macrocode}
\def\@law@gobble{}
\def\@law@argtwolist{}
%    \end{macrocode}
% If you are into software history, you might 
% have cause to refer to \LexiTeX, so 
% its logo and the \LexiBib logo (also R.I.P.) are
% defined here.  They are
% {\tt\string\protect}ed just like the \LaTeX\ logo.
%    \begin{macrocode}
\def\p@LexiTeX{{\reset@font\rm\ \unskip\hbox{L%
 \kern-.06em\hbox{\sc e}%
 \kern-.05em\hbox{\sc x}%
 \kern-.05em\lower.65ex\hbox{I}%
 \kern-.18emT%
 \kern-.1667em\lower.65ex\hbox{E}%
 \kern-.125emX}}}%
\def\LexiTeX{\protect\p@LexiTeX}%
\def\p@LexiBib{{\reset@font\rm\ \unskip\hbox{L%
 \kern-.06em\hbox{\sc e}%
 \kern-.05em\hbox{\sc x}%
 \kern-.05em\hbox{\sc i}%
 \kern-.06em{\sc B}%
 \kern-.05em\hbox{\sc i}%
 \kern-.05em{\sc b}}}}%
\def\LexiBib{\protect\p@LexiBib}%
%    \end{macrocode}
% \subsubsection{New environment}
% There is just one new environment in {\sc Camel}, and all it does
% is set the list-input toggle to true, so that input citations
% will feed into memory but not print.
%    \begin{macrocode}
\newenvironment{lexilist}%
{\message{Loading citation data}\@law@listinputtingtrue}%
 {\@law@listinputtingfalse}
%    \end{macrocode}
% \subsubsection{Token registers}
% The following are used as temporary token registers in various
% places.
%    \begin{macrocode}
\newtoks\@ltok@a
\newtoks\@ltok@b
\newtoks\@ltok@argtwo
\newtoks\@ltok@pagesstring
%    \end{macrocode}
% The following token registers are used for temporary storage of
% typeface information.
%    \begin{macrocode}
\newtoks\@ltok@authormainface
\newtoks\@ltok@authoroptionface
\newtoks\@ltok@titlemainface
\newtoks\@ltok@titleoptionface
\newtoks\@ltok@citefirstmainface
\newtoks\@ltok@citefirstoptionface
\newtoks\ltokspecialface
%    \end{macrocode}
% One token register is needed to store the name of the current cite type
% (as declared using {\tt\string\newcitestyle} in the {\tt
% .cit} file).  With this string in hand, all of the
% typeface and punctuation bridge information can be recovered
% for that type of citation.
%    \begin{macrocode}
\newtoks\@ltok@citetype%
%    \end{macrocode}
% Tokens to store info on whether a cite is in a footnote or in
% the main text, and the name of the cite style, in case we
% need it.
%    \begin{macrocode}
\newtoks\@ltok@whereitsat
\newtoks\@ltok@stylename
%    \end{macrocode}
% Ho-hum.  Now we're going to need a bunch of token registers to
% stash the information for a cite.  Token registers have to be
% used in processing, in order to provide expansion control.
%    \begin{macrocode}
\newtoks\@ltok@nickname
\newtoks\@ltok@author
\newtoks\@ltok@name
\newtoks\@ltok@citefirst
\newtoks\@ltok@citepage
\newtoks\@ltok@citelast
\newtoks\@ltok@pageorfootno
\newtoks\@ltok@hereinafter
\newtoks\@ltok@bigsourcecite
\newtoks\@ltok@bigsourcepage
%    \end{macrocode}
% We also need token registers for citation bridge information.
%    \begin{macrocode}
\newtoks\@ltok@atot
\newtoks\@ltok@ttocone
\newtoks\@ltok@conetop
\newtoks\@ltok@conetopplural
\newtoks\@ltok@ptop
\newtoks\@ltok@ptoctwo
\newtoks\@ltok@atbridge
\newtoks\@ltok@atbridgeplural
%    \end{macrocode}
%
%    \begin{macrocode}
\newtoks\@ltok@plistmacro
%    \end{macrocode}
% A counter is required to keep track of the number of cites in a
% footnote, and to store the number that occurred in the previous
% footnote.
%    \begin{macrocode}
\newcounter{citesinfoot}
\newcounter{citeslastfoot}
\newcounter{law@paranormal}
\newcounter{law@parapin}
\newcounter{law@paracounter}
%    \end{macrocode}
% \subsubsection{Peek-word-ahead macro}
% This macro will not work if it is placed after the
% string of "\newif"s below.  I haven't a clue as to
% why.  I'm leery of whether this will cause problems
% with other styles.  If you have problems, contact
% me on "fb@soas.ac.uk".
%    \subsubsection{If initializations}
% We need a toggle so we can turn the print routine on and off;
% this is necessary for list inputting, and for making phantom
% references to sources in order to handle weird citation forms.
%    \begin{macrocode}
\newif\if@law@biblabels
\newif\if@law@usepages
\newif\if@law@table
\newif\if@law@usepinpoints
\newif\if@law@maketable
\newif\if@law@printcite
%    \end{macrocode}
% The next one is used by the list-input environment.
%    \begin{macrocode}
\newif\if@law@listinputting
\newif\if@law@bibentry
%    \end{macrocode}
% We also need to know whether a citation is being used for
% the first time.  In some styles, the first citation is treated
% specially.
%    \begin{macrocode}
\newif\if@law@firstuseofcite
%    \end{macrocode}
% The next if will be used to toggle the print routine between
% long and short citation forms.
%    \begin{macrocode}
\newif\if@law@longcite
%    \end{macrocode}
% This will tell us whether we are in a footnote or not.
%    \begin{macrocode}
\newif\if@law@infoot
%    \end{macrocode}
% The next "\if"  will let us know if the same work was cited
% immediately before the current cite, and if so, whether
% we should pay any attention to a page reference, if given.
%   These are adjusted by
% {\tt\string\law@justabovecheck}.
%    \begin{macrocode}
\newif\if@justabove
\newif\if@l@quiteexact
%    \end{macrocode}
% The next condition will control the way print output is done
% in short citation forms; it should set to false for articles
% and books, and to true for cases and statutes.
%    \begin{macrocode}
\newif\if@nosupra
%    \end{macrocode}
% The next is used to signal the presence of {\tt ++}
% as the argument linking a reference to a page/section number argument.
% This toggles plural bridges on, and 
% tells the file output routine that, for statutes, each section number
% should be attached to a complete copy of the citation
% information.  These copies are later reassembled in a set of
% table entries by {\tt makeindex}.
%    \begin{macrocode}
\newif\if@law@printauthor%
\newif\if@law@printtitle%
\newif\if@law@requiresubjects%
\newif\if@law@subjectfound%
%    \end{macrocode}
% \subsubsection{Macro initializations}
% The following is a grab-bag of small macros with
% simple functions.  There is more to say about what
% other macros use them for than about they themselves,
% so I've put them in the front matter of the code.
%
% First is a little something to force a lowercase {\em id.} if
% necessary.  The operation of {\tt\string\normcase} is
% obvious enough; it defines the case-switching macro
% to a no-op.  \verb+\lowcase+ works by setting
% the case toggle to force a lowercase letter.  The
% use of \verb+\aftergroup+ allows everything to be turned back
% on without losing the lowercase letter.  This was 
% designed by trial and error; there may be a better way.
%    \begin{macrocode}
\def\normcase{\def\@law@lettercase{}}
\def\lowcase{\def\@law@lettercase##1{%
  {\aftergroup\normcase\lowercase{##1}}}}
\normcase
%    \end{macrocode}
% The following three definitions are used in preparing to
% print a citation using "\@law@print" and in printing
% pinpoint references, respectively.  The first extracts
% a demand for plural bridges, if present.  The second
% is a no-op.  The third is the plural bridges flag itself.
%    \begin{macrocode}
\def\@law@multicheck#1\@law@multiflag#2\query#3\end{#2}%
\def\@law@multiflag#1\query{}%
\def\@law@multiset{\global\@ltok@conetop\@ltok@conetopplural%
                   \global\@ltok@atbridge\@ltok@atbridgeplural}
%    \end{macrocode}
% The "\newinterword" macro simple adds its arguments to the
% "\@law@wordlist" macro created by the {\sc Camel} style module
% (i.e.~the "*.cit" file).
%    \begin{macrocode}
\def\newinterword{\begingroup\catcode`\_=13\catcode`\^=13%
  \@law@newinterword}
\def\newinterword#1#2{\global\@ltok@a=\expandafter{\@law@wordlist}%
  \global\@ltok@b={#1}\global\@ltok@c={#2}%
  \xdef\@law@temp{\noexpand\\\noexpand{\the\@ltok@b\noexpand}%
    \noexpand{\the\@ltok@c\noexpand}\the\@ltok@a}%
  \global\let\@law@wordlist\@law@temp\endgroup}
%    \end{macrocode}
% The {\sc Camel}{} nickname macros are now kept out of the name
% space by executing them via \verb+\csname\endcsname+,
% and adding a prefix that makes the macro inaccessible
% by direct reference within the document.  This change
% was recommended by a user---sorry out there, I can't
% remember who!  Note that any nickname can now contain
% numbers and other stuff, which is handy for cases, which
% should be organized according to deciding court and date.
% If in-text references are being "forced" into footnotes,
% the footnote toggles are set to true here; the footnote
% itself is created later, after any optional arguments have
% been gobbled.  Note that footnote forcing will 
% only take effect for "\source" citations, not for
% in-text declarations.  We need a new counter for footnotes,
% so that we can keep track of footnote numbers while processing
% forced footnotes outside of the footnote environment.
%    \begin{macrocode}
\newcount\c@law@footnote%
\def\volno{\message{(No volume for \the\@ltok@nickname)}}%
%    \end{macrocode}
%
% \begin{macro}{\@law@getsubjectheader}
% This macro is used to grab the header appropriate to a given
% declared subject.  The subjects, headers and other related
% information are kept in a single list macro for quick access.
%    \begin{macrocode}
\def\@law@headersearchend{\camelrefname}
\def\@law@abandonheadersearch#1\@law@headersearchend{}
\def\@law@headersearch#1#2#3#4{%
  \def\@law@temptwo{#1}%
  \ifx\@law@temp\@law@temptwo%
   \let\@law@headersearchend\relax%
   \let\\=\@law@abandonheadersearch%
   {}#3%
  \fi}
\def\@law@getsubjectheader#1{%
  {\def\@law@temp{#1}%
  \let\\=\@law@headersearch\@law@subjectlist\@law@headersearchend}}
\let\@law@bibformatsearchend\relax
\def\@law@abandonbibformatsearch#1\@law@bibformatsearchend{}
\def\@law@bibformatsearch#1#2#3#4{%
  \def\@law@temptwo{#1}%
  \ifx\@law@temp\@law@temptwo%
   \let\\=\@law@abandonbibformatsearch%
   {}#4%
  \fi}
\def\@law@getbibformat#1{%
  {\def\@law@temp{#1}%
  \let\\=\@law@bibformatsearch\@law@subjectlist\@law@bibformatsearchend}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@confirmsubject}
% This parser checks whether a given subject exists in
% the list of declared subjects.  It takes no action,
% only issues a warning.
%    \begin{macrocode}
\def\@law@subjectsearchend{%
  \ifx\@law@citesubject\empty%
   \@camel@error{No subject declared.^^J
    After declaring a subject or subjects using
    \string\citationsubject,^^J
    you have neglected to give a subject (using the s= option)^^J
    for one of your \string\source\space commands}\@ehc%
  \else%
   \@camel@error{Undeclared subject `\@law@citesubject'.^^J
    An undeclared subject has been given as an argument to
    a \string\source\space command.^^J  You must first %
    declare subjects using \string\citationsubject}\@ehc%
  \fi}
\def\@law@abandonsubjectsearch#1\@law@subjectsearchend{}
\def\@law@subjectsearch#1#2#3#4{%
  \def\@law@temptwo{#1}%
  \ifx\@law@citesubject\@law@temptwo%
   \let\@law@subjectsearchend\relax%
   \let\\=\@law@abandonsubjectsearch%
  \fi}
\def\@law@confirmsubject{%
  {\let\\=\@law@subjectsearch\@law@subjectlist\@law@subjectsearchend}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@maybeaddcitesubject}
% This macro adds the nickname of the current citation to
% the list of nicknames under the current citation subject.
% It will only do this if the nickname does not already 
% exist in the list.  The effect is to keep the lists
% in citation order.  Note that a citation may be
% listed under more than one citation subject.  This may
% be useful, so it is not prevented.
%    \begin{macrocode}
\def\@law@citesubjectcheckend{%
  \expandafter\let\expandafter\@law@temptwo%
   \csname @law@\@law@citesubject @citelist\endcsname%
  \@ltok@a=\expandafter{\@law@temptwo}%
  \expandafter\xdef%
  \csname @law@\@law@citesubject @citelist\endcsname{%
    \the\@ltok@a\noexpand\\%
  \noexpand{\the\@ltok@nickname\noexpand}}}
\def\@law@abandoncitesubjectcheck#1\@law@citesubjectcheckend{}
\def\@law@citesubjectcheck#1{%
  \def\@law@temptwo{#1}%
  \ifx\@law@nickname\@law@temptwo%
   \let\@law@citesubjectcheckend\relax%
   \let\\=\@law@abandoncitesubjectcheck%
  \fi}
\def\@law@maybeaddcitesubject{%
  {\let\\=\@law@citesubjectcheck%
  \csname @law@\@law@citesubject @citelist\endcsname%
   \@law@citesubjectcheckend}}
%    \end{macrocode}
% \end{macro}
% There are to be three sets of specialized parsing macros in LexiTeX, all
% three of which are used on the options to the "\source"
% command.   One parser reads a
% list of options.  The second reads a comma, {\tt\&}, and {\tt-}
% delimited list and writes the contents as a macro argument.  The
% third reads the same comma, {\tt\&} and {\tt-} delimited list and
% prints it directly on the output after a slight amount of
% formatting work.
% \begin{macro}{\@law@plone}
%  Does a comparison, executes the
% associated option if there is a match.
%    \begin{macrocode}
%<+oldparse>\def\@law@plone#1#2{\def\@law@listitem{#1}%
%<+oldparse>  \ifx\@law@optionitem\@law@listitem #2%
%<+oldparse>  \let\\=\@law@finish\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@end}
% The internal ending character is also common to all parsers.
%    \begin{macrocode}
\def\@law@end{,}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@finish}
% If there is a match, we want to ignore the rest of the list.
% This is macro is defined and ``kept on the shelf'' until such
% time as we need to cut off the rest of the executable list
% macro below.
%    \begin{macrocode}
%<+oldparse>\def\@law@finish#1\@law@nomatch{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@sourceoptionlist}
% At the cost (in the short term) of abandoning helpful error
% messages, from version 1.0r, we use the "keyval" package
% by David Carlisle for all parsing except page numbers.
%    \begin{macrocode}
\define@key{cameloptions}{a}[F]{\global\@law@printauthorfalse}%
\define@key{cameloptions}{t}[F]{\global\@law@printtitlefalse}%
\define@key{cameloptions}{n}[F]{\global\@law@printcitefalse}%
\define@key{cameloptions}{l}[F]{\message{\lowcase}}%
\define@key{cameloptions}{f}[T]{\global\@law@longcitetrue}%
\define@key{cameloptions}{b}[T]{\global\@law@bibentrytrue\global\@law@longcitetrue}%
\define@key{cameloptions}{Z}{}%
\define@key{cameloptions}{s}{\if@law@requiresubjects%
                                \gdef\@law@citesubject{#1}%
                           \fi}%
\define@key{cameloptions}{v}{\gdef\volno{#1}}%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@parse}
% \begin{macro}{\@law@parse}
% Now comes the fun bit.  Control is passed back and forth
% between "\@law@parse" and "\@@parse", with the behaviour of those
% functions altering depending on what is chewed up into them.
% Amazingly enough, it works.  Whatta concept.
%    \begin{macrocode} 
\def\@@parse{\@law@parse}
\let\@law@parse\@law@parseplain 
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@law@alone}
% A copy of "\@law@plone".  Serves same function.
%    \begin{macrocode}
\def\@law@alone#1#2{\def\@law@allistitem{#1}%
  \ifx\@law@alitem\@law@allistitem #2%
  \let\\=\@law@alfinish\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@alnomatch}
% We don't care what goes into this field, so there is no error
% message from the parser.
%    \begin{macrocode}
\def\@law@alfinish#1\@law@alnomatch{\@law@alnomatch}
\def\@law@alnomatch{%
  \global\@ltok@a=\expandafter{\@law@alitem}%
  \xdef\@law@temp{\the\@ltok@argtwo\the\@ltok@a}%
  \global\@ltok@argtwo=\expandafter{\@law@temp}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@allist}
% The list of options is simple and expansible.  The syntax of
% the last two
% lines is required if everything is to work as expected.
% The items in the help message should probably be
% drawn from here, to provide a hook for expansion
% if other styles want to tinker with the options to
% "\source".
%    \begin{macrocode}
\gdef\@law@allist{%
 \\{&}{\gdef\@law@alitem{\@law@delim%
                         \@law@multiflag\@law@multiset\query%
                         \@law@ampersand}}%
 \\{=}{\gdef\@law@alitem{\@law@delim%
                            \@law@pinend%
                            \@law@pingroup%
                            \@law@pinstart}%
       \addtocounter{law@parapin}{1}}%
 \\{-}{\gdef\@law@alitem{\@law@delim
                         \@law@multiflag\@law@multiset\query%
                         \@law@dash}}%
 \\{,}{\gdef\@law@alitem{}%
    \let\@law@parse\@law@alparsesavecomma}%
 \\{_}{\@law@get@ul}%
 \\{^}{\@law@get@carat}%
 \\{|}{\@law@get@bar}%
    \@law@alnomatch}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@get@ul}
% \begin{macro}{\@law@getcarat}
% \begin{macro}{\@law@getbar}
% The purpose of the following is to place {\em active\/}
% versions of the special marking characters on the stack.
% Note that the characters need not be active when read;
% they are replaced with active versions of the characters
% by this routine.  Active characters are sent to the stack
% rather than control strings because they do not swallow
% following space (possibly not important), and because
% this made the whole thing easier to follow in the
% debugging process.
%    \begin{macrocode}
{\catcode`\_=13\catcode`\^=13\catcode`\|=13%
 \gdef\@law@get@ul{\gdef\@law@alitem{_}}%
 \gdef\@law@get@carat{\gdef\@law@alitem{^}}%
 \gdef\@law@get@bar{\gdef\@law@alitem{\@law@delim|}}%
}
\gdef\@law@finishargtwo{%
  \global\@ltok@a={\@law@pingroup\@law@pinstart}%
  \xdef\@law@temp{\the\@ltok@a\the\@ltok@argtwo}%
  \global\@ltok@argtwo=\expandafter{\@law@temp}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\@law@alparsesavecomma}
% \begin{macro}{\@law@alparseplain}
% These parsers are switched in as appropriate.  The first
% checks to see if the end of the string for parsing has
% been reached.  The second cycles a comparison.
%    \begin{macrocode}
\gdef\@law@alparsesavecomma{\@ifnextchar,%
  {\gdef\@law@alitem{\@law@delim\@law@pinend}\@law@alnomatch%
   \expandafter\@law@finishargtwo%
   \@gobble}%
  {\gdef\@law@alitem{\@law@delim%
                     \@law@multiflag\@law@multiset\query%
                     \@law@comma}%
   \@law@alnomatch%
   \let\@law@parse=\@law@alparseplain\@@parse}}
\def\@law@alparseplain#1{%
  \let\@law@nomatch=\@law@alnomatch%
  \gdef\@law@alitem{#1}\let\\=\@law@alone\@law@allist\@@parse}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@law@scanlist}
% This macro is defined and kept on the shelf as a 
% definition of "\\" that checks through the list
% of paired aliases and associated text.  If it finds
% a match, it gives the text one level of expansion,
% to fix the current definition of "_" and "^".
% This allows one entry to serve both between citations,
% and at the start of a citation string.  In addition
% to these macros, a "\@law@wordlist" macro must be
% defined in the ".cst" file used with {\sc Camel}.
%    \begin{macrocode}
\def\@law@scanlist#1#2{\long\def\@law@temp{#1}%
  \@ltok@a={#2}%
  \ifx\@law@temp\@overword\xdef\@SBSword{{\noexpand\em \the\@ltok@a}}%
  \let\\=\@law@finish\fi}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
\def\@law@wlnomatch{\message{^^J^^J%
 There is an unregistered inter-citation word (\@overword) on
 line no \the\inputlineno.  See the LexiTeX documentation
 for more information.  Please email fb@soas.ac.uk if
 you want a word added to the inter-citation list.}}
%    \end{macrocode}
% \begin{macro}{\@law@checkins}
% This macro works with the "\@ifoverword" macro; it checks
% the contents of the "\@overword" macro defined during
% the leap, to see if it corresponds to anything in a list
% of aliases.  The alias list could be defined as a set
% of prefixed macros (to speed things up), or as a 
% single list macro (to conserve string space).  I have
% adopted the latter strategy.  If anyone feels strongly
% that speed is more important, or that somehow the
% integrity of \TeX{} demands that macros be used,
% it's not much of a job to change things; be my
% guest.
%    \begin{macrocode}
{\catcode`\_=\active%
 \catcode`\^=\active%
\gdef\@law@checkins{%
  \def^##1{\lowercase{##1}}\def_##1{{\em{##1}}}%
  \let\@law@tempthree=\\%
  \let\@law@nomatch=\@law@wlnomatch%
  \let\\=\@law@scanlist\@law@wordlist%
  \let\\=\@law@tempthree}
\gdef\@law@checkpre{%
  \let\@law@tempthree=\\%
  \let^\relax\let_\@gobble%
  \let\@law@nomatch=\@law@wlnomatch%
  \let\\=\@law@scanlist\@law@wordlist%
  \let\\=\@law@tempthree}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\source}
% The front end of the "\source" command is very much
% {\em \`a la} typical LaTeX optional command definition stuff.
% We just carry things a little further because there are
% two possible options to the "\source" command.
%    \begin{macrocode}
\gdef\source{%
  \if@law@requiresubjects%
    \gdef\@law@citesubject{}%
  \fi%
  \@law@printcitetrue%
  \@law@printauthortrue%
  \@law@printtitletrue%
  \setcounter{law@parapin}{0}%
  \setcounter{law@paracounter}{0}%
  \@ifnextchar[{\@lexicite}{\@lexicite[]}}
\def\@lexicite[#1]#2{\@ifnextcharcareful[{%
  \addtocounter{law@parapin}{1}\@@lexicite{#1}{#2}}%
  {\@@lexicitenobrace{#1}{#2}}}
%    \end{macrocode}
% Once we've gathered up any optional arguments, it's time
% to use the "\@ifoverword" command.  If we find a "\source"
% command after the next word, we stash the current cite,
% we check the word separating the two "\source" commands
% against an internal list, return the result to
% "\@SBSword", and push the raw citation details and
% the "@SBSword" bridge onto a temporary stack.
%  Otherwise, we clear the "\@SBSword", push the
% current cite details, dump the stack, and
% put the word we found, together with any separating
% space, back on the output stream.
%    \begin{macrocode}
\def\@ifnextcharcareful#1#2#3{%
  \gdef\@prenextcharspace{}%
  \let\reserved@e=#1\def\reserved@a{#2}\def\reserved@b{#3}\futurelet
    \reserved@c\@ifnchcareful}
\def\@ifnchcareful{\ifx \reserved@c \@sptoken \let\reserved@d\@xifnchcareful
      \else \ifx \reserved@c \reserved@e\let\reserved@d\reserved@a\else
          \let\reserved@d\reserved@b\fi
      \fi \reserved@d}
\def\:{\@xifnchcareful}
\expandafter\def\: {%
 \gdef\@prenextcharspace{ }\futurelet\reserved@c\@ifnch}
\def\@@lexicite#1#2[#3]{%
  \@ifoverword\source%
    {\@law@checkins\@@@lexicite{#1}{#2}{#3}}%
    {\gdef\@SBSword{}\@@@lexicite{#1}{#2}{#3}%
      \@law@citedump{}%
      \@preoverwordspace%
      \expandafter\@law@gobble%
      \@overword{} }%
    {\gdef\@SBSword{}\@@@lexicite{#1}{#2}{#3}%
      \@law@citedump{}%
      \@preoverwordspace%
      \expandafter\@law@gobble%
      \@overword{} }}
\def\@@lexicitenobrace#1#2{%
  \@ifoverword\source{\@law@checkins\@@@lexicite%
      {#1}{#2}{}}%
    {\gdef\@SBSword{}\@@@lexicite%
      {#1}{#2}{}%
    \@law@citedump{}%
    \@prenextcharspace%
    \expandafter\@law@gobble%
    \@overword{} }
    {\gdef\@SBSword{}\@@@lexicite%
      {#1}{#2}{}%
    \@law@citedump{}%
    \@prenextcharspace%
    \expandafter\@law@gobble%
    \@overword{} }}
%    \end{macrocode}
% To push citation details, we use a token assignment with
% "\expandafter", then an "\edef" of the register contents
% to get one level of expansion into a macro.
%    \begin{macrocode}
\def\@law@citestack{}%
\gdef\@SBSword{}%
\def\@@@lexicite#1#2#3{%
 \@ltok@a=\expandafter{\@law@citestack}%
 \@ltok@b={\@realcite{#1}{#2}{#3}}%
 \@ltok@c=\expandafter{\@SBSword}%
 \edef\@law@citestack{\the\@ltok@a\the\@ltok@b\the\@ltok@c}}
%    \end{macrocode}
% \begin{macro}{\footnote}
% We need a flag to tell us whether we are in a footnote.
% This allows us to prevent footnote forcing if we're
% {\em already} in a footnote.  \LaTeX{} itself should
% probably take care of this, but for now we need to
% give it
% a helping hand by reinvoking the critical command with 
% Apologies to the \LaTeX3 team and everything, but I
% really truly do need these hooks.
%
% Some thoughts on the tracking of previous citations.  This
% is hardly transparent, and even I the author have trouble
% following it.  Something for tidying up someday.
% Currentcite is set only at the top of a footnote.  The idea
% apparently is that we need to remember the last cite in the
% last footnote always.  Problems to watch here are (a) what
% happens for the very first footnote, and (b) what happens in
% the main text.  There should probably be complete isolation of
% these context records for main text references and footnote
% references. 
%    \begin{macrocode}
\long\def\@footnotetext#1{\insert\footins{%
 \@law@infoottrue%                 % Hooks for citation manager
 \ifnum\the\c@citesinfoot=1\relax%             %
  \global\let\@law@lastcite\@law@currentcite%  %
 \else%                                        %
  \gdef\@law@lastcite{\@dummy}%                %
 \fi%                                          %
 \global\setcounter{citesinfoot}{0}% End of hooks
    \reset@font\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
    \let\@tempa\protect
    \def\protect{\noexpand\protect\noexpand}%
    \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
    \let\protect\@tempa
    \color@begingroup
      \normalcolor
      \@makefntext{%
        \rule\z@\footnotesep\ignorespaces#1%
    \@finalstrut\strutbox}
    \color@endgroup}}
%    \end{macrocode}
% \end{macro}
% We require a simple parser to allow multiple citation
% keys in the scope of a single "\source" command.  We
% ignore any pinpoint given after the "\source" command;
% if you're using pinpoints, write individual "\source"
% commands into your text.  This keeps things relatively
% clean and simple, for future linking to intelligent
% editors.  The voiding of "\@ltok@argtwo" is going
% to be redundant if there are more than two keys
% in the scope, but what the heck, it's simple this way.
% Intervening punctuation is assumed to be the ``default'',
% which is signified by the ";" character.
% Note that any leading options will carry through to
% {\em all\/} of the citations in the key string!
% If you want to suppress the author, say, for only one
% citation, you'd better use a separate "\source" command
% for that citation, and link it to the string with
% an inter-word.
%    \begin{macrocode}
\def\@law@clparseplain#1,{%
  \@ifnextchar,%
    {\def\@law@temp{\@law@onerealcite{#1}}%
     \expandafter\@law@temp\@gobble}%
    {\@law@onerealcite{#1}%
    {\long\def\@overword{;}\@law@checkins%
     \@SBSword\gdef\@SBSword{}}%
    \@@parse}}
%    \end{macrocode}
%
% When citations are dumped, we need to decide what sort
% of delimiters they receive.  If footnote forcing is in
% effect, we need to protect against the possibility
% that we're already in a footnote.  The "\@citedump"
% command should be redefined for styles that bracket
% citation strings in, say, square brackets.
% The following code, the "\@law@printcite" command and the
% contents of the "lexicite.tex" file are the
% only chunks of the style that need modification
% to generate different---perhaps radically different---styles.
% The strategy used here to force footnotes could equally
% well be used to place the citation string
% in a "\marginpar",
% in a floating box, on a facing page or what have you.
% So many possibilities, so little time \ldots
%    \begin{macrocode}
\def\@law@citedump{%
  \if@law@infoot%
    \begingroup\@law@citestack\endgroup%
  \else%
    \if@law@forcefootnotes%
      \footnote{\begingroup\@law@citestack\@law@gobble.\endgroup}%
    \else%
      \begingroup\@law@citestack\endgroup%
    \fi%
  \fi%
\def\@law@citestack{}}
%    \end{macrocode}
% The actual cites 
% should be expanded only after it has been determined that
% the end of a citation string has been reached.
% The expansion sequence for individual citations begins
% here.
%    \begin{macrocode}
\def\@realcite#1#2#3{%
  \ifcat$#1$\else%
   \setkeys{cameloptions}{#1}
  \fi%
  \if@law@requiresubjects%
   \@law@confirmsubject%
  \fi%
  \global\@ltok@argtwo{}%
  \ifcat$#3$\else%
    {\let\@law@parse=\@law@alparseplain\@law@parse #3,,}%
  \fi%
  {\let\@law@parse=\@law@clparseplain\@law@parse #2,,}%
  }
%    \end{macrocode}
% \end{macro}
% The "\@law@onerealcite" macro 
% writes the citation key on the ".aux" file for
% onward use by \BibTeX{}, and initiates citation
% expansion.
%    \begin{macrocode}
\def\@law@onerealcite#1{%
  \@ifundefined{@lnick@#1}%
   {\expandafter\def\csname @lnick@#1\endcsname{%
    {\small\bf\tt <undefined: #1>}
    \@latex@warning
     {Citation `#1' on page \thepage \space undefined}}}%
    {\relax}%
  \if@filesw%
   \immediate\write\@auxout{\string\citation{#1}}%
   \@ifundefined{@law@managerouthook}%
    \relax%
    {\immediate\write\@bibout{\@law@managerouthook{#1}}}%
  \fi%
\global\@law@firstuseofcitefalse%
\csname @lnick@#1\endcsname}
%    \end{macrocode}
% \begin{macro}{\bibitem}
% The bibitem subcommands are redefined, since we don't
% need to export the nickname a second time when using {\sc Camel}.
%    \begin{macrocode}
\def\@lbibitem[#1]{\item[\@biblabel{#1}\hfill]\ignorespaces}
\def\@bibitem{\item\ignorespaces}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\bibliographymanager}
% This macro provides support for external bibliography
% managers.  If a known manager is declared, the key
% is written on an ephemeral file with the name "camel.bib".
% If the manager is then set up to replace
% keys with valid \BibTeX{} ".bib" entries, and is
% run over this file, the resulting file can be used as an
% input file for \BibTeX{}.  Simple.  Clean.  \LaTeX.
%    \begin{macrocode}
\def\@law@subjectlist{}
\def\citationstyle#1{%
  \ifx\@law@subjectlist\empty%
    \def\@law@citesubject{all}
    \expandafter\gdef\csname @law@all@citelist\endcsname{}%
    \def\@law@subjectlist{\\{all}{}{\camelrefname}{}}%
  \fi%
  \if@filesw%
   \immediate\write\@auxout{\string\bibstyle{#1}}%
  \fi%
  \def\@law@savecat{\catcode`@}%
   \makeatletter%
   \input{#1.cst}%
   \input{#1.cit}%
   \catcode`\@=\@law@savecat%
  \@ifundefined{@law@bblfile}%
    {\relax}%
    {\begin{lexilist}
       \@input{\@law@bblfile}
     \end{lexilist}}}
\def\citationdata#1{%
  \def\bibliographymanager{\@camel@error{\string\bibliographymanager\space
      following \string\citationdata.^^J
    You can use only one of \string\citationdata\space and
    \string\bibliographymanager\space^^J at the start of a document
    or after a
    \string\printthebibliography\space command}\@ehc}%
  \if@filesw%
   \immediate\write\@auxout{\string\bibdata{#1}}%
  \fi%
  \@ifundefined{@law@wordlist}%
    {\gdef\@law@bblfile{\jobname.bbl}}%
    {\begin{lexilist}
       \@input {\jobname.bbl}
     \end{lexilist}}}
\def\@camel@error#1#2{%
   \GenericError{%
      \space\space\space\@spaces\@spaces\@spaces
   }{%
      Camel Error: #1%
   }{%
      See the Camel manual for explanation.%
   }{#2}%
}
{\catcode`\%=12 \gdef\@law@percent{%}}
\def\bibliographymanager#1{%
  \def\citationdata{\@camel@error{\string\citationdata\space
      following \string\bibliographymanager.^^J
    You can use only one of \string\citationdata\space and
    \string\bibliographymanager\space^^J at the start of a 
    document or after a
    \string\printthebibliography\space command.}\@ehc}%
  \if@filesw%
   \immediate\write\@auxout{\string\bibdata{camel}}%
  \fi%
  \@ifundefined{@law@wordlist}%
    {\gdef\@law@bibfile{\jobname.bbl}}%
    {\begin{lexilist}%
        \@input {\jobname.bbl}
     \end{lexilist}}%
  \newwrite\@bibout%
  \immediate\openout\@bibout camel.bib%
  \gdef\@law@temp{#1}%
  \gdef\@law@temptwo{procite}%
  \ifx\@law@temp\@law@temptwo%
    \def\@law@managerouthook##1{(##1)}%
  \fi%
  \gdef\@law@temptwo{endnote}%
  \ifx\@law@temp\@law@temptwo%
    \def\@law@managerouthook##1{[##1]}%
  \fi%
  \gdef\@law@temptwo{papyrus}%
  \ifx\@law@temp\@law@temptwo%
    \def\@law@managerouthook##1{\@law@percent\@law@percent##1\@law@percent\@law@percent}%
  \fi%
  \gdef\@law@temptwo{referencemanager}%
  \ifx\@law@temp\@law@temptwo%
    \def\@law@managerouthook##1{\{##1\}}%
  \fi%
  \gdef\@law@temptwo{tib}%
  \ifx\@law@temp\@law@temptwo%
    \def\@law@managerouthook##1{[.##1.]}%
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\lexibib}
% This is used by \LexiBib{} to declare citations in a {\tt lexilist}
% environment.  Use of a single macro permits
% {\tt\string\theholding} and its friends to work more simply.
%    \begin{macrocode}
\def\lexibib#1{\csname new#1\endcsname}%
%    \end{macrocode}
% \end{macro}
%
% We need to initialize the list macro used as a workspace
% by the list macro handlers.
%    \begin{macrocode}
\def\@law@templistmacro{}
\def\@law@tempplistmacro{}
%    \end{macrocode}
% These macros are used for \verb+\if+-branching in various
% formatting routines.
%    \begin{macrocode}
\def\@law@case{case}
\def\@law@statute{statute}
\def\@law@article{article}
\def\@law@book{book}
%    \end{macrocode}
% \subsection{Main macros}
% \subsubsection{Utility macros}
% This section contains larger macros that perform major
% tasks and smaller bits of code that are complex in their operation.
% \begin{macro}{\@law@unstashparas}
% When this is implemented, the above chain of "futurelet" macros
% will be linked to this "\@law@unstashparas" routine, which fetches
% any parallel items, and then (in "\@law@setup") performs the restash
% of the citation if necessary.
% \end{macro}
% \begin{macro}{\@law@clean}
% \begin{macro}{\@law@cleanup}
% This is a rough set of routines; if anyone has a
% suggestion on how to more elegantly clean 
% most of \LaTeX's control sequences for export,
% I would be most grateful to hear from them.
% The effect of these routines is to convert
% control sequences 
% that might be sent to the output files into
% harmless strings.  This is necessary because
% the file cannot be written at the time \verb+\@law@cleanup+
% is called; the page references would be incorrect.
% The definitions are local; bracketing the clean command and
% its arguments will leave the cleaned text in the macro,
% but restore command strings to operation when \LaTeX\ 
% passes out of the current group.
% The "\ifcat" condition at the start (this method of token
% register checking was suggested by Bernd Raichle---who
% scolded me for bothering the \LaTeX3 list with this question!)
% is meant to catch empty
% strings fed to the routine in the fastest possible way.
% Without any checking, things can blow up.
% The use of "\@law@barnil" (somewhere in the middle) makes the vertical-bar
% character turn wimpish and disappear, which is what we want.
% Otherwise it prints weird stuff when it is fed back in through
% the external table.
%   \begin{macrocode}
{\catcode`\_=13\catcode`\^=13\catcode`\|=13%
\gdef\@law@clean#1#2{%
 \def\protect##1{\string##1\space}%
 \ifcat$\the#1$%
   \edef#2{}%
  \else%
 \def^{\string^}%
 \def_{\string_}%
 \@law@barnil%
 \def\volno{\string\volno}%
 \def\exclaim{\string\exclaim}%
 \def\hbox{\string\hbox}%
 \def\&{\string\&}\def\%{\string\%}%
 \def\hskip{\string\hskip}%
 \def\jintercharskip{\string\jintercharskip}%
 \def\char{\string\char}%
 \def~{\string~}\def\/{\string\/}%
 \def\\{\string\\}\def\ {\string\ }\def\sc{\string\sc\space}%
 \def\rm{\string\rm\space}\def\bf{\string\bf\space}%
 \def\em{\string\em\space}%
 \def\={\string\=}%
 \def\`{\string\`}\def\'{\string\'}%
 \def\^{\string\^}\def\"{\string\"}\def\~{\string\~}%
 \def\.{\string\.}\def\u{\string\u}\def\v{\string\v}%
 \def\H{\string\H\space}\def\t{\string\t\space}%
 \def\c{\string\c\space}%
 \def\d{\string\d\space}\def\b{\string\b\space}%
 \def\oe{\string\oe\space}%
 \def\ae{\string\ae\space}\def\aa{\string\aa\space}%
 \def\o{\string\o\space}%
 \def\l{\string\l\space}\def\ss{\string\ss\space}%
 \def\OE{\string\OE\space}\def\AE{\string\AE\space}%
 \def\AA{\string\AA\space}%
 \def\O{\string\O\space}\def\L{\string\L\space}%
 \def\dag{\string\dag\space}\def\ddag{\string\ddag\space}%
 \def\S{\string\S\space}%
 \def\P{\string\P\space}%
 \def\TeX{\string\TeX\space}\def\LaTeX{\string\LaTeX\space}%
 \def\LexiTeX{\string\LexiTeX\space}%
 \def\BibTeX{\string\BibTeX\space}\def\-{\string\-}%
\xdef\@law@temp{\the#1}%
\xdef#2{\expandafter\expandafter\expandafter\@gobble%
\expandafter\string\csname\@law@temp\endcsname}%
\fi}
}
%    \end{macrocode}
% This routine runs the cleaning routine on every 
% token register that we want to send to the external
% files.  The result is stored in a macro, since we
% need the registers for the next citation, and because it
% will be safe to fully expand the contents after cleaning.
%    \begin{macrocode}
\def\@law@cleanup{%
\@law@clean\@ltok@authormainface\@law@authormainfacetemp%
\@law@clean\@ltok@authoroptionface\@law@authoroptionfacetemp%
\@law@clean\@ltok@author\@law@authortemp%
\@law@clean\@ltok@titlemainface\@law@titlemainfacetemp%
\@law@clean\@ltok@titleoptionface\@law@titleoptionfacetemp%
\@law@clean\@ltok@argtwo\@law@argtwotemp%
\@law@clean\@ltok@name\@law@nametemp%
\@law@clean\@ltok@citepage\@law@citepagetemp%
\@law@clean\@ltok@citefirstmainface\@law@citefirstmainfacetemp%
\@law@clean\@ltok@citefirstoptionface\@law@citefirstoptionfacetemp%
\@law@clean\@ltok@citefirst\@law@citefirsttemp%
\@law@clean\@ltok@conetop\@law@conetoptemp%
\@law@clean\@ltok@citelast\@law@citelasttemp%
\@law@clean\@ltok@ptop\@law@ptoptemp}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \subsubsection{Declaration of citation types}
% This section contains macros used in creating the citation
% declaration macros actually entered in the document by the user.
% \paragraph{{\tt @newcite} and its friends}
% The following macros are used to define the macro
% suites that relate to particular citation types.
% These are normally invoked by entries in the {\tt lexicite.tex}
% file, but the \verb+\newcitestyle+ macro is accessible
% within the document as well.
% The \verb+\newcitestyle+ macro expects the following arguments:
% \begin{enumerate}
%  \item the nickname of the citation style to be created;
%  \item a list of typeface and cite type options, in the
%      syntax required by \verb+\@newciteoptions+;
%  \item a list of cite bridges, in the syntax required
%      by \verb+\@newcitebridges+;
%  \item an integer giving the number of arguments the
%      finished cite-generation macro will accept; and
%  \item an argument consisting of a balanced list of six arguments
%      indicating which of the six possible {\sc Camel}\ arguments
%      will be used.
% \end{enumerate}
% The last two of these are fed to \verb+\newcommand+ as formatting
% arguments in the creation of citation style macros.
%  In operation, the token register assignments
% performed by \verb+\@newcitebridges+ and\verb+\@law@parsefaces+
% are memorized by freezing them in macros whose names are
% derived from the name of the citation style.  The freezing
% operation is carried out by a list of token assignments
% within the storage macros.  The macros are \verb+\xdef+ed,
% but the expansion of everything
% except the existing contents of the registers (inserted
% at one level of expansion using \verb+\the+) is prevented
% with \verb+\noexpand+s.  The
% macro containing the faces is created inside \verb+\newcitestyle+
% itself to save an argument position in the definition of 
% \verb+\@law@parsefaces+; we've used up seven, and there are
% only two to go.  This could be done with list
% macros as well, but this method  probably runs a little
% faster because it does the job directly.  The trade-off
% is that the \meta{cite type name}{\tt faces} macros
% contain a lot of non-informative text
% (the names of the token registers); but there are not
% many citation types, so it is probably worth the cost.
% in memory.
% 
% Note that as of this release, citation declarations
% defined with \verb+\newcitestyle+ {\em always\/} begin
% with \verb+\new+.  This will help simplify the integration
% of \BibTeX\ and {\sc Camel}.
%    \begin{macrocode}
\def\newcitestyle#1#2#3{%
\@ifundefined{@law@citeload}%
 {\def\@law@citeload{Loading citation classes: #1 ... }}%
 {\message{\@law@citeload#1}\def\@law@citeload{...\space}}%
 \@newcitebridges#1#3%
  \expandafter\@law@parsefaces#2%
  \expandafter\xdef\csname#1faces\endcsname{%
   \noexpand\global\noexpand\@ltok@authormainface\noexpand{%
    \the\@ltok@authormainface\noexpand}%
   \noexpand\global\noexpand\@ltok@authoroptionface\noexpand{%
    \the\@ltok@authoroptionface\noexpand}%
   \noexpand\global\noexpand\@ltok@titlemainface\noexpand{%
    \the\@ltok@titlemainface\noexpand}%
   \noexpand\global\noexpand\@ltok@titleoptionface\noexpand{%
    \the\@ltok@titleoptionface\noexpand}%
   \noexpand\global\noexpand\@ltok@citefirstmainface\noexpand{%
    \the\@ltok@citefirstmainface\noexpand}%
   \noexpand\global\noexpand\@ltok@citefirstoptionface\noexpand{%
    \the\@ltok@citefirstoptionface\noexpand}%
   \noexpand\global\noexpand\@ltok@citetype\noexpand{%
    \the\@ltok@citetype\noexpand}}%
 \expandafter\gdef\csname new#1\endcsname##1##2##3##4##5##6##7%
  {\@newcite{#1}{##1}{##2}{##3}{##4}{##5}{##6}{##7}}}
%    \end{macrocode}
% The following are parsing routines that are called by \verb+\newcitestyle+.
% In \verb+\@law@parsefaces+, the seven arguments are the string of letters
% in the second argument of \verb+\newcitestyle+.
% This function has been drastically simplified over
% the first release.  I should have done
% it this way in the first place and saved myself a lot of 
% aggravation.  The code should run a lot faster to boot.
%    \begin{macrocode}
\def\@law@parsefaces#1#2#3#4#5#6#7{%
 \@law@parseoneoption\@ltok@authormainface#1%
 \@law@parseoneoption\@ltok@authoroptionface#2%
 \@law@parseoneoption\@ltok@titlemainface#3%
 \@law@parseoneoption\@ltok@titleoptionface#4%
 \@law@parseoneoption\@ltok@citefirstmainface#5%
 \@law@parseoneoption\@ltok@citefirstoptionface#6%
 \@law@parselastoption\@ltok@citetype#7}
%
\def\@law@parseoneoption#1#2{%
  \if#2s\global#1{\sc}\fi%
  \if#2i\global#1{\em}\fi%
  \if#2b\global#1{\bf}\fi%
  \if#2r\global#1{\rm}\fi%
  \if#2S\global#1{\sc}\fi%
  \if#2I\global#1{\em}\fi%
  \if#2B\global#1{\bf}\fi%
  \if#2R\global#1{\rm}\fi}
%
\def\@law@parselastoption#1#2{%
  \if#2a\global#1{article}\fi%
  \if#2b\global#1{book}\fi%
  \if#2c\global#1{case}\fi%
  \if#2s\global#1{statute}\fi%
  \if#2A\global#1{article}\fi%
  \if#2B\global#1{book}\fi%
  \if#2C\global#1{case}\fi%
  \if#2S\global#1{statute}\fi}
%    \end{macrocode}
% Bridges are stored literally, without parsing, so it's
% easy to stash them directly in a single macro that
% is fed the arguments.  The assignments here are stored
% by the same method outlined in the description of
% \verb+\newcitestyle+, above.
%    \begin{macrocode}
\newtoks\@ltok@c%
\newtoks\@ltok@d%
\newtoks\@ltok@e%
\newtoks\@ltok@f%
\newtoks\@ltok@g%
\newtoks\@ltok@h%
\newtoks\@ltok@i%
\newtoks\@ltok@j%
\def\@newcitebridges#1[a]#2[t]#3[c]#4[p]#5(pl)#6[rp]#7[e]:[id]#8(pl)#9[xrf]{%
\@ltok@c{#2}%
\@ltok@d{#3}%
\@ltok@e{#4}%
\@ltok@f{#5}%
\@ltok@g{#6}%
\@ltok@h{#7}%
\@ltok@i{#8}%
\@ltok@j{#9}%
  \expandafter\xdef\csname#1bridges\endcsname{%
   \noexpand\global\noexpand\@ltok@atot\noexpand{\the\@ltok@c\noexpand}%
   \noexpand\global\noexpand\@ltok@ttocone\noexpand{\the\@ltok@d\noexpand}%
   \noexpand\global\noexpand\@ltok@conetop\noexpand{\the\@ltok@e\noexpand}%
   \noexpand\global\noexpand\@ltok@conetopplural\noexpand{\the\@ltok@g\noexpand}%
   \noexpand\global\noexpand\@ltok@ptop\noexpand{\the\@ltok@f\noexpand}%
   \noexpand\global\noexpand\@ltok@ptoctwo\noexpand{\the\@ltok@h\noexpand}%
   \noexpand\global\noexpand\@ltok@atbridge\noexpand{\the\@ltok@i\noexpand}%
   \global\@ltok@atbridgeplural\noexpand{\the\@ltok@j\noexpand}}}%
%    \end{macrocode}
% \subsubsection{Declaration of citation nicknames}
% The following macros are called by the macros generated
% by the \verb+\newcitestyle+ macro and its arguments.
% Their effect is to create nickname macros which can then
% be called by the user with the \verb+\source+
% command, with the nickname as
% a single argument in braces.
% This macro is called by 
% \verb+\new+\meta{citation type name}. While this macro always takes
% seven arguments, some of these may be masked off
% from the user, if fewer than the full possible six
% arguments were called for in the final argument fed
% to \verb+\newcitestyle+ in creating the particular
% \verb+\new+\meta{citation type name} macro that is
% doing the calling.  The arguments are there, the user just
% can't put anything into them.\\
%  The \verb+\@law@authortracing+
% macro is actually just a temporary macro; I gave it a
% descriptive name because it was a struggle to keep my
% head around what it does as I was programming this.
% What happens is that a token assignment of the
% author's name followed by a trip to the cleaning routine
% is used to store a harmless string consisting of the
% entire contents of the author's name field in the
% \verb+\@law@authortracing+ macro.  Then this {\em name\/}
% is defined as a macro, expanding to {\tt 1} or {\tt 2},
% depending on whether it has been defined once already.
% The macro may look something
% like \verb+\Jayeff Huggins~Jr.+.  Drastic, but effective.
% Try doing that with a WordPerfect macro \ldots
%    \begin{macrocode}
\newif\if@law@specialbridges%
\def\@newcite#1#2#3#4#5#6#7#8{%
\message{=}%
  {\@ltok@a={#4}\@law@clean\@ltok@a\@law@temp%
\expandafter\ifx\csname\@law@temp\endcsname\relax%
\expandafter\expandafter\expandafter\xdef\expandafter%
 \csname\@law@temp\endcsname{1}%
\else%
  \expandafter\expandafter\expandafter\xdef\expandafter%
  \csname\@law@temp\endcsname{2}%
\fi}%
%    \end{macrocode}
% The \verb+\@law@stasheverything+ macro creates the
% list macro that can be used to retrieve all citation
% details at a later point in the document.  \verb+\@law@makecitenick+
% creates the short macro that knows how to unstash the stored
% information.  Note that this is where things end
% if we are inside the \verb+lexilist+ environment.\footnote{%
% The previous release used a {\tt\string\@law@stashinfo} macro
% that
% took nine arguments.  The last two were just
% toggles, in effect, for the creation of a long- and a
% short-form nickname macro.  Passing the information in
% this way required the definition of two separate invocation
% macros, one for full-form citing and one for short-form
% citing.
% This was messy.  We now do all of this with 
% true toggles that change the behaviour of a single
% set of routines.  This means:
% \begin{itemize}
% \item We don't need two macros; and
% \item The stash routines can be included in {\tt\string\@newcite}
% itself---information needn't be passed through macro arguments
% at all, which helps speed things up.
% \end{itemize}
% We have to start by emptying the contents of the temporary
% list macro; a beta version didn't do this, and loading cites
% took an amazingly long time.  I had problems with ``{\tt TeX capacity
% exceeded}'' messages, and {\tt\string\tracingmacros=2} showed that every
% cite was a stack containing the desired cite---and every preceding
% citation as well!}
%    \begin{macrocode}
\def\@law@templistmacro{}%
\def\@law@tempplistmacro{}%
\setcounter{law@paranormal}{0}
  \ifcat$\the\@ltok@useratbridgeplural$%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
  \else%
   \@law@addtoken\@ltok@userconetop\tocitelist%
   \@law@addtoken\@ltok@userconetopplural\tocitelist%
   \@law@addtoken\@ltok@userptop\tocitelist%
   \@law@addtoken\@ltok@userptoctwo\tocitelist%
   \@law@addtoken\@ltok@useratbridge\tocitelist%
   \@law@addtoken\@ltok@useratbridgeplural\tocitelist%
  \fi%
\@law@addargument{#1}\tocitelist%
\@law@addtoken\@ltok@bigsourcepage\tocitelist%  (not yet implemented)
\@law@addtoken\@ltok@bigsourcecite\tocitelist%  (not yet implemented)
\@law@addtoken\@ltok@hereinafter\tocitelist%    (not yet implemented)
%    \end{macrocode}
% Two fields are made nil during stash; they will be filled
% when the macro is first unpacked.
%    \begin{macrocode}
  \@law@addargument{}\tocitelist%
  \@law@addargument{}\tocitelist%
\@law@addtoken\@ltok@citetype\tocitelist%     cite type
\@law@addargument{#8}\tocitelist%             cite last part
\@law@addargument{#7}\tocitelist%             cite page
\@law@addargument{#6}\tocitelist%             cite first part
\@law@addargument{#5}\tocitelist%             name of work
\@law@addargument{#4}\tocitelist%             author
\expandafter\gdef\csname @law@#2@lab\endcsname{#3}% label
\@law@addargument{#2}\tocitelist%             nickname
\def\@law@tempplistmacro{}%
\@law@paracheckone{#2}}%
%    \end{macrocode}
%
% \begin{macro}{\@law@paracheckone}
% \begin{macro}{\@law@parachecktwo}
% \begin{macro}{\@law@getpara}
% The following three macros look ahead (after the initial
% arguments to a cite declaration have been digested but {\em
% before\/} the cite information has been stored to the list
% macro) for a {\tt =} sign, which signals parallel citation
% details.  If a {\tt =} sign is found, a further check is made
% for a {\tt [}, which signals a set of special bridges for the
% upcoming parallel citation.  Note the use of two {\tt =} signs
% in braces as the first argument to {\tt\string\@ifnextchar}.
% This is required because of the internal syntax of the
% {\tt\string\@ifnextchar} macro.
%    \begin{macrocode}
\def\@law@paracheckone#1{%
 \def\@law@temp{{#1}}%
 \@ifnextchar{=}%
 {\expandafter\expandafter\expandafter\@law@parachecktwo%
   \expandafter\@law@temp\@gobble}%
  {\@@newcite{#1}}}%
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@law@parachecktwo#1{\@ifnextchar[%
  {\@law@getpara{#1}}%
  {\@law@getpara{#1}[{}{}{}{}{}]}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The following add a single set of parallel citation details
% into a list macro used as a holding area for this purpose.
%    \begin{macrocode}
\def\@law@getpara#1[#2#3#4#5#6]#7#8#9{%
  \addtocounter{law@parapin}{1}
  \def\@law@temp{{#1}}%
  \@law@addpargument{{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}\tolist%
  \@ifnextchar{=}%
   {\expandafter\expandafter\expandafter%
    \@law@parachecktwo\expandafter\@law@temp\@gobble}%
   {\@@newcite{#1}}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@@newcite#1{%
%    \end{macrocode}
% A counter indicating how many parallel citations are stored for
% the current citation, and the
% list macro of parallel citation details built by the
% routines above is stored as a single item in the general list macro of
% citation details.
%    \begin{macrocode}
\@law@addtoken\c@law@paranormal\tocitelist
\@ltok@a\expandafter{\@law@tempplistmacro}%
\@law@addtoken\@ltok@a\tocitelist%
\expandafter\global\expandafter\let\csname @ldata@#1\endcsname=\@law@templistmacro%
\@ltok@userconetop{}%
\@ltok@userconetopplural{}%
\@ltok@userptop{}%
\@ltok@userptoctwo{}%
\@ltok@useratbridge{}%
\@ltok@useratbridgeplural{}%
%    \end{macrocode}
% Having stashed everything, we're ready to make the nickname
% macro itself, and print the long form of the cite.  We set
% "\@law@temp" equal to the nickname macro, and expand after
% the condition so that arguments can be examined---otherwise
% the first thing the nickname sees will be the "\fi".
%    \begin{macrocode}
\@law@makecitenick{#1}%
%    \end{macrocode}
%
%    \begin{macrocode}
  \if@law@listinputting\def\@law@nick{}\else%
  \def\@law@nick{\source[f]{#1}}\fi\@law@nick}%
%    \end{macrocode}
% This macro adds one argument item "#1" to the end
% of list macro "\@law@templistmacro".  This and the
% other list handlers are modelled on the examples in
% Knuth's \TeX book.\source{knuth}+{378}{}
% This and the other macros in this set do their work on
% one list macro, \verb+\@law@templistmacro+, in order
% to avoid the need for lots of \verb+\expandafter+s.
%    \begin{macrocode}
\def\@law@addargument#1\tocitelist{%
  \@law@leftappendargument#1\to\@law@templistmacro}
\long\def\@law@leftappendargument#1\to#2{\@ltok@a={\\{#1}}%
  \@ltok@b=\expandafter{#2}%
  \xdef#2{\the\@ltok@a\the\@ltok@b}}
%    \end{macrocode}
% This macro adds the contents of one token register to
% the temporary list macro.
%    \begin{macrocode}
\def\@law@addtoken#1\tocitelist{\@law@leftappendtoken#1\to\@law@templistmacro}
\long\def\@law@leftappendtoken#1\to#2{%
  \xdef\@law@temp{\noexpand\\\noexpand{\the#1\noexpand}}%
   \@ltok@a=\expandafter{\@law@temp}%
  \@ltok@b=\expandafter{#2}%
  \xdef#2{\the\@ltok@a\the\@ltok@b}}
%    \end{macrocode}
% This macro cuts one token-register item \verb+#1+ from the
% end of list macro "\@law@templistmacro".  The lopoff
% portion is almost straight out of the TeXbook, except
% that it stores the lopped element in a token register
% instead of a macro.
%    \begin{macrocode}
\def\@law@cut#1\fromcitelist{\@law@lop\@law@templistmacro\to#1}
\def\@law@lop#1\to#2{\expandafter\@law@lopoff#1\@law@lopoff#1#2}%
\long\def\@law@lopoff\\#1#2\@law@lopoff#3#4{\global#4={#1}\gdef#3{#2}}
\def\@law@pincut#1\frompinlist{\@law@pinlop\@law@argtwolist\to#1}
\def\@law@pinlop#1\to#2{\expandafter\@law@pinlopoff#1\@law@pinlopoff#1#2}%
\long\def\@law@pinlopoff\@law@pingroup\@law@pinstart#1\@law@pinend#2\@law@pinlopoff#3#4{\global#4={#1}\gdef#3{#2}}
%    \end{macrocode}
%
% \begin{macro}{\@law@addpargument}
% \begin{macro}{\@law@addptoken}
% \begin{macro}{\@law@pcut}
% The following nine macros are used to manipulate a list
% macro containing parallel citation details, and sets of
% token registers into which the list is extracted.
%    \begin{macrocode}
\def\@law@fetchparas{%
  \ifnum\the\c@law@paranormal>\the\c@law@paracounter\relax%
    \@law@pcut\@law@tempplist\fromlist%
    \expandafter\@law@extractparas\@law@tempplist%
  \fi}
\def\@law@extractparas#1#2#3#4#5#6#7#8{%
  \ifcat$\the\@ltok@useratbridge$%
  \else%
    \@ltok@userconetop={#1}%
    \@ltok@userconetopplural={#2}%
    \@ltok@userptop={#3}%
    \@ltok@useratbridge={#4}%
    \@ltok@useratbridgeplural={#5}%
  \fi%
  \global\@ltok@usercitefirst={#6}%
  \global\@ltok@usercitepage={#7}%
  \global\@ltok@usercitelast={#8}}
\def\@law@shiftparas{%
  \ifnum\the\c@law@paranormal>\the\c@law@paracounter\relax%
    \ifcat$\the\@ltok@useratbridge$%
    \else%
      \global\@ltok@conetop\@ltok@userconetop%
      \global\@ltok@conetopplural\@ltok@userconetopplural%
      \global\@ltok@ptop\@ltok@userptop%
      \global\@ltok@ptoctwo\@ltok@userptoctwo%
      \global\@ltok@atbridge\@ltok@useratbridge%
      \global\@ltok@atbridgeplural\@ltok@useratbridgeplural%
    \fi%
      \global\@ltok@citefirst\@ltok@usercitefirst%
      \global\@ltok@citepage\@ltok@usercitepage%
      \global\@ltok@citelast\@ltok@usercitelast%
  \fi}
\def\@law@addpargument#1\tolist{%
  \addtocounter{law@paranormal}{1}%
  \@law@rightappendpargument#1\to\@law@tempplistmacro}
\long\def\@law@rightappendpargument#1\to#2{\@ltok@a={\\{#1}}%
  \@ltok@b=\expandafter{#2}%
  \xdef#2{\the\@ltok@b\the\@ltok@a}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@law@addptoken#1\tolist{\@law@leftappendptoken#1\to\@law@tempplistmacro}
\long\def\@law@leftappendptoken#1\to#2{%
  \xdef\@law@temp{\noexpand\\\noexpand{\the#1\noexpand}}%
   \@ltok@a=\expandafter{\@law@temp}%
  \@ltok@b=\expandafter{#2}%
  \xdef#2{\the\@ltok@a\the\@ltok@b}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@law@pcut#1\fromlist{\@law@plop\@law@tempplistmacro\to#1}
\def\@law@plop#1\to#2{\expandafter\@law@plopoff#1\@law@plopoff#1#2}%
\long\def\@law@plopoff\\#1#2\@law@plopoff#3#4{\gdef#4{#1}\gdef#3{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% This macro turns off the gobbling feature (it may be
% turned on during execution, if {\em Id.} is used), 
% erases any pinpoint reference information that is
% hanging around, and if we are in a footnote, it 
% increments the counter that was set to zero at the
% start of the footnote.  It then
% unpacks all of the info for the cite
% whose nickname is given in \verb+#1+, and puts it into token registers for
% further processing.  After it unpacks the list macro
% \verb+\@ldata@+\meta{nickname}, it unpacks the formatting 
% details appropriate
% to the style in which it was declared.
% After the list is unpacked, 
% {\em if\/} there is no record of a footnote or page number,
% then this is the first printing of the cite.  The note/page
% and footnote/page number details need to be stored, and
% then everything has to be {\em repacked\/}
% for future reference under the appropriate list macro name.
% The list macro strategy allows on-the-fly editing of
% macros which adds greatly to the flexibility of
% the style.\\
% Note the "parabeta" guard below.  When we turn on support for
% parallel citations, we will need to do the restash work later,
% after checking for any attached items.
%    \begin{macrocode}
\def\@law@unstasheverything#1{%
\gdef\@law@gobble{}%
\if@law@infoot%
  \addtocounter{citesinfoot}{1}%
\fi%
\expandafter\let\expandafter\@law@templistmacro\csname @ldata@#1\endcsname%
\global\c@law@footnote\c@footnote%
\@law@cut\@ltok@plistmacro\fromcitelist%
\xdef\@law@tempplistmacro{\the\@ltok@plistmacro}%
\@law@cut\@ltok@a\fromcitelist%
\expandafter\c@law@paranormal\the\@ltok@a%
\@law@cut\@ltok@nickname\fromcitelist%
\@law@cut\@ltok@author\fromcitelist%
\@law@cut\@ltok@name\fromcitelist%
\@law@cut\@ltok@citefirst\fromcitelist%
\@law@cut\@ltok@citepage\fromcitelist%
\@law@cut\@ltok@citelast\fromcitelist%
\@law@cut\@ltok@citetype\fromcitelist%
\@law@cut\@ltok@whereitsat\fromcitelist%
\@law@cut\@ltok@pageorfootno\fromcitelist%
\@law@cut\@ltok@hereinafter\fromcitelist%
\@law@cut\@ltok@bigsourcecite\fromcitelist%(not yet implemented)
\@law@cut\@ltok@bigsourcepage\fromcitelist%(not yet implemented)
\@law@cut\@ltok@stylename\fromcitelist%
\csname \the\@ltok@stylename bridges\endcsname%
\csname \the\@ltok@stylename faces\endcsname%
%    \end{macrocode}
% The following lines check one of the special bridge fields
% for content.  If it is empty, we leave the bridges alone.
% Otherwise, we replace the default bridges with those selected
% by the user for this citation.
%    \begin{macrocode}
\@law@cut\@ltok@a\fromcitelist%
  \ifcat$\the\@ltok@a$%
  \else%
   \@ltok@atbridgeplural\@ltok@a%
   \@law@cut\@ltok@atbridge\fromcitelist%
   \@law@cut\@ltok@ptoctwo\fromcitelist%
   \@law@cut\@ltok@ptop\fromcitelist%
   \@law@cut\@ltok@conetopplural\fromcitelist%
   \@law@cut\@ltok@conetop\fromcitelist%
   \@law@specialbridgestrue%
  \fi%
\ifcat$\the\@ltok@whereitsat$%
  \if@law@requiresubjects%
   \@ifundefined{@law@\@law@citesubject @citelist}%
    {\expandafter\gdef\csname @law@\@law@citesubject @citelist\endcsname{}}%
    {\relax}%
  \fi%
  \@law@maybeaddcitesubject
  \global\@law@firstuseofcitetrue%
%    \end{macrocode}
%    \begin{macrocode}
  \if@law@infoot%
   \global\@ltok@whereitsat\@ltok@infoot%
   \global\@ltok@pageorfootno=\expandafter{\the\c@law@footnote}%
  \else%
   \global\@ltok@whereitsat\@ltok@onpage%
   \global\@ltok@pageorfootno=\expandafter{\the\c@page}%
  \fi%
%    \end{macrocode}
%    \begin{macrocode}
  \if@law@specialbridges% 
   \@law@addtoken\@ltok@conetop\tocitelist%
   \@law@addtoken\@ltok@conetopplural\tocitelist%
   \@law@addtoken\@ltok@ptop\tocitelist%
   \@law@addtoken\@ltok@ptoctwo\tocitelist%
   \@law@addtoken\@ltok@atbridge\tocitelist%
   \@law@addtoken\@ltok@atbridgeplural\tocitelist%
  \else%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
   \@law@addargument{}\tocitelist%
  \fi%
\@law@addtoken\@ltok@stylename\tocitelist%                style name
\@law@addtoken\@ltok@bigsourcepage\tocitelist%(not yet implemented)
\@law@addtoken\@ltok@bigsourcecite\tocitelist%(not yet implemented)
\@law@addtoken\@ltok@hereinafter\tocitelist%  (not yet implemented)
\@law@addtoken\@ltok@pageorfootno\tocitelist%   (1)(b) stash the footnote bridge
\@law@addtoken\@ltok@whereitsat\tocitelist%     (2)(b) footnote number
\@law@addtoken\@ltok@citetype\tocitelist%   cite type
\@law@addtoken\@ltok@citelast\tocitelist%   cite last part
\@law@addtoken\@ltok@citepage\tocitelist%   cite page
\@law@addtoken\@ltok@citefirst\tocitelist%   cite first part
\@law@addtoken\@ltok@name\tocitelist%   name of work
\@law@addtoken\@ltok@author\tocitelist%   author
\@law@addtoken\@ltok@nickname\tocitelist%   nickname
\@law@addtoken\c@law@paranormal\tocitelist% parallels counter
\@law@addtoken\@ltok@plistmacro\tocitelist% parallels
\global\expandafter\let\csname @ldata@#1\endcsname\@law@templistmacro%
\fi%
}
%    \end{macrocode}
% \subsubsection{Calling citation nicknames}
% The nickname macro defined by this routine 
% (\verb+\@lnick@+\meta{nickname}), is immensely
% more compact than in the
% first release.  \verb+\@law@argscheck+ eventually
% leads to \verb+\@law@setup+ after a series of
% checks for optional arguments.  For the longest time I used
% a "\the" statement for the contents of "\@law@argscheck"; "\noexpand" works
% just as well and is much simpler to arrange.
%    \begin{macrocode}
\def\@law@makecitenick#1{%
    \expandafter\xdef\csname @lnick@#1\endcsname{%
    \noexpand\@law@unstasheverything\noexpand{#1\noexpand}%
  \noexpand\@law@setup}}
%    \end{macrocode}
% \begin{macro}{\@law@newcitefirst}
% The following code will be used to kick off the existing "\@newcite"
% routine when hereinafter-style references come to be supported.
%    \begin{macrocode}
%<*hereinafters>
\def\@law@newcitefirst{\@ifnextchar[]{\catcode`\[=??
\catcode`\]=??
\expandafter\@law@newcitesecond\@law@grabhereinafter}
{\@law@newcite}}
\def\@law@grabhereinafter#1{\@ltok@hereinafter={#1}
%</hereinafters>
%    \end{macrocode}
% \end{macro}
% \subsubsection{Table writes and preliminary formatting}
% Once the printing information has been stashed, the
% \verb+\@lnick@+\meta{nickname} macro can be used
% to extract and print it. After extracting the
% information and storing it in token registers,
% this looks forward to gather any pinpointing argument
% that has been appended to the macro in the text.
% Once all the the necessary information has been
% collected, the \verb+\@law@setup+ macro tidies up
% the formatting of the cite and writes it to the
% export file, if the creation of tables for that
% type of citation has been toggled on.  It then
% invokes the print routine.
%
% This macro assumes that all citation information stored
% for the cite has already been retrieved to appropriate token
% registers.  The redefinition of the backslash character
% here allows it to be used to select the alternate
% typeface within a citation argument.  The alternate
% typeface can be changed for all documents by editing
% the relevant {\tt .cst} file.  Grouping braces enclosing
% all operations within \verb+\@law@setup+ mean than
% weird stuff turned on the sole purpose of exporting to
% tables and printing the citation will turn itself off
% when the print routine is finished.  
% A routine (\verb+\@law@justabovecheck+) is run to
% figure out what the citation context is---how
% a cross-reference should be formatted---and
% once it's found out what it needs to know about
% the last citation, information on the current citation
% is tucked away for reference by this the context-checking
% routine next time around.
% A series of checks
% is performed so that superfluous bridges for which there
% is no corresponding argument can be erased.
% Then a file
% write is performed to the appropriate export file, if
% creation of that table has been toggled on.  And finally
% the print routine is called.  The \verb+\@law@gobble+
% that follows the end of the group is used to eat
% a superfluous period if necessary.  It is brought to
% life, if appropriate, by the print routine.
% Note the special catcode of the "|" character during
% this definition.
%    \begin{macrocode}
{\catcode`\|=13%
\long\gdef\@law@setup{%
%    \end{macrocode}
% The following operations restash the citation details if
% necessary; by this point we will have grabbed any parallel
% citation details that we needed.
% The backslash character is redefined as a self-resetting
% font-switching macro.
%    \begin{macrocode}
{\def\@law@firstslash{\begingroup\def\\{\@law@secondslash}%
   \the\ltokspecialface}%
  \def\@law@secondslash{\endgroup\def\\{\@law@firstslash}}%
  \def\\{\@law@firstslash}%
%    \end{macrocode}
% This carries out the necessary checks on the context of the
% current citation.
%    \begin{macrocode}
\@law@justabovecheck%
%    \end{macrocode}
% Now that the \verb+\@law@justabovecheck+ macro has been run,
%  it is time to set up for the next comparison.
% Take note that this source was cited, and of any specific page
% reference it contains, IF we are in a footnote
%    \begin{macrocode}
\if@law@infoot%
   \xdef\@law@currentcite{\the\@ltok@author\the\@ltok@name\the\@ltok@citefirst%
   \the\@ltok@citepage\the\@ltok@citelast}%
   \xdef\@law@lastpage{\the\@ltok@argtwo}%
\fi%
  \begingroup%
  \@law@tidybridges%
  \ifx\@law@citesubject\empty%
   \relax%
  \else%
    \if@law@bibentry%
    \else%
      \ifnum\the\c@law@paranormal=0\relax%
        \csname write@one@\@law@citesubject @entry\endcsname%
      \fi%
    \fi%
  \fi%
  \endgroup%
\@law@print}}}
\def\@law@conetopsetup{%
  \gdef\@law@temp{}%
  \ifx\@law@argtwolist\@law@temp%
  \else%
    \@law@pincut\@ltok@argtwo\frompinlist%
    \expandafter\@law@multicheck\the\@ltok@argtwo%
    \@law@multiflag\query\end%
  \fi}
\def\@law@tidybridges{%
%    \end{macrocode}
% A number of further tidying-up operations are appropriate
% regardless of the form in which the citation will
% be printed.  If certain elements are missing, their
% related bridges must be erased if the citation is not
% going to look awful.  This is also where the author or title
% are suppressed in response to flags given to the "\source" command.
%    \begin{macrocode}
  \if@law@printauthor\else\global\@ltok@author{}\fi%
  \if@law@printtitle\else\global\@ltok@name{}\fi%
  \ifcat$\the\@ltok@author$%
    \global\@ltok@atot{}%
  \fi%
  \ifcat$\the\@ltok@name$%
     \global\@ltok@ttocone{}%
  \fi%
  \ifcat$\the\@ltok@citefirst$%
    \global\@ltok@ttocone{}%
  \fi%
  \ifcat$\the\@ltok@citelast$%
   \global\@ltok@ptoctwo{}%
  \else%
    \xdef\@law@temp{\the\@ltok@citelast}%
    \gdef\@law@temptwo{()}%
    \ifx\@law@temp\@law@temptwo%
     \global\@ltok@citelast{}%
     \global\@ltok@ptoctwo{}%
    \fi%
  \fi%
  \ifcat$\the\@ltok@citepage$%
    \global\@ltok@ptop{}%
  \fi%
  \ifcat$\the\@ltok@argtwo$%
     \global\@ltok@ptop{}%
     \ifcat$\the\@ltok@citepage$%
      \global\@ltok@conetop{}%
     \fi%
  \fi%
%    \end{macrocode}
% Now we run a series of checks to determine the class
% of citation we are dealing with, and if tables
% for that type of citation have been turned on, an export is performed;
% if a cite for export is to a statute, then the special routines
% for handling page references is brought into play.
%    \begin{macrocode}
  \ifcat$\the\@ltok@argtwo$%
   \global\@ltok@ptop{}%
   \global\@ltok@atbridge{}%
   \ifcat$\the\@ltok@citepage$%
     \global\@ltok@conetop{}%
    \fi%
%    \end{macrocode}
%  And here the \verb+\@law@setup+ routine comes to an end;
% punt to the print routine, possibly followed by a gobble,
% if {\em Id.} is printed.
%    \begin{macrocode}
  \fi}
%    \end{macrocode}
% \subsection{Output routines}
% Once the citation has been unpacked and the 
% basic tidying up appropriate to all appearances
% of the citation has been carried out, it is time
% to ship its contents to the various output routines.
% \subsubsection{The print macro}
% This section contains the code for the print routine and
% its supporting macros.  We begin with the supporting stuff.
% \begin{macro}{\@law@justabovecheck}
% Check if immediately preceding cite is the same as this one.
% This macro is called immediately before the citation is
% printed.  There are lots of conditions, but the structure
% is just a straightforward nesting of \verb+\if+ statements,
% each of which sets a toggle or toggles appropriately.
% In the end, this macro tells us:
% \begin{itemize}
% \item Whether the immediately-preceding citation is to
%  the same work; and if it is
%   \item Whether the preceding cite had no pinpoint
%  page reference; and if it had one
%   \item Whether the pages referred to by the two cites
%  are exactly identical.
% \end{itemize}
% Try {\em that\/} with
% WordPerfect!
% If {\sc Camel}\ isn't getting the decisions right, let me know.
%    \begin{macrocode}
\def\@law@justabovecheck{%
  \xdef\@law@temptwo{\the\@ltok@author\the\@ltok@name%
                     \the\@ltok@citefirst\the\@ltok@citepage%
                     \the\@ltok@citelast}%
  \ifx\@law@lastcite\@law@temptwo%
    \ifnum\the\c@citesinfoot=1\relax%
     \@law@justabovecheckdetails%
    \else%
      \ifx\@law@currentcite\@law@temptwo%
       \@law@justabovecheckdetails%
      \else%
       \@justabovefalse%
      \fi%
    \fi%
  \else%
    \ifnum\the\c@citesinfoot>1\relax%
      \ifx\@law@currentcite\@law@temptwo%
       \@law@justabovecheckdetails%
      \else%
       \@justabovefalse%
      \fi%
    \fi%
  \fi}
\def\@law@justabovecheckdetails{%
    \ifx\@law@lastpage\empty%
     \@justabovetrue%
     \@l@quiteexactfalse%
    \else%
     \ifcat$\the\@ltok@argtwo$%
       \@justabovefalse%
      \else%
       \@justabovetrue%
        \xdef\@law@temp{\the\@ltok@argtwo}%
        \ifx\@law@temp\@law@lastpage%
         \@l@quiteexacttrue%
        \else%
         \@l@quiteexactfalse%
        \fi%
      \fi%
    \fi}
%</lexitex>
%    \end{macrocode}
% \end{macro}
% \subsubsection{Proof sheet master document}
% The following short document will generate proof sheets
% for all of the primary styles on the system.  With the standard
% distribution, this produces twelve pages of output.
% \subsection{Proof sheets}
% The following macros produce a proof sheet that shows all
% of the permutations of a citation that I can think of.
% This is useful for those who have to design new citation styles.
% This is a pretty straightforward exercise, except for the
% task of feeding a cite declaration exactly the right
% arguments; this requires re-definition of "\newcitestyle"
% and the re-parsing of the "lexicite.tex" file.
%
% If you find permutations that are not represented here,
% let me know and I'll add them.
%
% \subsection{Macros for data export}
%
% \begin{macro}{\citationsubject}
% This macro toggles on the requirement that every
% citation be assigned to a subject category, and
% adds a subject to the subject list, with all of the
% information needed to create a classified bibliography.
% This information consists of:
% \begin{enumerate}
% \item The nickname for the category, used as the argument
% to the "s=" option in each citation;
% \item The title for use in the bibliography.
% \end{enumerate}
% An optional argument of {\tt t} creates a table, and must be accompanied by
% {\tt o=} and {\tt i=} options giving the extensions of
% the input and output files, and by {\tt h=} and optionally
% may be accompanied by an option of {\tt p} to include
% poinpoints in the table.
%
% NOTE: Definition of "\@law@finish" below is just
% being chucked into as a patch.  This code should all
% be gone over an reorganized sometime when there
% is time for it.
%    \begin{macrocode}
%<*lexitex>
\def\@law@finish#1\@law@nomatch{}
\def\@law@slone#1#2{\def\@law@listitem{#1}%
  \ifx\@law@optionitem\@law@listitem #2%
  \let\\=\@law@finish\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@end}
% The internal ending character is also common to all parsers.
%    \begin{macrocode}
\def\@law@end{,}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@slnomatch}
% If when we execute the list of options we do not find a match,
% we want an error message to go to the terminal.  This is the
% macro that gives the appropriate error message.
%    \begin{macrocode}
\def\@law@slnomatch{\@camel@error{Citation Warning: Invalid 
    option `\@law@optionitem'
    given to \string\citationsubject.^^J%
   Valid options are:^^J
    2 (force a second-level header for a subject)^^J
    p (to include pinpoints in an exported table)^^J
    i=<extension> (use the three-letter extension in^^J
                  exporting a table)^^J
    o=<volume>  (use the three-letter extension in^^J
                 importing a table)^^J%
To avoid errors in formatting, use commas in the option string^^J%
only where they are logically necessary to the sense of the^^J%
string.}\@ehc}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\longestlabelfor}
% This macro set returns a box the exact width of the longest
% string given as a label to citations of a specified
% subject class.
%    \begin{macrocode}
\newlength{\templen}
\newlength{\lawlengthone}
\newlength{\lawlengthtwo}
\def\@law@getlabel#1{\settowidth\lawlengthone{\csname @law@#1@lab\endcsname}%
  \ifnum\lawlengthone>\lawlengthtwo%
    \settowidth\lawlengthtwo{\csname @law@#1@lab\endcsname}%
  \fi}
\def\longestlabelfor#1{%
   \setlength\lawlengthone{0pt}%
   \setlength\lawlengthtwo{0pt}%
   \let\\=\@law@getlabel%
   \csname @law@#1@citelist\endcsname}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@subjectoptionlist}
% The list of options is simple and expansible.  The syntax of
% the last two
% lines is required if everything is to work as expected.
% The items in the help message should probably be
% drawn from here, to provide a hook for expansion
% if other styles want to tinker with the options to
% "\source".
%    \begin{macrocode}
\def\@law@subjectoptionlist{%
 \\{1}{\gdef\@law@level{1}}%
 \\{2}{\gdef\@law@level{2}}%
 \\{p}{\global\@law@usepinpointstrue}%
 \\{P}{\gdef\@law@bibformat{\global\@law@usepagestrue}}%
 \\{o}{\gdef\@law@parsemacro##1{\gdef\@law@outputext{##1}}%
        \let\@law@parse\@law@slparsecomma}%
 \\{i}{\gdef\@law@parsemacro##1{%
          \ifcat$##1$\else%
          \global\@law@maketabletrue%
          \expandafter\gdef\csname\@law@temp inputext\endcsname{##1}%
          \fi}%
        \let\@law@parse\@law@slparsecomma}%
 \\{=}{\let\@law@parse\@law@slparsebumequal}%
 \\{,}{}%
 \\{\end}{\let\@law@nomatch\relax\let\@law@parse\relax}%
    \@law@nomatch}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@law@parselastcheck}
% \begin{macro}{\@law@parsecomma}
% \begin{macro}{\@law@parselastcheck}
% \begin{macro}{\@law@parseplain}
% We switch between three possible forms for the "\@law@parse" macro,
% and we also need to have a special way of ending when the
% delimiter is found in the list.
%    \begin{macrocode}
\def\@law@slparsecomma=#1,{%
  \@law@parsemacro{#1}\let\@law@parse\@law@slparseplain%
  \@@parse}
%    \end{macrocode}
%    \begin{macrocode}
\def\@law@slparsebumequal#1,{\let\@law@parse\@law@slparseplain\@@parse}
%    \end{macrocode}
%    \begin{macrocode}
\def\@law@slparseplain#1{%
  \let\@law@nomatch=\@law@slnomatch%
  \def\@law@optionitem{#1}\let\\=\@law@slone\@law@subjectoptionlist\@@parse}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\def\citationsubject{%
  \@ifnextchar[{\@citationsubject}{\@citationsubject[1]}}
{\catcode`\|=13%
\gdef\@citationsubject[#1]#2#3{%
  \global\let\@law@level\relax%
  \global\@law@usepinpointsfalse%
  \global\@law@maketablefalse%
  \global\@law@requiresubjectstrue%
  \gdef\@law@bibformat{}%
  \def\@law@temp{#2}%
  {\let\@law@parse=\@law@slparseplain\@law@parse #1,\end}%
  \expandafter\gdef\csname write@one@#2@entry\endcsname{}%
  \if@law@maketable%
  \expandafter\def\csname the#2table\endcsname{%
    \@restonecoltrue%
    \if@twocolumn\@restonecolfalse\fi%
    \section*{#3}%
    \@mkboth%
      {\uppercase{#3}}%
      {\uppercase{#3}}%
    \thispagestyle{plain}%
    \parindent\z@\parskip\z@ plus.3\p@\relax%
    \let\item\citationtableitem}
  \expandafter\def\csname endthe#2table\endcsname{%
    \if@restonecol\onecolumn%
    \else\clearpage%
    \fi}%
  \def\itemspace{%
    \par\vskip 10\p@ plus5\p@ minus3\p@\relax}
  \newindex{#2}{\@law@outputext}{\csname#2inputext\endcsname}{#3}%
  \if@law@usepinpoints%
      \expandafter\gdef\csname write@one@#2@entry\endcsname{%
        {\ifcat$\the\@ltok@argtwo$\@ltok@argtwo{\@law@delim}\fi%
          \@ltok@pagesstring\@ltok@argtwo%
          \def\@law@comma{\@law@exportapage}%
          \def\@law@ampersand{\@law@exportapage}%
          \def\@law@dash{\@law@exportapage}%
          \def|{\@law@exportapage}%
          \def\@law@exportapage####1\@law@delim{%
            \@ltok@argtwo{####1}%
            \def\@law@temp{\index[#2]}%
            \edef\@law@temptwo{%
             \noexpand{\string\bibitem %
         \string\source[b,Z=\the\@ltok@nickname]%
         \noexpand{\the\@ltok@nickname\noexpand}%
          \ifcat$\the\@ltok@argtwo$\else>####1\fi\string|maybe\noexpand}}%
            \expandafter\@law@temp\@law@temptwo}
            \expandafter\@law@exportapage\the\@ltok@pagesstring}}%
  \else%
      \expandafter\gdef\csname write@one@#2@entry\endcsname{%
       \def\@law@temp{\index[#2]}%
        \edef\@law@temptwo{%
          \noexpand{\string\bibitem %
          \string\source[b,Z=\csname @law@\the\@ltok@nickname @lab\endcsname]%
         \string{\the\@ltok@nickname\string}\string|maybe\noexpand}}%
       \expandafter\@law@temp\@law@temptwo}%
  \fi%
  \fi%
   \@ltok@a=\expandafter{\@law@subjectlist}%
   \@ltok@c=\expandafter{\@law@bibformat}%
   \if@law@usepinpoints%
     \edef\@law@temp{\noexpand\\\noexpand{#2\noexpand}%
                     \noexpand{p\noexpand}%
                     \noexpand{#3\noexpand}
                     \noexpand{\the\@ltok@c\noexpand}}%
     \@ltok@b=\expandafter{\@law@temp}%
   \else%
     \edef\@law@temp{\noexpand\\\noexpand{#2\noexpand}
                     \noexpand{\@law@level\noexpand}
                     \noexpand{#3\noexpand}
                     \noexpand{\the\@ltok@c\noexpand}}%
     \@ltok@b=\expandafter{\@law@temp}%
   \fi%
    \edef\@law@subjectlist{\the\@ltok@a\the\@ltok@b}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\printbibliography}
% To print bibliographies, we use a single command with two
% modes built into it.
% \changes{1.0n}{95/07/13}{Hacked in a toggle to turn off labels in 
% printbibliography.}
% \changes{1.0q}{96/03/08}{Eliminated the stuff for showing holdings,
%  fact patterns, and so forth.}
% \changes{1.0q}{96/03/08}{Eliminated \texttt{\bs cite} and \texttt{\bs
%  lexicite} aliases of the \texttt{\bs source} command.}
% \changes{1.0r}{96/03/09}{Brace-enclosed the list-macro executions
% in printbibliography, to prevent clashes with kernel definition
% of double-backslash.}
% \changes{1.0t}{97/02/17}{Added missing termination
%  macro @law@finish for use by parsing routines.  Reported
%  by Kevin Haddock, for which many thanks.}
%    \begin{macrocode}
\def\printbibliography{\@ifnextchar[{\@printbibliography}{\@printbibliography[]}}
\def\@printbibliography[#1]#2{%
  \global\@law@forcefootnotesfalse%
  \gdef\@law@temp{#1}\gdef\@law@temptwo{labels=false}%
  \let\camelrefname\refname%
  \expandafter\ifx\csname#2inputext\endcsname\relax%
    \global\@law@tablefalse%
  \else%
    \global\@law@tabletrue%
  \fi%
  \begingroup%
    \def\refname{\@law@getsubjectheader{#2}}%
      \@law@usepagesfalse%
      \@law@getbibformat{#2}
      \let\maybe\@gobble%
      \let\camelfill\relax%
      \let\camelarrow\relax%
  \ifx\@law@temp\@law@temptwo%
        \advance\@totalleftmargin -\labelsep%
        \advance\linewidth \labelsep%
        \def\@biblabel##1{}%
  \fi%
      \if@law@table%
        \if@law@usepages%
          \let\maybe\relax%
          \let\camelfill\dotfill%
          \let\camelarrow\rightarrow%
        \fi%
      \else%
        \longestlabelfor{#2}%
        \ifdim\lawlengthtwo=0pt%
          \advance\@totalleftmargin -\labelsep%
          \advance\linewidth \labelsep%
          \def\@biblabel##1{}%
        \fi%
      \fi%
    \if@law@requiresubjects%
      \@law@dobibliography{#2}%
    \else%
      \gdef\@law@temp{#2}\gdef\@law@temptwo{all}%
      \ifx\@law@temp\@law@temptwo%
        \@law@dobibliography{#2}%
      \else%
      \message{^^J===================================================^^J%
                  Camel bibliography ^^J
                   Document type: without-subjects ^^J
                   Bibliography type: subject-specific (#2) ^^J
                   Action: impossible task, ignoring ...^^J%
                  ===================================================^^J}
      \fi%
    \fi%
  \endgroup}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
\def\@law@dobibliography#1{%
    \begin{thebibliography}{\if@law@biblabels\longestlabelfor{#1}\rule{\lawlengthtwo}{5pt}\fi}
      \if@law@table%
        \if@law@usepages%
          \addtolength{\parsep}{-.5\parsep}%
          \addtolength{\itemsep}{-.5\itemsep}%
        \fi%
      \fi%
      \if@law@requiresubjects%
      \@law@requiresubjectsfalse%
        \if@law@table
      \message{^^J===================================================^^J%
                  Camel bibliography ^^J
                   Document type: subject-classified cites ^^J
                   Bibliography type: subject-specific external (#1) ^^J
                   Action: generating^^J%
                  ===================================================^^J}
          \@input{\jobname.\csname#1inputext\endcsname}
        \else%
        \gdef\@law@temp{#1}\gdef\@law@temptwo{all}%
        \ifx\@law@temp\@law@temptwo%
      \message{^^J===================================================^^J%
                  Camel bibliography ^^J
                   Document type: subject-classified cites ^^J
                   Bibliography type: all citations ^^J
                   Action: header only (not yet implemented)^^J%
                  ===================================================^^J}
        \else%
      \message{^^J===================================================^^J%
                  Camel bibliography ^^J
                   Document type: subject-classified cites ^^J
                   Bibliography type: subject-specific internal (#1) ^^J
                   Action: generating^^J%
                  ===================================================^^J}
          {\let\\\@law@bibslash%
          \csname @law@#1@citelist\endcsname}
        \fi%
        \fi%
      \else%
      \message{^^J===================================================^^J%
                  Camel bibliography ^^J
                   Document type: without-subjects ^^J
                   Bibliography type: all citations ^^J
                   Action: generating^^J%
                  ===================================================^^J}
        {\let\\\@law@bibslash%
        \csname @law@#1@citelist\endcsname}%
      \fi%
     \end{thebibliography}}
\def\@law@bibslash#1{\bibitem [\csname @law@#1@lab\endcsname] \source[b]{#1}. }
%</lexitex>
%    \end{macrocode}
%
% \subsubsection{Citation style definitions}
% No styles are included here.  See the separate style
% files in the {\sc Camel} archive for the matching
% ".bst", ".cst" and ".cit" files that make up each {\sc Camel}
% style variation.  These may be distributed as ".doc"
% files, and should be available on CTAN under
% "/macros/latex/contrib/supported/camel".
% \subsection{Index styles}
% This code, and the table writing code, is provisional;
% this should be made more general.  Less of a hack than the
% original \LexiTeX{} code, though!
%    \begin{macrocode}
%<*camelindex>
actual '#'
quote '!'
level '>'
preamble
"\n"
postamble
"\n"
item_0    "\n"
item_x1   "\n \\subitem "
item_x2   "\n \\subsubitem "
delim_n "\$\\rightarrow\$"
delim_0 "\~\\camelfill"
delim_1 "\$\\camelarrow\$"
% The next lines will produce some warnings when
% running Makeindex as they try to cover two different
% versions of the program:
lethead_prefix   "{\\bf\\hfil "
lethead_suffix   "\\hfil}\\nopagebreak\n"
lethead_flag       1
heading_prefix   "{\\bf\\hfil "
heading_suffix   "\\hfil}\\nopagebreak\n"
headings_flag       0
\ifx\on@line\undefined
  \def\on@line{ on input line \the\inputlineno}
  \errhelp{Support for input line numbers has been added
           to latex.tex <dec91>.^^J^^J%
           Please update to a newer LaTeX release.}
  \errmessage{Obsolete LaTeX release (older than Dec.91)}
\fi
%</camelindex>
%    \end{macrocode}
% \section{A \BibTeX{} Library}
% Considerable modification of an existing ".bst" file
% may be required to make it give output that can be
% digested by {\sc Camel}.  
% You may find that it is actually easier to draft 
% you entry type functions from scratch, using
% the following library of \BibTeX{}
% functions.  See the file "law.dtx" for an example of
% entry types based on this library, and for an example
% of how to tie the library and your own functions 
% together through a driver file entry.
% \newcounter{speccount}
% \def\addline{ & \arabic{speccount}.\addtocounter{speccount}{1} &\let\item\subsequentitem}
% \def\startingitem{\setcounter{speccount}{1}\addline}
% \def\subsequentitem{\\\addline}
% \long\def\spec#1#2#3{%
% \noindent\begin{tabular}{|>{\bf}rc%
%  >{\PreserveBackslash\raggedright\small}p{3.5in}|}\hline
% Expected:
%   \let\item\startingitem #1\\
% &&\\
% Left:
%   \let\item\startingitem #2\\
% &&\\
% Toggles:
%  \let\item\startingitem #3\\
% \hline
% \end{tabular}}
% Each function defined using the {\tt FUNCTION} operator
% is accompanied by a brief description of what it is
% intended to do, followed by a box in the following form:
% \spec{\item What the function expects to find on the stack,
% numbered from the top (most recently pushed) to the bottom
% item.}
% {\item What the function will leave on the stack, numbered in
% the
% same fashion.}
% {\item {\bf toggle name:} What the effect of any toggles is on the
% behaviour of the function.}
%
% Happy reading.
% \subsection{Hello!}
% As ever, we start by telling the world who we are.
%    \begin{macrocode}
%<*bstheader>
FUNCTION { hello }
{
%<jse>"     ============================================"
%<jse>"     for your Camel style and extract again."
%<jse>"     with standard BibTeX, modify the .ins file"
%<jse>"     Warning: localized for jBibTeX.  For use    "
"     ============================================"
"     bibliography package, version 1.0k or later"
"     Use with LaTeX2e and the Camel prototype    "
"     --------------------------------------------"
"     documentation last updated: 5 December 1994 "
"     code last updated: 22 March 1995            "
"     version:           1.0i                     "
"     Camel style package.                        "
"     This is the `law' style for BibTeX and the  "
"     ============================================"
stack$
}
%</bstheader>
%    \end{macrocode}
% \subsection{Variable initializations}
% \DescribeEnv{ENTRY}
% This command takes three braced arguments, which in order are:
% \begin{enumerate}
% \item A list of field names;
% \item A list of integer variables; and
% \item A list of string variables.
% \end{enumerate}
% The field names created here include some not found in the
% standard \BibTeX\ styles.  The use of both the standard and
% these new
% items is fully documented elsewhere, so no commentary is
% given here.  Suffice to say that each item in the list creates
% a field that
% subsequent code can work on.
%    \begin{macrocode}
%<*bstlibrary>
ENTRY
%    \end{macrocode}
%
% \DescribeEnv{field names}
% \mbox{}
%    \begin{macrocode}
{ address
annote
author
booktitle
chapter
edition
editor
howpublished
institution
journal
key
month
note
number
organization
pages
publisher
school
series
title
type
volume
year 
date
jurisdiction
court
division
divno
casedate
translator
booktranslator
cites
units
}
%    \end{macrocode}
%
% \DescribeEnv{entry integers}
% None are defined.  Note that any integers or strings defined
% with the
% ENTRY command are created for {\em each\/} entry in the
% citation list.
%    \begin{macrocode}
{}
%    \end{macrocode}
%
% \DescribeEnv{entry strings}
% There are no general string variables, either.  Such variables
% might be defined for use in building key labels for use in
% sorting, or in an end-of-document bibliography style.
%    \begin{macrocode}
{ label extra.label sort.label }
%    \end{macrocode}
%
% \DescribeEnv{STRINGS}
% A few string macros are needed to hold things
% temporarily removed from the stack.
% \BibTeX\ only allows ten such string variables; the named
% variables in this list will slowly be reduced in number
% through redesign of the functions that require them.
% Meanwhile, let's hope we don't find a sudden need for
% more \ldots
%    \begin{macrocode}
STRINGS { s t u v scrubdate 
 volume.var year.var number.var journal.var pages.var }
%    \end{macrocode}
%
% \DescribeEnv{INTEGERS}
% The following list of integers is probably also larger than
% it needs to be.  Again, optimization of stack usage will
% lead to the elimination of some of these variables.
%    \begin{macrocode}
INTEGERS { itemcount date.specials charcount a b c
           nameptr namesleft numnames a.logical }
%    \end{macrocode}
%
% \DescribeEnv{FUNCTIONS}
% These functions provide strings used in the parsing of
% Japanese legal citations.  If the language of such citations
% is not English, these strings may need to be edited.
%    \begin{macrocode}
FUNCTION {dc..} {"District Court"}
FUNCTION {sc..} {"Supreme Court"}
%    \end{macrocode}
%
% \subsection{Function definitions}
% \subsubsection{Logic and measurement}
% 
% \DescribeEnv{not}
% \DescribeEnv{and}
% \DescribeEnv{or}
% These have been copied verbatim from Oren Patashnik's 1988
% release.
% His commentary on these functions reads: 
% {\em These three functions pop one or two (integer) arguments
% from the stack
% and push a single one, either "0" or "1".
% The {\tt 'skip\$} in the `"and"' and `"or"' functions are used
% because
% the corresponding {\tt if\$} would be idempotent.}
%
% \spec{\item The result of a logical test
% \item The result of a second logical test}
% {\item A single logical test result}
% {\item none}
%
%    \begin{macrocode}
 FUNCTION {not}
 {   { #0 }
     { #1 }
   if$
 }
 FUNCTION {and}
 {   'skip$
     { pop$ #0 }
   if$
 }
 FUNCTION {or}
 {   { pop$ #1 }
     'skip$
   if$
 }
%    \end{macrocode}
%
% \DescribeEnv{times.ten}
% One of the date calculation routines requires
% string-to-integer conversion.  \BibTeX\ primitives can only
% convert in this direction for single characters.  Accordingly,
% we need to be able to raise by a power of ten.
%
% \spec{\item A single integer.}
% {\item A single integer.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {times.ten}
 { duplicate$ duplicate$ duplicate$ duplicate$ duplicate$
   duplicate$ duplicate$ duplicate$ duplicate$
   + + + + + + + + +
 }
%    \end{macrocode}
%
% \DescribeEnv{character.length}
% \BibTeX\ provides a built-in command for measuring the length
% of a string in ``text units''.  Sometimes it's nice to know
% the length of a string in {\em characters\/};
% this function provides
% that facility.
% \changes{1997/01/09}{v1.0s}{Added extraction options for
%  JBibTeX support.}
%
% \spec{\item A string.}
% {\item An integer giving the number of characters in the
% string.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {character.length} 
    { 'u := 
      #0 'charcount := 
      { u empty$ not } 
        { u 
%<jse>         duplicate$
%<eng>         #2
%<jse>         is.kanji.str$ {#3} {#2} if$
          global.max$ substring$ 'u :=
          charcount #1 + 'charcount :=
        }while$
      charcount 
    } 
%    \end{macrocode}
%
% \DescribeEnv{first.in.second}
% This function checks for a substring at the beginning or at the
% end of a given string.  This facility is needed, for example,
% to provide an automated means of toggling the formatting of
% the court division string for Japanese cases.
% In the defintion below, {\tt t} is the substring length, and
% {\tt u} is the string length.
%
% \spec{\item A string toggle.
% \item A string (the string in which to look).
% \item A string (the substring to look for).}
% {\item A single integer ({\tt 0} or {\tt 1}), indicating
% whether
% the substring was found at the specified location in the
% string for search.}
% {\item {\bf end:} The function looks at the end of the
% given string.
% \item{\bf start:} The function looks at the start of the
% given string.}
%
%    \begin{macrocode}
FUNCTION {first.in.second}
    { 's :=
      duplicate$ empty$
      { pop$ pop$ #0 #0 }
      { swap$ duplicate$ character.length 'a :=
        swap$ duplicate$ character.length 'b :=
        b a <
        { pop$ pop$ #0 #0 }
        { s "end" =
          { b a - #1 + global.max$ substring$ =
            { b a - #1 + #1 }
            { #0 #0
            }if$
          }
          { s "start" =
            { #1 a substring$ =
              { #1 #1 }
              { #0
              }if$
            }
            { s "reverse" =
              { b a - #1 + 'b :=
                { b #0 > }
                { duplicate$ 
                  b a substring$ 
                  's :=
                  swap$ duplicate$ s =
                    { pop$ pop$ b #0 'b := #1 }
                    { b #1 =
                      { pop$ pop$ #0 #0 'b := #0 }
                      { swap$ b #1 - 'b :=
                      }if$
                    }if$
                }while$
              }
              { b a - #1 + 'b := #1 'c := 
                { c b < }
                { duplicate$
                  c a substring$
                  's :=
                  swap$ duplicate$ s =
                    { pop$ pop$ c b 'c := #1 }
                    { b c - #1 =
                      { pop$ pop$ #0 b 'c := #0 }
                      { swap$ c #1 + 'c :=
                      }if$
                    }if$
                }while$
              }if$
            }if$
          }if$
        }if$
      }if$
    }
%    \end{macrocode}
%
% \DescribeEnv{get.character.type}
% This function returns one of three strings, `"letter"',
% `"numeral"' or `"other"` to indicate the type of the
% character it finds on the stack.  This was written for
% use in the "gather.chars" function, but may find other
% uses as well.
% \spec{\item Either {\tt *} or a single character to be scanned
% for.
% \item A single character to be examined by the function.}
% {\item Either {\tt letter}, {\tt numeral} or {\tt other}, the
% significance of which depends upon the toggle used.}
% {\item {\tt *} causes the character to be identified as a
% numeral, and letter or something else.
% \item Any character other than {\tt *} causes that character to
% be identified as {\tt other}, and any other characters to be
% identified as {\tt letter}.}
%    \begin{macrocode}
FUNCTION { get.character.type }
  { duplicate$ "*" =
     { pop$ duplicate$ empty$
        { pop$ "other" }
        { chr.to.int$ duplicate$
          duplicate$ #47 > swap$ #58 < and
          { pop$ "numeral" }
          { duplicate$ #64 > swap$ duplicate$ #91 < swap$
            duplicate$ #96 > swap$ #123 < and 'a.logical :=
            and a.logical or
            { "letter" }
            { "other"
            }if$
          }if$
        }if$
     }
     { =
       { "other" }
       { "letter"
       }if$
     }if$
  }
%    \end{macrocode}
% \DescribeEnv{type.last.char}
% This was written in order to handle situations where
% trailing punctuation varies depending upon whether the text
% being punctuated ends in a numeral or not.  The power of the
% library is (finally, in July of 1995) starting to show through.
% \spec{\item A single string.}
% {\item A string, either {\tt numeral}, {\tt letter} or {\tt other}.}
% {\item None.}
%    \begin{macrocode}
FUNCTION { type.last.char }
  { duplicate$ character.length
    #1 substring$
    "*" get.character.type 
  }
%    \end{macrocode}
% \changes{1995/07/08}{1.0m}{New function {\tt type.last.char}
% added, to cope with titles ending in a numeral, hence
% exceptionally requiring a comma in the Blue Book style.}
%
% \subsubsection{Housekeeping}
% These functions are used to issue warning messages and avoid
% errors during processing.
%
% \DescribeEnv{empty.to.null}
% This is simply the "field.or.null" function from the standard
% styles, renamed so that I could more easily remember what it
% does.  Invoked only by the output routines, it assures that
% empty field markers are replaced with the null string, to
% prevent smash-ups.
%
% \spec{\item The contents of a field, which may be an empty
% field marker.}
% {\item A string, possibly the null string.}
% {\item none}
%
%    \begin{macrocode}
 FUNCTION {empty.to.null}
 { duplicate$ empty$
     { pop$ "" }
     'skip$
   if$
 }
%    \end{macrocode}
%
% \DescribeEnv{check}
% This check function isolates the production of warning
% messages from the output routines, to enhance transparency.
% Note that this will not convert an empty field marker to
% the null string; that is left to the output routines.
%
% \spec{\item A string for
% use in an error message.
% \item The contents of a field.}
% {\item The field contents.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION { check }
{ 't :=
  duplicate$ empty$
  { "empty " t * " in " * cite$ * warning$}
  'skip$
  if$
}
%    \end{macrocode}
%
% \DescribeEnv{either.or}
% This checks whether one of a two-item pair is empty.
% If at least one is empty, the other is returned to the
% stack.  If both are non-empty, a warning is issued, and
% one item is arbitrarily selected.
%
% \spec{\item A string.
% \item A string.}
% {\item A single string.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {either.or}
 { duplicate$ empty$
   { pop$ duplicate$ empty$
     { pop$ "" }
     'skip$
     if$
   }
   { swap$ duplicate$ empty$
     { pop$ }
     { "both items in an either.or pair are non-empty in " cite$ *
       warning$
       "  I'm using only ONE of these items (the second passed by the function)."
       warning$
       pop$
     }if$
   }if$
 }
%    \end{macrocode}
% \DescribeEnv{either.or.nowarning}
% This does the same thing as "either.or", but does not issue a
% warning if both items exist.  As with that function, the second
% item pushed is preferred.
%
% \spec{\item A string.
% \item A string.}
% {\item A single string.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {either.or.nowarning}
 { duplicate$ empty$
   { pop$ duplicate$ empty$
     { empty.to.null }
     'skip$
     if$
   }
   { swap$ pop$ }
   if$
 }
%    \end{macrocode}
%
% \subsubsection{Output}
% In the interest of transparency, I have tried to make the
% output functions as simple to use and as flexible in their
% operation as possible.  Every output routine expects to find
% three items on the stack, and the name of each routine
% describes how it will react to what it finds there.  
% To keep things tidy, the empty field marker
% is replaced with the null string only by the output
% routines.\\
% The names
% are sometimes coincidentally comical, but I hope informative
% as well.
%
% \DescribeEnv{must.must.must}
% The simplest
% output routine is the "must.must.must" routine; it
% simply catenates the three strings, replacing any
% empty field markers it finds with the null string.
%
% \spec{\item A string.
% \item A string.
% \item A string.}
% {\item none}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {must.must.must}
    { empty.to.null 't :=
      empty.to.null swap$ empty.to.null swap$ t
      * * 
      write$
    }
%    \end{macrocode}
%
% \DescribeEnv{might.ifone.must}
% This output routine is heavily used for conditional
% output. If the deepmost of the three stack items is an empty
% field marker, the only the topmost item is written to the
% output file.  If this is not the case, then the three items are
% written in order.
%
% \spec{\item A string.
% \item A string.
% \item A string.}
% {\item {\em none}}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {might.ifone.must}
    { empty.to.null 't :=
      swap$ duplicate$ empty$
      { pop$ pop$ t }
      { swap$ empty.to.null t * * }
      if$
      write$
    }
%    \end{macrocode}
%
% \DescribeEnv{iftwo.might.iftwo}
% This function is typically used to output a formatted item
% in enclosing braces, where the entire item and its braces
% should be suppressed if the item is empty.
%
% \spec{\item A string.
% \item A string.
% \item A string.}
% {\item none}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {iftwo.might.iftwo}
    { 't :=
      duplicate$ empty$
       { pop$ pop$ }
       { empty.to.null swap$ empty.to.null swap$
         t empty.to.null
         * * write$ }
      if$
    }
%    \end{macrocode}
%
% \DescribeEnv{must.ifthree.might}
% This function is used to output a definitely-existing item
% followed by something that might not exist with intervening
% punctuation that ought to disappear if it's not needed.
%
% \spec{\item A string.
% \item A string.
% \item A string.}
% {\item none}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {must.ifthree.might}
    { duplicate$ empty$
       { pop$ pop$ empty.to.null }
       { 't := 
         swap$ empty.to.null
         swap$ empty.to.null
         t * *
       }if$
      write$
    }
%    \end{macrocode}
%
% \subsubsection{Parsing and conversion}
%
% \DescribeEnv{field.tag.no.combine}
% The "no" here stands for ``number''.
% This function is typically used to simplify the task of
% building a numbered label for something (e.g.\ a technical
% report).  It provides facilities for handling blank
% entries, so that these error-handling routines do not
% need to be drafted from scratch for every such
% situation.
% 
% \spec{\item A string toggle.
% \item An identifier (i.e.\ a report number).
% \item A text prefix for the identifier.
% \item A string label (i.e.\ ``Technical Report'' or somesuch).}
% {\item A single string.}
% {\item {\bf endlabel:} Combines the text items in the same order
% in
% which they are found.
% \item {frontlabel:} Places the label in front, followed by the
% identifier, followed by the first item pushed.}
%
%    \begin{macrocode}
FUNCTION {field.tag.no.combine}
  { "endlabel" =
    { duplicate$ empty$
      { pop$ pop$ empty.to.null }
      { empty.to.null 's := empty.to.null
      swap$ empty.to.null swap$ s * *
      }if$
    }
    { duplicate$ empty$
      { pop$ pop$ empty.to.null }
      { empty.to.null 's := empty.to.null
        swap$ empty.to.null s swap$ * * 
      }if$
    }if$
  }
%    \end{macrocode}
%
% \DescribeEnv{change.letter.case}
% This is a simple front-end to the {\tt change.case\$} built-in
% function, used to change characters in a string from upper to
% lower case.  It slightly enhances the built-in function by
% providing an option that leaves the string alone.
%
% \spec{\item A single character---either 
% an {\tt n}, a {\tt t}, an {\tt l}, or a {\tt u}.
% \item A string for conversion.}
%  {\item One string, converted according to the option toggle
% pushed
% after the string.}
% {\item {\bf n:} yields the string unchanged.
% \item {\bf t:} yields
% all lower case letters except for the first.
% \item {l:} yields all lower case letters.
% \item {u:} yields all
% upper case letters.}
%
%    \begin{macrocode}
FUNCTION {change.letter.case}
    { 't :=
      duplicate$ empty$
        'skip$
        { t chr.to.int$ "n" chr.to.int$ =
          'skip$
          { t change.case$ }
          if$
        }
      if$
    }
%    \end{macrocode}
%
% \DescribeEnv{n.dashify}
% The "n.dashify" function makes each single "-" in a string a
% double "--".
% if it's not already.\footnote{This comment by Oren Patashnik.}
%
% \spec{\item A single string for conversion.}
% {\item A single converted string.}
% {\item none}
%
%    \begin{macrocode}
 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$ *
        t #2 global.max$ substring$ 't :=
      }
       if$
     }
   while$
 }
%    \end{macrocode}
%
% \DescribeEnv{gather.chars}
% The following function was designed for date parsing, but
% may find other uses as well.  It finds the first letter or
% numeral in a given string, then proceeds to build a substring
% until it hits a different character type or the end of the
% string,
%  at which point it
% stops parsing and terminates.
%
% \spec{\item A string for parsing.}
% {\item A string toggle showing the character type of the
% first homogenous substring in the string for parsing.
% \item A string of characters from the front of the given string
% which are letters or numbers only.
% \item The remainder of the string.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION { gather.chars }  
  { 
    "forward" =
    { swap$ duplicate$ character.length 'a :=
      't :=
      duplicate$
      { t #1 #1 substring$ swap$ get.character.type
        "other" = 
        t empty$ not and }
      { t #2 global.max$ substring$ 't := duplicate$
      }while$
      duplicate$ t #1 #1 substring$ swap$ get.character.type
      t #1 #1 substring$ swap$
      "" swap$ duplicate$ 'u :=
      t #2 global.max$ substring$ 't :=
      { u = }
      { * swap$
        u * 'u :=
        u #1 #1 substring$ swap$
        u #1 #1 substring$
        u #2 global.max$ substring$ 'u :=
        t #1 #1 substring$ swap$ get.character.type
        t #1 #1 substring$ swap$
        duplicate$ u =
        { t #2 global.max$ substring$ 't :=  }
        { swap$ pop$
        }if$
      }while$
      swap$ pop$ t swap$ u
    }
    { swap$ duplicate$ character.length 'a :=
      't :=
      duplicate$
      { t a #1 substring$ swap$ get.character.type
        "other" =
        t empty$ not and }
      { a #1 - 'a :=
        t #1 a substring$ 't := 
      }while$
      duplicate$ t a #1 substring$ swap$ get.character.type
      t a #1 substring$ swap$
      "" swap$ duplicate$ 'u :=
      a #1 - 'a :=
      t #1 a substring$ 't :=
      { u = }
      { swap$ * swap$
        u * 'u :=
        u #1 #1 substring$ swap$
        u #1 #1 substring$
        u #2 global.max$ substring$ 'u :=
        t a #1 substring$ swap$ get.character.type
        t a #1 substring$ swap$
        duplicate$ u =
        { a #1 - 'a := t #1 a substring$ 't :=  }
        { swap$ pop$
        }if$
      }while$
      swap$ pop$ t swap$ u
    }if$
  }  
%    \end{macrocode}
%
% \DescribeEnv{tie.or.space.connect}
% We use this function from the standard styles.  It 
% adds a tie if the string it is applied to is three
% characters or less in length.
%
% \spec{\item A string
% \item A second string}
% {\item One string}
% {\item {none}}
%
%    \begin{macrocode}
 FUNCTION {tie.or.space.connect}
 { duplicate$ text.length$ #3 <
     { "~" }
     { " " }
   if$
   swap$ * *
 }
%    \end{macrocode}
%
% \DescribeEnv{format.pages}
% This function accepts one toggle option currently,
% but it is open to expansion.  If the "short" toggle is
% fed to this function, it reads through the field until
% it hits a non-integer character.  Otherwise, it "n.dashify"s
% the
% whole field.  This needs robustification; the page number
% might be a roman numeral.  Might it be simplest to just 
% drop the scan when we hit a "-"?  Deserves some thought.
%
% \spec{\item A toggle string.
% \item page number or possibly
% a range of pages.}
% {\item One string, constituting a finished page number, or {\tt
% empty\$}.}
% {\item {\bf short:} will return only the
% first number given in the string.
% \item {full:}
% will return the page number, n-dashified.}
% \changes{1994/12/05}{1.0e}{Altered {\tt format.pages} so
% that the {\tt short} scan stops at a {\tt-} character,
% rather than a non-integer.  Simpler and more robust.}
%    \begin{macrocode}
FUNCTION {format.pages}
    { swap$ duplicate$ empty$
      { pop$ pop$ "" }
      { swap$ duplicate$ "short" =
        { pop$
          's :=
          ""
          s #1 #1 substring$
          { "-" = not }
            { s #1 #1 substring$ *
              s #2 global.max$ substring$ 's :=
              s #1 #1 substring$
              duplicate$ "" =
                { pop$ "-" }
                'skip$
                if$
            }
          while$
        }
      { "full" =
        { pages n.dashify }
        { "invalid switch fed to the format.pages function"
           warning$
        }if$
      }if$
    }if$
}
%    \end{macrocode}
%
% \paragraph{Names}
% The code for parsing and formatting names is extremely
% economical,
% thanks to the powerful built-in functions that \BibTeX\
% supplies
% for this purpose.
%
% \DescribeEnv{format.names}
% This is based on Oren Patashnik's original function of the same
% name.  His comment was as follows:
% \begin{quote}
% The format.names function formats the argument (which should
% be in
% \BibTeX name format) into ``{\tt First Von Last, Junior}'',
% separated by commas
% and with an "and" before the last (but ending with "et~al." if
% the last
% of multiple authors is "others").  This function's argument
% should always
% contain at least one name.
% The format.authors function returns the result of
% format.names(author)
% if the author is present, or else it returns the null string.
% \end{quote}
%
% This function is used to format any name field that is
% thrown at it.  It is based on the 1988 release, but with
% modifications
% to permit toggling, since the Blue Book requires different
% author
% formats for different types of material.  The toggling strategy
% should also make modification of this style a pretty simple
% matter.
%
% \spec{\item The contents of one name field
% \item  string toggle
% (either {\tt firstinitial}, {\tt lastonly} or {\tt full})}
% {\item A single string, containing a formatted name or names,
% or {\tt empty\$}}
% {\item {\bf firstinitial:} Yields the form ``F.~Bennett, Jr.''
% \item {lastonly:}
% Yields the form ``Bennett''
% \item {\bf full:} yields ``Frank Bennett, Jr.''}
%
%    \begin{macrocode}
FUNCTION {format.names}
    { swap$ duplicate$ empty$
        { swap$ pop$ }
        { 's :=
          'u :=
          #1 'nameptr :=
          s num.names$ 'numnames :=
          numnames 'namesleft :=
          { namesleft #0 > }
            { u "lastonly" =
              { s nameptr "{vv~}{ll}" format.name$ 't := }
              { u "firstinitial"  =
                { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
                { u "full" =
                  { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=}
                  { "style error; invalid or non-existent toggle" warning$ }
                  if$
                }
                if$
              }
              if$
              nameptr #1 >
                { namesleft #1 >
                  { ", " * t * }
                  { numnames #2 >
                    { "," * }
                    'skip$
                    if$
                    t "others" =
                      { " et~al." * }
                      { " and " * t * }
                    if$
                  }
                if$
                }
                't
              if$
              nameptr #1 + 'nameptr :=
              namesleft #1 - 'namesleft :=
            }
          while$
        }
      if$
    }
%    \end{macrocode}
%
% \paragraph{Dates}
% The style code for parsing and formatting dates is much more
% complex than that for names.  This is due to the need to
% build the necessary tools out of \BibTeX\ primitives, since
% no built-in tools for this task are supplied.  There are
% two date formatting routines below.  The simpler of the two
% is "format.month.year".  This is basically just the function
% supplied with the standard \BibTeX\ styles, under a new name.
% The \LexiBib\ version of "format.date" is underpinned by
% a whole set of new
% functions, and allows great flexibility in the syntax
% for entering dates.
%
% \subparagraph{Old format routine}
%
% \DescribeEnv{format.month.year}
% The "format.date" function is for the month and year, but we
% give a warning if
% there's an empty year but the month is there, and we return the
% empty string
% if they're both empty.\footnote{This comment by Oren
% Patashnik.}
%
% This is not changed over the "format.date" function in the 
% original standard \BibTeX{} styles.  It is retained, although
% the distributed \LexiBib\ styles won't be making use of it.
%
% \spec{\item none}
% {\item A single string.}
% {\item none}
%
%    \begin{macrocode}
 FUNCTION {format.month.year}
 { year empty$
     { month empty$
      { "" }
      { "there's a month but no year in " cite$ * warning$
        month
      }
       if$
     }
     { month empty$
      'year
      { month " " * year * }
       if$
     }
   if$
 }
%    \end{macrocode}
%
% \subparagraph{New date parsing routines}
% The "format.date" function depends upon a number of
% supporting functions.  Some of these are of general utility,
% and are presented above.  Those presented here are specific
% to this particular function.
%
% \DescribeEnv{fillout.a.year}
% This adds a leading "19" to a year entered in two-digit
% form.
%
% \spec{\item A single string.}
% {\item A single string.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {fillout.a.year}
 { duplicate$ character.length #2 =
   { "19" swap$ * }
   'skip$
   if$
 }
%    \end{macrocode}
%
% \DescribeEnv{parse.month}
% This function is a simple parser, used in converting
% database entries that have been identified as probable
% abbreviated month entries into numerical string form.
%
% \spec{\item A single string, which should consist of
% exactly three alphabetic characters.}
% {\item A single string of numbers.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {parse.month}
 { duplicate$ "jan" =
   { pop$ "1" }
   { duplicate$ "feb" =
     { pop$ "2" }
     { duplicate$ "mar" =
       { pop$ "3" }
       { duplicate$ "apr" =
         { pop$ "4" }
         { duplicate$ "may" =
           { pop$ "5" }
           { duplicate$ "jun" =
             { pop$ "6" }
             { duplicate$ "jul" =
               { pop$ "7" }
               { duplicate$ "aug" =
                 { pop$ "8" }
                 { duplicate$ "sep" =
                   { pop$ "9" }
                   { duplicate$ "oct" =
                     { pop$ "10" }
                     { duplicate$ "nov" =
                       { pop$ "11" }
                       { duplicate$ "dec" =
                         { pop$ "12" }
                         { "invalid month in " cite$ * warning$
                           "passing text to Camel verbatim" warning$
                           "t" 'scrubdate :=
                         }if$
                       }if$
                     }if$
                   }if$
                 }if$
               }if$
             }if$
           }if$
         }if$
       }if$
     }if$
   }if$
 }
%    \end{macrocode}
%
%
%
% \DescribeEnv{format.month.name}
% \changes{1994/08/09}{v1.0b}{Added {\tt swap\$} as appropriate
% to expose string on stack for {\tt empty\$} check.}
% This takes a numerical string and converts it to either an
% abbrviated or a spelled-out month name.
%
% \spec{\item A toggle string.
% \item A numerical string.}
% {\item A string.}
% {\item {long:} The month name placed on the stack will be
% spelled out.
% \item{short:} The month name will be abbreviated.}
%
%    \begin{macrocode}
FUNCTION { format.month.name }
 { swap$ duplicate$ empty$
   { pop$ pop$ "" }
   { swap$ "long" = 
     { duplicate$ "1" =
       { "January" }
       { duplicate$  "2" =
         { "February" } 
         { duplicate$  "3" =
           { "March" } 
           { duplicate$ "4" =
             { "April" } 
             { duplicate$  "5" =
               { "May" } 
               { duplicate$ "6" =
                 { "June" } 
                 { duplicate$  "7" =
                   { "July" } 
                   { duplicate$  "8" =
                     { "August" } 
                     { duplicate$  "9" =
                       { "September" } 
                       { duplicate$  "10" =
                         { "October" } 
                         { duplicate$  "11" =
                           { "November" } 
                           { duplicate$  "12" =
                             { "December" }
                             { "invalid month in " cite$ * warning$ "" 
                               "passing text to Camel verbatim" warning$
                               "t" 'scrubdate :=
                             }if$
                           }if$
                         }if$
                       }if$
                     }if$
                   }if$
                 }if$
               }if$
             }if$
           }if$
         }if$
       }if$
     }
     { duplicate$ "1" =
       { "Jan." }
       { duplicate$  "2" =
         { "Feb." } 
         { duplicate$  "3" =
           { "Mar." } 
           { duplicate$ "4" =
             { "Apr." } 
             { duplicate$  "5" =
               { "May" } 
               { duplicate$ "6" =
                 { "Jun." } 
                 { duplicate$  "7" =
                   { "Jul." } 
                   { duplicate$  "8" =
                     { "Aug." } 
                     { duplicate$  "9" =
                       { "Sept." } 
                       { duplicate$  "10" =
                         { "Oct." } 
                         { duplicate$  "11" =
                           { "Nov." } 
                           { duplicate$  "12" =
                             { "Dec." }
                             { ""
                             }if$
                           }if$
                         }if$
                       }if$
                     }if$
                   }if$
                 }if$
               }if$
             }if$
           }if$
         }if$
       }if$
     }if$
swap$ pop$
   }if$
 }
%    \end{macrocode}
%
% \DescribeEnv{extract.date}
% This function takes a labelled stack of numeric items,
% and places its contents in a formatted string on
% the stack.  It is a subroutine called by "format.date", and is
% not intended for use directly in entry type functions.
%
% The behaviour of this function is a little too complex
% to describe its input and output behaviour using our
% usual description box, so we revert to prose here.
% The expectation of what will appear on the
% stack depends on the contents of the integer
% variable "itemcount".  For each date item counted, the
% function expects to find two items on the stack: a
% string possibly flagging the variable into which the
% item should be placed; and a numerical string.
%
% If "itemcount" is "0", we check to see whether the streamlined
% format for parallel citations has been used.  If not, a warning 
% of an empty date is issued.
%
% If "itemcount" is "1", the flag string is ignored,
% and the numerical item is assumed to be a year.
%
% If "itemcount" is "2", the flag strings are both
% ignored, and the numerical items are assumed to be
% a year and a month, in that order.
% 
% If "itemcount" is "3", the first item is assumed to
% be a year.  The assignment of the second two items
% depends first upon the contents of the integer
% variable "date.specials".  If this is "0", then
% the flags are ignored, and the numerical items are
% assumed to be a day and a month, in that order.
% If "date.specials" is "1" (`true'), then the
% flag of the first item is checked to see whether it
% is ``"month"''.  If so, the first item is assigned to
% the "themonth" variable, and the next to the "theday"
% variable.  Otherwise the assignments are reversed.
%
%    \begin{macrocode}
FUNCTION {extract.date}
    { 'v := "" 's := "" 't := "" 'u :=
      itemcount #0 =
      { cites empty$
        { "some date or other is COMPLETELY empty in " cite$ *
          warning$ }
        'skip$
        if$
      }
      { itemcount #1 =
        { pop$ fillout.a.year 's := "" 'u := "" 't := }
        { itemcount #2 =
          { pop$ swap$ pop$ swap$ duplicate$ character.length #4 =
            { swap$ "--" swap$ * * 's := "" 't := }
            { swap$ fillout.a.year 's := 't :=
            }if$
            "" 'u :=
          }
          { itemcount #3 =
            { date.specials
              { pop$ fillout.a.year 's := 
                "month" =
                { 't :=
                  pop$ 'u := }
                { 'u :=
                  pop$ 't :=
                }if$
              }
              { pop$ fillout.a.year 's :=
                pop$ 'u :=
                pop$ 't :=
              }if$
            }
            { "too many items for date in " cite$ * warning$
            }if$
          }if$
        }if$
      }if$
      v duplicate$ "month.dd.yy" =
      { pop$ s ", " u "\ " t "long" format.month.name }
      { duplicate$ "dd.month.yy" =
        { pop$ s "\ " t "long" format.month.name "\ " u }
        { duplicate$ "mo.dd.yy" =
          { pop$ s ", " u "\ " t "short" format.month.name }
          { duplicate$ "dd.mo.yy" =
            { pop$ s "\ " t "short" format.month.name "\ " u }
            { duplicate$ "dd.mm.yy" =
              { pop$ s "/" t "/" u }
              { duplicate$ "mm.dd.yy" =
                { s "/" u "/" t }
                { "yy" =
                  { "" "" "" "" s }
                  { "invalid date toggle in style file" warning$ 
                  }if$
                }if$
              }if$
            }if$
          }if$
        }if$
      }if$
      "" 'v :=
      duplicate$ empty$
      { pop$ pop$ }
      { swap$ * 'v := }
      if$
      duplicate$ empty$
      { pop$ pop$ }
      { swap$ * v swap$ *  'v := }
      if$
      duplicate$ empty$
      { pop$ v }
      { v swap$ * }
      if$
 }
%    \end{macrocode}
%
% \DescribeEnv{topup.date}
% This is used to perform an addition operation on a
% string of numerals.
%
% \spec{\item An integer to be added.
% \item A string consisting of numerals only.}
% {\item A string consisting of the sum of the integer and
% the numeric string.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {topup.date}
 { 'a :=
   duplicate$ character.length #2 =
   { duplicate$ #1 #1 substring$ chr.to.int$ #48 -
     times.ten swap$ #2 #1 substring$ chr.to.int$ #48 -
     +
   }
   { duplicate$ character.length #1 =
     { chr.to.int$ #48 - }
     { pop$ #0 "I can't cope with more than two Japanese year digits in "
       cite$ * warning$
     }if$
   }if$
 a + int.to.str$
 }
%    \end{macrocode}
%
% \DescribeEnv{format.jdate}
% This rather specialized function converts a Japanese
% Imperial date written
% in a fixed syntax into the \LexiBib\ internal date stack,
% for onward handling by "extract.date".
%
% \spec{\item A string in the form: {\tt s57.9.27}, where
% the first letter indicates the Imperial reign of the year
% given, the first numeric item is the year, the second the
% month, and the third the day.  Any non-alphabetic, non-numeric
% character may be used as a separator.}
% {\item {\tt itemcount} is set to {\tt 2} (one more is added
% by the {\tt format.date} function in which is function is
% nested).
% \item Six stack items are output---see {\tt extract.date}
% for details on stack syntax.}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {format.jdate}
 { duplicate$ #2 global.max$ substring$ "*" "forward" gather.chars
   pop$ 't := swap$
   #1 #1 substring$ duplicate$ "s" =
   { pop$ t #1925 topup.date }
   { duplicate$ "m" =
     { pop$ t #1867 topup.date }
     { duplicate$ "t" =
       { pop$ t #1911 topup.date }
       { "h" =
         { t #1988 topup.date }
         { "invalid Imperial calendar code in " cite$ * warning$
         }if$
       }if$
     }if$
   }if$
   swap$
   "*" "forward" gather.chars
   pop$ swap$
   "*" "forward" gather.chars
   pop$ swap$ pop$ 't := swap$ "default" swap$ t swap$ "default"
   swap$ "default"
   #2 'itemcount :=
 }
%    \end{macrocode}
%
% \DescribeEnv{format.date}
% This function makes use of "gather.chars" and other supporting
% functions to build a stack of date items, which it then parses
% using "extract.date".  The syntax for entering dates is
% described in the user guide.
%
% \spec{\item A single string in appropriate date syntax.}
% {\item none}
% {\item none}
%
%    \begin{macrocode}
FUNCTION {format.date}
  { 'v :=
    empty.to.null 's :=
    #0 'charcount :=
    #0 'itemcount :=
    #0 'date.specials :=
    { s empty$ not }
      { s "*" "forward" gather.chars
        duplicate$ "letter" =
        { pop$ duplicate$ character.length #1 = itemcount not and
          { pop$ pop$ s format.jdate "" 's := }
          { duplicate$ character.length #3 =
            { swap$ 's :=
              parse.month "month" #1 'date.specials := }
            { swap$ 's :=
              pop$ "1" "invalid date in " cite$ * warning$
              "passing text to Camel verbatim" warning$
              "t" 'scrubdate :=
              "default"
            }if$
          }if$
        }
        { "numeral" =
          { duplicate$ character.length #1 =
            { swap$ 's := "default" }
            { duplicate$ character.length #2 =
              { swap$ 's := "default" }
              { duplicate$ character.length #4 =
                { swap$ 's := "default" }
                { swap$ 's := pop$ "1"
                  "invalid numerical element in date for " cite$ * warning$
                  "passing text to Camel verbatim" warning$
                  "t" 'scrubdate :=
                  "default"
                }if$
              }if$
            }if$
          }
          { swap$ 's := pop$ "1"
            "failed to parse date in " cite$ * warning$
            "default"
          }if$
        }if$
        itemcount #1 + 'itemcount :=
      }while$
    v extract.date
    scrubdate "t" =
    { pop$ year empty.to.null }
    'skip$
    if$
  }
%    \end{macrocode}
% Anyways, here's that line noise.  Extracts cite info to variables
% from a parseable string on the stack.  Syntax is:
%
%\begin{tabular}{ccccccc}
%   year & volume & / & number & journal name & pages & (year)\\
%   "^"  &  "^"   &"^"& "^"    &  "^"         &   "^" & "^"\\
%    OPT &    OPT &OPT& OPT    &      REQ      &  OPT &    OPT\\
%\end{tabular}
%
% You can give a volume without a number (i.e. the backslash
% and trailing number can be left out).
%    \begin{macrocode}
FUNCTION {parse.one.cite}
{ duplicate$ "=" = not
  { "=" "forward" gather.chars pop$
    duplicate$ "[" swap$ "forward" first.in.second
    { swap$ duplicate$ "]" swap$ "forward" first.in.second
        { "" 'volume.var :=
          'b := swap$ 'a := a b <
            { duplicate$ a #1 + b a #1 + - substring$
              'year.var :=
              b #1 + global.max$ substring$ 
              " " "forward" gather.chars pop$
              duplicate$ "*" "forward" gather.chars
              "numeral" =
              { swap$ duplicate$ empty$
                { pop$ pop$ 'number.var := }
                { pop$ pop$ swap$ * "" 'number.var :=
                }if$  
              }
              { pop$ pop$ " " swap$ * swap$ * "" 'number.var :=
              }if$
            }
            { "Weird syntax error in " cite$ * warning$
            }if$
        }
        { "Opening [ without closing ] in " cite$ * warning$
        }if$
    }
    { pop$ duplicate$ ")" swap$ "reverse" first.in.second
      { swap$ duplicate$ "(" swap$ "reverse" first.in.second
        { 'a := swap$ 'b := a b <
          { duplicate$ a #1 + b a #1 + - substring$
            'year.var :=
            #1 a #1 - substring$ 
            " " "forward" gather.chars pop$
            duplicate$ "/" swap$ "forward" first.in.second
              { pop$ "/" "forward" gather.chars pop$ 
                swap$ duplicate$ empty$
                  { pop$ "" 'number.var := }
                  { #2 global.max$ substring$
                    'number.var :=
                  }if$
              }
              { pop$ "" 'number.var :=
              }if$
            duplicate$ empty$
              { pop$ "" 'volume.var := }
              { duplicate$ "*" "forward" gather.chars
                "numeral" =
                { swap$ duplicate$ empty$ 
                  { pop$ pop$ 'volume.var := }
                  { pop$ pop$ swap$ * "" 'volume.var :=
                  }if$
                }
                { pop$ pop$ " " swap$ * swap$ * "" 'volume.var :=
                }if$
              }if$
          }
          { "Weird syntax error in " cite$ * warning$
          }if$
        }
        { "Closing ) without opening ( in " cite$ * warning$
        }if$
      }
      { pop$ "No recognizable date in string in " cite$ * warning$
      }if$
    }if$
    " " swap$ * " " "reverse" gather.chars pop$
    duplicate$ "*" "forward" gather.chars
    "numeral" =
    { swap$ duplicate$ empty$
      { pop$ pop$ 'pages.var := }
      { pop$ pop$ swap$ * "" 'pages.var :=
      }if$
    }
    { pop$ pop$ swap$ * "" 'pages.var :=
    }if$
   duplicate$ empty$
   { 'journal.var := }
   { duplicate$ character.length #2 -
     #3 swap$ substring$ 'journal.var :=
   }if$
 }
 'skip$
 if$
}
%</bstlibrary>
%    \end{macrocode}
%    \begin{macrocode}
%<*bsttrailer>
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$
}

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 :=
  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$
}

FUNCTION {author.key.label}
{ author empty$
    { key empty$
        { cite$ #1 #3 substring$ }
        { key #3 text.prefix$ }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {author.editor.key.label}
{ author empty$
    { editor empty$
        { key empty$
            { cite$ #1 #3 substring$ }
            { 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$
            { cite$ #1 #3 substring$ }
            { "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$
            { cite$ #1 #3 substring$ }
            { "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 "yy" format.date purify$ #-1 #2 substring$
  *
  'label :=
  year "yy" format.date purify$ #-1 #4 substring$
  *
  sortify 'sort.label :=
}

FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { nameptr #1 >
        { "   " * }
        'skip$
      if$
      s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
      nameptr numnames = t "others" = and
        { "et al" * }
        { t sortify * }
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

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

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 {case.sort}
{ title empty$
    { key empty$
        { "to sort, need title or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { title sort.format.title }
  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$
}

FUNCTION {presort}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.organization.sort
        { type$ "manual" =
            'author.organization.sort
            { type$ "case" =
              'case.sort
              { type$ "statute" =
                'case.sort
                'author.sort
              if$
              }
            if$
            }
          if$
        }
      if$
    }
  if$
  "    "
  *
  year "yy" format.date sortify
  *
  "    "
  *
  title empty.to.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

ITERATE {presort}

SORT

FUNCTION {begin.bib}
{ et.al.char.used
    { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
    'skip$
  if$
  preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
}

EXECUTE {begin.bib}

ITERATE {call.type$}
%</bsttrailer>
%    \end{macrocode}
% \section{A {\tt .bib} file}
%    \begin{macrocode}
%<*bib>
@string{asr..="Am.~Soc.\ Rev."}
@book{bluebook,
 title = {A Uniform System of Citation},
 edition = {19th},
 year = 1989
}
@book{knuth,
 title = {The {\TeX} book},
 year = 1990,
 author = {D.E. Knuth}
}
@book{leunen,
 author = {M.-C. van Leunen},
 title = {A Handbook for Scholars},
 year = 1979
}
@book{latex-book,
 title = {\LaTeX: a document preparation system},
 year = 1994,
 author = {Leslie Lamport}
}
@inbook{companion-bibs,
 title = {Bibliography Generation},
 chapter = 13,
 pages = {371},
 crossref = {latex-companion}
}
@book{latex-companion,
 author = {M. Goosens and Frank Mittelbach and A. Samarin},
 title = {The \LaTeX\ Companion},
 booktitle = {The \LaTeX\ Companion},
 year = 1994
}
@techreport{oren-user,
 author = {Oren Patashnik},
 title = {\BibTeX ing},
 year = 1988,
 type = {CTAN document}
}
@techreport{oren-hackers,
 author = {Oren Patashnik},
 title = {Designing \BibTeX\ Styles},
 type = {CTAN document},
 year = 1988
}
@book{maki-constitution,
 author = {Maki, John McGilvrey},
 title = {Court and Constitution in Japan: Selected Supreme Court Decisions,
       1948-1960},
 publisher = {Washington University Press},
 year = 1964
}
@booklet{sansom-constitution,
 author = {Sansom, {Sir} George Bailey},
 title = {The First Japanese Constitution: A Lecture},
 note = {delivered before the
       Asiatic Society of Japan},
 year = 1938
}
@article{macauley,
 author = {Stuart Macauley},
 title = {Non-Contractual Relations
in Business: A Preliminary Study},
 volume = {28},
 journal = asr..,
 pages = {55},
 year = {1963}
}
@mastersthesis{homma-derivative,
 title = {The Derivative Suit under Japanese Law as a Measure of
                  Corporate Governance},
 author = {Masahiro Homma},
 institution = {School of Oriental and African Studies},
 type = {LL.M. thesis},
 year = {1994}
}
@case{bradshaw-v-us,
 title = {Bradshaw v United States},
 cites = {231 Ct.Cl. 144 (1982) = 683 F.2d 365 (1982)}
}
@incollection{haley-land-lease,
 title = {Japan's New Land and House Lease Law},
 author = {John Owen Haley},
 crossref = {policy-failure},
 pages = 149,
}
@book{policy-failure,
 title = {Land Issues in Japan: A Policy Failure?},
 booktitle = {Land Issues in Japan: A Policy Failure?},
 year = 1992
}
@article{appleyard-heed,
 author = {Bryan Appleyard},
 title = {Why Major should heed the press},
 pages = 21,
 journal = {The Independent},
 year = {7 jul 1995},
 place = {London}
}
@statute{sga,
 title = {Sale of Goods Act},
 year = {1979},
 jurisdiction = {england}
}
@case{heap,
 title = {Heap v Motorists' Advisory Agency Ltd},
 year = 1923,
 journal = {KB},
 number = 1,
 pages = 577
}
@case{halsall-v-brizell,
 title = {Halsall v Brizell},
 cites = {[1957] Ch 169 = [1957] 1 All ER 371}
}
%</bib>
%    \end{macrocode}
% \section{The Driver File}
%    \begin{macrocode}
%<*installer>
\def\batchfile{camel.ins}
\input docstrip.tex
\preamble

Copyright (C) 1992--95 Frank Bennett, Jr.
All rights reserved.

This file is part of the Camel package.
\endpreamble

\def\batchfile{camel.dst}      % ignored in distribution
\input docstrip.tex              % ignored in distribution

\Ask\answer{%
     **************************************************************
  ^^J*                       PLEASE NOTE
  ^^J* 
  ^^J* Camel requires a large BibTeX, with a wizard-defined
  ^^J* function space of over 6,000.  The function space in
  ^^J* standard BibTeX is only 3,000, so if your BibTeX has never
  ^^J* been enlarged, it will probably need to be recompiled.
  ^^J* 
  ^^J* If this seems terribly cryptic, just go ahead and give
  ^^J* it a go.  Feel free to write me on fb@soas.ac.uk if you
  ^^J* have problems.
  ^^J*
  ^^J* In addition to camel.dtx, you will also need the keyval
  ^^J* and overword packages, also available from CTAN.  You
  ^^J* should have an up-to-date copy of index.dtx as well.
  ^^J*
  ^^J* Also, to print the .dtx files in the Camel bundle, you
  ^^J* should use the usual gind.ist file for making the indexes;
  ^^J* camel.ist is used for special purposes outlined in the
  ^^J* manual.
  ^^J*
  ^^J* Shall I unpack my things?
  ^^J*  
  ^^J* If you want me to go ahead, answer `y' below, otherwise `n'.
  ^^J*
  ^^J**************************************************************}

\keepsilent

\preamble

This file is part of the Camel package.
---------------------------------------
This is a generated file.  

IMPORTANT NOTICE:

You are not allowed to change this file.  You may however copy
this file to a file with a different name and then change the
copy if (a) you do not charge for the modified code, (b) you
acknowledge Camel and its author(s) in the new file, if it
is distributed to others, and (c) you attach these same
conditions to the new file.

The above conditions do not apply to the demonstration
file test.tex.

You are not allowed to distribute this file alone.  You are not
allowed to take money for the distribution or use of this file
(or a changed version) except for a nominal charge for copying
etc.

You are allowed to distribute this file under the condition that
it is distributed with all of its contents, intact.

For error reports, or offers to help make Camel a more powerful,
friendlier, and better package, please contact me on
`fb' at soas.ac.uk

\endpreamble


{\ifx\answer\y

\generate{\file{camel.sty} {\from{camel.dtx}{lexitex}}
          \file{camel.ist} {\from{camel.dtx}{camelindex}}
          \file{camel.bib} {\from{camel.dtx}{bib}}
          \file{test.tex}  {\from{camel.dtx}{testtex}}}

\fi}

\keepsilent


\ifToplevel{
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation, you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{* \space\space camel.sty}
\Msg{*}
\Msg{* You also need to move the following file into a directory}
\Msg{* searched by makeindex:}
\Msg{*}
\Msg{* \space\space camel.ist}
\Msg{*}
\Msg{* Note that Camel does not work by itself; style modules}
\Msg{* (such as law.dtx) are supplied separately.  They can}
\Msg{* be found on CTAN in the Camel subdirectory.}
\Msg{*}
\Msg{***********************************************************}
}
%</installer>
%    \end{macrocode}
%    \begin{macrocode}
%<*testtex>
\documentclass{article}
\usepackage{camel}

%<+testtex>%\citationsubject[o=sta,i=stb]{statutes}{Statutory Materials}
%<+testtex>%\citationsubject[o=sec,i=seb]{second}{Secondary Literature}
%<+testtex>%\citationsubject[o=cas,i=cab]{case}{Cases}

\begin{document}
\citationstyle{law}
\citationdata{camel}

\section*{{\sc Camel} tests and examples\footnotemark{}{} }
\footnotetext{Note that, in addition to admiring the examples in
  this document, you can tinker with it to produce different
  kinds of bibliographies.  See the comments in the file for
  suggestions.}


We currently have support for articles (including newspaper
articles), items in collections of
essays, books, sections of books, ephemeral booklets, masters theses,
Commonwealth, US and Japanese cases, and statutes from a few
jurisdictions.  An example of each is given below, first without,
then with a pinpoint.  This does not give a complete picture of
the `formatting tree', it''s just a sample.

\begin{itemize}
\item Ordinary articles
  \begin{itemize}
  \item \source[s=second]{macauley}
  \item \source[f,s=second]{macauley}[56]
  \end{itemize}
\item Newspaper articles
  \begin{itemize}
  \item \source[s=second]{appleyard-heed}
  \item \source[f,s=second]{appleyard-heed}[21] (A silly example,
    since there's only one page to the piece!)
  \end{itemize}
\item Articles in collections of essays
  \begin{itemize}
  \item \source[s=second]{haley-land-lease}
  \item \source[f,s=second]{haley-land-lease}[152]
  \end{itemize}
\item Books
  \begin{itemize}
  \item \source[f,s=second]{latex-companion}
  \item \source[f,s=second]{latex-companion}[371]
  \end{itemize}
\item Sections of books
  \begin{itemize}
  \item \source[f,s=second]{companion-bibs}
  \item \source[f,s=second]{companion-bibs}[374-75] (The BibTeX{}
    processing flow shown here is simplified for {\sc Camel} users)
  \end{itemize}
\item Ephemeral booklets
  \begin{itemize}
  \item \source[f,s=second]{sansom-constitution}
  \item \source[f,s=second]{sansom-constitution}[2]
  \end{itemize}
\item Masters theses
  \begin{itemize}
  \item \source[f,s=second]{homma-derivative}
  \item \source[f,s=second]{homma-derivative}[23]
  \end{itemize}
\item Commonwealth law cases
  \begin{itemize}
  \item \source[f,s=case]{heap}
  \item \source[f,s=case]{heap}[578]\footnote{Notice how the
      pinpointed citation gives only as many parallel as are
      specified in the pinpoint.  Compare this with the next example.}
  \end{itemize}
\item US law cases
  \begin{itemize}
  \item \source[f,s=case]{bradshaw-v-us}
  \item \source[f,s=case]{bradshaw-v-us}[145=366]
  \end{itemize}
\end{itemize}
Titles that end in a numeral are a special treat.  {\sc Camel}
is not tricked by them.
\begin{itemize}
  \item \source[s=statutes]{maki-constitution}[23]
  \item \source[f,s=statutes]{maki-constitution}
\end{itemize}
Selective suppression of author, title, or the entire citation is
supported.
\begin{itemize}
  \item \source[a,f,s=second]{homma-derivative}
  \item \source[t,f,s=second]{homma-derivative}
  \item \source[n,s=second]{homma-derivative} (invisible)
\end{itemize}

%<+testtex>% If you uncomment the \citationsubject lines above,
%<+testtex>% you can comment out the `all' entry below, run
%<+testtex>% makeindex in the appropriate way over the output
%<+testtex>% files, uncomment the three special bibliography
%<+testtex>% declarations below, and print a whole different sort
%<+testtex>% of document.  There are a few bugs in the way
%<+testtex>% bibliographies are set up.  Sorting them out will
%<+testtex>% best be done once BibTeX 1.0 is available, since
%<+testtex>% integrating with the new BibTeX will affect the same
%<+testtex>% portions of the code.
\printbibliography[labels=false]{all}
%<+testtex>%\printbibliography{statutes}
%<+testtex>%\printbibliography{case}
%<+testtex>%\printbibliography{second}
\end{document}
%</testtex>
%    \end{macrocode}
% \Finale \PrintChanges