summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/computational-complexity/cc.dtx
blob: 460220d7bbae7f561ffdc21809a62fa9cdc5b063 (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
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
% \iffalse meta-comment
%
% Copyright 2000-2015 computational complexity,
%                     Michael Nüsken, <nuesken@bit.uni-bonn.de>.
%
% Current maintainer: Michael Nüsken, <nuesken@bit.uni-bonn.de>.
%
% In case of problems, please contact the current maintainer.
% If you derive a variant or a bugfix, please also contact the author.
% 
% This file is part of computational complexity macro package.
%
% The package consists of this file, the file cc.ins and all files
% generated by them.
%
% The package may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
%
% -----------------------------------------------------------
% 
% Look for %*% in this file, when you try to find \documentclass or
% changeable options.  Look for CC MAIN DATE AND VERSION for main date
% and version.
%
%<*chartab>
%\fi
% \CheckSum{7723}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
% \iffalse meta-comment
%</chartab>
% \fi
% \iffalse meta-comment
%<*driver>
\begin{filecontents}{texrefs.bib}
DANTE Books:

@Book{knu94,
  author =       {Knuth, Donald E.},
  title =        {The \TeX{}book},
  publisher =    {Addison Wesley},
  year =         1994,
  pages =        {IX, 483},
  edition =      {Incorp. the final corr. made in 1994 Reading, Mass.},
  isbn =         {0-201-13447-0/0-201-13448-9},
}

@Book{knu84,
  author =       {Donald Ervin Knuth},
  title =        {The \TeX{}book},
  publisher =    {Addison-Wesley},
  year =         1984,
  address =      {Reading, Mass.},
  pages =        {IX, 483},
  isbn =         {0-201-13448-9},
  xedition =     {2nd print},
}
  annote =       {This is the definitive and complete user manual to
                 the \TeX{} computerized typesetting system. \TeX{} software
                 offers both writers and publishers the opportunity to
                 produce technical text, with the speed and efficiency
                 of a computer system.},

@Book{det97,
  author =       {Detig, Christine},
  title =        {Der \LaTeX{} Wegweiser},
  publisher =    {MITP-Verlag},
  year =         1997,
  pages =        236,
  isbn =         {3-8266-0256-0},
}
  annote =       {29,80 DM

      Eine leichtverst{\"{a}}ndliche, aufgabenorientierte Einf{\"{u}}hrung f{\"{u}}r
      \LaTeXe{}-Anf{\"{a}}nger, die trotz ihrer K{\"{u}}rze nicht nur die
      elementaren \LaTeX{}-Befehle, sondern auch die hinter ihnen
      stehenden Konzepte erl{\"{a}}utert: Wichtige \LaTeX{}-Erweiterungspakete
      und Hilfswerkzeuge werden mit vielen Beispielen anschaulich
      erkl{\"{a}}rt. Es fehlen jedoch Hinweise, wie eigene Befehle oder
      Umgebungen definiert werden. Zum Buch gibt es noch das
      Wegweiser-Online-Center, in dem Sie weitere Informationen zum
      Buch abfragen k{\"{o}}nnen. [TK 1/1997]}

@Book{abd95,
  author =       {Abdelhamid, Rames},
  title =        {Das Vieweg \LaTeXe{} Buch},
  publisher =    {Vieweg},
  address =      {Wiesbaden},
  year =         1995,
  isbn =         {3-528-25145-X},
}
  annote =       {39,80 DM}

@Book{lam95,
  author =       {Lamport, Leslie},
  title =        {Das \LaTeX{}-Handbuch},
  publisher =    {Addison-Wesley Publ.},
  year =         1995,
  edition =      {1st},
  isbn =         {3-89319-826-1},
}
  annote =       {69,90 DM

      Analog zum \TeX{}book das Standardwerk zu \LaTeX{}. Die deutsche
      Ausgabe wurde sehr gut und verst{\"{a}}ndlich {\"{u}}bersetzt und mit einem
      Anhang der deutschen Besonderheiten versehen. Die Aufteilung in
      einzelne Kapitel ist bei Lamport nicht immer sehr gelungen;
      nahezu alles wird zweimal erkl{\"{a}}rt, einmal ausf{\"{u}}hrlich im
      Einf{\"{u}}hrungsteil, einmal zusammenfassend im Referenzteil. Man mu{\"{s}}
      sich die Informationen regelrecht zusammensuchen. Daher ist
      Abdelhamids Das Vieweg-\LaTeXe{}-Buch vorzuziehen.},

@Book{lam94,
  author =       {Lamport, Leslie},
  title =        {\LaTeX{} - A Document Preparation System},
  publisher =    {Addison-Wesley Publ.},
  year =         1994,
  isbn =         {0-201-52983-1},
  edition =      {2nd},
}
  annote =       {74,00 DM

      Die englischsprache Originalausgabe des Buchs von Lamport: Es
      beschreibt in der 2. Auflage die neue Standard-LaTeX-Version
      \LaTeXe{}. Da die deutschsprachige Ausgabe sehr gut und
      verst{\"{a}}ndlich {\"{u}}bersetzt wurde, ist das "Original" nicht mehr so
      gefragt.}

XBook{lam94,
  author =       {Leslie Lamport},
  title =        {\LaTeX{}: A Document Preparation System User's Guide and Reference Manual},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1994,
  isbn =         {0-201-52983-1},
  month =        {July},
}
  annote =       {This authoritative user's guide and reference manual
                 for the \LaTeX{} computer typesetting system has been
                 revised to document features now available in the new
                 standard software release \LaTeXe{}. Other parts of the
                 book have been revised, as well, reflecting several
                 years of user comments and suggestions.}

@Book{kop97a,
  author =       {Kopka, Helmut},
  title =        {\LaTeX{} - Band 1: Einf{\"{u}}hrung},
  publisher =    {Addison Wesley Longmann},
  year =         1997,
  isbn =         {3-8273-1025-3},
  edition =      {2. korr. Nachdruck},
}
  annote =       {69,90 DM

      Eine gut verst{\"{a}}ndliche Einf{\"{u}}hrung, die leider mit jeder Auflage
      immer dicker und nicht unbedingt "geordneter" und "richtiger"
      wurde. Der Kenner wird sich {\"{u}}ber die wirklich sehr gute
      Befehls{\"{u}}bersicht freuen. Im deutschsprachigen Raum das
      Nachschlagewerk {\"{u}}ber \LaTeX{}, das als dreib{\"{a}}ndiges Werk neu
      aufgelegt wird.}

@Book{kopdal99,
  author =       {Kopka, Helmut and Daly, Patrick W.},
  title =        {A Guide to \LaTeX{} - Document Preparation for Beginners and Advanced Users},
  publisher =    {Addison-Wesley Publ.},
  year =         1999,
  isbn =         {0-201-42777-X/0-201-39825-7},
  pages =        {XV, 600},
  edition =      {3rd},
}
  annote =       {52,00 DM

      Die englische "{\"{U}}bersetzung" von Kopkas "LaTeX - Eine Einf{\"{u}}hrung"
      ist nicht einfach "nur {\"{u}}bersetzt", sondern wurde auch an den
      nicht-deutschen Leserkreis angepa{\"{s}}t.}

@Book{kopdal95,
  author =       {Kopka, Helmut and Daly, Patrick W.},
  title =        {A Guide to \LaTeX{} - Document Preparation for Beginners and Advanced Users},
  publisher =    {Addison-Wesley Publ.},
  year =         1995,
  isbn =         {0-201-42777-X},
  edition =      {2nd},
}
  annote =       {52,00 DM

      Die englische "{\"{U}}bersetzung" von Kopkas "LaTeX - Eine Einf{\"{u}}hrung"
      ist nicht einfach "nur {\"{u}}bersetzt", sondern wurde auch an den
      nicht-deutschen Leserkreis angepa{\"{s}}t.}

@Book{kat97,
  author =       {Katzenbeisser, Stefan},
  title =        {Von der Idee zum Dokument, Einf{\"{u}}hrung in \TeX{} und \LaTeX{}},
  publisher =    {R. Oldenbourg Verlag},
  address =      {M{\"{u}}nchen},
  year =         1997,
  isbn =         {3-486-24182-6},
  edition =      {2nd},
}
  annote =       {69,00 DM [TK 1/1998] }

@Book{lie96,
  author =       {Liebing, Arnulf},
  title =        {Erstes Arbeiten mit \TeX{}},
  publisher =    {Prentice Hall},
  year =         1996,
  pages =        192,
  isbn =         {3-8272-9521-1},
}
  annote =       {39,95 DM [TK 4/1997]}

@Book{die94,
  author =       {Dietsche, Luzia and Lammarsch, Joachim},
  title =        {\LaTeX{} zum Loslegen - Ein Soforthelfer f{\"{u}}r den Alltag},
  publisher =    {Springer},
  year =         1994,
  isbn =         {3-540-56545-0},
}
  annote =       {39,90 DM; nicht mehr lieferbar!

      Aus \LaTeX{}-Kursen an der Universit{\"{a}}t Heidelberg ist dieses
      kompakte, f{\"{u}}r den Anf{\"{a}}nger und auch den etwas
      fortgeschritteneren \LaTeX{}-Benutzer gut geeignete B{\"{u}}chlein
      entstanden. Wie die \LaTeX{}-Kurzbeschreibung von Hubert Partl oder
      der Kompaktf{\"{u}}hrer \LaTeX{} von Reinhard Wonneberger empfehlenswert
      f{\"{u}}r alle mit schmalerem Geldbeutel oder Platzmangel im
      B{\"{u}}cherregal ;-) Leider beschreibt es nur das alte \LaTeX{}
      2.09. [TK 2/1994]}

@Book{kna97,
  author =       {Knappen, J{\"{o}}rg},
  title =        {Schnell ans Ziel mit \LaTeXe{}},
  publisher =    {R. Oldenbourg Verlag},
  address =      {M{\"{u}}nchen},
  year =         1997,
  isbn =         {3-486-24199-0},
}
  annote =       {48,00 DM

      Knappe, aber {\"{u}}bersichtliche Darstellung der wichtigsten
      \LaTeXe{}-Befehle. F{\"{u}}r \LaTeX{}-Anwender ohne Erfahrung. [TK 4/1997]}

Weiterf{\"{u}}hrende Literatur {\"{u}}ber \LaTeX{}

@Book{goomit96d,
  author =       {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
  title =        {Der \LaTeX{}-Begleiter},
  publisher =    {Addison Wesley Longmann},
  year =         1996,
  isbn =         {3-89319-646-3},
  edition =      {2. korr. Nachdruck},
}
  annote =       {79,90 DM

      {\"{U}}bersetzung des erfolgreichen englischen Buches }

@Book{goomit95,
  author =       {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
  title =        {The \LaTeX{} Companion},
  publisher =    {Addison-Wesley Publ.},
  year =         1995,
  isbn =         {0-201-54199-8},
  edition =      {2nd},
}
  annote =       {83,70 DM

      Die langerwartete Erg{\"{a}}nzung zu Lamports "Das \LaTeX{}-Handbuch"
      (bzw. "LaTeX - A Document Preparation System") beschreibt, wie
      man \LaTeXe{} (und auch das "alte" \LaTeX{} 2.09) an seine
      Bed{\"{u}}rfnisse anpassen kann, wie man "Classes" und "Packages"
      schreibt und vieles mehr. Durch die Beschreibung vieler
      Programme und Makropakete rund um \LaTeX{} ist es die erste Quelle,
      wenn Fragen rund um \LaTeX{} auftauchen. [TK 4/1993]}

@Book{kop97b,
  author =       {Kopka, Helmut},
  title =        {\LaTeX{} - Band 2: Erg{\"{a}}nzungen - mit einer Einf{\"{u}}hrung in METAFONT},
  publisher =    {Addison Wesley Longmann},
  year =         1997,
  isbn =         {3-8273-1229-9},
  edition =      {2nd},
}
  annote =       {69,90 DM

      In Band 2 wird \LaTeXe{}, die neue offizielle \LaTeX{}-Version,
      beschrieben (ist in der neuesten Auflage von Band 1
      enthalten). Au{\"{s}}erdem werden noch Erg{\"{a}}nzungen, wie zus{\"{a}}tzliche
      Zeichens{\"{a}}tze (AMS-Fonts, Altdeutsch, Runen, Schach, ...),
      Einbindung von Postscript-Schriften, Musiknotensatz, Grafik,
      PiCTeX und Metafont vorgestellt.}

@Book{kop97c,
  author =       {Kopka, Helmut},
  title =        {\LaTeX{} - Band 3: Erweiterungen},
  publisher =    {Addison Wesley Longmann},
  year =         1997,
  isbn =         {3-89319-666-8},
  edition =      {1st},
}
  annote =       {69,90 DM

      Der letzte Band der Kopkaschen Trilogie, behandelt
      \LaTeX{}-Interna, beschreibt die Erstellung von \LaTeXe{}-Klassen und
      -Pakete und stellt die Standard-\LaTeXe{}-Klassen und einige
      Erg{\"{a}}nzungspakete vor.  Au{\"{s}}erdem enth{\"{a}}lt es eine kurzgefa{\"{s}}te
      Vorstellung der Programmiersprache \TeX{}, des WEB-Systems und der
      \TeX{}-/MF-Quellen.}

@Book{gra97,
  author =       {Gr{\"{a}}tzer, Georg},
  title =        {Math into \LaTeX{}},
  publisher =    {Birkh{\"{a}}user},
  address =      {Boston},
  year =         1997,
  isbn =         {0-8176-3805-?},
  edition =      {2nd},
}
  annote =       {58,50 USD

      aktuelle Darstellung des \AMS\LaTeX{}-Pakets [TK 1/1998] }

Kompaktf{\"{u}}hrer/Nachschlagewerke f{\"{u}}r \LaTeX{}

@Book{hei96,
  author =       {Heilmann, Axel},
  title =        {\LaTeX{}-Vademecum, Ein Kompaktf{\"{u}}hrer f{\"{u}}r Einsteiger und Fortgeschrittene},
  publisher =    {Springer},
  address =      {Berlin, Heidelberg},
  year =         1996,
  isbn =         {3-540-60522-3},
}
  annote =       {38,00 DM

      Kleines und praktisches Nachschlagewerk, kann und will nicht den
      \LaTeX{}-Begleiter ersetzen, ist aber eine gute Erg{\"{a}}nzung,
      eigenwilliges Querformat. Auch wenn dies der Untertitel
      suggeriert, ist es nicht zum Einstieg f{\"{u}}r Anf{\"{a}}nger geeignet,
      sondern zum Nachschlagen, nachdem man sich bereits eingearbeitet
      hat. [TK 1/1996]}

@Book{won93,
  author =       {Wonneberger, Reinhard},
  title =        {Kompaktf{\"{u}}hrer \LaTeX{}},
  publisher =    {Addison-Wesley},
  year =         1993,
  isbn =         {3-89319-589-0},
  edition =      {3rd},
}
  annote =       {29,80 DM

      sehr gut geeignet, um einen ersten Eindruck zu bekommen}

@Book{schpot97,
  author =       {Schwarz, Stefan and Potucek, Rudolf},
  title =        {Das \TeX{}ikon - Referenzhandbuch f{\"{u}}r \TeX{}, \LaTeX{} und \LaTeXe{}},
  publisher =    {Addison-Wesley},
  address =      {Bonn},
  year =         1997,
  isbn =         {3-89319-690-0},
}
  annote =       {69,90 DM

      alphabetisch sortiertes Lexikon, das alle \TeX{}- und \LaTeX{}-Befehle
      dokumentiert [TK 1/1997]}

@Preamble{"\providecommand{\AMS}{{{\ensuremath{\mathcal{AMS}}}}}
  \newcommand{\ams}[1]{\ifx\protect\noexpand\protect\AMS{}\fi}
  \providecommand{\secondary}[1]{.}"}
@Manual{ams96,
  key =          "{\protect\AMS}",
  title =        {\AMS{}-\LaTeX{} Version 1.2, User's Guide},
  organization = "{\ams{AMS}}{\relax{}}{\relax{}}American Mathematical Society",
  year =         1996,
  note =         {Part of the standard \LaTeXe{} distribution.  
                  Usually \url{texmf/doc/latex/amslatex/amsldoc.dvi}.
                  Also available at CTAN:
                  \url{http://mirror.ctan.org/macros/latex}\relax
                  \url{/required/amslatex/math/amsldoc.tex}.},
  xurl =          {http://mirror.ctan.org/macros/latex/required/amslatex/math/amsldoc.tex}
}

@Preamble{"\providecommand{\BibTeX}{\textsc{Bib}\TeX{}}"}
@Manual{pat88,
  title =        {\BibTeX{}ing},
  author =       {Oren Patashnik},
  year =         1988,
  note =         {Usually \url{texmf/doc/bibtex/base/btxdoc.dvi}
                  Also available at CTAN:
                  \url{http://mirror.ctan.org/biblio/bibtex}\relax
                  \url{/distribs/doc/btxdoc.*}.},
}

@Manual{dal99,
  title =        {Natural Science Citations and References},
  author =       {Patrick W. Daly},
  month =        5,
  year =         1999,
  note =         {Version 7.0.
                  Part of the standard \LaTeXe{} distribution.
                  Usually \url{texmf/doc/latex/natbib/natbib.dvi}.
                  Available from CTAN:
                  \url{http://mirror.ctan.org/macros/latex}\relax
                  \url{/contrib/supported/natbib/natbib.*}.},
  xurl =          {http://mirror.ctan.org/macros/latex/contrib/supported/natbib/natbib.*}
}





Volume A, The TeXbook (Reading, Massachusetts: Addison-Wesley, 1984), x+483pp.
ISBN 0-201-13447-0
Volume B, TeX: The Program (Reading, Massachusetts: Addison-Wesley, 1986), xviii+600pp.
ISBN 0-201-13437-3
Volume C, The METAFONTbook (Reading, Massachusetts: Addison-Wesley, 1986), xvi+451pp.
ISBN 0-201-13445-4
Volume D, METAFONT: The Program (Reading, Massachusetts: Addison-Wesley, 1986), xviii+566pp.
ISBN 0-201-13438-1
Volume E, Computer Modern Typefaces (Reading, Massachusetts: Addison-Wesley, 1986), xvi+588pp.
ISBN 0-201-13446-2

@preamble{"\providecommand{\metafont}{\textsf{METAFONT}}"}

@Book{knu86a,
  author =       {Donald Ervin Knuth},
  title =        {The \TeX{}book},
  series =       {Computers \& Typesetting},
  volume =       {A},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1984,
  pages =        {x+483},
  isbn =         {0-201-13447-0}
}

@Book{knu86b,
  author =       {Donald Ervin Knuth},
  title =        {\TeX{}: The Program},
  series =       {Computers \& Typesetting},
  volume =       {B},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1986,
  pages =        {xviii+600},
  isbn =         {0-201-13437-3}
}

@Book{knu86c,
  author =       {Donald Ervin Knuth},
  title =        {The \metafont{}book},
  series =       {Computers \& Typesetting},
  volume =       {C},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1986,
  pages =        {xvi+451},
  isbn =         {0-201-13445-4}
}

@Book{knu86d,
  author =       {Donald Ervin Knuth},
  title =        {\metafont{}: The Program},
  series =       {Computers \& Typesetting},
  volume =       {D},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1986,
  pages =        {xviii+566},
  isbn =         {0-201-13438-1}
}

@Book{knu86e,
  author =       {Donald Ervin Knuth},
  title =        {Computer Modern Typefaces},
  series =       {Computers \& Typesetting},
  volume =       {E},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1986,
  pages =        {xvi+588},
  isbn =         {0-201-13446-2}
}

From http://members.tripod.com/~upem/texlatex.html

@Book{spi97,
  author =       {Michael Spivak},
  title =        {Joy of \TeX{}},
  publisher =    {American Mathematical Society},
  year =         1997,
  isbn =         {0-821-82997-1},
  month =        {July},
}
  annote =       {The Joy of \TeX{}; is the user-friendly guide to
                 AMSTeX;, a software package based on the computer
                 typesetting language \TeX{}.  AMSTeX; was designed to
                 simplify typesetting of mathematical quantities,
                 equations, and displays, and to format the output
                 according to any of various preset style
                 specifications.  This second edition of Joy reflects
                 the changes introduced on Version 2.0 of the AMSTeX;
                 macro package. The first two parts of the manual,
                 'Starters' and 'Main Courses', teach the reader how
                 to typeset the kind of text and mathematics one
                 ordinarily encounters. 'Sauces and Pickles', the
                 third section, treats more exotic problems and
                 includes a 60-page dictionary of special
                 \TeX{}niques. The manual also includes descriptions of
                 conventions of mathematical typography to help the
                 novice technical typist. Appendices list handy
                 summaries of frequently used and more esoteric
                 symbols. This manual is useful for technical typists
                 as well as scientists who prepare their own
                 manuscripts. For the novice, exercises sprinkled
                 generously throughout each chapter encourage the
                 reader to sit down at a terminal and learn through
                 experimentation.}

                       
@Book{sawkra94,
  author =       {Stanley A. Sawyer and Steven G. Krantz},
  title =        {Text Primer for Scientists},
  publisher =    {CRC Press, Inc.},
  year =         1994,
  key =          0849371597,
  month =        {November}
}

@Book{hoe97,
  author =       {Alan Hoenig},
  title =        {\TeX{} Unbound: \LaTeX{} and \TeX{} Strategies for Fonts, Graphics, and More},
  publisher =    {Oxford University Press, Incorporated},
  year =         1997,
  isbn =         {0-195-09686-X},
  month =        {December},
}
  annote =       {LaTeX is the premiere software of choice for writers
                 who need to prepare technical information in a clear
                 and elegant manner. This unique book tells how to use
                 \LaTeX{} or \TeX{} with files prepared with everyday office
                 software such as Lotus or Wordperfect and how to set
                 up software links with Acrobat and hyper-text using
                 \LaTeX{} for Internet communication. Illustrated. 640
                 pp.}

@Book{sal95,
  author =       {David Salomon},
  title =        {The Advanced \TeX{}book},
  publisher =    {Springer-Verlag New York, Incorporated},
  year =         1995,
  isbn =         {0-387-94556-3},
  month =        {August},
}
  annote =       {A complete course in \TeX{} that will be suitable for
                 users of \TeX{} who want to advance beyond the basics.
                 The initial chapters introduce the essential workings
                 of \TeX{} and the later chapters cover a wide range of
                 advanced topics such as macros, conditionals, tokens,
                 leaders, file I/O, the line- and page-break
                 algorithms, and output routines.}


@Book{goomit93,
  author =       {Michel Goossens and Frank Mittelbach and Alexander Samarin},
  title =        {The \LaTeX{} Companion},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1993,
  isbn =         {0-201-54199-8},
}
  annote =       {A companion to Leslie Lamport's original user's guide to \LaTeX{}. }


                          
@Book{goomit96g,
  author =       {Michel Goossens and Frank Mittelbach and Sebastian Rahtz},
  title =        {The \LaTeX{} Graphics Companion},
  publisher =    {Addison Wesley Longman, Inc.},
  year =         1996,
  isbn =         {0-201-85469-4},
}
  annote =       {Complementing The \LaTeX{} Companion, this new graphics
                 companion book addresses one of the most common needs
                 among users of the \LaTeX{} typesetting system: the
                 incorporation of graphics into text. In addition to
                 packages for general drawing, the book also describes
                 more specific tools for mathematicians, physicists,
                 chemists, engineers, and people interested in
                 business graphics, games and music typesetting.}

ISBN:  0-201-43311-7
                Title:  The \LaTeX{} Web Companion
                Author:  Michel Goossens,Sebastian Rahtz
                Publisher:  Addison Wesley Longman, Inc.
                Date Published:  February 1999
                URL:  The \LaTeX{} Web Companion 
                Format:  Trade Paper




                ISBN:  0-201-42777-X
                Title:  Guide to \LaTeXe{}: Document Preparation for Beginners and Advanced Users
                Author:  Helmut Kopka, Patrick W. Daly
                Publisher:  Addison Wesley Longman, Inc.
                Date Published:  June 1995
                URL:  Guide to \LaTeXe{}: Document Preparation for Beginners & Advanced Users 
                Format:  Trade Paper

                 Kopka and Daly provide a highly accessible tutorial
                 for users new to \LaTeX{}. Fully revised to cover the
                 latest version of \LaTeX{}, this second edition presents
                 a thorough explanation of the internals of the
                 system. \LaTeX{} commands not available within the
                 earlier version of \LaTeX{} are highlighted, making the
                 book useful for users still working with the earlier
                 release.




                ISBN:  0-817-63805-9
                Title:  Math into \LaTeX{}: An Introduction to \LaTeX{} and \AMS\LaTeX{}
                Author:  George Gratzer
                Publisher:  Birkhauser Boston
                Date Published:  November 1995
                URL:  Math into \LaTeX{}: An Introduction to \LaTeX{} & \AMS\LaTeX{} 
                Format:  Trade Paper




                ISBN:  0-131-20973-6
                Title:  \LaTeX{} Notes; Practical Tips for Preparing Technical Documents
                Author:  J. Kenneth Shultis,Designed by Kenneth Shultis
                Publisher:  Prentice Hall
                Date Published:  February 1994
                URL:  \LaTeX{} Notes: Practical Tips for Preparing Technical Documents, Version 1.4 
                Format:  Trade Paper

                 A guide for engineers and scientists who are
                 currently using \LaTeX{}, this volume provides recipes
                 and tricks--including shortcuts and extensions not
                 found elsewhere--for the most useful operation of
                 \LaTeX{} for preparing technical documents. Covers the
                 full range of \LaTeX{} topics--fonts, text formatting
                 and lists, formatting pages, math and equations,
                 tables, graphics, large documents, useful styles,
                 macros, and miscellaneous tricks.




                ISBN:  0-136-05908-2
                Title:  \LaTeX{} for Everyone: A Reference Guide and Tutorial for Typesetting Documents Using a Computer
                Author:  Jane Hahn
                Publisher:  Prentice Hall
                Date Published:  February 1993
                URL:  \LaTeX{} for Everyone: A Reference Guide & Tutorial for Typesetting Documents Using a Computer 
                Format:  Trade Paper

                 Full of easy-to-understand examples, this is a
                 complete reference guide and tutorial for typesetting
                 documents using \LaTeX{} software. It covers matters of
                 style; typesetting mathematics; customization;
                 preparing large documents; and more.




                ISBN:  0-471-93471-2
                Title:  \LaTeX{} Line by Line; Tips and Techniques for Document Processing
                Author:  Antoni Diller
                Publisher:  John Wiley & Sons, Incorporated
                Date Published:  January 1993
                URL:  \LaTeX{} Line by Line: Tips & Techniques for Document Processing 
                Format:  Trade Paper



                          
                ISBN:  0-898-71383-8
                Title:  Learning \LaTeX{}
                Author:  David F. Griffiths,Desmond J. Higham
                Publisher:  Soc Indus-
                Date Published:  December 1996
                URL:  Learning \LaTeX{} 
                Format:  Trade Paper

                 A short book that covers the essentials without
                 getting lost in details.


\end{filecontents}
\begin{filecontents}{texexample.sty}
%% Environment for LaTeX2e examples
\usepackage{moreverb}
\newcounter{texexample}
\newdimen\texexamplerightwidth
\newdimen\texexampleleftwidth
\def\texexamplerightportion{.52}
\global\leftmargin\z@
\let\texexamplesize\footnotesize
\newenvironment{texexample}
{%
  \texexamplerightwidth=\texexamplerightportion\hsize
  \texexampleleftwidth=.96\hsize
  \advance\texexampleleftwidth-\leftmargin
  \advance\texexampleleftwidth-\texexamplerightwidth
  \stepcounter{texexample}\edef\tmpfile{\jobname-tmp\thetexexample.tex}%
  \bgroup\verbatimwrite{\tmpfile}}
{\endverbatimwrite\egroup
  \begin{flushleft}
    \hrule height0pt
    \begin{minipage}[t]{\texexampleleftwidth}
      \vskip\z@\texexamplesize
      \verbatimtabinput{\tmpfile}%
    \end{minipage}%
    \hglue.04\hsize
    \begin{minipage}[t]{\texexamplerightwidth}
      \vskip\z@\small\sloppy
      \hfuzz=2cm%
      %%\raggedright
      %%\hrule\vskip2pt
      \input{\tmpfile}%
      %%\vskip2pt\hrule
      \vskip\z@
    \end{minipage}
  \end{flushleft}
  \par\ignorespacesafterend\noindent
}
\end{filecontents}
\begin{filecontents}{tab-struct.tex}
  \begin{center}
    \texexamplesize
    \begin{minipage}[t]{.44\hsize}
      \obeylines
      \meta{secondary file contents}
      |\documentclass{cc}|
      ~
      \meta{personal macros and packages}
      ~
      |%\ccsps{year=2011,volume=20,...}|
      |\contact{|\meta{contact email address}|}|
      |\submitted{|\meta{submission date}|}|
      |\title{|\meta{title}|}|
      %%|%\titlehead{|\meta{running head title}|}|
      |\author{|\meta{author list}|}|
      %%|%\authorhead{|\meta{running head authors}|}|
      %%|%\authorlist{|\meta{title author list}|}|
      ~
      |\begin{abstract}|
        \quad\meta{abstract}
        |\end{abstract}|
      ~
      |\begin{keywords}|
        \quad\meta{keywords}
        |\end{keywords}|
      ~
      |\begin{subject}|
        \quad\meta{subject classification} 
        |\end{subject}|
      ~
      |\begin{document}|
        ~
        \meta{article text}
        ~
        |\begin{acknowledge}|
          \quad\meta{acknowledgments}
        |\end{acknowledge}|
        |%\noacknowledge% must if none!|
        ~
        |\bibliography{|\meta{bibliography files}|}|
        ~
        |\end{document}|
    \end{minipage}\quad\vrule\quad
    \begin{minipage}[t]{.5\hsize}
\begin{verbatim}
\author{
  First A. Author\\
  Department of Mathematics\\
  University of Somewhere\\
  Somewhere, USA 99999\\
  \email{faa@ford.somewhere.edu}\\
  \homepage
    {http://www.somewhere.edu/~faa/}

  \currentaddress
  Somewhere Sunny\\
  SAMOA\\
  \email{faa@sunny.samoa.gov}

  \and
  Second B. Author\\
  Faculty of Computer Science\\
  Anyplace College\\
  Anyplace, CANADA Z9Z 1X1\\
  \email{author@pearson.anyplace.edu}

  \otheraddress
  Private address of
    \textsc{Second B. Author}:\\
  Green Road\\
  Notown, MOON\\

  \and
  Third C. van~Author\\
  Electrical Engineering Division \\
  Institute of Nowhere\\
  Nowhere, ANTARCTICA\\
  \email{tcauthor@penguin.nowhere.ant}
  }
\end{verbatim}
    \end{minipage}
  \end{center}
\end{filecontents}
\begin{filecontents}{tab-thmenv.tex}
  \begin{center}
    \texexamplesize
    {\catcode`\|=12\gdef\vvv{|}}
    \begin{tabular}[t]{ll\vvv}
      environment & title \\\hline
      %%|open| & Open Question \\
      |answer| & Answer \\
      |assumption| & Assumption \\
      |claim| & Claim \\
      |conjecture| & Conjecture \\
      |convention| & Convention \\
      |corollary| & Corollary \\
      %%|counterexample| & Counterexample \\
      |definition| & Definition \\
      |example| & Example \\
      |exercise| & Exercise \\
      |fact| & Fact \\
      |hypothesis| & Hypothesis \\
      |lemma| & Lemma \\
      |notation| & Notation \\
    \end{tabular}\begin{tabular}[t]{ll} environment & title \\\hline
      |note| & Note \\
      |observation| & Observation \\
      |openquestion| & Open Question \\
      |problem| & Problem \\
      |proposition| & Proposition \\
      |question| & Question \\
      |remark| & Remark \\
      |result| & Result \\
      |theorem| & Theorem \\
      |thesis| & Thesis \\
      |warning| & Warning \\*[2mm]
      |namedtheorem| & \meta{user specified}
    \end{tabular}
  \end{center}
\end{filecontents}
\begin{filecontents}{tab-algo.tex}
  \begin{center}
    \begin{texexample}
\begin{algorithm}{rs}[Repeated
  squaring]
\item An element
  $x \in \mathbb{Z}_{m}$ and
  an exponent $e \in \{ 2,
  \dots, \varphi(m)\}$.
\item $x^{e} \in \mathbb{Z}_{m}$.
  \begin{block}
  \item
    Compute the binary
    representation $(e_{n},
    \dots, e_{0})$ of $e$.
  \item
    \algolabel{B}
    $z \gets x$.
  \item
    \algolabel{D}
    \begin{forblock}
      {$i = n-1, \dots, 0$} 
      \algolabel{C}
    \item $z \gets z^{2}$.
      \begin{ifblock}
        {$e_{i}=1$}
      \item $z \gets z * x$.
      \end{ifblock}
    \end{forblock}
  \item
    \algolabel{G}
    \RETURN $z$.
  \end{block}
\end{algorithm}
\hrule\medskip
B: \stepref{rs}{B}\\
C: \ref{rs-C}, \whole\ref{rs-C}\\
D: \short\ref{rs-D},
   \whole\ref{rs-D}
\end{texexample}
  \end{center}
\end{filecontents}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %*% This is the beginning of the documentation!
\errorcontextlines9999
\documentclass[noccpublish%
,textarea=cc1
,multilingual,australian%
 %*% Insert options here:
 %,ccite%
 %,noams%
]{cc}

\newcommand{\emailmaintenance}{\email{ccmaintainer@computational-complexity.org}}
\renewcommand{\emailmaintenance}{\email{nuesken@bit.uni-bonn.de}}
\newcommand{\emaileic}{\email{editorinchief@computational-complexity.org}}
\newcommand{\emailsubmit}{\email{submit@computational-complexity.org}}
\newcommand{\emailtest}{\email{cctest@computational-complexity.org}}

\newcommand\equal{\protect\equalb}%
\newcommand\equalb{=}%

% do not use cccite but get it's file information!
{\let\ccorgProvidesPackage\ProvidesPackage
  \def\ProvidesPackage#1[#2]{\ccorgProvidesPackage{#1}[#2]\endinput}%
  \usepackage{cccite}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Personal definitions and \usepackage commands

\dimen254\marginparwidth
\let\ccorgmaketitle\maketitle
\usepackage{doc}
\normalmarginpar
\let\maketitle\ccorgmaketitle
\marginparwidth\dimen254
\providecommand{\SortIndex}[2]{}

\newcommand{\lclass}[1]{\textsf{#1}}
\newcommand{\Lclass}[1]{\lclass{#1}%
  \SortIndex{#1}{\protect\lclass{#1} (class)\encapchar usage}%
  \index{classes:\levelchar{\protect\ttfamily#1}\encapchar usage}}
\newcommand{\lpackage}[1]{\textsf{#1}}
\newcommand{\Lpackage}[1]{\lpackage{#1}%
  \SortIndex{#1}{\protect\lpackage{#1} (package)\encapchar usage}%
  \index{packages:\levelchar{\protect\ttfamily#1}\encapchar usage}}
\newcommand{\lclo}[1]{\textsf{#1}}
\newcommand{\Lclo}[1]{\lclo{#1}%
  \SortIndex{#1}{\protect\lclo{#1} (option)\encapchar usage}%
  \index{options:\levelchar{\protect\ttfamily#1}\encapchar usage}}
\newcommand{\lenv}[1]{\texttt{#1}}
\newcommand{\Lenv}[1]{\lenv{#1}%
  \SortIndex{#1}{\protect\lenv{#1} (environment)\encapchar usage}%
  \index{environments:\levelchar{\protect\ttfamily#1}\encapchar usage}}
\newcommand{\lfile}[1]{\texttt{#1}}
\newcommand{\file}[1]{\lfile{#1}%
  \SortIndex{#1}{\protect\lfile{#1} (file)\encapchar usage}%
  \index{files:\levelchar{\protect\ttfamily#1}\encapchar usage}}

\newcommand{\ccLINK}{%
  \url{http://www.linkspringer.com/?genre=article&issn=1016-3328}%
  \begingroup\urlstyle{tt}\Url}
\newcommand{\cchomepage}{\url{http://www.computational-complexity.org/}%
  \begingroup\urlstyle{tt}\Url}
\newcommand{\ps}{PostScript\texttrademark}
\providecommand{\texttrademark}{}
\newcommand{\AMS}{%
  \ensuremath{\mathcal{A}}%
  \kern-.25em
  \lower.5ex\hbox{\ensuremath{\mathcal{M}}}%
  \kern-.15em
  \ensuremath{\mathcal{S}}%
  }

\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\newcommand{\textcal}[1]{\ensuremath{\mathcal{#1}}\/}

\usepackage{texexample}

\providecommand{\mathbb}[1]{\mathbf{#1}}% should be math blackboard bold ...

\makeatletter
\let\@listi\@listiv
\let\@listI\@listi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %*% optional packages
% \usepackage{multicol}
% \usepackage{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% doc.sty settings

\newcommand{\VRULE}{|}
\MakeShortVerb{\|}

\settowidth{\MacroIndent}{\rmfamily\scriptsize M000\ }
\def\MacroFont{\fontencoding\encodingdefault
                   \fontfamily\ttdefault
                   \fontseries\mddefault
                   \fontshape\updefault
                   \footnotesize}
\let\AltMacroFont\MacroFont
\expandafter\newif\csname ifbst\endcsname \bsttrue
\expandafter\newif\csname ifoldbst\endcsname \oldbsttrue

\makeatletter
\def\CodelinePrefix#1{%
  \gdef\fileprefix{#1}%
  \setcounter{CodelineNo}{0}%
  \renewcommand{\theCodelineNo}{\rmfamily\scriptsize
    #1\arabic{CodelineNo}}%
  \def\special@index##1{\if@filesw
    \immediate\write\@indexfile
    {\string\indexentry{##1}%
      {#1\number\c@CodelineNo}}\fi}%
  }
% \let\CodelinePrefix\@gobble
\makeatother

\DoNotIndex{\',\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic}
\DoNotIndex{\@badmath,\@centercr,\@cite}
\DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
\DoNotIndex{\@input,\@ixpt,\@m,\@minus,\@mkboth}
\DoNotIndex{\@ne,\@nil,\@nomath,\@plus,\roman,\@set@topoint}
\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
\DoNotIndex{\advance,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
\DoNotIndex{\bullet}
\DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
\DoNotIndex{\fbox,\Finale}
\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
\DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\fi,\ifcase,\or,\fi}
\DoNotIndex{\ifhmode,\fi,\ifvmode,\fi,\ifnum,\fi,\iftrue,\fi,\ifx,\fi}
\DoNotIndex{\input}
\DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
\DoNotIndex{\NeedsTeXFormat,\newdimen}
\DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
\DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
\DoNotIndex{\refstepcounter,\relax,\renewcommand}
\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily}
\DoNotIndex{\secdef,\selectfont,\setbox,\setcounter,\setlength}
\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
\DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
\DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
\DoNotIndex{\viipt,\vipt,\vskip,\vspace}
\DoNotIndex{\wd,\xiipt,\year,\z@}

\DoNotIndex{\ ,\space}
\DoNotIndex{\",\$,\&,\,,\/,\[,\],\{,\}}
\DoNotIndex{\@@eqncr,\@auxout,\@bsphack}
\DoNotIndex{\@centering,\@clsextension,\@clubpenalty}
\DoNotIndex{\@currentlabel,\@currenvir,\@currext}
\DoNotIndex{\@donoparitem}
\DoNotIndex{\@eqcnt,\@eqncr,\@eqnnum,\@eqnsel,\@eqnswfalse,\@eqnswtrue}
\DoNotIndex{\@esqhack,\@evenfoot,\@evenhead,\@for}
\DoNotIndex{\@oddhead,\@oddfoot}
\DoNotIndex{\@firstoftwo,\@fnsymbol,\@height}
\DoNotIndex{\@ifempty,\@ifnotempty,\@ifstar,\@ifundefined}
\DoNotIndex{\@ifclassloaded,\@ifpackageloaded}
\DoNotIndex{\@inlabelfalse,\@inlabeltrue,\@item,\@itemlabel,\@itempenalty}
\DoNotIndex{\@labels,\@listctr}
\DoNotIndex{\@makefnmark,\@makefntext,\@maketitle,\@minipagefalse}
\DoNotIndex{\@nbitem,\@newlistfalse,\@nobreakfalse,\@nocnterr}
\DoNotIndex{\@nocounterr,\@noitemargfalse,\@noitemarg}
\DoNotIndex{\@onlypreamble,\@opargbegintheorem}
\DoNotIndex{\@openbib@code,\@parboxrestore,\@ptsize,\@roman,\@seccntformat}
\DoNotIndex{\@secondoftwo,\@sect,\@setfontsize,\@ssect,\@startsection}
\DoNotIndex{\@tempa,\@tempb,\@tempc}
\DoNotIndex{\@temptokena,\@textsuperscript,\@thanks,\@thefnmark,\@thm}
\DoNotIndex{\@topnum,\@topsep,\@totalleftmargin,\@undefined}
\DoNotIndex{\@width,\@xifempty}
\DoNotIndex{\and,\addtocounter,\appendix,\arabic,\arraycolsep}
\DoNotIndex{\AtBeginDocument,\AtEndDocument}
\DoNotIndex{\baselineskip,\bf,\bfseries,\bibcite,\bibitem,\bigskip,\bigstar}
\DoNotIndex{\bibliography,\bibliographystyle,\bibname,\bigcirc,\blacksquare}
\DoNotIndex{\c@enumi,\c@enumii,\c@enumiii,\c@enumiv,\c@equation}
\DoNotIndex{\c@footnote,\c@namedth@@r@m,\c@page,\c@section}
\DoNotIndex{\centering,\chapter,\CheckCommand,\circ}
\DoNotIndex{\ClassError,\ClassWarning,\ClassWarningNoLine}
\DoNotIndex{\clearpage,\clubpenalty,\copyright,\count,\count@,\csname}
\DoNotIndex{\CurrentOption}
\DoNotIndex{\DeclareTextFontCommand,\dimen@}
\DoNotIndex{\displaystyle,\displaywidth,\displaywidowpenalty}
\DoNotIndex{\do,\documentclass}
\DoNotIndex{\edef,\endcsname,\endminipage,\endsplit}
\DoNotIndex{\endnamedth@@r@m,\endnamedtheorem,\endpr@@f,\endproof}
\DoNotIndex{\enskip,\eqno,\eqnarray,\errhelp,\errmessage}
\DoNotIndex{\etalchar,\evensidemargin}
\DoNotIndex{\fboxsep,\finalhyphendemerits}
\DoNotIndex{\footnote,\footnoterule,\footnotesize}
\DoNotIndex{\gobble@nil}
\DoNotIndex{\hb@xt@,\headheight,\ht}
\DoNotIndex{\if,\fi,\if@eqnsw,\fi,\if@filesw,\fi,\if@inlabel,\fi}
\DoNotIndex{\if@newlist,\fi,\if@nmbrlist,\fi,\if@nobreak,\fi}
\DoNotIndex{\if@noitemarg,\fi,\if@noparitem,\fi}
\DoNotIndex{\iffalse,\fi,\ifinner,\fi,\ifmmode,\fi}
\DoNotIndex{\csname iftagsleft@\endcsname}
\DoNotIndex{\ifodd,\fi,\ifvoid,\fi}
\DoNotIndex{\ignorespaces,\ignorespacesafterend,\immediate,\include}
\DoNotIndex{\indent,\inputlineno,\item,\itemsep,\itemindent,\itshape}
\DoNotIndex{\label,\labelenumi,\labelenumii,\labelenumiii,\labelenumiv}
\DoNotIndex{\labelitemi,\labelsep,\labelwidth,\Large,\large,\lastbox,\lastskip}
\DoNotIndex{\leftmargin,\linewidth,\LoadClass,\lozenge}
\DoNotIndex{\makelabel,\MakeUppercase,\marginparsep,\marginparwidth,\mbox}
\DoNotIndex{\medskip,\medskipamount,\message,\MessageBreak,\minipage}
\DoNotIndex{\newblock,\newbox,\newcount,\newif,\newskip}
\DoNotIndex{\newtheorem,\newtoks,\next}
\DoNotIndex{\noalign,\nocite,\noexpand,\nointerlineskip,\nonumber}
\DoNotIndex{\normalfont,\normalsize}
\DoNotIndex{\oddsidemargin,\offinterlineskip}
\DoNotIndex{\p@enumiv,\PackageError,\PackageWarning,\PackageWarningNoLine}
\DoNotIndex{\pagebreak,\pageref,\paperwidth,\paperheight,\paragraph}
\DoNotIndex{\parindent,\parsep,\parshape,\parskip,\partopsep}
\DoNotIndex{\PassOptionsToClass,\PassOptionsToPackage}
\DoNotIndex{\prevdepth,\ProvidesPackage,\protected@edef,\qquad}
\DoNotIndex{\ref,\refname,\removelastskip,\renewenvironment}
\DoNotIndex{\RequirePackage,\reset@font,\rule}
\DoNotIndex{\sbox,\sc,\scriptsize,\scshape,\section}
\DoNotIndex{\show,\showbox,\showoutput}
\DoNotIndex{\skip@,\sl,\small,\smallskip,\square}
\DoNotIndex{\stepcounter,\string,\strut}
\DoNotIndex{\subparagraph,\subsection,\subsubsection}
\DoNotIndex{\tabskip,\tag,\text,\textbf,\textheight}
\DoNotIndex{\textit,\textsc,\textsf,\textwidth}
\DoNotIndex{\thanks,\theenumi,\theenumii,\theenumiii,\theenumiv,\theequation}
\DoNotIndex{\thefootnote,\thenamedth@@r@m}
\DoNotIndex{\theorembodyfont,\theorem@bodyfont,\theorem@headerfont}
\DoNotIndex{\theoremstyle,\theorem@style}
\DoNotIndex{\thepage,\thispagestyle,\today,\toks@}
\DoNotIndex{\topmargin,\topsep,\topskip}
\DoNotIndex{\unhbox,\unpenalty,\unskip,\upshape}
\DoNotIndex{\Url,\urlstyle,\value,\vbox,\vphantom,\vss}
\DoNotIndex{\widowpenalty,\write,\xdef,\xpt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\errorcontextlines999
 %*% To include the detailed explanation of the coding, comment out
 %*%   the next line
\OnlyDescription
 %*% If you also want the bibliography style file cc2.bst in the
 %*% documentation, comment out the next line
\bstfalse
 %*% If you also want the old bibliography style file cc.bst in the
 %*% documentation, comment out the next line
\oldbstfalse

 %*% To produce a command index: add the following line for one run,
 %*%   then run  makeindex -s gind.ist cc
 %*%   and reprocess, with or without this line (much faster without)
\EnableCrossrefs
\CodelineIndex %Must stay if not \OnlyDescription


 %*% If not \OnlyDescription:
 %*% To produce a change history:  add the following line for one run,
 %*%   then run  makeindex -s gglo.ist -o cc.gls cc.glo
 %*%   and reprocess, with or without this line (faster without)
\RecordChanges 

\DisableCrossrefs %May stay; zapped by \EnableCrossrefs
\CodelineNumbered %May stay

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% We are going to suppress some warnings:
\newcommand{\suppressnextwarning}{%
  \global\let\ccorgClassWarning\ClassWarning
  \gdef\ClassWarning##1##2{\global\let\ClassWarning\ccorgClassWarning}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% paper data ...

% \submitted{29 September 1999\\
%   Revised 16 February 2000.\\
%   Revised \today}

\date{6 March 2000/% 29 August 2005/
  27 July 2011/\today}
\contact{nuesken@bit.uni-bonn.de}%

\title{Preparing articles for\\\cc{}}%% ??? final versions ???
\subtitle{User's manual}

\author{%
  Michael N{\"{u}}sken\\
  b-it (Bonn-Aachen International Center for Information Technology)\\
  Dahlmannstr. 2\\
  53113 Bonn,
  Germany\\
  \email{nuesken@bit.uni-bonn.de}\\
  \homepage{http://cosec.bit.uni-bonn.de/~nuesken/}
  }

\begin{abstract}
  This text describes the \LaTeXe{} document class \Lclass{cc}, which
  is recommended for typesetting articles accepted for \cc{}.
\end{abstract}
\begin{keywords}
  \LaTeXe{} document class, computational complexity.
\end{keywords}
\suppressnextwarning\nosubject

%%% end of paper data.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\let\ccorgbibpunct\bibpunct% allow usage of \bibpunct everywhere
\suppressnextwarning
\begin{document}
\let\bibpunct\ccorgbibpunct% allow usage of \bibpunct everywhere

\let\ccorgPrintDescribeMacro\PrintDescribeMacro
\let\ccorgPrintDescribeEnv\PrintDescribeEnv
\renewcommand{\PrintDescribeMacro}[1]{}
\renewcommand{\PrintDescribeEnv}[1]{}


\long\def\zzz#1{#1\endinput}\ifx\StopEventually\zzz\relax%
\csname @ifundefined\endcsname{multicols}
{{\scriptsize\tableofcontents}}
{\begin{multicols}{2}
    \scriptsize
    \tableofcontents
  \end{multicols}
  \global\let\tableofcontents\relax
}
\else%
\footnotetext[0]{This version includes the source code. The table of
  contents is on the last page(s).}
\fi%


\section{Submission}
\label{sec:submission}


Submission of a manuscript implies 
\begin{itemize}
\item that the work described has not been published before except
  possibly in conference proceedings; if the latter is the case, it
  must be clearly acknowledged in the submission and a clearly marked
  copy of the proceedings version should be sent as well (possibly by
  separate mail);
\item that it is not under consideration for publication elsewhere;
\item that its eventual publication has been approved by all
  coauthors;
\item that, if and when the manuscript is accepted for publication,
  the authors agree to automatically transfer the copyright to the
  publisher; and
\item that the manuscript will not be published elsewhere in any
  language without the consent of the copyright holder.
\end{itemize}
Manuscripts must be in English.  
%%
Authors should send a \ps{} file plus a short cover email, giving the
contact author's name and address, either to the Editor-in-Chief or to
one of the Editors.  Submissions can also be sent by ordinary mail to
the Editor-in-Chief.
\begin{quotation}\obeylines%
  Peter B\"urgisser
  Technische Universit\"at Berlin
  Institut für Mathematik
  Sekretariat MA 3-2
  Stra\ss{}e des 17. Juni 136
  10623 Berlin
  \textsc{Germany}
  Email: \email{editor-in-chief@computational-complexity.org}
\end{quotation}
Information about \cc{} can be found at the journal's homepage
\cchomepage{}. There you also find a pointer to the publisher's page
for \cc{}:
\begin{center}
  \small
  \ccLINK{},
\end{center}
which contains the current editorial board, information about
subscription and prices, and more.

The following instructions only apply to final versions of
\emph{accepted} manu\-scripts for \cc{}.  For a submission, you may
follow these instructions or use your own setup and submit your
article as a \ps{} file or a typeset manuscript.

\cc{} expects authors of articles accepted for publication to submit
camera-ready copy as a \LaTeXe{} source file. If that cannot be
provided, \cc{} will typeset the article.  The editorial decision to
accept or reject a manuscript is independent of the technology
(computer or typewriter) used to prepare it.




\section{Submission of the final version}
\label{sec:camera}

Camera-ready copy can be produced with \LaTeXe{} using the document
class \Lclass{cc} which is described below.  All necessary files can
be obtained in the WWW, see \cchomepage{} for the necessary files and
installation instructions.  The older \LaTeX{} style file
\file{cc.sty} should not be used anymore.  There is no corresponding
plain\TeX{} style file.

\subsection{Combining several files into one}

When your article is typed, it might be distributed over several
files.  But the \LaTeXe{} source file that you submit must consist of
exactly \emph{one} file.  You may, however, use the \LaTeXe{}
environments \SpecialEnvIndex{filecontents}\Lenv{filecontents} and
\SpecialEnvIndex{filecontents*}\Lenv{filecontents*} to incorporate the
contents of other \LaTeX{} or ASCII(!) files, respectively, into the
main \LaTeXe{} source file.  These two environments can only be used
\emph{before} the |\documentclass| command.  For example, \ps{} files
can be handled this way.  (Note: it seems to be a feature that there
must be a line break just after the environment's argument, in
particular, a comment can only start on the following line.)

\begin{texexamplesize}
\begin{verbatim}
\begin{filecontents}{section1.tex}
  \section{First section}
  ... \cite{Eucleides} wrote ...
\end{filecontents}
\begin{filecontents*}{picture.ps}
%!PS-Adobe-2.0 EPSF-2.0
...
\end{filecontents*}
\begin{filecontents*}{myrefs.bib}
@book{Eucleides,
author = {Eucleides},
title = {Elements},
year = {about 300 BC},
}
\end{filecontents*}
\begin{filecontents}{main.bbl}
\begin{thebibliography}{1}

\bibitem[{Eucleides(about 300 BC)}]{Eucleides}
\textsc{Eucleides} (about 300 BC).
\newblock \emph{Elements}.

\end{thebibliography}
\end{filecontents}

\documentclass{cc}
\usepackage{graphics}
% ...
\begin{document}
\includegraphics{picture.ps}
\input{section1}
\bibliography{cc-journals,myrefs}
\end{document}
\end{verbatim}
\end{texexamplesize}


%  \changes{v2.20}{2012/03/27}{Removed cctest from doc}
\iffalse
\subsection{Testing your final file}

Once your source file is prepared like this, send it via email to
\emailtest{}.  It will then automatically be processed in a defined
setup: |latex|, |bibtex|, |latex|, |latex|, |dvips| are executed
unless an error occurs.  (Of course, |latex| calls \LaTeXe{}.)  The
log files and the resulting \ps{} file will be sent back to you.
(This usually takes only a couple of minutes.)  Verify whether
everything is ok.  If so, submit your \LaTeX{} file as the final
version to \emailsubmit{}.  Mail sent to \emailtest{} is not read by
anyone; only the software described above is automatically executed.
\fi


\section{Using the document class \Lclass{cc}}
\label{sec:usage}

The freeware document class \Lclass{cc} is intended for writing
articles for \cc{}.  But you may, of course, also use this class for
your other work.  For this purpose, several features of this class can
be turned on or off.  (Using \Lclo{noccpublish} turns off the special
requirements for \cc.  Furthermore, this document class can also be
used as a package if desired.  Try |\usepackage{cc-cls}|.  Thus you
can, for example, combine it with the \LaTeXe{} document class
\Lclass{book}.)

Before giving any description we would like to stress a major
difference from standard \LaTeXe{}: References and citations are, by
default, more informative.  We recommend this style.  See below for
details.  (The new features can be turned off by options to
|\documentclass|, see p.~\pageref{macro:documentclass}:
\Lclo{noprefixes}, and \Lclo{cccite} or \Lclo{nonatbib},
respectively.)

After the optional \meta{secondary file contents}, the standard
structure of a \cc{} article starts with
\SpecialUsageIndex{\documentclass}|\documentclass{cc}| and continues
with optional personal declarations, information concerning author,
title and content, and finally the article text including
acknowledgments and references.  The overall structure of a typical
\LaTeXe{} file is shown in \ref{tab:structure}.  On \cc{}'s homepage
you can also find a template file \file{cctemplate.tex} reflecting
this.
\begin{table}[tb!]
  \input{tab-struct.tex}
  \caption{Typical structure of the \LaTeXe{} source and an example of
    an \texttt{\string\author} declaration}
  \label{tab:structure}
\end{table}

Most \meta{personal macros and packages} can be freely used.  If your
file is processed successfully when sent to \emailtest{}, then your
macros and the packages you used should be ok.

\SpecialUsageIndex{\contact}The \meta{contact email address} is the
email address of the contact author.  It is required for \cc{} to
facilitate communication between the publisher and the authors.
\SpecialUsageIndex{\received}\SpecialUsageIndex{\submitted}The author
received a message acknowledging receipt of the manuscript, with the
\meta{received date} or \meta{submission date}.
\SpecialUsageIndex{\title}The \meta{title} should be broken into
balanced lines by |\\| if necessary.  \SpecialUsageIndex{\author}The
\meta{author list} contains the names and addresses of the authors
separated by \SpecialUsageIndex{\and}|\and|, each address consisting
of a line with full author name and some address lines separated by
|\\|.  There should be no font or size changing commands.  If an
address line is very long and not nicely broken, |\newline| forces a
break.  Note the use of the tilde (|~|) in the name of the last
author.  It guarantees that |van~Author| is considered as her last
name.  Email and home page can be given as last line(s) of an address
using the commands
\SpecialUsageIndex{\email}|\email{|\meta{email-address}|}| and
\SpecialUsageIndex{\homepage}|\homepage{|\meta{www-address}|}|.  To
give a different current address, use
\SpecialUsageIndex{\currentaddress}|\currentaddress| to separate the
lines of the latter from the standard address.  It produces a new
address block en\-titled |Current address of \textsc{|\meta{present
    author name}|}:\\| . %
The command \SpecialUsageIndex{\otheraddress}|\otheraddress| can be
used to specify another address block for the present author without
such a heading.  An \meta{abstract}, \meta{keywords} and a
\meta{subject classification} are required for articles in \cc{}.  The
\SpecialEnvIndex{abstract}\meta{abstract} should summarize, in less
than 150 words, the context, content and conclusions of the paper.
List four to six \SpecialEnvIndex{keywords}\meta{keywords}
characterizing the article.  A \SpecialEnvIndex{subject}\meta{subject
  classification} should be given according to the Mathematical
Subject Classification 2000 (MSC~2000), which can be found in the
Internet, see \cc{}'s homepage \cchomepage{}.


The \meta{article text} can be structured by |\section|,
|\subsection|, and |\subsubsection|.  Use |\\| to split long headings.
A table of contents should normally \emph{not} be used.  You can use
diverse theorem and proof environments described below.  Finally your
text might end with \meta{acknowledgments} including funding
information, references to previous versions, and thanks for help.



\subsection{Theorems and proofs}
\label{sec:thm+proof}

\SpecialEnvIndex{assumption} \SpecialEnvIndex{claim}
\SpecialEnvIndex{conjecture} \SpecialEnvIndex{corollary}
\SpecialEnvIndex{definition} \SpecialEnvIndex{example}
\SpecialEnvIndex{exercise} \SpecialEnvIndex{fact}
\SpecialEnvIndex{lemma} \SpecialEnvIndex{notation}
\SpecialEnvIndex{note} \SpecialEnvIndex{observation}
\SpecialEnvIndex{openquestion} \SpecialEnvIndex{problem}
\SpecialEnvIndex{proposition} \SpecialEnvIndex{remark}
\SpecialEnvIndex{result} \SpecialEnvIndex{theorem}
\SpecialEnvIndex{namedtheorem} \SpecialEnvIndex{assumption*}
\SpecialEnvIndex{answer} \SpecialEnvIndex{convention}
\SpecialEnvIndex{question}
\SpecialEnvIndex{thesis} \SpecialEnvIndex{warning}
\SpecialEnvIndex{claim*} \SpecialEnvIndex{conjecture*}
\SpecialEnvIndex{corollary*} \SpecialEnvIndex{definition*}
\SpecialEnvIndex{example*} \SpecialEnvIndex{exercise*}
\SpecialEnvIndex{fact*} \SpecialEnvIndex{lemma*}
\SpecialEnvIndex{notation*} \SpecialEnvIndex{note*}
\SpecialEnvIndex{observation*} \SpecialEnvIndex{openquestion*}
\SpecialEnvIndex{problem*} \SpecialEnvIndex{proposition*}
\SpecialEnvIndex{remark*} \SpecialEnvIndex{result*}
\SpecialEnvIndex{theorem*} \SpecialEnvIndex{namedtheorem*}
\SpecialEnvIndex{answer*} \SpecialEnvIndex{convention*}
\SpecialEnvIndex{question*}
\SpecialEnvIndex{thesis*} \SpecialEnvIndex{warning*}
%%
Typing theorems is much easier than finding or proving them.  We give
some examples.
\begin{texexample}
\begin{theorem}\label{thm1}
  This is a very simple theorem.
\end{theorem}
\end{texexample}
This environment supports an optional argument.  Often it is used to
supply source information:
\begin{texexample}
\begin{theorem}[\cite{knu84}]
  \label{thm2}
  This is a theorem
  by somebody else.
\end{theorem}
\end{texexample}
In rare occasions, you might prefer an unnumbered theorem:
\begin{texexample}
\begin{theorem*}
  This theorem is so important
  that it has no number.
\end{theorem*}
\end{texexample}
Of course, we are not restricted to theorems:
\begin{texexample}
\begin{lemma}
  \label{res:lemma}
  We can also have lemmas.
  \begin{enumerate}
  \item\label{lemma:1}
    It has two claims.
  \item\label{lemma:2}
    And it shows how lists
    are used, formatted
    and referenced.
  \end{enumerate}
\end{lemma}
\end{texexample}
You can replace |theorem| by |lemma| to obtain lemmas instead of
theorems in the above examples.  Further, you can use the theorem-like
environments listed in \ref{tab:thmenv}.
\begin{table}[htb!]
  \input{tab-thmenv.tex}
  \caption{Defined theorem-like environments}
  \label{tab:thmenv}
\end{table}
%%
Each of these environments has a starred form which produces no
number.  Moreover, you can give examples, and continue them.
\begin{texexample}
\begin{example}
  \label{myfirst}
  Or you give an example.
\end{example}
\begin{contexample}{myfirst}
  Sometimes it is nice
  to continue an example.
\end{contexample}
\end{texexample}
Note \pagebreak[3] that an example is always terminated by a lozenge
($\eoesymbol$).  You can redefine
\SpecialUsageIndex{\eoesymbol}|\eoesymbol| if you prefer another (or
no) symbol.  The other theorem-like environments can be continued in
this way:\nobreak
\begin{texexample}
\begin{continued}{res:lemma}
  This continues the lemma.
\end{continued}
\end{texexample}
All this is not enough? Ok, we also support a theorem-like environment
with a name that you can choose yourself.
\begin{texexample}
\begin{namedtheorem}{Fundamental
    theorem}
  \label{FunThm}
  This is a simple named
  theorem with a number.\qed
\end{namedtheorem}
\begin{namedtheorem*}{Fundamental
    lemma}
  \label{FunLemma}
  This is a simple named
  theorem without number.
\end{namedtheorem*}
\end{texexample}
Note that the references to the labels are ``\ref{FunThm}'' and
``\ref{FunLemma}'', respectively.


Typing proofs is even easier:
\begin{texexample}
\begin{proof}
  This is a very simple proof.
\end{proof}
\end{texexample}
The \pagebreak[3] default qed symbol is an open square ($\qedsymbol$).
Sometimes, not a proof but only an outline of a proof or a sketch is
given.  This can be done as follows:\nobreak
\begin{texexample}
\begin{namedproof}
  {Outline of proof}
  [following \textsc{Third}]
  This is a named proof.
  Its title claims that this
  is only an outline.
\end{namedproof}
\end{texexample}
Typesetting of proofs should only be done with these proof
environments.  There is one further problem.  Sometimes a proof (or an
example) terminates with a list, an equation, or some other similar
environment.  Then the end of proof mark often seems to be placed
incorrectly.  If so, place \SpecialUsageIndex{\qed}|\qed| at the end
of this environment.  Usually this fixes this problem.  (If not, maybe
you can spend a few extra words at the end of your proof?)

Typing equations can be done as usual.  But note that
\Lpackage{amsmath} provides a lot of additional equation-like
environments, see \cite{ams96} or Chapter~8 in \cite{goomit95}.



\subsection{Labels and references}
\label{sec:label+ref}

Labels and references, as we use them, have been known since the time
\LaTeX{} was born.  But note that references using the document class
\Lclass{cc} are more informative than usual.  For example,
\SpecialUsageIndex{\ref}|\ref{myfirst}| now produces: \ref{myfirst}.
In the standard setup, you would have obtained: \bare\ref{myfirst}.
If you use the document class option \Lclo{noprefixes}, |\ref| behaves
as usual.  We recommend to adopt the new style.  You can access the
bare (unprefixed) form with
\SpecialUsageIndex{\bare\string\ref}|\bare\ref{myfirst}| unless you
issue the document class option \Lclo{nobare}.  (The latter might be
necessary to save space.)
\begin{texexample}
We have seen two theorems:\\
\ref{thm1} and \bare\ref{thm2}.
\end{texexample}
%%
Further, list items in theorem-like environments produce either only
the item number or the theorem reference plus the item number,
depending on whether the reference occurs near the theorem or not.
(Near means, after this theorem (or lemma, \dots) and before the next
theorem or equation.)  For example, |\ref{lemma:1}| here produces
\ref{lemma:1}.  You can force the short form:
\SpecialUsageIndex{\short\string\ref}|\short\ref{lemma:1}| yields
\short\ref{lemma:1}, or the whole form:
\SpecialUsageIndex{\whole\string\ref}|\whole\ref{lemma:1}| yields
\whole\ref{lemma:1}.  If you issue the document class option
\Lclo{notheoremitemprefixes}, subitems are referenced as in standard
\LaTeXe{}: you always obtain the short form.



\subsection{Bibliography and citations}
\label{sec:bib+cite}

The most comfortable citation scheme comes with the \Lpackage{natbib}
package.  By default this is loaded.  Let's begin with an example:
\begin{texexample}
Don \citeauthor{knu84}'s design
of \TeX{}, as described in The
\TeX{}book \citep{knu84},
enabled the typesetting of texts
containing complicated formulas.
In \citet{knu86b,knu86c,%
knu86d,knu86e} the
underlying programs and fonts
are collected.  On this basis,
\LaTeX{} and \LaTeXe{} were
developed, see \citet{goomit95,%
lam94,kopdal99}.
(Graphics can be included in many
ways, see \citealp*{goomit96g}.)
\end{texexample}
The command |\citet| (equivalent to |\cite|) is used for textual
citations and the command |\citep| for parenthetical citations.
Multiple citations are simply listed in one command.  The alternative
commands |\citealt| and |\citealp| produce the same output but without
parentheses.  This avoids nested parentheses in text which is already
inside parentheses.  Note that the years are in parentheses in the
running text, but without parentheses if the reference itself is in
parentheses.  Several papers in the same year are distinguished as
``\cite{knu86b}, \cite{knu86c}''.  Further examples:
\begin{center}
  \texexamplesize
  \begin{tabular}{l@{$\;\Rightarrow\;$}l}
    |\citet{knu84}| & \citet{knu84} \\
    \multicolumn2{l}{\texttt{\string\citet
        \string{knu84,knu86b,knu86c,knu86d,knu86e\string}}}\\
    & \citet{knu84,knu86b,knu86c,knu86d,knu86e} \\
    |\citep{knu84}| & \citep{knu84} \\
    |\citealt{knu84}| & \citealt{knu84} \\
    |\citealp{knu84}| & \citealp{knu84} \\
    |\citeauthor{knu84}| & \citeauthor{knu84} \\
    |\citeyear{knu84}| & \citeyear{knu84} \\
    |\citet{goomit95}| & \citet{goomit95} \\
    |\citet*{goomit95}| & \citet*{goomit95} \\
    |\citeauthor*{goomit95}| & \citeauthor*{goomit95} \\
  \end{tabular}
\end{center}
If the first author's name contains a \textsl{von} part, such as
``della Robbia'', then |\citet{dRob98}| produces ``della Robbia
(1998)'', even at the beginning of a sentence. One can force the first
letter to be in upper case with the command |\Citet| instead. Other
upper case commands also exist.  More features are documented with the
\Lpackage{natbib} package, see \cite{dal99}.

Bibliography is best produced using \BibTeX{}.  See \cite{kopdal99},
\cite{lam94}, \cite{goomit95} or \cite{pat88} for information about
using \BibTeX{}.  Then
\SpecialUsageIndex{\bibliography}|\bibliography{|\meta{bibliography
    files}|}| produces the bibliography.  (The
\SpecialUsageIndex{\bibliographystyle}|\bibliographystyle| is
automatically issued by the class, so you need not do this.)  In this
case, the \BibTeX{} file(s) and the \texttt{.bbl} file should be
embedded in the \LaTeXe{} source file using the \Lenv{filecontents}
environment (see above).

The \BibTeX{} file \file{journals.bib}, available on \cc{}'s homepage
\cchomepage{}, contains macros for a number of journals and conference
proceedings.  If in your document you have
|\bibliography{cc-journals,myrefs}|, then an entry |journal = FOCS99,| in
your file \texttt{myrefs.bib} will produce: `Proceedings of the 40th
Annual IEEE Symposium on Foundations of Computer Science, {\rm New
  York City~NY}' when \BibTeX{} is run.  (Note that \texttt{journals}
must precede your own bibliography file!)  Since this will be updated
only sporadically, the latest conference proceedings may be missing
here.

\subsubsection{\dots without \Lpackage{natbib}}

If the package \Lpackage{natbib} is not installed on your system for
some obscure reason, you can issue the option \Lclo{cccite} to switch
to the old \cc{} style of referring to the bibliography.  This still
works but is not recommended any more.
{\let\parencite\citep\let\citemul\citet\let\shortcite\citep
\begin{texexample}
Don \citeauthor{knu84}'s design
of \TeX{}, as described in The
\TeX{}book \parencite{knu84},
enabled the typesetting of texts
containing complicated formulas.
In \citemul{knu86b,knu86c,%
knu86d,knu86e} the
underlying programs and fonts
are collected.  On this basis,
\LaTeX{} and \LaTeXe{} were
developed, see \cite{goomit95},
\cite{lam94}, \cite{kopdal99}.
(Graphics can be included in many
ways, see \shortcite{goomit96g}.)
\end{texexample}
}%
Using numbered references are used if the references give no
additional information.  (As most hand-made references do.)  This is
not recommended:
{%
  \makeatletter
  \aftergroup\bibstyle@egs%\bibpunct[, ]{(}{)}{;}{a}{,}{,}
  \@fileswfalse% Do not write these citations
  \bibstyle@plain
  \NAT@set@cites
  %\def\NAT@sort{1}%
  \makeatother
\begin{texexample}
Don Knuth's design
of \TeX{}, as described in The
\TeX{}book \cite{knu84},
enabled the typesetting of texts
containing complicated formulas.
In \cite{knu86b,knu86c,%
knu86d,knu86e} the
underlying programs and fonts
are collected.  On this basis,
\LaTeX{} and \LaTeXe{} were
developed, see \cite{goomit95,%
lam94,kopdal99}.
(Graphics can be included in many
ways, see \cite{goomit96g}.)
\end{texexample}
}%
Note that only |\cite| makes sense here!  Although this is acceptable,
the first style is preferred since it is more informative.





\subsection{Mathematical typesetting {\`{a}} la \Lpackage{amsmath}}
\label{sec:alaAMS}

We recommend to use the features provided by \Lpackage{amsmath},
\Lpackage{amsfonts}, and \Lpackage{amssymb}.  By default the class
already loads these packages.  For example, the \Lenv{gather}
environment allows you to combine several equations into one,
\Lenv{gather*} produces no numbers.  The \Lenv{align} or \Lenv{align*}
environments are similar to \Lenv{eqnarray} but you only need one
ampersand |&|.  Other than \Lenv{eqnarray}, \Lenv{align} and all other
\Lpackage{amsmath} environments take care of the position of the
number: there will be no overlap between number and formula!  The
\Lenv{multline} or \Lenv{multline*} environment allows you to type
very long equations, the first line is flushed left, the last line is
flushed right and all others are centered.  The \Lenv{alignat} or
\Lenv{alignat*} environment allows you to put two or more equations on
a line, aligned with those on the other lines.

See \cite{ams96} or Chapter 8 in the \LaTeX{} companion
\citep{goomit95} for a complete description.  But note that
\Lpackage{amsthm} is not compatible with the \Lclass{cc} class and
must not be used.  (The same holds for its derivative
\Lpackage{apthm}.)



\subsection{Reminders}
\label{sec:reminders}

\begin{itemize}
  %\let\emph\textbf
\item The following items tend to be overlooked:
  \begin{itemize}
  \item email address of contact author,
  \item key words,
  \item subject classification,
  \item submission or received date.
  \end{itemize}
  Please make sure you have filled them appropriately.
\item Manuscripts are in \emph{(American) English}.  Authors are
  encouraged to have their contribution checked for \emph{grammar},
  and to use a spelling checker.  We emphasize that \emph{American
    spelling} should be used.
\item Use |\hyphenation{|\meta{hyphenation exceptions}|}| or |\-| if
  words are not correctly hyphenated.
\item \emph{Abbreviations} should be spelled out in full when first
  used.  (With \LaTeX{}, try the package \Lpackage{acronym}.)
\item Non-negative \emph{integers} up to twelve should
  usually be spelled out.
\item \emph{Funding information} and help from friends and referees go
  into the acknowledgments section.
\item \emph{Appendices} should not be used.
  %%
\item Read your |.log| file carefully.  There should be no
  |Overfull \hbox|%
  , and certainly no visible one (more than |1pt|).  If necessary,
  reword the text.  (Sometimes |\begin{sloppypar}| \dots{}
    |\end{sloppypar}| or local use of |\sloppy|,
  |\tolerance=|\meta{number}, |\emergencystretch=|\meta{dimension}
  help, see \cite{goomit95}.)
\item \emph{Blank (redundant) spaces} should be minimized by careful
  arrangement of tables and figures. 
\item \emph{Avoid starting} a sentence with a symbol.
\item It is best to \emph{avoid footnotes}.
\item \emph{Figures and tables} are to be inserted in the text nearest
  their first reference.  They should be arranged so as not to cause
  an excessive amount of blank space on the remainder of the page.
\item \cite{goomit96g} describe various ways to include
  \emph{pictures} in \LaTeXe{}.  They also mention how to scale
  pictures up or down, which can be used for fine tuning and to avoid
  redundant white space.  (Try to stick to
  |\includegraphics{|\meta{PostScript file}|}| and
  |\input{|\meta{gnuplot \LaTeX{} file}|}|.)
  
  Alternatively, original India ink drawings are possible.  Please
  send one set of originals which must be clear and clean.  Ensure
  that the figures (including letterings and numbers) are large enough
  to be clearly seen after reduction to 86\%.
\item Recall that \LaTeX{} has tools to build \emph{lists}, the
  environments \Lenv{itemize} and \Lenv{enumerate} are the most
  frequent.  Please, use them!

  Note that a list in a theorem is numbered differently than outside.
\item \emph{Font selection} in \LaTeXe{}'s new font selection scheme
  (nfss) should be done using the commands
  \begin{center}
    |\emph{...}|, |\texttt{...}|, |\textbf{...}|,
    \\
    |\textsf{...}|, |\textsc{...}|, |\textrm{...}|,
  \end{center}
  and so on.  Usually, you should only use the first one.  In any
  case, try to use them as rarely as possible!  In math mode there are
  similar commands.  Note that |\mathbb{|\meta{letter(s)}|}| produces
  blackboard bold letters and |\mathcal{|\meta{letter(s)}|}| produces
  calligraphic letters.  For mathematical operators you should not use
  font selection but |\operatorname{|\text{name}|}|.
\item Normally, you should not at all be concerned about \emph{line or
    page breaks}.  Also, \emph{vertical space} should be correctly
  adjusted by the document class.  Use the corresponding commands only
  if no other solution is possible.  If you need to use |\\| in plain
  text, you probably did something wrong.
\end{itemize}



\subsection{Commands for the journal editor and publishers}
\label{sec:editor}

The journal editor and publishers will insert the publishing data
(right after the \cs{documentclass}).

For Springer Pubishing Services there is a special macro \cs{ccsps} to
handle the entire production flow.  Its argument is a comma separated
list of |key=value| pairs and |key| singletons.  This list is
interpreted by the package \Lpackage{xkeyval}.  A singleton |key| in
the list is interpreted as |key=|\meta{default}, and causes the key
|key| to be set to its default value (provided it has one).  In
particular, for boolean keys this |key| always means |key=true|.
\begin{verse}
  \SpecialUsageIndex{\ccsps}%
  |\ccsps{|\\
  |  issuestage,|\\
  |  year=|\meta{year}|,|\\
  |  volume=|\meta{volume}|,|\\
  |  issue=|\meta{issue}|,|\\
  |  firstpage=|\meta{firstpage}|,|\\
  |  |\dots\\
  |}|
\end{verse}
There are a lot more options to be chosen:
\begin{itemize}
\item The key |submitted| sets the received date.  Note, that this
  setting overrides the \cs{received} date.
\item The boolean key |revisionstage| turns on (or off) the revision
  features. Initially set to |false|.
  \begin{itemize}
  \item The key |DOImsnr| sets the manuscript number.  It can be set
    to any value.  This is the \emph{Article No.} occuring in the
    helper strip.  Default |??|.
  \item The boolean keys |TYPESET|, |DISK|, |LE| and |CP| set certain
    hooks in the help strip. Initially set to |false|.
  \item The key |draftcopy| can be set to any value to be used as a
    watermark.  Default |Uncorrected proof|.
  \item The boolean key |grid| turns on (or off) the alignment
    grid. Initially set to |false|.
  \end{itemize}
\item The boolean key |issuestage| turns on (or off) the display of
  publication details like volume, issue, pages, doi and
  more. Initially set to |false|.
  \begin{itemize}
  \item The key |year| sets the publishing year. Default |\the\year|.
  \item The key |volume| sets the volume. Default |??|.
  \item The key |issue| sets the issue. Default |??|.
  \item The key |firstpage| sets the number of the first page. Default
    |1|.
  \item The key |copyholder| sets the copyright holder.  The default
    is |Springer Basel AG| or |The Author(s)| for normal or open
    access, respectively.
  \item The key |doisuffix| sets the doi to
    |10.1007/s00037-|\meta{year}|-|\meta{doisuffix}.  Alternatively,
    the key |doi| sets the entire doi.  Initially set to
    |10.1007/s00037-|\meta{year}|-????-?|.
  \item The key |onlinedate| sets the online date.  Default |??|.
  \item Deprecated: The key |onlinefirstyear| is the same as the
    publishing year, see |year|.
  \item Deprecated: The key |coveryear| sets the (two digit) cover
    year for use in the article identifier (above the DOI).  Default
    last two digits of |\the\year|.
  \end{itemize}
\item The boolean key |pdfpage| turns on (or off) all settings for
  producing the online pdf.  In particular, if it is off then the
  helper strip, linenumbers and a draft watermark are displayed.
  Initial settings is |false|.
\item The boolean key |xlink| turns on (or off) settings for
  hyperlinks.  Initial settings is |false|.
\end{itemize}

For publication in \cc{} abstract, keywords and subjection
classification are usually required.  The commands \cs{noabstract},
\cs{nokeywords} and \cs{nosubject} may be used to turn off errors
raised by missing abstract, keywords and subject classification,
respectively.


\begin{sloppypar}
  \scriptsize OUT-OF-DATE: Prior to mid 2011 the declaration
  \begin{center}
    \SpecialUsageIndex{\ccpublish}%
    |\ccpublish{|\meta{year}|}{|\meta{volume}|}|%^^A
    |{|\meta{number}|}{|\meta{first page}|}|
  \end{center}
  was inserted next to author and title information.  Further, the
  commands \SpecialUsageIndex{\electronic}|\electronic| and
  \SpecialUsageIndex{\printed}|\printed| switches the ISSN to the
  electronic or printed version, respectively.
\end{sloppypar}


\subsection{Disclaimer}
\label{sec:disclaimer}

The macros are not guaranteed to be free of errors, and any bugs,
inconsistencies, and suggestions for further improvement or other
comments should be reported to \emailmaintenance{}.


\condbreak{1cm}

\section{Quick upgrade: from bare \LaTeX{} to \Lclass{cc}}

%  \changes{v2.03}{2003/05/26}{Added section on quickly upgrading to
%    cc \dots}
Replace your |\documentclass{...}| command with the line
\begin{verbatim}
\documentclass[nonatbib,noprefixes]{cc}
\end{verbatim}
\noindent
and adjust author, title, keywords and subject classification
according to \ref{tab:structure} (page \pageref{tab:structure}).  (In
particular, all this information must appear before the
|\begin{document}|.)
%\end{document}
The title may be too long for the running head.  You need
to supply |\titlehead{|\meta{short title}|}| then.

If there are any |\newtheorem| commands then turn them off and use the
\Lclass{cc} theorem environments described in \ref{sec:thm+proof}.
(Note that there is an environment \Lenv{namedtheorem} for
theorem-like environments with unforeseen names.  You can also use
this in a definition like
\begin{verse}
  |\newenvironment{bla}{\theorem}{\endtheorem}|\\
  |\newenvironment{foo}{\namedtheorem{Foo}}{\endnamedtheorem}|
\end{verse}
if necessary.)  If there are definitions for proofs or qed signs then
turn them off, too; the \Lclass{cc} class provides these things.

For publication in \cc{} you should next switch to author-year
citations.  To do so:
\begin{itemize}
\item remove the option |nonatbib|,
\item add your |.bib|-file in
  \begin{verse}
    |\begin{filecontents*}{\jobname.bib}| \\
    |  |\dots\\
    |\end{filecontents*}|
  \end{verse}
  before |\documentclass|,
\item throw away your handwritten environment \Lenv{thebibliography}
  if any and the command |\bibliographystyle| if present, and replace
  it or your |\bibliography| command with |\bibliography{|\meta{name
      of your |.bib|-file}|}|.
\item Then run |latex|, |bibtex| and |latex| twice and
\item adjust the text at the citation points: In particular, replace
  all |\cite| commands with either |\citet| for textual, |\citep| for
  parenthetical or |\citealt| for use inside parentheses.  (Well,
  |\cite| is usually equivalent to |\citet|.  However, changing all
  shows that it's done.)
\end{itemize}

Finally, you may want to switch to more intelligent |\ref|, see
\ref{sec:label+ref}.  To do so just remove the option |noprefixes| and
adapt text at your |\ref| commands, usually by removing words like
Theorem, Section before them and parentheses around equation
references.

\section{Make your document portable}

%  \changes{v2.03}{2003/05/26}{Added section on making things portable
%     \dots}
In order to make your \Lclass{cc} source file portable to persons who
did not yet install the \Lclass{cc} class, include the file
|cc-cls-inline.tex|.  This file can be found on the journal's homepage
\url{http://www.computational-complexity.org/}.  Please do not forget
to remove the following changes prior to sending your file to \cc{},
it will have no effect there.  You have two options:
\begin{enumerate}
\item Simply include the entire file |cc-cls-inline.tex| in your file
  just before the |\documentclass| command.  This has the drawback
  that your personal texts starts only after many lines irrelevant to
  you.
\item Insert your file in the following framework:
  \verbatiminput{cc-portability-frame.tex}
  This has the advantage that the \Lclass{cc} stuff is at the end.  The
  drawback is that you need to call \LaTeX{} once more.
\end{enumerate}

\condbreak{1cm}

\section{Commands}
\label{sec:commands}

\begin{description}
\item
  \label{macro:documentclass}
  \DescribeMacro{\documentclass}|\documentclass[|\meta{options}|]{cc}|
Possible \meta{options} are:
\begin{itemize}
\item any option from the \Lclass{article} document class.
  (\Lclo{a4paper}, \Lclo{a4paper}, \Lclo{b5paper}, \Lclo{letterpaper},
  \Lclo{legalpaper}, \Lclo{executivepaper}, \Lclo{landscape},
  \Lclo{10pt}, \Lclo{11pt}, \Lclo{12pt}, \Lclo{oneside},
  \Lclo{twoside}, \Lclo{draft}, \Lclo{final}, \Lclo{titlepage},
  \Lclo{notitlepage}, \Lclo{onecolumn}, \Lclo{twocolumn},
  \Lclo{leqno}, \Lclo{fleqn}, \Lclo{openbib}, though not all of them
  might produce nice results.)  Note that all the \Lclo{*paper}
  options invoke the option \Lclo{textarea\protect\equal none}, you need to add
  \Lclo{textarea\equal cc} (or similar, see below) after the \Lclo{*paper}
  option to get the same text area as in \cc{} then.
\item any option from the \AMS{} packages (if they are not disabled by
  \Lclo{noams}).  (\Lclo{intlimits}, \Lclo{nointlimits},
  \Lclo{sumlimits}, \Lclo{nosumlimits}, \Lclo{namelimits},
  \Lclo{nonamelimits}, \Lclo{leqno}, \Lclo{reqno}, \Lclo{centertags},
  \Lclo{tbtags}, \Lclo{cmex10}, \Lclo{fleqn}.)
% \item \Lclo{final} (default): `This is a final version.'
% \item \Lclo{draft}: `This a draft.'
\item \Lclo{localnumbering}, \Lclo{longarticle} (default): theorem and
  equation numbering is local to each section, e.g.\ Theorem~3.4.
\item \Lclo{globalnumbering}, \Lclo{shortarticle}: theorem and equation
  numbering is global, e.g.\ Theorem~17.
\item \Lclo{ccpublish} (default): requirements as for publication in
  \cc{}.
\item \Lclo{noccpublish}: |\contact|, \Lenv{abstract}, \Lenv{keywords}
  and \Lenv{subject} are optional now.
\end{itemize}
Further, the following \meta{options} are available.  They are mainly
intended to deactivate certain standard features of the class, in
cases where these cause trouble.
\begin{itemize}
\item \Lclo{ams} (default): use the \AMS{} packages \Lpackage{amsmath}
  (which includes \Lpackage{amstext}, \Lpackage{amsgen},
  \Lpackage{amsbsy}, \Lpackage{amsopn}), \Lpackage{amsfonts},
  \Lpackage{amssymb}.
\item \Lclo{noams}: do not use the \AMS{} packages.
\item \Lclo{cclayout}, \Lclo{nocclayout} turn the \cc{} layout on or
  off.
\item \Lclo{textarea\equal cc} (default with \Lclo{ccpublish}) always
  takes the newest cc text area from the following:
  \begin{itemize}
  \item \Lclo{textarea\equal cc2} (119mm $\times$ 45.5pc) picks the cc
    text area (after July 2011),
  \item \Lclo{textarea\equal cc1} (141mm $\times$ 200mm) picks the cc
    text area (before July 2011),
  \end{itemize}
  For downward compatibility the option \Lclo{cctextarea} equaling
  \Lclo{textarea\equal cc} and \Lclo{nocctextarea} equaling
  \Lclo{textarea\equal none} still work.  All these options have no
  effect with \Lclo{nocclayout}.
\item \Lclo{textarea\equal full} makes the text area as large as
  possible (with $\frac12$in margin to all sides).
\item \Lclo{textarea\equal none} takes whatever is there.  This is
  same as \Lclo{nocctextarea}.
\item \Lclo{noothermargins}, \Lclo{classicalmargins},
  \Lclo{printmargins}, \Lclo{balancedmargins}: Choose margin mode.
  \Lclo{noothermargins} leaves the margins alone,
  \Lclo{classicalmargins} leaves the outer margin but fits the inner
  one to paper and text widths, \Lclo{printmargins} puts 5mm to the
  outer edge, \Lclo{balancedmargins} makes both margins equal.
\item \Lclo{autotitle} (default): at |\begin{document}| the title is
    generated, and at |\end{document}| the receipt information and
  affiliations are generated.
\item \Lclo{noautotitle}: \SpecialUsageIndex{\maketitle}|\maketitle| and
  \SpecialUsageIndex{\makeendtitle}|\makeendtitle| must be explicitly
  written.
\item \Lclo{ccsectioning} (default): use centered section headings and
  in-line subsection and subsubsection headings.
\item \Lclo{noccsectioning}: use section, subsection, subsubsection,
  paragraph, subparagraph headings as with the \Lclass{article}
  document class.
\item \Lclo{natbib} (default): use the citation scheme provided by the
  \Lpackage{natbib} package by Patrick W. Daly, the options
  \Lclo{sort\&compress} (default), \Lclo{sort} and \Lclo{nosort}
  decide whether multiple citations are sorted or not (compression
  only affects numerical citations).
\item \Lclo{cccite}: use the (old) author-year citation scheme of \cc.
\item \Lclo{nocccite}, \Lclo{nonatbib}: do neither use the
  \Lpackage{natbib} nor the \cc{} citation scheme.
\item \Lclo{onecolumnbibliography} (default),
  \Lclo{twocolumnbibliography}: With these options you can choose one
  or two columns for the bibliography.
\item \Lclo{twocolumnendtitle} (default), \Lclo{onecolumnendtitle}:
  With these options you can choose one or two columns for the
  bibliography.
\item \Lclo{cctheorems} (default): theorem like environments are
  defined as described.
\item \Lclo{nocctheorems}: theorem like environments are \emph{not}
  defined at all.
\item \Lclo{prefixes} (default): references to theorems, equations,
  and so on, come with prefixes, e.g.\
  \SpecialUsageIndex{\ref}|\ref{res:lemma}| produces `\ref{res:lemma}'
  rather than only `\bare\ref{res:lemma}',
\item \Lclo{noprefixes}: references behave as in standard \LaTeXe{},
\item \Lclo{bare} (default): \SpecialUsageIndex{\label}|\label| produces two
  labels instead of one, a long form for
  \SpecialUsageIndex{\ref}|\ref| and a short form for
  \SpecialUsageIndex{\bare\string\ref}|\bare\ref|,
\item \Lclo{nobare}: \SpecialUsageIndex{\label}|\label|
  works as usual, \SpecialUsageIndex{\bare\string\ref}|\bare\ref| is
  equivalent to \SpecialUsageIndex{\ref}|\ref| (but gives a warning),
\item \Lclo{theoremitemprefixes} (default): references to subtopics of
  a theorem (or lemma ...) consist of the theorem reference and the
  item reference, for example, |\ref{lemma:2}| produces
  `\ref{lemma:2}'.  In fact, between \ref{res:lemma} and the following
  theorem or equation (\ref{myfirst} in our case) you would have
  obtained `\short\ref{lemma:2}'.  This short form can be forced by
  \SpecialUsageIndex{\short\string\ref}|\short\ref{lemma:2}|.  You can
  also force the whole form by
  \SpecialUsageIndex{\whole\string\ref}|\whole\ref{lemma:2}|.
\item \Lclo{notheoremitemprefixes}: with this option you always get
  the short form.
\item \Lclo{separateequationcounting}: Do not count equations together
  with theorems, lemmas, \dots
\item \Lclo{noseparateequationcounting} (default): Count equations
  together with theorems, lemmas, \dots
\item \Lclo{ccalgorithms} (default): Load the algorithms stuff.
\item \Lclo{noccalgorithms}: Do not load the algorithms stuff.
\end{itemize}
And finally there are some options for font, input and multilingual
support.
\begin{itemize}
\item \Lclo{OT1} (default): use the font encoding scheme OT1 (this is
  standard with \LaTeX).
\item \Lclo{T1}: use the new font encoding scheme T1 (256 characters
  per font instead of 128).
\item \Lclo{nolatin1} (default): do not use the input encoding scheme
  latin1 (this is standard with \LaTeX).
\item \Lclo{latin1}: use the input encoding scheme latin1 (so Umlaute,
  {\"{a}}{\"{o}}{\"{u}}, and so on can be typed in literally).
\item \Lclo{utf8} (default): use the input encoding scheme utf-8.
\item \Lclo{noutf8}: do not use the input encoding scheme utf-8.
\item \Lclo{noinputenc}: do not use any input encoding scheme, so that
  loading the package inputenc can be done afterwards.
\item \Lclo{nobabel} (default): do not use \Lpackage{babel} for
  multilingual support.
\item \Lclo{babel} (default): load \Lpackage{babel} for multilingual
  support (at an appropriate place, i.e.{} before \Lpackage{inputenc}),
  required languages must be included as options to the
  |\documentclass|.
\item \Lclo{multilingual}: this is an abbreviation for \Lclo{T1},
  \Lclo{latin1} and \Lclo{babel}.
\item \Lclo{nomultilingual}: this is an abbreviation for \Lclo{OT1},
  \Lclo{nolatin1} and \Lclo{nobabel}.
\end{itemize}

\item \DescribeMacro{\contact}|\contact{|\meta{contact email
      address}|}|
  
  Preamble command to specify the email address of the contact author.
  This is required for publications in \cc{}.

\item \DescribeMacro{\received}|\received{|\meta{submission date}|}|
 \DescribeMacro{\submitted}|\submitted{|\meta{submission date}|}|
  
 Preamble command to declare the submission or received date of the
 manuscript.  (Both variants do exactly the same!)  Use the format
 \texttt{27 July 2011}.

\item \DescribeMacro{\author}|\author{|\meta{author list}|}|
  
  Preamble command to specify the authors and their addresses.
  Different authors are separated by \SpecialUsageIndex{\and}|\and|.
  If you are not writing for \cc{} footnotes can be produced by
  \SpecialUsageIndex{\thanks}|\thanks{|\meta{text}|}|.  If an author
  has a different current address, use
  \SpecialUsageIndex{\currentaddress}|\currentaddress|.  For an other
  type of other address, use
  \SpecialUsageIndex{\otheraddress}|\otheraddress| followed by a line
  like
  |Guest address of \textsc{|\meta{author name}|}|. %
  Use the macros
  \SpecialUsageIndex{\email}|\email{|\meta{email-address}|}| and
  \SpecialUsageIndex{\homepage}|\homepage{|\meta{www-address}|}| to
  specify the email address and home page, respectively.  The
  combination of these things can be seen best in the example in
  \ref{tab:structure}.
  
  Note that from this declaration also the list of authors in the
  title and the short list of authors for the running head is derived.
  Usually, the automatism should work well.  If not (maybe the
  authors' names are very long), you can use
  \SpecialUsageIndex{\authorhead}|\authorhead{|\meta{last name list}|}| %
  to specify the author list for the running head.  Similarly, you can
  use
  \SpecialUsageIndex{\authorlist}|\authorlist{|\meta{name list}|}| %
  if the the automatic extraction of the author names for the title
  does not work as expected.

\item \DescribeMacro{\title}|\title{|\meta{title}|}|
  
  Preamble command to specify the title.  If the title is not broken
  nicely, you can use |\\| to improve line breaking.  Long titles do
  not fit into the running head.  In this case please specify a
  shorter version using
  \SpecialUsageIndex{\titlehead}|\titlehead{|\meta{short title}|}|.

\item \DescribeMacro{\subtitle}|\subtitle{|\meta{subtitle}|}|
\item \DescribeMacro{\version}|\version{|\meta{version}|}|
  
  These preamble command allows to insert, e.g., `Preliminary version'
  under the title.

\item \DescribeMacro{\date}|\date{|\meta{date}|}|
  
  Preamble command, default is |\today|.  This date is \emph{not} used
  when the article is published in \cc{}, but it is put in the header
  when using the option \Lclo{noccpublish}.
  
\item \DescribeEnv{abstract}|\begin{abstract}| \meta{text}
    |\end{abstract}|
  
  Preamble environment to specify the abstract.
  
\item \DescribeEnv{keywords}|\begin{keywords}| \meta{list of keywords}
    |\end{keywords}|
  
  Preamble environment to specify keywords.
  
\item \DescribeEnv{subject}|\begin{subject}| \meta{subject
      classification} |\end{subject}|

  Preamble environment to specify the subject classification.
  
\item \DescribeEnv{acknowledge}|\begin{acknowledge}|
    \meta{acknowledgments} |\end{acknowledge}|
  
  Environment for acknowledgments.  Funding information can also be
  included here.  If there are no acknowledgements you \emph{must} put
  \cs{noacknowledge} instead.
  
\item \DescribeMacro{\bibliography}|\bibliography{|\meta{list of
      bibliography files}|}|
  
  Command to produce the bibliography from the \meta{list of
    bibliography files} using \BibTeX{}.
  
\item \DescribeEnv{theorem}|\begin{theorem}[|\meta{citation}|]|
    \meta{theorem text} |\end{theorem}|
\item \DescribeEnv{theorem*}|\begin{theorem*}[|\meta{citation}|]|
    \meta{theorem text} |\end{theorem*}|
  
  Environment for theorems.  There are similar environments, for
  example, \Lenv{lemma}, \Lenv{definition}, \Lenv{example}.  Compare
  \ref{tab:thmenv} for a complete list.  Each of them has a starred
  version that is not numbered.
  
\item \DescribeEnv{continued}|\begin{continued}{|\meta{label-key}|}|
    \meta{theorem text} |\end{continued}|
\item
  \DescribeEnv{contexample}|\begin{contexample}{|\meta{label-key}|}|
    \meta{example text} |\end{contexample}|
  
  Environment to continue theorems-like environments.  Note that
  examples need a different environment since they use an end of
  example mark.
  
\item
  \DescribeEnv{namedtheorem}|\begin{namedtheorem}{|\meta{heading}|}[|\meta{citation}|]|
    \\\meta{theorem text}
    \\\null\hskip-\leftmargin\hskip\labelsep%
    |\end{namedtheorem}|
\item
  \DescribeEnv{namedtheorem*}|\begin{namedtheorem*}{|\meta{heading}|}[|\meta{citation}|]|
    \\\meta{theorem text}
    \\\null\hskip-\leftmargin\hskip\labelsep%
    |\end{namedtheorem*}|
  
  This also is an environment for theorems.  Other than
  \Lpackage{theorem}, the \meta{heading}, e.g.\ `Theorem', is
  specified explicitly.  Thus a `Fundamental Theorem' can be easily
  typed.
  
\item \DescribeEnv{proof}|\begin{proof}[|\meta{citation}|]|
    \meta{proof text} |\end{proof}|
  
  This is the standard environment to type proofs.  The default qed
  symbol is an open square ($\qedsymbol$), but you can redefine
  \SpecialUsageIndex{\qedsymbol}|\qedsymbol|.  You can use
  \SpecialUsageIndex{\qed}|\qed| to force the qed symbol at an earlier
  place.  This is usually necessary whenever a proof terminates with a
  math environment or a list.
  
\item \DescribeEnv{namedproof}|\begin{namedproof}[|\meta{end of proof
      mark}|]{|\meta{heading}|}[|\meta{citation}|]|
    \\\meta{proof text}
    \\\null\hskip-\leftmargin\hskip\labelsep%
    |\end{namedproof}|

  Environment to type proof-like things which differ in \meta{heading}
  and optionally also in the \meta{end of proof mark}.  Note that the
  latter is typeset in math mode.

\item \DescribeEnv{enumerate}|\begin{enumerate}*| \meta{items}
    |\end{enumerate}| 

  This is simply a variant of the traditional \Lenv{enumerate}
  environment, it continues a previously terminated list.  This allows
  you to make intermediate remarks and then continue your numbered
  list.
  
\item \DescribeMacro{\label}|\label{|\meta{key}|}|,
  \DescribeMacro{\ref}|\ref{|\meta{key}|}|,
  \DescribeMacro{\bare\string\ref}|\bare\ref{|\meta{key}|}|,
  \DescribeMacro{\short\string\ref}|\short\ref{|\meta{key}|}|, \newline
  \DescribeMacro{\whole\string\ref}|\whole\ref{|\meta{key}|}|
  
  These macros are used for referencing.  |\label| defines a label,
  |\ref| produces a reference to the label with the corresponding
  \meta{key}.  In the standard setup, a theorem will be referenced as
  `Theorem 3.4' or the like.  Unless the document class option
  \Lclo{nobare} was given, |\bare\ref| produces a short label, e.g.
  `3.4'.
  
  The other two modifications are important for references to list
  items in theorem-like environments.  Usually, the reference would be
  the whole reference which is forced by |\whole\ref|, for example,
  |\whole\ref{lemma:1}| is \whole\ref{lemma:1}.  But near the theorem,
  that is until the next theorem or equation, a shortened form is used
  which is forced by |\short\ref|, for example, |\short\ref{lemma:1}|
  is \short\ref{lemma:1}.  This feature can be turned off by the
  document class option \Lclo{notheoremitemprefixes}.
  
\item \DescribeEnv{thebibliography}|\begin{thebibliography}{}|
    \\\DescribeMacro{\bibitem}|\bibitem[|\meta{label}|]{|\meta{key}|}|
    \meta{bibliographic information}
    \\\null\hskip-\leftmargin\hskip\labelsep%
    |\end{thebibliography}|
    
  This environment is used to typeset the references.  For each
  reference there is a |\bibitem|.  Usually, this is automatically
  produced by \BibTeX{}.
  
\item
  \DescribeMacro{\citet}|\citet*[|\meta{prefix}|][|\meta{postfix}|]{|\meta{key}|}|,
  \newline
  \DescribeMacro{\citep}|\citep*[|\meta{prefix}|][|\meta{postfix}|]{|\meta{key}|}|,
  \newline
  \DescribeMacro{\citealt}|\citealt*[|\meta{prefix}|][|\meta{postfix}|]{|\meta{key}|}|,
  \newline
  \DescribeMacro{\citealp}|\citealp*[|\meta{prefix}|][|\meta{postfix}|]{|\meta{key}|}|,
  \newline
  \DescribeMacro{\citeauthor}|\citeauthor*[|\meta{prefix}|][|\meta{postfix}|]{|\meta{key}|}|,
  \newline
  \DescribeMacro{\citeyear}|\citeyear[|\meta{prefix}|][|\meta{postfix}|]{|\meta{key}|}|

  These macros are defined by the package \Lpackage{natbib}.  With the
  option \Lclo{cccite} they loose most of their functionality.  With
  the options \Lclo{nocccite} or \Lclo{nonatbib} they are not defined.

  All of these can have a comma separated list of \meta{key}s.  The
  star indicates that the full list of authors should be used if
  possible.  The \meta{prefix} precedes, the \meta{postfix} follows
  the citation.  If only one optional argument is present, it is
  considered to be the \meta{postfix}.  The \meta{postifx} may be
  empty to allow the specification of a \meta{prefix} only.  There are
  several examples in \ref{sec:bib+cite}.
  \begin{texexample}
\citet{goomit95}\\
\citeauthor{kopdal99}\\
\citeyear{knu84}\\
\cite{knu84,knu86b,knu86c}\\
\citealt{lam94}\\
\citep{goomit96g}\\
This\nocite{pat88}
produces no text but a
bibliography entry.
  \end{texexample}
    
\item \DescribeMacro{\cite}|\cite{|\meta{key}|}|,
  \DescribeMacro{\citeauthor}|\citeauthor{|\meta{key}|}|,
  \DescribeMacro{\citeyear}|\citeyear{|\meta{key}|}|,
  \DescribeMacro{\citemul}|\citemul{|\meta{key}|}|, \newline
  \DescribeMacro{\shortcite}|\shortcite{|\meta{key}|}|,
  \DescribeMacro{\parencite}|\parencite{|\meta{key}|}|,
  \DescribeMacro{\nocite}|\nocite{|\meta{key}|}|
  
  These obsolete macros are used for citations when the option
  \Lclo{cccite} is used. 
%   The different commands produce various combinations of a reference:
%   \begin{texexample}
% \cite{goomit95}\\
% \citeauthor{kopdal99}\\
% \citeyear{knu84}\\
% \citemul{knu84,knu86b,knu86c}\\
% \shortcite{lam94}\\
% \parencite{goomit96g}\\
% This\nocite{pat88}
% produces no text but a
% bibliography entry.
%   \end{texexample}
%   |\citemul| is used to cite several references of the same author(s).
%   (In fact, with the option \Lclo{cccite}, the fourth line of the
%   above example would have given: Knuth (1984, 1986a, 1986b).)
  
\item
  \DescribeMacro{\headrulewidth}|\setlength{\headrulewidth}{|\meta{width}|}|
  
  If a head rule is desired, use this in the preamble. The default
  value for \meta{width} is |.4pt|.  Note that this has only an effect
  with the document class option \Lclo{noccpublish}.

\item \DescribeMacro{\maketitle}|\maketitle|
  
  This command produces the title if not done yet.  You never need
  this command unless you use the document class option
  \Lclo{noautotitle}.

\item \DescribeMacro{\makeendtitle}|\makeendtitle|
  
  This command produces receipt information and affiliations if not
  done yet.  You do not need this command unless you use the document
  class option \Lclo{noautotitle}.
  
\pagebreak[3]

\item \DescribeMacro{\ccsps}|\ccsps{|\meta{keyvaluelist}|}|

  Preamble command to define publishing service information.  See
  \ref{sec:editor} for details.

%%% \item \DescribeMacro{\ccpublish}|\ccpublish{|\meta{year}|}|%
%%%   |{|\meta{volume}|}{|\meta{number}|}{|\meta{first page}|}|
%%%
%%%   Deprecated preamble command to define \meta{year},
%%%   \meta{volume}, \meta{number}, and \meta{first page} of the final
%%%   publication \emph{by the editor}.  Not intended for use by
%%%   anybody else.  Note that this forces the document class options
%%%   \Lclo{autotitle} and \Lclo{ccpublish}.
  
\item \DescribeMacro{\electronic}|\electronic|,
  \DescribeMacro{\printed}|\printed|
  
  Commands \emph{for the editor}. Switches the ISSN to the electronic
  or to the printed version.
  
\end{description}


\section{Commands for algorithms}

The commands and environments related to algorithms can also be used
independently, try |\usepackage{ccalgo}| to activate them.  For a
longer example, see \ref{tab:algo}.
\begin{table}[t!]
  \input{tab-algo}
  \caption{An example algorithm}
  \label{tab:algo}
\end{table}
\condbreak{1cm}
\begin{description}
\item
  \DescribeEnv{algorithm}|\begin{algorithm}|%
    |{|\meta{masterkey}|}[|\meta{citation}|]|\\
    |\item |\meta{input}\\
    |\item |\meta{output}\\
    |\begin{block}|\\
      |  |\meta{body}\\
      |\end{block}|
    \\\null\hskip-\leftmargin\hskip\labelsep%
    |\end{algorithm}|
  
  This is a specialization of the following environment
  \Lenv{namedalgorithm}.  You may define such specializations using
  |\newalgorithm|.

\item 
  |\newalgorithm{|\meta{environment name}|}[|\meta{list of required
    items}|]{|\meta{heading}|}|.

  You can use this to specialize the following environment
  \Lenv{namedalgorithm}.

\item
  \DescribeEnv{namedalgorithm}|\begin{namedalgorithm}|%
    |{|\meta{heading}|}[|\meta{list of required items}|]|\\%
    |{|\meta{masterkey}|}[|\meta{citation}|]|\\
    |\item |\meta{first required item}\\
    \dots\\
    |\item |\meta{last required item}\\
    |\begin{block}|\\
      |  |\meta{body}\\
      |\end{block}|
    \\\null\hskip-\leftmargin\hskip\labelsep%
    |\end{namedalgorithm}|
  
  Typesetting algorithms is an art by itself.  We hope that this
  environment is flexible enough to reflect also your taste.  The
  environment \Lenv{namedalgorithm} takes four arguments, two of them
  are optional.  The \meta{list of required items} is a comma
  separated list of titles for required items.  It defaults to:
  |Input,Output|.  Thus the first required item is entitled |Input|
  and the second and last required item is entitled |Output|.  An
  interactive protocol might have many more required items, for
  example,
  |Common input,|%
  |Prover's input,|%
  |Verifier's input,|%
  |Output|.
  The \meta{heading} could be |Algorithm| or
  |Extended Euclidean Algorithm|%
  , it will be referenced together with the number (if any).  The
  \meta{masterkey} is used to set a label; this is obligatory since
  labels to steps or ranges of steps in the algorithm are created
  using this.  Finally \meta{citation} usually is either a phrase
  describing the algorithm, or a reference.
  
  The \meta{body} is a sequence of steps and blocks.
  
  |\item[|\meta{label}|]| starts a new step of the algorithm, either
  numbered or labelled \meta{label}.  As usual, a |\label| command
  after the item refers to the step, but it is wiser to use
  \DescribeMacro{\algolabel}|\algolabel{|\meta{subkey}|}| instead
  which is equivalent to |\label{|\meta{masterkey}|-|\meta{subkey}|}|.
  (Note that also items with given \meta{label} can have an
  |\algolabel| or a |\label|!)  A reference must then be written
  \DescribeMacro{\stepref}|\stepref{|\meta{masterkey}|}{|\meta{subkey}|}|
  or |\ref{|\meta{masterkey}|-|\meta{subkey}|}|.  If the standard
  width of the item labels is not enough, use
  \begin{center}
    |\settowidth{\steplabelwidth}{\makeoptalgolabel{|\meta{widest label}|}}| %
  \end{center}
  before the first step in the algorithm to adjust this.  (If you have
  a problem because your algorithm is longer than 99 steps then you
  should better use
  |\settowidth{\steplabelwidth}{\makealgolabel{999}}|%
  .)
  
  |\begin{block}|~\meta{body}~|\end{block}| produces an indented
  block.  An |\algolabel{|\meta{subkey}|}| before the \meta{body}
  generates a reference
  %\meta{masterkey}|-|\meta{subkey}
  to the \emph{range} of steps inside the block.  Actually, the
  environment \Lenv{block} is combined from environments
  \Lenv{indention} and \Lenv{range}.  |\begin{indention}| \meta{body}
    |\end{indention}| just produces some indented lines, while
  |\begin{range}| |\algolabel{|\meta{subkey}|}| \meta{body}
    |\end{range}| allows to reference a range of steps.


  More advanced facilities might help you:
  \begin{itemize}
  \item |\begin{ifblock}{|\meta{condition}|}| \meta{body}
      |\end{ifblock}|
  \item |\begin{elifblock}{|\meta{condition}|}| \meta{body}
      |\end{elifblock}|
  \item |\begin{elseblock}| \meta{body} |\end{elseblock}|
  \item |\begin{forblock}{|\meta{loop control}|}| \meta{body}
      |\end{forblock}|
  \item |\begin{whileblock}{|\meta{condition}|}| \meta{body}
      |\end{whileblock}|
  \item |\begin{untilblock}{|\meta{condition}|}| \meta{body}
      |\end{untilblock}|
  \item |\begin{blockwhile}{|\meta{condition}|}| \meta{body}
      |\end{blockwhile}|
  \item |\begin{blockuntil}{|\meta{condition}|}| \meta{body}
      |\end{blockuntil}|
  \end{itemize}
  For example, the first of these is almost equivalent to:
  \begin{verse}
    |\item|\\
    |  \IF |\meta{condition}| \THEN|\\
    |\begin{block}|\\
      |  |\meta{body}\\
      |\end{block}|
  \end{verse}
  The actual implementation also takes care of a label to the entire
  range of steps.  If you put a label in an \Lenv{ifblock}, you
  reference the range containing the \textsf{If} step and the
  \textsf{then} block.  If you need a reference for the \textsf{If}
  step itself, or you use \meta{label} for all steps, then put
  |\item[|\meta{label}|]\algolabel{|\meta{subkey}|}| before the
  \Lenv{ifblock}.

  Typesetting keywords is done as follows: |\keyword{|\meta{name}|}|
  produces a keyword.  |\FOR|, |\DO|, |\WHILE|, |\REPEAT|,
  |\UNTIL|, |\IF|, |\THEN|, |\ELSE|, |\RETURN| are predefined
  keywords.  Further, |\COMMENT{|\meta{comment}|}| can be used to type
  comments.
\end{description}


%  \changes{v2.03}{2005/08/29}{Added section on interaction with other
%    packages}
\section{Interaction with other packages}

\begin{description}
\item[\Lpackage{hyperref}] This package must be loaded after
  \Lpackage{cc-cls}.  Otherwise, references will not work as expected
  with \Lpackage{hyperref}.
\item[\Lpackage{beamer}] If you want to use \Lpackage{cc-cls},
  \Lpackage{ccthm} and/or \Lpackage{ccalgo} you must use the option
  \Lclo{noamsthm} to \Lclass{beamer} and make sure that
  \Lpackage{babel} is loaded with at least the language \Lclo{english}
  before calling \Lpackage{ccthm} or \Lpackage{ccalgo}.
\end{description}


\DocInput{cc.dtx}

\Finale

\end{document}
%</driver>
%<*quickref>
\documentclass[shortarticle,noccpublish,noautotitle,%
multilingual,english]{cc}

\IfFileExists{texexample.sty}{}{%
  \typeout{Some files are missing.}
  \typeout{Please first do: latex cc.dtx}
  \endinput
  }

\dimen254\marginparwidth
\let\ccorgmaketitle\maketitle
\usepackage{doc}
\normalmarginpar
\let\maketitle\ccorgmaketitle
\marginparwidth\dimen254
\MakeShortVerb{\|}

\usepackage{texexample}


\pagestyle{empty}
\advance\textheight\headheight
\headheight=0pt
\advance\textheight\footskip
\footskip=0pt

\begin{document}

\pagestyle{empty}
\section*{Tables for quick reference}

\bigskip

\input{tab-algo}

\clearpage
\input{tab-struct}
\enlargethispage{1cm}

\input{tab-thmenv}

\end{document}

%</quickref>
% meta-comment \fi
%
%  \expandafter\newif\csname ifstopped\endcsname
%  \stoppedtrue
%  \StopEventually{
%    \ifstopped
%    \setcounter{IndexColumns}{2}%
%    \PrintIndex
%    \condbreak{2cm}
%    \bibliography{texrefs}
%    \fi
%  }
%  \stoppedfalse
%
%  \condbreak{2cm}
%  \addcontentsline{toc}{section}{\refname}\bibliography{texrefs}
%  \makeendtitle\let\makeendtitle\relax%% We really want this!
%
% \cleardoublepage
% \let\PrintDescribeEnv\ccorgPrintDescribeEnv
% \let\PrintDescribeMacro\ccorgPrintDescribeMacro
% \footnotesize
% \part*{Source code}
% \addcontentsline{toc}{part}{Source code}
%
%  \GetFileInfo{cc.cls}
%
% \section{Source of \filename}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*cccls>
%    \end{macrocode}
%
% \changes{v0.00}{1999/09/13}{Starting.  Michael N{\"{u}}sken, Paderborn}
% \changes{v0.80}{1999/10/22}{Alpha version, built according to
%   \texttt{cc.sty}.  Michael N{\"{u}}sken, Paderborn}
% \changes{v0.90}{1999/11/09}{Beta version.  Michael N{\"{u}}sken, Paderborn}
%
%  This document class can only be used with \LaTeXe{}, so we make
%  sure that an appropriate message is displayed when another \TeX{}
%  format is used.
%
%  Announce the Class name and its version:
%  \changes{v0.90}{2000/02/16}{Advanced version to 1.99}
%  \changes{v1.99}{2000/02/29}{Advanced version to official 2.00}
%  \changes{v2.00}{2000/05/29}{Add definition of \ignorespaces for
%    \LaTeXe{} version of 1995/06/01.}
%  \changes{v2.00}{2000/06/21}{Advanced version to 2.01}
%  \changes{v2.01}{2001/08/28}{Advanced version to 2.02}
%  \changes{v2.02}{2002/01/08}{Advanced version to 2.03}
%  \changes{v2.03}{2005/08/29}{Advanced version to 2.04, Michael
%    N{\"{u}}sken, now(!) Bonn}
%  \changes{v2.04}{2006/03/08}{Advanced version to 2.05, Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.06}{2007/01/10}{Advanced version to 2.07, Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.07}{2008/03/18}{Advanced version to 2.08, Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.08}{2008/04/25}{Advanced version to 2.09, adapted
%    license information in cc.dtx and cc.ins, Michael N{\"{u}}sken,
%    Bonn}
%  \changes{v2.09}{2010/01/26}{Advanced version to 2.10, just a few
%    minor changes, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.10}{2010/05/11}{Advanced version to 2.11, redesign of
%    algorithms, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.11}{2010/05/16}{Advanced version to 2.12, deactivate
%    fullpage.sty when ccpublish is active, remove debug output in
%    ccalgo, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.12}{2010/05/21}{Advanced version to 2.13, debugged
%    indention processing in ccalgo, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.13}{2010/06/29}{Advanced version to 2.14, debugged
%    setrefrange in ccalgo, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.14}{2010/10/14}{Advanced version to 2.15, added
%    cc4svjour, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.15}{2010/10/21}{Advanced version to 2.15b, added ccref
%    built from moved code, Michael N{\"{u}}sken, Bonn}
%  \changes{v2.16}{2011/07/05}{Advanced version to 2.16, added more
%    new cctextarea options, changed default.  Michael N{\"{u}}sken, Bonn}
%  \changes{v2.17b}{2011/07/06}{Advanced version to 2.17b, removed a
%    bug.  Michael N{\"{u}}sken, Bonn}
%  \changes{v2.17c}{2011/07/13}{Advanced version to 2.17c, removed a
%    bug.  Michael N{\"{u}}sken, Bonn}
%  \changes{v2.18}{2011/07/15}{Advanced version to 2.17c, removed a
%    bug.  Michael N{\"{u}}sken, Bonn}
%  \changes{v2.19}{2011/07/28}{Advanced version to 2.19, many
%    modifications for publication service (search sps), removed some
%    comments.  Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.20}{2011/07/29}{Advanced version to 2.20, bug fixes,
%    removed some. It is planned to advance to 3.0 soon.  Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.21}{2012/04/17}{Advanced version to 2.21, bug fixes in
%    relation to \cs{bare}\cs{ref}. It is planned to advance to 3.0
%    soon.  Michael N{\"{u}}sken, Bonn}
%  \changes{v2.22}{2012/05/07}{Added version in draft output. It is
%    planned to advance to 3.0 soon.  Michael N{\"{u}}sken, Bonn}
%  \changes{v2.23}{2012/05/22}{Increased compatibility with hyperref.
%    Michael N{\"{u}}sken, Bonn}
%  \changes{v2.24}{2012/06/18}{Another bugfix to equation counting.
%    Michael N{\"{u}}sken, Bonn}
%  \changes{v2.25}{2012/06/21}{Allowing longer theorem comments.
%    Michael N{\"{u}}sken, Bonn}
%  \changes{v2.25b}{2013/06/26}{Changed in-proof item indention.
%    Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\providecommand\ignorespacesafterend{\@ignoretrue}
\newif\ifclass
\ifx\@currext\@clsextension\classtrue\else\classfalse\fi
\ifclass\expandafter\ProvidesClass\else\expandafter\ProvidesPackage\fi
{\ifclass cc\else cc-cls\fi}
[% CC MAIN DATE AND VERSION ON NEXT LINE
2016/03/01 v2.25f
%2015/11/11 v2.25f
%2015/02/23 v2.25e
%2014/07/08 v2.25d
computational complexity
\ifclass document class\else package\fi]
%    \end{macrocode}
%
% \subsection{Load auxiliaries}
%
%  We load the auxiliaries that are needed at various places.  They
%  contain macros for warnings, lots of new |\if|s, and more.
%    \begin{macrocode}
\RequirePackage{ccaux}
%    \end{macrocode}
%
% \subsection{Declaration of Options}
%
%  The options \Lclo{localnumbering}, \Lclo{globalnumbering} or
%  \Lclo{longarticle}, \Lclo{shortarticle} affect the numbering of
%  theorem and equation like environments.  Either they are numbered
%  globally, e.g. Theorem 23, or they are numbered within sections,
%  e.g. Theorem 4.2.
%    \begin{macrocode}
\DeclareOption{localnumbering}{\@longarticletrue}
\DeclareOption{globalnumbering}{\@longarticlefalse}
\DeclareOption{longarticle}{\@longarticletrue}
\DeclareOption{shortarticle}{\@longarticlefalse}
%    \end{macrocode}
%  The option \Lclo{cclayout} enables \cc's |\maketitle| and |\endmaketitle|,
%  and the page dimensions are set according to \cc's requirements.
%  If the option \Lclo{nocclayout} is used the page layout |cc| is
%  still defined, but |\maketitle| and |\endmaketitle| are not defined
%  and the page dimensions are left unchanged.  Also |\author|,
%  |\title|, \dots{} are not required any more.
% \changes{v2.00}{2000/04/10}{Added option cclayout.  Michael N{\"{u}}sken,
%   Paderborn}
%    \begin{macrocode}
\DeclareOption{cclayout}{\@cclayouttrue}
\DeclareOption{nocclayout}{\@cclayoutfalse}
%    \end{macrocode}
%  The options \Lclo{prefixes}, \Lclo{noprefixes} decide whether a
%  reference produces `Theorem 4.2' or just `4.2'.  The options
%  \Lclo{bare}, \Lclo{nobare} decide whether |\bare\ref| produces `4.2'
%  or not.  These options are passed to the package
%  \Lpackage{relabel}, which is responsible for this kind of trick.
%    \begin{macrocode}
\DeclareOption{prefixes}{%
  \PassOptionsToPackage{\CurrentOption}{relabel}}
\DeclareOption{noprefixes}{%
  \ExecuteOptions{notheoremitemprefixes}%
  \PassOptionsToPackage{\CurrentOption,nobare}{relabel}}
\DeclareOption{bare}{\PassOptionsToPackage{\CurrentOption}{relabel}}
\DeclareOption{nobare}{\PassOptionsToPackage{\CurrentOption}{relabel}}
%    \end{macrocode}
%  In multilingual setups it might be better to use the font
%  encoding scheme T1 which uses 256 characters per font.
%  By default latin1 input encoding is used.  If you need something
%  else, this can be disabled.
% \changes{v2.00}{2000/04/11}{Added options latin1/nolatin1.  Michael
%   N{\"{u}}sken, Paderborn}
% \changes{v2.25d}{2014/07/08}{Added options utf8/noutf8, noinputenc.
%   Michael N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
\DeclareOption{multilingual}{\ExecuteOptions{T1,latin1,babel}}
\DeclareOption{nomultilingual}{\ExecuteOptions{OT1,nolatin1,nobabel}}
\DeclareOption{T1}{\@Tonetrue}
\DeclareOption{OT1}{\@Tonefalse}
\DeclareOption{latin1}{\@latintrue\@utfviiifalse}
\DeclareOption{nolatin1}{\@latinfalse}
\DeclareOption{utf8}{\@utfviiitrue\@latinfalse}
\DeclareOption{noutf8}{\@utfviiifalse}
\DeclareOption{noinputenc}{\@latinfalse\@utfviiifalse}
\DeclareOption{babel}{\@babeltrue}
\DeclareOption{nobabel}{\@babelfalse}
%    \end{macrocode}
%  The \AMS{} packages \Lpackage{amsmath}, \Lpackage{amsfonts} and
%  \Lpackage{amssymb} provide many useful features.  Whether they are
%  loaded or not is determined by the following two options.
%    \begin{macrocode}
\DeclareOption{ams}{\@amstrue}
\DeclareOption{noams}{\@amsfalse}
%    \end{macrocode}
%  With \Lclo{autotitle} |\maketitle| and |\makeendtitle| are called
%  automatically at the beginning or end of the document, respectively.
%    \begin{macrocode}
\DeclareOption{autotitle}{\@autotitletrue}
\DeclareOption{noautotitle}{\@autotitlefalse}
%    \end{macrocode}
%  Sectioning for \cc{} is different from standard settings.  The
%  following options turn this on or off.
%    \begin{macrocode}
\DeclareOption{ccsectioning}{\@ccsectioningtrue}
\DeclareOption{noccsectioning}{\@ccsectioningfalse}
%    \end{macrocode}
%  Citation and bibliography can be done either with the
%  \Lpackage{natbib} package by Richard W. Daly, or with the old \cc{}
%  macros, or with standard \LaTeX{}.
%  \changes{v2.01}{2001/08/28}{Added undocumented manualbibliography.
%    Michael N{\"{u}}sken, Paderborn.}
%  \changes{v2.02}{2001/12/13}{Added twocolumnbibliography.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\DeclareOption{natbib}{\@natbibtrue\@cccitefalse}
\DeclareOption{nonatbib}{\@natbibfalse\@cccitefalse}
\DeclareOption{cccite}{\@natbibfalse\@cccitetrue}
\DeclareOption{nocccite}{\@natbibfalse\@cccitefalse}
\DeclareOption{manualbibliography}{\@manualbibliographytrue}
\DeclareOption{twocolumnbibliography}{\@twocolumnbibliographytrue}
\DeclareOption{onecolumnbibliography}{\@twocolumnbibliographyfalse}
\DeclareOption{twocolumnendtitle}{\@twocolumnendtitletrue}
\DeclareOption{onecolumnendtitle}{\@twocolumnendtitlefalse}
%    \end{macrocode}
%  With \Lenv{natbib} you can choose whether you want multiple
%  citations unsorted, sorted or compressed.
%    \begin{macrocode}
\DeclareOption{nosort}{%
  \def\@natbibsort{}}
\DeclareOption{sort}{%
  \def\@natbibsort{\PassOptionsToPackage{sort}{natbib}}}
\DeclareOption{compress}{%
  \def\@natbibsort{\PassOptionsToPackage{compress}{natbib}}}
\DeclareOption{sort&compress}{%
  \def\@natbibsort{\PassOptionsToPackage{sort&compress}{natbib}}}
%    \end{macrocode}
%  Theorem like environments for \cc{} are different from standard
%  settings.  The following options turn this on or off.
%  \changes{v2.01}{2000/06/28}{Added cctheorems+separatelycounted.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\DeclareOption{cctheorems}{\@cctheoremstrue\@standardtheoremstrue}
\DeclareOption{cctheorems+separatelycounted}{%
  \@cctheoremstrue\@standardtheoremsfalse}
\DeclareOption{nocctheorems}{\@cctheoremsfalse}
%    \end{macrocode}
%  By default theorem-like environment are counted with equations.
%  The following options turn this on or off.
%  \changes{v2.02}{2001/12/06}{Added separateequationcounting.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\DeclareOption{separateequationcounting}{\@ccnosepeqncntfalse}
\DeclareOption{noseparateequationcounting}{\@ccnosepeqncnttrue}
%    \end{macrocode}
%  Theorem like environments for \cc{} are different from standard
%  settings.  The following options turn this on or off.
%    \begin{macrocode}
\DeclareOption{ccalgorithms}{\@ccalgotrue}
\DeclareOption{noccalgorithms}{\@ccalgofalse}
%    \end{macrocode}
%  See \Lpackage{ccthm} below for the effect of these options.
%    \begin{macrocode}
\DeclareOption{theoremitemprefixes}{%
  \PassOptionsToPackage{\CurrentOption}{ccthm}}
\DeclareOption{notheoremitemprefixes}{%
  \PassOptionsToPackage{\CurrentOption}{ccthm}}
\DeclareOption{enhancedprefixes}{% old
  \PassOptionsToPackage{theoremitemprefixes}{ccthm}}
\DeclareOption{standardprefixes}{% old
  \PassOptionsToPackage{notheoremitemprefixes}{ccthm}}
%    \end{macrocode}
%  \cc{} requires received date, author, title, abstract, keywords,
%  subject classification and acknowledgements.  With
%  \Lclo{noccpublish} these things are optional.
%    \begin{macrocode}
\DeclareOption{ccpublish}{\@ccpublishtrue}
\DeclareOption{noccpublish}{\@ccpublishfalse\ExecuteOptions{textarea=none}}
%    \end{macrocode}
%  \Lclo{cctextarea} means that the text part of the page is exactly as
%  specified for \cc{}, it is the default with the class.  It's
%  counterpart \Lclo{nocctextarea} is the default with the package
%  version and with all options \Lclo{*paper}.
% \changes{v2.01}{2001/02/22}{Added options cctextarea/nocctextarea.
%   Michael N{\"{u}}sken, Paderborn}
% \changes{v2.16}{2011/07/05}{Added options cctextarea=2/cctextarea=1.
%   Michael N{\"{u}}sken, Bonn}
%
%  \Lclo{classicalmargins} are as with the old \file{cc.sty}.
%  \Lclo{printmargins} are as in the printed version, while
%  \Lclo{balancedmargins} uses equal |\oddsidemargin| and
%  |\evensidemargin|.
%    \begin{macrocode}
\DeclareOption{textarea=full}{\@textareaversion\m@ne}
\DeclareOption{textarea=none}{\@textareaversion\z@}
\DeclareOption{textarea=cc1}{\@textareaversion\@ne}
\DeclareOption{textarea=cc2}{\@textareaversion\tw@}
\DeclareOption{textarea=cc}{\@cctextareatrue}
\DeclareOption{cctextarea}{\@cctextareatrue}
\DeclareOption{nocctextarea}{\@cctextareafalse}
\DeclareOption{noothermargins}{\@marginmode\m@ne}
\DeclareOption{classicalmargins}{\@marginmode\z@}
\DeclareOption{printmargins}{\@marginmode\@ne}
\DeclareOption{balancedmargins}{\@marginmode\tw@}
%    \end{macrocode}
%  The following options are passed to the document class
%  \Lclass{article}.  Since we prefer \Lclo{12pt}, the size options
%  are handled slightly different.
%    \begin{macrocode}
\DeclareOption{10pt}{\def\@ccptsize{10}}
\DeclareOption{11pt}{\def\@ccptsize{11}}
\DeclareOption{12pt}{\def\@ccptsize{12}}
\DeclareOption{a4paper}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{a5paper}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{b5paper}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{letterpaper}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{legalpaper}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{executivepaper}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{landscape}{\@cctextareafalse%
  \PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{oneside}{\@twosidefalse}
\DeclareOption{twoside}{\@twosidetrue}
\DeclareOption{leqno}{%
  \PassOptionsToClass{\CurrentOption}{article}%
  \PassOptionsToPackage{\CurrentOption}{amsmath}%
  }
\DeclareOption{reqno}{%
  \PassOptionsToClass{\CurrentOption}{article}%
  \PassOptionsToPackage{\CurrentOption}{amsmath}%
  }
\DeclareOption*{\OptionNotUsed
  \PassOptionsToClass{\CurrentOption}{article}}
%    \end{macrocode}
%  Now, all options are defined.  We execute the default options.
%  \changes{v2.20}{2011/09/12}{Removed default option balancedmargin.
%    Michael N{\"{u}}sken, Bonn.}
%    \begin{macrocode}
\ifclass
\ExecuteOptions{a4paper,12pt,cctextarea,twoside,%
  OT1,nolatin1,nobabel,%
  localnumbering,bare,%
  leqno,ams,ccpublish,cclayout,autotitle,ccsectioning,%
  onecolumnbibliography,twocolumnendtitle,natbib,sort&compress,%
  cctheorems,theoremitemprefixes,noseparateequationcounting,%
  ccalgorithms}
\else
\ExecuteOptions{a4paper,12pt,nocctextarea,balancedmargins,twoside,%
  OT1,nolatin1,nobabel,%
  localnumbering,bare,%
  leqno,ams,noccpublish,nocclayout,noautotitle,ccsectioning,%
  onecolumnbibliography,twocolumnendtitle,natbib,sort&compress,%
  cctheorems,theoremitemprefixes,noseparateequationcounting,%
  ccalgorithms}
\fi
%    \end{macrocode}
%  Then we process the class options in calling order.
%  \changes{v2.25d}{2014/07/08}{Process options in calling order
%    rather than definition order.  Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\ProcessOptions*
%    \end{macrocode}
%  Finally, the pointsize is passed to the \Lclass{article} class and
%  the sorting mode to the \Lpackage{natbib} package.
%  \changes{v2.00}{2000/04/11}{Changed \cs{@ptsize} to
%    \cs{@ccptsize}.  Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\PassOptionsToClass{\@ccptsize pt}{article}
\if@twoside
\PassOptionsToClass{twoside}{article}
\else
\PassOptionsToClass{oneside}{article}
\fi
\let\@ccptsize\@undefined
\@natbibsort
\let\@natbibsort\@undefined
%    \end{macrocode}
%  Give a warning when using weird features.
%  \changes{v2.01}{2000/06/28}{Added warning for cctheorems+separatelycounted.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\if@standardtheorems\else
    \ClassWarning{cc}{You are using the non documented
      feature\MessageBreak
      cctheorems+separatelycounted.\MessageBreak
      It is recommended not to use this.}
\fi
%    \end{macrocode}
%
% \subsection{Logo}
%
%  \begin{macro}{\cc}
%  This is the logo of \cc{}.
%    \begin{macrocode}
\newcommand{\cc}{\textsf{computational complexity}}
%    \end{macrocode}
%  \end{macro}
%
% \subsection{Class and packages}
%
%  We load the document class \Lclass{article}.
%    \begin{macrocode}
\ifclass
\LoadClass{article}[1999/01/07 v1.4a]
\fi
%    \end{macrocode}
%  Optionally, the font encoding is switched to T1.  In any case, we
%  use input encoding |latin1|, thus Umlaute and other special
%  characters have a defined value.
% \changes{v2.00}{2000/04/11}{Made inputenc optional.  Michael
%   N{\"{u}}sken, Paderborn}
% \changes{v2.00}{2000/06/21}{Added \cs{babel}\cs{def} and
%   definitions for english and german words. Michael N{\"{u}}sken,
%   Paderborn}
% \changes{v2.01}{2000/09/15}{Forbid loading of german by pretending
%   that this has been done already.
%   Michael N{\"{u}}sken, Paderborn}
% \changes{v2.25d}{2014/07/08}{Added support for utf8/noutf8.  Michael
%   N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
\if@Tone
\RequirePackage[T1]{fontenc}
\fi
% german.sty is not allowed. Use global options: multilingual,german.
\@pass@ptions\@pkgextension{}{german}
\global\expandafter\let\csname ver@german.\@pkgextension\endcsname\@empty
\if@babel
\RequirePackage{babel}[2008/07/06 v3.8l]
\fi
\if@utfviii
\RequirePackage[utf8]{inputenc}[2008/03/30 v1.1d]
\else\if@latin
\RequirePackage[latin1]{inputenc}[2008/03/30 v1.1d]
\fi\fi
%    \end{macrocode}
%  Next, we load the \AMS{} packages if required.  If not we define
%  some commands that we need and that would have been provided by
%  these packages.
%    \begin{macrocode}
\if@ams
\RequirePackage{amsmath}[2000/01/15 v2.05]% 1997/03/20 v1.2d
% amsmath contains amstext, amsgen, amsbsy, amsopn
\RequirePackage{amsfonts}[1997/09/17 v2.2e]
\RequirePackage{amssymb}[1996/11/03 v2.2b]
\else
\newcommand{\numberwithin}[3][\arabic]{%
  \@ifundefined{c@#2}{\@nocounterr{#2}}{%
    \@ifundefined{c@#3}{\@nocnterr{#3}}{%
      \@addtoreset{#2}{#3}%
      \expandafter\xdef\csname the#2\endcsname{%
        \expandafter\noexpand\csname the#3\endcsname%
        .\noexpand#1{#2}}}}%
}
\let\@ifempty\cc@ifempty
\let\@ifnotempty\cc@ifnotempty
\let\bigstar\bullet
\let\lozenge\circ
\def\square{{\fboxsep.3em{\vbox{\hbox{\fbox{}}\vskip0pt}}}}%
\let\text\mbox
\fi
%    \end{macrocode}
%  \begin{macro}{\email}
%  \begin{macro}{\homepage}
%  The package \Lpackage{url} defines macros to handle URLs and so
%  on.  We also use this for email addresses and home page
%  addresses.
% \changes{v2.00}{2000/04/04}{Modified \cs{UrlSpecials} as proposed by
%   Paul Daly.  Michael N{\"{u}}sken, Paderbon}
%    \begin{macrocode}
\RequirePackage{url}[2006/04/12  ver 3.3]
\expandafter\def\expandafter\UrlSpecials\expandafter{%
  \UrlSpecials\do\%{}}
\providecommand{\email}{\begingroup\urlstyle{tt}\Url}
\providecommand{\homepage}{\begingroup\scriptsize\urlstyle{tt}\Url}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
% \subsection{Fixed fonts}
%
%  \begin{macro}{\ixpt}
%  \begin{macro}{\xptsfbx}
%  \begin{macro}{\textsfbx}
%  For the (over)headline of the first page of an article and for
%  the logo, some special font commands are needed.  |\ixpt|
%  switches to 9pt fonts, |\xptsfbx| switches to 10pt sans serif font,
%  and |\textsfbx| switches to bold sans serif font.
%    \begin{macrocode}
\providecommand{\ixpt}{\@setfontsize\ixpt\@ixpt{11}}
\newcommand{\xptsfbx}{%
  \@setfontsize\xpt\@xpt{12}\usefont{OT1}{cmss}{bx}{n}}
\DeclareTextFontCommand{\textsfbx}{\usefont{OT1}{cmss}{bx}{n}}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
% \subsection{Macros to collect data}
%
%  Most of the code for page layout is in the package
%  \Lpackage{cclayout}.
%    \begin{macrocode}
\if@cclayout
\RequirePackage{cclayout}
\else
%    \end{macrocode}
%  \begin{macro}{\ps@cc}
%    A variant of the page style \texttt{cc} is defined.  Use
%    |\renewcommand{\cctitlehead}{|\meta{title text}|}| to specify the
%    text for the running heads, and
%    |\renewcommand{\ccauthorhead}{|\meta{author(s)}|}| to specify the
%    authors for the running heads.
%    \begin{macrocode}
\newskip\headerindent \headerindent=10mm
\newdimen\headrulewidth \headrulewidth.4pt
\def\cctitlehead{}
\def\ccauthorhead{}
\let\ps@ccfirst\ps@empty
\def\ps@cc{\let\@mkboth\markboth
     \def\@oddhead{\vbox{\hbox to\textwidth{\reset@font\strut
         \null
         \hfil
         {\small\cctitlehead}%
         \hbox to\headerindent{\hfil\thepage}%
         }%
       \if@ccpublish\else
       \kern2.6\p@
       \hrule\@height\headrulewidth\kern-\headrulewidth
       \kern-2.6\p@
       \fi
       \vskip\z@
       }%
     }%
     \def\@oddfoot{}
     \def\@evenhead{\vbox{\hbox to\textwidth{\reset@font\strut
         \hbox to\headerindent{\thepage\hfil}%
         {\small\ccauthorhead}%
         \hfil
         \null
         }%
       \if@ccpublish\else
       \kern2.6\p@
       \hrule\@height\headrulewidth\kern-\headrulewidth
       \kern-2.6\p@
       \fi
       \vskip\z@
       }%
     }%
     \let\@evenfoot\@oddfoot
     }
%    \end{macrocode}
%  \end{macro}
%
%    \begin{macrocode}
\fi%@cclayout
%    \end{macrocode}
%
%
% \subsection{Sectioning}
%
%    \begin{macrocode}
\if@ccsectioning
%    \end{macrocode}
%  For \cc{} we use different layout for |\section|, |\subsection| and
%  |\subsubsection| titles.
%    \begin{macrocode}
\def\@seccntformat#1{\csname the#1\endcsname.\enskip}
%    \end{macrocode}
%  \begin{macro}{\section}
%  Section titles are |\large|, |\bfseries| and centered.
%    \begin{macrocode}
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
  {-2.9ex\@plus-.5ex\@minus-.2ex}%
  {1.5ex\@plus.5ex\@minus.2ex}%
  {\normalfont\large\bfseries\centering}}
% \ifclass\else
% \renewcommand \thesection {\@arabic\c@section}
% \fi
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\subsection}
%  \begin{macro}{\subsubsection}
%  Subsection and subsubsection titles are |\bfseries| and embedded in
%  the text with 1~em distance.  And these text embedded titles shall
%  always terminate with a full stop, unless they terminate with a
%  full stop, question mark, or exlamantion mark. 
%  \changes{v2.06}{2006/10/13}{Made full stop in section and
%    subsection headings optional.}
%    \begin{macrocode}
\def\opt@fullstop#1{#1{\has@fullstop#1.\@@@
\if@tempswa\else
\has@exlamationmark#1!\@@@
\if@tempswa\else
\has@questionmark#1?\@@@
\if@tempswa\else
.\fi
\fi
\fi}}
\def\has@fullstop#1.#2\@@@{\@ifempty{#2}{\@tempswafalse}{\@tempswatrue}}
\def\has@exlamationmark#1!#2\@@@{\@ifempty{#2}{\@tempswafalse}{\@tempswatrue}}
\def\has@questionmark#1?#2\@@@{\@ifempty{#2}{\@tempswafalse}{\@tempswatrue}}
\def\dot@sect#1#2#3#4#5#6[#7]#8{%
  \let\@sect\ccorg@sect\let\@ssect\ccorg@ssect
  \@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{\opt@fullstop{#8}}}
\def\dot@ssect#1#2#3#4#5{%
  \let\@sect\ccorg@sect\let\@ssect\ccorg@ssect
  \@ssect{#1}{#2}{#3}{#4}{\opt@fullstop{#5}}}
\def\add@dot{%
  \let\ccorg@sect\@sect\let\ccorg@ssect\@ssect
  \let\@sect\dot@sect\let\@ssect\dot@ssect}
\renewcommand{\subsection}{%
  \add@dot
  \@startsection{subsection}{2}{\z@}%
  {2.33ex\@plus.5ex\@minus.2ex}% was 12pt +-
  {-1em}%
  {\normalfont\normalsize\bfseries}}
\renewcommand{\subsubsection}{%
  \add@dot
  \@startsection{subsubsection}{3}{\z@}%
  {1.55ex\@plus.5ex\@minus.2ex}% was 8pt +-
  {-1em}%
  {\normalfont\normalsize\bfseries}}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \begin{macro}{\paragraph}
%  \begin{macro}{\subparagraph}
%  Paragraphs and subparagraphs are inherited from the class.
%    \begin{macrocode}
\fi%@ccsectioning
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
% \subsection{Bibliography and citations}
%
%  The preferred access to bibliography and citations is via the
%  package \Lpackage{natbib}.  It provides much more flexibility for
%  the user and works with almost every bibliography style.
%  \changes{v2.01}{2001/08/28}{Added undocumented manualbibliography.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\if@natbib
\RequirePackage{cc2cite}
\if@manualbibliography
\bibstyle@plain%\bibpunct{[}{]}{;}{n}{}{,}
\fi
\else%@natbib
\if@cccite
%    \end{macrocode}
%
%  The package \Lpackage{cccite} contains the definitions for the
%  informative citation style like `Cook (1971)'.  It also issues
%  |\bibliographystyle{\bibstyle@default}|, if no other style is
%  defined before the |\bibliography| command.
%    \begin{macrocode}
\RequirePackage{cccite}
%    \end{macrocode}
%
%  \begin{environment}{thebibliography}
%    We redefine this environment in order to reflect the citation
%    scheme given by \Lpackage{cccite} and to allow also the
%    alternative style using numbers.
%  \changes{v0.90}{1999/11/11}{Added \cs{condbreak\{8ex\}}.  Michael
%  N{\"{u}}sken, Paderborn}
%  \changes{v0.90}{2000/01/12}{Added toc entry.  Michael N{\"{u}}sken,
%  Paderborn}
%    \begin{macrocode}
\renewcommand{\thebibliography}[1]{%
  \condbreak{8ex}%
  \section*{\refname
    \addcontentsline{toc}{section}{\refname}%
    \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
  \vskip-\lastskip
  \list{[\@arabic\c@enumiv] }%
  {%
    \labelwidth\z@
    \labelsep\z@
    \leftmargin\z@
    \@openbib@code
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}%
    }%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000
  \sfcode`\.\@m
  \bibfont}
\let\bibfont\small
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{macro}{\@bibitem}
%    Check whether this macro still is what we suppose it to be.  It
%    is responsible for typesetting bibliography items that have to
%    be numbered
%    \begin{macrocode}
\CheckCommand*\@bibitem[1]{\item\if@filesw \immediate\write\@auxout
  {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
%    \end{macrocode}
%  We redefine it, in order to procude brackets for the labels if no
%  one is specified.
%    \begin{macrocode}
\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
  {\string\bibcite{#1}{[\the\value{\@listctr}]}}\fi\ignorespaces}
%    \end{macrocode}
% \end{macro}
%
%  It is also possible to omit both, \Lpackage{natbib} and
%  \Lpackage{cccite}.  Then only standard \LaTeXe{} citation and
%  bibliography are available.  (However, \Lpackage{natbib} should
%  even then work fine, so: use it.)
%    \begin{macrocode}
\else
  \relax
\fi%@cccite
\fi%@natbib
%    \end{macrocode}
%  Optionally, we also provide a twocolumn bibliography.
%  \changes{v2.02}{2001/12/13}{Added twocolumnbibliography.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\if@twocolumnbibliography
\RequirePackage{multicol}
\newenvironment{nthebibliography}{%
  \footnotesize
  \let\bibfont\footnotesize
  \let\section\subsubsection
  \begin{multicols}2
    \othebibliography}
  {%
    \vfill\vfill\vfill\vfill
    \endothebibliography
  \end{multicols}}
\AtBeginDocument{%
  \let\othebibliography\thebibliography
  \let\endothebibliography\endthebibliography
  \let\thebibliography\nthebibliography
  \let\endthebibliography\endnthebibliography}
\fi
%    \end{macrocode}
%
% \subsection{Referencing}
%
% All this stuff has been moved to a seperate file: \Lpackage{ccref}.
%  \changes{v2.15}{2010/10/21}{Moved this from the main part into a
%    seperate file.}
%  
%    \begin{macrocode}
\RequirePackage{ccref}
%    \end{macrocode}
%
% \subsection{Theorems, Proofs and Algorithms}
%
%  All these things are imported.
%    \begin{macrocode}
\if@cctheorems
\RequirePackage{ccthm}
\RequirePackage{ccproof}
\fi
\if@ccalgo
\RequirePackage{ccalgo}
\fi
\let\orig@newtheorem\newtheorem
\def\newtheorem{%
  \ClassWarning{cc}{You should not use newtheorem.\MessageBreak
    See Section 3.1 of the documentation.}%
  \orig@newtheorem}
%    \end{macrocode}
%
% \subsection{Other}
%
%  \begin{environment}{acknowledge}
%    This environment simply constitues of an unnumbered section.
%    To complicate things Springer adds a paragraph when the article
%    is made available for free.  If an article has no
%    acknowledgements put the command \cs{noacknowledge} at the very
%    position.
%  \changes{v2.18}{2011/07/26}{Added \cs{noacknowledge} with support
%    for an extra open access message. Added acknowledgements to
%    toc. MNuesken, Bonn}
%    \begin{macrocode}
\babel\def\ccacknowledgementsname{Acknowledgements}[%
  german=Danksagung,french=Remerciements]
\newif\if@ccack \@ccacktrue% usually acknowledgements are not required
\AtEndDocument{%
  \if@ccack\else
  \ClassError{cc}{Missing acknowledgements}
        {You must use either\MessageBreak
          \protect\begin{acknowledge} ... \protect\end{acknowledge}\MessageBreak
          or \protect\noacknowledge.}%
  \fi
}
\newenvironment{acknowledge}{%
  \section*{\ccacknowledgementsname}%
  \addcontentsline{toc}{section}{\ccacknowledgementsname}%
}{%
  \noacknowledge
}
\newcommand{\noacknowledge}{%
  \ifKV@ccsps@openaccess\if@ccack\else%
  \noindent{\small\@octxt\par}%
  \fi\fi%
  \global\@ccacktrue
}%
\def\@octxt{}%
\def\openchoicetext#1{\gdef\@octxt{\paragraph{Open Access.} #1}}%
\openchoicetext{This article is distributed under the terms of the
  Creative Commons Attribution Noncommercial License which permits any
  noncommercial use, distribution, and reproduction in any medium,
  provided the original author(s) and source are credited.}%
%    \end{macrocode}
%  \end{environment}
%
%  Label items in itemized lists with open circle.
%    \begin{macrocode}
\def\labelitemi{$\circ$}
%    \end{macrocode}
%  
%  Set length of footnoterule, shorter than the default.
%    \begin{macrocode}
\def\footnoterule{\kern-3\p@\hrule\@width18mm\kern 2.6\p@}
%    \end{macrocode}
%
%  \begin{macro}{\include}
%    In \cc{}, we do not want to waste any place, so we redefine
%    |\include| to be |\input| then.
%    \begin{macrocode}
\let\ccorg@include\include
\newwarning{warn@include}{Note that \protect\include\space is equivalent
  to \protect\input\space.}
\renewcommand{\include}{%
  \if@ccpublish
    \ccClassWarning{warn@include}%
    \let\next\input
  \else
    \let\next\ccorg@include
  \fi
  \next}
%    \end{macrocode}
%  \end{macro}
%  
%  Forget the class toggle.
%    \begin{macrocode}
% \let\ifclass\@undefined
% \let\classtrue\@undefined
% \let\classfalse\@undefined
%</cccls>
%    \end{macrocode}
%
%  \def\filename{ccaux.sty}
%  \CodelinePrefix{H}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It contains some definitions that are needed in several other files
%  of our macro package.
% \changes{v2.03}{2002/01/08}{New Package \lpackage{ccaux}
%   collects some definitions that are needed by several other files.
%   Michael N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
%<*ccaux>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ccaux}[2008/03/18 v2.08
         computational complexity, auxiliaries.
         Michael Nuesken, Bonn.]
%    \end{macrocode}
%  
% \subsection{New ifs for document class options}
%
%  \changes{v2.20}{2011/09/12}{Default marginmode now is -1 (noothermargins).
%    Michael N{\"{u}}sken, Bonn.}
%    \begin{macrocode}
\newif\if@longarticle \@longarticletrue
\newif\if@cclayout \@cclayouttrue
\newif\if@Tone \@Tonetrue
\newif\if@latin \@latintrue
\newif\if@utfviii \@utfviiifalse
\newif\if@babel \@babelfalse
\newif\if@ams \@amstrue
\newif\if@autotitle \@autotitletrue
\newif\if@ccsectioning \@ccsectioningtrue
\newif\if@cccite \@cccitefalse
\newif\if@natbib \@natbibtrue
\newif\if@manualbibliography \@manualbibliographyfalse
\newif\if@twocolumnbibliography \@twocolumnbibliographyfalse
\newif\if@twocolumnendtitle \@twocolumnendtitletrue
\newif\if@cctheorems \@cctheoremstrue
\newif\if@standardtheorems \@standardtheoremstrue
\newif\if@ccnosepeqncnt \@ccnosepeqncnttrue
\newif\if@ccalgo \@ccalgotrue
\newif\if@theoremitemprefixes \@theoremitemprefixestrue
\newif\if@ccpublish \@ccpublishfalse
%\newif\if@cctextarea \@cctextareatrue
\newcount\@textareaversion
\expandafter\def\csname if@cctextarea\endcsname{\ifnum\@textareaversion>0}
\def\@cctextareafalse{\@textareaversion\z@}
\def\@cctextareatrue{\@textareaversion\tw@}
\@cctextareatrue
\newcount\@marginmode \@marginmode\m@ne
%    \end{macrocode}
%  
%  \subsection{Number equations and theorems within sections or chapter}
%  In long articles, equations and theorems which also use this
%  counter, figures and tables shall be numbered within sections.
%  \changes{v2.01}{2000/06/28}{Added handling for cctheorems+separatelycounted.
%    Michael N{\"{u}}sken, Paderborn.}
%  \changes{v2.03}{2002/01/09}{Introduced macro \cs{ccTOPLEVEL}.
%    Michael N{\"{u}}sken, Paderborn.}
%  \changes{v2.03}{2002/01/24}{Introduced macros \cs{numberallwithin}
%    and \cs{@adjustnumbering}.  Renamed \cs{ccTOPLEVEL} to
%    \cs{cc@numberingtoplevel} and moved these things to ccaux.
%    Michael N{\"{u}}sken, Paderborn.}
%    \begin{macrocode}
\def\numberallwithin#1{\gdef\cc@numberingtoplevel{#1}}
\def\@adjustnumbering{%
  \if@longarticle
  \numberwithin{equation}\cc@numberingtoplevel
  \numberwithin{figure}\cc@numberingtoplevel
  \numberwithin{table}\cc@numberingtoplevel
  \if@cctheorems\if@standardtheorems\else
    \numberwithin{answer}\cc@numberingtoplevel
    \numberwithin{assumption}\cc@numberingtoplevel
    \numberwithin{claim}\cc@numberingtoplevel
    \numberwithin{conjecture}\cc@numberingtoplevel
    \numberwithin{convention}\cc@numberingtoplevel
    \numberwithin{corollary}\cc@numberingtoplevel
    \numberwithin{counterexample}\cc@numberingtoplevel
    \numberwithin{definition}\cc@numberingtoplevel
    \numberwithin{exercise}\cc@numberingtoplevel
    \numberwithin{fact}\cc@numberingtoplevel
    \numberwithin{hypothesis}\cc@numberingtoplevel
    \numberwithin{lemma}\cc@numberingtoplevel
    \numberwithin{notation}\cc@numberingtoplevel
    \numberwithin{note}\cc@numberingtoplevel
    \numberwithin{observation}\cc@numberingtoplevel
    \numberwithin{open}\cc@numberingtoplevel
    \numberwithin{openquestion}\cc@numberingtoplevel
    \numberwithin{problem}\cc@numberingtoplevel
    \numberwithin{proposition}\cc@numberingtoplevel
    \numberwithin{question}\cc@numberingtoplevel
    \numberwithin{remark}\cc@numberingtoplevel
    \numberwithin{result}\cc@numberingtoplevel
    \numberwithin{theorem}\cc@numberingtoplevel
    \numberwithin{thesis}\cc@numberingtoplevel
    \numberwithin{warning}\cc@numberingtoplevel
    \numberwithin{exampleexample}\cc@numberingtoplevel
  \fi\fi
\fi}
\numberallwithin{section}% redo this in the preamble, if necessary
%    \end{macrocode}
%
% \subsection{Warnings}
%
% \changes{v2.01}{2000/09/11}{Now some warnings are collected until
%      the end \dots{}  Michael N{\"{u}}sken, Paderborn}
%  \begin{macro}{\newwarning}
%  Define a warning message.
%    \begin{macrocode}
\newcommand{\newwarning}[2]{%
  \expandafter\gdef\csname cc@warn@#1\endcsname{#2}%
  \expandafter\def\csname cc@warncount@#1\endcsname{0}}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\ccwarning}
%  Issue a warning.
%    \begin{macrocode}
\newcommand{\ccClassWarning}[1]{%
  \@ifundefined{cc@warn@#1}{%
    \ClassWarning{cc}{Undefined warning.\MessageBreak
      This should never occur.
      Please inform nuesken@bit.uni-bonn.de .}%
    }{}%
  \expandafter\ifcase\csname cc@warncount@#1\endcsname\relax
  \ClassWarning{cc}{\csname cc@warn@#1\endcsname.\MessageBreak
    Possible further occurencies of this warning will be\MessageBreak
    collected until the end of the document.\MessageBreak
    This one was}%
  \or
  \AtEndDocument{%
    \ClassWarningNoLine{cc}{Repeated warning collected \csname
      cc@warncount@#1\endcsname\space times:\MessageBreak
      \csname cc@warn@#1\endcsname}%
    }%
  \else
  \fi
  \expandafter\count@=0\csname cc@warncount@#1\endcsname\relax
  \advance\count@\@ne
  \expandafter\xdef\csname cc@warncount@#1\endcsname{\the\count@}%
  }
%    \end{macrocode}
%  \end{macro}
%
% \subsection{Diverse}
%
% \changes{v2.03}{2002/01/10}{Fixed bug: \cs{if@babel} is not properly
%   set when this is called, removed non-babel case.  Michael
%   N{\"{u}}sken, Paderborn}
% \changes{v2.03}{2002/03/07}{Added languages french, italian and
%   spanish to \cs{babel}\cs{def} and adjusted for it.  Michael
%   N{\"{u}}sken, Paderborn}
% \changes{v2.03}{2003/06/04}{Fixed bug: if babel is not loaded now
%   but will be later, then \cs{addto} must put its definitions in a
%   temporary macro and add it to the appropriate one only after the
%   preamble if the desired macro is defined by then and forget about
%   it otherwise.}
% \changes{v2.03}{2004/06/21}{\cs{ccaddto} must not call
%   \cs{AtBeginDocument} when called inside the document (as for example
%   happens in algorithms...)}
% \changes{v2.04}{2005/11/03}{\cs{ccaddto}, \cs{ccaddtoINDOC},
%   \cs{ccaddtonow} now use only global defs.)}
%  \changes{v2.07}{2008/03/18}{Changed \cs{cc@ifempty} to long, MN, Bonn}
%    \begin{macrocode}
%  \changes{v2.20}{2012/03/19}{Detangled \cs{addto} by using the new
%    name \cs{cc@addto}.}
% \providecommand{\extdef}[2]{%
%     \ifx#1\@undefined\relax\def#1{}\fi%
%     \toks@=\expandafter{#1}%
%     \toks255={#2}%
%     \edef#1{\the\toks@\the\toks255}}
\newcommand{\cc@addto}[2]{%
  \expandafter\ccaddto\expandafter{\csname
  cc@\string#1\endcsname}{#2}{#1}}
\providecommand{\addto}[2]{%
  \expandafter\ccaddto\expandafter{\csname
  cc@\string#1\endcsname}{#2}{#1}}
% \ccaddto is almost a copy of babel's \addto.
% It's arguments are #1 = \cc@\FOO, #2=material, #3 = \FOO,
% where \FOO is the macro where the material should be added and
% \cc@\FOO the temporary macro to hold thing until the beginning of
% the document.  (Hopefully not too late for the first selectlanguage!)
\newcommand{\ccaddto}[3]{%
  \ifx#1\@undefined
    \gdef#1{#2}%
    \AtBeginDocument{\expandafter\ccaddtonow\expandafter{#1}#3}%
  \else
    \ifx#1\relax
      \gdef#1{#2}%
      \AtBeginDocument{\expandafter\ccaddtonow\expandafter{#1}#3}%
    \else
      {\toks@\expandafter{#1#2}%
        \xdef#1{\the\toks@}}%
    \fi
  \fi
}
\newcommand{\ccaddtoINDOC}[3]{%
  \ifx#1\@undefined
    \gdef#1{#2}%
  \else
    \ifx#1\relax
      \gdef#1{#2}%
    \else
      {\toks@\expandafter{#1#2}%
        \xdef#1{\the\toks@}}%
    \fi
  \fi
}
\AtBeginDocument{\global\let\ccaddto\ccaddtoINDOC}
\newcommand{\ccaddtonow}[2]{%
  \ifx#2\@undefined
    \gdef#2{#1}%
  \else
    \ifx#2\relax
      \gdef#2{#1}%
    \else
      {\toks@\expandafter{#2#1}%
        \xdef#2{\the\toks@}}%
    \fi
  \fi
}
% \@ifempty and \@ifnotempty are def'd in amsmath.sty, but we need it
% here.
\long\def\cc@ifempty#1{\cc@xifempty#1@@..\@nil}
\long\def\cc@xifempty#1#2@#3#4#5\@nil{%
  \ifx#3#4\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
\long\def\cc@ifnotempty#1{\cc@ifempty{#1}{}}
%    \end{macrocode}
%  \begin{macro}{\babel}
%  \changes{v2.03}{2005/08/29}{Replaced \cs{babel}\cs{def} with a more
%    flexible construction.}
%    This shall simplify the addition of multilanguage support.  A
%    macro |#1| that shall hold a name is assigned a version in
%    english |#2|.  Further, that definition is added to
%    |\captionsenglish|.  The optional argument |#3| is a comma
%    seperated list of equations \meta{language}=\meta{translation}.
%    Each non-empty translation is added to the
%    |\captions|\meta{language} of that language.
%    \begin{macrocode}
\def\babel\def#1#2{%
  \@ifnextchar[{\n@wbabel{#1}{#2}}{\n@wbabel{#1}{#2}[]}}
\def\n@wbabel#1#2[#3]{%
  \def#1{#2}%
  \cc@ifnotempty{#2}{\cc@addto\captionsenglish{\def#1{#2}}}%
  \babeladdtranslations#1{#3}%
}
\def\b@beladdlang#1=#2=#3\@@@#4{%
  \cc@ifnotempty{#2}{%
    \expandafter\cc@addto\csname captions#1\endcsname{\def#4{#2}}%
  }%
}
%    \end{macrocode}
%    You can use the macro |\babeladdtranslations| at any time to add
%    translations.  Example:
%    \begin{center}
%      |\babeladdtranslations\treename{german=Baum,french=arbre}|
%   \end{center}
%    will add |\def\treename{Baum}| to |\captionsgerman| and so on.
%    \begin{macrocode}
\def\babeladdtranslations#1#2{%
  \@for\@tempa:=#2\do{\expandafter\b@beladdlang\@tempa==\@@@#1}%
}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\condbreak}
%    This is H.~Partls |\condbreak| from \Lpackage{refman}
%    (\file{refman.sty}).  Using |\condbreak{|\meta{length}|}| allows
%    a pagebreak if there is at most \meta{length} space left on the
%    current page.
%  \changes{v2.03}{2004/03/22}{Moved \cs{condbreak} to  \lpackage{ccaux}}
%    \begin{macrocode}
\def\condbreak#1{%
  \vskip 0pt plus #1%
  \pagebreak[3]%
  \vskip 0pt plus -#1%
  \relax}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{environment}{enumerate}
%    We extend the \Lenv{enumerate} by an optional |*|.  This simply
%    continues a previously terminated \Lenv{enumerate}.  Using
%    |\begin{enumerate}*| means that a previously terminated list is
%    continued.
%  \changes{v2.03}{2004/03/22}{Moved \lenv{enumerate} modification to
%    \lpackage{ccaux}}
%    \begin{macrocode}
\let\ccorg@enumerate\enumerate
\def\enumerate{\@ifstar{\count251\c@enumi
        \count252\c@enumii
        \count253\c@enumiii
        \count254\c@enumiv
        \ccorg@enumerate
        \c@enumi\count251
        \c@enumii\count252
        \c@enumiii\count253
        \c@enumiv\count254}%
        {\ccorg@enumerate}}
%    \end{macrocode}
%  \end{environment}
%    \begin{macrocode}
%
%</ccaux>
%    \end{macrocode}
%
%  \GetFileInfo{cclayout.sty}
%  \CodelinePrefix{L}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  \begin{macro}{\contact}
%  The following macros supplement the traditional |\author|,
%  |\title| and |\date| declarations.  First, |\contact| declares the
%  email address of the contact author.
%    \begin{macrocode}
%<*cclayout>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cclayout}[2012/06/22 v2.25 cclayout. MNuesken]
\let\@contact\relax
\newcommand{\contact}[1]{\gdef\@contact{#1}}
\AtBeginDocument{\if@ccpublish
  \@ifundefined{@contact}{%
    \ClassWarningNoLine{cc}{Who is the contact author?\MessageBreak
      Use \protect\contact\space in the preamble!}%
    }{}%
  \fi}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\submitted}
%  \begin{macro}{\received}
%  The macro |\received| stores its argument, the received date.
%    \begin{macrocode}
\let\@received\relax
\newcommand{\received}[1]{\gdef\@received{#1}}
\AtBeginDocument{\if@ccpublish
  \@ifundefined{@received}{%
    \ClassWarningNoLine{cc}{Missing submission/received date.\MessageBreak
      Use \protect\received\space in the preamble.}{}%
    }{}%
  \fi}
\def\submitted{\received}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \begin{macro}{\titlehead}
%  The following macros supplement the traditional |\author|,
%  |\title| and |\date| declarations.  First, |\titlehead| can be
%  used to declare a shortened version of the title to be used in
%  the running head.  It simply stores its argument in a macro.
%    \begin{macrocode}
\let\@titlehead\relax
\newcommand{\titlehead}[1]{\gdef\@titlehead{#1}}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\authorhead}
%  |\authorhead| can be used to declare a different author list for
%  use in the head line. Usually, this should be automatically correct
%  without using this.  It simply stores its argument in a macro.
%    \begin{macrocode}
\let\@authorhead\@undefined
\newcommand{\authorhead}[1]{\gdef\@authorhead{#1}}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\authorlist}
%  |\authorlist| can be used to declare a different author list for
%  use in the title.  Usually, this should be automatically correct
%  without using this.  It simply stores its argument in a macro.
%    \begin{macrocode}
\let\@authorlist\@undefined
\newcommand{\authorlist}[1]{\gdef\@authorlist{#1}}
%    \end{macrocode}
%  \end{macro}
%  \begin{environment}{abstract}
%  \begin{macro}{\Abstract}
%  The abstract is declared by the environment \Lenv{abstract}.  It is
%  required for \cc{}, otherwise optional (although you get a warning
%  if there is no abstract).  (Note that the article class defines an
%  abstract environment while the book class does not.)  The command
%  |\Abstract{|\meta{text}|}| is deprecated and only exists for
%  downward compatibility.
%  \changes{v2.19}{2011/07/28}{Rewritten environments for abstract,
%    subject and keywords based on \lpackage{environ.sty}.  Michael
%    N{\"{u}}sken, Bonn}
%    \begin{macrocode}
% \newbox\@abstract
\let\abstract\@undefined\let\endabstract\@undefined
\babel\def\ccabstractname{Abstract}[%
  german=Zusammenfassung,french=R\'esum\'e]
% \newenvironment{abstract}
%   {\global\setbox\@abstract\@abstr{\ccabstractname}}
%   {\end@abstr}
\RequirePackage{environ}[2008/06/18]
\def\@abstract@macro{}
\long\def\for@cc@abstract#1{%
  \gdef\@abstract@macro{\begin{@abstr}{\ccabstractname}#1\end{@abstr}}}
\newenvironment{abstract}{\Collect@Body\for@cc@abstract}{}
%    \end{macrocode}
%  Deprecated now: |\Abstract|.
%    \begin{macrocode}
\newcommand{\Abstract}{\for@cc@abstract}
%    \end{macrocode}
%  \end{macro}
%  \end{environment}
%  \begin{environment}{keywords}
%  Keywords are given using the environment \Lenv{keywords} which is
%  similar to \Lenv{abstract}.  It simply stores its contents
%  in a box.
%    \begin{macrocode}
% \newbox\@keywords
\babel\def\cckeywordsname{Keywords}[%
  german=Stichworte,french=Mot-cl\'e]
% \newenvironment{keywords}
%   {\global\setbox\@keywords\@abstr{\cckeywordsname}}
%   {\end@abstr}
\def\@keywords@macro{}
\long\def\for@cc@keywords#1{%
  \gdef\@keywords@macro{\begin{@abstr}{\cckeywordsname}#1\end{@abstr}}}
\newenvironment{keywords}{\Collect@Body\for@cc@keywords}{}
%    \end{macrocode}
%  \end{environment}
%  \begin{environment}{subject}
%  The environment \Lenv{subject} declares the subject
%  classification.  It simply stores its contents
%  in a box.
%    \begin{macrocode}
%\newbox\@subject
\babel\def\ccsubjectclassificationname{Subject classification}[%
  german=Klassifizierung,french=Classification de suj\`et]
% \newenvironment{subject}
%   {\global\setbox\@subject\@abstr{\ccsubjectclassificationname}}
%   {\end@abstr}
\def\@subject@macro{}
\long\def\for@cc@subject#1{%
  \gdef\@subject@macro{\begin{@abstr}{\ccsubjectclassificationname}
      #1
    \end{@abstr}}}
\newenvironment{subject}{\Collect@Body\for@cc@subject}{}
%    \end{macrocode}
%  \end{environment}
%  \begin{environment}{@abstr}
%  The environment \Lenv{@abstr} is for internal use only.  It puts
%  the contents in a box, preceded by its argument as a title.
%  \changes{v2.04}{2006/03/06}{Changed @abstr to allow for very
%    long abstracts, MN, Bonn}
%  \changes{v2.07}{2008/03/18}{Changed @abstr to decrease spacing in
%    embedded lists and forbid nested lists, MN, Bonn}
%  \changes{v2.19}{2011/07/28}{Allowed one nested lists, MN, Bonn}
%    \begin{macrocode}
\newdimen\@abstrwidth
\newbox\@abstr@box
\newenvironment{@abstr}[1]{%
%  \leavevmode
  \setbox\@abstr@box\vbox\bgroup%
  \@parboxrestore
  \ifdim\@abstrwidth>\hsize\@abstrwidth\hsize\fi
  \leftmargin.5\hsize \advance\leftmargin-.5\@abstrwidth
  \rightmargin\leftmargin
  \@trivlist\@newlistfalse\global\@inlabeltrue
  \advance\linewidth -\rightmargin
  \advance\linewidth -\leftmargin
  \advance\@totalleftmargin \leftmargin
  \parshape \@ne \@totalleftmargin \linewidth
  \small
  \def\@listi{\leftmargin\leftmargini
              \topsep 2\p@ \@plus2\p@ \@minus1\p@
              \parsep 1\p@
              \itemsep \parsep}%
  \def\@listii{\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \topsep 0\p@ \@plus1\p@
              \parsep 1\p@
              \itemsep \parsep}%
  \let\@listiii\@toodeep
  \let\@listiv\@toodeep
  \let\@listv\@toodeep
  \let\@listvi\@toodeep
  \textbf{#1. }\ignorespaces}
{%
%  \strut
  \par
  \egroup
  \leavevmode\unvbox\@abstr@box
  \ignorespacesafterend}
%    \end{macrocode}
%  \end{environment}
%  \begin{macro}{\noabstract}
%  \begin{macro}{\nokeywords}
%  \begin{macro}{\nosubject}
%  Usually, abstract, keywords and subject classification are
%  optional.  But when published in \cc{} they are required.  The
%  following commands allow you to omit one or more of them without
%  getting an error message.
%    \begin{macrocode}
\newif\if@abstractoptional
\if@ccpublish\@abstractoptionalfalse\else\@abstractoptionaltrue\fi
\newcommand{\noabstract}{\ClassWarning{cc}{You are using a non
    documented feature}\@abstractoptionaltrue}
\newif\if@keywordsoptional
\if@ccpublish\@keywordsoptionalfalse\else\@keywordsoptionaltrue\fi
\newcommand{\nokeywords}{\ClassWarning{cc}{You are using a non
    documented feature}\@keywordsoptionaltrue}
\newif\if@subjectoptional
\if@ccpublish\@subjectoptionalfalse\else\@subjectoptionaltrue\fi
\newcommand{\nosubject}{\ClassWarning{cc}{You are using a non
    documented feature}\@subjectoptionaltrue}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \begin{macro}{\subtitle}
%  \begin{macro}{\version}
%  The macros |\subtitle| and |\version| allow to add a subtitle or
%  version below the title.
%    \begin{macrocode}
\def\@subtitle{}
\newcommand{\subtitle}[1]{\def\@subtitle{#1}}
\def\@version{}
\newcommand{\version}[1]{\def\@version{#1}}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
%  
%  \changes{v2.18}{2011/07/26}{Simplify maketitle handling. Michael
%    Nüsken, Bonn}
%  Make sure that macros with first, last and number of pages are
%  available right after |\begin{document}|.  This will be used for
%  \cs{maketitle} and possibly more.
%  \changes{v2.19}{2011/07/29}{Always use own secondoffive when
%    computing the page of ccenddocument (hyperref has five groups,
%    otherwise it's just two). Michael Nüsken, Bonn}
%    \begin{macrocode}
\AtBeginDocument{\addtocounter{section}{-1}\refstepcounter{section}}%
\AtEndDocument{\hrule height0pt\label{ccenddocument}}%
\def\@ccunknown{??}
\def\@ccfirst{1}%
\let\@cclast\@ccunknown%
\let\@ccnumberofpages\@ccunknown%
\long\def\cc@secondoffive#1#2#3#4#5{#2}
\AtBeginDocument{%
  \@ifundefined{r@ccenddocument}{}{%
    \@tempcnta\@ne
    \advance\@tempcnta-\@ccfirst
    \protected@xdef\@cclast{\csname r@ccenddocument\endcsname}%
    \xdef\@cclast{\expandafter\cc@secondoffive\@cclast{}{}{}{}{}}%
    \advance\@tempcnta\@cclast%
    \xdef\@ccnumberofpages{\the\@tempcnta}%
  }%
}
%    \end{macrocode}
%
%  \begin{macro}{\ccpublish}
%  The macro |\ccpublish| sets all data for an article to be published
%  in \cc{}.
%  \changes{v2.03}{2005/08/27}{Changed label at end of document to
%    |!end!document!| to avoid a problem with \lpackage{hyperref}.
%    (\lpackage{hyperref} does not allow |@| as part of label names.)}
%  \changes{v2.03}{2005/08/27}{Changed label at end of document to
%    |ccenddocument | to avoid a problem with \lpackage{hyperref}.
%    (\lpackage{hyperref} has also problems with |!| as part of label
%     names.)}
%  \changes{v2.18}{2011/07/26}{Moved label generation, see
%    above. Michael Nüsken, Bonn}
%    \begin{macrocode}
\def\@cctxt{}
\newif\if@cchead
\newcommand{\noccpublish}[1]{%
  \global\@ccpublishfalse
  \global\@abstractoptionaltrue% Abstract optional
  \global\@keywordsoptionaltrue% Keywords optional
  \global\@subjectoptionaltrue% Subject class. optional
  \global\@ccheadfalse
  \gdef\@cctxt{#1}%
%  \global\@twosidefalse
  }
\newcommand{\ccpublish}[4]{% Deprecated since 2011/07/25
  \global\@ccpublishtrue
  \global\@abstractoptionalfalse% Abstract required
  \global\@keywordsoptionalfalse% Keywords required
  \global\@subjectoptionalfalse% Subject class. required
  \global\@ccheadtrue
  \gdef\@ccyear{#1}%
  \gdef\@ccvolume{#2}%
  \gdef\@ccissue{#3}%
  \gdef\@ccfirst{#4}%
  \gdef\@cctxt{cc \textbf{#2} (#1)}%
  \global\@autotitletrue
  \AtBeginDocument{\addtocounter{section}{-1}\refstepcounter{section}}%
  }
%    \end{macrocode}
%  \end{macro}
%  
%  \subsection{Springer publishing services adjustments}
%  \begin{macro}{\ccsps}
%  \changes{v2.18}{2011/07/27}{New macro \cs{ccsps} for Springer
%    publishing services. Michael Nüsken, Bonn}
%    The macro \cs{ccsps} collects all the settings needed in the
%    publishing process.  See \ref{sec:editor} for details on its
%    use.
%
%    We use the package \Lpackage{xkeyval} to parse the input.
%    \begin{macrocode}
\RequirePackage{xkeyval}[2008/08/13]
%    \end{macrocode}
%  
%  These tiny helpers will allow to produce any fixed length output.
%  \begin{macro}{\cc@fixelendef}
%    The macro \cs{cc@fixelendef} defines \#3 as a fixed
%    expanded-length version of \#4 to \#1 places, cut on the left if
%    necessary or filled up with copies of \#2 on the left.
%  \begin{macro}{\cc@fixelen}
%    The macro \cs{cc@fixelen} outputs a fixed expanded-length version
%    of \#3 to \#1 places, cut on the left if necessary or filled up
%    with copies of \#2 on the left.
%    \begin{macrocode}
\def\cc@fixlencountdown#1{%
  \@tfor\@x:=#1\do{\advance\@tempcnta\m@ne}}
\def\cc@fixelendef#1#2#3#4{%
 \@tempcnta#1%
 \edef\@tempa{#4}\expandafter\cc@fixlencountdown\expandafter{\@tempa}%
 \gdef#3{}\relax
 \@whilenum\@tempcnta>\z@\do{%
    \expandafter\gdef\expandafter#3\expandafter{#3#2}%
    \advance\@tempcnta\m@ne}%
 \expandafter\gdef\expandafter#3\expandafter{#3#4}%
}
\def\cc@fixelen#1#2#3{%
  \@tempcnta#1
  \edef\@tempa{#3}\expandafter\cc@fixlencountdown\expandafter{\@tempa}%
  \@whilenum\@tempcnta>\z@\do{%
    #2%
    \advance\@tempcnta\m@ne}%
  \edef\@tempa{\noexpand\cc@fixelena#3\noexpand\@@@}\@tempa%
}
\def\cc@fixelena#1\@@@{%
  \@tfor\@x:=#1\do{%
    \advance\@tempcnta\@ne
    \ifnum\@tempcnta>\z@\@x\fi
  }%
}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  
%  Now we start defining all the options.
%
%  |journal=|\meta{journalname} will set the journalname for use in
%  the running title, default |cc|.
%  |journalnumber=|\meta{journalnumber} sets the journalnumber for use
%  in the doi, default |37|.  The key |sps| is here for internal
%  detection only.
%    \begin{macrocode}
\define@boolkey{ccsps}{sps}[true]{}%
\define@key{ccsps}{journal}[cc]{\gdef\@journalname{#1}}%
\define@key{ccsps}{journalnumber}[37]{\gdef\@journalnumber{#1}}%
%    \end{macrocode}
%  
%  Set the submission date.  This overrides
%  |\received{|\meta{date}|}|.
%    \begin{macrocode}
\define@key{ccsps}{submitted}[??dd Month yyyy??]{%
  \gdef\@received{#1}%
  \gdef\received##1{\ClassWarning{cc}
    {Received/submitted date (##1) override!\MessageBreak
      Using \@received.}}}
%    \end{macrocode}
%  
%  \subsubsection{Revision stage}
%
%    \begin{macrocode}
\define@boolkey{ccsps}{revisionstage}[true]{%
%  \ifKV@ccsps@revisionstage\let\revisionstage=Y\else\let\revisionstage=N\fi
}
%    \end{macrocode}
%
%  The manuscript number occurs in the helper strip.
%    \begin{macrocode}
% Four things to hook or not
\define@key{ccsps}{DOImsnr}[??]{% manuscript number
  \gdef\@DOImsnr{#1}}
%    \end{macrocode}
%  The options |TYPESET|, |DISK|, |LE|, |CP| just add checkmarks in
%  the helper strip.
%    \begin{macrocode}
\define@boolkey{ccsps}{TYPESET}[true]{%
  \ifKV@ccsps@TYPESET\let\TYPESET=Y\else\let\TYPESET=N\fi}
\define@boolkey{ccsps}{DISK}[true]{%
  \ifKV@ccsps@DISK\let\DISK=Y\else\let\DISK=N\fi}
\define@boolkey{ccsps}{LE}[true]{%
  \ifKV@ccsps@LE\let\LE=Y\else\let\LE=N\fi}
\define@boolkey{ccsps}{CP}[true]{%
  \ifKV@ccsps@CP\let\CP=Y\else\let\CP=N\fi}
%    \end{macrocode}
%  This option sets the text for the watermark.
%    \begin{macrocode}
\define@key{ccsps}{draftcopy}[Uncorrected proof]{% watermark text
  \gdef\cc@watermarktext{#1}}
%    \end{macrocode}
%  This option turns the helper strip on or off, but it is triggered by
%  pdfpage.
%    \begin{macrocode}
\define@boolkey{ccsps}{helperstrip}[true]{}%
%    \end{macrocode}
%  For typesetting alignment checks a grid may be added.
%    \begin{macrocode}
\define@boolkey{ccsps}{grid}[true]{}
%    \end{macrocode}
%  
%  \subsubsection{Issue stage}
%  
%    \begin{macrocode}
\define@boolkey{ccsps}{issuestage}[true]{%
%   \ifKV@ccsps@issuestage\let\issuestage=Y\else\let\issuestage=N\fi
}
%    \end{macrocode}
%
%  Some article are delivered via Open Access.
%    \begin{macrocode}
% Shall the article be open access?
\define@boolkey{ccsps}{openaccess}[true]{%
%   \ifKV@ccsps@openaccess\let\stageaccess=Y\else\let\stageaccess=N\fi
}
\define@boolkey{ccsps}{stageaccess}[true]{% Deprecated.
    \setkeys{ccsps}{openaccess=#1}}
%    \end{macrocode}
%  
% Publishing information is collected by the following options.
%    \begin{macrocode}
\define@key{ccsps}{year}[????]{\gdef\@ccyear{#1}}
\define@key{ccsps}{volume}[??]{\gdef\@ccvolume{#1}}
\define@key{ccsps}{issue}[??]{\gdef\@ccissue{#1}}%
\define@key{ccsps}{firstpage}[1]{%
  \gdef\@ccfirst{#1}%
%  \cc@fixelendef40\@ccfirstiv{#1}%
  \@tempcnta4\@tfor\@x:=#1\do{\advance\@tempcnta\m@ne}%
  \ifcase\@tempcnta\gdef\@ccfirstiv{#1}%
  \or\gdef\@ccfirstiv{0#1}%
  \or\gdef\@ccfirstiv{00#1}%
  \or\gdef\@ccfirstiv{000#1}%
  \else\ClassError{cc}{First page number too big.}{%
    The number of the first page cannot be larger than 9999.
  }\fi
}
\define@key{ccsps}{copyholder}[\default@copyholder]{\gdef\@copyholdername{#1}}
\def\default@copyholder{%
  \ifKV@ccsps@openaccess The Author(s)
  \else Springer Basel AG\fi}
\define@key{ccsps}{doisuffix}[????-?]{%
%   Is the doi always 10.1007/s00037-threedigityear-suffix?
%   Yes! (Answer from Springer...)
  \cc@fixelendef50\@doiinfo{\@journalnumber}%
  \xdef\@doiinfo{%
    10.1007/s\@doiinfo-%
    \noexpand\cc@fixelen30{\noexpand\@ccyear}-%
    #1}}
\define@key{ccsps}{doi}{\gdef\@doiinfo{#1}}
\define@key{ccsps}{onlinedate}[??dd Month yyyy??]{\gdef\@onlinedate{#1}}
% Are the following really necessary or are they derived?
\define@key{ccsps}{onlinefirstyear}[\the\year]{\gdef\@ccyear{#1}}
\define@key{ccsps}{coveryear}[\@ccyear]{\gdef\@coveryear{#1}}
% Is the coveryear always the last two digits of the year?
%    \end{macrocode}
%  
%  For online publication use the option |pdfpage| and |xlink|.  The
%  latter makes hyperlinks blue and so forth.
%    \begin{macrocode}
\define@boolkey{ccsps}{pdfpage}[true]{%
%   \ifKV@ccsps@pdfpage\@pdfpagetrue\else\@pdfpagefalse\fi%
}
\define@boolkey{ccsps}{xlink}[true]{}
%    \end{macrocode}
%  
% Finally put each key to its default value.
%    \begin{macrocode}
\setkeys{ccsps}{
  sps=false,
  journal={cc}, journalnumber=37,
  grid=false,
  TYPESET=false,
  DISK=false,
  LE=false,
  CP=false,
  DOImsnr,
  openaccess=false,
  revisionstage=false,
  helperstrip=false,
  issuestage=false,
  copyholder,
  year,volume,issue,firstpage,
  onlinefirstyear,coveryear,doisuffix,onlinedate,
  draftcopy
}
%    \end{macrocode}
%  
% \subsubsection{Choose publisher features}
% This is the macro for springer publishing services.  Note that it
% should be called only once, best right after |\documentclass|.
%    \begin{macrocode}
\newcommand{\ccsps}[1]{%
  \if@cctextarea\else\ClassError{cc}{Wrong textarea chosen}
  {Remove any textarea or noccpublish option from documentclass.}\fi
  \global\@ccpublishtrue
  \global\@abstractoptionalfalse% Abstract required
  \global\@keywordsoptionalfalse% Keywords required
  \global\@subjectoptionalfalse% Subject class. required
  \global\@ccackfalse% Acknowledgements required
  \global\@ccheadtrue
  \global\@autotitletrue
%   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Now scan the key, key=value list:
  \setkeys{ccsps}{sps,#1}
%   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   \gdef\@cctxt{cc \textbf{\@ccvolume}(\@ccissue)}% MN2011/07/27: Shouldn't it be this?
  \gdef\@cctxt{cc \textbf{\@ccvolume} (\@ccyear)}%
%   \global\@twosidefalse
%   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   During revisionstage line numbers, a helper strip and a
%   watermark shall be added.
%   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \RequirePackage[mathlines]{lineno}[2005/11/02]
  \ifKV@ccsps@pdfpage
  \setkeys{ccsps}{helperstrip=false}%
%   This case should turn off draftcopy but cannot do this 
%   since draftcopy is badly written.
%   Consequently, this makes a double use of ccsps impossible.
  \nolinenumbers
  \else
  \setkeys{ccsps}{helperstrip=true}%
  \RequirePackage[conditional,draft]{draftcopy}
  \draftcopyPageTransform{155 75 translate 65 rotate}
  \draftcopyName{\cc@watermarktext}{75}
%   Scaling by a factor 75 is fine for a text like "Uncorrected proof".
  \linenumbers
  \fi
%   With the option xlink the final pdf shall have bookmarks and
%   blue links. Otherwise there are no bookmarks and black links.
%   \changes{v2.25e}{2015/02/23}{Dropped option dvips from call of
%     hyperref.  I hope that hyperref finds out itsself whether dvips
%     may be used.  Michael N{\"{u}}sken, Bonn}
  \RequirePackage[%dvips,
    bookmarks=\ifKV@ccsps@xlink true\else false\fi,
    breaklinks=true,
    colorlinks=\ifKV@ccsps@xlink true\else false\fi,
    linkcolor=\ifKV@ccsps@xlink blue\else black\fi,
    unicode]{hyperref}[2011/04/17 v6.82g]%
%   Make sure \cs{init@bare} is executed/repeated after hyperref's commands.
  \AtBeginDocument{\init@bare}
  \RequirePackage{breakcites}%
  \RequirePackage{breakurl}[2009/01/24 v1.30]%
  \def\l@title##1{\@dottedtocline{-1}{0pt}{0pt}{{\large\textbf{##1}}}}%
  \let\l@title\l@part
%   
%  \ExecuteOptions{nonatbib}
%  \usepackage[comma,square]{modnatbib}%
%   The package natbib was modified only marginally.  On the one
%   hand, spacing after superscripted references was modified, which
%   is irrelevant to \cc{}.  On the other hand the references were
%   also added to the table of contents.  This is superfluous since
%   \Lclass{cc} redefines \Lenv{thebibliography} and adds that entry
%   there.  Further punctuation was modified but that is set by
%   \Lclass{cc} anyways.
%  
%  \usepackage{hypernat}%
%   The package \Lpackage{hypernat} would at most be needed if cc
%   articles would combine natbib options number and
%   sort&compress. However, number is deprecated and sort&compress
%   is not used in the journal versions.
%  
  \ifKV@ccsps@xlink%
  \def\@urlcolor{blue}
  \def\@citecolor{blue}
  \def\externalref##1##2{\hyperimage{##1}{##2}}%
  \def\DOIexternalref##1##2{\hyperimage{##1}{##2}}%
  \InputIfFileExists{bookmarkgreeks.tex}{}{}%
  \else
  \def\@urlcolor{black}%
  \def\@citecolor{black}
  \def\externalref##1##2{##2}%
  \def\DOIexternalref##1##2{##2}%
  \fi%
%   The option grid produces a grid to check or align the page and
%   column boundarys.
  \ifKV@ccsps@grid
  \overfullrule=6pt
  \let\twidth\textwidth
  \let\theight\textheight
  \else\overfullrule=0pt\fi
%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%  %%% JS_info (MN2011/07/27: What's this?)
  \InputIfFileExists{JS_info.tex}{}{}%
}
%    \end{macrocode}
%  \end{macro}
%
% The following code is based on \Lpackage{ccspsmacros} and
% \Lpackage{modlineno} as used by Springer.  Actually, the only
% significant modification to \Lpackage{modlineno} seems to be that
% its option \Lclo{pagewise} is disabled; but it's easy not to use it.
%  \begin{macro}{\printed}
%  \begin{macro}{\electronic}
%  The printed and the electronic version of \cc{} have different
%  ISSNs.  |\printed| and |\electronic| set the corresponding ISSN.
%  The ISSN for the printed version is preselected.
%    \begin{macrocode}
\def\printed@issn{1016-3328}%
\def\electronic@issn{1420-8954}%
\newcommand{\printed}{\let\issn\printed@issn}
\newcommand{\electronic}{\let\issn\electronic@issn}
\printed
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  All environments and macros from this section can only be used in
%  the preamble.
%  \changes{v2.01}{2000/07/12}{Some things shall work until \cs{maketitle}.}
%    \begin{macrocode}
% \@onlypreamble\author
% \@onlypreamble\title
% \@onlypreamble\abstract
% \@onlypreamble\Abstract
% \@onlypreamble\keywords
% \@onlypreamble\subject
% \@onlypreamble\titlehead
% \@onlypreamble\authorhead
% \@onlypreamble\received
\@onlypreamble\ccpublish
\@onlypreamble\ccsps
\@onlypreamble\electronic
\@onlypreamble\printed
%    \end{macrocode}
%
% \subsection{Extract information from \cs{@author}}
%
%  The title is produces using the information provided by
%  |\@author|.  But this contains the entire addresses.  The first
%  line of each address is considered to be the name of an author.
%  These names then occur in the title seperated by |\authorsep| and
%  |\authorlastsep|.
%    \begin{macrocode}
\def\extractnamesfr@m@author{%
  \@ifundefined{@authorlist}{%
    \let\and\ignorespaces
    \let\latest@name\relax
    \count@\z@
    \expandafter\extract@names\@author\and\and\@nil}{%
    \@authorlist
    }
  }
\def\extract@names#1\and#2\@nil{%
  \cc@ifempty{#1}{%
    \unskip\if\and\relax\else
    \ifnum\count@>\tw@\authorlastsepmany\else\authorlastsep\fi
    \fi\latest@name
    \let\next\gobble@nil}%
  {%
    \unskip\and\latest@name
    \ifx\latest@name\relax\else\let\and\authorsep\fi
    \extract@name#1\\\@nil
    \let\next\extract@names}%
  \next#2\@nil}
\def\gobble@nil#1\@nil{}
\def\extract@name#1\\#2\@nil{\advance\count@\@ne\def\latest@name{#1}}
%    \end{macrocode}
%  \begin{macro}{\authorsep}
%  \begin{macro}{\authorlastsep}
%  \begin{macro}{\authorlastsepmany}
%  These two macros are used between authors in the title that
%  |\maketitle| produces.  |\authorlastsep| or |\authorlastsepmany| is
%  used between the last two authors (the latter if there are more
%  than two authors), otherwise |\authorsep| is used.  The negative
%  penalty favors a line break after the comma.
%  \changes{v2.01}{2000/07/06}{Added \cs{authorlastsepmany}.  Michael
%    N{\"{u}}sken, Paderborn}
%  \changes{v2.02}{2001/05/22}{Introduced \cs{AND}.  Michael
%    N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
\babel\def\ccAND{and}[german=und,french=et]
\def\authorsep{,\penalty-5\ }
\def\authorlastsep{\penalty-5\ \ccAND{} }
\def\authorlastsepmany{,\penalty-5\ \ccAND{} }
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  
%  The running head uses either the name of the only author, or the
%  last names of up to three authors, or the last name of the first
%  author supplemented by |\textit{et al.}|.  This informations
%  usually is extracted from the author list declared by |\author| in
%  |\@author|.  Finally, it is stored in |\@authorhead|.
%    \begin{macrocode}
\newtoks\latest@lastname
\newtoks\@firstname
\let\@firstlastname\@temptokena
\def\extractauthorheadfr@m@author{%
  {%
    \let\and\@empty
    \latest@lastname{}%
    \toks@{}%
    \count@\m@ne
    \expandafter\extract@lastnames\@author\and\and\@nil
    \ifnum\count@<2
    \xdef\@authorhead{\the\@firstname}
    \else\ifnum\count@<4
    \xdef\@authorhead{\the\toks@}%
    \else
    \xdef\@authorhead{\the\@firstlastname\noexpand\textit{ et al.}}%
    \fi\fi
    }%
  \setbox0\hbox{\small\let\thanks\@gobble\@authorhead}%
  \ifdim\wd0>.7\textwidth
  \ClassWarningNoLine{cc}{Authorhead too long. Use
    \protect\authorhead\space to specify\MessageBreak a shortened
    author list for the headings!}%
  \fi
  }
\def\extract@lastnames#1\and#2\@nil{%
  \advance\count@\@ne
  \cc@ifempty{#1}{%
    \expandafter\cc@ifempty\expandafter{\the\toks@}{%
      \edef\@tempa{\the\latest@lastname}%
      }{%
      \edef\@tempa{\the\toks@\authorheadlastsep\the\latest@lastname}%
      }%
    \toks@\expandafter{\@tempa}%
    \let\next\gobble@nil
    }{%
    \expandafter\cc@ifempty\expandafter{\the\toks@}{%
      \edef\@tempa{\the\latest@lastname}%
      }{%
      \edef\@tempa{\the\toks@\authorheadsep\the\latest@lastname}%
      }%
    \toks@\expandafter{\@tempa}%
    \extract@lastname#1\\\@nil
    \let\next\extract@lastnames}%
  \ifnum\count@=\@ne\@firstlastname\expandafter{\the\toks@}\fi
  \next#2\@nil}
\def\gobble@nil#1\@nil{}
\def\extract@lastname#1\\#2\@nil{%
  \ifnum\count@=\z@\@firstname{#1}\fi
  \extract@lastname@#1 \@nil}
\def\extract@lastname@#1 #2\@nil{%
  \cc@ifempty{#2}{\latest@lastname{#1}}{\extract@lastname@#2\@nil}}
%    \end{macrocode}
%  \begin{macro}{\authorheadsep}
%  \begin{macro}{\authorheadlastsep}
%  These two macros are used to seperate authors in the running head.
%    \begin{macrocode}
\def\authorheadsep{, }
\def\authorheadlastsep{ \& }
\def\authorheadlastsepmany{ \& }
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  At the |\begin{document}| the |\@authorhead| is extracted from
%  |\@author|, if no |\authorhead| command was used in the preamble.
%    \begin{macrocode}
\let\@author\relax
\AtBeginDocument{%
  \@ifundefined{@author}{\if@ccpublish
    \ClassError{cc}{No \protect\author\space given}{Define an author
      list in the preamble by \protect\author{...}}%
    \else
    \ClassWarningNoLine{cc}{No \protect\author\space given}%
    \fi}{}
  \@ifundefined{@authorhead}{\extractauthorheadfr@m@author}{}}
%    \end{macrocode}
%  At |\begin{document}| we can also check whether the |\@title|
%  (declared by |\title|) or the |\@titlehead| (declared by
%  |\titlehead|) is not too long.
%    \begin{macrocode}
\let\@title\relax
\AtBeginDocument{%
  \@ifundefined{@title}{\if@ccpublish
    \ClassError{cc}{No \protect\title\space given}{Define a title in
      the preamble by \protect\title{...}}%
    \else
    \ClassWarningNoLine{cc}{No \protect\title\space given}%
    \fi}{}
  \setbox0\hbox{\small\let\thanks\@gobble
    \@ifundefined{@titlehead}{\let\\\ \@title}{\@titlehead}}%
  \ifdim\wd0>.7\textwidth
  \ClassError{cc}{Title too long for running head.\MessageBreak
    Use \protect\titlehead\space to specify\MessageBreak a shortened
      title for the headings!}{}%
  \fi}
%    \end{macrocode}
%  For |\makeendtitle|, the affiliations which were given with the
%  |\author| command to |\@author| must be formatted.  The address
%  blocks are combined in a two column \Lenv{tabular}.
%    \begin{macrocode}
\def\extractaffilsfr@om@author{%
  \parindent\z@
  \init@affils
    \expandafter\extract@affils\@author\and\and\@nil
    \if@oddaffil\else\even@sep\even@post\fi
}
\def\init@affils{%
  \let\and\relax
  \global\@oddaffiltrue
  }
\def\extract@affils#1\and#2\@nil{%
  \cc@ifempty{#1}{\let\next\gobble@nil}{%
    \extract@affil#1\\\@nil
    \let\next\extract@affils}%
  \next#2\@nil}
%    \end{macrocode}
%  Each address is put in a \Lenv{@ffiliation} environment (defined
%  below).  The |\currentaddress| macro is defined with the knowledge
%  of the author name (which is the first line of the address).  Also
%  the author name is typed in small capitals.
%    \begin{macrocode}
\def\extract@affil#1\\#2\@nil{%
  \affilpre
  \def\currentaddress{\otheraddress
    Current address of \textsc{\ignorespaces#1}:\\}%
  \begin{@ffiliation}
    \textsc{\ignorespaces#1}\\#2
  \end{@ffiliation}
  \affilpost}
%    \end{macrocode}
%  \begin{macro}{\otheraddress}
%  \begin{macro}{\affilsep}
%  The macro |\otheraddress| seperates two address blocks for one
%  author.  |\affilsep| simply decides whether to switch to the next
%  column or to a new line in the surrounding \Lenv{tabular}.
% \changes{v2.01}{2001/01/23}{Changed odd affiliation seperator.
%   Michael N{\"{u}}sken, Paderborn}
% \changes{v2.14}{2010/08/03}{Debugged affiliation seperation.
%   Michael N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
\newcommand{\otheraddress}{\end{@ffiliation}\affilsep
  \begin{@ffiliation}}
\def\odd@pre{\par\begin{tabular}{@{}ll@{}}}%
\def\odd@sep{&}%
\def\odd@post{&}%
\def\even@pre{}%
\def\even@sep{\end{tabular}\par\begin{tabular}{@{}ll@{}}}%
\def\even@post{\end{tabular}}%
%
\newif\if@oddaffil
\def\affilpre{\if@oddaffil\odd@pre\else\even@pre\fi}
\def\affilsep{%
  \if@oddaffil\odd@sep\@oddaffilfalse
  \else\even@sep\@oddaffiltrue
  \fi
  }
\def\affilpost{\if@oddaffil\odd@post\global\@oddaffilfalse
  \else\even@post\global\@oddaffiltrue\fi}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \begin{environment}{@ffiliation}
%    The environment \Lenv{@ffiliation} is used for each address
%    block.  It produces a minipage whose lines are set like verse
%    lines:  if a line is too long it continues indented.
% \changes{v2.18}{2011/07/27}{Added onecolumn layout for
%   affiliations. Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\if@twocolumnendtitle
\newenvironment{@ffiliation}
               {%
                 \minipage[t]{.48\hsize}
                 \dimen@\hsize \advance\dimen@ -1.5em
                 \everypar{\parshape 2 \z@ \hsize 1.5em \dimen@}%
                 \def\\{\unskip\par}%
                 }
               {\strut\par\medskip\endminipage}
\else
\def\affilpre{\par}
\def\affilpost{\par}
\def\affilsep{\par}
\newenvironment{@ffiliation}
               {%
                 \minipage[t]{\hsize}\footnotesize
                 \dimen@\hsize \advance\dimen@ -1.5em
                 \everypar{\parshape 2 \z@ \hsize 1.5em \dimen@}%
                 \def\\{\unskip\par}%
                 }
               {\endminipage\bigskip}
\fi
%    \end{macrocode}
%  \end{environment}
%
% \subsection{Page layout}
%
%  The document's text width must be exactly 141~mm; its height must be exactly
%  213~mm from the top of caps in header to the baseline of the bottom line
%  (disregarding descenders like `p' or `g' at the bottom).
%  (Note that this is achieved by setting |\textheight| to 200~mm.)
%  The abstract's width must be 120~mm.
% \changes{v2.01}{2001/02/22}{The text area is only changed if
%   \lclo{cctextarea} is active. Michael N{\"{u}}sken, Paderborn}
% \changes{v2.01}{2001/08/20}{Removed bug: \cs{@abswidth} must always
%   be defined.  Michael N{\"{u}}sken, Paderborn}
%  \changes{v2.11}{2010/06/17}{Deactivate fullpage.sty with
%    ccpublish. Michael N{\"{u}}sken, Bonn}
%  \changes{v2.13}{2010/06/22}{Disabled the file control, instead with
%    ccpublish the compilation will abort with a FATAL ERROR. Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.17b}{2011/07/13}{Repaired case handling. Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.18}{2011/07/26}{Adapted to Springer's ccspsmacros,
%    added modified papersize. Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\ifcase\@textareaversion
% version 0: nocctextarea
\@abstrwidth0.85\textwidth
%
\or% version 1, used until June 2011
\textwidth=141mm
\@abstrwidth=120mm
\textheight=200mm
\topmargin=0mm
\oddsidemargin=12mm
\evensidemargin=12mm
\marginparwidth=25mm
\headheight=1.25\headheight
\ifnum\@marginmode<\z@\@marginmode\z@\fi
%
\or% version 2, used since July 2011
% \special{papersize=155mm,235mm}% Springer's papersize
\paperwidth=155mm
\paperheight=235mm
\topmargin=-9.6mm
% MN2011/07/25 this is from ccspsmacros but should be rethought!!!
% Use \voffset, \hoffset instead..
\textheight=45.5pc
\textwidth=119mm
\@abstrwidth=\textwidth
\oddsidemargin=-7.6mm% should be 18mm, will be calculated acc.to \@marginmode
\evensidemargin=-7.6mm% should be 18mm, will be calculated acc.to \@marginmode
\marginparwidth=10mm% will be adapted below
\headheight=1.25\headheight
\ifnum\@marginmode<\z@\@marginmode\tw@\fi% use balanced margins
%
\else% version negative or larger than max: emptypage
\newdimen\allsidemargin \allsidemargin=.5in
% LARGE width
\textwidth=\paperwidth
\advance\textwidth-2\allsidemargin% margin left/right
\marginparsep=1pt
% LARGE height
\topmargin-1in
\advance\topmargin\allsidemargin
\textheight=\paperheight
\advance\textheight-\allsidemargin
\advance\textheight-\headheight
\advance\textheight-\headsep
\advance\textheight-\footskip
% \advance\textheight-\headheight% assuming as much space for foot as head.
\advance\textheight-\allsidemargin
\@marginmode\tw@
\sloppy
\@abstrwidth0.85\textwidth
\fi
\newdimen\cc@topmargin \cc@topmargin\topmargin
\newdimen\cc@textwidth \cc@textwidth\textwidth 
\newdimen\cc@textheight \cc@textheight\textheight
\AtBeginDocument{%
  {\if@ccpublish
    \@tempswafalse
    \ifnum\@textareaversion>0
       \ifdim\topmargin=\cc@topmargin\relax\else\@tempswatrue\fi
       \ifdim\textwidth=\cc@textwidth\relax\else\@tempswatrue\fi
       \ifdim\textheight=\cc@textheight\relax\else\@tempswatrue\fi
    \fi
    \if@tempswa
      \ClassError{cc}{FATAL ERROR! For publishing in cc the page and text
        dimension must not be manipulated. Remove any packages that
        modify the text or page dimensions. In particular: remove the
        packages^^J
        fullpage.sty,^^J
        a4wide.sty,^^J
        geometry.sty,^^J
        vmargin.sty,^^J
        typearea.sty}{}%
      \aftergroup\endinput
    \fi
  \fi}%
}
%    \end{macrocode}
%  We fit the margins so that 1~in + |\oddsidemargin| + |\textwidth| +
%  |\evensidemargin| + 1~in = |\paperwidth|.  (Note that the margins
%  are usually measured with an offset of 1~in on each side.)
%  \changes{v2.25c}{2013/10/14}{Removed parenthesis from typeout.}
%    \begin{macrocode}
\typeout{Now adjusting margins: \the\@marginmode.}
\ifcase\@marginmode
% marginmode 0
\AtEndOfClass{%
\oddsidemargin\paperwidth
\advance\oddsidemargin-2in
\advance\oddsidemargin-\textwidth
\advance\oddsidemargin-\evensidemargin}
\or
% marginmode 1
\AtEndOfClass{%
\oddsidemargin\paperwidth
\advance\oddsidemargin-2in
\advance\oddsidemargin-\textwidth
\evensidemargin=5mm
\advance\oddsidemargin-\evensidemargin}
\or
% marginmode 2
\AtEndOfClass{%
\oddsidemargin\paperwidth
\advance\oddsidemargin-2in
\advance\oddsidemargin-\textwidth
\oddsidemargin.5\oddsidemargin
\evensidemargin\oddsidemargin}
\fi
%    \end{macrocode}
%  Finally, the |\marginparwidth| is recalculated so that it does not
%  fall off the paper.
%    \begin{macrocode}
\AtEndOfClass{%
  \marginparwidth1in
  \advance\marginparwidth-5mm
  \advance\marginparwidth-2\marginparsep
  \ifdim\evensidemargin<\oddsidemargin
  \advance\marginparwidth\evensidemargin
  \else
  \advance\marginparwidth\oddsidemargin
  \fi
}
%    \end{macrocode}
% In this document, we have marginmode
% \expandafter\the\csname @marginmode\endcsname{}
% \expandafter\ifcase\csname @marginmode\endcsname
%    (classical margins)
% \or(print margins)
% \or(balanced margins)
% \fi
% which results in the
% following values:
% \begin{center}
%   \makeatletter
%   \def\themm#1{\dimen@5.6233568#1\relax
%     \ifnum\dimen@<0-\dimen@-\dimen@\fi
%     \divide\dimen@ by 16
%     \expandafter\@themmchk\the\dimen@0000\@@@
%     \edef\@tempa{\noexpand\th@mm\the\dimen@}\@tempa}
%   \def\@themmchk#1.#2#3#4#5#6\@@@{\if#5p\else\if#5t\else\ifnum#5>4
%     \advance\dimen@.0005pt\fi\fi\fi}
%   \def\@gobblethree#1#2#3{}
%   \edef\@tempa{\noexpand\def\noexpand\th@mm##1\expandafter
%       \@gobblethree\the\p@}\@tempa{\@gobblerest#1{0}0000mm}
%   \def\@gobblerest#1.#2#3#4#5mm{#1.#2#3#4mm}
% \begin{tabular}[t]{l@{ = }r\VRULE}
%   |\paperwidth| & \themm\paperwidth\\\hline
%   |1in| & 25.400mm\\
%   |\evensidemargin| & \themm\evensidemargin\\
%   |\textwidth| & \themm\textwidth\\
%   |\oddsidemargin| & \themm\oddsidemargin\\
%   |1in| & 25.400mm\\\hline
%   |\marginparsep| & \themm\marginparsep\\
%   |\marginparwidth| & \themm\marginparwidth\\
% \end{tabular}\begin{tabular}[t]{l@{ = }r}
%   |\paperheight| & \themm\paperheight\\\hline
%   |1in| & 25.400mm\\
%   |\topmargin| & \themm\topmargin\\
%   |\headheight| & \themm\headheight\\
%   |\headsep| & \themm\headsep\\
%   |\textheight| & \themm\textheight\\
%   |\footskip| & \themm\footskip\\
%   remainder & 
%   \dimen@\paperheight
%   \advance\dimen@-1in
%   \advance\dimen@-\topmargin
%   \advance\dimen@-\headheight
%   \advance\dimen@-\headsep
%   \advance\dimen@-\textheight
%   \advance\dimen@-\footskip
%   \themm\dimen@
% \end{tabular}
% \end{center}
%
%  \begin{macro}{\ps@cc}
%    The page style \texttt{cc} is defined.   It uses only running
%    heads.  On right (odd) pages, the title is written, on left
%    (even) pages, the author(s) appear.  Further, the page number on
%    the outer side and the journal identification (if |\ccpublish|
%    was used) are printed.  Moreover, a head rule of width
%    |\headrulewidth| is produced.  Note that |\ccpublish| disables
%    this.
%  \changes{v2.21}{2012/05/07}{Added version below helperstrip.
%    Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newskip\headerindent \headerindent=10mm
\newdimen\headrulewidth \headrulewidth.4pt
\def\ps@cc{\let\@mkboth\markboth
     \let\@oddfoot\@empty
     \let\@evenfoot\@empty
     \let\@oddhead\@empty
     \let\@evenhead\@empty
     \if@ccpublish
       \ps@ccfirst
       \def\@oddfoot{%
         \ifKV@ccsps@helperstrip%
           \begin{picture}(0,0)%
             \put(340,3){{\stripbox}}%
             \put(10,-5){{\tiny Produced with: \texttt{\csname ver@cc.cls\endcsname}}}%
           \end{picture}%
         \fi
       }%
       \let\@evenfoot\@oddfoot
     \fi
     \expandafter\def\expandafter\@oddhead\expandafter{\@oddhead
        \vbox{\hbox to\textwidth{\reset@font\strut
         {\small\@cctxt}%
         \hfil
         {\small
           \@ifundefined{@titlehead}{%
             \let\\\ %
             \@title
             }{%
             \@titlehead
             }}%
         \hbox to\headerindent{\hfil\thepage}%
         }%
       \if@ccpublish\else
       \kern2.6\p@
       \hrule\@height\headrulewidth\kern-\headrulewidth
       \kern-2.6\p@
       \fi
       \vskip\z@
       }%
     }%
     \expandafter\def\expandafter\@evenhead\expandafter{\@evenhead
        \vbox{\hbox to\textwidth{\reset@font\strut
         \hbox to\headerindent{\thepage\hfil}%
         {\small\@authorhead}%
         \hfil
         {\small\@cctxt}%
         }%
       \if@ccpublish\else
       \kern2.6\p@
       \hrule\@height\headrulewidth\kern-\headrulewidth
       \kern-2.6\p@
       \fi
       \vskip\z@
       }%
     }%
     }
%    \end{macrocode}
%  \end{macro}
%
%  For some publishing features graphics and colors are used.
%    \begin{macrocode}
\RequirePackage{graphics}[2009/02/05 v1.0o]
\RequirePackage{xcolor}[2007/01/21 v2.11]%
\IfFileExists{Birkh_logo_2010_sps.eps}{%
  \def\birklogo{\bgroup\includegraphics{Birkh_logo_2010_sps.eps}\egroup}
}{%
  \def\birklogo{{\ixpt Birkh{\"{a}}user}}
}
\IfFileExists{dummy_sps.eps}{%
  \def\spslogo{\bgroup\includegraphics{dummy_sps.eps}\egroup}
}{%
  \def\spslogo{{\ixpt Springer Publishing}}
}
%\definecolor{tint}{gray}{0.7}
%    \end{macrocode}
%  
%  \begin{macro}{\ps@ccfirst}
%    The page style \texttt{ccfirst} is provided for typesetting the
%    first page during the publishing process.
%  \changes{v2.21}{2012/05/07}{Added version below helperstrip.
%    Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\def\ps@ccfirst{%
  \def\@oddfoot{%
    \if@ccpublish
      \ifKV@ccsps@revisionstage%
        \begin{picture}(0,0)%
          \put(0,15){{\smash{\raisebox{-2.25pt}{\spslogo}}}}%
        \end{picture}%
      \fi%
      \ifKV@ccsps@sps
      \begin{picture}(0,0)%
        \put(289.5,15){{\birklogo}}%
      \end{picture}%
      \fi
      \ifKV@ccsps@helperstrip%
      \begin{picture}(0,0)%
        \put(340,3){{\stripbox}}%
        \put(10,-5){{\tiny Produced with: \texttt{\csname ver@cc.cls\endcsname}}}%
      \end{picture}%
      \fi
    \fi}%
  \let\@evenfoot\@oddfoot
  \def\@oddhead{%
    \ifKV@ccsps@grid
      \hbox to\z@{%
        \vbox to\z@{%
          \hsize\twidth
          \vskip\headsep
          \fboxrule=.25pt
          \fboxsep=-.25pt
          \textcolor{lightgray}{%
             \fbox{\vbox to\theight{\hbox to\twidth{\hss}\vss}}%
          }%
          \vss
      }%
      \hss
    }%
    \fi
    \hss
  }%
  \let\@evenhead\@oddhead
}
%    \end{macrocode}
%  \end{macro}
%  Select \cc's page style at the end of the class.
%    \begin{macrocode}
\AtEndOfClass{\pagestyle{cc}}
%    \end{macrocode}
%
%  If \Lclo{noautotitle} was not used, first and last page are
%  generated automatically.
%  \changes{v2.00}{2000/03/21}{Repairing \cs{cite} in \cs{Abstract}
%    with option \protect\Lclo{natbib}. \cs{maketitle} must be
%    executed only after \protect\Lpackage{natbib}'s
%    \cs{AtBeginDocument} commands have been done.}
%  \changes{v2.00}{2000/06/21}{Dirty trick.  \cs{maketitle} must be
%    called after all other things \cs{AtBeginDocument} (especially
%    after those inserted by \protect\Lpackage{natbib}) in order to
%    handle citations correctly.  This is done via \cs{@onlypreamble}
%    that disables the first token of its argument and executes the
%    rest;  this disabling and execution happen after executing all
%    \cs{AtBeginDocument} commands in \cs{begin}\texttt{\{document\}}.}
%    \begin{macrocode}
\AtEndOfClass{%
  \AtBeginDocument{\@onlypreamble{\author{\if@autotitle\maketitle\fi}}}
%  \AtBeginDocument{\if@autotitle\maketitle\fi}
  \AtEndDocument{\if@autotitle\makeendtitle\fi}
}
%    \end{macrocode}
%
% \begin{macro}{\stripbox}
%   The macro \cs{stripbox} produces a box with information for the
%   publishing service.  This is put in the foot of every page during
%   the revisionstage, see \cs{ccsps}.
%   \begin{macrocode}
\def\stripbox{\kern -11.7cm%
  {}{%
    \raisebox{.8mm}{%
      \tiny
      \fboxsep1mm\framebox{%
        Journal: {\bf \@journalname}\enspace
        Article No.: {\bf \@DOImsnr}\enspace
        \fboxsep.2mm\fbox{%
          \ifx Y\TYPESET{$\checkmark$}\else{\phantom{$\checkmark$}}\fi
        }~TYPESET\enspace
        \fbox{%
          \ifx Y\DISK{$\checkmark$}\else{\phantom{$\checkmark$}}\fi
        }~DISK\enspace
        \fbox{%
          \ifx Y\LE{$\checkmark$}\else{\phantom{$\checkmark$}}\fi
        }~LE\enspace
        \fbox{%
          \ifx Y\CP{$\checkmark$}\else{\phantom{$\checkmark$}}\fi
        }~CP\enspace
        Disp.: \textbf{\the\year/\the\month/\the\day}\enspace
        Pages: \textbf{\@ccnumberofpages}
      }%
    }%
  }%
} %%
%   \end{macrocode}
% \end{macro}
%
%  \begin{macro}{\maketitle}
%    |\maketitle| generates the first page.  It also produces errors
%    or warnings if abstract, keywords, or subject are missing.
%  \changes{v2.02}{2001/08/29}{Changed Abstract to quote. MN, Paderborn}
%  \changes{v2.03}{2005/08/27}{Changed Abstract to @abstr. MN, Bonn}
%  \changes{v2.04}{2006/03/06}{Changed maketitle to allow for very
%    long abstracts, MN, Bonn}
%  \changes{v2.04}{2006/03/08}{Adapted maketitle due to hyperref, MN, Bonn}
%  \changes{v2.08}{2008/04/25}{Bug repair: Added \cs{protect} to
%    \cs{ClassWarningNoLine} calls in \cs{maketitle}, Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.17}{2011/07/07}{Adapted \maketitle to new textarea and
%    modified firstpage headline \cs{maketitle}, Michael N{\"{u}}sken,
%    Bonn}
%  \changes{v2.17c}{2011/07/15}{Moved \cs{thispagestyle} to an earlier
%    point so it always applies to the first page (even when the
%    abstract is very long), Michael N{\"{u}}sken, Bonn}
%  \changes{v2.18}{2011/07/25}{Adapted \maketitle to Springer's
%    version, Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\def\vertrulea{\rule[-7.583pt]{0pt}{7.583pt}}
\def\vertruleb{\rule{2.25pt}{10.2pt}}
\newtoks\cite@hook
\newcommand{\maketitleheadA}{% version before 2011 (Birkhäuser)
    \hbox to\textwidth{%
      \vbox to\z@{\vss
        \baselineskip=12pt%
        \halign{\ixpt##\hfil\cr
          comput. complex.~\textbf{\@ccvolume}~(\@ccyear),
          \thepage\ -- \@cclast\cr
          \issn/\expandafter\@gobbletwo\@ccyear%
%          % use + instead --?
          /\cc@fixelen20\@ccissue\relax
          \cc@fixelen40\@ccfirst\relax
          --\@ccnumberofpages\ 
          \$ 1.50+0.20/0\cr}}\hss
      \vbox to\z@{\vss
        \offinterlineskip%
        \halign{##&##\hfil\cr
          \vertrulea&\ixpt
          \copyright{} Birkh{\"{a}}user Verlag, Basel \@ccyear\cr
          \noalign{\hrule}
          \vertruleb\hskip1mm&%
          \vbox to\z@{\vbox to\z@{\vss
              \hbox{\xptsfbx computational complexity}}\vss}%
          \cr}}}\vskip47.333pt
}
\newcommand{\maketitleheadSPS}{% version since 2011 (Springer)
  \hbox to\textwidth{%
    \vbox to\z@{\vss
      \baselineskip=12pt%
      \halign{%
        \ixpt##\hfil\cr
        comput. complex.%
        \ifKV@ccsps@issuestage%
        ~\textbf{\@ccvolume}~(\@ccyear),~\@ccfirst\ -- \@cclast
        \fi\cr
        \ifKV@ccsps@openaccess
        \copyright{} \@copyholdername\ \@ccyear. 
        This article is published\cr with open access
        at Springerlink.com\cr
        \else\copyright{} \@copyholdername\ \@ccyear\cr\fi
        \ifKV@ccsps@issuestage
        {\printed@issn/\cc@fixelen20\@coveryear/%
          \cc@fixelen20\@ccissue%
          \cc@fixelen40\@ccfirst%
          -% MN2011/07/27: use + instead?
          \@ccnumberofpages}\cr
        {{\it published online}\ \@onlinedate}\cr
        \else\relax\fi
        DOI \@doiinfo\cr}
    }\hss
    \vbox to\z@{\vss
      \offinterlineskip%
      \halign{##&##\hfil\cr
        \vertrulea&\ixpt\cr
        \noalign{\hrule}
        \vertruleb\hskip1mm&%
        \vbox to\z@{\vbox to\z@{\vss
            \hbox{\xptsfbx computational complexity}}\vss}%
        \cr}}}\vskip47.333pt
}
\def\l@title#1#2{}% Usually ignore title entries.
\def\@@today{\today}% for comparison
\renewcommand{\maketitle}{%
  \global\@topnum\z@   % Prevents figures from going at top of page.
  \cite@hook{}%
  \thispagestyle{ccfirst}
  \if@cchead
  \ifnum\@textareaversion=\tw@\vspace*{15pt}\fi
  \vbox to\z@{\vss
    \setcounter{page}{\@ccfirst}%
    \ifcase\@textareaversion\maketitleheadSPS
    \or\maketitleheadA
    \or\maketitleheadSPS
    \else\maketitleheadSPS
    \fi
    }%
  \fi
  \hrule\@height\z@
  \vskip2.2ex% 4.0mm
  \relax
  \begin{center}
    \if@ccpublish
      \renewcommand{\footnote}[1]{\protect\ClassWarningNoLine{cc}{%
          There are no footnotes allowed in title or author.\MessageBreak
          Your command is ignored.\MessageBreak
          Think about moving your remark to the acknowledgements}}%
      \let\thanks\footnote
    \else
      \renewcommand{\footnote}[1]{\protect\ClassWarningNoLine{cc}{%
          In title or author \string\footnote\space does not work.\MessageBreak
          Avoid footnotes or use \string\thanks}}%
      \def\thefootnote{\@fnsymbol\c@footnote}%
      \def\@makefnmark{%
        \rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
      \long\def\@makefntext##1{\parindent 1em\noindent
        \hb@xt@1.8em{%
          \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \fi
    {%
      \Large\bfseries
      \def\\{\penalty-\@M}%
      \expandafter\MakeUppercase\expandafter{\@title}%
      \addcontentsline{toc}{title}{\@title}%
      \par
      }%
    \@ifundefined{@subtitle}{}{{%
        \large\itshape
        \@subtitle
%        %\if!\@subtitle!\relax\else\addcontentsline{toc}{subtitle}{\@subtitle}\fi%
        \par
        }}
    \@ifundefined{@version}{}{{%
        \large\itshape
        \@version
        \par
        }}
    \bigskip
    \vskip1.21ex% 2.2mm
    \vskip\z@
    {%
      \large\scshape
      \extractnamesfr@m@author
      \par
      }%
    \ifKV@ccsps@sps%\if@ccpublish
    \ifx\@date\@@today\else
    \ClassWarningNoLine{cc}{Date ignored! (\@date)}%
    \fi
    \else{%
      \vskip1ex
      \large\@date\par
      }\fi
    \def\@tempa{\vskip5.5ex\let\@tempa\relax}%
    \ifx\@abstract@macro\@empty
      \if@abstractoptional
      \ClassWarningNoLine{cc}{Missing abstract}%
      \else
      \ClassError{cc}{Missing abstract}
      {Define abstract in the preamble using
        \protect\begin{abstract} ... \protect\end{abstract}.}%
      \fi
    \else
      \@tempa\@abstract@macro\par
    \fi
    \ifx\@keywords@macro\@empty
      \if@keywordsoptional
      \ClassWarningNoLine{cc}{Missing keywords}%
      \else
      \ClassError{cc}{Missing keywords}
      {Define keywords in the preamble using
        \protect\begin{keywords} ... \protect\end{keywords}.}%
      \fi
    \else
      \@tempa\@keywords@macro\par
    \fi
    \ifx\@subject@macro\@empty
      \if@subjectoptional
      \ClassWarningNoLine{cc}{Missing subject classification}%
      \else
      \ClassError{cc}{Missing subject}
      {Define subject in the preamble using
        \protect\begin{subject} ... \protect\end{subject}.}%
      \fi
    \else
      \@tempa\@subject@macro\par
    \fi
    \@thanks
    \ifx\@tempa\relax\vskip3ex\fi
  \end{center}
  \setcounter{footnote}{0}%
  \global\let\maketitle\relax
  \global\let\thanks\@gobble
  \global\let\@thanks\relax
%    \end{macrocode}
%  \changes{v2.01}{2000/07/12}{Some things shall work until
%    \cs{maketitle} and not longer!}
%    \begin{macrocode}
  \global\let\author\@notprerr
  \global\let\title\@notprerr
  \global\let\abstract\@notprerr
  \global\let\Abstract\@notprerr
  \global\let\keywords\@notprerr
  \global\let\subject\@notprerr
  \global\let\titlehead\@notprerr
  \global\let\authorhead\@notprerr
  \global\let\received\@notprerr
  \vskip\z@
  \par\@afterindentfalse\@afterheading
  }
\let\@maketitle\@undefined
\let\and\@undefined
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\makeendtitle}
%    |\makeendtitle| is the counterpart of |\maketitle|, it generates
%    the end of the last page with received date and affiliations.
%    \changes{v2.00}{2000/03/10}{Added \cs{par}.}
%    \changes{v2.01}{2000/08/23}{Added \cs{ManuscriptReceived}.}
%    \begin{macrocode}
\babel\def\ManuscriptReceived{Manuscript received }[%
  german=Manuskript erhalten: ,%
  french=Manuscrit re\c{c}u: ]
\newcommand{\makeendtitle}{%
  \par
  \parindent\z@
  \bigskip
  \@ifundefined{@received}{}{%
    \noindent{\small
      \ManuscriptReceived\@received
      \par}%
    \medskip
    }%
  {\small
    \extractaffilsfr@om@author
    }%
  \gdef\makeendtitle{\ClassWarning{cc}{\protect\makeendtitle\space
      multiply used!}}%
  }
%</cclayout>
%    \end{macrocode}
%  \end{macro}
%
%  \def\filename{cc-cls.sty}
%  \CodelinePrefix{S}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lenv{cc} as a package via
%  |\usepackage{cc-cls}|.
%    \begin{macrocode}
%<*ccsty>
\input{cc.cls}
%</ccsty>
%    \end{macrocode}
%
%  \GetFileInfo{relabel.sty}
%  \CodelinePrefix{R}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*relabel>
%    \end{macrocode}
% \iffalse meta-comment
%% Copyright (C) 1998 Michael N\"{u}sken, all rights reserved.
%
% Copyright 1996 Michael N\"{u}sken.
% All rights reserved. For further copyright information see the file
% legal.txt, and any other copyright indicated in this file.
% 
%  This system is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
% 
% IMPORTANT NOTICE:
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file.
% 
% You are NOT ALLOWED to take money for the distribution or use of
% either this file or a changed version, except for a nominal charge
% for copying etc.
% \fi
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{relabel}[2014/07/08 v1.02 Relabel. MNuesken]
%    \end{macrocode}
%
%  We declare some options.  \Lclo{prefixes} and \Lclo{noprefixes} turn
%  the effects of this packages on or off.  \Lclo{bare} and
%  \Lclo{nobare} turn the additional |\bare\ref|erences on or off.
%  \changes{v1.02}{2014/07/08}{Process options in calling order
%    rather than definition order.  Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newif\if@prefixes
\DeclareOption{prefixes}{\@prefixestrue}
\DeclareOption{noprefixes}{\@prefixesfalse}
\newif\if@bare
\DeclareOption{bare}{\@baretrue}
\DeclareOption{nobare}{\@barefalse}
\ExecuteOptions{prefixes,nobare}
\ProcessOptions*
%    \end{macrocode}
%
% \subsection{Modifyable labelling and counting}
%
%  This new |\Label| command allows you to style the resulting labels
%  on your own.
%    \begin{macrocode}
\newcommand*{\Label}[2]{\modify{#2}\label{#1}\revert}
\newcommand*{\modify}[1]{\@bsphack%
  \global\let\revert@currentlabel\@currentlabel
  \global\let\revert@bare@currentlabel\@bare@currentlabel
  \def\@tempb##1{#1}
  \protected@edef\@currentlabel{\@tempb{\@currentlabel}}%
  \@esphack}
\newcommand*{\revert}{\@bsphack
  \global\let\@currentlabel\revert@currentlabel
  \global\let\@bare@currentlabel\revert@bare@currentlabel
  \@esphack}
\let\revert@currentlabel\relax
\let\revert@bare@currentlabel\relax
\newcommand*{\setcurrentlabel}[1]{%
  \protected@edef\@currentlabel{#1}%
  \let\@bare@currentlabel\@currentlabel}
%    \end{macrocode}
%  Provide some macros to handle prefixes and labels.
%  \begin{macro}{\defprefix}
%    This allows the definition of a prefix for a defined counter.
%    This prefix is attached to each reference to an instance of this
%    counter.  It can also be used for postfixes as follows:
%    |\defprefix{equation}#1{(#1)}| defines a `prefix' for the
%    equation counter which adds a \emph{pair} of parentheses.
%    \begin{macrocode}
\newcommand*{\defprefix}[1]{\if@prefixes
  \def\next{\expandafter\def\csname p\string @#1\endcsname}%
  \else\def\next{\def\next}\fi\next}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\useprefix}
%    Use the prefix.
%    \begin{macrocode}
\newcommand*{\useprefix}[1]{\csname p\string @#1\endcsname}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\uselabel}
%    Use the reference to the \meta{counter} given as first argument.
%    This is intended for use in prefixes to subcounters.
%    \begin{macrocode}
\newcommand*{\uselabel}[1]{\csname p\string @#1\expandafter
  \endcsname\csname the#1\endcsname}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\defprefixcond}
%    Obsolete.
%    \begin{macrocode}
\def\defprefixcond#1#2{\defprefix{#1}{\conduselabel{#2}}}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\Iflabelchanged}
%    Takes two arguments: a \meta{counter} and some \meta{conditional
%    text}.  When referenced the \meta{conditional text} is printed if
%    the \meta{counter} has the same value as at the |\label|
%    command.
%
%    Attention! In the command |\EnumerationInTheorems| in the package
%    \Lclass{ccthm} this had to be replaced by a more sophisticated
%    approach: The basic value had to be the one that produced the
%    heading of the surrounding theorem like environment rather than
%    the actual value of this same counter which can change also if,
%    e.g., an \Lenv{equation} is used.
%    \begin{macrocode}
\newcommand*{\Iflabelchanged}[2]{%
  \protect\protect\protect\@@conduselabel
  {{\protect\csname the#1\endcsname}}%
  {{\csname the#1\endcsname}}%
  {#2}%
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\conduselabel}
%    Obsolete.
%    \begin{macrocode}
\def\conduselabel#1{% obsolete
  \protect\protect\protect\@@conduselabel
  {{\protect\csname the#1\endcsname}}%
  {{\csname the#1\endcsname}}%
  {\csname p\string @#1\endcsname{\csname the#1\endcsname}}%
  }%
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\@@conduselabel}
%    Compare the expanded version of the first two arguments.  If
%    these are not equal or |\longlabeltrue| and not |\shortlabeltrue|
%    then print the third argument.
%    \begin{macrocode}
\def\@@conduselabel#1#2#3{{%
    \let\protect\relax
%     \let\@tempa\relax\let\@tempc\relax\relax\relax
    \edef\@tempa{#1}%
    \edef\@tempc{#2}%
%     \show\@tempa\show\@tempc
    \ifx\@tempa\@tempc\relax\@condlabelfalse\else\@condlabeltrue\fi
    \iflonglabel\@condlabeltrue\fi
    \ifshortlabel\@condlabelfalse\fi
    \if@condlabel #3\fi
    }}
\newif\if@condlabel
\newif\iflonglabel  \longlabelfalse
\newif\ifshortlabel \shortlabelfalse
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\short\ref}
%  \begin{macro}{\whole\ref}
%  \begin{macro}{\quiet\ref}
%    Variing \texttt{\string\ref}'s.  |\short\ref{|\meta{key}|}|
%    always prints a short version, that is omit as much as possible
%    in |\@@conduselabel|.  |\whole\ref{|\meta{key}|}| forces the long
%    version.  |\quiet\ref{|\meta{key}|}| prints nothing (this was
%    once used to enable to analyse the reference structure of a
%    complicated proof).
%    \begin{macrocode}
\def\short\ref#1{{\shortlabeltrue\ref{#1}}}
\def\whole\ref#1{{\longlabeltrue\ref{#1}}}
\def\quiet\ref#1{\vphantom{\ref{#1}}}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \begin{macro}{\refstepcounter}
%    Modify \texttt{\string\refstepcounter} to allow prefixes to be
%    one-parameter macros. (Just added an
%    \texttt{\string\expandafter}, see LaTeX2e doumentation.)
%
%  \changes{v2.03}{2005/08/29}{Added explanation interplay with
%    \Lpackage{hyperref}.}
%    The package \Lpackage{hyperref} replaces |\refstepcounter| with
%    its own definition but calls the previous version.  Therefore it
%    must be loaded \emph{after} this class.  This applies also to any other
%    package that modifies |\refstepcounter| similarly.
%    \begin{macrocode}
\CheckCommand*\refstepcounter[1]{\stepcounter{#1}%
     \protected@edef\@currentlabel
        {\csname p@#1\endcsname\csname the#1\endcsname}%
}
\def\refstepcounter#1{\stepcounter{#1}%
    \protected@edef\@currentlabel
       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
%                   ^^^^^^^^^^^^
    \protected@edef\@bare@currentlabel
       {\csname the#1\endcsname}%
}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\label}
%    Modify \texttt{\string\label} to allow to store also the bare
%    value of the label.
%  \changes{v2.20}{2012/03/01}{Modified bare part to allow
%    \Lpackage{hyperref} to change \cs{label} before we use change it
%    for \cs{bare}.}
%    \begin{macrocode}
\if@bare
\def\relabel@label#1{\ifx\@currentlabel\@bare@currentlabel\else
  {\let\@currentlabel\@bare@currentlabel\relabel@olabel{bare@#1}}%
  \fi\relabel@olabel{#1}}
\def\init@bare{\if@bare\let\relabel@olabel\label\let\label\relabel@label\fi}
\AtBeginDocument{\init@bare}%
\def\bare\ref#1{\@ifundefined{r@bare@#1}{\ref{#1}}{\ref{bare@#1}}}
\else
\def\bare{\PackageWarning{relabel}{\string\bare\space disabled! (Use
    option bare to enable it.)}}
\def\init@bare{}
\fi
\let\@bare@currentlabel\@currentlabel
%    \end{macrocode}
%  \end{macro}
%    \begin{macrocode}
%</relabel>
%    \end{macrocode}
%
%  \GetFileInfo{ccref.sty}
%  \CodelinePrefix{r}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%  \changes{v2.15}{2010/10/21}{Moved this from the main part into a
%    seperate file.}
%    \begin{macrocode}
%<*ccref>
%    \end{macrocode}
%  \begin{macro}{\defprefix}
%    \LaTeX{} already defined the features for nice references, although
%    they were not really used.  The package \Lpackage{relabel} provides
%    some macros to use these features.  Especially, a macro
%    |\defprefix| is defined which allows to define a prefix for the
%    label of a counter:
%    |\defprefix{|\meta{counter}|}|\meta{definition}.
%  \changes{v2.01}{2000/09/15}{Internationalized prefixes.
%    Michael N{\"{u}}sken, Paderborn}
%  \changes{v2.01}{2000/11/28}{Added \cs{chaptername}.
%    Michael N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
\RequirePackage{relabel}[1998/09/07 v1.01]
\let\nref\ref
%    \end{macrocode}
%  \end{macro}
%  We define prefixes for the standard counters.
%    \begin{macrocode}
\babel\def\partname{Part}[german=Teil,french=\protect\@Fpt partie]
\defprefix{part}{\partname~}
\babel\def\chaptername{Chapter}[german=Kapitel,french=Chapitre]
\defprefix{chapter}{\chaptername~}
\babel\def\sectionname{Section}[german=Abschnitt,french=Section]
\defprefix{section}{\sectionname~}
\babel\def\subsectionname{Section}[german=Abschnitt,french=Section]
\defprefix{subsection}{\subsectionname~}
\babel\def\subsubsectionname{Section}[german=Abschnitt,french=Section]
\defprefix{subsubsection}{\subsubsectionname~}
\let\ccorg@appendix\appendix
\babel\def\appendixname{Appendix}[german=Anhang,french=Annexe]
\def\appendix{%
  \defprefix{section}{\appendixname~}%
  \defprefix{subsection}{\appendixname~}%
  \defprefix{subsubsection}{\appendixname~}%
  \ccorg@appendix}
\defprefix{equation}#1{(#1)}
\babel\def\figurename{Figure}[german=Figur,french={\scshape Figure}]
\defprefix{figure}{\figurename~}
\babel\def\tablename{Table}[german=Tafel,french={\scshape Table}]
\defprefix{table}{\tablename~}
\numberallwithin{section}
\AtBeginDocument{\@adjustnumbering}
%</ccref>
%    \end{macrocode}
%
%  \GetFileInfo{thcc.sty}
%  \CodelinePrefix{t}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%  \changes{v0.91}{2000/02/29}{Advanced version to official 2.00}
%  \changes{v2.15b}{2010/10/21}{Pretending that amsthm is loaded makes
%    hyperref do strange things.  Logic adapted.}
%  \changes{v2.15b}{2010/10/26}{Pretending that amsthm is loaded makes
%    hyperref do strange things.  Loading amsthm causes strange
%    errors.  Logic adapted so that either way no harm is done.}
%    \begin{macrocode}
%<*thcc>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{thcc}[2012/06/22 v2.25
         computational complexity, theorem layouts.
         Michael Nuesken, Bonn.]
%    \end{macrocode}
%  We require Frank Mittelbach's \Lpackage{theorem} package.
%    \begin{macrocode}
\RequirePackage{theorem}[1995/11/23 v2.2c]
%   \end{macrocode}
%  The following is actually a really dirty trick.  On the one hand
%  side we pretend that \Lpackage{amsthm} is loaded by defining
%  \cs{ver@amsthm.sty}, which is checked when reading a new package by
%  the LaTeX internal command \cs{@ifl@aded}.  On the other hand side,
%  we tell \Lpackage{hyperref} that it is not loaded by manipulating
%  the LaTeX internal command \cs{@ifpackageloaded} used there.  (If
%  further problems occur we may really run into trouble with this
%  technique.)
%    \begin{macrocode}
\def\cc@forbiddenpackage{2010/10/26 Forbidden by cc.cls/thcc.sty. Not loaded!}
\expandafter\global\expandafter\let\csname ver@amsthm.sty\endcsname\cc@forbiddenpackage
\expandafter\global\expandafter\let\csname ver@apthm.sty\endcsname\cc@forbiddenpackage
\let\orig@ifpackageloaded\@ifpackageloaded
\def\@ifpackageloaded#1{%
  \expandafter\ifx\csname ver@#1.\@pkgextension\endcsname\cc@forbiddenpackage
    \expandafter\@secondoftwo% consider it as not loaded
  \else
    \gdef\cc@reserved{\orig@ifpackageloaded{#1}}\expandafter\cc@reserved%
  \fi}
%    \end{macrocode}
%  The macro |\shortcite| might have been provided by the package
%  \Lpackage{cccite} or predecessors of it.  If not we let it be equal
%  to the normal |\cite|.
%  \changes{v2.07}{2007/01/11}{Added support for manualbibliography.
%    Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\def\activate@shortcite{}
\AtBeginDocument{%
  \@ifpackageloaded{cccite}{%
    \def\activate@shortcite{\let\cite\shortcite}
  }{}%
  \@ifpackageloaded{natbib}{%
    \def\activate@shortcite{%
      \let\cite\citealt
      \let\citet\citealt
      \let\citep\citealp
    }%
  }{}%
  \if@manualbibliography\def\activate@shortcite{}\fi
}
%    \end{macrocode}
%  
%  This is the standard theorem layout for \cc.  The theorem text is
%  typeset slanted, the header terminates with a dot.  Inside the
%  optional argument |\cite| is |\shortcite| which avoids double
%  parentheses.
%  \changes{v2.25}{2012/06/21}{Changed \cs{th@cc} and \cs{th@ccnn} so
%    that more than single line comments are possible. Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.25}{2012/06/27}{Modified spacing. Michael N{\"{u}}sken,
%    Bonn}
%    \begin{macrocode}
\newskip\postthmcmtskip
\postthmcmtskip .5em plus .5em
\def\th@cc{%
  \normalfont\slshape
  \def\@begintheorem##1##2{\item
    [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
  \def\@opargbegintheorem##1##2##3{\item
    [\hskip\labelsep \theorem@headerfont ##1\ ##2]%
    {\normalfont({\activate@shortcite{}##3}).}\hskip\postthmcmtskip}%
  }
%    \end{macrocode}
%  
%  This is the unnumbered theorem layout alike \cc, it only differs
%  from  the standard theorem layout in that the number is not typed
%  (argument 2).
%    \begin{macrocode}
\def\th@ccnn{%
  \normalfont\slshape
  \def\@begintheorem##1##2{\item
    [\hskip\labelsep \theorem@headerfont ##1.]}%
  \def\@opargbegintheorem##1##2##3{\item
    [\hskip\labelsep \theorem@headerfont ##1]%
    {\normalfont({\activate@shortcite{}##3}).}\hskip\postthmcmtskip}%
  }
%    \end{macrocode}
%  
%  This is the unnumbered layout for proofs \cc.  The proof text is
%  typeset upright, the header terminates with a dot and a double
%  blank.
%  \changes{v2.25b}{2013/06/26}{Set \cs{itemindent} in proofs to
%    \cs{labelsep}, so that no negative indention is produced.  You may
%    use \cs{everyproof}{\cs{itemsep}1ex} or similar to have vertical
%    space before in-proof items.}
%    \begin{macrocode}
\newskip\postprfcmtskip
\postprfcmtskip .5em plus 1em
\def\th@ccproof{%
  \normalfont\upshape
  \def\@begintheorem##1##2{\item
    [\hskip\labelsep \theorem@headerfont ##1.\ \ ]%
    \itemindent\labelsep}%
  \def\@opargbegintheorem##1##2##3{\item
    [\hskip\labelsep \theorem@headerfont ##1]%
    {\normalfont({\activate@shortcite{}##3}).}\hskip\postprfcmtskip
    \itemindent\labelsep}%
  }
%    \end{macrocode}
%  
%  This is the standard algorithm layout for \cc.  The algorithm text
%  is typeset upright, the header terminate with a dot.  The optional
%  argument follows the rest terminated with a dot (instead of being
%  in parentheses).
%    \begin{macrocode}
\def\th@ccalgo{%
  \normalfont\upshape
  \def\@begintheorem##1##2{\item
    [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
  \def\@opargbegintheorem##1##2##3{\item
    [\hskip\labelsep \theorem@headerfont ##1\ ##2.] 
    {\normalfont##3.\par}}%
  }
%    \end{macrocode}
%  
%  This is the unnumbered algorithm layout for \cc.  The number is
%  omitted.
%    \begin{macrocode}
\def\th@ccalgonn{%
  \normalfont\upshape
  \def\@begintheorem##1##2{\item
    [\hskip\labelsep \theorem@headerfont ##1.]}%
  \def\@opargbegintheorem##1##2##3{\item
    [\hskip\labelsep \theorem@headerfont ##1.] {\normalfont##3.\par}}%
  }
%    \end{macrocode}
%  The default header font is the caps and small caps font.
%    \begin{macrocode}
\gdef\theorem@headerfont{\scshape}
%</thcc>
%    \end{macrocode}
%
%  \GetFileInfo{ccthm.sty}
%  \CodelinePrefix{T}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*ccthm>
\ProvidesPackage{ccthm}[2014/07/08 v2.25d
  theorem environments for cc.  Michael Nuesken, Bonn.]
%    \end{macrocode}
%
% \subsection{Theorem-like environments}
%
%  Referring to numerated items in theorem usually means that you
%  also need to mention the theorem number.  With
%  \Lclo{theoremitemprefixes} this is automatically done.
%  \changes{v2.25d}{2014/07/08}{Process options in calling order
%    rather than definition order.  Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newif\if@theoremitemprefixes
\DeclareOption{theoremitemprefixes}{\@theoremitemprefixestrue}
\DeclareOption{notheoremitemprefixes}{\@theoremitemprefixesfalse}
\ExecuteOptions{theoremitemprefixes}
\ProcessOptions*
%    \end{macrocode}
%
%  Then, we load the packages for theorems and proofs.
%  \Lpackage{theorem} by Frank Mittelbach provides more flexible ways
%  to define new theorem-like environments.  \Lpackage{thcc} is
%  \cc{}'s add-on to it, five new theorem styles are defined in it:
%  one each for proofs, for unnumbered and  for numbered theorems, for
%  unnumbered and for numbered algorithms.
%    \begin{macrocode}
\RequirePackage{theorem}[1995/11/23 v2.2c]
\RequirePackage{thcc}
\RequirePackage{relabel}
%    \end{macrocode}
%
%  
%  \begin{macro}{\everytheorem}
%    As for proofs, we also introduce a token list |\everytheorem|
%    that will be executed at the beginning of each theorem-like
%    environment.
%    \begin{macrocode}
\newtoks\everytheorem
\everytheorem{}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\EnumerationInTheorems}
%    This macro defines a new labeling scheme to be used inside
%    theorems.  For example, the outer list is numbered with small
%    roman numerals rather than with arabic numerals.  If
%    \Lclo{theoremitemprefixes} is active, the prefixes are manipulated
%    so as to contain the title (and number) of the surrounding
%    theorem-like environment.
%    \begin{macrocode}
\if@theoremitemprefixes
\def\EnumerationInTheorems#1{%
  \let\@thm@currentlabel\@empty
  \let\@thm@bare@currentlabel\@empty
  \let\@@refstepcounter\refstepcounter
  \def\refstepcounter##1{%
    \let\refstepcounter\@@refstepcounter
    \let\@@refstepcounter\@undefined
    \refstepcounter{##1}%
    \let\@thm@currentlabel\@currentlabel
    \protected@edef\@thm@bare@currentlabel{{\csname the##1\endcsname}}%
    }%
  \def\theenumi{\@roman\c@enumi}%
  \def\labelenumi{(\theenumi)}%
  \defprefix{enumi}##1{%
%    \Iflabelchanged{#1}{\uselabel{#1}}%
    \protect\protect\protect\@@conduselabel
    {{\protect\csname the#1\endcsname}}%
    {\@thm@bare@currentlabel}{\@thm@currentlabel}%
    (##1)}%
%  \def\theenumii{\@alph\c@enumii}%
%  \def\labelenumii{(\theenumii)}%
  \defprefix{enumii}##1{%
%    \Iflabelchanged{#1}{\uselabel{#1}}%
    \protect\protect\protect\@@conduselabel
    {{\protect\csname the#1\endcsname}}%
    {\@thm@bare@currentlabel}{\@thm@currentlabel}%
    (\theenumi.##1)}%
  \def\theenumiii{\@arabic\c@enumiii}%
  \def\labelenumiii{(\theenumiii)}%
  \defprefix{enumiii}##1{%
%    \Iflabelchanged{#1}{\uselabel{#1}}%
    \protect\protect\protect\@@conduselabel
    {{\protect\csname the#1\endcsname}}%
    {\@thm@bare@currentlabel}{\@thm@currentlabel}%
    (\theenumi.\theenumii.##1)}%
%  \def\theenumiv{\@Alph\c@enumiv}%
%  \def\labelenumiv{\theenumiv.}%
  \defprefix{enumiv}##1{%
%    \Iflabelchanged{#1}{\uselabel{#1}}%
    \protect\protect\protect\@@conduselabel
    {{\protect\csname the#1\endcsname}}%
    {\@thm@bare@currentlabel}{\@thm@currentlabel}%
    (\theenumi.\theenumii.\theenumiii##1)}%
  }
\else
\def\EnumerationInTheorems#1{%
  \def\theenumi{\@roman\c@enumi}%
  \def\labelenumi{(\theenumi)}%
  \defprefix{enumi}##1{(##1)}%
%  \def\theenumii{\@alph\c@enumii}%
%  \def\labelenumii{(\theenumii)}%
  \defprefix{enumii}##1{(\theenumi.##1)}%
  \def\theenumiii{\@arabic\c@enumiii}%
  \def\labelenumiii{(\theenumiii)}%
  \defprefix{enumiii}##1{(\theenumi.\theenumii.##1)}%
%  \def\theenumiv{\@Alph\c@enumiv}%
%  \def\labelenumiv{\theenumiv.}%
  \defprefix{enumiv}##1{(\theenumi.\theenumii.\theenumiii##1)}%
  }
\fi
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\theorempreamblenn}
%    In order to execute some commands in every theorem, we use
%    |\theorembodyfont| as a hook.  In the present version of
%    \Lpackage{theorem}, we access the theorem counter and the theorem
%    title by the following construction.
%  \changes{v2.24}{2012/06/18}{Bugfix: Dirty hacks to ensure correct
%    theorem, algorithm and equation counting and
%    referencing. MNuesken, Bonn}
%    \begin{macrocode}
\def\reset@prefixrefstepcounter#1{%
  \let\refstepcounter\cc@normal@refstepcounter% Put refstepcounter back to normal
  \refstepcounter{#1}% do normal operation
  \defprefix{equation}##1{(##1)}% reset equation prefix
}
\def\theorempreamblenn\@thm#1#2{%
  \defprefix{#1}##1{#2}%
  \let\cc@normal@refstepcounter\refstepcounter
  \let\refstepcounter\reset@prefixrefstepcounter
  \EnumerationInTheorems{#1}%
  \pagebreak[3]\relax
  \the\everytheorem
  \@thm{#1}{#2}}
%    \end{macrocode}
%  \end{macro}
%  We select the body font and also put our special hook in it.  (We
%  rely on the present implementation of \Lpackage{theorem}!)  And we
%  select the theorem style for non numbered theorems in \cc{}.
%    \begin{macrocode}
\theorem@bodyfont{\theorempreamblenn}
\theoremstyle{ccnn}
%    \end{macrocode}
%  \begin{environment}{namedth@@r@m*}
%  \begin{environment}{namedtheorem*}
%  \begin{environment}{theorem*}
%  \begin{environment}{lemma*}
%  \begin{environment}{corollary*}
%  \begin{environment}{proposition*}
%  \begin{environment}{fact*}
%  \begin{environment}{remark*}
%  \begin{environment}{openquestion*}
%  \begin{environment}{definition*}
%  \begin{environment}{problem*}
%  \begin{environment}{notation*}
%  \begin{environment}{exercise*}
%  \begin{environment}{assumption*}
%  \begin{environment}{open*}
%  \begin{environment}{claim*}
%  \begin{environment}{conjecture*}
%  \begin{environment}{observation*}
%  \begin{environment}{result*}
%  \begin{environment}{note*}
%  \begin{environment}{hypothesis*}
%  \begin{environment}{example*}
%  \begin{environment}{answer*}
%  \begin{environment}{convention*}
%  \begin{environment}{counterexample*}
%  \begin{environment}{question*}
%  \begin{environment}{thesis*}
%  \begin{environment}{warning*}
%    We define lots of non numbered theorem-like environments
%    including \Lenv{namedtheorem*} which allows a user specified
%    theorem heading.
%    \begin{macrocode}
\newtoks\theoremtitle
\newtheorem{namedth@@r@m*}{\the\theoremtitle}
\newenvironment{namedtheorem*}[1]{%
  \theoremtitle{#1}\csname namedth@@r@m*\endcsname}
{\csname endnamedth@@r@m*\endcsname}
\babel\def\Answer{Answer}[german=Antwort,french=Reponse]
\newtheorem{answer*}[namedth@@r@m*]{\Answer}%
\babel\def\Assumption{Assumption}[german=Annahme,french=Assomption]
\newtheorem{assumption*}[namedth@@r@m*]{\Assumption}
\babel\def\Claim{Claim}[german=Behauptung,french=Proposition]
\newtheorem{claim*}[namedth@@r@m*]{\Claim}
\babel\def\Conjecture{Conjecture}[german=Vermutung,french=Conjecture]
\newtheorem{conjecture*}[namedth@@r@m*]{\Conjecture}
\babel\def\Convention{Convention}[german=Vereinbarung,french=Convention]
\newtheorem{convention*}[namedth@@r@m*]{\Convention}%
\babel\def\Corollary{Corollary}[german=Korollar,french=Corollaire]
\newtheorem{corollary*}[namedth@@r@m*]{\Corollary}
\babel\def\Counterexample{Counterexample}[%
  german=Gegenbeispiel,french=Contre-exemple]
\newtheorem{counterexample*}[namedth@@r@m*]{\Counterexample}%
\babel\def\Definition{Definition}[german=Definition,french=D\'efinition]
\newtheorem{definition*}[namedth@@r@m*]{\Definition}
\babel\def\Exercise{Exercise}[german=Aufgabe,french=Exercice]
\newtheorem{exercise*}[namedth@@r@m*]{\Exercise}
\babel\def\Fact{Fact}[german=Fakt,french=Fait]
\newtheorem{fact*}[namedth@@r@m*]{\Fact}
\babel\def\Hypothesis{Hypothesis}[german=Hypothese,french=Hypoth\`ese]
\newtheorem{hypothesis*}[namedth@@r@m*]{\Hypothesis}
\babel\def\Lemma{Lemma}[german=Lemma,french=Lemme]
\newtheorem{lemma*}[namedth@@r@m*]{\Lemma}
\babel\def\Notation{Notation}[german=Notation,french=Notation]
\newtheorem{notation*}[namedth@@r@m*]{\Notation}
\babel\def\Note{Note}[german=Notiz,french=Note]
\newtheorem{note*}[namedth@@r@m*]{\Note}
\babel\def\Observation{Observation}[%
  german=Beobachtung,french=Observation]
\newtheorem{observation*}[namedth@@r@m*]{\Observation}
\babel\def\OpenQuestion{Open Question}[%
  german=Offene Frage,french=Question ouverte]
\newtheorem{open*}[namedth@@r@m*]{\OpenQuestion}
\newtheorem{openquestion*}[namedth@@r@m*]{\OpenQuestion}
\babel\def\Problem{Problem}[german=Problem,french=Probl\`eme]
\newtheorem{problem*}[namedth@@r@m*]{\Problem}
\babel\def\Proposition{Proposition}[%
  german=Behauptung,french=Proposition]
\newtheorem{proposition*}[namedth@@r@m*]{\Proposition}
\babel\def\Question{Question}[german=Frage,french=Question]
\newtheorem{question*}[namedth@@r@m*]{\Question}%
\babel\def\Remark{Remark}[german=Bemerkung,french=Remarque]
\newtheorem{remark*}[namedth@@r@m*]{\Remark}
\babel\def\Result{Result}[german=Ergebnis,french=R\'esultat]
\newtheorem{result*}[namedth@@r@m*]{\Result}
\babel\def\Theorem{Theorem}[german=Satz,french=Th\'eor\`eme]
\newtheorem{theorem*}[namedth@@r@m*]{\Theorem}
\babel\def\Thesis{Thesis}[german=These,french=Th\`ese]
\newtheorem{thesis*}[namedth@@r@m*]{\Thesis}%
\babel\def\Warning{Warning}[german=Warnung,french=Alerte]
\newtheorem{warning*}[namedth@@r@m*]{\Warning}%
%\newtheorem{example*}[namedth@@r@m*]{Example}%
\babel\def\Example{Example}[german=Beispiel,french=Exemple]
\newenvironment{example*}[1][]{%
  \cc@ifempty{#1}
  {\csname namedtheorem*\endcsname{\Example}}%
  {\csname namedtheorem*\endcsname{\Example}[#1]}%
  \upshape
  \let\qedsymbol\eoesymbol
  }
{\qed\csname endnamedtheorem*\endcsname}
%    \end{macrocode}
%    Note that examples have an end of example mark.
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \begin{macro}{\theorempreamble}
%    For numbered theorems, we modify the above slighlty.
%    \begin{macrocode}
\def\theorempreamble\@thm#1#2{%
  \defprefix{#1}##1{#2~##1}%
  \let\cc@normal@refstepcounter\refstepcounter
  \let\refstepcounter\reset@prefixrefstepcounter
  \EnumerationInTheorems{#1}%
  \pagebreak[3]\relax
  \the\everytheorem
  \@thm{#1}{#2}}
\theorem@bodyfont{\theorempreamble}
\theoremstyle{cc}
%    \end{macrocode}
%  \end{macro}
%  \begin{environment}{namedth@@r@m}
%  \begin{environment}{namedtheorem}
%  \begin{environment}{theorem}
%  \begin{environment}{lemma}
%  \begin{environment}{corollary}
%  \begin{environment}{proposition}
%  \begin{environment}{fact}
%  \begin{environment}{remark}
%  \begin{environment}{openquestion}
%  \begin{environment}{definition}
%  \begin{environment}{problem}
%  \begin{environment}{notation}
%  \begin{environment}{exercise}
%  \begin{environment}{assumption}
%  \begin{environment}{open}
%  \begin{environment}{claim}
%  \begin{environment}{conjecture}
%  \begin{environment}{observation}
%  \begin{environment}{result}
%  \begin{environment}{note}
%  \begin{environment}{hypothesis}
%  \begin{environment}{example}
%  \begin{environment}{answer}
%  \begin{environment}{convention}
%  \begin{environment}{counterexample}
%  \begin{environment}{question}
%  \begin{environment}{thesis}
%  \begin{environment}{warning}
%    Next we define the numbered (unstarred) versions of the theorem
%    like environments.
%  \changes{v2.01}{2000/06/28}{Added handling for cctheorems+separatelycounted.
%    Michael N{\"{u}}sken, Paderborn.}
%  \changes{v2.01}{2001/03/12}{Added handling optional arguments for
%    \lenv{example} and \lenv{example*}.  Michael N{\"{u}}sken, Paderborn.}
%  \changes{v2.23}{2012/05/22}{For compatibility with
%    \lpackage{hyperref.sty}: Changed handling of using equation counter
%    for theorems (\lclo{separateequationcounting},
%    \lclo{noseparateequationcounting}).
%    Michael N{\"{u}}sken, Bonn.}
%    \begin{macrocode}
\if@ccnosepeqncnt
%%% \let\c@namedth@@r@m\c@equation
%%% \def\thenamedth@@r@m{\theequation}
\def\cc@thmcnter{equation}
\newtheorem{namedth@@r@m}[\cc@thmcnter]{\the\theoremtitle}
\else
\newtheorem{namedth@@r@m}{\the\theoremtitle}
\def\cc@thmcnter{namedth@@r@m}
\fi
\newenvironment{namedtheorem}[1]
  {\theoremtitle{#1}\namedth@@r@m}
  {\endnamedth@@r@m}
\if@standardtheorems
\newtheorem{answer}[\cc@thmcnter]{\Answer}
\newtheorem{assumption}[\cc@thmcnter]{\Assumption}
\newtheorem{claim}[\cc@thmcnter]{\Claim}
\newtheorem{conjecture}[\cc@thmcnter]{\Conjecture}
\newtheorem{convention}[\cc@thmcnter]{\Convention}
\newtheorem{corollary}[\cc@thmcnter]{\Corollary}
\newtheorem{counterexample}[\cc@thmcnter]{\Counterexample}
\newtheorem{definition}[\cc@thmcnter]{\Definition}
\newtheorem{exercise}[\cc@thmcnter]{\Exercise}
\newtheorem{fact}[\cc@thmcnter]{\Fact}
\newtheorem{hypothesis}[\cc@thmcnter]{\Hypothesis}
\newtheorem{lemma}[\cc@thmcnter]{\Lemma}
\newtheorem{notation}[\cc@thmcnter]{\Notation}
\newtheorem{note}[\cc@thmcnter]{\Note}
\newtheorem{observation}[\cc@thmcnter]{\Observation}
\newtheorem{open}[\cc@thmcnter]{\OpenQuestion}
\newtheorem{openquestion}[\cc@thmcnter]{\OpenQuestion}
\newtheorem{problem}[\cc@thmcnter]{\Problem}
\newtheorem{proposition}[\cc@thmcnter]{\Proposition}
\newtheorem{question}[\cc@thmcnter]{\Question}
\newtheorem{remark}[\cc@thmcnter]{\Remark}
\newtheorem{result}[\cc@thmcnter]{\Result}
\newtheorem{theorem}[\cc@thmcnter]{\Theorem}
\newtheorem{thesis}[\cc@thmcnter]{\Thesis}
\newtheorem{warning}[\cc@thmcnter]{\Warning}
\newenvironment{example}[1][]{%
  \cc@ifempty{#1}
  {\namedtheorem{\Example}}%
  {\namedtheorem{\Example}[#1]}%
  \upshape
  \let\qedsymbol\eoesymbol
  }
{\qed\endnamedtheorem}
\else
\newtheorem{answer}{\Answer}
\newtheorem{assumption}{\Assumption}
\newtheorem{claim}{\Claim}
\newtheorem{conjecture}{\Conjecture}
\newtheorem{convention}{\Convention}
\newtheorem{corollary}{\Corollary}
\newtheorem{counterexample}{\Counterexample}
\newtheorem{definition}{\Definition}
\newtheorem{exercise}{\Exercise}
\newtheorem{fact}{\Fact}
\newtheorem{hypothesis}{\Hypothesis}
\newtheorem{lemma}{\Lemma}
\newtheorem{notation}{\Notation}
\newtheorem{note}{\Note}
\newtheorem{observation}{\Observation}
\newtheorem{open}{\OpenQuestion}
\newtheorem{openquestion}{\OpenQuestion}
\newtheorem{problem}{\Problem}
\newtheorem{proposition}{\Proposition}
\newtheorem{question}{\Question}
\newtheorem{remark}{\Remark}
\newtheorem{result}{\Result}
\newtheorem{theorem}{\Theorem}
\newtheorem{thesis}{\Thesis}
\newtheorem{warning}{\Warning}
\newtheorem{exampleexample}{\Example}
\newenvironment{example}{%
  \exampleexample%
  \upshape
  \let\qedsymbol\eoesymbol
  }
{\qed\endexampleexample}
\fi
%    \end{macrocode}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  \end{environment}
%  
%  \begin{environment}{continued}
%  \begin{environment}{contexample}
%    These two environments are intended to be used for continuation
%    of previous theorems or examples.  Note that examples need a
%    different treatment since they have an end of example mark.
%    \begin{macrocode}
\babel\def\ccContinued{continued}[%
  german=fortgesetzt,french=continu\'e(e)]
\newenvironment{continued}[1]{%
  \csname namedtheorem*\endcsname{\ref{#1} \ccContinued}%
  }{\csname endnamedtheorem*\endcsname}
\newenvironment{contexample}[1]{%
  \csname namedtheorem*\endcsname{\ref{#1} \ccContinued}%
  \upshape
  \let\qedsymbol\eoesymbol
  }
{\qed\csname endnamedtheorem*\endcsname}
%    \end{macrocode}
%  \end{environment}
%  \end{environment}
%  
%  \begin{macro}{\eoesymbol}
%    We initialize the end of example mark as a |\lozenge| ($\lozenge$).
%    \begin{macrocode}
\newcommand{\eoesymbol}{\lozenge}
%    \end{macrocode}
%  \end{macro}
%    \begin{macrocode}
%</ccthm>
%    \end{macrocode}
%
%  \GetFileInfo{ccproof.sty}
%  \CodelinePrefix{P}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*ccproof>
\ProvidesPackage{ccproof}[2000/02/29 v2.05
  proof environments for cc.  Michael Nuesken, Bonn.]
%    \end{macrocode}
%
%  We rely on F.~Mittelbach's \Lpackage{theorem} style plus the
%  corresponding layout for \cc.
%    \begin{macrocode}
\RequirePackage{theorem}[1995/11/23 v2.2c]
\RequirePackage{thcc}
%    \end{macrocode}
%
% \subsection{End of proof marks and \cs{qed}}
%
%  The package \Lpackage{ccqed}, which is based on \Lpackage{QED} by
%  Paul Taylor, defines a macro |\pushright| which pushes its argument
%  to the right margin.  (Note that this is problematic since it can
%  happen, that the argument does not fit on the present line but
%  still it should be at the right margin and not on the next page.)
%  If you use |\qed| outside proofs or theorem-like environments,
%  nothing happens.  |\Qed| works then, too.  (Although, you crash any
%  structure when using it!)
%    \begin{macrocode}
\RequirePackage{ccqed}
\newcommand{\Qed}{\@qedtrue\qed}%
%    \end{macrocode}
%
% \subsection{Proof environments}
%
%  \begin{macro}{\everyproof}
%    First, we introduce a token list which will be evaluated each
%    time a proof is typed.
%    \begin{macrocode}
\newtoks\everyproof \everyproof{}
%    \end{macrocode}
%  \end{macro}
%  \begin{environment}{namedproof}
%    Surprisingly, we define the environment \Lenv{namedproof} as a
%    theorem-like environment.  So we select the appropriate theorem
%    style and the desired font for its body.
%    \begin{macrocode}
\theoremstyle{ccproof}
\theorembodyfont{}
%    \end{macrocode}
%  \begin{environment}{pr@@f}
%    Then we define an intermediate theorem-like environment
%    \Lenv{pr@@f} which has a variable title.
%    \begin{macrocode}
\newtoks\prooftitle
\newtheorem{pr@@f}{\the\prooftitle}
%    \end{macrocode}
%  \end{environment}
%    This is now used to define the \Lenv{namedproof} environment, which
%    sets the title, the end of proof mark, executes |\everyproof|,
%    and produces the end of proof mark using |\qed|.  (Note that the
%    macro |\qed| can be used in the proof, then at the end no second
%    end of proof mark is produced.)
%    \begin{macrocode}
\newenvironment{namedproof}[2][\qedsymbol]{%
  \save@set@qed
  \prooftitle{#2}%
  \def\@tempa{#1}%
  \def\@tempc{\qedsymbol}%
  \ifx\@tempa\@tempc\relax\else\let\qedsymbol\@tempa\fi%
  \the\everyproof \pr@@f
  }{%
  \qed\restore@qed
  \endpr@@f}
%    \end{macrocode}
%  \end{environment}
%  \begin{environment}{proof}
%    The environment \Lenv{proof} is just a specialization of the
%    \Lenv{namedproof} environment.
%    \begin{macrocode}
\babel\def\Proof{Proof}[german=Beweis,french=Preuve]
\newenvironment{proof}{\namedproof{\Proof}}{\endnamedproof}
%    \end{macrocode}
%  \end{environment}
%    \begin{macrocode}
%</ccproof>
%    \end{macrocode}
%
%  \GetFileInfo{ccalgo.sty}
%  \CodelinePrefix{A}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*ccalgo>
%    \end{macrocode}
% \changes{v0.90}{1999/11/15}{Beta version. Michael N{\"{u}}sken, Paderborn}
%
%  This package can only be used with \LaTeXe, so we make sure that an
%  appropriate message is displayed when another \TeX{} format is
%  used.
%
%  Announce the package and its version:
%  \changes{v0.91}{2000/02/29}{Advanced version to official 2.00}
%  \changes{v2.10}{2010/05/11}{Redesign. Now at any time item with
%  text label and hanging indentation are possible as used for input
%  and output: \cs{item}[itemtitle] does it.}
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ccalgo}[2012/06/22 v2.25
  algorithm environment for cc.  Michael Nuesken, Bonn.]
%    \end{macrocode}
%  Next we undefine some macros in case of overloading.
%    \begin{macrocode}
\let\namedalgorithm\@undefined
\let\endnamedalgorithm\@undefined
\let\algorithm\@undefined
\let\endalgorithm\@undefined
%    \end{macrocode}
%  
%  For a dirty trick below we rely on the specific implementation of
%  |\@item|.  Thus we verify it!
%    \begin{macrocode}
{\def\algonumerate@item[#1]{%
  \if@noparitem
    \@donoparitem
  \else
    \if@inlabel
      \indent \par
    \fi
    \ifhmode
      \unskip\unskip \par
    \fi
    \if@newlist
      \if@nobreak
        \@nbitem
      \else
        \addpenalty\@beginparpenalty
        \addvspace\@topsep
        \addvspace{-\parskip}%
      \fi
    \else
      \addpenalty\@itempenalty
      \addvspace\itemsep
    \fi
    \global\@inlabeltrue
  \fi
  \everypar{%
    \@minipagefalse
    \global\@newlistfalse
    \if@inlabel
      \global\@inlabelfalse
      {\setbox\z@\lastbox
       \ifvoid\z@
         \kern-\itemindent
       \fi}%
      \box\@labels
      \penalty\z@
    \fi
    \if@nobreak
      \@nobreakfalse
      \clubpenalty \@M
    \else
      \clubpenalty \@clubpenalty
      \everypar{}%
    \fi}%
  \if@noitemarg
    \@noitemargfalse
    \if@nmbrlist
      \refstepcounter\@listctr
    \fi
  \fi
  \sbox\@tempboxa{\makelabel{#1}}%
%    \end{macrocode}
%  We require that |\global| follows this |\makelabel| to insert a
%  hook.  Moreover we use that the produced label is put in
%  \cs{@tempboxa} to reinitialize the paragraph indention in
%  \cs{reinit@list@label}.
%    \begin{macrocode}
  \global\setbox\@labels\hbox{%
    \unhbox\@labels
    \hskip \itemindent
    \hskip -\labelwidth
    \hskip -\labelsep
    \ifdim \wd\@tempboxa >\labelwidth
      \box\@tempboxa
    \else
      \hbox to\labelwidth {\unhbox\@tempboxa}%
    \fi
    \hskip \labelsep}%
  \ignorespaces}
\ifx\algonumerate@item\@item\else
\PackageWarningNoLine{ccalgo}{%
  Command \protect\@item\space  has changed.\MessageBreak
  Check if current package is valid}
\fi}
%    \end{macrocode}
%  We load Frank Mittelbach's theorem style, \cc's add-on and the
%  \Lpackage{relabel} package.  (The latter is for adding prefixes to
%  labels and thelike.)
%  \changes{v2.05}{2010/01/25}{Requiring ccaux now.}
%    \begin{macrocode}
\RequirePackage{ccaux}
\RequirePackage{theorem}[1995/11/23 v2.2c]
\RequirePackage{thcc}
\RequirePackage{relabel}
%    \end{macrocode}
%
%  This macro restores the parshape of the current list.
%    \begin{macrocode}
\def\list@parshape{%
%  \typeout{parshape 1 \the\@totalleftmargin+\the\linewidth}%
  \parshape \@ne \@totalleftmargin \linewidth}
%    \end{macrocode}
%  Reinitializing the list means to readjust the left margin while
%  leaving the position of the list's labels fixed.
%    \begin{macrocode}
\newdimen\reinit@list@last
\def\reinit@list#1{%
%   \dimen@i#1\relax
%   \typeout{Reinit: old \the\reinit@list@last, new \the\dimen@i}%%% DEBUG
  \advance\itemindent\reinit@list@last
  \advance\@totalleftmargin-\reinit@list@last
  \advance\linewidth\reinit@list@last
  \global\reinit@list@last#1\relax
  \ifdim\reinit@list@last>\algonumerate@maxindent
  \global\reinit@list@last\algonumerate@maxindent\fi
  \advance\itemindent-\reinit@list@last
  \advance\@totalleftmargin\reinit@list@last
  \advance\linewidth-\reinit@list@last
%  \typeout{\the\@totalleftmargin + \the\linewidth}%
  \list@parshape}
%    \end{macrocode}
%  Often reinitialization is needed with respect to the label's
%  width.
%    \begin{macrocode}
\def\reinit@list@label{%
  \reinit@list{\wd\@tempboxa}%
  }
%    \end{macrocode}
%  \begin{macro}{\makealgolabel}
%    The standard format of the labels is the number followed by a dot.
%    \begin{macrocode}
\newcommand{\makealgolabel}[1]{#1.}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\makeoptalgolabel}
%    A special label is surrounded by parentheses.
%    \begin{macrocode}
\newcommand{\makeoptalgolabel}[1]{(#1)}
%    \end{macrocode}
%  \end{macro}
%  
%  \begin{macro}{\makeoptalgocurrentlabel}
%    This macro is used to produce the |\bare| reference form for a
%    special label.
%    \begin{macrocode}
\let\makeoptalgocurrentlabel\makeoptalgolabel
%    \end{macrocode}
%  \end{macro}
%
%  \subsection{The \Lenv{algonumerate} environment}
%
%  This environment is the basis of the algorithm environment.   It
%  allows some items with names (as |Input|, |Output|) which have a
%  special indention.  These named and the following numbered items
%  are separated by a |\medskip|.
%
%  We need a counter.  By default we do not use a prefix.
%    \begin{macrocode}
\newcounter{algonumerate}
\defprefix{algonumerate}{}
%    \end{macrocode}
%  This count holds the number of named items.
%    \begin{macrocode}
\newcount\algonumerate@items
%    \end{macrocode}
%  Formatting the counter.
%    \begin{macrocode}
\renewcommand{\thealgonumerate}{%
  \expandafter\ifnum\value{algonumerate}<\@ne
  \algonumfield%
  \else
  \arabic{algonumerate}\fi}%
%    \end{macrocode}
%  This macro returns the name corresponding to the counter
%  |algonumerate|.   The macro |\@algonumfield| should be
%  defined using |\ifcase-#1| \dots{} |\fi|  and return the
%  corresponding name.  This is done be |\algonumerateinit|, see
%  below.
%    \begin{macrocode}
\def\algonumfield{\ignorespaces
  \ifx\@algonumfield\relax\else
  \expandafter\@algonumfield\csname c@algonumerate\endcsname\fi
  \unskip}
%    \end{macrocode}
%  A toggle to distinguish special labels and numbered labels.
%    \begin{macrocode}
\newif\if@speciallabel
%    \end{macrocode}
%  This macro produces the labels in all cases.
%  \changes{v2.10}{2010/05/11}{Redesign.}
%    \begin{macrocode}
\newcommand{\labelalgonumerate}{%
  \count@\value{algonumerate}%
  \ifnum\count@<\z@
  \algonumfield%
  \else
  \makealgolabel{\thealgonumerate}%
  \fi
  }%
%    \end{macrocode}
%  These two dimensions define the width of a label and its distance
%  to the text.
%    \begin{macrocode}
\newdimen\algo@labelsep
\newdimen\steplabelwidth
%    \end{macrocode}
%  This token list is executed at the next |\item|.
%  \changes{v2.13}{2010/05/29}{Introduced \cs{AtNextNumberedItem}, Michael
%    N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newtoks\AtNextItem
\newtoks\AtNextNumberedItem
%    \end{macrocode}
%  A toggle noting whether the named items are complete or not.
%  \changes{v2.10}{2010/05/11}{Redesign: implement another mechanism
%    to get information about the type of \cs{item} that was called.}
%    \begin{macrocode}
\newif\if@noitemargcopy
\let\orig@item\item
\def\item{\@ifnextchar[{\@noitemargcopyfalse\orig@item}{\@noitemargcopytrue\orig@item}}
\newcount\last@algolabeltype
\newcount\this@algolabeltype
%    \end{macrocode}
%  This is |\makelabel| for our list.  It produces the label,
%  inserts the hook and makes all necessary modifications.
%    \begin{macrocode}
\newcommand{\algonumerate@label}[1]{%
  \expandafter\count@\value{algonumerate}%
% \typeout{algonumerate@label #1}%
% \typeout{...counter=\the\count@}%
% \if@noitemargcopy\typeout{...noitemarg}\else\typeout{...explicititemarg}\fi
%    \end{macrocode}
%  Now, fork with respect to the item type.  There are four variants:
%  a numbered item with negative counter procudes an item with hanging
%  indention and a text label from the list supplied at the list
%  initialisation.  A numbered item with positive counter produces a
%  numbered item.  The counter is stepped in these two cases and zero
%  is skipped.  An item with empty optional argument produces an
%  item like a numbered one just without a number.  An item with a
%  non-empty optional argument produces an item with hanging indention
%  and the optional argument as label.
%    \begin{macrocode}
  \if@noitemargcopy
    \ifnum\count@<\z@
      \let\next\algonumerate@labelautomatic
      \global\last@algolabeltype\this@algolabeltype
      \global\this@algolabeltype\m@ne
    \else
      \let\next\algonumerate@labelnumber
      \global\last@algolabeltype\this@algolabeltype
      \global\this@algolabeltype\@ne
    \fi
  \else
    \def\@tempa{#1}%
    \ifx\@tempa\@empty
      \let\next\algonumerate@labelempty
      \global\last@algolabeltype\this@algolabeltype
      \global\this@algolabeltype\tw@
    \else
      \let\next\algonumerate@labelexplicit
      \global\last@algolabeltype\this@algolabeltype
      \global\this@algolabeltype\z@
    \fi
  \fi\next{#1}}
%    \end{macrocode}
%  For each of the four variants we now specify how to typeset them.
%    \begin{macrocode}
\newcommand{\algonumerate@makelabelexplicit}[1]{%
  #1:\hskip\algo@labelsep%
}
\newcommand{\algonumerate@makelabelempty}[1]{%
  \hskip\steplabelwidth\hskip\algo@labelsep%
}
\newcommand{\algonumerate@makelabelautomatic}[1]{%
  #1:\hskip\algo@labelsep%
}
\newcommand{\algonumerate@makelabelnumber}[1]{%
  \hb@xt@\steplabelwidth{\hss
      #1%
  }\hskip\algo@labelsep%
}
%    \end{macrocode}
%  The macro \cs{algonumerate@postprocess} contains all the stuff to
%  be done after producing the label and putting it into
%  \cs{@tempboxa}.
%    \begin{macrocode}
\newcommand{\algonumerate@postprocess}[1]{%
    \expandafter\count@\value{algonumerate}%
%    \end{macrocode}
%  We insert a \cs{medskip} if a (positively) numbered item follows an
%  automatic or explicit text item.
%    \begin{macrocode}
    \ifnum\last@algolabeltype<\@ne
    \ifnum\this@algolabeltype=\@ne
    \medskip
    \fi
    \fi
%    \end{macrocode}
%  Next, we execute case specific commands. (For text items we need to
%  set \cs{@currentlabel} here.)
%    \begin{macrocode}
    #1%
    \global\let\latest@item@currentlabel\@currentlabel
    \global\let\latest@item@bare@currentlabel\@bare@currentlabel
    \ifnum\count@=\m@ne
    \stepcounter{algonumerate}%
    \fi
    \global\@speciallabeltrue
%    \end{macrocode}
%  Execute |\AtNextItem| once and clear it. If in a numbered item
%  execute |\AtNextNumberedItem| once and clear it.
%  \changes{v2.13}{2010/05/29}{Introduced \cs{AtNextNumberedItem}, Michael
%    N{\"{u}}sken, Bonn}
%    \begin{macrocode}
    \the\AtNextItem \global\AtNextItem{}%
    \ifnum\this@algolabeltype=\@ne
    \the\AtNextNumberedItem \global\AtNextNumberedItem{}%
    \fi
%    \end{macrocode}
%  Reinitialize the list indentions.
%    \begin{macrocode}
    \reinit@list@label
}
%    \end{macrocode}
%  The next four macros are similar to each other.  For each item type
%  they produces the label and use the dirty trick to get counting and
%  paragraph formatting as desired.
%    \begin{macrocode}
\newcommand{\algonumerate@labelexplicit}[1]{% For algorithm i/o
%   \typeout{item explicit [#1]}%
  \algonumerate@makelabelexplicit{#1}%
%    \end{macrocode}
%  
%  The following two lines are a dirty trick!!!  This establishes
%  the hook.
%    \begin{macrocode}
  \global\let\algonumerate@global\global
  \gdef\global{\algonumerate@global\let\global\algonumerate@global
    \algonumerate@postprocess{%
      \protected@edef\@currentlabel{\csname p@\@listctr\endcsname
        {\makeoptalgocurrentlabel{#1}}}%
      \protected@edef\@bare@currentlabel{#1}%
    }%
%    \end{macrocode}
%  Execute the |\global| which was used to implement this hook.
%    \begin{macrocode}
    \global}%
}
\newcommand{\algonumerate@labelempty}[1]{% For algorithm i/o
%   \typeout{item empty [#1]}%
  \algonumerate@makelabelempty{}%
  \global\let\algonumerate@global\global
  \gdef\global{\algonumerate@global\let\global\algonumerate@global
    \algonumerate@postprocess{}%
    \global}%
}
\newcommand{\algonumerate@labelautomatic}[1]{% For algorithm steps
%   \typeout{item automatic [#1]}%
  \algonumerate@makelabelautomatic{#1}%
  \global\let\algonumerate@global\global
  \gdef\global{\algonumerate@global\let\global\algonumerate@global
    \algonumerate@postprocess{%
      \protected@edef\@currentlabel{\csname p@\@listctr\endcsname
        {\makeoptalgocurrentlabel{#1}}}%
      \protected@edef\@bare@currentlabel{#1}%
    }%
    \global}%
}
\newcommand{\algonumerate@labelnumber}[1]{% For algorithm steps
%   \typeout{item numbered [#1]}%
  \algonumerate@makelabelnumber{#1}%
  \global\let\algonumerate@global\global
  \gdef\global{\algonumerate@global\let\global\algonumerate@global
    \algonumerate@postprocess{}%
    \global}%
}
%
\newdimen\algonumerate@maxindent
%    \end{macrocode}
%  We add a mechanism to find and store the length of the longest
%  macro.  However, at present it is not used.
%    \begin{macrocode}
\newdimen\@algolongestlabel
\AtBeginDocument{\ifdim\algonumerate@maxindent=\z@
  \algonumerate@maxindent.2\textwidth\fi}
%    \end{macrocode}
%  \begin{macro}{\algonumerateinit}
%    This macro prepares all things for the named items.  Its argument
%    is just the comma separated list of the names.
%    \begin{macrocode}
\def\algonumerateinit#1{%
  \setcounter{algonumerate}{-1}%
  \this@algolabeltype=\@M
  \@algolongestlabel\z@
  \def\@algonumfield{}%
  \let\ccorg@or\or\let\or\relax
  \algonumerate@items\z@
  \@for\@tempa:=#1\do{%
    \advance\algonumerate@items\@ne
    \@temptokena\expandafter{\@tempa}%
    \toks@\expandafter{\@algonumfield}%
    \edef\@algonumfield{\the\@temptokena\or\the\toks@}%
    \setbox\@tempboxa\hbox{\algonumerate@makelabelautomatic{\the\toks@}}%
    \ifdim\wd\@tempboxa>\@algolongestlabel\relax
    \@algolongestlabel\wd\@tempboxa\fi
    }%
  \let\or\ccorg@or
  \toks@\expandafter{\@algonumfield}%
  \edef\@algonumfield##1{\noexpand\ifcase-##1\noexpand\or
    \the\toks@\noexpand\fi}%
%   \typeout{Starting ...}%
  }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{environment}{algonumerate}
%    Finally, we define the environment \Lenv{algonumerate}.  Apart
%    from initiation the list, it also activates the environments
%    \Lenv{block} (aka \Lenv{body}), \Lenv{range}, \Lenv{indention},
%    and \Lenv{meta}.
%  \changes{v2.10}{2010/05/11}{Added the macro
%    \cs{skipremainingspecialitems} to allow the user to override the
%    standard label item list.}
%    \begin{macrocode}
\newenvironment{algonumerate}{%
  \if@inlabel~\fi\par
  \list{\labelalgonumerate}{%
    \usecounter{algonumerate}%
    \let\makelabel\algonumerate@label
    \parsep\z@%
    \topsep\z@%
    \itemsep\z@%
    \parskip\z@%
    \leftmargin\labelsep
    \algo@labelsep\z@
    \settowidth\steplabelwidth{\makealgolabel{99}}%
    \labelwidth\z@
    \global\reinit@list@last\z@
    }%
  \setcounter{algonumerate}{-\algonumerate@items}%
  \ifnum\algonumerate@items>\z@
  \addtocounter{algonumerate}\m@ne
  \fi
  \setcounter{block@cnt}\z@
  \let\step\algo@step
  \let\block\algo@block
  \let\endblock\endalgo@block
  \let\range\algo@range
  \let\endrange\endalgo@range
  \let\indention\algo@indention
  \let\endindention\endalgo@indention
  \let\body\algo@block
  \let\endbody\endalgo@block
  \let\meta\algo@meta
  \let\endmeta\endalgo@meta
  \def\skipremainingspecialitems{\setcounter{algonumerate}{0}}%
  }{%
  \endlist\vskip\topskip}
%    \end{macrocode}
%  \end{environment}
%
%  The \Lenv{indention} environment indents the steps inside it by an
%  amount of |\blockindent|.  Its default value is |\parindent|.
%    \begin{macrocode}
\newdimen\blockindent \blockindent\parindent
%    \end{macrocode}
%  \begin{macro}{\nextblock}
%    This is just a counter for internal use.  |\nextblock| stores
%    locally a new value in |\currentblock|.  See the sophisticated
%    things below on how to use this.
%  \changes{v2.25d}{2014/06/30}{Changed definition of
%    \cs{currentblock} to be more robust, Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newcounter{block@cnt}
\newcommand{\nextblock}{%
  \stepcounter{block@cnt}\edef\currentblock{\the\c@block@cnt}%
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\refsetrange}
%    This sets the current reference to the range of argument 1 to
%    argument 2, each argument is interpreted as a \meta{subkey}.  The
%    current reference will be empty if the range is known to be
%    trivial.
%  \changes{v2.20}{2011/10/06}{Removed bug when namedalgorithm has
%    \cs{index} in its title, Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newif\if@trivialrange
\newcommand{\refsetrange}[2]{%
  {\shortlabeltrue
    \let\index\relax
    \let\@tempa\relax
    \protected@edef\@tempa{%
      \csname r@\the\algorithmmasterkey-#1\endcsname}%
    \let\@tempc\relax
    \protected@edef\@tempc{%
      \csname r@\the\algorithmmasterkey-#2\endcsname}%
    \ifx\@tempa\@tempc\global\@trivialrangetrue
    \else\global\@trivialrangefalse\fi
    }%
  \if@trivialrange
  \protected@edef\@currentlabel{}%
  \else
  \protected@edef\@currentlabel{%
    \csname p@\@listctr\endcsname{%
    \protect\short\protect\ref{\the\algorithmmasterkey-#1}%
    --%
    \protect\short\protect\ref{\the\algorithmmasterkey-#2}%
    }}%
  \fi
  \protected@edef\@bare@currentlabel{%
    \protect\bare\protect\ref{\the\algorithmmasterkey-#1}%
    --%
    \protect\bare\protect\ref{\the\algorithmmasterkey-#2}%
    }%
  }
%    \end{macrocode}
%  \end{macro}
%  Note: the following environments are defined with a prefix |algo@|
%  in their names since they should not be available outside the
%  \Lenv{algonumerate} environment.
%  \changes{v2.25d}{2014/06/30}{Changed definition of
%    \cs{algo@range} to be more robust, Michael N{\"{u}}sken, Bonn}
%  \begin{environment}{range}
%    A |\label| (or an |\algolabel|) after the |\begin{range}| will
%    refer to the \emph{range} of items inside the environment.
%    \begin{macrocode}
\newenvironment{algo@range}{%
  \par
  \stepcounter{block@cnt}\edef\block@{\the\c@block@cnt}%
  \refsetrange{bob\block@}{eob\block@}%
  \AtNextNumberedItem{\algolabel{bob\block@}}%
  }{%
  \algolabel{eob\block@}%
  \par
  \global\let\algo@block@currentlabel\@currentlabel
  \global\let\algo@block@bare@currentlabel\@bare@currentlabel
  \aftergroup\algo@endrange@aftergroup
  }
%    \end{macrocode}
%  \end{environment}
%  This command restores the latest reference to the latest
%  encountered item.
%    \begin{macrocode}
\def\algo@endrange@aftergroup{%
%   \let\@currentlabel\algo@block@currentlabel
%   \let\@bare@currentlabel\algo@block@bare@currentlabel
  \let\@currentlabel\latest@item@currentlabel
  \let\@bare@currentlabel\latest@item@bare@currentlabel
%   [Restored \@bare@currentlabel]
  }
%    \end{macrocode}
%  \begin{environment}{indention}
%    The items inside this environment are indented by an amount of
%    |\blockindent|.
%  \changes{v2.12}{2010/05/21}{Debugged indention processing, Michael
%    N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\newdimen\indention@reinit@list@last
\newenvironment{algo@indention}{%
  \par
  \indention@reinit@list@last\reinit@list@last
  \advance\leftmargin\blockindent
  \advance\labelsep\blockindent
  \advance\@totalleftmargin\blockindent
  \advance\linewidth-\blockindent
  \def\algo@indention@undo{%
    \reinit@list{\indention@reinit@list@last}%
    \advance\leftmargin-\blockindent
    \advance\labelsep-\blockindent
    \advance\@totalleftmargin-\blockindent
    \advance\linewidth\blockindent
    }
  \list@parshape
  }{%
  \par
  \algo@indention@undo
%   \advance\leftmargin-\blockindent
%   \advance\labelsep-\blockindent
%   \advance\@totalleftmargin-\blockindent
%   \advance\linewidth\blockindent
  \list@parshape
  \aftergroup\list@parshape
  \global\let\algo@block@currentlabel\@currentlabel
  \global\let\algo@block@bare@currentlabel\@bare@currentlabel
  \aftergroup\algo@endrange@aftergroup
  }
%    \end{macrocode}
%  \end{environment}
%  \begin{environment}{block}
%    This combines the environment \Lenv{indention} and \Lenv{range}.
%    \begin{macrocode}
\newif\ifindented@block
\newenvironment{algo@block}{%
  \algo@indention
  \algo@range}{%
  \endalgo@range
  \endalgo@indention
  }
%    \end{macrocode}
%  \end{environment}
%  \begin{environment}{meta}
%    This environment allows to insert comment-like things in
%    algorithms.  It is indented by an amount of |meta@indent| which
%    defaults to |0pt|.
%    \begin{macrocode}
\newdimen\meta@indent
\newenvironment{algo@meta}{%
  \@newlistfalse
  \vskip\topskip
  \par
  \meta@indent\@totalleftmargin
  \advance\labelsep-\meta@indent
  \advance\@totalleftmargin-\meta@indent
  \advance\linewidth\meta@indent
  \advance\leftmargin-\meta@indent
  \list@parshape
  }{%
  \vskip\topskip
  \par
  \advance\labelsep\meta@indent
  \advance\@totalleftmargin\meta@indent
  \advance\linewidth-\meta@indent
  \advance\leftmargin\meta@indent
  \aftergroup\list@parshape
  }
%    \end{macrocode}
%  \end{environment}
%
%  \begin{macro}{\step}
%    This macro, only available inside \Lenv{algonumerate}, is
%    essentially a combination of |\item| and |\algolabel|.
%    \begin{macrocode}
\newcommand{\algo@step}[2][]{%
  \expandafter\ifnum\value{algonumerate}<\m@ne
  \PackageError{ccalgo}{Missing \protect\item}{}%
  \fi
  \cc@ifempty{#1}{\item}{\item[#1]}%
  \def\@tempa{#2}\ifx\@tempa\@empty\else\algolabel{#2}\fi%
  }
%    \end{macrocode}
%  \end{macro}
%  
%  \subsection{Algorithm environments}
%
%  Here we define the central environment to typeset algorithms.
%
%  First, we need some preperation.  The token list |\algotitle|
%  allows the use of another name each time \Lenv{namedalgorithm} is used.
%    \begin{macrocode}
\newtoks\algotitle
%    \end{macrocode}
%  The theorem like environment \Lenv{named@lg@r@thm*} is responsible
%  for the outer layout of unnumbered algorithms.  The theorem style
%  used comes from the package \Lpackage{thcc}.
%    \begin{macrocode}
\theorembodyfont{}%
\theoremstyle{ccalgonn}
\newtheorem{named@lg@r@thm*}{\the\algotitle}
\defprefix{named@lg@r@thm*}#1{\the\algotitle}
%    \end{macrocode}
%  The theorem like environment \Lenv{named@lg@r@thm} is responsible
%  for the outer layout of numbered algorithms.  The theorem style
%  used comes from the package \Lpackage{thcc}.  We ensure that the
%  counter used is the same as the one used for equations.
% \changes{v2.03}{2002/02/01}{Removed a bug, now
%   \cs{thenamed@lg@r@thm} equals \cs{thenamedth@@r@m}.}
% \changes{v2.23+}{2012/06/08}{Removed a bug, now named@al@r@thm is
%   defined like all other theorems with the v2.23 update in
%   mind. Michael N{\"{u}}sken, Bonn.}
%    \begin{macrocode}
\theoremstyle{ccalgo}
\providecommand{\cc@thmcnter}{equation}
\newtheorem{named@lg@r@thm}[\cc@thmcnter]{\the\algotitle}
\defprefix{named@lg@r@thm}#1{\the\algotitle~#1}
%%% \ifx\c@namedth@@r@m\@undefined\else
%%% \let\c@named@lg@r@thm\c@namedth@@r@m
%%% \let\thenamed@lg@r@thm\thenamedth@@r@m
%%% \fi
%    \end{macrocode}
%
%  \begin{environment}{namedalgorithm}
%    This combines all necessary stuff to typeset an algorithm.
%    The environment takes up to four arguments.  The first argument
%    is the \meta{heading}, in the standard |Algorithm|.  The second
%    argument is optional and gives a comma separated list of titles
%    of required items.  It defaults to |Input,Output|.  The third
%    argument is the \meta{master-key} which is used to produce a
%    reference to the algorithm and in |\algolabel| to prefix
%    references inside the algorithm.  The forth argument is again
%    optional and specifies a title.
%  \changes{v2.10}{2010/05/11}{Added extra optional argument to allow
%    specification of a longest label. But that is of no use at
%    present since this information is never used.}
%  \changes{v2.24}{2012/06/18}{Bugfix: Dirty hacks to ensure correct
%    theorem, algorithm and equation counting and
%    referencing. MNuesken, Bonn}
%    \begin{macrocode}
\babel\def\babelInput{Input}[german=Eingabe,french=Entr\'ee]
\babel\def\babelOutput{Output}[german=Ausgabe,french=Sortie]
\babel\def\babelstep{step}[german=Schritt,french=pas]%% ??? pas?
\babel\def\babelStep{Step}[german=Schritt,french=Pas]%% ??? pas?
\newtoks\algorithmmasterkey
\newenvironment{namedalgorithm}[1]{%
  \pagebreak[3]%
  \defprefix{\cc@thmcnter}##1{\the\algotitle~##1}%
  \def\algo@theorem{named@lg@r@thm}%
  \algotitle{#1}%
  \n@medalgorithm}
{\endalgonumerate\csname end\algo@theorem\endcsname}
\newenvironment{namedalgorithm*}[1]{%
  \defprefix{\cc@thmcnter}##1{\the\algotitle}%
  \def\algo@theorem{named@lg@r@thm*}%
  \algotitle{#1}%
  \n@medalgorithm}
{\endalgonumerate\csname end\algo@theorem\endcsname}
\newcommand{\n@medalgorithm}[1][\babelInput,\protect\babelOutput]{%
  \algonumerateinit{#1}%
  \n@m@d@lgorithmgetlongestlabel}
\newcommand{\n@m@d@lgorithmgetlongestlabel}[1][]{%
  \def\@tempa{#1}%
  \ifx\@tempa\@empty\else
    \setbox\@tempboxa\hbox{\algonumerate@makelabel{#1}}%
    \ifdim\wd\@tempboxa>\@algolongestlabel\relax
    \@algolongestlabel\wd\@tempboxa\fi
  \fi
  \n@m@d@lgorithmgetmasterkey
}
\newcommand{\n@m@d@lgorithmgetmasterkey}[1]{%
  \algorithmmasterkey{#1}%
  \edef\@tempa{\the\algorithmmasterkey}\ifx\@tempa\@empty
  \PackageError{ccalgo}{Empty key for algorithm like environment}{}\fi%
  \n@m@d@lgorithm
}
\newcommand{\n@m@d@lgorithm}[1][]{%
  \def\@tempa{#1}%
  \ifx\@tempa\@empty\csname\algo@theorem\endcsname
  \else\csname\algo@theorem\endcsname[#1]\fi%
  \label{\the\algorithmmasterkey}%
  \defprefix{equation}##1{(##1)}% reset equation prefix
  \algo@keywords
  \defprefix{algonumerate}{%
    \Iflabelchanged{\algo@theorem}{\uselabel{\algo@theorem} %
      \ifnum\c@algonumerate>\z@ \babelstep~\fi}}%
%     not good, since blocks need shorter labels!
%   \defprefix{algonumerate}##1{%
%     Step~##1\Iflabelchanged{\algo@theorem}
%     { of \uselabel{\algo@theorem}}}%
  \algonumerate
  }%
%    \end{macrocode}
%  \end{environment}
%
%  \begin{macro}{\algolabel}
%    This macro allows to define references locally, it uses the
%    \meta{masterkey} which is an argument to the
%    \Lenv{namedalgorithm} environment.
%    \begin{macrocode}
\def\algolabel#1{\label{\the\algorithmmasterkey-#1}}%
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\stepref}
%    This macro allows to reference the labels defined by |\algolabel|
%    in a nice way.  Its two arguments are the \meta{masterkey} and
%    the \meta{subkey}.
%    \begin{macrocode}
\newcommand{\stepref}[2]{\babelStep~\short\ref{#1-#2} in \whole\ref{#1}}
%    \end{macrocode}
%  \end{macro}
%  
%  \begin{macro}{\newalgorithm}
%    As |\newtheorem| allows to define new theorem like environments,
%    this macro allows to define new algorithm like environments in
%    fixing the first two arguments of the environment
%    \Lenv{namedalgorithm}.  At the same time a starred version is
%    defined.
% \changes{v2.01}{2000/11/07}{Removed a bug from \cs{n@walgorithm}.}
%    \begin{macrocode}
\newcommand{\newalgorithm}[2]{%
  \def\newalgo@name{#1}%
  \def\newalgo@title{#2}%
  \n@walgorithm}
\newcommand{\n@walgorithm}[1][\babelInput,\protect\babelOutput]{%
  \protected@edef\@tempa{%
    \noexpand\newenvironment{\newalgo@name}%
    {\noexpand\namedalgorithm{\newalgo@title}[\noexpand#1]}%
    {\noexpand\endnamedalgorithm}%
    \noexpand\newenvironment{\newalgo@name*}%
    {\noexpand\csname namedalgorithm*\endcsname
      {\newalgo@title}[\noexpand#1]}%
    {\noexpand\csname endnamedalgorithm*\endcsname}%
    }\@tempa
  }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{environment}{algorithm}
%    This is the standard case algorithm like environment.  Its title
%    is |\algorithmname| and its required (named) items are |Input|
%    and |Output|.
%    \begin{macrocode}
\babel\def\algorithmname{Algorithm}[%
  german=Algorithmus,french=Algorithme]
\newalgorithm{algorithm}{\protect\algorithmname}
%    \end{macrocode}
%  \changes{v2.01}{2000/09/23}{Added \cs{CALL}.}
%  
%  Keywords in algorithms are typeset by the command
%  |\keyword{|\meta{keyword}|}|.  Some keywords are predefined.  All
%  these things are only accessible inside algorithm like
%  environments.
%  \changes{v2.01}{2004/01/26}{Babelized algo@keywords.}
%  \changes{v2.10}{2010/05/11}{Use \cs{selectlanguage} only if
%    \cs{language} is not \texttt{nohyphenation}. This avoids strange
%    errors.}
%    \begin{macrocode}
\def\algo@keywords{%
  \def\keyword##1{\textsf{##1} \ignorespaces}%
  \babel\def\FOR{\keyword{For}}[german=\keyword{F{\"{u}}r}]%
  \babel\def\DO{\keyword{do}}[german=\keyword{erledige}]%
  \babel\def\endFOR{}[]%
  \babel\def\WHILE{\keyword{While}}[german=\keyword{Solange}]%
  \babel\def\endWHILE{}[]%
  \babel\def\REPEAT{\keyword{Repeat}}[german=\keyword{Wiederhole}]%
  \babel\def\UNTIL{\keyword{Until}}[german=\keyword{Bis}]%
  \babel\def\IF{\keyword{If}}[german=\keyword{Falls}]%
  \babel\def\THEN{\keyword{then}}[german=\keyword{dann}]%
  \babel\def\ELIF{\keyword{Else if}}[german=\keyword{Sonst wenn}]%
  \babel\def\ELSE{\keyword{Else}}[german=\keyword{Sonst}]%
  \babel\def\endIF{}[]%
  \babel\def\CALL{\keyword{Call}}[german=\keyword{Rufe}]%
  \babel\def\RETURN{\keyword{Return}}[german=\keyword{Antworte}]%
  \def\@tempa{nohyphenation}\ifx\languagename\@tempa\else%
  \expandafter\selectlanguage\expandafter{\languagename}\fi%
  \def\COMMENT##1{$\{$ ##1 $\}$}%
  }
%    \end{macrocode}
%  \end{environment}
%
%  \subsection{Some sophisticated environments for algorithms}
%
%  \begin{macro}{\optitem}
%    This is a helper for the following sophisticated environments.
%    It issues an |\item| if necessary, and omits it otherwise.
%    \begin{macrocode}
\newcommand{\optitem}[1]{%
  \cc@ifempty{#1}{\if@inlabel\par\else\item\fi}{\item[#1]}%
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\algoprettify}
%    This is a helper for the following sophisticated environments.
%    It formats a 3-term command like \cs{IF} \meta{condition}
%    \cs{THEN} in a line or a multiline block depending on what is
%    nicer.
%    \begin{macrocode}
%  \changes{v2.01}{2001/01/24}{Added \cs{algoprettify}. Michael
%    N{\"{u}}sken, Paderborn}
%  \changes{v2.25e}{2015/11/11}{Allow \cs{raggedright} in argument 2. Michael
%    N{\"{u}}sken, Bonn}
%  \changes{v2.25g}{2016/03/01}{Repair spacing problem in narrow
%    version. Michael N{\"{u}}sken, Bonn}
\newcommand{\algoprettify}[3]{%
  \setbox2\hbox{#1}%
  \setbox4\hbox{#2}%
  \setbox6\hbox{#3}%
  \setbox0\hbox{\unhcopy2\unhcopy4{ }\unhcopy6}%
  \ifdim\wd0<\linewidth
  \unhbox0
  \else
  \dimen0=\linewidth \advance\dimen0 by -\wd2
  \unhbox2\parbox[t]{\dimen0}{#2\strut}\par\list@parshape\unhbox6
  \fi
  }
%    \end{macrocode}
%  \end{macro}
%  
%  \begin{environment}{ifblock}
%    This produces |\IF| block.
%    \begin{macrocode}
\newenvironment{ifblock}[2][]
%    \end{macrocode}
%    What do we do at the |\begin|.
%    \begin{macrocode}
{%
%    \end{macrocode}
%    First, add |\item| if there is no |\item| immediately before the
%    \Lenv{ifblock}.
%    \begin{macrocode}
  \optitem{#1}%
%    \end{macrocode}
%    Then generate a new |\currentlabel| which is valid until the end
%    of the \Lenv{ifblock}.
%    \begin{macrocode}
  \nextblock
%    \end{macrocode}
%    Set a reference on the actual item.
%    \begin{macrocode}
  \algolabel{if\currentblock}%
%    \end{macrocode}
%    Insert the text `|\IF|~\meta{condition}~|\THEN|'.
%    |\algoprettify| takes care of a long \meta{condition}.
%  \changes{v2.01}{2001/01/24}{Now \protect\Lenv{ifblock} and so on nicer for
%    long conditions. Michael N{\"{u}}sken, Paderborn}
%    \begin{macrocode}
  \algoprettify{\IF}{#2}{\THEN}
%    \end{macrocode}
%    Begin the indention.
%    \begin{macrocode}
  \indention
%    \end{macrocode}
%    Define the value for the possibly following |\algolabel| or
%    |\label|.
%    \begin{macrocode}
  \refsetrange{if\currentblock}{endif\currentblock}%
  }
%    \end{macrocode}
%    What do we do at the |\end|.
%    \begin{macrocode}
{%
%    \end{macrocode}
%    Set a reference to the last item in the environment.
%    \begin{macrocode}
  \algolabel{endif\currentblock}%
%    \end{macrocode}
%    End the indention.
%    \begin{macrocode}
  \endindention}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{elifblock}
%    This produces an |\ELIF| block in the same manner as the |\IF| block.
%    \begin{macrocode}
\newenvironment{elifblock}[2][]{%
  \optitem{#1}%
  \nextblock
  \algoprettify{\ELIF}{#2}{\THEN}
  \algolabel{elif\currentblock}%
  \indention
  \refsetrange{elif\currentblock}{endelif\currentblock}%
  }{%
  \algolabel{endelif\currentblock}%
  \endindention}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{elseblock}
%    The |\ELSE| block differs from the last two only in the fact that
%    there is no condition.
%    \begin{macrocode}
\newenvironment{elseblock}[1][]{%
  \optitem{#1}%
  \nextblock
  \ELSE%
  \algolabel{else\currentblock}%
  \indention
  \refsetrange{else\currentblock}{endelse\currentblock}%
  }{%
  \algolabel{endelse\currentblock}%
  \endindention}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{forblock}
%    A |\FOR| block typesets a loop `for \meta{control} do \dots'.
%    Other than the previous environments we use \Lenv{block} rather
%    than only \Lenv{indention} since the range of steps in the
%    indented part is printed after the `do' (unless it is only one step).
%    \begin{macrocode}
\newenvironment{forblock}[2][]{%
  \optitem{#1}%
  \nextblock
  \algoprettify{\FOR}{#2}{%
    \DO \short\ref{\the\algorithmmasterkey-body\currentblock}}%
  \algolabel{for\currentblock}%
  \block\algolabel{body\currentblock}%
  \refsetrange{for\currentblock}{endfor\currentblock}%
  }{%
  \algolabel{endfor\currentblock}%
  \endblock}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{whileblock}
%    The |\WHILE| block is similar to the |\FOR| block: `while
%    \meta{condition} do \dots'.
%    \begin{macrocode}
\newenvironment{whileblock}[2][]{%
  \optitem{#1}%
  \nextblock
  \algoprettify{\WHILE}{#2}{%
    \DO \short\ref{\the\algorithmmasterkey-body\currentblock}}%
  \algolabel{while\currentblock}%
  \block
  \algolabel{body\currentblock}%
  \refsetrange{while\currentblock}{endwhile\currentblock}%
  }{%
  \algolabel{endwhile\currentblock}%
  \endblock}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{untilblock}
%    The |\UNTIL| block is similar to the |\FOR| block: `until
%    \meta{condition} do \dots'.
%    \begin{macrocode}
\newenvironment{untilblock}[2][]{%
  \optitem{#1}%
  \nextblock
  \algoprettify{\UNTIL}{#2}{%
    \DO \short\ref{\the\algorithmmasterkey-body\currentblock}}%
  \algolabel{until\currentblock}%
  \block
  \algolabel{body\currentblock}%
  \refsetrange{until\currentblock}{enduntil\currentblock}%
  }{%
  \algolabel{enduntil\currentblock}%
  \endblock}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{blockuntil}
%    The reverse |\UNTIL| block is similar to the |\UNTIL| block but
%    the condition is checked at the end rather than at the beginning
%    of the environment.
%    \begin{macrocode}
\newenvironment{blockuntil}[2][]{%
  \optitem{#1}%
  \nextblock
  \def\repeat@cond{#2}%
  \REPEAT \short\ref{\the\algorithmmasterkey-body\currentblock}%
  \algolabel{repeat\currentblock}%
  \block
    \algolabel{body\currentblock}%
    \refsetrange{repeat\currentblock}{endrepeat\currentblock}%
    }{%
  \endblock
\item
  \algolabel{endrepeat\currentblock}%
  \algoprettify{\UNTIL}{\repeat@cond}{}}
%    \end{macrocode}
%  \end{environment}
%  
%  \begin{environment}{blockwhile}
%    The reverse |\WHILE| block is similar to the |\WHILE| block but
%    the condition is checked at the end rather than at the beginning
%    of the environment.
%    \begin{macrocode}
\newenvironment{blockwhile}[2][]{%
  \optitem{#1}%
  \nextblock
  \def\repeat@cond{#2}%
  \REPEAT \short\ref{\the\algorithmmasterkey-body\currentblock}%
  \algolabel{repeat\currentblock}%
  \block
    \algolabel{body\currentblock}%
    \refsetrange{repeat\currentblock}{endrepeat\currentblock}%
    }{%
  \endblock
\item
  \algolabel{endrepeat\currentblock}%
  \algoprettify{\WHILE}{\repeat@cond}{}}
%    \end{macrocode}
%  \end{environment}
%
%  So far for algorithms.
%    \begin{macrocode}
%</ccalgo>
%    \end{macrocode}
%
%  \GetFileInfo{ccqed.sty}
%  \CodelinePrefix{Q}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*ccqed>
\ProvidesPackage{ccqed}[2014/07/08 v2.25d
  right-justified end-of-proof mark,
  based on Paul Taylor's QED.sty of 24 June 1995]
%    \end{macrocode}
%  We reproduce some of Paul Taylor's comments here.
%
%  \medskip\hrule\medskip
%
%  \emph{Warning}: If you use this with Frank Mittlebach's
%  \Lpackage{theorem}\texttt{.sty} you \emph{must} load theorem first,
%  then QED, then do the |\newtheorem| commands.
%  \begin{center}
%    \begin{tabular}{ll}
%      Authoritative version: &
%      /pub/tex/contrib/pt/proofs/QED.sty\\
%      by anonymous FTP from:&
%      ftp.dcs.qmw.ac.uk\\
%      also CTAN:            &
%      macros/generic/proofs/taylor/QED.sty\\
%      author/maintained by: &
%      Dr Paul Taylor \email{pt@dcs.qmw.ac.uk}\\
%    \end{tabular}
%  \end{center}
%
%
%
%  \subsection{User Interface and Examples (see also Options below)}
%
%  \emph{Warning}: |\qed| which doesn't follow |\Proof| will not print
%  the square.
% 
%  Unfortunately some environments, such as picture, do not allow this
%  at all.  See the section "centering environments" below for the
%  mechanism for passing |\qed| to such an environment for special
%  processing.
%
%  In fact |\qed| will only work in those environments which provide
%  access to the right hand side of the page. In other words, wherever
%  you think `|\hfill\square|' ought to work then |\qed| will; of course
%  it is just because that naive method doesn't work that this macro
%  file is needed at all.  The macro was designed to solve the problem
%  in the case of `unrestricted horizontal mode' (ie at the end of a
%  paragraph); it also works in |$$| displays by pretending to be an
%  equation number. In most other cases it basically does
%  `|\hfill\square|' or `|\hfill$\square$|' and hopes for the best.
%
%  If you have to put |\qed| outside the environment, it may be
%  appropriate to put |\vskip| |-\baselineskip| before it, unless of
%  course this would over-print.  There is, however, still a danger
%  that TeX  will break the page here.  This seems to be unavoidable
%  if the  environment ends with a |\penalty|.
%
%  The eqnarray example above does not in fact work: if you try it
%  you'll get
%  \begin{flushleft}
%  |! Paragraph ended before \llap was complete|
%  \end{flushleft}
%  with \LaTeX{} in a mess.  This is a very common place where you
%  might want to put the end of proof mark, and I also consider that
%  the fourth column should be available for `reasons' for equational
%  steps.
%  The following substitute for |\eqnarray| allows this, whilst being
%  compatible with automatic numbering. I have proposed it to Rainer
%  Sch\"{o}pf for inclusion in LaTeX. If you want to use it, please copy
%  it to another file rather than uncommenting it here.  Don't forget to
%  use |\makeatletter| or put it in a documentstyle (\texttt{.sty}) file.
%
%  \emph{Michael's warning}: This might not work with \LaTeXe{} any more.
%    \begin{macrocode}
% \def\eqnarray{%
%   \stepcounter{equation}%
%   \let\@currentlabel\theequation
%   \global\@eqnswtrue\m@th
%   \global\@eqcnt\z@
%   \tabskip\@centering
%   \let\\\@eqncr
%   $$\halign to\displaywidth\bgroup
%     \@eqnsel\hskip\@centering$\displaystyle\tabskip\z@{##}$%
%     &\global\@eqcnt\@ne\hskip2\arraycolsep\hfil${##}$\hfil
%     &\global\@eqcnt\tw@\hskip2\arraycolsep
%     $\displaystyle\tabskip\z@{##}$\hfil\tabskip\@centering
%     &\global\@eqcnt\thr@@\hbox to\z@\bgroup
%        \hss##%*** instead of "\llap{##}"
%        \tabskip\z@\cr}%
% \def\@@eqncr{\let\@tempa\relax
%   \ifcase\@eqcnt
%   \def\@tempa{& & &}\or
%   \def\@tempa{& &}\or
%   \def\@tempa{&}\else
%   \@eqnswfalse%*** instead of "\else\def\@tempa{&}"
%   \fi\@tempa
%   \if@eqnsw\@eqnnum\stepcounter{equation}\fi
%   \egroup%*** added, to match \bgroup in fourth cell of preamble
%   \global\@eqnswtrue\global\@eqcnt\z@\cr}
%    \end{macrocode}
%
%  Why can't we do all of this with |\endProof|? Because by that stage
%  the damage has been done: the environments, paragraphs or displays
%  have already been closed and their |\hbox|'es added to the current
%  vertical list, and cannot be removed for alteration if this is the
%  current page.
% 
%  Even if you don't need to put |\qed| inside an inner environment to
%  avoid a blank line, it's still a good idea to do so, because
%  otherwise it's possible that intervening end-of-environment material
%  may allow TeX to put the mark on the next page.
%
%  If you don't use \Lpackage{theorem}\texttt{.sty}, this file instead
%  provides options to use commands to begin theorems, instead of
%  enclosing them in environments, and to suppress numbering and
%  italicisation. A rudimentary version of |\newtheorem| for
%  plain\TeX{} is also implemented (always using commands rather than
%  environments).
%
%  \subsection{Options}
%
%  These are the user commands.
%
%  \begin{macro}{\qed}
%    Suppressible printing of |\qedsymbol|.
%    \begin{macrocode}
\def\qed{\protect\@qed{$\qedsymbol$}}
%    \end{macrocode}
%  \end{macro}
%  
%  |\pushright| takes an argument, which it always prints it is
%  (re)defined by |\WillHandleQED| and |\UnHandleQED| below (12.4.94)
%
%  These are the user-settable parameters.
%
%  \begin{macro}{\qedsymbol}
%    The actual (maths) symbol used by |\qed|.
%    \begin{macrocode}
\def\qedsymbol{\square}
%    \end{macrocode}
%    \emph{Please note}: this is in the \AMS{} symbols font.
%    Use one of these instead if you prefer:
%    |\def\qedsymbol{\blacksquare}| or
%    |\def\qedsymbol{\hbox{\rm Q.E.D.}}|. %
%    The Journal of Symbolc Logic likes |\def\qedsymbol{\dashv}|.
%  \end{macro}
%  
%  \begin{macro}{\AutoQEDtrue}
%    The command |\AutoQEDtrue| causes a |\qed| in |\end{theorem}|, so
%    you do |\begin{theorem}| \dots{} |\begin{proof}| \dots{}
%    |\end{proof}| |\end{theorem}| but if you omit the proof, the
%    statement gets a little square at the end.
%    \begin{macrocode}
\newif\ifAutoQED\AutoQEDfalse
%    \end{macrocode}
%  \end{macro}
%  
%  \subsection{Pushright}
%
%  \begin{macro}{\pushright}
%    If you already have a macro called |\qed|, |\endproof| or
%    |\pushright| which is laid out in a similar way to the following
%    two definitions (but with |\hbox@pushright| incorporated) then it
%    is almost certainly my code, which has been copied anonymously via
%    numerous people since my Cambridge PhD thesis in August 1986.
%    Belated acknowledgements to Chris Thompson of the Cambridge
%    University Computing Service for his help with my early attempts at
%    TeX, in particular this problem.
%
%    The complexity of the macro necessary to get a little box on the
%    right-hand-side at the end of a proof is amazing.  It really does
%    have to be this long!  Otherwise you're liable to get it at the
%    beginning of the next line, or even on the next page.
%
%
%    \begin{macrocode}
\def\parag@pushright#1{{%
%    \end{macrocode}
%    Set up.
%    So |\par| doesn't push |\square| to left.
%    \begin{macrocode}
    \parfillskip\z@
%    \end{macrocode}
%    So we don't break the page before |\square|.
%    \begin{macrocode}
    \widowpenalty\@M
    \displaywidowpenalty\@M
%    \end{macrocode}
%    See TeXbook exercise 14.32.
%    \begin{macrocode}
    \finalhyphendemerits\z@
%    \end{macrocode}
%    \paragraph{Horizontal.}
%    |\leavevmode| is not needed since we now only use it in hmode.
%    \begin{macrocode}
%     \leavevmode
%    \end{macrocode}
%    This used to be incorporated
%    \begin{macrocode}
    \hbox@pushright
%    \end{macrocode}
%    The end-of-proof mark (or whatever).
%    \begin{macrocode}
    #1%
%    \end{macrocode}
%    \paragraph{Vertical.}
%    Build paragraph with the above parameters.
%    \begin{macrocode}
    \par}}%
%    \end{macrocode}
%
%    Horizontal.
%    \begin{macrocode}
\def\hbox@pushright{%
%    \end{macrocode}
%    Remove previous space or glue.
%    \begin{macrocode}
    \unskip
%    \end{macrocode}
%    Don't break lines.
%    \begin{macrocode}
    \nobreak
%    \end{macrocode}
%    Ragged right if we spill over.
%    \begin{macrocode}
    \hfil
%    \end{macrocode}
%    Discouragement to do so.
%    \begin{macrocode}
    \penalty50
%    \end{macrocode}
%    Ensure some space.
%    \begin{macrocode}
    \hskip.2em
%    \end{macrocode}
%    Anchor the following |\hfill|.
%    \begin{macrocode}
    \null
%    \end{macrocode}
%    Push to right.
%    \begin{macrocode}
    \hfill
}%
%    \end{macrocode}
%  
%    Ideally |\endProof| should do all this. We should be able to add
%    the symbol to the last line after the paragraph, display or
%    whatever other structure has been completed and we've returned to
%    vertical mode. This isn't possible on the current page (outer
%    vmode) because |\lastbox| doesn't work there.
%
%    But |\ifinner| is true inside a |\vbox|, |\vadjust| or |\insert|
%    (LaTeX |\parbox|, \Lenv{minipage}, \Lenv{figure} or
%    \Lenv{table}), and in these circumstances we can use |\lastbox|.
%    We would have to strip \& restore glue \& penalties (|\insert|,
%    |\mark| and |\write| are obstacles to this) to get access to the
%    last line (box), which may still not have the correct
%    baseline. We could check its natural width against the page
%    width, but if we re-set it, centering and (right) justification
%    might be disturbed. Is this worth the trouble?
%
%    \begin{macrocode}
\def\vbox@pushright#1{\expandafter\message %  (2 Jan 1994)
  {QED.sty could be improved in this case
    (line \the\inputlineno): please ask}%
  \page@pushright{#1}}%
%    \end{macrocode}
%  
%
%    Using this method a \Lenv{proof} environment could be implemented
%    by collecting the entire proof in its own |\vbox|, modifying that
%    and |\unvbox|'ing it to the current page. This approach may lead to
%    the following problems:
%    \begin{enumerate}
%    \item footnotes, floats, marginpars, labels and index items may be
%      lost;
%    \item overflow of TeX's main memory, especially if |\end{proof}| is
%      missing;
%    \item I don't know how page-breaking would be handled.
%    \end{enumerate}
%
%    Switch to enable/suppress |\qedsymbol|; since suppression may be
%    done within a nested scope it must be global, so we do our own
%    save/restore  in a symbol which is local to a proof environment.
%    \begin{macrocode}
\newif\if@qed\@qedfalse
\def\save@set@qed{\let\saved@ifqed\if@qed\global\@qedtrue}%
\def\restore@qed{\global\let\if@qed\saved@ifqed}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@qed#1{\check@pt@fm@thm
%    \end{macrocode}
%    Have we already done |\qed|?
%    \begin{macrocode}
\if@qed
%    \end{macrocode}
%    No: do it now, but not again.
%    \begin{macrocode}
     \global\@qedfalse\pushright{#1}%
%    \end{macrocode}
%    Yes: just end paragraph, if any.
%    \begin{macrocode}
\else\ifhmode\ifinner\else\par\fi\fi%
\fi}
%    \end{macrocode}
%
%    |\pushright{|\meta{text}|}| always prints its argument, on the
%    far right, in text mode.
%    \begin{macrocode}
\def\@pushright#1{%
  \ifvmode
%    \end{macrocode}
%    Vertical mode (see comments above).
%    \begin{macrocode}
       \ifinner\vbox@pushright{#1}%
       \else   \page@pushright{#1}%
       \fi
%    \end{macrocode}
%    Maths (force a text argument).
%    \begin{macrocode}
  \else\ifmmode\maths@pushright{\hbox{#1}}%
%    \end{macrocode}
%    Inside an |\hbox|.
%    \begin{macrocode}
       \else\ifinner\hbox@pushright{#1}%
%    \end{macrocode}
%    In a paragraph.
%    \begin{macrocode}
            \else\parag@pushright{#1}%
  \fi  \fi  \fi
}
% (22 Feb 1993) removed extra {} which would destroy our \] below
%    \end{macrocode}
%
%    In the |\hbox| and maths cases we are really at the mercy of the
%    environment.  Assuming that we have |$\qed$| simply embedded in a
%    paragraph, the horizontal processing by |\hbox@pushright| will at
%    least make sure that the square isn't at the beginning of the line,
%    but we can't stop it being on the next page.  However it is more
%    likely that the reason why we're in maths mode is that we're inside
%    an eqnarray or similar, in which case |\hfill| will do its best to
%    put the square on the right of the available space. (See |\vadjust|
%    below.)
%    \begin{macrocode}
\def\maths@pushright#1{%
  \ifinner
     \hbox@pushright{#1}%
  \else
%    \end{macrocode}
%    Use \TeX's right equation number feature (|\eqno|) within |$$|.
%    \begin{macrocode}
     \eqno#1%
%    \end{macrocode}
%    Suppress LaTeX's error checking (HACK!).
%    \begin{macrocode}
     \def\]{$$\ignorespaces}%
  \fi
}%
% (22 Feb 1993) removed extra {} which would destroy our \] above
%    \end{macrocode}
%  
%    \paragraph{Outer vertical mode (the current page)}
%    There's very little we can do in these circumstances!
%    Penalties still allow the page to be broken.
%    If the user has put negative glue in, leave it alone. (15 Feb 1994)
%    \begin{macrocode}
\def\page@pushright#1{% 18 Jan 1994
%  \unpenalty % ineffective
%    \end{macrocode}
%    Remove |\parskip|, but only (15 Feb 1994) if it's positive.
%    \begin{macrocode}
  \skip@\lastskip
  \ifdim\skip@>\z@
    \unskip    
  \else\skip@\z@\relax
  \fi
%  \unpenalty % TeX won't let me do this
  \dimen@\baselineskip
%    \end{macrocode}
%    Save |\prevdepth| to make a strut
%    \begin{macrocode}
  \advance\dimen@-\prevdepth
%    \end{macrocode}
%    Don't break the page here.
%    \begin{macrocode}
  \nobreak
  \nointerlineskip
  \hbox to\hsize{%
    \setbox\z@\null
%    \end{macrocode}
%    Simulate |\baselineskip|.
%    \begin{macrocode}
    \ifdim\dimen@>\z@\ht\z@\dimen@\fi
    \box\z@
    \hfill
    #1}%
%    \end{macrocode}
%    Replace old |\parskip|.
%    \begin{macrocode}
  \vskip\skip@                 
}%
%    \end{macrocode}
%
%    An idea that didn't work: see TeXbook p188. (16 Feb 1993) Use
%    |\predisplaysize| to find out the width of the previous box, in the
%    case where it has already been completed.  But this can only be
%    used inside displays (|$$|), and a display in vertical mode begins
%    a paragraph first, so we end up with
%    |\predisplaysize=\parindent+2em| whatever happened in the previous
%    paragraph.
%   
%    Another idea: it may be worth trying |\vadjust|, if only to insert
%    |\nobreak|.  The problem with this is that if we are too deeply
%    nested in horizontal or maths lists, the adjustment may not be able
%    to find its way out to the enclosing vertical list. In the case of
%    array-like environments, it will appear (assuming it manages to get
%    out) after the current row of the array.
%  \end{macro}
%  
%
%  \subsection{Adding to theorem environments}
%
%    We have to add to the theorem environments the commands to enable
%    |\qed|.  This is done by re-defining |\@thm#1#2|.  Note that
%    Mittelbach's \Lpackage{theorem}\texttt{.sty} re-defines |\@thm|
%    and |\@endtheorem|, so that must be loaded before us, otherwise
%    our changes will get over-written and |\qed| will never be
%    enabled.
%
%    Save original.
%    \begin{macrocode}
\let\nonqed@thm\@thm
\let\nonqed@endthm\@endtheorem
\def\@thm{\save@set@qed\nonqed@thm}
\def\@endtheorem{\ifAutoQED\qed\fi\restore@qed\nonqed@endthm}
%    \end{macrocode}
%
%
%  \subsection{`Centering' Environments}
%
%  Those which don't give their contents access to the right hand side
%  of the page, such as center, picture, ...  (12 April 1994)
%
%  Each individual environment (both the standard ones and those defined
%  by the user) needs to co-operate in order to make |\qed| and
%  |\pushright| work.  It is not the business of this package to rewrite
%  LaTeX in this way, but the following mechanism may be inserted in to
%  other environments.
%  \begin{itemize}
%  \item put |\WillHandleQED| in the |\begin| part of the environment
%    definition; then if a |\qed| occurs in the body of the environment
%    it is stored in |\QEDbox| until...
%  \item |\HandleQED| anywhere in the |\end| part of the environment
%    definition (even inside dollars, braces or another environment)
%    prints it.
%  \end{itemize}
%  For example:
% \begin{verbatim}
% \newenvironment{qedpicture}%
%    {\begin{picture}\WillHandleQED}%
%    {\put(0,0){\HandleQED}\end{picture}}
% \end{verbatim}
%  To make this compatible with \emph{not} loading
%  \Lpackage{QED}\texttt{.sty}, add the following to macro files which
%  use |\WillHandleQED| and |\HandleQED|:
% \begin{verbatim}
%   \ifx\WillHandleQED\undefined
%      \let\WillHandleQED\relax
%      \let\HandleQED\relax
%      \let\UnHandleQED\relax % if you use it
%      \let\QEDbox\voidb@x    % must have \makeatletter here!
%   \fi
% \end{verbatim}
%  |\UnHandleQED| restores normal processing; this may be useful for the
%  minipage environment, which has its own notion of `right hand side'
%  of the page.  The width of the saved |\qed| is available for testing
%  as |\wd\QEDbox|.
%
%  The box in which to save |\qed| for special handling.
%    \begin{macrocode}
\newbox\qed@box
%    \end{macrocode}
%  
%    \begin{macrocode}
\def\WillHandleQED{\relax
  \ifx\HandleQED\nohandle@qed
%    \end{macrocode}
%  No enclosing environment has declared |\WillHandleQED|.
%
%  |\qed| will be saved.
%    \begin{macrocode}
    \def\pushright{\global\setbox\qed@box\hbox}%
%    \end{macrocode}
%  Point at the right box.
%    \begin{macrocode}
    \let\QEDbox\qed@box
%    \end{macrocode}
%  Print it.
%    \begin{macrocode}
    \def\HandleQED{\unhbox\QEDbox}%
%    \end{macrocode}
%  Check that this really gets done.
%    \begin{macrocode}
    \aftergroup\check@handle@qed
  \else
%    \end{macrocode}
%  An enclosing environment already wants to catch |\qed| |\HandleQED|
%  doesn't print anything - let the saved |\qed| pass through
%  by pointing at an empty box.
%    \begin{macrocode}
    \let\QEDbox\voidb@x
  \fi
  }
%    \end{macrocode}
%  
%    \begin{macrocode}
\def\nohandle@qed{%
\errhelp{One of them is missing: see QED.sty.}%
\errmessage{This environment uses \string\WillHandleQED\space and
\string\HandleQED\space incorrectly}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\check@handle@qed{\relax
\ifvoid\qed@box\else\expandafter\nohandle@qed\fi}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\UnHandleQED{%
\let\HandleQED\nohandle@qed
\let\QEDbox\voidb@x
\def\pushright{\protect\@pushright}}%
%    \end{macrocode}
%
%    \begin{macrocode}
\UnHandleQED
%    \end{macrocode}
%  
%
%  If \Lpackage{theorem}\texttt{.sty} hasn't been loaded, arrange to
%  check it again in |\@qed|. And check (then) whether you've actually
%  defined |\square|.
%  Changed 2 June 1993: don't define it now, as that would confuse
%  \Lpackage{amssymb}\texttt{.sty}.
%    \begin{macrocode}
\ifx\theorem@style\undefined
   \def\check@pt@fm@thm{\relax
     \ifx\square\undefined
       \gdef\square{\bigcirc
          \errhelp={Anonymous ftp e-math.ams.com /ams/amsfonts}%
          \errmessage{\string\square\space is an AMS symbol}%
          \global\let\square\bigcirc}%
     \fi
      \ifx\theorem@style\undefined
          \global\let\check@pt@fm@thm\relax
      \else
        \errhelp={The macros \@thm and \@endtheorem
          need to be re-defined.}%
        \errmessage{QED.sty must be loaded AFTER theorem.sty but
          before using \string\newtheorem}%
      \fi
      \global\let\check@pt@fm@thm\relax
      }%
\else
   \def\check@pt@fm@thm{%
      \ifx\square\undefined
         \def\square{\bigcirc
         \errhelp={Anonymous ftp e-math.ams.com /ams/amsfonts}%
         \errmessage{\string\square\space is an AMS symbol}%
         \global\let\square\bigcirc}%
      \fi
      \global\let\check@pt@fm@thm\relax
      }%
\fi
%    \end{macrocode}
%
%  \changes{v2.25d}{2014/07/08}{Process options in calling order
%    rather than definition order.  Michael N{\"{u}}sken, Bonn}
%    \begin{macrocode}
\DeclareOption{auto-QED}{\AutoQEDtrue}%
\DeclareOption{explicit-QED}{\AutoQEDfalse}%
\DeclareOption{black-square}{\def\qedsymbol{\blacksquare}}%
\DeclareOption{open-square}{\def\qedsymbol{\square}}%
\ProcessOptions*
%    \end{macrocode}
%
%  \subsection{Bugs}
%
%  |\item\qed\end{letterlist}| puts the square above the item label.
%
%  |! You can't use `\unskip' in vertical mode.|
%  from |\qed| in a paragraph on its own.
%
%  \medskip\hrule\medskip
%
%  \subsection{Michael's fixes \dots}
%
%  While \Lpackage{QED}\texttt{.sty} does a very fine job it leaves
%  some things apart.  Of course, it was not aware of much of the
%  newer \AMS{} math environments.  In the following I tried to
%  redefine |\qed| and |\pushright| in order to work in all standard
%  circumstances reasonably well.
%
% \iffalse meta-comment
%  The following was a trial to fix |\pushright| instead of |\qed|.
%
%  Unfortunately, |\pushright| does not always work well, especially
%  in equation-like environment as provided by the \AMS{} package
%  \Lpackage{amsmath} there are several new complications.
%  We make |\pushright| and |\qed| work in all these environments.
%    \begin{macrocode}
% \newif\if@resettagsleft@%\fi
% \let\standardpushright\pushright
% \def\rescuepushright#1{\qquad\hbox{#1}}
% \def\eqnopushright#1{\eqno\hbox{#1}}
% \let\ccorg@eqnnum\@eqnnum
% \let\ccorg@nonumber\nonumber
% \def\eqnarraypushright#1{%
%   \global\@eqnswtrue
%   \global\let\nonumber\relax
% % equation counter will be incremented at \end{eqnarray*} by \@@eqncr!
%   \addtocounter{equation}\m@ne
%   \gdef\@eqnnum{\llap{#1}%
%     \global\let\nonumber\ccorg@nonumber
%     \global\let\@eqnnum\ccorg@eqnnum}}
% \def\tagpushright#1{%
%   \typeout{tagpushright #1}
%   \tag*{\iftagsleft@%\iftrue
%     \hskip\displaywidth\llap{#1}\hskip-\displaywidth%
%     \else\hbox{#1}\fi}}
% \def\simpletagpushright#1{\iftagsleft@%\iftrue
%   \global\@resettagsleft@true\fi
%   \global\tagsleft@false
%   \tag*{\hbox{#1}}}
% \def\aftersplitpushright#1{%
%   \def\@endsplit{%
%     \global\let\endsplit\ccorg@endsplit
%     \endsplit
%     \pushright{#1}%
%     }}
% \let\ccorg@endsplit\endsplit
% %
% \newif\if@pushrightfailed%\fi
% \def\nopushright#1{\global\@pushrightfailedtrue}
% \def\@ifcurrenv#1#2{\def\@tempa{#1}\ifx\@tempa\@currenvir\relax
%   \let\next#2\fi}
% \renewenvironment{displaymath}{$$}{$$\@ignoretrue}
% \renewcommand{\[}{\begin{displaymath}}
% \renewcommand{\]}{\end{displaymath}}
% \if@ams
% \def\pushright{%
%   \global\@pushrightfailedfalse
%   \if@resettagsleft@\global\tagsleft@true\global\@resettagsleft@false\fi
%   \let\next\standardpushright
%   \@ifcurrenv{displaymath}\eqnopushright
%   \@ifcurrenv{equation}\nopushright
%   \@ifcurrenv{eqnarray}\nopushright
%   \@ifcurrenv{eqnarray*}\eqnarraypushright
%   \@ifcurrenv{equation*}\tagpushright
%   \@ifcurrenv{split}\aftersplitpushright
%   \@ifcurrenv{multline}\nopushright
%   \@ifcurrenv{multline*}\simpletagpushright
%   \@ifcurrenv{gather}\nopushright
%   \@ifcurrenv{gather*}\tagpushright
%   \@ifcurrenv{align}\nopushright
%   \@ifcurrenv{align*}\tagpushright
%   \@ifcurrenv{alignat}\nopushright
%   \@ifcurrenv{alignat*}\tagpushright
%   \next}
% \else
% \def\pushright{%
%   \global\@pushrightfailedfalse
%   \let\next\standardpushright
%   \@ifcurrenv{displaymath}\eqnopushright
%   \@ifcurrenv{equation}\nopushright
%   \@ifcurrenv{eqnarray}\nopushright
%   \@ifcurrenv{eqnarray*}\eqnarraypushright
%   \next}
% \fi
% \def\@@qed#1{%
%   \pushright{#1}%
%   \if@pushrightfailed\else\global\@qedfalse\fi
% }
% \def\@@qedpar#1{%
%   \ifhmode\ifinner\else\par\fi\fi
% }
% \def\@qed{\check@pt@fm@thm
% \if@qed\let\next\@@qed\else\let\next\@@qedpar\fi\next}
% %
% \endinput%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    \end{macrocode}
% \fi
%
%  Unfortunately, |\qed| does not always work well, especially
%  in equation-like environment as provided by the \AMS{} package
%  \Lpackage{amsmath} there are several new complications.
%  We make |\qed| work in all these environments.
%    \begin{macrocode}
\newif\if@resettagsleft@
\let\standardqed\qed
\def\rescueqed{\qquad\qedsymbol\vphantom{\standardqed}}
\def\eqnoqed{\eqno\hbox{\standardqed}}%\vphantom{\standardqed}}
\let\ccorg@eqnnum\@eqnnum
\let\ccorg@nonumber\nonumber
\def\eqnarrayqed{%
  \global\@eqnswtrue
  \global\let\nonumber\relax
% equation counter will be incremented at \end{eqnarray*} by \@@eqncr!
  \addtocounter{equation}\m@ne
  \gdef\@eqnnum{\llap{$\qedsymbol$\vphantom{\standardqed}}%
    \global\let\nonumber\ccorg@nonumber
    \global\let\@eqnnum\ccorg@eqnnum}}
\def\tagqed{\tag*{\iftagsleft@
    \hskip\displaywidth\llap{$\qedsymbol$}\hskip-\displaywidth%
    \else$\qedsymbol$\fi}\vphantom{\standardqed}}
\def\simpletagqed{\iftagsleft@\global\@resettagsleft@true\fi
  \global\tagsleft@false
  \tag*{$\qedsymbol$}\vphantom{\standardqed}}
\def\aftersplitqed{\global\let\endsplit\@endsplit}
\let\ccorg@endsplit\endsplit
\def\@endsplit{\ccorg@endsplit\qed\global\let\endsplit\ccorg@endsplit}%
\def\noqed{}
\def\@ifcurrenv#1#2{\def\@tempa{#1}\ifx\@tempa\@currenvir\relax
  \let\next#2\fi}
\renewenvironment{displaymath}{$$}{$$\@ignoretrue}
\renewcommand{\[}{\begin{displaymath}}
\renewcommand{\]}{\end{displaymath}}
\if@ams
\def\qed{%
  \if@resettagsleft@
    \global\tagsleft@true
    \global\@resettagsleft@false
  \fi
  \let\next\standardqed
  \@ifcurrenv{displaymath}\eqnoqed
  \@ifcurrenv{equation}\noqed
  \@ifcurrenv{eqnarray}\noqed
  \@ifcurrenv{eqnarray*}\eqnarrayqed
  \@ifcurrenv{equation*}\tagqed
  \@ifcurrenv{split}\aftersplitqed
  \@ifcurrenv{multline}\noqed
  \@ifcurrenv{multline*}\simpletagqed
  \@ifcurrenv{gather}\noqed
  \@ifcurrenv{gather*}\tagqed
  \@ifcurrenv{align}\noqed
  \@ifcurrenv{align*}\tagqed
  \@ifcurrenv{alignat}\noqed
  \@ifcurrenv{alignat*}\tagqed
  \next}
\else
\def\qed{%
  \let\next\standardqed
  \@ifcurrenv{displaymath}\eqnoqed
  \@ifcurrenv{equation}\noqed
  \@ifcurrenv{eqnarray}\noqed
  \@ifcurrenv{eqnarray*}\eqnarrayqed
  \next}
\fi
%</ccqed>
%    \end{macrocode}
%
%  \GetFileInfo{cc2cite.sty}
%  \CodelinePrefix{C}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%    \begin{macrocode}
%<*cc2cite>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc2cite}[2000/02/29 v2.05 cc2 cite helper package]
%    \end{macrocode}
%  We simply load \Lpackage{natbib} and make some small initializations.
%    \begin{macrocode}
\RequirePackage{natbib}[2010/09/13 8.31b]
\bibpunct{(}{)}{;}{a}{}{,}
\newcommand{\bibstyle@cc}{\bibpunct{(}{)}{;}{a}{}{,}}
\expandafter\def\csname bibstyle@cc2\endcsname{%
  \bibpunct{(}{)}{;}{a}{}{,}}
\let\bibfont\small
\bibhang\z@
\providecommand{\newwarning}[2]{%
  \expandafter\gdef\csname cc@warn@#1\endcsname{#2}}
\providecommand{\ccClassWarning}[1]{%
  \ClassWarning{cc}{\csname cc@warn@#1\endcsname}}
\newwarning{old@citemul}{%
    The command \protect\citemul\space is obsolete.
    Use \protect\citet\space instead.\MessageBreak
    Please read the documentation
    of the package `natbib.sty'}
\newwarning{old@parencite}{%
    The command \protect\parencite\space is obsolete.
    Use \protect\citep\space instead.\MessageBreak
    Please read the documentation
    of the package `natbib.sty'}
\newwarning{old@shortcite}{%
    The command \protect\shortcite\space is obsolete.
    Use \protect\citealt\space instead.\MessageBreak
    Please read the documentation
    of the package `natbib.sty'}
% \def\warning@old@cite#1#2{\ClassWarning{cc}{%
%     The command \protect#1\space is obsolete.
%     Use \protect#2\space instead.\MessageBreak
%     Please read the documentation
%     of the package `natbib.sty'.\MessageBreak}}
\def\citemul{\ccClassWarning{old@citemul}\citet}
\def\parencite{\ccClassWarning{old@parencite}\citep}
\def\shortcite{\ccClassWarning{old@shortcite}\citealt}
%    \end{macrocode}
%  This loads the bibliography style \file{cc2.bst} unless there is a
%  |\bibliographystyle| command before the |\bibliography| command.
%    \begin{macrocode}
\RequirePackage{ccdbs}
\DefaultBibliographyStyle{cc2}
%</cc2cite>
%    \end{macrocode}
%
%  \GetFileInfo{cccite.sty}
%  \CodelinePrefix{c}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  \changes{v0.91}{2000/02/29}{Advanced version to official 2.00}
%    \begin{macrocode}
%<*cccite>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cccite}[2000/02/29 v2.05 cc cite helper package]
\PackageWarningNoLine{cccite}{%
  The package cccite is obsolete.\MessageBreak
  Better use cc2cite.
  }
%    \end{macrocode}
%
%  This is the named references stuff from
%  \Lpackage{namedrefs}\texttt{.sty} butchered and adapted by David
%  McClurkin, and again by Michael N{\"{u}}sken.
%
%  It supports the following seven citation forms:
%  \begin{center}
%    \begin{tabular}{ll}
%      |\cite|       & Cook (1990) \\
%      |\citeauthor| & Cook \\
%      |\citeyear|   & 1990 \\
%      |\citemul|    & Cook (1990, 1991a, 1991b) \\
%      |\shortcite|  & Cook 1990 \\
%      |\parencite|  & (Cook 1990)\\
%      |\nocite|     & 
%    \end{tabular}
%  \end{center}
%
%  The package \Lpackage{ccdbs} simply guarantees that by default
%  |\bibliographystyle{cc}| is called unless the user issued a
%  |\bibliographystyle| command \emph{before} the |\bibliography|
%  command.
%    \begin{macrocode}
\RequirePackage{ccdbs}
\DefaultBibliographyStyle{cc}
%    \end{macrocode}
%  Remember the built in |\cite| since it will be redefined.
%    \begin{macrocode}
\let\ccorg@cite\cite
\let\ccorg@@cite\@cite
%    \end{macrocode}
%  After a comma we use |\penalty\@citeseppen|.
%    \begin{macrocode}
\def\@citeseppen{-5}
%    \end{macrocode}
%  
%    \begin{macrocode}
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
%    \end{macrocode}
%  The commands we provide only differ in the format of their output.
%  This format is stored in |\citeauthoryear|, then the universal
%  mechanism |\@citex| is applied.
%    \begin{macrocode}
\def\cite#1{\def\citeauthoryear##1##2{##1\ (##2)}\@citex{#1}}
\def\citeauthor#1{\def\citeauthoryear##1##2{##1}\@citex{#1}}
\def\citeyear#1{\def\citeauthoryear##1##2{##2}\@citex{#1}}
\def\shortcite#1{\def\citeauthoryear##1##2{##1\ ##2}\@citex{#1}}
\def\parencite#1{\def\citeauthoryear##1##2{(##1\ ##2)}\@citex{#1}}
%    \end{macrocode}
%  |\citemul| is composed from the previous commands.
%    \begin{macrocode}
\def\citemul#1{\@mcite #1\@\@}
\def\@mcite#1,#2\@\@{\citeauthor{#1}\hskip3pt(\citeyear{#1,#2})}
%    \end{macrocode}
%  \begin{macro}{\@citex}
%    The argument is a list of citations.  For each of a macro
%    containing a |\citeauthoryear| is expanded.  These things are
%    seperated by commas with following |\penalty|.
%    \begin{macrocode}
\def\@citex#1{\@tempswafalse%
 \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#1\do
    {\@citea\def\@citea{,\penalty\@citeseppen\ }\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{}}
%    \end{macrocode}
%  \end{macro}
%  The following macros are defined in order to be compatible with the
%  \Lpackage{natbib} package.  However, they only have the same
%  syntax, their functionality is not as good as with
%  \Lpackage{natbib}.
%    \begin{macrocode}
\let\ccorg@cite\cite
\newcommand{\citet}{\let\which@cite\ccorg@cite\cc@citea}
\let\cite\citet
\newcommand{\citep}{\let\which@cite\parencite\cc@citea}
\newcommand{\citealt}{\let\which@cite\shortcite\cc@citea}
\newcommand{\citealp}{\let\which@cite\shortcite\cc@citea}
\newcommand{\citetext}[1]{(#1)}
\newcommand{\@citeyearpar}[1]{\citetext{\citeyear{#1}}}
\newcommand{\citeyearpar}{\let\which@cite\@citeyearpar\cc@citea}
\let\ccorg@citeauthor\citeauthor
\renewcommand{\citeauthor}{\let\which@cite\ccorg@citeauthor\cc@citea}
\newcommand{\citefullauthor}{\citeauthor*}
\newcommand{\Citet}{\let\which@cite\cite\cc@citea}
\newcommand{\Citep}{\let\which@cite\parencite\cc@citea}
\newcommand{\Citealt}{\let\which@cite\shortcite\cc@citea}
\newcommand{\Citealp}{\let\which@cite\shortcite\cc@citea}
%
\newwarning{poormancitea}{%
  This is only a poor (wo)man's version of this command.\MessageBreak
  Please use the package  natbib.sty  for full features.\MessageBreak
  Drop the document class option  cccite }
\newcommand{\cc@citea}{%
  \ccClassWarning{poormancitea}%
  \@tempswafalse\@ifstar{\cc@cite@st}{\cc@citeb}}
\def\cc@cite@st{\@tempswatrue\cc@citeb}
\newcommand{\cc@citeb}[1][]{\def\cc@cite@a{#1}\cc@citec}
\newcommand{\cc@citec}[1][]{\def\cc@cite@b{#1}\which@cite}
%    \end{macrocode}
%  This is used in bibliography labels to produce the text.  We do not
%  want any text.  (For some reason not known to me this information
%  is stored in a macro.)
%    \begin{macrocode}
\def\@biblabel#1{%
  \def\citename##1{##1}% for authordate bib styles
  }
%    \end{macrocode}
%  We lend some code from \Lpackage{natbib} to avoid conflicts with
%  different versions of \file{cc.bst}.
%    \begin{macrocode}
\newcounter{NAT@ctr}
\def\NAT@noname{{}}
\let\ccorg@lbibitem\@lbibitem
\def\@lbibitem[#1]#2{%
  \let\citeauthoryear\bib@citeauthoryear
  \if@filesw\@tempswatrue\else\@tempswafalse\fi\@fileswfalse
  \ccorg@lbibitem[#1]{#2}%
  \if@tempswa\@fileswtrue\fi
  \NAT@ifcmd#1(@)(@)\@nil{#2}\ignorespaces}
\newcommand\NAT@ifcmd{\futurelet\NAT@temp\NAT@ifxcmd}
\newcommand\NAT@ifxcmd{%
  \ifx\NAT@temp\relax\else\expandafter\NAT@bare\fi}
\def\NAT@bare#1(#2)#3(@)#4\@nil#5{%
  \if @#2
  \expandafter\NAT@apalk#1, , \@nil{#5}\else
  \stepcounter{NAT@ctr}%
  \cc@wrout{\arabic {NAT@ctr}}{#2}{#1}{#3}{#5}
\fi
}
\newcommand\NAT@apalk{}
\def\NAT@apalk#1, #2, #3\@nil#4{\if\relax#2\relax
  \global\NAT@stdbsttrue
  \cc@wrout{#1}{}{}{}{#4}\else
  \stepcounter{NAT@ctr}%
  \cc@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\fi}
\newcommand\citeauthoryear{}
\def\bib@citeauthoryear#1#2#3(@)(@)\@nil#4{%
  \stepcounter{NAT@ctr}\if\relax#3\relax
   \cc@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\else
   \cc@wrout{\arabic {NAT@ctr}}{#3}{#2}{#1}{#4}\fi}
\newcommand\citestarts{\NAT@open}
\newcommand\citeends{\NAT@close}
\newcommand\betweenauthors{and}
\newcommand\astroncite{}
\def\astroncite#1#2(@)(@)\@nil#3{\stepcounter{NAT@ctr}\cc@wrout{\arabic
{NAT@ctr}}{#2}{#1}{}{#3}}
\newcommand\citename{}
\def\citename#1#2(@)(@)\@nil#3{\expandafter\NAT@apalk#1#2, \@nil{#3}}
\newcommand\harvarditem[4][]%
    {\if\relax#1\relax\bibitem[#2(#3)]{#4}\else
        \bibitem[#1(#3)#2]{#4}\fi }
\newcommand\harvardleft{\NAT@open}
\newcommand\harvardright{\NAT@close}
\newcommand\harvardyearleft{\NAT@open}
\newcommand\harvardyearright{\NAT@close}
\AtBeginDocument{\providecommand{\harvardand}{and}}
\newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}
\newcommand\cc@wrout[5]{%
  \if@filesw
  {\let\protect\noexpand\let~\relax
    \immediate
    \write\@auxout{\string\bibcite{#5}%
      {\protect\citeauthoryear{#3}{#2}}}}\fi
  \ignorespaces}
%</cccite>
%    \end{macrocode}
%
%  \GetFileInfo{ccdbs.sty}
%  \CodelinePrefix{D}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  \changes{v1.99}{2000/02/24}{Made this an own file}
%    \begin{macrocode}
%<*ccdbs>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ccdbs}[2000/02/20 v2.05 bibliography helper package]
%    \end{macrocode}
%
%  We manipulate |\bibliographystyle| and |\bibliography|.  By default
%  |\bibliographystyle|\linebreak[3]|{\bibstyle@default}| is called
%  unless the user issued a |\bibliographystyle| command before the
%  |\bibliography| command.
%    \begin{macrocode}
\let\ccorg@bibliographystyle\bibliographystyle
\newif\if@bibstylemissing \@bibstylemissingtrue
\def\bibliographystyle{\@bibstylemissingfalse
  \gdef\bibliographystyle##1{%
    \PackageWarning{ccdbs}{\protect\bibliographystyle\space can be
      used only before \protect\bibliography!}}%
  \ccorg@bibliographystyle}
\let\ccorg@bibliography\bibliography
\def\bibliography{%
  \if@bibstylemissing
  \bibliographystyle{\bibstyle@default}%
  \fi
  \ccorg@bibliography}
%    \end{macrocode}
%  \begin{macro}{\DefaultBibliographyStyle}
%    The command |\DefaultBibliographyStyle| allows to choose another
%    default value.  The default value of |\bibstyle@default| is
%    |plain|.
%    \begin{macrocode}
\newcommand{\DefaultBibliographyStyle}[1]{%
  \def\bibstyle@default{#1}}
\DefaultBibliographyStyle{plain}
%</ccdbs>
%    \end{macrocode}
%  \end{macro}
%
%  \GetFileInfo{cc.cls}
%  \def\filename{cctemplate.tex}
%  \CodelinePrefix{p}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%  \changes{v2.07}{2007/01/11}{Changed bibliography basename to
%    \cs{jobname}. Michael N{\"{u}}sken, Bonn}
%  \changes{v2.25a}{2012/06/25}{Corrected type. Michael N{\"{u}}sken,
%    Bonn}
%    \begin{macrocode}
%<*cctemplate>
%%% Template (2011/07/27) for an article using cc
\begin{filecontents*}{\jobname.bib}
  %% Insert your bibliography file here
\end{filecontents*}
\begin{filecontents}{\jobname.bbl}
  %% Insert your bbl file here if you do not have a bibliography file
\end{filecontents}

\documentclass{cc}

%%\ccsps{}

%%% personal macros and packages
%%% end of personal macros and packages

\contact{}% Insert contact email address here.
\submitted{}% Insert the date on which you made the original
           % submission of your paper to computational complexity,
           % in the format \submitted{8 August 2008}.
\title{}% Insert title here. (Use \\ to split lines.)
%%\titlehead{}% If necessary insert running head title here.
\author{}% Insert author list here. (Each author must be given
         % including his/her current address, email and possibly
         % homepage.  Lines are seperated by \\, different authors
         % are separated by \and .)
%%\authorhead{}% If necessary insert running head authors here.
%%\authorlist{}% If necessary insert title author list here.

\begin{abstract}
  %% Insert abstract here.
\end{abstract}

\begin{keywords}
  %% Insert keywords here.
\end{keywords}

\begin{subject}
  %% Insert subject classification here.
\end{subject}



\begin{document}

%%% Insert your article text here.






\begin{acknowledge}
  %% Insert your acknowledgments here.
\end{acknowledge}
%% \noacknowledge% This command must be here if there are no
                 % acknowledgements.

\bibliography{cc-journals,\jobname}% Put your bibliography into the above
                                % filecontents environment!

\end{document}

%</cctemplate>
%    \end{macrocode}
%
%  \GetFileInfo{cc.cls}
%  \def\filename{cc-portability-frame.tex}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%  \changes{v2.03}{2003/05/26}{Added cc-portability-frame.tex ...}
%    \begin{macrocode}
%<*ccportabilityframe>
\newif\ifcc\IfFileExists{cc.cls}{\cctrue}{\ccfalse}\ifcc

%%% Include your document here
%%% (formatted as described in this documentation or
%%%  sketched by the template file cctemplate.tex).

\else

%%% Include cc-cls-inline.tex here.

\typeout{Please call latex again.}
\makeatletter\expandafter\@@end
\fi
%</ccportabilityframe>
%    \end{macrocode}
%
%  \def\filename{ccreltx.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It is a helper that deactivates changes made by \Lpackage{amsthm}
%  or thelike, and reactivates the original \LaTeX{} definitions.  In
%  fact, the following is just an extract of \file{ltthm.dtx} which is
%  part of the \LaTeX{} basis.
%    \begin{macrocode}
%<*ccreltx>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ccreltx}[2002/05/22 v2.05
         computational complexity, reactivate ltthm.
         Michael Nuesken, Bonn.]
% From File: ltthm.dtx
\def\newtheorem#1{%
  \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}}
\def\@nthm#1#2{%
  \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}}
\def\@xnthm#1#2[#3]{%
  \expandafter\@ifdefinable\csname #1\endcsname
    {\@definecounter{#1}\@newctr{#1}[#3]%
     \expandafter\xdef\csname the#1\endcsname{%
       \expandafter\noexpand\csname the#3\endcsname \@thmcountersep
          \@thmcounter{#1}}%
     \global\@namedef{#1}{\@thm{#1}{#2}}%
     \global\@namedef{end#1}{\@endtheorem}}}
\def\@ynthm#1#2{%
  \expandafter\@ifdefinable\csname #1\endcsname
    {\@definecounter{#1}%
     \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
     \global\@namedef{#1}{\@thm{#1}{#2}}%
     \global\@namedef{end#1}{\@endtheorem}}}
\def\@othm#1[#2]#3{%
  \@ifundefined{c@#2}{\@nocounterr{#2}}%
    {\expandafter\@ifdefinable\csname #1\endcsname
    {\global\@namedef{the#1}{\@nameuse{the#2}}%
  \global\@namedef{#1}{\@thm{#2}{#3}}%
  \global\@namedef{end#1}{\@endtheorem}}}}
\def\@thm#1#2{%
  \refstepcounter{#1}%
  \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
\def\@xthm#1#2{%
  \@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}
\def\@ythm#1#2[#3]{%
  \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}\ignorespaces}
\def\@thmcounter#1{\noexpand\arabic{#1}}
\def\@thmcountersep{.}
\def\@begintheorem#1#2{\trivlist
   \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape}
\def\@opargbegintheorem#1#2#3{\trivlist
      \item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape}
\def\@endtheorem{\endtrivlist}
%</ccreltx>
%    \end{macrocode}
%
%  \def\filename{cc4apjrnl.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{apjrnl} for a file that
%  has been written with the document class \Lclass{cc}.  To do this
%  add the line
%  \begin{verbatim}
% \expandafter\def\csname ver@apthm.sty\endcsname{2001/03/05}
%  \end{verbatim}
%  \emph{before} the |\documentclass| and a |\usepackage{cc4apjrnl}|
%  after it.
%    \begin{macrocode}
%<*cc4apjrnl>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4apjrnl}[2002/01/08 v2.05
         computational complexity, adaptions to apjrnl.
         Michael Nuesken, Bonn.]
% Forget this AP definition
\let\answer\relax
\let\endanswer\relax
% Load our definitions
\RequirePackage{amsmath}[1997/03/20 v1.2d]
% amsmath contains amstext, amsgen, amsbsy, amsopn
\RequirePackage{amsfonts}[1997/09/17 v2.2e]
\RequirePackage{amssymb}[1996/11/03 v2.2b]
\RequirePackage{ccaux}
\RequirePackage{ccreltx}% deactivate amsthm.sty and reactive LaTeX's definitions.
\@longarticletrue
\@adjustnumbering
\let\theorem@style\@undefined
\RequirePackage{ccthm}
\RequirePackage{ccqed}
\let\proof\@undefined
\let\endproof\@undefined
\RequirePackage{ccproof}
\RequirePackage{cc2cite}
\RequirePackage{url}[1999/03/02 ver 1.4]
\expandafter\def\expandafter\UrlSpecials\expandafter{%
  \UrlSpecials\do\%{}}
\providecommand{\email}{\begingroup\urlstyle{tt}\Url}
\providecommand{\homepage}{\begingroup\scriptsize\urlstyle{tt}\Url}
% Adapt to AP style
\gdef\theorem@headerfont{\scshape\null\hskip\parindent}
\gdef\Proof{\textit{Proof}}
\renewcommand{\qedsymbol}{\rule{2pt}{4pt}}
%</cc4apjrnl>
%    \end{macrocode}
%
%  \def\filename{cc4amsart.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{amsart} or derivatives
%  of it (as \Lclass{mcom-l}, \dots) for a file that has been written
%  with the document class \Lclass{cc}.  To do this add a
%  |\usepackage{cc4amsart}| after it.
%  \changes{v2.05}{2209/12/22}{Added \cs{@adjustnumbering}.}
%    \begin{macrocode}
%<*cc4amsart>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4amsart}[2009/12/22 v2.05b
         computational complexity, adaptions to amsart.
         Michael Nuesken, Bonn.]
\RequirePackage{ccaux}
% ccreltex deactivates amsthm.sty and reactive LaTeX's definitions.
\RequirePackage{ccreltx}
\PassOptionsToPackage{bare}{relabel}
\RequirePackage{thcc}
\gdef\theorem@headerfont{\bfseries}
% \def\th@cc{%
%   \normalfont\itshape
%   \def\@begintheorem##1##2{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
%   \def\@opargbegintheorem##1##2##3{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2\ %
%     \normalfont({\activate@shortcite{}##3}).]}%
%   }
\@longarticletrue
\RequirePackage{ccthm}
\babel\def\ccacknowledgementsname{Acknowledgements}[%
  german=Danksagung,french=Remerciements]
\newenvironment{acknowledge}{\section*{\ccacknowledgementsname}}{}
\RequirePackage{relabel}
\RequirePackage{cc2cite}
\RequirePackage{ccqed}
\AtBeginDocument{\@adjustnumbering}
%</cc4amsart>
%    \end{macrocode}
%
%  \def\filename{cc4svjour.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{svjour3} or derivatives
%  of it for a file that has been written with the document class
%  \Lclass{cc}.  To do this add a |\usepackage{cc4svjour}| after it.
%  \changes{v2.14}{2010/10/14}{Derived from \lpackage{cc4amsart}\texttt{.sty}.}
%    \begin{macrocode}
%<*cc4svjour>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4svjour}[2010/10/14 v2.15
         computational complexity, adaptions to svjour3.
         Michael Nuesken, Bonn.]
\RequirePackage{ccaux}
\RequirePackage{cc2cite}
% ccreltex deactivates amsthm.sty and reactive LaTeX's definitions.
\RequirePackage{ccreltx}
\PassOptionsToPackage{bare}{relabel}
\RequirePackage{thcc}
\gdef\theorem@headerfont{\bfseries}
% \def\th@cc{%
%   \normalfont\itshape
%   \def\@begintheorem##1##2{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
%   \def\@opargbegintheorem##1##2##3{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2\ %
%     \normalfont({\activate@shortcite{}##3}).]}%
%   }
%
%% Deactivate svjour3's theorem definitions:
\let\claim\relax \let\endclaim\relax
\let\conjecture\relax \let\endconjecture\relax
\let\corollary\relax \let\endcorollary\relax
\let\counterexample\relax \let\endcounterexample\relax
\let\definition\relax \let\enddefinition\relax
\let\exercise\relax \let\endexercise\relax
\let\fact\relax \let\endfact\relax
\let\hypothesis\relax \let\endhypothesis\relax
\let\lemma\relax \let\endlemma\relax
\let\notation\relax \let\endnotation\relax
\let\note\relax \let\endnote\relax
\let\observation\relax \let\endobservation\relax
\let\open\relax \let\endopen\relax
\let\openquestion\relax \let\endopenquestion\relax
\let\problem\relax \let\endproblem\relax
\let\proposition\relax \let\endproposition\relax
\let\question\relax \let\endquestion\relax
\let\remark\relax \let\endremark\relax
\let\result\relax \let\endresult\relax
\let\theorem\relax \let\endtheorem\relax
\let\thesis\relax \let\endthesis\relax
\let\warning\relax \let\endwarning\relax
\let\example\relax \let\endexample\relax
\@longarticletrue
\RequirePackage{ccthm}
\babel\def\ccacknowledgementsname{Acknowledgements}[%
  german=Danksagung,french=Remerciements]
\newenvironment{acknowledge}{\section*{\ccacknowledgementsname}}{}
\RequirePackage{relabel}
\RequirePackage{cc2cite}
\RequirePackage{ccqed}
\RequirePackage{amsmath} 
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage{url}
\providecommand{\homepage}{\begingroup\scriptsize\urlstyle{tt}\Url}
\AtBeginDocument{\@adjustnumbering}
%</cc4svjour>
%    \end{macrocode}
%
%  \def\filename{cc4llncs.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{llncs} for a file that
%  has been written with the document class \Lclass{cc}.  To do this
%  add the line |\usepackage{cc4llncs}|.
%    \begin{macrocode}
%<*cc4llncs>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4llncs}[2002/10/01 v2.05
         computational complexity, adaptions to llncs.
         Michael Nuesken, Bonn.]
% Forget these llncs definitions
\let\claim\relax \let\endclaim\relax
\let\conjecture\relax \let\endconjecture\relax
\let\corollary\relax \let\endcorollary\relax
\let\counterexample\relax \let\endcounterexample\relax
\let\definition\relax \let\enddefinition\relax
\let\exercise\relax \let\endexercise\relax
\let\fact\relax \let\endfact\relax
\let\hypothesis\relax \let\endhypothesis\relax
\let\lemma\relax \let\endlemma\relax
\let\notation\relax \let\endnotation\relax
\let\note\relax \let\endnote\relax
\let\observation\relax \let\endobservation\relax
\let\open\relax \let\endopen\relax
\let\openquestion\relax \let\endopenquestion\relax
\let\problem\relax \let\endproblem\relax
\let\proposition\relax \let\endproposition\relax
\let\question\relax \let\endquestion\relax
\let\remark\relax \let\endremark\relax
\let\result\relax \let\endresult\relax
\let\theorem\relax \let\endtheorem\relax
\let\thesis\relax \let\endthesis\relax
\let\warning\relax \let\endwarning\relax
\let\example\relax \let\endexample\relax
\let\proof\relax \let\endproof\relax
% Load our definitions
\RequirePackage{amsmath}[1997/03/20 v1.2d]
% amsmath contains amstext, amsgen, amsbsy, amsopn
\RequirePackage{amsfonts}[1997/09/17 v2.2e]
\RequirePackage{amssymb}[1996/11/03 v2.2b]
\RequirePackage{ccaux}
\@longarticletrue
% ccreltex deactivates amsthm.sty and reactive LaTeX's definitions.
\RequirePackage{ccreltx}
\RequirePackage{ccref}
\RequirePackage{ccthm,ccproof}
\theoremheaderfont{\upshape\bfseries}
\RequirePackage{ccalgo}
% Load our citation scheme but keep llncs environment thebibliography.
\let\origthebibliography\thebibliography
\let\origendthebibliography\endthebibliography
\let\citeauthoryear\relax
\RequirePackage{cc2cite}
\let\thebibliography\origthebibliography
\let\endthebibliography\origendthebibliography
%
\RequirePackage{url}[1999/03/02 ver 1.4]
\expandafter\def\expandafter\UrlSpecials\expandafter{%
  \UrlSpecials\do\%{}}
\providecommand{\email}{\begingroup\urlstyle{tt}\Url}
\providecommand{\homepage}{\begingroup\scriptsize\urlstyle{tt}\Url}
% one of our helpers
\def\condbreak#1{%
  \vskip 0pt plus #1%
  \pagebreak[3]%
  \vskip 0pt plus -#1%
  \relax}
%</cc4llncs>
%    \end{macrocode}
%
%  \def\filename{cc4siamltex.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{amsart} or derivatives
%  of it (as \Lclass{mcom-l}, \dots) for a file that has been written
%  with the document class \Lclass{cc}.  To do this add a
%  |\usepackage{cc4siamltex}| after it.
%    \begin{macrocode}
%<*cc4siamltex>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4siamltex}[2002/05/22 v2.05
         computational complexity, adaptions to siamltex.
         Michael Nuesken, Bonn.]

\let\theorem\relax
\let\endtheorem\relax
\let\lemma\relax
\let\endlemma\relax
\let\corollary\relax
\let\endcorollary\relax
\let\proposition\relax
\let\endproposition\relax
\let\definition\relax
\let\enddefinition\relax
\let\proof\relax
\let\endproof\relax

\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage{ccaux}
% ccreltex deactivates amsthm.sty and reactive LaTeX's definitions.
\RequirePackage{ccreltx}
% \PassOptionsToPackage{bare}{relabel}
\RequirePackage{ccthm}
\RequirePackage{relabel}
\RequirePackage{cc2cite}
\RequirePackage{ccproof}
\renewcommand{\Proof}{\textit{Proof}}
\renewcommand{\qedsymbol}{\vbox{\hrule height0.6pt\hbox{%
      \vrule height1.3ex width0.6pt\hskip0.8ex
      \vrule width0.6pt}\hrule height0.6pt
    }}
\RequirePackage{ccalgo}
\babel\def\ccacknowledgementsname{Acknowledgements}[%
  german=Danksagung,french=Remerciements]
\newenvironment{acknowledge}{\section*{\ccacknowledgementsname}}{}
\RequirePackage{url}[1999/03/02 ver 1.4]
\expandafter\def\expandafter\UrlSpecials\expandafter{%
  \UrlSpecials\do\%{}}
\providecommand{\email}{\begingroup\urlstyle{tt}\Url}
\providecommand{\homepage}{\begingroup\scriptsize\urlstyle{tt}\Url}
%</cc4siamltex>
%    \end{macrocode}
%
%  \def\filename{cc4jT.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{amsart} or derivatives
%  of it (as \Lclass{mcom-l}, \dots) for a file that has been written
%  with the document class \Lclass{cc}.  To do this add a
%  |\usepackage{cc4amsart}| after it.
%    \begin{macrocode}
%<*cc4jT>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4jT}[2002/01/08 v2.05
         computational complexity, adaptions to jT which uses amsart.
         Michael Nuesken, Bonn.]
\RequirePackage{ccaux}
% ccreltex deactivates amsthm.sty and reactive LaTeX's definitions.
\RequirePackage{ccreltx}
\PassOptionsToPackage{bare}{relabel}
\RequirePackage{thcc}
\gdef\theorem@headerfont{\bfseries}
% \def\th@cc{%
%   \normalfont\itshape
%   \def\@begintheorem##1##2{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
%   \def\@opargbegintheorem##1##2##3{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2\ %
%     \normalfont({\activate@shortcite{}##3}).]}%
%   }
\@longarticletrue
\let\proof\relax\let\endproof\relax
\RequirePackage{ccthm}
\RequirePackage{ccproof}
\RequirePackage{ccqed}
\babel\def\ccacknowledgementsname{Acknowledgements}[%
  german=Danksagung,french=Remerciements]
\newenvironment{acknowledge}{\section*{\ccacknowledgementsname}}{}
\RequirePackage{relabel}
\babel\def\partname{Part}[german=Teil,french=\protect\@Fpt partie]
\defprefix{part}{\partname~}
\babel\def\chaptername{Chapter}[german=Kapitel,french=Chapitre]
\defprefix{chapter}{\chaptername~}
\babel\def\sectionname{Section}[german=Abschnitt,french=Section]
\defprefix{section}{\sectionname~}
\babel\def\subsectionname{Section}[german=Abschnitt,french=Section]
\defprefix{subsection}{\subsectionname~}
\babel\def\subsubsectionname{Section}[german=Abschnitt,french=Section]
\defprefix{subsubsection}{\subsubsectionname~}
\let\ccorg@appendix\appendix
\babel\def\appendixname{Appendix}[german=Anhang,french=Annexe]
\def\appendix{%
  \defprefix{section}{\appendixname~}%
  \defprefix{subsection}{\appendixname~}%
  \defprefix{subsubsection}{\appendixname~}%
  \ccorg@appendix}
\defprefix{equation}#1{(#1)}
\babel\def\figurename{Figure}[german=Figur,french={\scshape Figure}]
\defprefix{figure}{\figurename~}
\babel\def\tablename{Table}[german=Tafel,french={\scshape Table}]
\defprefix{table}{\tablename~}
\numberallwithin{section}
\AtBeginDocument{\@adjustnumbering}
\RequirePackage{cc2cite}
\RequirePackage{url}
%</cc4jT>
%    \end{macrocode}
%
%  \def\filename{cc4elsart.sty}
%  \CodelinePrefix{}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
%
%  It allows to use the document class \Lclass{amsart} or derivatives
%  of it (as \Lclass{mcom-l}, \dots) for a file that has been written
%  with the document class \Lclass{cc}.  To do this add a
%  |\usepackage{cc4amsart}| after it. 
%  \changes{v2.05}{2209/12/22}{Added ams packages.}
%    \begin{macrocode}
%<*cc4elsart>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cc4elsart}[2009/12/22 v2.05b
         computational complexity, adaptions to elsart.
         Michael Nuesken, Bonn.]
\RequirePackage{ccaux}
% ccreltex deactivates amsthm.sty and reactive LaTeX's definitions.
\RequirePackage{ccreltx}
\PassOptionsToPackage{bare}{relabel}
\RequirePackage{thcc}
% \gdef\theorem@headerfont{\bfseries}
% \def\th@cc{%
%   \normalfont\itshape
%   \def\@begintheorem##1##2{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
%   \def\@opargbegintheorem##1##2##3{\item
%     [\hskip\labelsep \theorem@headerfont ##1\ ##2\ %
%     \normalfont({\activate@shortcite{}##3}).]}%
%   }
\@longarticletrue
\let\claim\relax
\let\fact\relax
\let\note\relax
\let\proof\relax\let\endproof\relax
\RequirePackage{ccthm}
\RequirePackage{ccproof}
\RequirePackage{ccqed}
\babel\def\ccacknowledgementsname{Acknowledgements}[%
  german=Danksagung,french=Remerciements]
\newenvironment{acknowledge}{\section*{\ccacknowledgementsname}}{}
\RequirePackage{relabel}
\babel\def\partname{Part}[german=Teil,french=\protect\@Fpt partie]
\defprefix{part}{\partname~}
\babel\def\chaptername{Chapter}[german=Kapitel,french=Chapitre]
\defprefix{chapter}{\chaptername~}
\babel\def\sectionname{Section}[german=Abschnitt,french=Section]
\defprefix{section}{\sectionname~}
\babel\def\subsectionname{Section}[german=Abschnitt,french=Section]
\defprefix{subsection}{\subsectionname~}
\babel\def\subsubsectionname{Section}[german=Abschnitt,french=Section]
\defprefix{subsubsection}{\subsubsectionname~}
\let\ccorg@appendix\appendix
\babel\def\appendixname{Appendix}[german=Anhang,french=Annexe]
\def\appendix{%
  \defprefix{section}{\appendixname~}%
  \defprefix{subsection}{\appendixname~}%
  \defprefix{subsubsection}{\appendixname~}%
  \ccorg@appendix}
\defprefix{equation}#1{(#1)}
\babel\def\figurename{Figure}[german=Figur,french={\scshape Figure}]
\defprefix{figure}{\figurename~}
\babel\def\tablename{Table}[german=Tafel,french={\scshape Table}]
\defprefix{table}{\tablename~}
\RequirePackage{amsmath}[2000/01/15 v2.05]% 1997/03/20 v1.2d
% amsmath contains amstext, amsgen, amsbsy, amsopn
\RequirePackage{amsfonts}[1997/09/17 v2.2e]
\RequirePackage{amssymb}[1996/11/03 v2.2b]
\numberallwithin{section}
\AtBeginDocument{\@adjustnumbering}
% \RequirePackage{cc2cite}
% \RequirePackage{url}
%</cc4elsart>
%    \end{macrocode}
%
%  \def\filename{cc2.dbj}
%  \def\fileversion{v2.01}
%  \def\filedate{2000/02/29}
%  \CodelinePrefix{B}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.  Run this file with \texttt{tex \filename} to
%  produce \file{cc2.bst} from scratch (ie. from \file{merlin.mbs}).
%  See \Lpackage{makebst} for more information.
%    \begin{macrocode}
%<*cc2dbj>
%<<CC2DBJ>
%% Driver file to produce cc2.bst from merlin.mbs
%% Generated with makebst, version 3.2 (1999/02/24)
%% Produced on 2000/02/28 at 10:28
%% 
\input docstrip

\preamble
----------------------------------------
*** bst for computational complexity with natbib.sty ***

\endpreamble

\postamble
End of customized bst file
\endpostamble

\keepsilent

\askforoverwritefalse
\def\MBopts{\from{merlin.mbs}{%
%  babel%: Babel
    %: (def) English
%--------------------
%  ,cite%: Cite key
%  ,alfph,alf-f%: Alpha style, Jones90
%  ,alph,alf-1%: Alpha style, Jon90
%  ,alph%: Alpha style, Jon90 or JWB90
  ,ay%: Author-year
%  %(def) Numerical
%--------------------
%  ,cn%: Author-date
%  ,nmd%: Named
%  ,cay%: Chicago
%  ,ast%: Astronomy
%  ,har%: Harvard
%  ,alk%: Apalike
%  %(def) Older Natbib
  ,nat%: Natbib
%--------------------
  ,lang%: Add language field
%  %(def) No language field
%--------------------
%  ,annote%: Annotations
    %: (def) No annotations
%--------------------
%  ,seq-no%: Citation order
%  ,seq-yr%: Year ordered
%  ,seq-key%: By label and cite key
%  ,seq-lab%: By label
  %(def) Alphabetical
%--------------------
  ,vonx%: Sort without von part
%  %(def) Sort on von part
%--------------------
%  ,nm-revv1%: First name reversed, with full names
%  ,nm-rev1%: Only first name reversed, initials
%  ,nm-rvv%: Surname + spaceless initials
%  ,nm-rvx%: Surname + pure initials
%  ,nm-rv%: Surname + dotless initials
%  ,nm-rev%: Surname + initials
%  ,nm-init,ed-au%: Initials + surname
%  ,nm-revf%: Full, surname first
  ,ed-au%: Full, surname last
%--------------------
%  ,jnrlab%: `Junior' in citations
    %: (def) No `junior' part in the citations
%--------------------
%  ,aunm-sl%: Names separated by slash
%  ,aunm-semi%: Names separated by semi-colon
    %: (def) Author names separated by commas
%--------------------
%  ,nmdash%: Repeated author/editor names replaced by dash
    %: (def) Author/editor names always present
%--------------------
%  ,nmlm%: Limited authors
    %: (def) All authors
%--------------------
%  ,nmft,nmft-def%: User defined author font
%  ,nmft,nmft-bf%: Bold authors
%  ,nmft,nmft-it%: Italic authors
  ,nmft,nmft-sc%: Small caps authors
%  %(def) Normal font for author names
%--------------------
%  ,fnm-def%: First names in user defined font
%  ,fnm-rm%: First names in normal font
  %(def) First names same font as surnames
%--------------------
  ,nmfted%: Editors incollection like authors
%  %(def) Editors incollection normal font
%--------------------
  ,nmand-rm%: `And' in normal font
%  %(def) `And' in author font
%--------------------
%  ,lab,lab-def%: User defined citation font
%  ,lab,lab-bf%: Cited authors bold
%  ,lab,lab-sc%: Cited authors small caps
%  ,lab,lab-it%: Cited authors italic
    %: (def) Cited authors plain
%--------------------
%  ,xlab-it%: Extra label italic
    %: (def) Extra label plain
%--------------------
    %: (def) Year included when KEY replaces missing author
%  ,keyxyr%: Year blank when KEY replaces missing author
%--------------------
%  ,blkyear%: Missing date left blank
    %: (def) Missing date set to ????
%--------------------
%  ,dt-end%: Date at very end
%  ,dt-jnl%: Date part of journal spec.
  ,dt-beg%: Date after authors
%  %(def) Date at end
%--------------------
%  ,yr-blk%: Year preceded by space
%  ,yr-com%: Date preceded by comma
%  ,yr-per%: Year preceded by period
%  ,yr-col%: Year preceded by colon
%  ,yr-brk%: Year in brackets
  ,yr-par%: Year in parentheses
%  %(def) Year plain
%--------------------
%  ,aymth%: Include month in date
    %: (def) Date is year only
%--------------------
%  ,yrp-x%: No punct. after date
%  ,yrp-per%: Period after date
%  ,yrp-semi%: Semi-colon after date
%  ,yrp-col%: Colon after date
    %: (def) Date with standard block punctuation
%--------------------
%  ,yrpp-xsp%: No space after date
    %: (def) Space after date
%--------------------
%  ,dtbf%: Date in bold face
    %: (def) Date in normal font
%--------------------
%  %(def) Year truncated
  ,note-yr%: Year text full
%--------------------
%  ,tit-qq,qt-g,qx%: Title in guillemets
%  ,tit-qq,qx%: Title in double quotes
%  ,tit-qq,qt-s,qx%: Title in single quotes
%  ,tit-qq,qt-g%: Title and punctuation in guillemets
%  ,tit-qq%: Title and punctuation in double quotes
%  ,tit-qq,qt-s%: Title and punctuation in single quotes
%  ,tit-it%: Title italic
    %: (def) Title plain
%--------------------
  ,atit-u%: Title style
%  %(def) Sentence style
%--------------------
%  ,jtit-x%: No article title
    %: (def) Article title present
%--------------------
%  ,jxper%: Dotless journal names
    %: (def) Periods in journal names
%--------------------
%  ,jttl-rm%: Journal title normal
    %: (def) Journal title italics
%--------------------
%  ,thtit-a%: Thesis title like article
    %: (def) Thesis titles like books
%--------------------
%  ,trtit-b%: Tech. report title like books
    %: (def) Tech. report title like articles
%--------------------
%  ,trnum-it%: Tech. report and number italic
    %: (def) Tech. report and number plain
%--------------------
%  ,vol-2bf%: Volume and number bold
  ,vol-bf%: Volume bold
%  ,vol-it%: Volume italic
%  %(def) Volume plain
%--------------------
%  ,vnum-x%: Journal vol, without number
%  ,vnum-b%: Journal vol number
%  ,vnum-h%: Journal vol, \# number
%  ,vnum-nr%: Journal vol, no. num
%  ,vnum-cm%: Journal vol, num
%  ,vnum-sp%: Journal vol (num)
    %: (def) Journal vol(num)
%--------------------
%  ,volp-blk%: Volume with blank
  ,volp-com%: Volume with comma
%  ,volp-semi%: Volume with semi-colon
%  ,volp-sp%: Volume with colon and space
%  %(def) Volume with colon
%--------------------
%  ,jdt-pc%: Year, comma, pages
%  ,jdt-p%: Year with pages
%  ,jdt-vs%: Journal vol (year)
%  ,jdt-v%: Journal vol(year)
    %: (def) Journal year like others
%--------------------
%  ,jpg-1%: Only start page number
    %: (def) Start and stop page numbers
%--------------------
%  ,pgsep-p%: Period inserted over 9999
   ,pgsep-s%: Thin space inserted over 9999
%  ,pgsep-c%: Comma inserted over 9999
%   %: (def) No separators for large page numbers
%--------------------
%  ,jwdpg%: Include `page' in articles
    %: (def) Article pages numbers only
%--------------------
%  ,pp-last%: Pages at end
    %: (def) Pages given mid text
%--------------------
%  ,jwdvol%: Include `volume' in articles
    %: (def) Article volume as number only
%--------------------
%  ,num-xser%: Allows number without series
    %: (def) Standard BibTeX
%--------------------
%  ,numser%: Just before publisher
    %: (def) After chapter and pages
%--------------------
  ,jnm-x%: Space after journal
%  %(def) Comma after journal
%--------------------
%  ,btit-rm,bt-rm%: Book title plain
    %: (def) Book title italic
%--------------------
%  ,bkpg-x%: Pages in book bare
%  ,bkpg-par%: Pages in book in parentheses
    %: (def) Pages in book plain
%--------------------
  ,pg-bk%: For book: 345 pages
    %: (def) Total book pages not printed
%--------------------
%  ,add-pub%: Address: Publisher
    %: (def) Publisher, address
%--------------------
%  ,pub-date,pub-xpar,pub-xc%: Publisher and date, no parentheses, no comma
%  ,pub-date,pub-xpar%: Publisher and date without parentheses
%  ,pub-date,pub-xc%: Publisher and date in parentheses, no comma
%  ,pub-date%: Publisher and date in parentheses
%  ,pub-par%: Publisher in parentheses
    %: (def) Publisher as normal block
%--------------------
%  ,pre-edn%: Publisher after edition
%  ,pre-pub%: Publisher before chapter, pages
    %: (def) Publisher after chapter, pages
%--------------------
%  %(def) No ISBN
  ,isbn%: Include ISBN
%--------------------
%  %(def) No ISSN
  ,issn%: Include ISSN
%--------------------
%  ,url,url-nl%: URL on new line
%  ,url,url-nt%: URL as note
  ,url,url-blk%: Include URL
%  %(def) No URL
%--------------------
%  ,edparc,bkedcap%: `Name, (Editor)'
%  ,edparc%: `Name, (editor)'
%  ,edpar,bkedcap%: `Name (Editor),'
  ,edpar%: `Name (editor),'
%  %(def) Word `editor' after name
%--------------------
%  ,edby-par,edbyy%: Booktitle (.., editor)
   ,edby,edbyy%: Booktitle, .., editor
%  ,edby-parc,edbyx%: Booktitle, (editor..)
%  ,edby-par,edbyx%: Booktitle (editor..)
%  ,edby,edbyw%: Booktitle, (editor) ..
%  ,edby,edbyx%: Booktitle, editor ..
%  ,edby-parc%: Booktitle, (edited by ..)
%  ,edby-par%: Booktitle (edited by ..)
%  ,edby%: Booktitle, edited by .. 
%   %: (def) .., editor, booktitle
%--------------------
%  ,blk-tita%: Period after titles of articles
%  ,blk-tit%: Period after titles of articles, books, etc
%  ,blk-com,com-blank%: Blanks between blocks
%  ,blk-com,com-semi%: Semi-colon between blocks
%  ,blk-com%: Comma between blocks
    %: (def) \newblock after blocks
%--------------------
%  ,au-col%: Author block with colon
    %: (def) Author block normal
%--------------------
%  ,in-x%: No word `in'
%  ,in-col%: Colon after `in'
    %: (def) Space after `in'
%--------------------
%  ,injnl%: Add `in' before journal name
    %: (def) No `in' before journal name
%--------------------
%  ,fin-bare%: No period at end
    %: (def) Period at very end
%--------------------
   ,ppx%: `Page' omitted
%  ,pp%: `Page' abbreviated
%   %: (def) `Page(s)'
%--------------------
%  ,ed%: `Editor' abbreviated
    %: (def) `Editor(s)'
%--------------------
%  ,abr%: Abbreviations
    %: (def) No abbreviations
%--------------------
  ,ord%: Numerical editions
%  %(def) Write out editions
%  ,xedn%: Editions as in database
%--------------------
%  ,jabr%: Abbreviated journal names
    %: (def) Full journal names
%--------------------
%  ,varand%: Use \BIBand
  ,amper%: Use ampersand
%  %(def) Use word `and'
%--------------------
%  ,and-com%: Comma even with 2 authors
  ,and-xcom%: No comma before `and'
%  %(def) Comma before `and'
%--------------------
%  ,xand%: No `and'
    %: (def) With `and'
%--------------------
%  ,etal-rm%: Roman et al
  ,etal-it%: Italic et al
%  %(def) Plain et al
%--------------------
%  ,em-ul%: Underlining
%  ,em-x%: No italics
%  ,em-it%: Use true italics
    %: (def) Use emphasis
%--------------------
  ,nfss%: NFSS
%  %(def) No NFSS
%--------------------
  }}
\generate{\file{cc2.bst}{\MBopts}}
\endbatchfile
%CC2DBJ>
%</cc2dbj>
%    \end{macrocode}
%
%
%  \def\filename{cc2.bst}
%  \def\fileversion{v2.09}
%  \def\filedate{2008/04/25}
%  \CodelinePrefix{b}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
% \ifbst% the new bibliography style is normally not printed.
%  \hfuzz=\oddsidemargin
%  \def\MacroFont{\fontencoding\encodingdefault
%                    \fontfamily\ttdefault
%                    \fontseries\mddefault
%                    \fontshape\updefault
%                    \tiny}
% \let\AltMacroFont\MacroFont
% \renewcommand{\theCodelineNo}{\rmfamily\tiny b\arabic{CodelineNo}}%
%    \begin{macrocode}
%<*cc2bst>
%<<CC2BST>
%%
%% This is file `cc2.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% merlin.mbs  (with options: `,ay,nat,lang,vonx,ed-au,nmft,nmft-sc,nmfted,nmand-rm,dt-beg,yr-par,note-yr,atit-u,vol-bf,volp-com,pgsep-s,jnm-x,pg-bk,isbn,issn,url,url-blk,edpar,edby,edbyy,ppx,ord,amper,and-xcom,etal-it,nfss')
%% ----------------------------------------
%% *** bst for computational complexity with natbib.sty ***
%% 
%% Copyright 1994-2007 Patrick W Daly
 % ===============================================================
 % IMPORTANT NOTICE:
 % This bibliographic style (bst) file has been generated from one or
 % more master bibliographic style (mbs) files, listed above.
 %
 % This generated file can be redistributed and/or modified under the terms
 % of the LaTeX Project Public License Distributed from CTAN
 % archives in directory macros/latex/base/lppl.txt; either
 % version 1 of the License, or any later version.
 % ===============================================================
 % Name and version information of the main mbs file:
 % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)]
 %   For use with BibTeX version 0.99a or later
 %-------------------------------------------------------------------
 % This bibliography style file is intended for texts in ENGLISH
 % This is an author-year citation style bibliography. As such, it is
 % non-standard LaTeX, and requires a special package file to function properly.
 % Such a package is    natbib.sty   by Patrick W. Daly
 % The form of the \bibitem entries is
 %   \bibitem[Jones et al.(1990)]{key}...
 %   \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
 % The essential feature is that the label (the part in brackets) consists
 % of the author names, as they should appear in the citation, with the year
 % in parentheses following. There must be no space before the opening
 % parenthesis!
 % With natbib v5.3, a full list of authors may also follow the year.
 % In natbib.sty, it is possible to define the type of enclosures that is
 % really wanted (brackets or parentheses), but in either case, there must
 % be parentheses in the label.
 % The \cite command functions as follows:
 %   \citet{key} ==>>                Jones et al. (1990)
 %   \citet*{key} ==>>               Jones, Baker, and Smith (1990)
 %   \citep{key} ==>>                (Jones et al., 1990)
 %   \citep*{key} ==>>               (Jones, Baker, and Smith, 1990)
 %   \citep[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
 %   \citep[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
 %   \citep[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
 %   \citeauthor{key} ==>>           Jones et al.
 %   \citeauthor*{key} ==>>          Jones, Baker, and Smith
 %   \citeyear{key} ==>>             1990
 %---------------------------------------------------------------------

ENTRY
  { address
    author
    booktitle
    chapter
    edition
    editor
    eid
    howpublished
    institution
    isbn
    issn
    journal
    key
    language
    month
    note
    number
    organization
    pages
    publisher
    school
    series
    title
    type
    url
    volume
    year
  }
  {}
  { label extra.label sort.label short.list }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
  #1 'mid.sentence :=
  #2 'after.sentence :=
  #3 'after.block :=
}
STRINGS { s t}
FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ", " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
            'write$
            { add.period$ " " * write$ }
          if$
        }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}
FUNCTION {output}
{ duplicate$ empty$
    'pop$
    'output.nonnull
  if$
}
FUNCTION {output.check}
{ 't :=
  duplicate$ empty$
    { pop$ "empty " t * " in " * cite$ * warning$ }
    'output.nonnull
  if$
}
FUNCTION {fin.entry}
{ add.period$
  write$
  newline$
}

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

FUNCTION {date.block}
{
  new.block
}

FUNCTION {not}
{   { #0 }
    { #1 }
  if$
}
FUNCTION {and}
{   'skip$
    { pop$ #0 }
  if$
}
FUNCTION {or}
{   { pop$ #1 }
    'skip$
  if$
}
FUNCTION {new.block.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.block
  if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}
FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { "\emph{" swap$ * "}" * }
  if$
}
FUNCTION {bolden}
{ duplicate$ empty$
    { pop$ "" }
    { "\textbf{" swap$ * "}" * }
  if$
}
FUNCTION {scaps}
{ duplicate$ empty$
    { pop$ "" }
    { "\textsc{" swap$ * "}" * }
  if$
}
FUNCTION {bib.name.font}
{ scaps }
FUNCTION {bib.fname.font}
{ bib.name.font }
FUNCTION {tie.or.space.prefix}
{ duplicate$ text.length$ #3 <
    { "~" }
    { " " }
  if$
  swap$
}

FUNCTION {capitalize}
{ "u" change.case$ "t" change.case$ }

FUNCTION {space.word}
{ " " swap$ * " " * }
 % Here are the language-specific definitions for explicit words.
 % Each function has a name bbl.xxx where xxx is the English word.
 % The language selected here is ENGLISH
FUNCTION {bbl.and}
{ "and"}

FUNCTION {bbl.etal}
{ "et~al." }

FUNCTION {bbl.editors}
{ "editors" }

FUNCTION {bbl.editor}
{ "editor" }

FUNCTION {bbl.edby}
{ "edited by" }

FUNCTION {bbl.edition}
{ "edition" }

FUNCTION {bbl.volume}
{ "volume" }

FUNCTION {bbl.of}
{ "of" }

FUNCTION {bbl.number}
{ "number" }

FUNCTION {bbl.nr}
{ "no." }

FUNCTION {bbl.in}
{ "in" }

FUNCTION {bbl.pages}
{ "" }

FUNCTION {bbl.page}
{ "" }

FUNCTION {bbl.chapter}
{ "chapter" }

FUNCTION {bbl.techrep}
{ "Technical Report" }

FUNCTION {bbl.mthesis}
{ "Master's thesis" }

FUNCTION {bbl.phdthesis}
{ "Ph.D. thesis" }

FUNCTION {bbl.first}
{ "1st" }

FUNCTION {bbl.second}
{ "2nd" }

FUNCTION {bbl.third}
{ "3rd" }

FUNCTION {bbl.fourth}
{ "4th" }

FUNCTION {bbl.fifth}
{ "5th" }

FUNCTION {bbl.st}
{ "st" }

FUNCTION {bbl.nd}
{ "nd" }

FUNCTION {bbl.rd}
{ "rd" }

FUNCTION {bbl.th}
{ "th" }

MACRO {jan} {"January"}

MACRO {feb} {"February"}

MACRO {mar} {"March"}

MACRO {apr} {"April"}

MACRO {may} {"May"}

MACRO {jun} {"June"}

MACRO {jul} {"July"}

MACRO {aug} {"August"}

MACRO {sep} {"September"}

MACRO {oct} {"October"}

MACRO {nov} {"November"}

MACRO {dec} {"December"}

FUNCTION {eng.ord}
{ duplicate$ "1" swap$ *
  #-2 #1 substring$ "1" =
     { bbl.th * }
     { duplicate$ #-1 #1 substring$
       duplicate$ "1" =
         { pop$ bbl.st * }
         { duplicate$ "2" =
             { pop$ bbl.nd * }
             { "3" =
                 { bbl.rd * }
                 { bbl.th * }
               if$
             }
           if$
          }
       if$
     }
   if$
}

MACRO {acmcs} {"ACM Computing Surveys"}

MACRO {acta} {"Acta Informatica"}

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

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

MACRO {ibmsj} {"IBM Systems Journal"}

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

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

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

MACRO {ipl} {"Information Processing Letters"}

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

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

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

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

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

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

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

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

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

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

MACRO {tcs} {"Theoretical Computer Science"}
FUNCTION {bibinfo.check}
{ swap$
  duplicate$ missing$
    {
      pop$ pop$
      ""
    }
    { duplicate$ empty$
        {
          swap$ pop$
        }
        { swap$
          pop$
        }
      if$
    }
  if$
}
FUNCTION {bibinfo.warn}
{ swap$
  duplicate$ missing$
    {
      swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
      ""
    }
    { duplicate$ empty$
        {
          swap$ "empty " swap$ * " in " * cite$ * warning$
        }
        { swap$
          pop$
        }
      if$
    }
  if$
}
FUNCTION {format.url}
{ url empty$
    { "" }
    { "\urlprefix\url{" url * "}" * }
  if$
}

INTEGERS { nameptr namesleft numnames }


STRINGS  { bibinfo}

FUNCTION {format.names}
{ 'bibinfo :=
  duplicate$ empty$ 'skip$ {
  's :=
  "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{ff~}{vv~}{ll}{, jj}"
      format.name$
      bib.name.font
      bibinfo bibinfo.check
      't :=
      nameptr #1 >
        {
          namesleft #1 >
            { ", " * t * }
            {
              s nameptr "{ll}" format.name$ duplicate$ "others" =
                { 't := }
                { pop$ }
              if$
              t "others" =
                {
                  " " * bbl.etal emphasize *
                }
                {
                  "\&"
                  space.word * t *
                }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
  } if$
}
FUNCTION {format.names.ed}
{
  format.names
}
FUNCTION {format.key}
{ empty$
    { key field.or.null }
    { "" }
  if$
}

FUNCTION {format.authors}
{ author "author" format.names
}
FUNCTION {get.bbl.editor}
{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }

FUNCTION {format.editors}
{ editor "editor" format.names duplicate$ empty$ 'skip$
    {
      " " *
      get.bbl.editor
   "(" swap$ * ")" *
      *
    }
  if$
}
FUNCTION {format.book.pages}
{ pages "pages" bibinfo.check
  duplicate$ empty$ 'skip$
    { " " * bbl.pages * }
  if$
}
FUNCTION {format.isbn}
{ isbn "isbn" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      new.block
      "ISBN " swap$ *
    }
  if$
}

FUNCTION {format.issn}
{ issn "issn" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      new.block
      "ISSN " swap$ *
    }
  if$
}

FUNCTION {select.language}
{ duplicate$ empty$
    'pop$
    { language empty$
        'skip$
        { "{\selectlanguage{" language * "}" * swap$ * "}" * }
      if$
    }
    if$
}

FUNCTION {format.note}
{
 note empty$
    { "" }
    { note #1 #1 substring$
      duplicate$ "{" =
        'skip$
        { output.state mid.sentence =
          { "l" }
          { "u" }
        if$
        change.case$
        }
      if$
      note #2 global.max$ substring$ * "note" bibinfo.check
    }
  if$
}

FUNCTION {format.title}
{ title
  "title" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      select.language
    }
  if$
}
FUNCTION {format.full.names}
{'s :=
 "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{vv~}{ll}" format.name$
      't :=
      nameptr #1 >
        {
          namesleft #1 >
            { ", " * t * }
            {
              s nameptr "{ll}" format.name$ duplicate$ "others" =
                { 't := }
                { pop$ }
              if$
              t "others" =
                {
                  " " * bbl.etal emphasize *
                }
                {
                  "\&"
                  space.word * t *
                }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

FUNCTION {author.editor.key.full}
{ author empty$
    { editor empty$
        { key empty$
            { cite$ #1 #3 substring$ }
            'key
          if$
        }
        { editor format.full.names }
      if$
    }
    { author format.full.names }
  if$
}

FUNCTION {author.key.full}
{ author empty$
    { key empty$
         { cite$ #1 #3 substring$ }
          'key
      if$
    }
    { author format.full.names }
  if$
}

FUNCTION {editor.key.full}
{ editor empty$
    { key empty$
         { cite$ #1 #3 substring$ }
          'key
      if$
    }
    { editor format.full.names }
  if$
}

FUNCTION {make.full.names}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.key.full
    { type$ "proceedings" =
        'editor.key.full
        'author.key.full
      if$
    }
  if$
}

FUNCTION {output.bibitem}
{ newline$
  "\bibitem[{" write$
  label write$
  ")" make.full.names duplicate$ short.list =
     { pop$ }
     { * }
   if$
  "}]{" * write$
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

FUNCTION {if.digit}
{ duplicate$ "0" =
  swap$ duplicate$ "1" =
  swap$ duplicate$ "2" =
  swap$ duplicate$ "3" =
  swap$ duplicate$ "4" =
  swap$ duplicate$ "5" =
  swap$ duplicate$ "6" =
  swap$ duplicate$ "7" =
  swap$ duplicate$ "8" =
  swap$ "9" = or or or or or or or or or
}
FUNCTION {n.separate}
{ 't :=
  ""
  #0 'numnames :=
  { t empty$ not }
  { t #-1 #1 substring$ if.digit
      { numnames #1 + 'numnames := }
      { #0 'numnames := }
    if$
    t #-1 #1 substring$ swap$ *
    t #-2 global.max$ substring$ 't :=
    numnames #5 =
      { duplicate$ #1 #2 substring$ swap$
        #3 global.max$ substring$
        "\," swap$ * *
      }
      'skip$
    if$
  }
  while$
}
FUNCTION {n.dashify}
{
  n.separate
  '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$
}

FUNCTION {word.in}
{ bbl.in capitalize
  " " * }

FUNCTION {format.date}
{ year "year" bibinfo.check duplicate$ empty$
    {
      "empty year in " cite$ * "; set to ????" * warning$
       pop$ "????"
    }
    'skip$
  if$
  extra.label *
  before.all 'output.state :=
  " (" swap$ * ")" *
}
FUNCTION {format.btitle}
{ title "title" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      emphasize
      select.language
    }
  if$
}
FUNCTION {either.or.check}
{ empty$
    'pop$
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  if$
}
FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { bbl.volume volume tie.or.space.prefix
      "volume" bibinfo.check * *
      series "series" bibinfo.check
      duplicate$ empty$ 'pop$
        { swap$ bbl.of space.word * swap$
          emphasize * }
      if$
      "volume and number" number either.or.check
    }
  if$
}
FUNCTION {format.number.series}
{ volume empty$
    { number empty$
        { series field.or.null }
        { output.state mid.sentence =
            { bbl.number }
            { bbl.number capitalize }
          if$
          number tie.or.space.prefix "number" bibinfo.check * *
          series empty$
            { "there's a number but no series in " cite$ * warning$ }
            { bbl.in space.word *
              series "series" bibinfo.check *
            }
          if$
        }
      if$
    }
    { "" }
  if$
}
FUNCTION {is.num}
{ chr.to.int$
  duplicate$ "0" chr.to.int$ < not
  swap$ "9" chr.to.int$ > not and
}

FUNCTION {extract.num}
{ duplicate$ 't :=
  "" 's :=
  { t empty$ not }
  { t #1 #1 substring$
    t #2 global.max$ substring$ 't :=
    duplicate$ is.num
      { s swap$ * 's := }
      { pop$ "" 't := }
    if$
  }
  while$
  s empty$
    'skip$
    { pop$ s }
  if$
}

FUNCTION {convert.edition}
{ extract.num "l" change.case$ 's :=
  s "first" = s "1" = or
    { bbl.first 't := }
    { s "second" = s "2" = or
        { bbl.second 't := }
        { s "third" = s "3" = or
            { bbl.third 't := }
            { s "fourth" = s "4" = or
                { bbl.fourth 't := }
                { s "fifth" = s "5" = or
                    { bbl.fifth 't := }
                    { s #1 #1 substring$ is.num
                        { s eng.ord 't := }
                        { edition 't := }
                      if$
                    }
                  if$
                }
              if$
            }
          if$
        }
      if$
    }
  if$
  t
}

FUNCTION {format.edition}
{ edition duplicate$ empty$ 'skip$
    {
      convert.edition
      output.state mid.sentence =
        { "l" }
        { "t" }
      if$ change.case$
      "edition" bibinfo.check
      " " * bbl.edition *
    }
  if$
}
INTEGERS { multiresult }
FUNCTION {multi.page.check}
{ 't :=
  #0 'multiresult :=
    { multiresult not
      t empty$ not
      and
    }
    { t #1 #1 substring$
      duplicate$ "-" =
      swap$ duplicate$ "," =
      swap$ "+" =
      or or
        { #1 'multiresult := }
        { t #2 global.max$ substring$ 't := }
      if$
    }
  while$
  multiresult
}
FUNCTION {format.pages}
{ pages duplicate$ empty$ 'skip$
    { duplicate$ multi.page.check
        {
          n.dashify
        }
        {
        }
      if$
      "pages" bibinfo.check
    }
  if$
}
FUNCTION {format.journal.pages}
{ pages duplicate$ empty$ 'pop$
    { swap$ duplicate$ empty$
        { pop$ pop$ format.pages }
        {
          ", " *
          swap$
          n.dashify
          "pages" bibinfo.check
          *
        }
      if$
    }
  if$
}
FUNCTION {format.journal.eid}
{ eid "eid" bibinfo.check
  duplicate$ empty$ 'pop$
    { swap$ duplicate$ empty$ 'skip$
      {
          ", " *
      }
      if$
      swap$ *
    }
  if$
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
  duplicate$ empty$ 'skip$
    {
      "volume" bibinfo.check
    }
  if$
  bolden
  number "number" bibinfo.check duplicate$ empty$ 'skip$
    {
      swap$ duplicate$ empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
      swap$
      "(" swap$ * ")" *
    }
  if$ *
  eid empty$
    { format.journal.pages }
    { format.journal.eid }
  if$
}

FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
        { bbl.chapter }
        { type "l" change.case$
          "type" bibinfo.check
        }
      if$
      chapter tie.or.space.prefix
      "chapter" bibinfo.check
      * *
      pages empty$
        'skip$
        { ", " * format.pages * }
      if$
    }
  if$
}

FUNCTION {format.booktitle}
{
  booktitle "booktitle" bibinfo.check
  emphasize
}
FUNCTION {format.in.ed.booktitle}
{ format.booktitle duplicate$ empty$ 'skip$
    {
      editor "editor" format.names.ed duplicate$ empty$ 'pop$
        {
          get.bbl.editor
          swap$ "," *
          " " * swap$ *
          swap$
          "," *
          " " * swap$
          * }
      if$
      word.in swap$ *
    }
  if$
}
FUNCTION {format.thesis.type}
{ type duplicate$ empty$
    'pop$
    { swap$ pop$
      "t" change.case$ "type" bibinfo.check
    }
  if$
}
FUNCTION {format.tr.number}
{ number "number" bibinfo.check
  type duplicate$ empty$
    { pop$ bbl.techrep }
    'skip$
  if$
  "type" bibinfo.check
  swap$ duplicate$ empty$
    { pop$ "t" change.case$ }
    { tie.or.space.prefix * * }
  if$
}
FUNCTION {format.article.crossref}
{
  word.in
  " \cite{" * crossref * "}" *
}
FUNCTION {format.book.crossref}
{ volume duplicate$ empty$
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
      pop$ word.in
    }
    { bbl.volume
      capitalize
      swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
    }
  if$
  " \cite{" * crossref * "}" *
}
FUNCTION {format.incoll.inproc.crossref}
{
  word.in
  " \cite{" * crossref * "}" *
}
FUNCTION {format.org.or.pub}
{ 't :=
  ""
  address empty$ t empty$ and
    'skip$
    {
      t empty$
        { address "address" bibinfo.check *
        }
        { t *
          address empty$
            'skip$
            { ", " * address "address" bibinfo.check * }
          if$
        }
      if$
    }
  if$
}
FUNCTION {format.publisher.address}
{ publisher "publisher" bibinfo.warn format.org.or.pub
}

FUNCTION {format.organization.address}
{ organization "organization" bibinfo.check format.org.or.pub
}

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  crossref missing$
    {
      journal
      "journal" bibinfo.check
      emphasize
      "journal" output.check
      add.blank
      format.vol.num.pages output
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  format.issn output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check
      editor format.key output
    }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      new.block
      format.number.series output
      new.sentence
      format.publisher.address output
    }
    {
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.isbn output
  format.book.pages output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {booklet}
{ output.bibitem
  format.authors output
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  howpublished "howpublished" bibinfo.check output
  address "address" bibinfo.check output
  format.isbn output
  format.book.pages output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check
      editor format.key output
    }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  crossref missing$
    {
      format.bvolume output
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.number.series output
      new.sentence
      format.publisher.address output
    }
    {
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  crossref missing$
    { format.isbn output }
    'skip$
  if$
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.chapter.pages output
      new.sentence
      format.publisher.address output
      format.edition output
      format.isbn output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.pages output
      new.sentence
      publisher empty$
        { format.organization.address output }
        { organization "organization" bibinfo.check output
          format.publisher.address output
        }
      if$
      format.isbn output
      format.issn output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {conference} { inproceedings }
FUNCTION {manual}
{ output.bibitem
  format.authors output
  author format.key output
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  organization address new.block.checkb
  organization "organization" bibinfo.check output
  address "address" bibinfo.check output
  format.edition output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {mastersthesis}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.btitle
  "title" output.check
  new.block
  bbl.mthesis format.thesis.type output.nonnull
  school "school" bibinfo.warn output
  address "address" bibinfo.check output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {misc}
{ output.bibitem
  format.authors output
  author format.key output
  format.date "year" output.check
  date.block
  format.title output
  new.block
  howpublished "howpublished" bibinfo.check output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.btitle
  "title" output.check
  new.block
  bbl.phdthesis format.thesis.type output.nonnull
  school "school" bibinfo.warn output
  address "address" bibinfo.check output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {proceedings}
{ output.bibitem
  format.editors output
  editor format.key output
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  format.bvolume output
  format.number.series output
  new.sentence
  publisher empty$
    { format.organization.address output }
    { organization "organization" bibinfo.check output
      format.publisher.address output
    }
  if$
  format.isbn output
  format.issn output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title
  "title" output.check
  new.block
  format.tr.number output.nonnull
  institution "institution" bibinfo.warn output
  address "address" bibinfo.check output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

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

FUNCTION {default.type} { misc }
READ
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$
}
FUNCTION {format.lab.names}
{ 's :=
  "" 't :=
  s #1 "{vv~}{ll}" format.name$
  s num.names$ duplicate$
  #2 >
    { pop$
      " " * bbl.etal emphasize *
    }
    { #2 <
        'skip$
        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
            {
              " " * bbl.etal emphasize *
            }
            { " \& " * s #2 "{vv~}{ll}" format.name$
              * }
          if$
        }
      if$
    }
  if$
}

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

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

FUNCTION {editor.key.label}
{ editor empty$
    { key empty$
        { cite$ #1 #3 substring$ }
        'key
      if$
    }
    { editor format.lab.names }
  if$
}

FUNCTION {calc.short.authors}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.key.label
    { type$ "proceedings" =
        'editor.key.label
        'author.key.label
      if$
    }
  if$
  'short.list :=
}

FUNCTION {calc.label}
{ calc.short.authors
  short.list
  "("
  *
  year duplicate$ empty$
     { pop$ "????" }
     'skip$
  if$
  *
  'label :=
}

FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{ll{ }}{  ff{ }}{  jj{ }}"
      format.name$ 't :=
      nameptr #1 >
        {
          "   "  *
          namesleft #1 = t "others" = and
            { "zzzzz" * }
            { t sortify * }
          if$
        }
        { 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 {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 {editor.sort}
{ editor empty$
    { key empty$
        { "to sort, need editor or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { editor sort.format.names }
  if$
}
FUNCTION {presort}
{ calc.label
  label sortify
  "    "
  *
  type$ "book" =
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.sort
        'author.sort
      if$
    }
  if$
  #1 entry.max$ substring$
  'sort.label :=
  sort.label
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

ITERATE {presort}
SORT
STRINGS { last.label next.extra }
INTEGERS { last.extra.num number.label }
FUNCTION {initialize.extra.label.stuff}
{ #0 int.to.chr$ 'last.label :=
  "" 'next.extra :=
  #0 'last.extra.num :=
  #0 'number.label :=
}
FUNCTION {forward.pass}
{ last.label label =
    { last.extra.num #1 + 'last.extra.num :=
      last.extra.num int.to.chr$ 'extra.label :=
    }
    { "a" chr.to.int$ 'last.extra.num :=
      "" 'extra.label :=
      label 'last.label :=
    }
  if$
  number.label #1 + 'number.label :=
}
FUNCTION {reverse.pass}
{ next.extra "b" =
    { "a" 'extra.label := }
    'skip$
  if$
  extra.label 'next.extra :=
  extra.label
  duplicate$ empty$
    'skip$
    { "{\natexlab{" swap$ * "}}" * }
  if$
  'extra.label :=
  label extra.label * 'label :=
}
EXECUTE {initialize.extra.label.stuff}
ITERATE {forward.pass}
REVERSE {reverse.pass}
FUNCTION {bib.sort.order}
{ sort.label
  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}
ITERATE {bib.sort.order}
SORT
FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
  write$ newline$
  "\providecommand{\natexlab}[1]{#1}"
  write$ newline$
  "\providecommand{\url}[1]{\texttt{#1}}"
  write$ newline$
  "\providecommand{\urlprefix}{URL }"
  write$ newline$
  "\providecommand{\selectlanguage}[1]{\relax}"
  write$ newline$
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}
EXECUTE {end.bib}
%% End of customized bst file
%%
%% End of file `cc2.bst'.
%CC2BST>
%</cc2bst>
%    \end{macrocode}
%
% \else% bst
%   The text of this file is omitted.
% \fi% bst
%
%  \def\filename{cc.bst}
%  \def\fileversion{None}
%  \def\filedate{1996/02/06}
%  \CodelinePrefix{o}
%
% \section{Source of \filename (\fileprefix)}
%
%  This file (\file{\filename}) has version number \fileversion, last
%  revised \filedate.
% \ifoldbst% The old bibliography style is normally not printed.
%  \hfuzz=\oddsidemargin
%  \def\MacroFont{\fontencoding\encodingdefault
%                    \fontfamily\ttdefault
%                    \fontseries\mddefault
%                    \fontshape\updefault
%                    \tiny}
% \let\AltMacroFont\MacroFont
% \renewcommand{\theCodelineNo}{\rmfamily\tiny b\arabic{CodelineNo}}%
%    \begin{macrocode}
%<*ccbst>
%<<CCBST>
% File name: cc.bst 
%
% cc.bst style file for BibTeX.
% February 6, 1996
% This style file provides the following citation facilities:
% Usage in Tex    Output:
% file:
% \cite           Cook (1990)
% \citeauthor     Cook
% \citeyear       1990
% \citemul        Cook (1990, 1991a, 1991b)
% \shortcite      Cook 1990
% \parencite      (Cook 1990)
% \nocite

% It was prepared by modifying previous style files.
% Here are acknowledgements:
%>  BibTeX `named' style file for BibTeX version 0.99c, LaTeX version 2.09
%>  Place it in a file called named.bst in the BibTeX search path.  (Placing it
%>  in the same directory as the LaTeX document should also work.)
%>  Support for named citations is provided by named.sty

%>  This version was made by modifying the master file made by
%>  Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)

%>  Copyright (C) 1985, all rights reserved.
%>  Modifications Copyright 1988, Peter F. Patel-Schneider
%>  Copying of this file is authorized only if either
%>  (1) you make absolutely no changes to your copy, including name, or
%>  (2) if you do make changes, you name it something other than
%>  btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
%>  This restriction helps ensure that all standard styles are identical.

%>  There are undoubtably bugs in this style.  If you make bug fixes,
%>  improvements, etc.  please let me know.  My e-mail address is:
%>      pfps@research.att.com

ENTRY
  { address
    author
    booktitle
    chapter
    edition
    editor
    howpublished
    institution
    journal
    key
    month
    note
    number
    organization
    pages
    publisher
    school
    series
    title
    type
    volume
    year
  }
  {}
  { label extra.label sort.label }

INTEGERS { output.state before.all mid.sentence after.sentence after.block }

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

STRINGS { mode s t }

%FUNCTION {message}
%{
%  duplicate$ top$
%}

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ", " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
            'write$
            { add.period$ " " * write$ }
          if$
        }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}

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

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

FUNCTION {output.bibitem}
{ newline$

  "\bibitem[" write$
  label write$
  "]{" write$

  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

FUNCTION {fin.entry}
{ add.period$
  write$
  newline$
}

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

FUNCTION {semi.block}
{  %%%%"semi.block" top$
   mid.sentence 'output.state :=
}

%FUNCTION {semi.block}
%{ output.state mid.sentence =
%    'skip$
%    { after.block 'output.state := }
%  if$
%}

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

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

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

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

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

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

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

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

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

FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}

FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { "{\sl " swap$ * "}" * }
  if$
}

FUNCTION {bold}
{ duplicate$ empty$
    { pop$ "" }
    { "{\bf " swap$ * "}" * }
  if$
}

INTEGERS { nameptr namesleft numnames }

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  "{\sc " *
  numnames 'namesleft :=
    { namesleft #0 > }

    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=

      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$
  "}" *
}

FUNCTION {format.authors}
{ author empty$
    { "" }
    { author format.names }
  if$
}

FUNCTION {format.editors}
{ editor empty$
    { "" }
    { "ed.\ "
      editor format.names *
    }
  if$
}

FUNCTION {format.editors.reverse}
{ editor empty$
    { "" }
    { editor format.names
      ", ed." *
    }
  if$
}

FUNCTION {format.editors.simple}
{ editor empty$
    { "" }
    { editor format.names }
  if$
}

FUNCTION {format.title}
{ title empty$
    { "" }

    { title "t" change.case$ }

  if$
}

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

FUNCTION {format.date}
{ year empty$
    { month empty$
        { "" }
%       { "there's a month but no year in " cite$ * warning$
%         month
%       }
        { }
      if$
    }
%    { month empty$
%        {year extra.label * }
%       { month " " * year * extra.label *}
%      if$
%    }
    { year extra.label * }
  if$
}

FUNCTION {format.btitle}
{ title emphasize
}

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

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

%FUNCTION {format.bvolume}
%{ volume empty$
%    { "" }
%    { series empty$
%       'skip$
%       {series emphasize ",\ vol.\ " * volume *}
%      if$
%      "volume and number" number either.or.check
%    }
%  if$
%}
%FUNCTION {format.bvolume}
%{ volume empty$
%    { "" }
%    { series empty$
%       'skip$
%       {series emphasize "\ " * volume bold *}
%      if$
%     "volume and number" number either.or.check
%    }
%  if$
%}
FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { "vol." volume tie.or.space.connect
      series empty$
        'skip$
        { " of " * series emphasize * }
      if$
      "volume and number" number either.or.check
    }
 if$
}

%FUNCTION {format.number.series}
%{ volume empty$
%    { number empty$
%       { series field.or.null }
%       { output.state mid.sentence =
%           { "number" }
%           { "Number" }
%         if$
%         number tie.or.space.connect
%         series empty$
%           { "there's a number but no series in " cite$ * warning$ }
%           { " in " * series * }
%         if$
%       }
%      if$
%    }
%    { "" }
%  if$
%}
FUNCTION {format.number.series}
{ volume empty$
    { number empty$
        { series field.or.null }
        { series empty$
            { "there's a number but no series in " cite$ * warning$ }
            { series "\ " * number bold * }
          if$
        }
      if$
    }
    { "" }
  if$
}

FUNCTION {format.edition}
{ edition empty$
    { "" }
    { output.state mid.sentence =
        { edition "l" change.case$ " edition" * }
        { edition "t" change.case$ " edition" * }
      if$
    }
  if$
}

INTEGERS { multiresult }

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

FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
        { pages n.dashify }
        { "p." pages tie.or.space.connect }
      if$
    }
  if$
}


FUNCTION {format.vol.num.year}
{ volume field.or.null bold
  number empty$
    'skip$
    { "(" number * ")\," * *
      volume empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
    }
  if$
  year empty$
    'skip$
    { "\ (" * format.date * ")" * }
  if$
}


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

FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
        { "chapter" }
        { type "l" change.case$ }
      if$
      chapter tie.or.space.connect
      pages empty$
        'skip$
        { ", " * format.pages * }
      if$
    }
  if$
}


FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
    { "" }
    { editor empty$
        { "In " booktitle emphasize * }
        { "In " booktitle emphasize * ", " * format.editors * }
      if$
    }
  if$
}

FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
  month empty$ year empty$ note empty$
  and and and and and

  key empty$ not and

    { "all relevant fields are empty in " cite$ * warning$ }
    'skip$
  if$
}

FUNCTION {format.publisher.address}
{ address empty$ 
    'publisher 
    { publisher ", " * address * }
  if$
}

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

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

FUNCTION {format.article.crossref}
{ key empty$
    { journal empty$
        { "need key or journal for " cite$ * " to crossref " * crossref *
          warning$
          ""
        }
        { "In {\em " journal * "\/}" * }
      if$
    }
    { "In " key * }
  if$
  " \shortcite{" * crossref * "}" *
}

FUNCTION {format.crossref.editor}
{ editor #1 "{vv~}{ll}" format.name$
  editor num.names$ duplicate$
  #2 >
    { pop$ " et~al." * }
    { #2 <
        'skip$
        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
            { " et~al." * }
            { " and " * editor #2 "{vv~}{ll}" format.name$ * }
          if$
        }
      if$
    }
  if$
}

FUNCTION {format.book.crossref}
{ volume empty$
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
      "In "
    }
    { "Volume" volume tie.or.space.connect
      " of " *
    }
  if$
  editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
        { series empty$
            { "need editor, key, or series for " cite$ * " to crossref " *
              crossref * warning$
              "" *
            }
            { "{\em " * series * "\/}" * }
          if$
        }
        { key * }
      if$
    }
    { format.crossref.editor * }
  if$
  " \shortcite{" * crossref * "}" *
}

FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
        { booktitle empty$
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
              crossref * warning$
              ""
            }
            { "In {\em " booktitle * "\/}" * }
          if$
        }
        { "In " key * }
      if$
    }
    { "In " format.crossref.editor * }
  if$
  " \shortcite{" * crossref * "}" *
}

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  semi.block
  format.title "title" output.check
  new.block
  crossref missing$
    { journal emphasize "\ " * format.vol.num.year * "journal" output.check
      format.pages output
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors.simple "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  semi.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      new.block
      format.number.series output
      new.sentence
      format.publisher.address "publisher" output.check
    }
    { new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  new.block
  note output
  fin.entry
}

FUNCTION {booklet}
{ output.bibitem
  format.authors output
  semi.block
  format.title "title" output.check
  howpublished address new.block.checkb
  howpublished output
  address output
  format.date output
  new.block
  note output
  fin.entry
}

FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  semi.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.number.series output
      new.sentence
      format.publisher.address "publisher" output.check
    }
    { format.chapter.pages "chapter and pages" output.check
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  new.block
  note output
  fin.entry
}

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  semi.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.chapter.pages output
      new.sentence
      format.publisher.address "publisher" output.check
      format.edition output
      format.date "year" output.check
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  semi.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      address empty$
        { organization publisher new.sentence.checkb
          organization output
          publisher output
          format.date output
        }
        { address output.nonnull
          format.date output
          organization output
          publisher output
        }
      if$
      format.pages output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

FUNCTION {conference} { inproceedings }

FUNCTION {manual}
{ output.bibitem
  author empty$
    { organization empty$
        'skip$
        { organization output.nonnull
          address output
        }
      if$
    }
    { format.authors output.nonnull }
  if$
  semi.block
  format.btitle "title" output.check
  author empty$
    { organization empty$
        { address new.block.checka
          address output
        }
        'skip$
      if$
    }
    { organization address new.block.checkb
      organization output
      address output
    }
  if$
  format.edition output
  format.date output
  new.block
  note output
  fin.entry
}

FUNCTION {mastersthesis}
{ output.bibitem
  format.authors "author" output.check
  semi.block
  format.title "title" output.check
  new.block
  "Master's thesis" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
  new.block
  note output
  fin.entry
}

FUNCTION {misc}
{ output.bibitem  
  format.authors "author" output.check
  title howpublished new.semiblock.checkb
  format.title output
  howpublished new.block.checka
  howpublished output
  format.date output
  new.block
  note output
  fin.entry
  empty.misc.check
}

FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  semi.block
  format.btitle "title" output.check
  new.block
  "PhD thesis" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
  new.block
  note output
  fin.entry
}

FUNCTION {proceedings}
{ output.bibitem
  editor empty$
    { organization output }
%    { format.editors output.nonnull }
    { format.editors.reverse output.nonnull }
  if$
  semi.block
  format.btitle "title" output.check
  format.bvolume output
  format.number.series output
  address empty$
    { editor empty$
        { publisher new.sentence.checka }
        { organization publisher new.sentence.checkb
          organization output
        }
      if$
      publisher output
      format.date "year" output.check
    }
    { address output.nonnull
      format.date "year" output.check
      new.sentence
      editor empty$
        'skip$
        { organization output }
      if$
      publisher output
    }
  if$
  new.block
  note output
  fin.entry
}

FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  semi.block
  format.title "title" output.check
  new.block
  format.tr.number output.nonnull
  institution "institution" output.check
  address output
  format.date "year" output.check
  new.block
  note output
  fin.entry
}

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

FUNCTION {default.type} { misc }


MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}



READ

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

  mode "cite" =
    { numnames #1 =
      { s #1 "{vv }{ll}" format.name$ }
      { numnames #2 =
          { s #1 "{vv }{ll }\& " format.name$ s #2 "{vv }{ll}" format.name$ * }
          { s #1 "{vv }{ll }\bgroup \em et al.\egroup " format.name$ }
        if$
      }
    if$
    }
    { numnames #1 =
      { s #1 "{ll}" format.name$ }
      { numnames #2 =
          { s #1 "{ll }\& " format.name$ s #2 "{ll}" format.name$ * } 
          { s #1 "{ll }\bgroup \em et al.\egroup " format.name$ }
        if$
      }
    if$
    }
    if$
}

FUNCTION {author.key.label}
{ author empty$
    { key empty$

        { cite$ #1 #3 substring$ }

        { key }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {author.editor.key.label}
{ author empty$
    { editor empty$
        { key empty$

            { cite$ #1 #3 substring$ }

            { key }
          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 }
      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 }
      if$
    }
    { editor format.lab.names }
  if$
}

FUNCTION {calc.label}
{ 
  "cite" 'mode :=
  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$

  "\protect\citeauthoryear{" swap$ * "}{" *
  year field.or.null purify$ *  % CHANGED - pfps - 15 Feb 1989
  'label :=
  
  "sort" 'mode :=
  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$
  "      " *
  year field.or.null purify$ *
  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 {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}

{ calc.label
  sort.label

  "    "
  *
  type$ "book" =

  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.organization.sort
        { type$ "manual" =
            'author.organization.sort
            'author.sort
          if$
        }
      if$
    }
  if$

  *

  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  cite$
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

ITERATE {presort}

SORT

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

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

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

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

FUNCTION {reverse.pass}
{ next.extra "b" =
    { "a" 'extra.label := }
    'skip$
  if$
  label extra.label * "}" * 'label :=   % CHANGED - pfps 15 Feb 1989
  label width$ longest.label.width >
    { label 'longest.label :=
      label width$ 'longest.label.width :=
    }
    'skip$
  if$
  extra.label 'next.extra :=
}

EXECUTE {initialize.longest.label}

ITERATE {forward.pass}

REVERSE {reverse.pass}

FUNCTION {begin.bib}

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

    'skip$
    { preamble$ write$ newline$ }
  if$

  "\begin{thebibliography}{}\small" write$ newline$

}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

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

EXECUTE {end.bib}
%CCBST>
%</ccbst>
%    \end{macrocode}
% \else% oldbst
%   The text of this file is omitted.
% \fi% oldbst
%
%  \GetFileInfo{relabel.sty}
%  \CodelinePrefix{R}
%
%   \cleardoublepage
%   \setcounter{IndexColumns}{2}%
%   \addcontentsline{toc}{section}{Index}\PrintIndex
%   \addcontentsline{toc}{section}{Change History}\PrintChanges
%   \ifx\tableofcontents\relax\else
%   \clearpage
%   \expandafter\ifodd\csname c@page\endcsname~\clearpage\fi
%   \csname @ifundefined\endcsname{multicols}
%   {{\scriptsize\tableofcontents}}
%   {\begin{multicols}{2}
%       \scriptsize
%       \tableofcontents
%   \end{multicols}
%   \global\let\tableofcontents\relax
%   }
%   \fi
%
% \iffalse meta-comment
%<*driver>
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "cc"
%%% End: 
%</driver>
% \fi