summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/paracol/impl.dtx
blob: 500b10621c1549627c73c175c438bb60f94c2fc6 (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
% \section{Overview}
% \label{sec:imp-ovv}
% 
% \subsection{Column-Pages}
% \label{sec:imp-ovv-colpage}
% 
% In our parallel multi-column typesetting, a column may grow independently
% of other columns and may cross its page boundary asynchronously with
% others.  Therefore, we cannot throw away the contents of a column in a
% page, or {\em\Uidx\colpage} in short, when a page break occurs in the
% column.  Instead, we have to keep \colpage{}s until all columns are
% {\em\Uidx\sync{}ed} implicitly or explicitly.
% 
% The {\em\Uidx\imsync} takes place when all columns in a page see
% page-breaks to let the page is shipped out.  In general, all columns but
% the last one which arrives the page-break have completed \colpage{}s in the
% page in question and some of them may have succeeding \colpage{}s.
% Therefore, we maintain the list of completed \colpage{}s
% $\Uidx\S_c=|\pcol@shipped|{\cdot}c$
% 
% \SpecialArrayMainIndex{c}{\pcol@shipped}
% 
% for each column $c\In0\C$, where $\Uidx\C=\!\pcol@ncol!$ is the number of
% columns given through the argument of \env{paracol} environment, and the
% set of them $\Uidx\SS=\Set{\S_c}{c\In0\C}$.
% 
% Each element $\Uidx\s_c(p)$ of a list $\S_c$ is an \!\insert! whose
% \!\vbox! contains the 
% $p$-th completed \colpage\footnote{
% 
% Other registers such as \cs{count} are not used.},
% 
% where $p=0$ for the first \colpage{} produced in \env{paracol}
% environment or that following a page flushing macro \!\flushpage! or
% \!\clearpage!.  That is, $\S_c$ is defined as follows, where
% $\Uidx\pbase=\!\pcol@basepage!$ is the zero-origin ordinal of the
% {\em\Uidx\bpage} being the oldest page not shipped out yet.
% 
% \begin{eqnarray*}
% \S_c&=&(\s_c(\pbase),\s_c(\pbase{+}1),\ldots,\s_c(\pbase{+}k{-}1))\\
% &=&\!\@elt!\,\s_c(\pbase)\;\!\@elt!\,\s_c(\pbase{+}1)\;\cdots\;
% 	\!\@elt!\,\s_c(\pbase{+}k{-}1)
% \end{eqnarray*}
% 
% Note that a list $\S_c$ can be empty and all members $\SS$ may be empty.
% 
% The other type of \sync{}ation, {\em\Uidx\exsync}, takes place by
% \!\switchcolumn!|*| or the beginning of starred \csenv{}s, by
% \Endparacol, or by one of page flushing macros \!\flushpage! and
% \!\clearpage!.  A flushing \exsync{} ships out the pages from $\pbase$ to
% $\Uidx\ptop=\!\pcol@toppage!$ being the ordinal of the {\em\Uidx\tpage}
% to which the most advanced {\em\Uidx\lcolumn} has reached.  On the other
% hand, other non-flushing \exsync{} keeps the page $\ptop$ from being
% shipped out because the \colpage{}s in it will grow further.
% 
% 
% 
% \subsection{Current Column-Pages and Their Contexts}
% \label{sec:imp-ovv-ccol}
% 
% We also have to maintain another type of \colpage{}s which are currently
% built, or {\em\Uidx\ccolpage{}s} in short, to switch from a column to
% another.  Since each column may have its own {\em context} for the
% typsetting of it, or {\em\Uidx\cctext} in short, it were perfect to save
% the context when we leave from a 
% column and to restore that when we revisit the column if we could.
% However, \TeX{} and \LaTeX{} has a tremendously large number of context
% variables and the number become virtualy boundless when we take variables
% defined in various styles and by users themselves into account.
% Therefore, we have to abandon to keep the whole context of the column but
% carefully chose a small subset comprising variables automatically modified
% outside of users' control.  That is, the \cctext{}
% $\Uidx\cc_c=|\pcol@col|{\cdot}c$
% 
% \SpecialArrayMainIndex{c}{\pcol@col}
% 
% of a column $c$ consists of the following elements, each of which named
% $e$ is referred to as $\cc_c(e)$ hereafter.
% 
% \begin{itemize}
% \item $\Uidx\vb$
% represents $\!\insert!{\cdot}\vb$ containing the followings.
% 
% \begin{itemize}
% \item
% $\vb^b=\!\box!{\cdot}\vb=\!\@holdpg!$ is the \!\vbox! containing the main
% vertical list which has already contributed to the \ccolpage{}.
% 
% \item
% $\vb^p=\!\count!{\cdot}\vb=\!\pcol@page!$ means the \ccolpage{} belongs to
% the page $\vb^p$.
% 
% \item
% $\vb^r=\!\dimen!{\cdot}\vb=\!\@colroom!$ is the room of the column.
% \end{itemize}
% 
% \item $\Uidx\ft=\!\pcol@currfoot!$
% is the \!\insert! containing the footnotes added in the \ccolpage.  Its
% constituent \!\box!, \!\count!, \!\dimen! and \!\skip! are denoted as
% $\ft^b$, $\ft^c$, $\ft^d$, $\ft^s$ respectively.
% 
% \item $\Uidx\pd=\!\pcol@prevdepth!$
% is the depth of the last vertical item in $\vb^b$ obtained by
% \!\prevdepth!.
% 
% \item $\Uidx\tl=\!\@toplist!$
% is the list of top floats inserted in the \ccolpage.
% 
% \item $\Uidx\ml=\!\@midlist!$
% is the list of mid floats inserted in the \ccolpage.
% 
% \item $\Uidx\bl=\!\@botlist!$
% is the list of bottom floats inserted in the \ccolpage.
% 
% \item $\Uidx\dl=\!\@deferlist!$
% is the list of in-column floats deferred to the next \colpage.
% 
% \item $\Uidx\tf=\!\pcol@textfloatsep!$
% is the vertical skip replaced with \!\textfloatsep! for top floats in the
% \ccolpage{} if it has \sync{}ation points, or $\infty$ otherwise.
% 
% \item $\Uidx\fh=\!\@textfloatsheight!$
% is the total height of mid floats and their separators in the \ccolpage.
% 
% \item $\Uidx\mb=\!\@mparbottom!$
% is the bottom position of the last \!\marginpar! staff in the \ccolpage.
% 
% \item $\Uidx\tn=\!\@topnum!$
% is the maximum number of top floats which the \ccolpage{} can accommodate
% further.
% 
% \item $\Uidx\tr=\!\@toproom!$
% is the room for top floats in the \ccolpage.
% 
% \item $\Uidx\bn=\!\@botnum!$
% is the maximum number of bottom floats which the \ccolpage{} can accommodate
% further.
% 
% \item $\Uidx\br=\!\@botroom!$
% is the room for bottom floats in the \ccolpage.
%
% \item $\Uidx\cn=\!\@colnum!$
% is the maximum total number of floats which the \ccolpage{} can accommodate
% further.
% 
% \item $\Uidx\sw$
% is the following encoding of \CSIndex{if@nobreak} and
% \CSIndex{if@afterindent} at the time we left from the column $c$.
% $$
% \sw=\cases{0&$\CSIndex{if@nobreak}=\false$\cr
%            1&$\CSIndex{if@nobreak}=\true\;\land\;
%               \CSIndex{if@afterindent}=\true$\cr
%            2&$\CSIndex{if@nobreak}=\true\;\land\;
%               \CSIndex{if@afterindent}=\false$}
% $$
% Note that we have only three states because \CSIndex{if@afterindent} is
% meaningful only when $\CSIndex{if@nobreak}=\true$\footnote{
% 
% If only with the standard \LaTeX{} and so far.}.
% 
% \item $\Uidx\ep=\!\everypar!$
% is the tokens stored in \!\everypar! at the time we left from the column
% $c$.
% \end{itemize}
% 
% \changes{v1.1}{2012/05/11}
% 	{Add description of $w_c\cs{pcol@columnwidth}{\cdot}c$.}
% 
% In addition, we have special context variables
% $\Uidx\w_c=|\pcol@columnwidth|{\cdot}c$
% 
% \SpecialArrayMainIndex{c}{\pcol@columnwidth}
% 
% in which we keep \!\columnwidth! for the column $c$.
% 
% Note that we could add other variables to the saved context and/or provide
% some API macro to define them by users, but abandon them because it should
% be too complicated for users\footnote{
% 
% And for the author if we include save/restore of macros, though it could
% be done with a \cs{token} containing the \cs{def}initions of macros.}.
% 
% Also note that we provide a save/restore mechanism for \lcounter{}s as
% discussed in \secref{sec:imp-ovv-counter}.
% 
% 
% 
% \subsection{Pages and Their Contexts}
% \label{sec:imp-ovv-page}
% 
% Besides the \colpage{}s, we have to keep track each whole page not yet
% shipped out but has some complete or incomplete (i.e., current) \colpage{}s.
% We maintain the list;
% 
% \SpecialMainIndex{\pcol@pages}
% 
% \begin{eqnarray*}
% \Uidx\PP
% &=&\!\pcol@pages!=(\Uidx\pp(\pbase),\pp(\pbase{+}1),\ldots\pp(\ptop{-}1))\\
% &=&\!\@elt!\,\pp(\pbase)\;\!\@elt!\,\pp(\pbase{+}1)\;\cdots\;
%    \!\@elt!\,\pp(\ptop{-}1)
% \end{eqnarray*}
% 
% where $\pp(p)$ is a {\em\Uidx\pctext} of $p$ being an integer whose
% meaning is defined as follows.
% 
% \begin{itemize}
% \item $\pp(p)<0$\\
% $\pp(p)$ is equal to the (negative) value of the counter \counter{page}
% (i.e. \!\c@page!) for the page $p$, which we refer to as $\Uidx\page(p)$
% hereafter.
% 
% \item $0\leq\pp(p)<256$\\
% The page $p$ has multi-column floats or the single-column
% {\em\Uidx\preenv} preceeding \beginparacol{} in the {\em\Uidx\spage}
% where it resides and spannig all columns.  $\pp(p)=i$ represents
% $\!\insert!{\cdot}i$ for those {\em\Uidx\spanning} whose registers have
% the followings.
% 
% \begin{itemize}
% \item
% $\pp^b(p)=\!\box!{\cdot}i$ contains the \spanning.
% 
% \item
% $\pp^p(p)=\!\count!{\cdot}i=\page(p)$.
% 
% \item
% $\pp^h(p)=\!\dimen!{\cdot}i=\!\@colht!$ if positive for the height of
% columns shrunken by the \spanning.  If negative, the page is only for
% the \spanning, i.e. a {\em\Uidx\fpage}.  We use the notation $\pp^h(p)$
% for the pages $\pp(p)\notin\LBRP0{256}$ to mean \!\textheight!.
% 
% \item
% $\pp^t(p)=\!\skip!{\cdot}i=\!\pcol@topskip!$ being the value of
% \!\topskip! at \beginparacol{} to be inserted at the top of each column in
% non-first page.  Otherwise, i.e., for the columns in the \spage{}
% following the \preenv{}, it has 0 to prevent the \!\topskip! insertion.
% We use the notation $\pp^t(p)$ for the pages $\pp(p)\notin\LBRP0{256}$ to
% mean \!\pcol@topskip!.
% \end{itemize}
% 
% \item $\pp(p)\geq256$\\
% $\pp(p)=\page(p)+256$ to represent non-negative value $\page(p)$.
% \end{itemize}
% 
% The reason why we keep track of $\page(p)$ is that page numbering is not
% necessrary to be consecutive.  If such a {\em jump} occurs randomly in any
% columns explicitly updating \counter{page}, it is very tough to give a
% consistent view of the page number of a specific page to all columns.
% Therefore we suppose jumps occur only in the leftmost column 0\footnote{
% 
% But we neither inhibit nor nullify a jump in non-leftmost column and thus
% the update can be seen referring to \texttt{page} counter explicitly.}
% 
% which controls the page numbering, while non-leftmost columns are expected
% to refer the \counter{page} passively.
%
% This page numbering is implemented as follows.  Each time a \colpage{} at
% $p$ of the leftmost column is completed to start a new \colpage{},
% $\page(p)$ is fixed to be the value of \counter{page} and
% $\page(q)$ represented by $\pp(q)$ for all $q\in[p,\ptop]$ are let be
% $\page(p)+(q-p)$.  This update also takes place on \cswitch{} from the
% leftmost column building a \colpage{} at $p$ to another column so that a jump
% happning before the switching is notified to other columns.  On the other
% hand, starting or \cswitch{} to a non-leftmost \colpage{} at $p$ 
% lets \counter{page} have $\page(p)$ referring to $\pp(p)$, unless
% the column starts the most advanced \tpage.  In this new \tpage{} case,
% $\pp(\ptop{+}1)$ is added to $\PP$ to represent $\page(\ptop)+1$ which
% \counter{page} is let have, and $\ptop$ is incremented.
% 
% Note that this management is imperfect because direct references of
% \counter{page} in non-leftmost columns can give inconsistent results if 
% \counter{page} is modified in a non-leftmost column or the reference occurs
% in a page $p$ after that the leftmost column modifies \counter{page} in a
% page $q$ such that $q\leq p$.  However, it is expected that the progress
% of the leftmost column usually preceeds other columns to give consistent
% \counter{page} reference even with jumps.  More importantly, it is assured
% that indirect refereces through |.aux| records and page numbers recorded
% in |.toc|, |.idx|, and so on are always consistent because of the lazy
% evaluation of \counter{page} at shipping-out of a whole page.
% 
% Also note that we also keep $\pp(\ptop)$ in \Midx{\!\pcol@currpage!}
% which is initialized by \!\pcol@output@start! to represent the \!\insert!
% for the \spanning{} preceding \beginparacol.  Then the macro is redefined
% to have the value representing the new page in \!\pcol@startpage!, by
% itself or \!\pcol@setordpage! invoked from the macro, to start the
% page\footnote{
% 
% Other \!\def!initions of \!\pcol@currpage! in \!\pcol@setpnoelt!,
% \!\pcol@output@start!, and \!\pcol@freshpage! are for coding trick and
% thus not for giving a really new \!\def!initions.}.
% 
% We denote the concatenation of $\PP$ and $\pp(\ptop)$ as $\Uidx\PPP$ to
% represent all pages {\em on-the-fly}.
% 
% 
% 
% \subsection{Counters}
% \label{sec:imp-ovv-counter}
% 
% Besides the context variables discussed in \secref{sec:imp-ovv-ccol}, we
% need to make counters local to each column except for those declared to be
% global by \!\globalcounter!.  Let $\Uidx\CC$ be the set (list) of all
% counters declared before \beginparacol, i.e., $\CC=\!\cl@@ckpt!$, and
% $$
% \Uidx\CG=\!\pcol@gcounters!=\{\Uidx\cg_1,\ldots\}=\!\@elt!|{|\cg_1|}|\cdots
% $$
% be the set of {\em\Uidx\gcounter{}s} which have declared so by
% \!\globalcounter!|{|$\cg_i$|}|.  Then the set of {\em\Uidx\lcounter{}s}
% $\Uidx\CL$ is defined as follows.
% 
% \SpecialMainIndex{\pcol@counters}
% $$
% \CL=\CC-\CG=\!\pcol@counters!=\{\Uidx\cl_1,\ldots\}=\!\@elt!|{|\cl_1|}|\cdots
% $$
% 
% Since each column has its own values in \lcounter{}s, we have to keep the
% set of counter\slash value pairs
% 
% \SpecialArrayMainIndex{c}{\pcol@counters}
% $$
% \Uidx\Cc_c=\!\pcol@counters!{\cdot}c=\{\<\cl_1,\val_c(\cl_1)\>,\ldots\}
% =\!\@elt!|{|\cl_1|}||{|\val_c(\cl_1)|}|\cdots
% $$
% for each column $c$, where $\Uidx\val_c(\cl_i)$ is the value of a counter
% $\cl_i$ local to $c$.  That is, whenever we switch from a column $c$ to
% $d$, we save $\<\cl_i,\val_c(\cl_i)\>$ in $\Cc_c$ and restore $\cl_i$ for
% $d$ by letting it have $\val_d(\cl_i)$ in $\Cc_d$, for all $\cl_i\in\CL$.
% 
% A \gcounter{} is free from these save\slash restore operations but needs
% another special operation when it is incremented by \!\stepcounter!.  That
% is, the invocation of \!\stepcounter! for a \gcounter{} $\cg_i$ may clear
% \lcounter{}s in its set of descendant counters
% $\Uidx\clist(\cg_i)=|\pcol@cl@|{\cdot}\cg_i$
% 
% \SpecialArrayMainIndex{\theta}{\pcol@cl@}
% 
% and this clearing must be performed on the all instances of
% $\cl_j\in\clist(\cg_i)$ saved in $\Cc_c$ for all $c\In0\C$.  Therefore, on
% the \!\stepcounter!, we do the followings for all $c\In0\C$; temporarily
% restore all $\cl_k\in\CL$ from $\Cc_c$; clear all $\cl_j\in\clist(\cg_i)$;
% and then save $\<\cl_k,\val_c(\cl_k)\>$ back to $\Cc_c$.
% 
% The other item we maintain for a \lcounter{} $\cl$ is its {\em\Uidx\lrep}
% $\arg{rep}$ in a column $c$ defined by
% $\!\definethecounter!\<\cl\>\<c\>\arg{rep}$.  The \lrep{} $\arg{rep}$ is
% kept in $|\pcol@thectr@|{\cdot}\cl{\cdot}c$ and is made \!\let!-equal to
% $|\the|{\cdot}\cl$ when the column $c$ is visted.
% 
% \SpecialArrayMainIndex{\theta{\cdot}c}{\pcol@thectr@}
% \SpecialArrayIndex{\theta}{\the}
% 
% 
% 
% \section{Interaction with \TeX{} and \LaTeX{}}
% \label{sec:imp-tex}
% 
% The macros of \Paracol{} interacts with \TeX{} and \LaTeX{} through
% various registers and macros as discussed in this section.
% 
% \subsection{Registers}
% \label{sec:imp-tex-reg}
% 
% \subsubsection{Insertion Registers}
% 
% \begin{description}
% \item[\Uidx{\!\footins!}]
% has footnotes \!\insert!ed in a page by \!\footnote! and \!\footnotetext!.
% The register is referred to by \!\pcol@makenormalcol! to combine footnotes
% to other \preenv{} to make a \spanning, and by \!\pcol@output@switch!
% to save it in $\cc_c(\ft)$ when we leave from the column $c$.  The macro
% \!\pcol@restartcolumn! restores $\cc_d(\ft)$ to the register by
% \!\pcol@getcurrfoot! and then \!\insert!s the contents of
% \!\box!\!\footins! into itself so that it contributes to the main vertical
% list to be rebuilt for the column $d$.
% 
% \item[\rm\Uidx{\!\bx@A!}, \ldots, \Uidx{\!\bx@R!}]
% have floats created by \!\@xfloat! in the ordinary usage of \LaTeX.  In
% addtion to it, we use these registers to save \preenv{}
% (\!\pcol@output@start!), completed \colpage{}s (\!\pcol@opcol!),
% \ccolpage{}s and thier footnotes (\!\pcol@output@switch!), \spanning{}
% and thier \fpage{}s (\!\pcol@startpage!), \fcolumn{}s
% (\!\pcol@flushcolumn!), single-column floats having $\cc_c(\vb^b)$ for
% \sync{}ation (\!\pcol@synccolumn!), and \spanning{} carried over at
% \Endparacol{} (\!\pcol@output@end!). 
% \end{description}
% 
% 
% 
% \subsubsection{Integer Registers}
% 
% \begin{description}
% \item[\Uidx{\!\outputpenalty!}]
% is \TeX's primitive register to have the page-break penalty with which
% \!\output! routine is invoked.  It is referred to by \!\pcol@output! to
% know whether it has special code less than $-10000$, and by
% \!\pcol@specialoutput! in detail for the dispatch according to the code.
% The register is also used for the communication from the latter, which lets
% it be $-10000$ for our own special \!\output! routines, to the former to
% determine \!\vsize! according to if the register has a value greater than
% $-10004$ or not.
% 
% \item[\Uidx{\!\interlinepenalty!}]
% is \TeX's primitive register to have the page-break penalty inserted
% between two lines.  The register is referred to by \!\pcol@restartcolumn!
% to insert the \!\penalty! in the register to resume a \colpage{}
% unless it is suspended after a sectioning command,
% i.e. $\CSIndex{if@nobreak}=\true$.
% 
% \item[\Uidx{\!\@ne!}]
% is a \!\chardef! register to have 1.  The register is referred to by the
% following macros mainly for incrementing another register.
% 
% \begin{quote}\raggedright
% \!\pcol@setpnoelt!, \!\pcol@nextpage!, \!\pcol@nextpelt!,
% \!\pcol@checkshipped!, \!\pcol@outputelt!, \!\pcol@specialoutput!,
% \!\pcol@output@switch!, \!\pcol@setcurrcol!, \!\pcol@flushcolumn!,
% \!\pcol@measurecolumn!, \!\pcol@synccolumn!, \!\pcol@makeflushedpage!,
% \!\pcol@flushfloats!, \!\pcol@output@end!, \!\paracol!,
% \!\pcol@setcolumnwidth!, \!\pcol@synccounter!,
% \!\pcol@com@syncallcounters!, \!\pcol@stepcounter!,
% \!\pcol@com@switchcolumn!, \!\pcol@mctext!.
% \end{quote}
% 
% \item[\Uidx{\!\tw@!}]
% is a \!\chardef! register to have 2.  It is used in \!\pcol@setcurrcol! to
% let $\cc_c(\sw)=2$ when $\CSIndex{if@nobreak}=\true$ but
% $\CSIndex{if@afterindent}=\false$.
% 
% \item[\Uidx{\!\m@ne!}]
% is a \!\count! register to have $-1$.  It is used in \!\pcol@setpnoelt!,
% \!\pcol@nextpelt! and \!\pcol@getpelt! to decrement \!\@tempcnta! which
% initially has $p-\pbase$ for a page $p$.  It is also used in
% \!\pcol@setcolumnwidth! to calculate $\C-1$.
% 
% \item[\Uidx{\!\@cclv!}]
% is a \!\chardef! register to have 255.  It is used in
% \!\pcol@setpnoelt! and \!\pcol@getpinfo! to examine if
% $\page(p)\in[0,255]$ for a page $p$.  See the description of \!\box!-type
% registers for its another usage of \!\box!\!\@cclv!.
% 
% \item[\Uidx{\!\@cclvi!}]
% is a \!\mathchardef! register to have 256.  It is used in
% \!\pcol@setordpage! to let $\pp(p)={\page(p)}+256$ and \!\pcol@getpinfo! to
% let $\page(p)=\pp(p)-256$ for a page $p$ such that $\page(p)\in[0,255]$.
% 
% \item[\Uidx{\!\@m!}]
% is a \!\mathchardef! register to have 1000.  It is used in
% \!\pcol@synccolumn! and \!\pcol@output@end! to let
% $\!\prevdepth!=1000\,|pt|$ on a \sync{}ation or the closing \env{paracol}
% environment with an empty main vertical list.
% 
% \item[\Uidx{\!\@M!}]
% is a \!\mathchardef! register to have 10000.  It is used in
% \!\pcol@output! to examine if $\!\outputpenalty!<-10000$ to mean a special
% \!\output! request, in \!\pcol@synccolumn! to put $\!\penalty!=-10000$
% to force page break for flushing columns, and in \!\pcol@synccolumn! to
% bias \!\pcol@textfloatsep! by 10000\,|pt| to indicate a colpage has an
% \mvlfloat{} and in \!\pcol@cflt! and \!\pcol@addflhd! to remove the bias.
% 
% \item[\Uidx{\!\@Miv!}]
% is a \!\mathchardef! register to have 10004.  It is used in \!\pcol@output!
% to examine if $\!\outputpenalty!=-10004$ for a dummy \!\output! request
% made by \LaTeX's float-related macros and our \!\pcol@invokeoutput! to
% ensure the real request is not eliminated when it is made at the very
% beginning of a page or a \colpage.
% 
% \item[\Uidx{\!\@topnum!}]
% is a \!\count! register to have the maximum number of top floats which the
% \ccolpage{} can accept further.  It is used in \!\pcol@setcurrcol!
% and \!\pcol@iigetcurrcol! to save\slash restore it into\slash from
% $\cc_c(\tn)$.  The macro \!\pcol@synccolumn! also lets $\!\@topnum!=0$ to
% inhibit top-float insertions in the \ccolpage{} any more after a
% \sync{}ation.
% 
% \item[\Uidx{\!\@botnum!}]
% is a \!\count! register to have the maximum number of bottom floats which
% the \ccolpage{} can accept further.  It is used in \!\pcol@setcurrcol!
% and \!\pcol@iigetcurrcol! to save\slash restore it into\slash from
% $\cc_c(\bn)$.
% 
% \item[\Uidx{\!\@colnum!}]
% is a \!\count! register to have the maximum total number of floats which
% the \ccolpage{} can accept further.  It is used in \!\pcol@setcurrcol!
% and \!\pcol@iigetcurrcol! to save\slash restore it into\slash from
% $\cc_c(\cn)$.
% 
% \item[\Uidx{\!\col@number!}]
% is a \!\count! register to have the number of columns.  It is let have 1
% by \!\paracol! and \!\pcol@mctext! regardless the real number of columns
% $\C$ in order to keep \!\maketitle! from putting the title by
% \!\twocolumn!.
% 
% \item[\Uidx{\!\c@page!}]
% is \LaTeX's counter \counter{page} being a \!\count! register to have the
% page number.  It is referred to by \!\pcol@setpnoelt!,
% \!\pcol@setordpage!, and \!\pcol@output@start! to let
% $\pp(p)$ represent $\page(p)$.  The macro \!\pcol@startpage! also does
% that for multi-column \fpage{}s incrementing the register.  Then
% $\page(p)$ is reloaded to the register from $\pp(p)$ by \!\pcol@getpelt!,
% \!\pcol@outputelt!, \!\pcol@sync! and \!\pcol@makeflushedpage!.  The other
% user is \!\pcol@remctrelt! which lets
% $|\cl@|{\cdot}\theta=\!\pcol@stepcounter!\Arg{\theta}$
% 
% \SpecialArrayIndex{\theta}{\cl@}
% 
% unless $\theta\neq\counter{page}$.
% 
% \item[$\cs{c@}{\cdot}\theta$]
% \Uidx{\SpecialArrayIndex{\theta}{\c@}}
% 
% is a \!\count! register being \LaTeX's counter $\theta$.  It is referred
% to by \!\pcol@savectrelt! to let $\val_c(\theta)=\Val(\theta)$ for saving
% it in $\Cc_c$, by \!\pcol@cmpctrelt! to examine if
% $\val_0(\theta)=\Val(\theta)$ to detect a modification outside
% \env{paracol} environment, and by \!\pcol@syncctrelt! to let
% $\val_c(\theta)=\Val(\theta)$ for all $c$ for \csync{}.  It is also
% referred to by \!\pcol@remctrelt! to examine if $\theta=\counter{page}$.
% The macros \!\pcol@setctrelt! and \!\pcol@stpldelt! restore the value of
% the counter from $\val_c(\theta)$, while \!\pcol@stpclelt! lets
% $\Val(\theta)=0$ for zero-clearing of descendent counters.
% 
% \item[\Uidx{\!\count@!}]
% is a \!\count! register for temporary use.  It is used in
% \!\pcol@getpinfo! to have $\pp(p)$ for a page $p$.
% 
% \item[\Uidx{\!\@tempcnta!}]
% is a \!\count! register for temporary use.  The usages of this register
% are as follows.
% 
% \begin{itemize}
% \item\begingroup\hbadness3700
% In \!\pcol@setpageno!, \!\pcol@setpnoelt!, \!\pcol@nextpage!,
% \!\pcol@nextpelt!,\break\!\pcol@getcurrpage! and \!\pcol@getpelt!, it
% has $p-q$ when we scan $\pp(q)$ for all $q\in[\pbase,\ptop]$ and the
% \ccolpage{} is at $p$.
% \par\endgroup
% 
% \item
% In \!\pcol@setordpage!, it has $\pp(p)=\page(p)$ or $\pp(p)=\page(p)+256$
% for a page $p$.
% 
% \item
% In \!\pcol@checkshipped!, it has $c$ when we scan $\S_c$ for all
% $c\In0\C$ to examine if all of them are not empty and thus we have pages
% to be shipped out.
% 
% \item
% In \!\pcol@outputelt!, it has $c$ when we scan $\s_c(q)$ for all
% $c\In0\C$ to build the shipping out image of a page $q$.
% 
% \item
% In \!\pcol@setcurrcol!, it has the code calculated from
% \CSIndex{if@nobreak} and |\if@after|\~|indent| to be saved in
% $\cc_c(\sw)$.
% 
% \SpecialIndex{\if@afterindent}
% 
% 
% \item
% In \!\pcol@flushcolumn!, it is used to throw $\page(\ptop)$ away when
% we get it by \!\pcol@getcurrpinfo! because we don't need it.
% 
% \item
% In \!\pcol@setcolumnwidth!, it has $c$ when we scan fractions $r_c$ of the
% argument of \!\columnratio! and then $\min(k,\C{-}1)$ after the scan
% where $k$ is the number of fractions.
% 
% \item
% In \!\pcol@cmpctrelt!, it has $\Val(\theta)$ of a counter $\theta$ to be
% compared with $\val_0(\theta)$.
% 
% \item
% In \!\pcol@com@switchcolumn!, it has $c+1\bmod\C$ being the target of
% \cswitch{}.
% 
% \item
% In \!\pcol@mctext!, it temporarily has $d$ being the target of \cswitch{}
% during we let $\!\pcol@nextcol!=0$ to visit the first column for putting
% a \mctext{}.
% \end{itemize}
% 
% \item[\Uidx{\!\@tempcntb!}]
% is a \!\count! register for temporary use.  It is used in
% \!\pcol@setcolumnwidth! to have $\C-1$ and then $\C-\min(k,C{-}1)$ where
% $k$ is the number of fractions given in the argument of \!\columnratio!.
% \end{description}
% 
% 
% 
% \subsubsection{Dimension Registers}
% 
% \begin{description}
% \item[\Uidx{\!\vsize!}]
% is \TeX's primitive register to have the height of a page or a \colpage{}
% being built.  It is let be \!\@colroom! or \!\maxdimen! by
% \!\pcol@output!.
% 
% \item[\Uidx{\!\hsize!}]
% is \TeX's primitive register to have the width of a page or a \colpage{}
% being built.  It is let be \!\columnwidth! by \!\paracol! and
% \!\pcol@getcurrcol!, while \!\pcol@mctext!  and \!\endparacol! let it be
% \!\textwidth!.
% 
% \item[\Uidx{\!\maxdepth!}]
% is \TeX's primitive register to have the maximum depth of the page being
% built.  It is referred to by \!\pcol@cflt! to let \!\boxmaxdepth! of
% \!\@outputbox!, in which top floats and the main vertical list are
% combined, be \!\maxdepth!.
% 
% \item[\Uidx{\!\boxmaxdepth!}]
% is \TeX's primitive register to have the maximum depth of \!\vbox!es.
% The macro \!\pcol@cflt! let it be \!\maxdepth! for \!\@outputbox! in which
% top floats and the main vertical list are combined, while the macro
% \!\pcol@makenormalcol! let it be \!\@maxdepth! for \!\@outputbox! in which
% \preenv{} is hold.
% 
% \item[\Uidx{\!\prevdepth!}]
% is \TeX's primitive register to have the depth of the box which just has
% been added to a vertical list, or to be given to \TeX's vertical list
% builder for the calculation of the vertical skip inserted below the last
% box.  The macro \!\pcol@invokeoutput! refers to it to save its value in
% \!\pcol@prevdepth! before putting a dummy \!\vbox! and making a \!\output!
% request, and then let it have \!\pcol@prevdepth! which is given by
% \!\output! routine for the column that we resume.  The macro \!\paracol!
% also refers to it to save it in \!\pcol@firstprevdepth! for the \preenv.
% 
% \item[\Uidx{\!\maxdimen!}]
% is a \!\dimen! register to have $16383.99999\,|pt|$ being the largest
% legal dimensional value.  The usages of this register are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@output!, it is set into \!\vsize! when $\!\outputpenalty!=-10004$
% for the dummy \!\output! request so that no page break should occur
% between the dummy and real requests.
% 
% \item
% Our own \!\dimen! register \!\pcol@textfloatsep! has \!\maxdimen! if a
% \colpage{} does not have \sync{}ation points to let top floats are
% inserted in usual way.  Therefore, \!\pcol@floatplacement! and \!\paracol!
% let the register have \!\maxdimen! as the initial value.  Then the macros
% \!\pcol@makecol! and \!\pcol@combinefloats! examine if
% $\!\pcol@textfloatsep!=\!\maxdimen!$ to determine the operation type of
% top float insertion.  The macro \!\pcol@addflhd! also examines it for the
% measurement of the combined height of top and bottom floats, while
% \!\pcol@measurecolumn! gives it \!\maxdimen! as its third argument for
% bottom floats.
% 
% \item
% The \pctext{} $\pp^h(p)$ has $-\!\maxdimen!$ if the page is a \fpage{}.
% The macro \!\pcol@startpage! makes that when it creates such a page.
% 
% \item
% Our own \!\pcol@prevdepth! and that saved in $\cc_c(\pd)$ have
% \!\maxdimen! if the main vertical list is empty at a \sync{}ation.  The
% macro \!\pcol@measurecolumn! makes that when it finds an empty list.
% 
% \item
% The \cctext{} $\cc_c(\tr)$ may have \!\maxdimen! if the column $c$ has a
% \fcolumn{} in the \lpage{} of \env{paracol} environment and the floats in
% it can be put as top floats.  The macro \!\pcol@makefcolumn! makes this
% special assignment and \!\pcol@makeflushedpage! examines it.
% 
% \item
% At a \sync{}ation, we measure the maximum combined size of top floats and
% the main vertical list $\VT$, that of footnotes and bottom floats $\VB$,
% and that of four items $\VP$.  We also let $\DT$ and $\DP$ be the minimum
% depth of the \colpage{}s which gives $\VT$ and $\VP$ respectively.  For
% the measurement, the macro \!\pcol@sync! lets $\VT=\VB=\VP=-\!\maxdimen!$
% and $\DT=\DP=\!\maxdimen!$ as their initial values.  Then the macro
% \!\pcol@synccolumn! examines if $\DT=\!\maxdimen!$ to mean the
% \sync{}ation point is set just below the top floats of a column whose main
% vertical list is empty.  On the other hand, \!\pcol@makeflushedpage! and
% \!\pcol@output@end! examine if $\VP=-\!\maxdimen!$ to mean the last page is
% empty.
% \end{itemize}
% 
% \item[\Uidx{\!\textheight!}]
% is a \!\dimen! register for an API parameter of \LaTeX{} to have the
% height of a page.  The register is referred to by \!\pcol@output! to
% examine if a page is very short, by \!\pcol@getpinfo!, \!\pcol@startpage!,
% \!\pcol@flushfloats! and \!\pcol@output@end! to let \!\@colht! be it for a
% page without \spanning{} (so far), and by \!\pcol@outputelt!,
% \!\pcol@output@flush!, \!\pcol@output@clear! and \!\pcol@output@end! to
% build a page to be shipped out.
% 
% \item[\Uidx{\!\textwidth!}]
% is a \!\dimen! register for an API parameter of \LaTeX{} to have the width
% of a page.  The register is referred to by \!\pcol@outputelt!,
% \!\pcol@makeflushedpage! and \!\pcol@flushfloats! to build a \!\hbox! of
% \!\textwidth! wide to have all columns.  It also referred to by
% \!\pcol@setcolumnwidth! for the calculation of $\w_c$ for all $c\In0\C$,
% and by \!\pcol@mctext! and \!\endparacol! to set it in \!\hsize! etc.
% 
% \item[\Uidx{\!\columnwidth!}]
% is a \!\dimen! register for an API parameter of \LaTeX{} to have the width
% of a column.  The register is let have $\w_0$ by \!\paracol! and $\w_c$ by
% \!\pcol@getcurrcol! for the column $c$, then is referred to by
% \!\pcol@makeflushedpage! and \!\pcol@flushfloats! to
% put each \colpage{} into a \!\hbox! of \!\columnwidth! wide for shipping a
% page out.  The register is also let have \!\textwidth! by \!\endparacol!
% for \postenv.
% 
% \item[\Uidx{\!\linewidth!}]
% is a \!\dimen! register for an API parameter of \LaTeX{} to have the width
% of a line possibly shorter than \!\columnwidth! in \env{list}-like
% environments.  It is let have \!\columnwidth! by \!\paracol! and
% \!\pcol@getcurrcol!, and have \!\textwidth! by \!\endparacol! for
% outermost paragraphs inside\slash outside \env{paracol} environment
% respectively.
% 
% \item[\Uidx{\!\columnsep!}]
% is a \!\dimen! register for an API parameter of \LaTeX{} to have the width
% of inter-column spaces.  It is referred to by \!\pcol@setcolumnwidth! to
% calculate $\w_c$ for all $c\In0\C$.
% 
% \item[\Uidx{\!\z@!}]
% is a \!\dimen! register to have 0\,|pt| and is used in the following macros.
% 
% \begin{quote}\raggedright
% \!\pcol@makecol!,
% \!\pcol@combinefloats!,
% \!\pcol@outputelt!,
% \!\pcol@output@start!,
% \!\pcol@floatplacement!,
% \!\pcol@sync!,
% \!\pcol@measurecolumn!,
% \!\pcol@synccolumn!,
% \!\pcol@output@end!.
% \end{quote}
% 
% It is also used to give the number 0 in the following macros.
% 
% \begin{quote}\raggedright
% \!\pcol@opcol!,
% \!\pcol@setpnoelt!,
% \!\pcol@setordpage!,
% \!\pcol@nextpelt!,
% \!\pcol@checkshipped!,
% \!\pcol@getpelt!,
% \!\pcol@getpinfo!,
% \!\pcol@outputelt!,
% \!\pcol@output@start!,
% \!\pcol@output@switch!,
% \!\pcol@setcurrcol!,
% \!\pcol@sync!,
% \!\pcol@synccolumn!,
% \!\pcol@makeflushedpage!,
% \!\pcol@flushfloats!,
% \!\pcol@freshpage!,
% \!\pcol@output@end!,
% \!\paracol!,
% \!\pcol@setcolumnwidth!,
% \!\pcol@synccounter!,
% \!\pcol@com@syncallcounters!,
% \!\pcol@stepcounter!,
% \!\pcol@stpclelt!,
% \!\pcol@com@switchcolumn!,
% \!\pcol@switchcolumn!,
% \!\pcol@mctext!,
% \!\pcol@switchcol!,
% \!\endparacol!.
% \end{quote}
% 
% \item[\Uidx{\!\p@!}]
% is a \!\dimen! register to have 1\,|pt|.  It is used in
% \!\pcol@cflt!, \!\pcol@addflhd!, \!\pcol@synccolumn! and
% \!\pcol@output@end! as the shorthand of |pt|.
% 
% \item[\Uidx{\!\@maxdepth!}]
% is a \!\dimen! register to have \!\maxdepth! in case that it is
% temporarily modified.  It is used in \!\pcol@makenormalcol! to let
% \!\boxmaxdepth! have it.
% 
% \item[\Uidx{\!\@colht!}]
% is a \!\dimen! register to have the height of columns in a page possibly
% shrunk from \!\textheight! by \spanning.  The usages of the register
% are as folllows.
% 
% \begin{itemize}
% \item \begingroup\hbadness1750
% In macros \!\pcol@startpage!, \!\pcol@output@start!, \!\pcol@flushfloats!
% and\break\!\pcol@output@end!, it is initialized to \!\textheight!.  In first
% two, the value of the register is reduced to reflect \spanning{} and then
% set into $\pp^h(p)$, if \spanning{} exists.
% \par\endgroup
% 
% \item \begingroup\tolerance1500 \hbadness1500
% In macros \!\pcol@getpelt!, \!\pcol@sync!, \!\pcol@flushcolumn!,
% \!\pcol@measure~column!  and \!\pcol@makeflushedpage!, it is let have
% $\pp^h(p)$.  In addition \!\pcol@sync! examines if $\!\@colht!<\VT+\VB$, and
% \!\pcol@makefcolumn! uses it to initialize the room of a \fpage.
% \par\endgroup
% 
% \item
% In macros \!\pcol@startcolumn!, \!\pcol@flushcolumn! and
% \!\pcol@freshpage!, it is used to let \!\@colroom! have it.
% 
% \item
% In macros \!\pcol@output@flush! and \!\pcol@output@clear!, it is given to
% \!\pcol@makeflushedpage! as its argument.  The macro
% \!\pcol@makeflushedpage! lets \!\@colht! be the argument if it is less
% than \!\@colht! and thus is given by \!\pcol@output@end!.
% \end{itemize}
% 
% \item[\Uidx{\!\@colroom!}]
% is a \!\dimen! register to have the height of a column possibly shrunk
% from \!\@colht! by top and bottom floats.  The register is initialized to
% have \!\@colht! by \!\pcol@startcolumn!, \!\pcol@output@start!,
% \!\pcol@flushcolumn! and \!\pcol@freshpage!, the last three of which also
% save it into $\cc_c(\vb^r)$.  This save operation is also done by
% \!\pcol@output@switch!, while restoring from it done by
% \!\pcol@restartcolumn!.  The macro \!\pcol@output! also refers to this
% register to let \!\vsize! have it.   The macro \!\pcol@output@end! lets
% the register have \!\textheight! for the \postenv{} because the
% \colpage{}s above it simply precedes the stuff in the main vertical list.
% The other users \!\pcol@makefcolumn! and \!\pcol@makefcolelt! use this
% register to accumulate the total size of floats to be put in a \fcolumn{}
% temporarily.
% 
% \item[\Uidx{\!\@toproom!}]
% is a \!\dimen! register to have the room for top floats.  The register is
% saved in $\cc_c(\tr)$ by \!\pcol@setcurrcol! and restored from it by
% \!\pcol@iigetcurrcol!.  The macro \!\pcol@makefcolumn! uses this register
% as a flag to indicate that $\cc_c(\tl)$ of the column $c$ having
% $\cc_c(\tr)=\infty$ contains floats to be put in its last \fcolumn{}
% possibly as top floats so that it is examined by \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\@botroom!}]
% is a \!\dimen! register to have the room for bottom floats.  The register
% is saved in $\cc_c(\br)$ by \!\pcol@setcurrcol! and restored from it by
% \!\pcol@iigetcurrcol!.
% 
% \item[\Uidx{\!\@fpmin!}]
% is a \!\dimen! register to have $\!\floatpagefraction!\times\!\@colht!$
% being the minimum total size of floats for which an ordinary (not flushed)
% \fcolumn{} can be build.  It is referred to by \!\pcol@makefcolumn! as the
% threshhold below which floats in the last \fcolumn{} can be put as top
% floats.
% 
% \item[\Uidx{\!\@mparbottom!}]
% is a \!\dimen! register to have the bottom position of the last
% \!\marginpar! stuff.  It is initialize to be 0 by \!\pcol@floatplacement!,
% saved in $\cc_c(\mb)$ by \!\pcol@setcurrcol!, and restored from it by
% \!\pcol@iigetcurrcol!.
% 
% \item[\Uidx{\!\@textfloatsheight!}]
% is a \!\dimen! register to have the combined height of mid floats and
% their separators.  It is initialize to be 0 by \!\pcol@floatplacement!,
% saved in $\cc_c(\fh)$ by \!\pcol@setcurrcol!, and restored from it by
% \!\pcol@iigetcurrcol!.
% 
% \item[\Uidx{\!\dimen@!}]
% is a \!\dimen! register for temporary use.  It is used in 
% \!\pcol@addflhd! and \!\pcol@hdflelt! to measure the height of top and
% bottom floats, and in \!\pcol@measurecolumn! for them and $\VT$, $\VB$ and
% $\VP$.  The other user \!\pcol@synccolumn! lets it have
% $\!\textfloatsep!-\!\floatsep!$ or 0 for the adjustment of the position
% of $\cc_c(\vb^b)$ in the last top float and \!\pcol@textfloatsep!
% following it for a \sync{}ation whose point determined by a column having
% empty main vertical list.
% 
% \item[\Uidx{\!\dimen@ii!}]
% is a \!\dimen! register for temporary use.  It is used in 
% \!\pcol@measurecolumn! for $\VT$, $\VP$ and $\DP$.
% 
% \item[\Uidx{\!\@tempdima!}]
% is a \!\dimen! register for temporary use.  The usages of this register
% are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@combinefloats!, it has the natural component of
% \!\textfloatsep! to be used for the shrink of the vertical skip following
% it, when we put them below the bottom floats in the last page of
% \env{paracol} environment.
% 
% \item
% In \!\pcol@startpage!, it is used to throw $\pp^h(p)$ away when
% we get it by \!\pcol@getcurrpinfo! because we don't need it.
% 
% \item
% In \!\pcol@outputelt!, it has $\pp^h(p)$ to examine if $p$ is a \fpage.
% After that it has $\w_c$ being the width of each |\hbox| into which the
% \colpage{} of each column $c$ is put.
% 
% \item
% In \!\pcol@makefcolumn! and \!\pcol@makefcolelt!, it has the room for
% floats to be put in a \fcolumn{} in the \lpage{}.
% 
% \item
% In \!\pcol@sync!, \!\pcol@measurecolumn! and \!\pcol@synccolumn!, it has
% $\VT$ being the maximum combined height of top floats and the main
% vertical list.
% 
% \item
% In \!\pcol@setcolumnwidth!, it has $\!\textwidth!-(\C-1)\!\columnsep!$
% being the base of $\w_c$.
% \end{itemize}
% 
% \item[\Uidx{\!\@tempdimb!}]
% is a \!\dimen! register for temporary use.  The usages of this register
% are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@sync! and \!\pcol@measurecolumn!, it has $\VB$.
% 
% \item
% In \!\pcol@makefcolelt!, it has the size of a float.
% 
% \item
% In \!\pcol@synccolumn!, it has $\cc_c(\tf)=\!\pcol@textfloatsep!$.
% 
% \item
% In \!\pcol@setcolumnwidth!, it has
% $\!\textwidth!-(\C-1)\!\columnsep!-\sum_{d=0}^{k-1}w_d$ being the base of
% $\w_c$ for $c\In{k}\C$ where $k$ is the number of fractions given in the
% argument of \!\columnratio!.
% \end{itemize}
% 
% 
% \item[\Uidx{\!\@tempdimc!}]
% \begin{Sloppy}{5000}
% is a \!\dimen! register for temporary use.  It has $\DT$ in
% \!\pcol@sync!, \!\pcol@measurecolumn! and \!\pcol@synccolumn!, has
% \!\floatsep! or \!\@fpsep! in \!\pcol@makefcolumn! and
% \!\pcol@makefcolelt!, and has $\w_c$ in \!\pcol@setcolumnwidth!.
% \end{Sloppy}
% 
% \item[\Uidx{\!\@pageht!}]
% is a \!\dimen! register to be used in \LaTeX's \!\@specialoutput! to have
% the height of \!\@holdpg!.  However, we use it as a scratchpad to save
% $\pp^h(\ptop)$ in \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\@pagedp!}]
% is a \!\dimen! register to be used in \LaTeX's \!\@specialoutput! to have
% the depth of \!\@holdpg!.  However, we use it as a scratchpad to have
% $\DP$ in \!\pcol@sync!, \!\pcol@measurecolumn! and \!\pcol@output@end!.
% \end{description}
% 
% 
% 
% \subsubsection{Skip Registers}
% 
% \begin{description}
% \item[\Uidx{\!\baselineskip!}]
% is \TeX's primitive register to have the vertical skip to separate
% adjacent baselines.  It is referred to by \!\pcol@output! and
% \!\pcol@output@start! to examine if \!\@colroom! is unexpectedly small.
% 
% \item[\Uidx{\!\topskip!}]
% is \TeX's primitive register to have the vertical skip from the top edge
% of a page to the baseline of its first vertical item.  It is let be 0 by
% \!\pcol@output@start! if we have \preenv{} and is saved in $\pp^t(0)$,
% while \!\pcol@startpage! lets it be \!\pcol@topskip!, into which
% \!\paracol! saves the value outside \env{paracol} environment, saving the
% value in $\pp^t(p)$.  Then the register is restored from $\pp^t(p)$ by
% \!\pcol@getpelt! and \!\pcol@sync!, while \!\pcol@synccolumn! refers to
% the value restored by the latter to adjust a \sync{}ation point.  The
% macro \!\pcol@output@end! temporarily lets the register have 0 if we have
% non-empty columns in the last page, while \!\endparacol! restores it from
% \!\pcol@topskip! for the pages outside \env{paracol} environmnet.
% 
% \item[\Uidx{\!\floatsep!}]
% is a \!\skip! register to have the vertical skip between adjacent floats.
% It is referred to by \!\pcol@cflt! to cancel the skip following the last
% float, by \!\pcol@makefcolumn! and \!\pcol@makefcolelt! to examine the
% capacity of a \fcolumn{} in the \lpage, and by \!\pcol@addflhd! and
% \!\pcol@hdflelt!  to measure the total height of top and bottom floats.
% 
% \item[\Uidx{\!\textfloatsep!}]
% is a \!\skip! register to have the vertical skip between the main vertical
% list and top\slash bottom floats.  It is referred to by
% \!\pcol@combinefloats! to insert a skip below the bottom floats in the
% \lpage{} of \env{paracol} environment, by \!\pcol@measurecolumn! to take
% this skip into account in the calculation of $\VP$, by \!\pcol@addflhd! to
% measure the vertical space for top and bottom floats, and by
% \!\pcol@synccolumn! to calculate the \sync{}ation point for columns with
% top floats.
% 
% \item[\Uidx{\!\dblfloatsep!}]
% is a \!\skip! register to have the vertical skip between adjacent
% multi-column floats, and is used in \!\pcol@startpage! to cancel the skip
% below the last float.
% 
% \item[\Uidx{\!\dbltextfloatsep!}]
% is a \!\skip! register to have the vertical skip between the last
% multi-column float and the top of columns, and is used in
% \!\pcol@startpage! to put the skip.
% 
% \item[\Uidx{\!\@fptop!}]
% is a \!\skip! register to have the vertical skip inserted at the top of
% a \fcolumn, and is used in \!\pcol@makefcolumn! and
% \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\@fpsep!}]
% is a \!\skip! register to have the vertical skip between adjacent floats
% in a \fcolumn, and is used in \!\pcol@makefcolumn! and
% \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\@fpbot!}]
% is a \!\skip! register to have the vertical skip inserted at the bottom of
% a \fcolumn, and is used in \!\pcol@makefcolumn! and
% \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\@tempskipa!}]
% is a \!\skip! register for temporary use.  It is used to throw $\pp^t(p)$
% away in \!\pcol@startpage!, \!\pcol@outputelt!, \!\pcol@flushcolumn!
% and \!\pcol@makeflushedpage! because we don't need it.  The macro
% \!\pcol@output@start! uses it to determine \!\topskip! for the \spage.
% \end{description}
% 
% 
% 
% \subsubsection{Box Registers}
% 
% \begin{description}
% \item[\Uidx{\!\@cclv!}] 
% is a \!\box! register but \TeX{} defines that it has the main vertical
% list when \!\output! routine is invoked.  It is referred to by
% \!\pcol@specialoutput! to discard the dummy \!\vbox! inserted by
% \!\pcol@invokeoutput!, and is let have the main vertical list of a column
% to be passed to \!\@makecol! by \!\pcol@flushcolumn! and
% \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\voidb@x!}]
% is a \!\box! register to be void always.  It is referred to
% by \!\pcol@outputelt! to initialize \!\@outputbox! and to examine if
% $\S_c$ is empty, by \!\pcol@output@switch! and \!\pcol@setcurrcolnf! to
% let $\cc_c(\ft^b)$ be void if a column does not have footnotes, and by
% \!\pcol@getcurrfoot! to let \!\footins! be void if so.
% 
% \item[\Uidx{\!\@holdpg!}]
% is a \!\box! register to have the main vertical list when \!\output! is
% invoked with a special \!\penalty! code.  It is let have that by
% \!\pcol@specialoutput!, and is referred to by \!\pcol@makenormalcol! for
% \preenv{} and by \!\pcol@output@switch! for the column from which we are
% leaving.
% 
% \item[\Uidx{\!\@outputbox!}]
% is a \!\box! register to have a partial or the complete shipping-out image
% of a column or a page.  The usages of the register are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@combinefloats!, it has a \colpage{} to which top and bottom
% floats are combined.
% 
% \item
% In \!\pcol@cflt!, it has a \colpage{} to which top floats are combined.
% 
% \item
% In \!\pcol@opcol!, it has the complete \colpage{} built by \!\@makecol!.
% 
% \item
% In \!\pcol@startpage!, it has the complete \fpage{} built by \!\@tryfcolumn!.
% 
% \item
% In \!\pcol@outputelt!, it has the complete page to be shipped out by
% \!\@outputpage!.
% 
% \item \begingroup\tolerance1700\hbadness1700
% In \!\pcol@output@start!, it has the \preenv{} built by
% \!\pcol@makenormalcol!.
% \par\endgroup
% 
% \item
% In \!\pcol@flushcolumn!, it has a flushed \colpage{} built by \!\@makecol!
% or a \fcolumn{} built by \!\@makefcolumn!.
% 
% \item
% In \!\pcol@output@flush! and \!\pcol@output@clear!, it has a flushed page
% built by \!\pcol@makeflushedpage! in which it has each of flushed
% \colpage{} built by \!\@makecol!.
% 
% \item
% In \!\pcol@flushfloats!, it has the complete page for flushed \fcolumn{}s
% each of which \!\@makefcolumn! builds also in it.
% 
% \item
% In \!\pcol@output@end!, it has the shipping-out image of the \lpage{} of
% \env{paracol} environment built by \!\pcol@makeflushedpage!.
% \end{itemize}
% 
% \item[\Uidx{\!\@tempboxa!}]
% is a \!\box! register for temporary use.  The usages of the register are
% as follows.
% 
% \begin{itemize}
% \item \begingroup\tolerance2100\hbadness2100
% In \!\pcol@cflt! and \!\pcol@startpage!, it has top single-\slash
% multi-column floats combined by the application of
% \!\@comflelt!\slash\!\@comdblflelt! to \!\@toplist!\slash\!\@dbltoplist!
% respectively.
% \par\endgroup
% 
% \item
% In \!\pcol@specialoutput!, it is used to discard the dummy \!\vbox! put by
% \!\pcol@invokeoutput!.
% 
% \item
% In \!\pcol@measurecolumn!, it is used to examine if the main vertical list
% is empty.
% % \end{itemize}
% \end{description}
% 
% 
% 
% \subsubsection{Token Registers}
% 
% \begin{description}
% \item[\Uidx{\!\output!}]
% is \TeX's primitive to have \!\output! routine.  It is let have
% \!\pcol@output! as its sole token by \!\paracol!.
% 
% \item[\Uidx{\!\everypar!}]
% is \TeX's primitive to have tokens inserted at the beginning of each
% paragarph.  In \!\pcol@mctext! and \!\pcol@com@endcolumn!, it is
% \!\global!ized to keep its contents after the end of a group.  In
% \!\pcol@output@switch!, its contents are broadcasted to $\cc_c(\ep)$ for
% all $c\In0\C$ if columns are \sync{}ed with a \mctext.  Then these values
% or that simply given in a column are saved into $\cc_c(\ep)$ by
% \!\pcol@setcurrcol!, and then restored from it by \!\pcol@iigetcurrcol!.
% 
% \item[\Uidx{\!\@temptokena!}]
% is a \!\toks! register for temporary use.  It is used in
% \!\pcol@output@switch! to broadcast \!\everypar! to $\cc_c(\ep)$ for all
% $c\In0\C$.
% 
% \end{description}
% 
% 
% 
% \subsubsection{Switches}
% 
% \begin{description}
% \item[\Uidx{\CSIndex{if@twocolumn}}]
% is a switch to be $\true$ iff multi-column pages are being typeset.  It is
% turned $\true$ by \!\paracol!, and then turned $\false$ by \!\endparacol!.
% 
% \item[\Uidx{\CSIndex{if@firstcolumn}}]
% is a switch to be $\true$ iff the first column is being typeset.  It is
% turned $\true$ by \!\paracol!, and so by \!\pcol@switchcol! iff it is to
% switch to the column 0.
% 
% \item[\Uidx{\CSIndex{if@nobreak}}]
% is a switch to be $\true$ iff the last paragraph is for a sectioning
% command.  The switch is saved into $\cc_c(\sw)$ together with
% \CSIndex{if@afterindent} by \!\pcol@setcurrcol!, and then restored from
% it by \!\pcol@iigetcurrcol!.  The macro \!\pcol@output@switch! refers to
% it to broadcast the value set by a \mctext{} to $\cc_c(\sw)$ for all
% $c\In0\C$.  The \!\pcol@restartcolumn! inserts $\!\penalty!=10000$ by
% \!\nobreak! if the switch is $\true$.
% 
% \item[\Uidx{\CSIndex{if@afterindent}}]
% is a switch to be $\true$ iff a sectioning commmand tells that the fisrt
% paragraph following it is to be indented.  The switch is saved into
% $\cc_c(\sw)$ together with \CSIndex{if@nobreak} by \!\pcol@setcurrcol!,
% and then restored from it by \!\pcol@iigetcurrcol!.
% 
% \item[\Uidx{\CSIndex{if@fcolmade}}]\begingroup\hfuzz0.45pt
% is a switch to be $\true$ iff a \fpage{} is built by \!\@tryfcolumn! or
% \!\@makefcolumn!.  The value is set by \!\@tryfcolumn! for $\cc_c(\dl)$ is
% referred to by \!\pcol@output!, \!\pcol@startcolumn!, \!\pcol@freshpage!
% and \!\pcol@output@end!, while that for \!\@dbldeferlist! is referred to
% by \!\pcol@startpage!.  The value set by \!\@makefcolumn! for
% $\cc_c(\dl)$ is referred to by \!\pcol@flushcolumn!, while that for
% \!\@dbldeferlist! is referred to by \!\pcol@output@clear!.  The macro
% \!\pcol@makeflushedpage! and \!\pcol@flushfloats! also turns the switch
% $\true$ iff \fcolumn{}s are to be built so that the latter itself
% and \!\pcol@output@end! know that.
% \par\endgroup
% 
% \item[\Uidx{\CSIndex{if@tempswa}}]
% is a switch for temporary use.  The usages of the switch are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@checkshipped!, it is turned $\true$ iff $\S_c$ for all
% $c\In0\C$ have \colpage{}s to be shipped out, and then it is examined by 
% \!\pcol@opcol!.
% 
% \item
% In \!\pcol@nextpage! and \!\pcol@nextpelt!, it is $\true$ until
% \!\pcol@nextpelt! finds the first $q$ such that $q>p$ and
% $\pp^h(q)\geq0$ to mean $q$ is not for a \fpage{}, so that we let $p=q$
% to skip \fpage{}s following to the old $p$ if any.
% 
% \item
% In \!\pcol@outputpage! and \!\pcol@outputelt!, it is $\true$ until
% \!\pcol@outputelt! finds the first $q$ such that $q\geq\pbase$ and
% $\pp^h(q)\geq0$ to mean $q$ is not for a \fpage{}, and the arguemnt of
% \!\pcol@outputpage! is 0 to mean that it is not for page flushing, so that
% we ship out $q$ and all \fpage{}s following it if any.
% 
% \item
% In \!\pcol@output@switch!, at first it holds \CSIndex{if@nobreak} of the
% \mctext{} if columns are \sync{}ed with it to broadcast
% \CSIndex{if@nobreak} to all $\cc_c(\sw)$.  Then it is turned $\true$ iff
% $\CSIndex{ifpcol@sync}=\true$ for \sync{}ation or $\CSIndex{ifpcol@clear}$
% for flushing, so as to invoke \!\pcol@sync!.
% 
% \item
% In \!\pcol@sync!, it is turned $\true$ iff the page with the \sync{}ation
% point being set is not to be flushed, so that it is examined by
% \!\pcol@synccolumn!.
% 
% \item
% In \!\pcol@makefcolumn!, it is turned $\true$ iff the macro is acting on a
% column in the \lpage{}, $\cc_c(\dl)$ is emptied by the macro itself, and
% the total size of the floats to be put in the \fcolumn{} being built by
% the macro is less than \!\@fpmim!, to mean it is possible that the floats
% is put in the \fcolumn{} as top floats.
% 
% \item
% In \!\pcol@measurecolumn! and \!\pcol@addflhd!, it is set to be $\false$
% iff both top floats and the main vertical list are empty, so that
% \!\pcol@measureupdate! examines it for the update of $\VT$ and $\DT$.
% Then it is kept $\false$ iff both of footnotes and bottom floats are
% empty, so that \!\pcol@measureupdate! examines it for the update of $\VP$
% and $\DP$.
% 
% \item
% In \!\pcol@flushfloats!, it is turned $\true$ iff one or more columns have
% non-empty $\cc_c(\dl)$ after shipping a page for \fcolumn{}s out, so that
% \CSIndex{if@fcolmade} is let have its value after scanning all columns.
% 
% \item
% In \!\pcol@makeflushedpage!, it is turned $\true$ iff $\cc_c(\tr)=\infty$
% and $\VP=\pp^h(\ptop)$ to mean the floats in $\cc_c(\tl)$ should be put in
% a \fcolumn{} in the \lpage{} as usual.
% 
% \item
% In \!\pcol@output@end!, at first it is turned $\true$ iff the last page is
% not empty when we have \fcolumn{}s to be built, so that the last page is
% shipped out prior to the pages of \fcolumn{}s.  Then it is turned $\true$
% iff we built \fcolumn{}s, or the main vertical list in the \lpage{} is
% empty and the page is not the \spage, so that we create a new page for the
% \postenv.
% 
% \item
% In $\!\pcol@cmpctrelt!\arg{\theta}$, it is turned $\true$ iff $\theta$ is
% not in $\Cc_0$ or $\Val(\theta)\neq\val_0(\theta)$, so that $\theta$ is
% added to \!\@gtempa! being the list of \lcounter{}s to be synchronized.
% 
% \item
% In $\!\pcol@ac@caption@def!\arg{s}\arg{t}$, \CSIndex{@tempswatrue} or
% \CSIndex{@tempswafalse} is given as its first argument $s$ by
% $\!\pcol@ac@caption@enable!$ or $\!\pcol@ac@caption@disable!$ respectively,
% so that $|\if@ac@caption@if@|{\cdot}t$ is made \!\let!-equal to $s$ and
% \!\pcol@ac@caption! examines it for enabling\slash disabling
% \!\addcontentsline! respectively.  The macros \!\pcol@ac@caption@if@lof!
% and \!\pcol@ac@caption@if@lot! are initialized to be \!\let!-equal to
% \!\@tempswatrue! as the default.
% \end{itemize}
% \end{description}
% 
% 
% 
% \subsection{Macros}
% \label{sec:imp-tex-macro}
% 
% \subsubsection{Procedural Macros}
% 
% \begin{description}
% \item[\Uidx{\CSIndex{par}}]
% is \TeX's primitive to end\slash start paragraphs, but may be modified by
% \LaTeX{} to have some special functionality occasionally.  The macro
% \!\pcol@output! makes it \!\let!-equal to \!\@@par! in which the \TeX's
% orinigal definition is kept, while \!\paracol! and \!\pcol@par! use it as
% is.
% 
% \item[\Uidx{\!\space!}]
% is an API macro to have a space token.  It is used in \!\pcol@output! for
% a warning message.
% 
% \item[\Uidx{\!\thepage!}]
% is an API macro to have the representation of the counter \counter{page}.
% It is used in \!\pcol@output! for a warning message.
% 
% \item[\Uidx{$\cs{the}{\cdot}\theta$}]
% \SpecialArrayIndex{\theta}{\the}
% 
% is an API macro to have the representation of the counter $\theta$.  The
% macro is kept in $|\pcol@thectr@|{\cdot}\theta$
% 
% \SpecialArrayIndex{\theta}{\pcol@thectr@}
% 
% by \!\pcol@thectrelt! which also makes the macro \!\let!-equal to
% $|\pcol@thectr@|{\cdot}\theta{\cdot}0$
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% 
% if the \lrep{} of $\theta$ in the column 0 is defined by
% \!\definethecounter!.  The macro \!\pcol@setctrelt! also makes this
% overriding for the column $c$ to which the macro belongs if the \lrep{}
% for $c$ being $|\pcol@thectr@|{\cdot}\theta{\cdot}c$
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% 
% is defined, while it makes $|\the|{\cdot}\theta$
% 
% \SpecialArrayIndex{\theta}{\the}
% 
% \!\let!-equal to $|\pcol@thectr@|{\cdot}\theta$
% 
% \SpecialArrayIndex{\theta}{\pcol@thectr@}
% 
% otherwise to give it its original definition.
% 
% \item[\Uidx{$\!\stepcounter!\<\theta\>$}]
% is an API macro to increment the counter $\theta$ and zero-clear its
% descendant counters.  It is used in \!\pcol@startpage! for the counter
% \counter{page}.
% 
% \item[\Uidx{\!\nobreak!}]
% is an API macro to insert $\!\penalty!=10000$ to inhibit line or page
% breaks.  It is used in \!\pcol@restartcolumn! to meet the page-break
% inhibition request made by $\CSIndex{if@nobreak}=\true$.
% 
% \item[\Uidx{$\!\addpenalty!\arg{pen}$}]
% is an API macro to insert a page break $\!\penalty!=\arg{pen}$ if
% $\CSIndex{if@nobreak}=\false$.  The \!\penalty! is inserted removing the
% last vertical skip which is reinserted after the \!\penalty!.  The macro
% is used in \!\pcol@restartcolumn! to insert \!\interlinepenalty! if
% $\CSIndex{if@nobreak}=\false$.
% 
% \item[\Uidx{$\!\addcontentsline!\arg{file}\arg{sec}\arg{entry}$}]
% is an API macro to put \!\addtocontents! for the arguments to |.aux| file.
% The orignial definition of the macro is kept in
% \!\pcol@addcontentsline! so that \!\pcol@ac@disable@toc! and
% \!\pcol@ac@caption! make the macro regain its original definition after
% disabling it by making it \!\let!-equal to \!\pcol@gobblethree!.
% 
% \item[\Uidx{\!\footnoterule!}]
% is an API macro to draw a horizontal line above footnotes, or to insert
% whatever it has before them.  The macro is used in \!\pcol@makenormalcol!
% to combine the main vertical list and footnotes if provided to build the
% \preenv{} in \!\@outputbox!.
% 
% \item[\Uidx{\!\dblfigrule!}]
% is an API macro to draw a horizontal line between the last multi-column
% floats and the main vertical list, or to insert whatever it has between
% them.  The macro is used in \!\pcol@startpage! to build \spanning{} in
% the page $p$ in $\pp^b(p)$.
% 
% \item[\Uidx{\!\topfigrule!}]
% is an API macro to draw a horizontal line between the last single-column
% top float and the main vertical list, or to insert whatever it has between
% them.  The macro is used in \!\pcol@cflt! and \!\pcol@synccolumn! to
% insert it below the last (real) top float.  It is also made \!\let!-equal
% to \!\relax! temporarily by \!\pcol@makeflushedpage! when it put floats in
% a \fcolumn{} as top floats.  Note that the macro and its bottom
% counterpart \!\botfigrule! should produce a vertical list whose total
% height and depth is 0, because \LaTeX's float mechanism and thus our
% macros believe so.
% 
% \item[\Uidx{\!\normalcolor!}]
% is an API macro to have color specification stuff for normal coloring.
% The macro is used in \!\pcol@makenormalcol! to specify the color of
% footnotes if provided to include them as a part of \preenv{} in
% \!\@outputbox!.
% 
% \item[\Uidx{$\!\PackageError!\arg{pkg}\arg{msg}\arg{hlp}$}]
% is a developer's API macro to stop the exectution showing the error message
% $\arg{msg}$ with the package identification $\arg{pkg}$ and the help
% mssage $\arg{hlp}$.  The macro is used in \!\pcol@ovf! in case of
% \!\@freelist! shortage, in \!\paracol! for illegal nesting, in
% \!\pcol@switchenv! for illegal \cswitch{} commands\slash
% environments in a \csenv, in \!\pcol@switchcolumn! for invalid target
% column, and in \!\addcontentsonly! for unknown contents type.
% 
% \item[\Uidx{\!\@@par!}]
% is an internal macro to keep \TeX's original primitive \CSIndex{par} in it.
% The macro is used in \!\pcol@output! to let \CSIndex{par} act with its
% original definition.
% 
% \item[\Uidx{\!\@height!}]
% is an internal macro having the keyword |height|.  It is used in
% \!\pcol@output@start! to draw an invisible \!\hrule!.
% 
% \item[\Uidx{\!\@width!}]
% is an internal macro having the keyword |width|.  It is used in
% \!\pcol@output@start! to draw an invisible \!\hrule!.
% 
% \item[\Uidx{\!\@plus!}]
% is an internal macro having the keyword |plus|.  It is used in
% \!\pcol@makecol! to \!\def!ine \!\@textbottom! with the body of a vertical
% skip with infinite stretch and shrink, and in \!\pcol@synccolumn! to put a
% vertical skip with infinite stretch to push up the main vertical list
% above a \sync{}ation point.
% 
% \item[\Uidx{\!\@minus!}]
% is an internal macro having the keyword |minus|.  It is used in
% \!\pcol@makecol! to \!\def!ine \!\@textbottom! with the body of a vertical
% skip with infinite stretch and shrink, and in \!\pcol@combinefloats! to
% put a vertical skip with a shrink of \!\textfloatsep! so that the skip of
% \!\textfloatsep! above it can be canceled if necessary.
% 
% \item[\Uidx{\!\hb@xt@!}]
% is an internal macro having the sequence ``\!\hbox!| to|''.  It is used in 
% \!\pcol@outputelt!, \!\pcol@makeflushedpage! and \!\pcol@flushfloats! to
% put each \colpage{} in a \!\hbox! of \!\columnwidth! wide and to enclose
% all of them in a \!\hbox! of \!\textwidth! wide.
% 
% \item[\Uidx{$\!\@namedef!\arg{cs}\arg{body}$}]
% is an internal macro to do $\!\def!|\|\arg{cs}\Arg{body}$.  It is used in
% the following macros.
% 
% \begin{itemize}
% \item
% \!\paracol! for \!\column*! and \!\pcol@com@column*!.
% 
% \item
% $\!\pcol@remctrelt!\<\theta\>$ for $|\cl@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\cl@}
% 
% \item
% $\!\definethecounter!\<\theta\>\<c\>\arg{rep}$ for
% $|\pcol@thectr@|{\cdot}\theta{\cdot}c$,
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% 
% \item
% $\!\pcol@loadctrelt!\<\theta\>\<\val_c(\theta)\>$ for
% $|\pcol@ctr@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% \end{itemize}
% 
% \item[\Uidx{$\!\@nameuse!\arg{cs}$}]
% is an internal macro to do $|\|\arg{cs}$.  It is used in the following
% macros.
% 
% \begin{itemize}
% \item
% \!\column*! for \!\pcol@com@column*!.
% 
% \item
% $\!\pcol@storectrelt!\<\theta\>$ for $|\pcol@ctr@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
% \item
% $\!\pcol@cmpctrelt!\<\theta\>$ for $|\c@|{\cdot}\theta$
% 
% \SpecialArrayIndex{\theta}{\c@}
% 
% and $|\pcol@ctr@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
% \item
% \!\pcol@synccounter! for $|\pcol@counters|{\cdot}c$ for the column $c$.
% 
% \SpecialArrayIndex{c}{\pcol@counters}
% 
% \item
% $\!\pcol@syncctrelt!\<\theta\>$ for $|\c@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\c@}
% 
% \item
% $\!\pcol@stepcounter!\<\theta\>$ for $|\pcol@counters|{\cdot}c$ for the
% column $c$,
% 
% \SpecialArrayIndex{c}{\pcol@counters}
% 
% and for $|\cl@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\cl@}
% 
% \item
% $\!\pcol@aconlyelt!\<t\>\<c\>$ for $|\pcol@ac@def@|{\cdot}t$.
% 
% \SpecialIndex{\pcol@ac@def@lof}\SpecialIndex{\pcol@ac@def@lot}
% 
% \item
% $\!\pcol@ac@def@lof!\arg{eord}$ and $\!\pcol@ac@def@lot!\arg{eord}$ for
% $|\pcol@ac@caption@|{\cdot}\~\arg{eord}$.
% 
% \SpecialIndex{\pcol@ac@caption@enable}
% \SpecialIndex{\pcol@ac@caption@disable}
% 
% \item
% $\!\pcol@ac@caption!\arg{type}|[|\arg{lcap}|]|\arg{cap}$ for
% $|\pcol@ac@caption@if@|{\cdot}t$
% 
% \SpecialIndex{\pcol@ac@caption@if@lof}
% \SpecialIndex{\pcol@ac@caption@if@lot}
% 
% and for $|\ext@|{\cdot}\~\arg{type}$.
% 
% \SpecialIndex{\ext@figure}\SpecialIndex{\ext@table}
% \end{itemize}
% 
% \item[\Uidx{$\!\@ifundefined!\arg{cs}\arg{then}\arg{else}$}]
% is an internal macro to do $\arg{then}$ or $\arg{else}$ if $\arg{cs}$ is
% undefined or defined respectively.  It is used in
% $\!\addcontentsonly!\<t\>\<c\>$ to stop the execution if
% $|\pcol@ac@def@|{\cdot}t$ is not defined.
% 
% \SpecialArrayIndex{t}{\pcol@ac@def@}
% 
% \item[\Uidx{$\!\@ifnextchar!\arg{char}\arg{then}\arg{else}$}]
% is an internal macro to do $\arg{then}$ or $\arg{else}$ if the character
% following to the macro is $\arg{char}$ or not respectively.  It is used in
% \!\paracol!, the initial definition of \!\pcol@com@column*!,
% \!\pcol@com@switchcolumn! and \!\pcol@iswitchcolumn! to examine if they
% are followed by a `|[|'.
% 
% \item[\Uidx{$\!\@ifstar!\arg{then}\arg{else}$}]
% is an internal macro to do $\arg{then}$ or $\arg{else}$ if the character
% following to the macro is `|*|'.  It is used in \!\pcol@switchcolumn! to
% examine if the optional `|*|' is specified.
% 
% \item[\Uidx{$\!\@whilesw!\arg{sw}\cs{fi}\arg{body}$}]
% is an internal macro to iterate $\arg{body}$ while the switch $\arg{sw}$
% is $\true$.  It is used in \!\pcol@output!, \!\pcol@startpage!,
% \!\pcol@output@clear!, \!\pcol@flushfloats!, \!\pcol@freshpage! and
% \!\pcol@output@end! to iterate building of \fcolumn{}s or \fpage{}s while
% $\CSIndex{if@fcolmade}=\true$.
% 
% \item[\Uidx{$\!\@whilenum!\arg{ifnum}\cs{do}\arg{body}$}]
% is an internal macro to interate $\arg{body}$ while the integer comparison
% expression $\arg{ifnum}$ is $\true$.  The macro is used in the following
% macros to iterate their own procedures for all columns $c\In0\C$.
% 
% \begin{quote}\raggedright
% \!\pcol@checkshipped!,
% \!\pcol@outputelt!,
% \!\pcol@output@start!,
% \!\pcol@output@switch!,
% \!\pcol@sync!,
% \!\pcol@makeflushedpage!,
% \!\pcol@flushfloats!,
% \!\pcol@freshpage!,
% \!\pcol@output@end!,
% \!\pcol@synccounter!,
% \!\pcol@com@syncallcounters!,
% \!\pcol@stepcounter!
% \end{quote}
% 
% The macro is also used in \!\pcol@flushcolumn! to iterate building
% \fcolumn{}s of a column $c$ in pages $q$ such that
% $q\in(\cc_c(\vb^p),\ptop)$, and in \!\pcol@setcolumnwidth! to make
% assignment of $w_c$ for $c\In{\min(k,\C{-}1)}\C$ where $k$ is the number
% of fractions given in the argument of \!\columnratio!.
% 
% \item[\Uidx{$\!\@for!\arg{cs}\texttt{:=}\arg{list}\cs{do}\arg{body}$}]
% is an internal macro to interate $\arg{body}$ for each element of the
% comma-separated $\arg{list}$ letting $\arg{cs}$ have the element.  The
% macro is used in \!\pcol@setcolumnwidth! to scan the argument of
% \!\columnratio! kept in \!\pcol@columnratio!.
% 
% \item[\Uidx{$\!\@next!\arg{elm}\arg{lst}\arg{suc}\arg{fail}$}]
% is an internal macro to remove the first element from $\arg{lst}$,
% \!\def!ine $\arg{elm}$ to have the first element, and then do $\arg{suc}$,
% if $\arg{lst}$ is not empty.  Otherwise, it performs $\arg{fail}$.  The
% macro is used in the following macros to obtain an \!\insert! from
% \!\@freelist!.
% 
% \begin{itemize}
% \item
% \!\pcol@opcol! for the completed \colpage{}.
% 
% \item
% \!\pcol@startpage! for \fpage{}s and \spanning{} for multi-column top
% floats.
% 
% \item
% \!\pcol@output@start! for the \preenv{} and \colpage{}s of all columns.
% 
% \item
% \!\pcol@output@switch! for the \colpage{} from which we are leaving, and
% for footnotes in it if exist.
% 
% \item
% \!\pcol@flushcolumn! for \fcolumn{}s and the empty \colpage{} in $\ptop$.
% 
% \item
% \!\pcol@synccolumn! for an \mvlfloat{} on a \sync{}ation if its point
% defined by a column whose main vertical list is empty.
% 
% \item
% \!\pcol@output@end! for the multi-column floats in the \lpage{} if the
% main vertical list of the page is empty.
% \end{itemize}
% 
% The macro is also used in \!\pcol@outputelt! to obtain completed
% \colpage{}s from $\S_c$.
% 
% \item[\Uidx{$\!\@cons!\arg{lst}\arg{elm}$}]
% is an internal macro to add $\!\@elt!\arg{elm}$ to the tail of $\arg{lst}$.
% 
% \begin{itemize}
% \item
% \!\pcol@opcol! to add the completed \ccolpage{} of $c$ to $\S_c$.
% 
% \item
% \!\pcol@startpage! to add \fpage{}s to $\PP$.
% 
% \item
% \!\pcol@outputelt! to return shipped-out pages, \spanning{} and
% \colpage{}s to \!\@freelist!, or to add $\pp(q)$ to $\PP$ if the page $q$
% is kept.
% 
% \item
% \!\pcol@output@start! to return the \ccolpage{} of 0 to \!\@freelist!.
% 
% \item
% \!\pcol@restartcolumn! to return the \ccolpage{} 
% to be resumed, and its footnotes if any, to \!\@freelist!.
% 
% \item
% \!\pcol@flushcolumn! to return footnotes in the \ccolpage{} of $c$ to be
% flushed to \!\@freelist! if any, and to add the flushed \colpage{} and
% \fcolumn{}s to $\S_c$.
% 
% \item
% \!\pcol@makefcolelt! to add a float to \!\@toplist! or $\cc_c(\dl)$.
% 
% \item
% \!\pcol@synccolumn! to add an \mvlfloat{} for \sync{}ation to
% $\cc_c(\tl)$.
% 
% \item
% \!\pcol@makeflushedpage! to return \spanning{} to \!\@freelist!, and to
% return footnotes in the \colpage{} to be flushed to \!\@freelist! if any.
% 
% \item
% \!\pcol@output@end! to return all \ccolpage{}s to \!\@freelist!.
% 
% \item
% $\!\globalcounter!\<\theta\>$ to add a \gcounter{} $\theta$ to $\CG$.
% 
% \item
% $\!\pcol@iremctrelt!\<\theta\>$ to add \lcounter{} $\theta$ to $\CL$.
% 
% \item
% $\!\pcol@storectrelt!\<\theta\>$ to add $\<\theta,\val_c(\theta)\>$ to
% $\Cc_c$ for a column $c$.
% 
% \item
% $\!\pcol@savectrelt!\<\theta\>$ to add $\<\theta,\val(\theta)\>$ to
% $\Cc_c$ for a column $c$.
% 
% \item
% $\!\pcol@cmpctrelt!\<\theta\>$ to add $\theta$ to the list of \lcounter{}s
% to be synchronized.
% 
% \item
% $\!\addcontentsonly!\<t\>\<c\>$ to add $\<t,c\>$ to $\T$.
% \end{itemize}
% 
% \item[\Uidx{$\!\@cdr!\<a_1\>\<a_2\>\cdots\<a_n\>\cs{@nil}$}]
% is an internal macro to be expanded to $\<a_2\>\cdots\<a_n\>$. It is used
% in $\!\pcol@getcurrpinfo!\arg{cs}$ to extract $\pp(\ptop)$ from
% $\!\pcol@currpage!=\!\@elt!\Arg{\pp(\ptop)}$ and to \!\def!ine $\arg{cs}$
% letting it have $\pp(\ptop)$.
% 
% \item[\Uidx{\!\@eha!}]
% is an internal macro having a help message saying the command causing an
% error is ignored.  It is used in \!\paracol!, \!\pcol@switchcolumn!,
% \!\pcol@switchenv!, and \!\addcontentsonly! as the argument of
% \!\PackageError!.
% 
% \item[\Uidx{\!\@ehb!}]
% is an internal macro having a help message saying the error causes a
% serious problem.  It is used in \!\pcol@ovf! as the argument of
% \!\PackageError!.
% 
% \item[\Uidx{$\!\@latex@warning@no@line!\arg{msg}$}]
% is an internal macro to report a warning message $\arg{msg}$ without the
% line number in which the cause lies.  It is used \!\pcol@output! in case
% that a page with floats and very short main vertical list is built.
% 
% \item[\Uidx{\!\color@begingroup!}]
% is an internal macro to open a group in which a color is specified.  It is
% used in \!\pcol@makenormalcol! to enclose footnotes with \!\normalcolor!
% for \preenv{}.
% 
% \item[\Uidx{\!\color@endgroup!}]
% is an internal macro to close a group in which a color is specified.  It is
% used in \!\pcol@makenormalcol! to enclose footnotes with \!\normalcolor!
% for \preenv{}.
% 
% \item[\Uidx{$\!\@stpelt!\<\theta\>$}]
% is an internal macro to zero-clear the counter $\theta$ for the
% implementation of \!\stepcounter!.  It is used in \!\pcol@stepcounter! to
% clear the descendent counters of a \gcounter{} $\cg$ listed in
% $|\pcol@cl@|{\cdot}\cg$.
% 
% \SpecialArrayIndex{\theta}{\pcol@cl@}
% 
% \item[\Uidx{\!\@sect!}]
% is an internal macro to implement sectioning commands.  The original
% definition of the macro is kept in \!\pcol@ac@enable@toc!, while
% \!\pcol@ac@def@toc! makes it \!\let!-equal to \!\pcol@ac@enable@toc! or
% \!\pcol@ac@disable@toc!, the latter of which uses the original version
% kept in \!\pcol@ac@enable@toc! after disabling \!\addcontentsline!.
% 
% \item[\Uidx{\!\@caption!}]
% is an internal macro to implement \!\caption!.  The original definition of
% the macro is kept in \!\pcol@ac@caption@latex!, while
% \!\pcol@ac@caption@def! makes it \!\let!-equal to \!\pcol@ac@caption!
% which uses the original version kept in \!\pcol@ac@enable@toc! after
% disabling \!\addcontentsline! if necessary.
% 
% \item[\Uidx{\!\ext@figure!}]
% is an internal macro having ``|lof|'' being the extention of the file for
% list of figures.  It is used in
% $\!\pcol@ac@caption!\arg{type}|[|\arg{lcap}|]|\<cap\>$ to have ``|lof|''
% when $\arg{type}=|figure|$.
% 
% \item[\Uidx{\!\ext@table!}]
% is an internal macro having ``|lot|'' being the extention of the file for
% list of tables.  It is used in
% $\!\pcol@ac@caption!\arg{type}|[|\arg{lcap}|]|\<cap\>$ to have ``|lot|''
% when $\arg{type}=|table|$.
% 
% \item[\Uidx{\!\@specialoutput!}]
% is an internal macro for \!\output! routine to process an \!\output!
% request made by \LaTeX's original \!\clearpage! and $\!\end!\Arg{float}$.
% It is used in \!\pcol@specialoutput! to process the request for floats.
% 
% \item[\Uidx{\!\@makecol!}]
% is an internal macro for \!\output! routine to build the shipping-out
% image of a column in \!\@outputbox! consisting of top floats, main
% vertical list in \!\box!|255|, footnotes in \!\footins!, and bottom
% floats.  It is used in \!\pcol@makecol! for an ordinary \colpage{},
% in \!\pcol@flushcolumn! for a \ccolpage{} to be flushed, and in
% \!\pcol@makeflushedpage! for \colpage{}s in $\ptop$ to be flushed.
% 
% \item[\Uidx{\!\@combinefloats!}]
% is an internal macro for \!\output! routine to combine top and bottom
% floats in \!\@toplist! and \!\@botlist! respectively with \!\@outputbox!
% in which the main vertical list and footnotes have been put by
% \!\@makecol!, and to have the result in \!\@outputbox! again.  It is used
% in \!\pcol@makenormalcol! for \preenv{}, while \!\paracol! makes it
% \!\let!-equal to our own \!\pcol@combinefloats! so that \!\@makecol! uses
% it.
% 
% \item[\Uidx{\!\@cflt!}]
% is an internal macro for \!\output! routine to put all top floats in
% \!\@toplist! and related stuff such as the vertical skip of
% \!\textfloatsep! into \!\@outputbox!  together with its old contents being
% the main vertical list and footnotes.  It is used in
% \!\pcol@combinefloats! if the \colpage{} being processed does not have
% \sync{}ation points.
% 
% \item[\Uidx{\!\@cflb!}]
% is an internal macro for \!\output! routine to put all bottom floats in
% \!\@botlist! and related stuff such as the vertical skip of
% \!\textfloatsep! into \!\@outputbox!  together with its old contents being
% top floats, the main vertical list and footnotes.  It is used in
% \!\pcol@combinefloats!.
% 
% \item[\Uidx{$\!\@comflelt!\arg{flt}$}]
% is an internal macro for \!\output! routine to put $\arg{flt}$ being a
% single-column top or bottom float to the tail of \!\@tempboxa! which
% finally has all top\slash bottom floats in a column.  It is used in
% \!\pcol@cflt! to apply to each element of \!\@toplist!.
% 
% \item[\Uidx{\!\@textbottom!}]
% is an internal macro for \!\output! routine to be put at the bottom of
% \!\@outputbox! in which a \colpage{} is stored, by \!\@makecol!.  This
% macro is temporarily re\!\def!ined by \!\pcol@makecol! for a \colpage{}
% having \sync{}ation points so that it has a vertical skip of inifinite
% stretch and shrink to push up/down the staff below the last \sync{}ation
% point in order to adjust its top to the point.  After that, its original
% definition kept in \!\pcol@textbottom! is restored.
% 
% \item[\Uidx{\!\@outputpage!}]
% is an internal macro for \!\output! routine to output a page kept in
% \!\@outputbox! together with the headder and footer.  It is used in
% \!\pcol@outputelt! for ordinary completed pages, in \!\pcol@output@start!
% for (almost) full page \preenv{}, in \!\pcol@output@flush! for the
% flushed \tpage, in \!\pcol@output@clear! for the flushed \tpage{} and
% following \fpage{}s, in \!\pcol@flushfloats! for pages having flushed
% \fcolumn{}s, and in \!\pcol@output@end! for the non-empty \lpage{}
% followed by pages having \fcolumn{}s.
% 
% \item[\Uidx{\!\@dblfloatplacement!}]
% is an internal macro for \!\output! routine to reinitialize multi-column
% float placement paramenters.  It is used in \!\pcol@startpage! and
% \!\pcol@output@clear! prior to processing multi-column floats in
% \!\@dbldeferlist!.
% 
% \item[\Uidx{$\!\@tryfcolumn!\arg{lst}$}]
% is an internal macro for \!\output! routine which examines if a \fcolumn{}
% or a \fpage{} can be built with some floats in $\arg{lst}$ and, if so,
% builds the page in \!\@outputbox! removing floats put in the page from
% $\arg{lst}$.  It is used in \!\pcol@startpage! for multi-column floats in
% \!\@dbldeferlist!, and in \!\pcol@startcolumn! for single-column floats in
% $\cc_c(\dl)$.
% 
% \item[\Uidx{$\!\@sdblcolelt!\arg{flt}$}]
% is an internal macro for \!\output! routine which examines if a
% multi-column float $\arg{flt}$ can be added to \!\@dbltoplist! being the
% list of the floats to be put at the top of a page, and if so, adds
% $\arg{flt}$ to \!\@dbltoplist!, while it is added to \!\@dbldeferlist!
% otherwise.  It is used in \!\pcol@startpage! to apply to each element of
% (the copy of) \!\@dbldeferlist!.
% 
% \item[\Uidx{$\!\@comdblflelt!\arg{flt}$}]
% is an internal macro for \!\output! routine to put $\arg{flt}$ being a
% multi-column float to the tail of \!\@tempboxa! which finally has the
% \spanning{} for multi-column floats.  It is used in \!\pcol@startpage! to
% apply to each element of \!\@dbltoplist! to have the \spanning.
% 
% \item[\Uidx{\!\@floatplacement!}]
% is an internal macro for \!\output! routine to reinitialize single-column
% float placement parameters.  It is used in our own version of it,
% \!\pcol@floatplacement!.
% 
% \item[\Uidx{$\!\@scolelt!\arg{flt}$}]
% is an internal macro for \!\output! routine which examines if a
% single-column float $\arg{flt}$ can be added to \!\@toplist! or
% \!\@botlist! being the list of the floats to be put at the top or bottom
% of a page respectively.  Then, if the examination succeeds, $\arg{flt}$ is
% added to \!\@toplist! or \!\@botlist!, while it is added to
% \!\@deferlist! otherwise.  It is used in \!\pcol@trynextcolumn! to
% apply to each element of (the copy of) $\cc_c(\dl)$.
% 
% \item[\Uidx{$\!\@makefcolumn!\arg{lst}$}]
% is an internal macro for \!\output! routine to build a \fcolumn{} with
% some floats at the head of a float list $\arg{lst}$ and to remove the
% floats from the list.  It is used in \!\pcol@flushcolumn! and
% \!\pcol@flushfloats! for $\cc_c(\dl)$ of single-column floats, and in
% \!\pcol@output@clear! for \!\@dbldeferlist! of multi-column floats which
% become single-column ones.
% 
% \item[\Uidx{\!\@opcol!}]
% is an internal macro for \!\output! routine to output a page or to keep
% the first column until the second one is completed.  This macro is used
% only in \!\pcol@output@end! for the case multi-column floats are left at
% \Endparacol{} and they are put in \fpage{}s.
% 
% \item[\Uidx{\!\@startcolumn!}]
% is an internal macro for \!\output! routine which tries to build a
% \fcolumn{} for the floats in \!\@deferlist! and, if the column
% is not built, tries to move floats to \!\@toplist! and \!\@botlist!.  This
% macro is used only in \!\pcol@output@end! for the case multi-column floats
% are left at \Endparacol{} after which they become single-column ones.
% 
% \item[\Uidx{\!\@emptycol!}]
% is an internal macro for \!\output! routine to put back an empty page to
% the main vertical list.  It is used \!\pcol@output! in case that a page
% with floats and very short main vertical list is built.
% \end{description}
%
% 
% 
% \subsubsection{Structural Macros}
% 
% \begin{description}
% \item[\Uidx{\!\topfraction!}]
% is an API macro to have the maximum fraction of the space for top floats
% in a column.  It is used by \!\pcol@makeflushedpage! to recalculate
% $\!\@toproom!=\cc_c(\tr)=\!\topfraction!\times\pp^h(\ptop)$.
% 
% \item[\Uidx{$\!\@elt!\<a_1\>\cdots\<a_n\>$}]
% is an internal control sequence to represent a list element having $n$
% subelements.  The sequence is often made \!\let!-equal to a macro which
% processes $\<a_1\>\cdots\<a_n\>$ and is applied to all members in a list.
% It is also made \!\let!-equal to \!\relax! on a manipulation of a list,
% such as element addition and concatenation, by \!\edef! or \!\xdef!.  The
% usages of the sequence are as follows.
% 
% \begin{itemize}
% \item
% \!\pcol@cflt! does $\!\@elt!=\!\@comflelt!$ for $\cc_c(\tl)$, and then
% $\!\@elt!=\!\relax!$ to concatenate \!\@freelist! and $\cc_c(\tl)$.
% 
% \item
% \!\pcol@setpageno! does $\!\@elt!=\!\pcol@setpnoelt!$ for $\PP$.
% 
% \item
% \!\pcol@setpnoelt! does $\!\@elt!=\!\relax!$ to add $\pp(q)$ to $\PP$.  It
% also uses \!\@elt! to \!\def!ine \!\pcol@currpage! with
% $\!\@elt!\<\pp(q)\>$ or $\!\@elt!|{|\pp(q)|}|$.
% 
% \item
% \!\pcol@setordpage! does $\!\@elt!=\!\relax!$ to \!\xdef!ine
% \!\pcol@currpage! with $\!\@elt!|{|\pp(q)|}|$.
% 
% \item
% \!\pcol@nextpage! does $\!\@elt!=\!\pcol@nextpelt!$ for $\PPP$.
% 
% \item
% \!\pcol@getcurrpage! does $\!\@elt!=\!\pcol@getpelt!$ for $\PPP$.
% 
% \item
% \!\pcol@startpage! does $\!\@elt!=\!\@sdblcolelt!$ for (the copy of)
% \!\@dbldeferlist!, $\!\@elt!=\!\@comdblflelt!$ for \!\@dbltoplist!,
% and then $\!\@elt!=\!\relax!$ to concatenate \!\@freelist! and
% \!\@dbltoplist!.  It also uses \!\@elt! to \!\xdef!ine \!\pcol@currpage!
% with $\!\@elt!\<\pp(\ptop)\>$.
% 
% \item
% \!\pcol@outputpage! does $\!\@elt!=\!\pcol@outputelt!$ with two arguments
% for (the copy of) $\PP$.
% 
% \item
% \!\pcol@trynextcolumn! does $\!\@elt!=\!\@scolelt!$ for (the copy of)
% $\cc_c(\dl)$.
% 
% \item
% \!\pcol@output@start! uses \!\@elt! to \!\xdef!fine \!\pcol@currpage! with
% $\!\@elt!\<\pp(0)\>$.
% 
% \item
% \!\pcol@makenormalcol! does $\!\@elt!=\!\relax!$ to concatenate
% \!\@freelist! and \!\@midlist!.
% 
% \item
% \!\pcol@setcurrcol! does $\!\@elt!=\!\relax!$ to \!\xdef!ine $\cc_c$ with
% $\cc_c(\tl)=\!\@toplist!$, $\cc_c(\ml)=\!\@midlist!$,
% $\cc_c(\bl)=\!\@botlist!$  and $\cc_c(\dl)=\!\@deferlist!$.
% 
% \item
% \!\pcol@makefcolumn! does $\!\@elt!=\!\pcol@makefcolelt!$ for (the copy
% of) $\cc_c(\dl)$ to examine if each float in it can be put in a \fcolumn{}
% to be built, and then \!\def!ine it to put floats in $\cc_c(\tl)$ into
% $\cc_c(\vb^b)$.
% 
% \item
% \!\pcol@addflhd! does $\!\@elt!=\!\pcol@hdflelt!$ for its argument
% $\cc_c(\tl)$ or $\cc_c(\bl)$, and then $\!\@elt!=\!\relax!$ to give the
% default.
% 
% \item
% \!\pcol@output@end! does $\!\@elt!=\!\relax!$ to add the \spanning{} of
% the last page to the head of \!\@dbldeferlist!.
% 
% \item
% \!\paracol! does $\!\@elt!=\!\pcol@remctrelt!$ for $\CG$,
% $\!\@elt!=\!\pcol@thectrelt!$ for $\CL$, $\!\@elt!=\!\pcol@loadctrelt!$
% for $\Cc_0$, $\!\@elt!=\!\pcol@cmpctrelt!$ for $\CL$,
% $\!\@elt!=\!\pcol@defcomelt!$ for \!\pcol@localcommands!, and then
% $\!\@elt!=\!\relax!$ to give the default.
% 
% \item
% \!\pcol@localcommands! has the sequence of $\!\@elt!\ARg{com}$ for all
% \lcommand{}s $|\|\arg{com}$.
% 
% \item
% \!\pcol@gcounters! has \!\@elt!|{page}| as its initial definition.
% 
% \item
% \!\pcol@remctrelt! does $\!\@elt!=\!\pcol@iremctrelt!$ for (the copy of)
% $\CL$.
% 
% \item
% $\!\pcol@sscounters!\arg{elt}$ does $\!\@elt!=\arg{elt}$, where
% $\arg{elt}=\!\pcol@storectrelt!$ or $\arg{elt}=\!\pcol@savectrelt!$, for
% $\CL$, and then $\!\@elt!=\!\relax!$ to \!\xdef!ine $\Cc_c$.
% 
% \item \begingroup\hfuzz1.4pt
% $\!\pcol@com@synccounter!\<\theta\>$ gives $\!\@elt!\Arg{\theta}$ as the
% argument of |\pcol@synccounter|.
% 
% \SpecialIndex{\pcol@synccounter}
% \par\endgroup
% 
% \item \begingroup\hfuzz0.37pt
% $\!\pcol@synccounter!\arg{lst}$ does $\!\@elt!=\!\relax!$ to have the list
% $\arg{lst}$ in \!\reserved@a! by \!\edef!, $\!\@elt!=\!\pcol@loadctrelt!$
% for $\CC_c$, and then $\!\@elt!=\!\pcol@syncctrelt!$ for $\arg{lst}$.
% \par\endgroup
% 
% \item
% $\!\pcol@stepcounter!\<\theta\>$ does $\!\@elt!=\!\pcol@stpldelt!$ for
% $\CL$, $\!\@elt!=|\pcol@|\~|stpclelt|$
% 
% \SpecialIndex{\pcol@stpclelt}
% 
% for $\clist(\theta)$, and then $\!\@elt!=\!\@stpelt!$ for
% $\clist(\theta)$.
% 
% \item
% \!\pcol@switchcol! does $\!\@elt!=\!\pcol@setctrelt!$ for $\CC_c$,
% $\!\@elt!=|\pcol@|\~|aconlyelt|$
% 
% \SpecialIndex{\pcol@aconlyelt}
% 
% for $\T$, and then $\!\@elt!=\!\relax!$ to give the default.
% \end{itemize}
% 
% \item[\Uidx{\!\@empty!}]
% is a macro always having nothing.  Its major usages are to examine if a
% macro often having a list is empty, and to make such a macro empty.  The
% following macros use \!\@empty! to examine the emptiness of the objects in
% parentheses.
% 
% \begin{quote}
% \!\pcol@combinefloats! ($\cc_c(\tl)$, $\cc_c(\bl)$)\\
% \!\pcol@checkshipped! ($S_c$)\\
% \!\pcol@startpage! ($\pp(\ptop)$, \!\@dbltoplist!)\\
% \!\pcol@flushcolumn! ($\cc_c(\dl)$)\\
% \!\pcol@makefcolumn! ($\cc_c(\dl)$, $\cc_c(\tl)$)\\
% \!\pcol@measurecolumn! ($\cc_c(\bl),\cc_c(\dl)$)\\
% \!\pcol@addflhd! ($\cc_c(\tl)$, $\cc_c(\tl)$)\\
% \!\pcol@synccolumn! ($\cc_c(\tl)$)\\
% \!\pcol@makeflushedpage! ($\cc_c(\dl)$)\\
% \!\pcol@flushfloats! ($\cc_c(\dl)$)
% \end{quote}
% 
% The following macros use \!\@empty! to empty the objects in parentheses.
% 
% \begin{quote}
% \!\pcol@cflt! ($\cc_c(\tl)$)\\
% \!\pcol@setpageno! ($\PP$, $\pp(\ptop)$)\\
% \!\pcol@startpage! ($\cc_c(\dl)$, \!\@dbltoplist!)\\
% \!\pcol@trynextcolumn! ($\cc_c(\dl)$)\\
% \!\pcol@output@start! ($\PP$, $\pp(\ptop)$, $\cc_c(\dl)$)\\
% \!\pcol@makenormalcol! (\!\@midlist!)\\
% \!\pcol@flushcolumn! ($\cc_c(\dl)$)\\
% \!\pcol@makefcolumn! ($\cc_c(\dl)$, $\cc_c(\tl)$)\\
% \!\pcol@makeflushedpage! ($\cc_c(\tl)$)\\
% \!\pcol@freshpage! ($\PP$, $\pp(\ptop)$)\\
% \!\paracol! (\!\@gtempa!)\\
% \!\pcol@remctrelt! ($\CL$)\\
% \!\pcol@sscounters! ($\Cc_c$)
% \end{quote}
% 
% \item[\Uidx{\!\@currbox!}]
% is an internal macro which conventionally has an \!\insert! for floats,
% etc.  The follwing macros use \!\@currbox! having the objects in
% parentheses.
% 
% \begin{quote}
% \!\pcol@opcol! ($\cc_c(\vb)$)\\
% \!\pcol@startpage! ($\pp(\ptop)$)\\
% \!\pcol@outputelt! ($\pp(q)$, $\s_c(q)$)\\
% \!\pcol@output@start! ($\pp(0)$, $\cc_c(\vb)$)\\
% \!\pcol@output@switch! ($\cc_c(\vb)$)\\
% \!\pcol@restartcolumn! ($\cc_c(\vb)$)\\
% \!\pcol@igetcurrcol! ($\cc_c(\vb)$)\\
% \!\pcol@setcurrcol! ($\cc_c(\vb)$)\\
% \!\pcol@sync! ($\pp(\ptop)$)\\
% \!\pcol@flushcolumn! ($\cc_c(\vb), \s_c(q)$)\\
% \!\pcol@measurecolumn! ($\cc_c(\vb)$)\\
% \!\pcol@synccolumn! ($\cc_c(\vb)$)\\
% \!\pcol@makeflushedpage! ($\pp(\ptop)$, $\cc_c(\vb)$)\\
% \!\pcol@freshpage! ($\cc_c(\vb)$)\\
% \!\pcol@output@end! (top float, $\cc_c(\vb)$)
% \end{quote}
% 
% \item[\Uidx{\!\@freelist!}]
% is an internal macro having available \!\insert!s for floats originially,
% but also \colpage{}s, pages and footonotes in our usage.  Besides the
% acquisition of an \!\insert! from it shown in the description of
% \!\@next!, it is used by the following macros to return the the objects in
% parentheses to \!\@freelist!.
% 
% \begin{quote}
% \!\pcol@cflt! ($\cc_c(\tl)$)\\
% \!\pcol@startpage! (\!\@dbltoplist!)\\
% \!\pcol@outputelt! ($\pp(q)$, $\s_c(q)$)\\
% \!\pcol@output@start! ($\cc_0(\vb)$)\\
% \!\pcol@makenormalcol! (\!\@midlist!)\\
% \!\pcol@restartcolumn! ($\cc_c(\vb)$, $\cc_c(\ft)$)\\
% \!\pcol@flushcolumn! ($\cc_c(\ft)$)\\
% \!\pcol@makefcolumn! ($\cc_c(\tl)$)\\
% \!\pcol@makeflushedpage! ($\pp(\ptop)$, $\cc_c(\ft)$, $\cc_c(\tl)$)\\
% \!\pcol@output@end! ($\cc_c(\vb)$)
% \end{quote}
% 
% \item[\Uidx{\!\@nil!}]
% is an internal control sequence which is conventionally used to terminate
% a variable length argument.  It is used in \!\pcol@getcurrpinfo! for the
% invocation of \!\@cdr!.
% 
% \item[\Uidx{\!\@dbldeferlist!}]
% is an internal macro having the list of multi-column floats whose page
% appearance are not yet fixed.  It is scanned and then updated in
% \!\pcol@startpage! and \!\pcol@output@clear!, while \!\pcol@output@start!
% lets it have \!\@deferlist! made before \beginparacol, and
% \!\pcol@output@end! adds multi-column floats to be put in the empty
% \lpage{} to it and then move the whole of the list to \!\@deferlist!.
% 
% \item[\Uidx{\!\@dbltoplist!}]
% is an internal macro having the list of multi-column floats which
% \!\@sdblcolelt! decided to be put in the new page.  The macro
% \!\pcol@startpage! scans it to put all floats in the page $\ptop$, and then
% empties it after returning all floats to \!\@freelist!.
% 
% \item[\Uidx{\!\@deferlist!}]
% is an internal macro having the list of single-column floats whose page
% appearance are not yet fixed.  It is scanned and then updated in
% \!\pcol@startcolumn!, \!\pcol@trynextcolumn!, \!\pcol@flushcolumn!,
% \!\pcol@makefcolumn! and \!\pcol@flushfloats!, while the following macros
% also act on it.
% 
% \begin{itemize}
% \item
% \!\pcol@output@start! moves it to \!\@dbldeferlist! because it is created
% before \beginparacol.
% 
% \item
% \!\pcol@setcurrcol! and \!\pcol@igetcurrcol! saves\slash restores it
% in/from $\cc_c(\dl)$, respectively.
% 
% \item
% \!\pcol@measurecolumn! examines its emptiness to make $\VP=\pp^h(\ptop)$
% if not empty.
% 
% \item
% \!\pcol@makeflushedpage! examines its emptiness to remember whether any
% floats are deferred for \!\pcol@output@end!.
% 
% \item
% \!\pcol@output@end! lets it have \!\@dbldeferlist! so that it processed as
% sigle-float floats after \Endparacol.
% \end{itemize}
% 
% \item[\Uidx{\!\@toplist!}]
% is an internal macro having the list of single-column floats which is
% decided to be put at the top of the \ccolpage{} by float environments or by
% \!\pcol@trynextcolumn!.  This list is scanned by \!\pcol@cflt! if its
% invoker \!\pcol@combinefloats! finds the macro is not empty.  The list is
% also scanned by \!\pcol@measurecolumn! for the measurement of the combined
% size of top floats, while \!\pcol@setcurrcol! and \!\pcol@igetcurrcol!
% saves\slash restores the list in/from $\cc_c(\tl)$ respectively.  In
% addition our macros may add an element or build the entire list in the
% following two cases.  One case is for a \sync{}ation for which
% \!\pcol@synccolumn! lets the main vertical list in $\cc_c(\vb^b)$ be a
% float, namely {\em\mvlfloat} to be added to this list.  Another case is for
% a \fcolumn{} in the \lpage{} for which \!\pcol@makefcolumn! and
% \!\pcol@makefcolelt! build this list for deferred floats.  In the latter
% case, the list is scanned by \!\pcol@makefcolumn! itself or by
% \!\pcol@makeflushedpage!.
% 
% \item[\Uidx{\!\@botlist!}]
% is an internal macro having the list of single-column floats which is
% decided to be put at the bottom of the \ccolpage{} by float environments or
% by \!\pcol@trynextcolumn!.  The emptiness of this list examined by
% \!\pcol@combinefloats! to invoke the scanner \!\@cflb! unless empty.  The
% list is also scanned by \!\pcol@measurecolumn! for the measurement of the
% combined size of bottom floats, while \!\pcol@setcurrcol! and
% \!\pcol@igetcurrcol! saves\slash restores the list in/from $\cc_c(\bl)$
% respectively.
% 
% \item[\Uidx{\!\@midlist!}]
% is an internal macro having the list of in-text floats which has already
% been put in the \ccolpage{} but is kept to check the ordering of the
% succeeding floats.  The list is emptied by \!\pcol@makenormalcol! after
% returning all elements in it to \!\@freelist!, while \!\pcol@setcurrcol!
% and \!\pcol@igetcurrcol! saves\slash restores the list in/from
% $\cc_c(\ml)$ respectively.
% 
% \item[\Uidx{\!\cl@@ckpt!}]
% is an internal macro having the list of all counters defined by
% \!\newcounter! and the counter \counter{page}.  The original usage of this
% macro is to log the values of all counters into |.aux| by \!\include!, but
% we use it to obatin all counters in \!\paracol!.
% 
% \item[$\cs{cl@}{\cdot}\theta$]
% is an internal macro having the list $\clist(\theta)$ of descendant
% counters of the counter $\theta$ whose increment by \!\stepcounter! lets
% them 0.  The macro \!\pcol@remctrelt! moves it to
% $|\pcol@cl@|{\cdot}\theta$
% 
% \Uidx{\SpecialArrayIndex{\theta}{\cl@}}
% 
% and re\!\def!ines it to have $\!\pcol@stepcounter!\Arg{\theta}$.
% 
% \item[\Uidx{\!\reserved@a!}]
% is an internal macro for temporary use.  Its usages are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@setpageno!, it has $\PPP$ so that we update $\PP$ and
% $\pp(\ptop)$ scanning their original contents.
% 
% \item
% In \!\pcol@specialoutput!, it is \!\let!-equal to $|\pcol@output@|{\cdot}f$
% corresponding to $\!\outputpenalty!=|\pcol@op@|{\cdot}f$, or
% \!\@specialoutput!.
% 
% \item
% In \!\pcol@flushcolumn!, it is used to throw $\pp^b(\ptop)$ away because
% we don't need it.
% 
% \item
% In \!\pcol@setcolumnwidth!, it is used to have the fraction $r_c$ being a
% comma-seperated list element in the
% argument of \!\columnratio! scanned by a \!\@for! loop.
% 
% \item
% In $\!\pcol@defcomelt!\arg{com}$, it is used to implement
% $\!\let!|\|\arg{com}=|\pcol@com@|{\cdot}\~\arg{com}$.
% 
% \item
% In $\!\pcol@remctrelt!\<\theta\>$, it is used to implement
% $\!\let!|\pcol@cl@|{\cdot}\theta=|\cl@|{\cdot}\theta$,
% 
% \SpecialArrayIndex{\theta}{\pcol@cl@}\SpecialArrayIndex{\theta}{\cl@}
% 
% and then it has $\theta$ for the \CSIndex{ifx}-comparison in
% \!\pcol@iremctrelt!.
% 
% \item
% In $\!\pcol@thectrelt!\<\theta\>$, it is used to implement
% $\!\let!|\pcol@thectr@|{\cdot}\theta=|\the|{\cdot}\theta$,
% 
% \SpecialArrayIndex{\theta}{\pcol@thectr@}\SpecialArrayIndex{\theta}{\the}
% 
% and then is made \!\let!-equal to $|\pcol@thectr@|{\cdot}\theta{\cdot}0$.
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% 
% \item
% In $\!\pcol@synccounter!\arg{lst}$, it has $\arg{lst}$.
% 
% \item
% In $\!\pcol@setctrelt!\<\theta\>\<\val_c(\theta)\>$, it is made
% \!\let!-equal to $|\pcol@thectr@|{\cdot}\theta$
% 
% \SpecialArrayIndex{\theta}{\pcol@thectr@}
% 
% or
% $|\pcol@thectr@|{\cdot}\theta{\cdot}c$.
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% \end{itemize}
% 
% \item[\Uidx{\!\reserved@b!}]
% is an internal macro for temporary use.  It is used in the following
% macros to keep a list shown in paraentheses so that we update the list in
% the scan of list elements. 
% 
% \begin{quote}
% \!\pcol@startpage! (\!\@dbldeferlist!)\\
% \!\pcol@outputpage! ($\PP$)\\
% \!\pcol@trynextcolumn! ($\cc_c(\dl)$)\\
% \!\pcol@makefcolumn! ($\cc_c(\dl)$)\\
% \!\pcol@remctrelt! ($\CC$)
% \end{quote}
% 
% In addition, $\!\pcol@iremctrelt!\<\theta\>$ uses it to have $\theta$ in
% it for \CSIndex{ifx}-comparison.
% 
% \item[\Uidx{\!\@gtempa!}]
% is an internal macro used as a \!\global!ly modifiable scratchpad.  Its
% usages are as follows.
% 
% \begin{itemize}
% \item
% In \!\pcol@measurecolumn!, it has \!\lastpenalty! in a \!\vbox! whose
% value is examined outside the \!\vbox! for the empty check of
% $\cc_c(\vb^b)$.
% 
% \item
% In \!\paracol! and \!\pcol@cmpctrelt!, it has the list of counters to be
% synchronized.
% 
% \item
% \!\pcol@savectrelt! and \!\pcol@sscounters!, it has the new version of
% $\CC_c$.
% \end{itemize}
% \end{description}
% 
% 
% 
%\iffalse
%<*paracol>
%\fi
% 
% \section{Register Declaration}
% \label{sec:imp-decl}
% 
% \subsection{\cs{count} Registers}
% 
% Here we declare registers and switches.  The first group is for \!\count!
% registers.
% 
% \begin{macro}{\pcol@currcol}
% The register \!\pcol@currcol! has the zero-origin ordinal $c$ of the
% column which we were in when \!\output! is invoked.  Therefore, for
% example, in the process of \!\switchcolumn!, the register has $c$ from
% which we are switching to another column.  The register is initialized to
% be 0 by \!\pcol@output@start!, and then set to $\!\pcol@nextcol!=d$ by
% \!\pcol@restartcolumn! to switch to (or stay in) $d$.  Note that these two
% assignments are \!\global! while other macros may {\em locally} use the
% register to, for example, scan all columns $c\In0\C$.  Besides two macros
% above, the following macros refer to the register to know which column we
% are in (or which column is processed by their invokers).
% 
% \begin{quote}\raggedright
% \!\pcol@opcol!,
% \!\pcol@output@switch!,
% \!\pcol@getcurrcol!,
% \!\pcol@setcurrcol!,
% \!\pcol@sscounters!,
% \!\pcol@setctrelt!,
% \!\pcol@com@switchcolumn!,
% \!\pcol@switchcol!,
% \!\pcol@aconlyelt!,
% \!\pcol@com@flushpage!,
% \!\pcol@com@clearpage!.
% \end{quote}
% 
% The following macros use the register for the scan of all $c\In0\C$ by
% themselves or their invokers.
% 
% \begin{quote}\raggedright
% \!\pcol@output@start!,
% \!\pcol@output@switch!,
% \!\pcol@sync!,
% \!\pcol@flushcolumn!,
% \!\pcol@measurecolumn!,
% \!\pcol@synccolumn!,
% \!\pcol@makeflushedpage!,
% \!\pcol@flushfloats!,
% \!\pcol@freshpage!,
% \!\pcol@output@end!,
% \!\pcol@synccounter!,
% \!\pcol@com@syncallcounters!,
% \!\pcol@stepcounter!.
% \end{quote}
% 
% \end{macro}
% 
% \begin{macro}{\pcol@nextcol}
% The register \!\pcol@nextcol! has the zero-origin ordinal $d$ of the
% column to which we are switching, or in which we are staying.  The main
% usage of the register is to set the switching target in
% \!\pcol@switchcolumn!, but other macros use it to specify the (temporary)
% target of \!\pcol@switchcol!; 0 in \!\paracol!, \!\pcol@mctext!,
% \!\endparacol!; and $c=\!\pcol@currcol!$ in \!\pcol@com@flushpage! and
% \!\pcol@com@clearpage! to stay in the current column $c$.
% \end{macro}
% 
% \begin{macro}{\pcol@ncol}
% The register \!\pcol@ncol! has the number of columns $\C$ given as the
% argument of \!\paracol! being the sole modifier of the register.  The
% following macros refer to the register to scan all columns $c\In0C$.
% 
% \begin{quote}\raggedright
% \!\pcol@checkshipped!,
% \!\pcol@outputelt!,
% \!\pcol@output@start!,
% \!\pcol@output@switch!,
% \!\pcol@sync!,
% \!\pcol@makeflushedpage!,
% \!\pcol@flushfloats!,
% \!\pcol@freshpage!,
% \!\pcol@output@end!,
% \!\pcol@setcolumnwidth!,
% \!\pcol@synccounter!,
% \!\pcol@com@syncallcounters!,
% \!\pcol@stepcounter!,
% \end{quote}
% 
% The other references are made by \!\pcol@com@switchcolumn! and
% \!\pcol@switchcolumn! to examine $c<\C$, and by \!\pcol@setcolumnwidth! to
% calculate $\w_c$.
% \end{macro}
% 
% \begin{macro}{\pcol@page}
% The register \!\pcol@page! has the zero-orgin ordinal $p$ of the page
% which we are in.  The register is intialized to be 0 not only by
% \!\pcol@output@start! to give the obvious starting point, but also by
% \!\pcol@freshpage! for page flushing which clears $\PP=\!\pcol@pages!$ to
% give us another type of starting point.  Then the register is incremented
% by \!\pcol@nextpage! to advance one page, by \!\pcol@nextpelt! to skip a
% \fpage, by \!\pcol@startpage! to start a new page, and by
% \!\pcol@output@clear! for pages of \fcolumn{}s and \fpage{}s.  The other
% type of updates of the register is done by \!\pcol@restartcolumn! which
% lets $p$ be $\cc_c(\vb^p)$ when we revisit the column $c$ belonging to the
% page $p$.  Note that, besides these \!\global!  updates,
% \!\pcol@flushcolumn! locally updates the register to scan
% $\PP=\!\pcol@pages!$, and \!\pcol@freshpage! also performs local updates
% but in more weird manner.  Besides the updates discussed above, the
% macros \!\pcol@opcol!, \!\pcol@setpageno!, \!\pcol@getcurrpage! and
% \!\pcol@output@switch! refer to the register to know which page they are
% operating on.
% \end{macro}
% 
% \begin{macro}{\pcol@basepage}
% The register \!\pcol@basepage! has the ordinal $\pbase$ of the \bpage{}
% being the oldest page not shipped out yet.  The register is initialized to
% be 0 by \!\pcol@output@start! and \!\pcol@freshpage! together with
% \!\pcol@page!, and then incremented by \!\pcol@outputelt! when it ships
% the page $\pbase$ out.  The macros \!\pcol@setpageno!, \!\pcol@nextpage!
% and \!\pcol@getcurrpage! refer to the register in their scans of $\PP$ or
% $\PPP$ to know the zero-origin ordinal of the element for the current page
% $p$ is $p-\pbase$.
% \end{macro}
% 
% \begin{macro}{\pcol@toppage}
% \changes{v1.0}{2011/10/10}
%	{Renamed from \cs{pcol@maxpage}.}
% 
% The register \!\pcol@toppage! has the ordinal $\ptop$ of the \tpage{}
% having the most advanced \colpage{}s, or {\em\Uidx\lcolpage{}s} in short.
% The register is initialized to be 0 by \!\pcol@output@start! and
% \!\pcol@freshpage! together with \!\pcol@page!, and then let be
% $p=\!\pcol@page!$ by \!\pcol@startpage! to start a new page $p$.  The
% macro \!\pcol@opcol! refers to the register to examine if the \ccolpage{}
% explores a new page, while \!\pcol@flushcolumn! examines if the
% \ccolpage{} is behind the top page.
% \end{macro}
% 
%    \begin{macrocode}

%% Register Declaration

\newcount\pcol@currcol
\newcount\pcol@nextcol
\newcount\pcol@ncol
\newcount\pcol@page
\newcount\pcol@basepage
\newcount\pcol@toppage
%    \end{macrocode}
% 
% 
% 
% \subsection{Switches}
% 
% The second declaration group is for switches.
% 
% \begin{macro}{\ifpcol@nospan}
% \changes{v1.0}{2011/10/10}
%	{Renamed from \cs{pcol@textonly}.}
% 
% The switch |\ifpcol@nospan| is true iff a page $p$ does not have
% \spanning, i.e., $\pp(p)<0$ or $\pp(p)\geq256$.  It is set by
% \!\pcol@setpnoelt! for its local use, and by \!\pcol@getpinfo! for the
% examination in \!\pcol@outputelt!, \!\pcol@makeflushedpage! and
% \!\pcol@output@end!.
% \end{macro}
% 
% \begin{macro}{\ifpcol@sync}
% \changes{v1.0}{2011/10/10}
%	{Add initialization to be $\mathit{false}$.}
% 
% The switch |\ifpcol@sync| is true iff \!\pcol@output@switch! is invoked
% from \!\pcol@mctext! or \!\pcol@iswitchcolumn! via \!\output! for
% \sync{}ing column switching.  Besides being turned true by these macros,
% the switch is turned false by \!\pcol@sync! after the \sync{}ation to give
% the default state.
% \end{macro}
% 
% \begin{macro}{\ifpcol@mctext}
% \changes{v1.0}{2011/10/10}
%	{Introduced to restrict the broadcast of \cs{if@nobreak} and
%	 \cs{everypar} only when a column-switching is accompanied with
%	 multi-column text.}
% 
% The switch |\ifpcol@mctext| is true iff \!\pcol@output@switch! is invoked
% from \!\pcol@mctext! to put \mctext.  The switch is turned false by
% \!\pcol@output@switch! to give the default state after it examines the
% switch to {\em broadcast} \CSIndex{if@nobreak} and \!\everypar! to all
% columns if true.
% \end{macro}
% 
% \begin{macro}{\ifpcol@clear}
% \changes{v1.0}{2011/10/10}
%	{Add initialization to be $\mathit{false}$.}
% 
% The switch |\ifpcol@clear| is true iff \!\pcol@output@switch! is invoked
% from \!\pcol@make~flushedpage! to flush pages.  The macro
% \!\pcol@makeflushedpage! also turns the switch false after the invocation
% of \!\pcol@output@switch! to give the default state.  The macros
% \!\pcol@sync! and \!\pcol@flushcolumn! being descendants of
% \!\pcol@output@switch! also examine the switch.
% \end{macro}
% 
% \begin{macro}{\ifpcol@outputflt}
% \changes{v1.0}{2011/10/10}
%	{Renamed from \cs{ifpcol@stopoutput} with the reversal.}
% 
% The switch |\ifpcol@outputflt| is used in \!\pcol@outputelt! to know
% whether a \fpage{} is to be shipped out ($\true$) or not.  The switch is
% initialized to be $\true$ by \!\pcol@outputpage! which invokes
% \!\pcol@outputelt! for all $\pp(p)\in\PP$.  Then if \!\pcol@outputpage! is
% invoked from \!\pcol@opcol! to ship the oldest page $\pbase$ out, the
% switch is turned $\false$ when we visit the second non-\fpage.  That is,
% all \fpage{}s following the first (oldest) page are shipped out but others
% are not.  On the other hand, if \!\pcol@outputpage! is invoked from
% \!\pcol@sync! to ship out all pages including \fpage{}s in $\PP$, the
% switch is kept $\true$ throughout all invocations \!\pcol@outputelt!.
% \end{macro}
% 
% \begin{macro}{\ifpcol@lastpage}
% \changes{v1.0}{2011/10/10}
%	{Introduced for special operations in the last page.}
% 
% The switch |\ifpcol@lastpage| is used to know whether they works on the
% {\em\Uidx\lpage} of \env{paracol} environment in the following macros
% to do special operations if so.
% 
% \begin{itemize}
% \item
% \!\pcol@makecol! does not make \!\@textbottom! have inifinite stretch and
% shrink even if the \lpage{} has \sync{}ation point.
% 
% \item
% \!\pcol@combinefloats! adds \!\textfloatsep! below bottom floats of each
% column if any so that the floats are well sepearated from the \postenv.
% 
% \item
% \!\pcol@makefcolumn! trys to make deferred floats as top floats.
% \end{itemize}
% 
% The switch is initialized to be $\false$ by \!\paracol! and then turned
% $\true$ by \!\pcol@output@end! which may also turned it $\false$ again for
% \fpage{}s following the \lpage{} if any.
% \end{macro}
% 
%    \begin{macrocode}
\newif\ifpcol@nospan
\newif\ifpcol@sync \pcol@syncfalse
\newif\ifpcol@mctext \pcol@mctextfalse
\newif\ifpcol@clear \pcol@clearfalse
\newif\ifpcol@outputflt
\newif\ifpcol@lastpage
%    \end{macrocode}
% 
% 
% 
% \subsection{\cs{dimen} and \cs{skip} Registers}
% 
% The last declaration group is for three \!\dimen! and one \!\skip!
% registers.
% 
% \begin{macro}{\pcol@prevdepth}
% The \!\dimen! register \!\pcol@prevdepth! is set to the depth of the last
% item added to the main vertical list of column $c$ from which we switch to
% another column $d$, i.e., \!\prevdepth! seen in \!\pcol@invokeoutput!
% before \!\output! request.  The value of the register is then  set into
% \!\prevdepth! also by \!\pcol@invokeoutput! after \!\output! for the
% column $d$.  The value of the register is stored in $\cc_c(\pd)$ by
% \!\pcol@setcurrcol! and then restored into the register by
% \!\pcol@igetcurrcol! for the use in \!\pcol@measurecolumn!.  The register
% is also updated by \!\pcol@synccolumn! for empty main vertical list case,
% and by \!\pcol@output@end!  to be set into \!\prevdepth! for the first
% vertical item of \postenv.
% \end{macro}
% 
% \begin{macro}{\pcol@colht}
% The \!\dimen! register \!\pcol@colht! has the height of the tallest column
% in the \tpage{} $\ptop$ in which an \exsync{} takes place.  The register
% is initialized to be $-\!\maxdimen!$ by \!\pcol@sync! and then is examined
% and updated in \!\pcol@measurecolumn! to find the tallest column.  Besides
% the internal use of this exploration, its result is referred to by
% \!\pcol@makeflushedpage! when it is invokded from \!\pcol@output@end! to
% know the height of the last multi-column stuff of the \env{paracol}
% environment.  The other usage of this register is in \!\pcol@freshpage! to
% keep the value of \!\@colht! of the page made by \!\flushpage! or
% \!\clearpage! so that it is given to $\!\@colroom!=\cc_c(\vb^r)$ of each
% column $c$ in case a column $c'$ s.t.\ $c'<c$ mades another page for
% \fcolumn{}s updating \!\@colht!.
% \end{macro}
% 
% \begin{macro}{\pcol@textfloatsep}
% \changes{v1.0}{2011/10/10}
%	{Introduced for the bug fix of float space enlargement.}
% 
% The \!\dimen! (not \!\skip!) register \!\pcol@textfloatsep! has
% \!\maxdimen! if a \colpage{} does not have \sync{}ation points, to let top
% floats are inserted in usual way.  If it has, the register may hold the
% vertical space amount inserted after top floats in a \colpage{} instead of
% \!\textfloatsep! so that, if a column only with top floats defined the
% first \sync{}ation point, the space for floats are extended to the
% \sync{}ation point.  In this extension case, the register has the amount
% above biased by 10000\,|pt| to distinguish the case from another case with
% ordinary top floats in which the register has non-biased \!\textfloatsep!.
% In addition, if the register is less than \!\maxdimen! including a value
% equal to \!\textfloatsep!, top floats are packed in a \!\vbox! so that
% stretch\slash shrink factor of \!\floatsep!  cannot move \sync{}ation
% points.  After the default setting to be \!\maxdimen! by \!\paracol! and
% \!\pcol@floatplacement!, the value of the register is stored in
% $\cc_c(\tf)$ by \!\pcol@setcurrcol! and then restored into the register by
% \!\pcol@igetcurrcol! for the use in \!\pcol@makecol!,
% \!\pcol@combinefloats!, \!\pcol@cflt!, \!\pcol@measurecolumn!,
% \!\pcol@addflhd! and \!\pcol@synccolumn!.
% \end{macro}
% 
% \begin{macro}{\pcol@topskip}
% The \!\skip! register \!\pcol@topskip! keeps the value of \!\topskip! at
% \beginparacol{} for the ordinary usage of \!\topskip! which may have 0 in
% the starting and \lpage{} temporarily.  After the initialization by
% \!\paracol!, it is referred to by \!\pcol@getpinfo!, \!\pcol@startpage!,
% \!\pcol@output@start! and \!\endparacol!.
% \end{macro}
% 
%    \begin{macrocode}
\newdimen\pcol@prevdepth
\newdimen\pcol@colht
\newdimen\pcol@textfloatsep
\newskip\pcol@topskip

%    \end{macrocode}
% 
% 
% 
% \section{\cs{output} Routine}
% \label{sec:imp-output}
% 
% \begin{macro}{\pcol@ovf}
% Before giving the definitions of macros in \!\output! rontine, we define
% the macro \!\pcol@ovf! invoked if \!\@freelist! is empty on an acquision
% of an \!\insert! by \!\@next! and thus we have to abort the execution by
% \!\PackageError! with a message notifying the shortage.  The additional
% help message is \!\@ehb! as in \!\@fltovf!.  This macro is used in
% \!\pcol@opcol!, \!\pcol@startpage!, \!\pcol@output@start!,
% \!\pcol@output@switch!, \!\pcol@flushcolumn!, \!\pcol@synccolumn! and
% \!\pcol@output@end!.
% \end{macro}
% 
%    \begin{macrocode}
%% \output Routine

\def\pcol@ovf{%
  \PackageError{paracol}{Too many unprocessed columns/floats}\@ehb}

%    \end{macrocode}
% 
% \begin{macro}{\pcol@output}
% The macro \!\pcol@output! is the \Paracol's version of \!\output! which
% is let have this macro as its sole token by \!\paracol!.  The structure of
% this macro is same as that of \LaTeX's \!\output! but the following
% replacements are made.
% 
% \begin{itemize}
% \item
% $\!\@specialoutput!\to\!\pcol@specialoutput!$ to process \Paracol's own
% special output functions, starting first page, \cswitch, page
% flushing with\slash without float flusing, and building the multi-column
% part of the \lpage.
% 
% \item
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{@makecol} with \cs{pcol@makecol} for a special care for
% 	 column-pages with synchronization points.}
% 
% $\!\@makecol!\to\!\pcol@makecol!$ for a special care for \ccolpage{} having
% \sync{}ation point.
% 
% \item
% $\!\@opcol!\to\!\pcol@opcol!$ to hold the \ccolpage{} which just has
% completed.
% 
% \item
% $\!\@startcolumn!\to\!\pcol@startcolumn!$ to creat a new \colpage{}.
% \end{itemize}
% 
%    \begin{macrocode}
\def\pcol@output{\let\par\@@par
  \ifnum\outputpenalty<-\@M
    \pcol@specialoutput
  \else
    \pcol@makecol
    \pcol@opcol
    \pcol@startcolumn
    \@whilesw\if@fcolmade\fi{\pcol@opcol \pcol@startcolumn}%
  \fi
  \ifnum\outputpenalty>-\@Miv
    \ifdim\@colroom<1.5\baselineskip
      \ifdim\@colroom<\textheight
        \@latex@warning@no@line{Text page \thepage\space
                                contains only floats}%
        \@emptycol
      \else
        \global\vsize\@colroom
      \fi
    \else
      \global\vsize\@colroom
    \fi
  \else
    \global\vsize\maxdimen
  \fi}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \section{Completing Column-Page}
% \label{sec:imp-opcol}
% 
% \begin{macro}{\pcol@makecol}
% \changes{v1.0}{2011/10/10}
%	{Introduced for special float handling in a column-page with
%	 synchronization point.}
% 
% The macro \!\pcol@makecol! is invoked solely from \!\pcol@output! to build
% the shipping image of the \ccolpage{} which just has completed in
% \!\@outputbox!.  This macro just invokes its original version \!\@makecol!
% if $\cc_c(\tf)=\infty$ to mean the \colpage{} does not have \sync{}ation
% points.  Otherwise, \!\@makecol! is invoked too but with a special
% \!\def!inition of \!\@textbottom! to put a vertical skip having
% $1/1000\,|fil|$ as its stretch and shrink.  This modification is to
% nullify not only finite stretches (as \!\raggedbottom! does) but also
% finite shrinks possibly inserted just below the last \sync{}ation point to
% move up the first visible item upward a little bit if active.  Therefore,
% \!\flushbottom!  setting is nullified for \colpage{}s having \sync{}ation
% points and a small exceess from the bottom of a \colpage{} cannot be
% absorbed by shrinks but visible at the bottom\footnote{
% 
% That is, the author gives higher priority to the perfect alignment of the
% items following a \sync{}ation point.}.
% 
% Note that the original definition of \!\@textbottom! is saved in
% \Midx{\!\pcol@textbottom!} before the invocation of \!\@makecol! and is
% restored after that\footnote{
% 
% This save/restore cannot be done by a grouping because \!\@makecol! builds
% \!\@outputbox! by local assignments.}.
% 
%    \begin{macrocode}
%% Completing Column-Page

\def\pcol@makecol{\let\pcol@textbottom\@textbottom
  \ifdim\pcol@textfloatsep=\maxdimen\else \ifpcol@lastpage\else
    \def\@textbottom{\vskip\z@\@plus.0001fil\@minus.0001fil}\fi\fi
  \@makecol \let\@textbottom\pcol@textbottom}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@combinefloats}
% \changes{v1.0}{2011/10/10}
%	{Introduced for special float handling in a column-page with
%	 synchronization point.}
% 
% The macro \!\pcol@combinefloats! is our own version of \!\@combinefloats!
% which is used in \!\@makecol! and \!\pcol@makenormalcol!.  Since the
% original and our own are made \!\let!-equal by \!\paracol!, our own is
% active throughout the environment.  The customization is twofold for both
% of top and bottom floats.
% 
% For the top floats, we invoke the original \!\@cflt! if
% $\cc_c(\tf)=\infty$ to mean the \colpage{} to be shipped out does not have
% \sync{}ation points, or our own \!\pcol@cflt! which we will discuss
% shortly.  For the bottom floats, we invoke the original \!\@cflb! always
% but, if $\CSIndex{ifpcol@lastpage}=\true$ to mean the \colpage{} is in the
% \lpage, we insert \!\textfloatsep! in
% \!\@outputbox! below the bottom floats so that they are well separated
% from \postenv.  We also insert a vertical skip whose natural height is 0
% but shrink is the natural height of \!\textfloatsep! because the
% \colpage{} can be taller than the height specified by \!\@colht! by up to
% this amount.
% 
% Note that the macro acts exactly same as the original when it is invoked
% from \!\pcol@makenormalcol! because \!\pcol@textfloatsep! and
% \CSIndex{ifpcol@lastpage} has their initial values $\infty$ and $\false$
% given by \!\paracol!.
% 
%    \begin{macrocode}
\def\pcol@combinefloats{%
  \ifx\@toplist\@empty\else
    \ifdim\pcol@textfloatsep=\maxdimen \@cflt \else \pcol@cflt \fi
  \fi
  \ifx\@botlist\@empty\else \@cflb
    \ifpcol@lastpage
      \setbox\@outputbox\vbox{\unvbox\@outputbox \vskip\textfloatsep
        \@tempdima\textfloatsep \vskip\z@\@minus\@tempdima}%
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@cflt}
% \changes{v1.0}{2011/10/10}
%	{Introduced for special float handling in a column-page with
%	 synchronization point.}
% 
% The macro \!\pcol@cflt! is invoked solely from \!\pcol@combinefloats! if
% the \colpage{} for which the macro combines the top floats has
% \sync{}ation points.  The macro has the same structure as \LaTeX's version
% \!\@cflt! but has two modification.  The first one is the floats are
% packed in a \!\vbox! rather than listed in \!\@outputbox! to nullify the
% stretch and shrink of \!\floatsep! to keep the \sync{}ation point from
% moving by them\footnote{
% 
% Maybe unnecessary because of \!\@textbottom! inserted by \!\pcol@makecol!
% but \ldots}.
% 
% The second is that the \!\textfloatsep! is replaced with
% $\!\pcol@textfloatsep!=\cc_c(\tf)$ (definitely finite) which can have a
% value different from \!\textfloatsep! when the float space is enlarged for
% \sync{}ation.  If this enlargement is required, $\cc_c(\tf)$ is biased by
% 10000\,|pt| and thus is assuredly\footnote{
% 
% Though not definitely in theoretical sense.}
% 
% larger than 5000\,|pt|.  If so, the insertion of \!\topfigrule! should be
% inhibited because it has already been inserted by \!\pcol@synccolumn! or
% there are no real floats but we only have the float for main vertical list
% prior to the \sync{}ation point, or {\em\Uidx\mvlfloat} in short.
% 
%    \begin{macrocode}
\def\pcol@cflt{%
  \let\@elt\@comflelt
  \setbox\@tempboxa\vbox{}%
  \@toplist
  \setbox\@outputbox\vbox{
    \boxmaxdepth\maxdepth
    \box\@tempboxa
    \vskip-\floatsep
    \ifdim\pcol@textfloatsep>5000\p@
      \advance\pcol@textfloatsep-\@M\p@
    \else
      \topfigrule
    \fi
    \vskip\pcol@textfloatsep
    \unvbox\@outputbox}%
  \let\@elt\relax
  \xdef\@freelist{\@freelist\@toplist}%
  \global\let\@toplist\@empty}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@opcol}
% \changes{v1.0}{2011/10/10}
%	{Remove unnecessary assignment of \cs{@colht}.}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@maxpage} as \cs{pcol@toppage}.}
% 
% The macro \!\pcol@opcol! is invoked from \!\pcol@output! for the ordinary
% completed \colpage{} built by \!\pcol@makecol!, or from the loop creating
% \fcolumn{}s in \!\pcol@output! or \!\pcol@freshpage!.  At first it
% saves the \colpage{} of column $c$ in \!\@outputbox!, which
% \!\pcol@makecol! or \!\@tryfcolumn! just has built for an ordinary or
% \fcolumn{} respectively, in an \!\insert! acquired from \!\@freelist! by
% \!\@next!, and then adds it to the tail of $\S_c=|\pcol@shipped|{\cdot}c$
% 
% \SpecialArrayIndex{c}{\pcol@shipped}
% 
% by \!\@cons!.  Then if $c=0$, we fix the page number of the page $p$
% having the \colpage{} and let $\pp(q)$ represent $\page(p)+(q-p)$ for all
% $q\in[p{+1},\ptop]$ by \!\pcol@setpageno!.  After that, we invoke
% \!\pcol@nextpage! to let $p=p'$ for the next \colpage{} of $c$, where
% $p'=p+1$ usually but can be $p+k+1$ if we have consectutive $k$ \fpage{}s
% from $p+1$.
% 
% Next, we check if the oldest page $\pbase$ is made ready to be shipped out
% by the participation of the completed \colpage{} by \!\pcol@checkshipped!.
% If so, we invoke \!\pcol@outputpage! giving argument 0 to ship out
% $\pbase$ and its successor \fpage{}s.
% 
% Finally we set up the next page $p$ by \!\pcol@startpage! if $p>\ptop$
% meaning it is new one, or by \!\pcol@getcurrpage! otherwise, and
% reinitialize parameters for floats by \!\pcol@floatplacement! before
% returning to the invoker.
% 
%    \begin{macrocode}
\def\pcol@opcol{%
  \@next\@currbox\@freelist{\global\setbox\@currbox\box\@outputbox}\pcol@ovf
  \expandafter\@cons\csname pcol@shipped\number\pcol@currcol\endcsname\@currbox
  \ifnum\pcol@currcol=\z@ \pcol@setpageno \fi
  \pcol@nextpage
  \pcol@checkshipped
  \if@tempswa \pcol@outputpage\z@ \fi
  \ifnum\pcol@page>\pcol@toppage \pcol@startpage
  \else                          \pcol@getcurrpage
  \fi
  \pcol@floatplacement}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@setpageno}
% \begin{macro}{\pcol@setpnoelt}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{ifpcol@textonly} as \cs{ifpcol@nospan}.}
% 
% The macro \!\pcol@setpageno! is invoked from \!\pcol@opcol! when it
% proceeses the \colpage{} of the first column $c=0$ to fix the page number
% $\page(p)\gets\counter{page}=\!\c@page!$ of the page $p=\!\pcol@page!$
% having the \colpage{}.  It is also invoked from \!\pcol@output@switch!
% when it leaves from the first column to reflect a jump of \counter{page}
% made in the column building.  In both cases, the macro lets $\pp(q)$
% represent $\page'(q)=\page(p)+(q-p)$ for all $q\in[p,\ptop]$.
% 
% Since we possibly have to update $\pp(q)$ such that $q\geq p$, at first we
% temporarily let
% $\Uidx\PPP=(\PP,\pp(\ptop))=\!\pcol@pages!\!\pcol@currpage!$ empty
% after copying its original value into $\mathit{\Pi}'=\!\reserved@a!$.
% Then we scan $\pi'(q)\in\mathit{\Pi}'$ for all $q\in[\pbase,\ptop]$ by
% applying \!\pcol@setpnoelt! to each $\pi'(q)$ to update $\pp(q)$ as
% follows.
% 
% $$
% \pp(q)=\cases{
%   \pi'(q)&		$q<p$\cr
%   \page'(q)&
% 	$q\geq p\;\land\;\pi'(q)\notin[0,255]\;\land\page'(q)<0$\cr
%   \pi'(q)&
% 	$q\geq p\;\land\;\pi'(q)\in[0,255]$\quad
%	(also let $\pp^p(q)=\page'(q)$)\cr
%   \page'(q)+256&
% 	$q\geq p\;\land\;\pi'(q)\notin[0,255]\;\land\page'(q)\geq0$}
% $$
% For the update shown above, the macro \!\pcol@setpnoelt! for $\pi'(q)$ at
% first add $\pp(q-1)$ to the tail of $\PPP$ where $\pp(\pbase-1)$
% is defined as empty.  Then for $q$ such that $q\geq p$, it invokes
% $\!\pcol@setordpage!$ to let $\pp(q)=\page'(q)<0$ or
% $\pp(q)=\page'(q)+256\geq256$ if $\pi'(q)\notin[0,256]$ for an orginary
% page without \spanning, or lets $\pp^p(q)=\page'(q)$
% otherwise.  Note that we let \!\c@page!  have $\page'(q)$, but this
% assignment is temporary and \!\c@page! will regain the value $\page(p)$
% after \!\pcol@setpageno!  finishes.
% 
%    \begin{macrocode}
\def\pcol@setpageno{\begingroup
  \@tempcnta\pcol@page \advance\@tempcnta-\pcol@basepage
  \edef\reserved@a{\pcol@pages\pcol@currpage}%
  \global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
  \let\@elt\pcol@setpnoelt \reserved@a
  \endgroup}
\def\pcol@setpnoelt#1{%
  {\let\@elt\relax \xdef\pcol@pages{\pcol@pages\pcol@currpage}}%
  \pcol@nospantrue
  \ifnum#1<\z@         \gdef\pcol@currpage{\@elt{#1}}%
  \else\ifnum#1>\@cclv \gdef\pcol@currpage{\@elt{#1}}%
  \else                \gdef\pcol@currpage{\@elt#1}\pcol@nospanfalse
  \fi\fi
  \ifnum\@tempcnta>\z@\else
    \ifpcol@nospan \pcol@setordpage
    \else          \global\count#1\c@page
    \fi
    \advance\c@page\@ne
  \fi
  \advance\@tempcnta\m@ne}
%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@setordpage}
% \changes{v1.0}{2011/10/10}
%	{Renamed from \cs{pcol@settextpage}.}
% 
% The macro \!\pcol@setordpage! is invoked from \!\pcol@setpnoelt! and
% \!\pcol@startpage! to let $\pp(q)$ for the ordinary page $q$ without
% \spanning{} as follows.
% $$
% \pp(q)=\cases{\!\c@page!&	$\!\c@page!<0$\cr
% 		\!\c@page!+256&	$\!\c@page!\geq0$}
% $$
% In the invocatoin from \!\pcol@setpnoelt!, $q\in[p,\ptop]$ and
% $\!\c@page!=\page(p)+(q-p)$, while $q=p=\ptop$ and $\!\c@page!=\page(p)$
% in the invocation from \!\pcol@startpage!.
% 
%    \begin{macrocode}
\def\pcol@setordpage{\begingroup
  \@tempcnta\c@page
  \ifnum\@tempcnta<\z@\else \advance\@tempcnta\@cclvi \fi
  \let\@elt\relax \xdef\pcol@currpage{\@elt{\number\@tempcnta}}
  \endgroup}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@nextpage}
% \begin{macro}{\pcol@nextpelt}
% The macro \!\pcol@nextpage! is invoked solely in \!\pcol@opcol! to let
% $p$ be $p+k+1$ where $k$ is the number of \fpage{}s directly following
% $p$.  For this update, the macro scans $\pp(q)\in\PP$ for all
% $q\In\pbase\ptop$ applying \!\pcol@nextpelt! to $\pp(q)$, to perform
% the following where $f=\CSIndex{if@tempswa}$ being $\true$ at initial, to
% let $p\gets p+k$, and then increments $p$ to have $p+k+1$.
% $$
% \<p,f\>\gets\cases{
% 	\<p,f\>&	$q\leq p$\cr
% 	\<p{+}1,f\>&	$q>p\;\land\;f\;\land\;\pp(q)\in[0,255]\;\land\;
%			\pp^h(q)<0$\cr
%	\<p,\false\>&	otherwise}
% $$
% 
%    \begin{macrocode}
\def\pcol@nextpage{\begingroup
  \@tempcnta\pcol@page \advance\@tempcnta-\pcol@basepage
  \@tempswatrue
  \let\@elt\pcol@nextpelt \pcol@pages\pcol@currpage
  \global\advance\pcol@page\@ne
  \endgroup}
\def\pcol@nextpelt#1{%
  \ifnum\@tempcnta<\z@
    \ifnum#1<\z@ \@tempswafalse
    \else\ifnum#1>\@cclv \@tempswafalse
    \else\ifdim\dimen#1<\z@
      \if@tempswa \global\advance\pcol@page\@ne \fi
    \else \@tempswafalse
    \fi\fi\fi
  \fi
  \advance\@tempcnta\m@ne}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@checkshipped}
% The macro \!\pcol@checkshipped! is invoked solely in \!\pcol@opcol! to let
% \CSIndex{if@tempswa} be true iff $S_c=|\pcol@shipped|{\cdot}c\neq()$
% 
% \SpecialArrayIndex{c}{\pcol@shipped}
% 
% for all $c\In0\C$ to mean the oldest page $\pbase$ is ready to be shipped
% out.
% 
%    \begin{macrocode}
\def\pcol@checkshipped{\@tempswatrue
  \@tempcnta\z@ \@whilenum\@tempcnta<\pcol@ncol\do{%
    \expandafter\ifx\csname pcol@shipped\number\@tempcnta\endcsname\@empty
      \@tempswafalse \fi
   \advance\@tempcnta\@ne}}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@getcurrpage}
% \begin{macro}{\pcol@getpelt}
% \begin{macro}{\pcol@getpinfo}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{ifpcol@textonly} as \cs{ifpcol@nospan}.}
% 
% \begin{macro}{\pcol@getcurrpinfo}
% The macro \!\pcol@getcurrpage! is ivoked in \!\pcol@opcol!,
% \!\pcol@restartcolumn!, \!\pcol@flushcolumn! and \!\pcol@freshpage! to let
% \!\c@page!, \!\@colht!, \!\topskip! and \CSIndex{ifpcol@nospan} be those
% represented in $\pp(p)\in\PPP=(\PP,\pp(\ptop))$ where
% $\pp(\ptop)=\!\pcol@currpage!$.  To do that, the macro scans all
% $\pp(q)\in\PPP$ applying \!\pcol@getpelt!  to $\pp(q)$ to invoke
% $\!\pcol@getpinfo!\arg{\pi}\arg{pg}\arg{ch}\arg{ts}$ with the following
% arguments for \!\global! assignments, if $q=p$.
% $$
% \arg{\pi}=\pp(q)\quad\arg{pg}=\!\global!\!\c@page!\quad
% \arg{ch}=\!\global!\!\@colht!\quad\arg{ts}=\!\global!\!\topskip!
% $$
% Then the macro \!\pcol@getpinfo! do the following assighments.
% 
% \begin{eqnarray*}
% &&\<\arg{pg},\arg{ch},\arg{ts},\CSIndex{ifpcol@nospan}\>=\\
% &&\qquad\qquad\left\{\begin{array}{lllll}
%	\<\pp(q),&\!\textheight!,&\!\pcol@topskip!,&\true\>&\quad\pp(q)<0\\
%	\<\pp^p(q),&\pp^h(q),&\pp^t(q),&\false\>&\quad0\leq\pp(q)<256\\
%	\<\pp(q){-}256,&\!\textheight!,&\!\pcol@topskip!,&\true\>&
% 		\quad\pp(q)\geq256\end{array}\right.
% \end{eqnarray*}
% 
% The other macro $\!\pcol@getcurrpinfo!\arg{cs}\arg{pg}\arg{ch}\arg{ts}$ is
% invoked in \!\pcol@startpage!, \!\pcol@sync! and \!\pcol@makeflushedpage!
% do the similar assignments using \!\pcol@getpinfo!, but it is not for
% $\pp(p)$ but for $\pp(\ptop)$ which is assigned to $\arg{cs}$.  The macro
% \!\pcol@getpinfo! also has a direct invoker \!\pcol@outputelt!.
% 
%    \begin{macrocode}
\def\pcol@getcurrpage{\begingroup
  \@tempcnta\pcol@page \advance\@tempcnta-\pcol@basepage
  \let\@elt\pcol@getpelt \pcol@pages\pcol@currpage
  \endgroup}
\def\pcol@getpelt#1{%
  \ifnum\@tempcnta=\z@
    \pcol@getpinfo{#1}{\global\c@page}{\global\@colht}{\global\topskip}\fi
  \advance\@tempcnta\m@ne}
\def\pcol@getpinfo#1#2#3#4{\count@#1\relax \pcol@nospantrue
  \ifnum\count@>\@cclv
    \advance\count@-\@cclvi #2\count@ #3\textheight #4\pcol@topskip
  \else\ifnum\count@<\z@
    #2\count@ #3\textheight #4\pcol@topskip
  \else #2\count\count@  #3\dimen\count@ #4\skip\count@ \pcol@nospanfalse
  \fi\fi}
\def\pcol@getcurrpinfo#1{%
  \edef#1{\expandafter\@cdr\pcol@currpage\@nil}%
  \pcol@getpinfo#1}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% 
% 
% 
% \section{Starting New Page}
% \label{sec:imp-startpage}
% 
% \begin{macro}{\pcol@startpage}
% \changes{v1.0}{2011/10/10}
%	{Add assignment of \cs{pcol@firstprevdepth} to be \cs{relax}.}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@maxpage} as \cs{pcol@toppage}.}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@settextpage} as \cs{pcol@setordpage}.}
% 
% The macro \!\pcol@startpage! is invoked from \!\pcol@opcol! with
% $\!\pcol@currpage!=\pp(p{-}1)$ to start a new page $p=\!\pcol@page!$, or
% from \!\pcol@output@start! or \!\pcol@freshpage! with
% $\!\pcol@currpage!=|{}|$ and $\!\c@page!=\page(p)$ to start a new page
% $p=0$.
% 
% First, we let $\!\pcol@firstprevdepth!=\!\relax!$ to mean we have (had)
% left from the first page of \env{paracol} environment so that
% \!\pcol@output@end! will be informed of that.  Next we let $\ptop=p$ and
% then, if invoked from \!\pcol@opcol!, lets $\!\c@page!=\page(p{-}1)+1$
% invoking \!\pcol@getcurrpinfo! to have $\page(p{-}1)$ in \!\c@page! from
% $\pp(p{-}1)$ and \!\stepcounter! to increment it, and
% $\PP\gets\PPP=(\PP,\pp(p{-}1))$.  Then we let $\!\@colht!=\!\textheight!$
% as the base value without \spanning, and $\!\topskip!=\!\pcol@topskip!$
% because the new page is the second or succeeding one built in
% \env{paracol} environment.
% 
%    \begin{macrocode}
%% Starting New Page

\def\pcol@startpage{%
  \global\let\pcol@firstprevdepth\relax
  \global\pcol@toppage\pcol@page
  \ifx\pcol@currpage\@empty\else
    \pcol@getcurrpinfo\@currbox{\global\c@page}\@tempdima\@tempskipa
    \stepcounter{page}%
    \xdef\pcol@pages{\pcol@pages\pcol@currpage}%
  \fi
  \global\@colht\textheight
  \global\topskip\pcol@topskip
%    \end{macrocode}
% 
% Then, we build \fpage{}s if any as follows.  First we invoke
% \!\@dblfloatplacement! to reinitialize the parameters for double-column
% (multiple-column) float placement.  Then we repeat \!\@tryfcolumn! giving
% it \!\@dbldeferlist! having double-column floats not contributed to
% previous pages yet, while $\CSIndex{if@fcolmade}=\true$ meaning it builds
% \fpage{}s in \!\@outputbox!.  For each \fpage{}, we acquire an \!\insert!
% from \!\@freelist! by \!\@next! to let $\pp(p)=\pp(\ptop)$ have the
% followings to represent the \fpage{}.
% $$
% \pp^b(p)=\!\@outputbox!\quad
% \pp^p(p)=\!\c@page!\quad
% \pp^h(p)=-\!\maxdimen!\quad
% \pp^t(p)=\!\pcol@topskip!
% $$
% We also increment $p$ and $\ptop$, and also \!\c@page! by \!\stepcounter!,
% to let them have the values for the page following the \fpage{}s.
% 
%    \begin{macrocode}
  \@dblfloatplacement
  \@tryfcolumn\@dbldeferlist
  \@whilesw\if@fcolmade\fi{%
    \@next\@currbox\@freelist{%
      \global\setbox\@currbox\box\@outputbox}\pcol@ovf
    \global\count\@currbox\c@page
    \global\dimen\@currbox-\maxdimen
    \global\skip\@currbox\pcol@topskip
    \@cons\pcol@pages\@currbox
    \stepcounter{page}%
    \global\advance\pcol@page\@ne \global\pcol@toppage\pcol@page
    \@tryfcolumn\@dbldeferlist}%
%    \end{macrocode}
% 
% Next, we copy \!\@dbldeferlist! containing double-column floats which
% could not be included in \fpage{}s to \!\reserved@b!, clear the list, and
% then scan the copied list by applying \!\@sdblcolelt! to each list
% element to invoke \!\@addtodblcol! for adding the element to \!\@dbltoplist!
% or keeping it in \!\@dbldeferlist!, as \LaTeX's \!\@startdblcolumn!
% does.  If this scan results in empty \!\@dbltoplist! to mean the new page
% does not have any \spanning, we invoke \!\pcol@setordpage! so that
% $\pp(\ptop)$ reprsents a page without \spanning.
% 
%    \begin{macrocode}
  \begingroup
    \let\reserved@b\@dbldeferlist
    \global\let\@dbldeferlist\@empty
    \let\@elt\@sdblcolelt
    \reserved@b
  \endgroup
  \ifx\@dbltoplist\@empty
    \pcol@setordpage
%    \end{macrocode}
% 
% Otherwise, i.e., \!\@dbltoplist! is not empty, we scan all elements in it
% by letting \!\@comdblflelt! to have all double-floats in \!\@tempboxa!.
% Then, after returning all elements to \!\@freelist!, we acquire an
% \!\insert! from \!\@freelist! to be $\pp(\ptop)$ by \!\@next! and store the
% contents of \!\@tempboxa! in $\pp^b(\ptop)$ after removing the
% last vertical skip \!\dblfloatsep! and then adding \!\dblfigrule! and the
% vertical skip \!\dbltextfloatsep!.  The other element of $\pp(\ptop)$ is
% set as follows to represent the page with \spanning{} which makes the height
% of each column \!\@colht! shrunk from its initial value \!\textheight!
% by the series of \!\@addtodblcol!.
% $$
% \pp^p(\ptop)=\!\c@page!=\page(\ptop)\quad
% \pp^h(\ptop)=\!\@colht!\quad
% \pp^t(\ptop)=\!\pcol@topskip!
% $$
% 
%    \begin{macrocode}
  \else
    \setbox\@tempboxa\vbox{}%
    \begingroup
      \let\@elt\@comdblflelt
      \@dbltoplist
      \let\@elt\relax
      \xdef\@freelist{\@freelist\@dbltoplist}%
      \global\let\@dbltoplist\@empty
      \@next\@currbox\@freelist{%
        \global\setbox\@currbox\vbox{%
          \unvbox\@tempboxa \vskip-\dblfloatsep \dblfigrule
          \vskip\dbltextfloatsep}}%
        \pcol@ovf
      \global\count\@currbox\c@page
      \global\dimen\@currbox\@colht
      \global\skip\@currbox\pcol@topskip
      \xdef\pcol@currpage{\@elt\@currbox}%
    \endgroup
  \fi
}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \section{Shipping Page Out}
% \label{sec:imp-outputpage}
% 
% \begin{macro}{\pcol@outputpage}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{ifpcol@stopoutput} as \cs{ifpcol@outputflt}.}
% 
% The macro \!\pcol@outputpage! is invoked from \!\pcol@opcol! with argument
% $\arg{all}=0$ to ship out the page $\pbase$ and \fpage{}s following it if
% any, or \!\pcol@sync! with $\arg{all}=1$ to ship out all pages in $\PP$.
% It copies $\PP=\!\pcol@pages!$ into $\mathit{\Pi}'=\!\reserved@b!$ and
% clear $\PP$ once to remove pages shipped out from it.  Then, after
% initializing $f_o=\CSIndex{if@tempswa}=\true$ to ship out (the first)
% ordinary page and $f_f=\CSIndex{ifpcol@outputflt}=\true$ to ship out
% \fpage{} (following the first page), scan all $\pp(q)\in\mathit{\Pi}'$
% applying $\!\pcol@outputelt!\arg{all}$ to $\pp(q)$ to ship it out or keep
% it in $\PP$.
% 
%    \begin{macrocode}
%% Shipping Page Out

\def\pcol@outputpage#1{\begingroup
  \def\@elt{\pcol@outputelt#1}\@tempswatrue \pcol@outputflttrue
  \let\reserved@b\pcol@pages \gdef\pcol@pages{}%
  \reserved@b
  \endgroup}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@outputelt}
% The macro $\!\pcol@outputelt!\arg{all}\<\pp(q)\>$ ships out the ordinary
% or \fpage{} $q$ if $f_o=\true$ or $f_f=\true$ respectively.  After
% initializing \!\@outputbox! to be \!\voidb@x!, we retrive the page $q$'s
% information by \!\pcol@getpinfo! to have $\page(q)$ in \!\c@page! locally,
% \!\textheight! or $\pp^h(q)$ in $h=\!\@tempdima!$, and
% $f_{\it ns}=\CSIndex{ifpcol@nospan}=(\pp(q)\notin[0,255])$.
% 
%    \begin{macrocode}
\def\pcol@outputelt#1#2{%
  \setbox\@outputbox\box\voidb@x
  \def\@currbox{#2}%
  \pcol@getpinfo\@currbox\c@page\@tempdima\@tempskipa
%    \end{macrocode}
% 
% Then, we do one of the follolwings according to $h$ and $f_o$.
% 
% \begin{itemize}
% \item $h<0$\\
% It means $q$ is a \fpage{}.  If $f_f=\true$, we let \!\@outputbox! have
% $\pp^b(q)$ to ship it out and return $\!\insert!{\cdot}\pp(q)$ to
% \!\@freelist! by \!\@cons! because it is no longer necessary.  Otherwise,
% we return $\pp(q)$ back to $\PP$.
% \end{itemize}
% 
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{ifpcol@stopoutput} as \cs{ifpcol@outputflt}.}
% 
%    \begin{macrocode}
  \ifdim\@tempdima<\z@
    \ifpcol@outputflt
      \setbox\@outputbox\box\@currbox
      \@cons\@freelist\@currbox
    \else
      \@cons\pcol@pages\@currbox
    \fi
%    \end{macrocode}
% 
% \begin{itemize}
% \item $h\geq0\;\land\;f_o=\true$\\
% It means $q$ is a non-\fpage{} to be shipped out.  If $\arg{all}=0$, we
% let $f_o=\false$ to keep succeeding non-\fpage{}s from being shipped out.
% Then we put materials to be shipped out in \!\@outputbox! whose height is
% \!\textheight! as follows.  First, if $f_{\it ns}=\false$ to mean
% $\pp(q)$ has \spanning{} in $\pp^b(q)$, they are put in the box by
% \!\unvbox! and $\!\insert!{\cdot}\pp(q)$ is returned to \!\@freelist! by
% \!\@cons!.  Then we put a \!\hbox! of \!\textwidth! wide having \!\hbox!es
% of $\w_c=|\pcol@columnwidth|{\cdot}c$
% 
% \SpecialArrayIndex{c}{\pcol@columnwidth}
% 
% wide containing $\sigma_c$ followed by \!\hss! for all $c\In0\C$, where
% $\sigma_c=\!\box!{\cdot}s_c(q)$ being the first element removed from
% $\S_c$ by \!\@next! and then returned to \!\@freelist! by \!\@cons! if it
% is not empty, or \!\voidb@x!  otherwise.  We sepearate \!\hbox!es of
% $\sigma_c$ by \!\hfil!  by making each \!\hbox!  preceded by
% \!\pcol@hfil!
% 
% \SpecialMainIndex{\pcol@hfil}
% 
% being \!\relax! for the first one and \!\hfil! for others.
% \end{itemize}
% 
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{ifpcol@textonly} as \cs{ifpcol@nospan}.}
% \changes{v1.1}{2012/05/11}
% 	{Use $\cs{pcol@columnwidth}{\cdot}c$ instead of \cs{columnwidth} as
%	 the width of $c$'s \cs{hbox}.}
% 
%    \begin{macrocode}
  \else\if@tempswa
    \ifnum#1=\z@ \@tempswafalse \fi
    \setbox\@outputbox\vbox to\textheight{%
      \ifpcol@nospan\else
        \@cons\@freelist\@currbox
        \unvbox\@currbox
      \fi
      \hb@xt@\textwidth{%
        \let\pcol@hfil\relax
        \@tempcnta\z@ \@whilenum\@tempcnta<\pcol@ncol\do{%
          \expandafter\@next\expandafter\@currbox
            \csname pcol@shipped\number\@tempcnta\endcsname
            \relax{\let\@currbox\voidb@x}%
          \ifvoid\@currbox\else \@cons\@freelist\@currbox \fi
          \expandafter\@tempdima
            \csname pcol@columnwidth\number\@tempcnta \endcsname
          \pcol@hfil \hb@xt@\@tempdima{\box\@currbox\hss}%
          \let\pcol@hfil\hfil
         \advance\@tempcnta\@ne}}}%
%    \end{macrocode}
% 
% \begin{itemize}
% \item $h\geq0\;\land\;f_o=\false$\\
% It means $q$ is a non-\fpage{} to be kept.  Therefore, we let
% $f_f=\false$ to keep \fpage{}s following it from being shipped out.  Then
% we return $\pp(q)$ to $\PP$ by \!\@cons!.  Note that if $f_{\it ns}=\true$
% to mean $\pp(q)\notin[0,255]$ for a page without \spanning, we have to
% surround $\pp(q)$ giving to \!\@cons! by |{| and |}| because it is a
% decimal number rather than a \!\chardef! token for an \!\insert! with
% \spanning.
% \end{itemize}
% 
%    \begin{macrocode}
  \else
    \pcol@outputfltfalse
    \ifpcol@nospan
      \@cons\pcol@pages{{\@currbox}}
    \else
      \@cons\pcol@pages\@currbox
    \fi
  \fi\fi
%    \end{macrocode}
% 
% Finally, if $\!\@outputbox!\neq\!\voidb@x!$ to mean $\pp(q)$ is to be
% shipped out, we invoke \!\@outputpage! to do it and increment $\pbase$ to
% let it has $q+1$.  Note that since we have let $\!\c@page!=\page(q)$, the
% direct and indirect references to it in \!\@outputpage! are correctly done.
% Also note that the \!\global! increment of it by \!\stepcounter! in
% \!\@outputpage! will be overriden by the \!\global! assignment to it done
% by \!\pcol@startpage! or \!\pcol@getcurrpage! invoked from \!\pcol@opcol!
% if $\arg{all}=0$, or by \!\pcol@getcurrpinfo! invoked from \!\pcol@sync!
% otherwise.
% 
%    \begin{macrocode}
  \ifvoid\@outputbox\else
    \@outputpage \global\advance\pcol@basepage\@ne
  \fi}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \section{Starting New Column-Page}
% \label{sec:imp-startcolumn}
% 
% \begin{macro}{\pcol@startcolumn}
% \begin{macro}{\pcol@trynextcolumn}
% The macro \!\pcol@startcolumn! is invoked from \!\pcol@output! and
% \!\pcol@freshpage! to start a new \colpage.  This macro has the exactly
% same functionality as \LaTeX's \!\@startcolumn!, but \CSIndex{else} part of
% \CSIndex{if@fcolmade} construct is enclosed in the macro
% \!\pcol@trynextcolumn!  which is also invoked in \!\pcol@flushcolumn!.
% That is, the only reason why we have our own version of \!\@startcolumn!
% is this additional use of the \CSIndex{else} part.
% 
%    \begin{macrocode}
%% Starting New Column Page

\def\pcol@startcolumn{%
  \global\@colroom\@colht
  \@tryfcolumn\@deferlist
  \if@fcolmade\else \pcol@trynextcolumn \fi}
\def\pcol@trynextcolumn{\begingroup
  \let\reserved@b\@deferlist
  \global\let\@deferlist\@empty
  \let\@elt\@scolelt
  \reserved@b
  \endgroup}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% 
% 
% \section{Special Output Routines}
% \label{sec:imp-sout}
% 
% \subsection{Dispatcher}
% \label{sec:imp-sout-disp}
% 
% \begin{macro}{\pcol@op@start}
% \begin{macro}{\pcol@op@switch}
% \begin{macro}{\pcol@op@flush}
% \begin{macro}{\pcol@op@clear}
% \begin{macro}{\pcol@op@end}
% The macro $|\pcol@op@|{\cdot}f$ where $f\in
% F=\{|start|,|switch|,|flush|,|clear|,|end|\}$ has our own
% \!\outputpenalty! code less than $-10000$ to invoke the corresponding
% macro $|\pcol@output@|{\cdot}f$.  The code macros are given to
% \!\pcol@invokeoutput! as its argument by \!\paracol! ($f=|start|$),
% \!\pcol@switchcol! ($f=|switch|$), \!\pcol@com@flushpage! ($f=|flush|$),
% \!\pcol@com@clearpage! ($f=|clear|$) and \!\endparacol! ($f=|end|$) to set
% one of them into \!\outputpenalty!, so that the other user
% \!\pcol@specialoutput! examines which special function is invoked.
% 
% \SpecialIndex{\pcol@output@start}
% \SpecialIndex{\pcol@output@switch}
% \SpecialIndex{\pcol@output@flush}
% \SpecialIndex{\pcol@output@clear}
% \SpecialIndex{\pcol@output@end}
% 
%    \begin{macrocode}
%% Special Output Routines: Dispatcher

\def\pcol@op@start{-10010}
\def\pcol@op@switch{-10011}
\def\pcol@op@flush{-10012}
\def\pcol@op@clear{-10013}
\def\pcol@op@end{-10014}
%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@specialoutput}
% \changes{v1.0}{2011/10/10}
%	{Remove unnecessary \cs{pcol@latex@specialoutput}.}
% 
% The macro \!\pcol@specialoutput! is invoked solely in \!\pcol@output! to
% invoke our own or \LaTeX's special output routine.  It examines if
% $\!\outputpenalty!\in\{|pcol@op@|{\cdot}f\vert f\in F\}$.  If so, before
% invoking $|\pcol@output@|{\cdot}f$, we rebuild \!\@holdpg! removing
% \!\lastbox! and the last vertical skip as done in \LaTeX's
% \!\@specialoutput!.  We also let $\!\outputpenalty!=-10000$\footnote{
% 
% It can be any value larger than -10004.}
% 
% so that \!\vsize! is correctly set to \!\@colroom! in the second half of
% \!\pcol@output! after this macro finishes.
% 
% Otherwise, i.e., if $\!\outputpenalty!\notin\{|pcol@op@|{\cdot}f\vert f\in
% F\}$, we simply invokes \LaTeX's \!\@specialoutput!.
% 
%    \begin{macrocode}
\def\pcol@specialoutput{%
  \ifnum\outputpenalty=\pcol@op@start\relax
    \let\reserved@a\pcol@output@start
  \else\ifnum\outputpenalty=\pcol@op@switch\relax
    \let\reserved@a\pcol@output@switch
  \else\ifnum\outputpenalty=\pcol@op@flush\relax
    \let\reserved@a\pcol@output@flush
  \else\ifnum\outputpenalty=\pcol@op@clear\relax
    \let\reserved@a\pcol@output@clear
  \else\ifnum\outputpenalty=\pcol@op@end\relax
    \let\reserved@a\pcol@output@end
  \else \let\reserved@a\@specialoutput
  \fi\fi\fi\fi\fi
  \ifx\reserved@a\@specialoutput\else
    \global\setbox\@holdpg\vbox{\unvbox\@holdpg \unvbox\@cclv
      \setbox\@tempboxa\lastbox \unskip}%
    \outputpenalty-\@M
  \fi
  \reserved@a}

%    \end{macrocode} \end{macro}
% 
% 
% 
% \subsection{Building Starting Page} \label{sec:imp-sout-start}
% 
% \begin{macro}{\pcol@output@start}
% \changes{v1.0}{2011/10/10}
% 	{Change the order of operations.}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@maxpage} as \cs{pcol@toppage}.}
% \changes{v1.0}{2011/10/10}
%	{Add special operation in case of too small room for column-pages.}
% 
% The macro \!\pcol@output@start! is invoked solely from
% \!\pcol@specialoutput! to process the special \!\output! request made in
% \!\paracol! and to build the {\em\Uidx\spage} from which parallel columns
% start.  First we invoke \!\pcol@makenormalcol! to let \!\@outputbox! have
% the stuff preceding \beginparacol{}, or {\em\Uidx\preenv} in short, in the
% \spage{} as its \spanning.  Then we shrink \!\@colht! by the sum of the
% height $h$ and depth $d$ of the \spanning.  Next we let $p=\pbase=\ptop=0$
% and $\PP=()$ because we have nothing for $q<\ptop=0$.  We also move
% \!\@deferlist! to \!\@dbldeferlist! and then let \!\@deferlist! be empty
% because all single-column dererred floats become multi-column.
% 
% Then we examine if $\!\@colht!<1.5\times\!\baselineskip!$ to mean
% \!\pcol@output! would force a page break with warning.  If so, we ship out
% the \preenv{} by \!\@outputpage! to avoid the break and warning, and
% invoke \!\pcol@startpage! for the \spage{} $\ptop=0$ letting $\pp(0)$ be
% empty so that the macro will not refer to it.  We also let \!\topskip! be
% the value at \beginparacol, i.e., \!\pcol@topskip! because the first item
% of each column will start from the top of the \spage.
% 
% Otherwise, the \spanning{} are moved in $\pp^b(0)$ which is acquired from
% \!\@freelist! by \!\@next!, and $\pp^p(0)$ and $\pp^h(0)$ are let be
% \!\c@page! and \!\@colht! respectively for \spage.  As for $\pp^t(0)$, we
% let it be \!\topskip! if both the height and depth of $\pp^b(0)$ are 0
% assuming that the page does not have any \spanning{} to typeset
% \colpage{}s from the top of the page.  Otherwise, i.e., either the height or
% depth is non-zero, $\pp^t(0)$ and \!\topskip! are let be 0 to inhibit the
% ordinary \!\topskip! insertion.
% 
% Then for the both cases, we initialize \!\@colroom! to be \!\@colht!, and
% invoke \!\pcol@floatplacement! to reinitialize the parameters of
% single-column float placement.
% 
%    \begin{macrocode}
%% Special Output Routines: Building First Page

\def\pcol@output@start{%
  \pcol@makenormalcol
  \global\advance\@colht-\ht\@outputbox
  \global\advance\@colht-\dp\@outputbox
  \global\pcol@page\z@ \global\pcol@toppage\z@ \global\pcol@basepage\z@
  \global\let\pcol@pages\@empty
  \global\let\@dbldeferlist\@deferlist \global\let\@deferlist\@empty
  \ifdim\@colht<1.5\baselineskip
    \@outputpage
    \global\let\pcol@currpage\@empty \pcol@startpage
    \global\topskip\pcol@topskip 
  \else
    \@next\@currbox\@freelist{\global\setbox\@currbox\box\@outputbox}\pcol@ovf
    \global\count\@currbox\c@page \global\dimen\@currbox\@colht
    \@tempskipa\z@
    \ifdim\ht\@currbox=\z@ \ifdim\dp\@currbox=\z@
      \@tempskipa\topskip
    \fi\fi
    \global\skip\@currbox\@tempskipa \global\topskip\@tempskipa
    \xdef\pcol@currpage{\@elt\@currbox}%
  \fi
  \global\@colroom\@colht
  \pcol@floatplacement
%    \end{macrocode}
% 
% Then for all columns $c\In0\C$ we do the followings to build $\cc_c$.
% First, if we have let $\!\topskip!=0$ with the \preenv,
% we let $\cc_c(\vb^b)$ have an invisible \!\hrule! whose
% height and depth are 0 as the very first vertical item of the \colpage.
% When we visit the column $c$ for the first time afterward, we will
% \!\unvbox! the box to let \TeX's page builder have $\!\topskip!=0$ and the
% invisible rule.  Then the first vertical item of the \colpage{} is added
% but it is recognized as non-first by \TeX's page builder and thus it
% inserts \!\baselineskip! referring to \!\prevdepth! as the depth of the
% last item.  The important issue is that the \!\prevdepth! to be referred
% is assured having its value at \beginparacol, which is usually the depth
% of the last item of \spanning, by the following mechanism: (1)
% \!\pcol@invokeoutput!  invoked in \!\paracol! saves \!\prevdepth! in
% \!\pcol@prevdepth! before the \!\output! request for
% \!\pcol@output@start!; (2) \!\pcol@prevdepth! is saved in $\cc_c(\pd)$ by
% \!\pcol@setcurrcolnf!  invoked from \!\pcol@output@start! as discussed
% afterward; (3) when the column $c$ is visited for the first time, the
% special output routine \!\pcol@output@start! itself ($c=0$) or
% \!\pcol@output@switch! ($c>0$) restores \!\pcol@prevdepth! from
% $\cc_c(\pd)$ by \!\pcol@getcurrcol!; (4) \!\pcol@invokeoutput!  which made
% the \!\output! request for (3) lets \!\prevdepth! have the value of
% \!\pcol@prevdepth! after the request.  Therefore, the baseline progress
% from the last line of the \spanning{} to the first line of each
% \colpage{} should be very natural as we see in the third and fourth lines
% of \secref{sec:man-close}.
% 
% Then we invoke \!\pcol@setcurrcolnf! to save the following values for
% $\cc_c(e)$ ($e\neq\vb$); $\cc_c(\ft)=\!\voidb@x!$ because $c$ does not
% have footnotes;  $\cc_c(\pd)=\!\prevdepth!$ as discussed above;
% $\cc_c(\tl)=\cc_c(\ml)=\cc_c(\bl)=()$ because \!\pcol@makenormalcol! and
% \!\@combinefloats! invoked from it emptied them;  $\cc_c(\dl)=()$ as
% discussed above;  $\cc_c(\fh)=\cc_c(\mb)=0$ as initialized by
% \!\pcol@floatplacement!;  $\cc_c(\tn)=\!\c@topnumber!$,
% $\cc_c(\bn)=\!\c@botnumber!$ and $\cc_c(\tn)=\!\c@totalnumber!$ as
% initialized by \!\@floatplacement! invoked from \!\pcol@floatplacement!;
% $\cc_c(\tr)=\!\topfraction!\times\!\@colht!$ and
% $\cc_c(\br)=\!\bottomfraction!\times\!\@colht!$ as initialized by
% \!\@floatplacement!; $\cc_c(\sw)$ is defined by \CSIndex{if@nobreak} and
% \CSIndex{if@afterindent} at the time of \beginparacol; and
% $\cc_c(\ep)=\!\everypar!$ at the time of \beginparacol.  We also let
% $\cc_c(\vb^p)=0$ because $p=0$ and $\cc_c(\vb^r)=\!\@colroom!$ defined
% above.  In addition, we let $\S_c=\phi$ because we don't have any
% \colpage{} having been completed.
% 
% \changes{v1.0}{2011/10/10}
%	{Add clearing of $S_c$.}
% 
%    \begin{macrocode}
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
    \@next\@currbox\@freelist{\global\setbox\@currbox\vbox{%
      \ifdim\topskip=\z@ \hrule\@height\z@\@width\z@
      \fi}}
      \pcol@ovf
    \pcol@setcurrcolnf
    \global\count\@currbox\z@
    \global\dimen\@currbox\@colroom
    \expandafter\gdef\csname pcol@shipped\number\pcol@currcol\endcsname{}%
   \advance\pcol@currcol\@ne}%
%    \end{macrocode}
%
% Finally, we let $c=\!\pcol@currcol!=0$ for the first column, regain the
% parameters in $\cc_0$, and put $\cc_0(\vb^b)$ to the main
% vertical list by \!\unvbox! returning $\cc_0(\vb)$ to \!\@freelist! by
% \!\@cons! because it has become useless so far.
% 
%    \begin{macrocode}
  \global\pcol@currcol\z@
  \pcol@getcurrcol
  \@cons\@freelist\@currbox
  \unvbox\@currbox}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@makenormalcol}
% The macro \!\pcol@makenormalcol! is invoked solely from
% \!\pcol@output@start! to let \!\@output~box! have the \preenv{} as the
% \spanning{} of the \spage.  The macro is very similar to the first half of
% \!\@makecol! but \!\@cclv! in it is replaced with \!\@holdpg! because the
% stuff have been stored in \!\@holdpg! by \!\pcol@specialoutput!.  Note
% that bottom floats and footnotes are put in \!\@outputbox! and thus they
% will not appear at the bottom of the page but above the \colpage{}s in the
% page\footnote{
% 
% We could put them at the bottom by keeping them somewhere and insert them
% in \!\pcol@outputpage!, but it will cause another problem that the numbers
% of the figures and footnotes are smaller than those in \colpage{}s which
% are above them.}.
% 
%    \begin{macrocode}
\def\pcol@makenormalcol{%
  \ifvoid\footins \setbox\@outputbox\box\@holdpg
  \else
    \setbox\@outputbox\vbox{
      \boxmaxdepth\@maxdepth
      \unvbox\@holdpg
      \vskip\skip\footins
      \color@begingroup
        \normalcolor
        \footnoterule
        \unvbox\footins
      \color@endgroup}%
   \fi
  \let\@elt\relax
  \xdef\@freelist{\@freelist\@midlist}%
  \global\let\@midlist\@empty
  \@combinefloats}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@floatplacement}
% \changes{v1.0}{2011/10/10}
%	{Add initialization of \cs{pcol@textfloatsep}.}
% 
% The macro \!\pcol@floatplacement! is invoked from \!\pcol@opcol!,
% \!\pcol@output@start!, \!\pcol@flushcolumn!, \!\pcol@freshpage! and
% \!\pcol@output@end! to reinitialize the parameters of single-column float
% placement at the beginning of a \colpage{} or that of \postenv.  The macro
% lets \!\@mparbottom! and \!\@textfloatsheight! be 0 and then invokes
% \!\@floatplacement!, as \!\@opcol! does its tail.  In addition, the macro
% lets \!\pcol@textfloatsep! be \!\maxdimen! to mean the new \colpage{} does
% not have \sync{}ation point at initial.
% 
%    \begin{macrocode}
\def\pcol@floatplacement{%
  \global\@mparbottom\z@ \global\@textfloatsheight\z@
  \global\pcol@textfloatsep\maxdimen
  \@floatplacement}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \subsection{Column-Switching}
% \label{sec:imp-sout-switch}
% 
% \begin{macro}{\pcol@output@switch}
% The macro \!\pcol@output@switch! is invoked from
% \!\pcol@specialoutput! to process the special \!\output! request made in
% \!\pcol@switchcol! and to switch from a column $c=\!\pcol@currcol!$ to
% $d=\!\pcol@nextcol!$ which can be $c$.  The macro is also invoked from
% \!\pcol@makeflushedpage! to \sync{}e and to flush all \ccolpage{}s
% but staying in $c$.
% 
% First, we acquire an \!\insert! to be $\cc_c(\vb)$ and to store the
% \ccolpage{} built in \!\@holdpg!, from \!\@freelist! by
% \!\@next!.  Then, if the \colpage{} has footnotes, we acquire another
% \!\insert! to be $\cc_c(\ft)$ to which all items \!\box!,
% \!\count!, \!\dimen! and \!\skip! of \!\footins! are moved.  Otherwise,
% i.e., no footnotes in the \colpage{}, $\cc_c(\ft)$ is let be \!\voidb@x!.
% 
% Then if $c=0$, we invoke \!\pcol@setpageno! to reflect the jump of
% \!\c@page! made in the building process of the \colpage{} to $\pp(q)$ for
% all $q\in[p,\ptop]$.  After that, we save $c$'s \cctext{} into $\cc_c$ by
% \!\pcol@setcurrcol! and let $\cc_c(\vb^p)=p$ and
% $\cc_c(\vb^r)=\!\@colroom!$.
% 
%    \begin{macrocode}
%% Special Output Routines: Column-Switching

\def\pcol@output@switch{%
  \@next\@currbox\@freelist{\global\setbox\@currbox\box\@holdpg}\pcol@ovf
  \ifvoid\footins
    \def\pcol@currfoot{\voidb@x}%
  \else
    \@next\pcol@currfoot\@freelist{%
      \global\setbox\pcol@currfoot\box\footins
      \global\count\pcol@currfoot\count\footins
      \global\dimen\pcol@currfoot\dimen\footins
      \global\skip\pcol@currfoot\skip\footins}\pcol@ovf
  \fi
  \ifnum\pcol@currcol=\z@ \pcol@setpageno \fi
  \pcol@setcurrcol
  \global\count\@currbox\pcol@page
  \global\dimen\@currbox\@colroom
%    \end{macrocode}
% 
% Next, $\CSIndex{ifpcol@sync}=\true$ for \sync{}ation and
% $\CSIndex{ifpcol@mctext}=\true$ to mean the \colpage{} suspends after a
% \mctext, we {\em broadcast} the \CSIndex{if@nobreak} if true and tokens in
% $\!\everypar!=\cc_c(\ep)$ for the page break inhibition to all columns
% $e\In0\C$ so as to inhibit page break at the \sync{}ation point and after
% the first line following it in any columns.  That is, for each column $e$,
% we restore its \cctext{} from $\cc_e$ by \!\pcol@getcurrcol!, let
% $\CSIndex{if@nobreak}=\true$ if it is true in $c$ ($=0$) and
% $\!\everypar!=\cc_c(\ep)$, and then save the context to $\cc_e$ by
% \!\pcol@setcurrcol! so that $\cc_e(\sw)=1$ or 2 according to the saved
% state of \CSIndex{if@afterindent} and $\cc_e(\ep)=\cc_c(\ep)$.  Note
% that this broadcast is essential when the \mctext{} has sectioning
% commands, and broadcasting of \!\everypar! is natural even when it does
% not have sectioning because all columns may be considered following the
% \mctext.
% 
% \changes{v1.0}{2011/10/10}
%	{Restrict the broadcast of \cs{if@nobreak} and \cs{everypar} only
%	 when a column-switching is accompanied with multi-column text.}
% 
%    \begin{macrocode}
  \@tempswafalse
  \ifpcol@sync
    \ifpcol@mctext
      \if@nobreak \@tempswatrue \fi
      \@temptokena\everypar
      \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
        \pcol@getcurrcol \if@tempswa \@nobreaktrue \fi
        \everypar\@temptokena
        \pcol@setcurrcol
       \advance\pcol@currcol\@ne}%
    \fi
    \@tempswatrue
    \global\pcol@mctextfalse
  \fi
%    \end{macrocode}
% 
% Finally we invoke \!\pcol@sync! for the \sync{}ation if
% \CSIndex{ifpcol@sync} or \CSIndex{ifpcol@clear} is $\true$, and then
% \!\pcol@restartcolumn! to restart the \ccolpage{} $d$ if
% $\CSIndex{ifpcol@clear}={}\false$.
% 
%    \begin{macrocode}
  \ifpcol@clear \@tempswatrue \fi
  \if@tempswa \pcol@sync \fi
  \ifpcol@clear\else \pcol@restartcolumn \fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@restartcolumn}
% \changes{v1.0}{2011/10/10}
%	{Add \cs{pcol@getcurrfoot} to restore parameters of $\kappa_c(\tau)$
%	 into \cs{footins}.}
% 
% The macro \!\pcol@restartcolumn! is invoked from \!\pcol@output@switch! or
% \!\pcol@freshpage! to restart the \ccolpage{} $d=\!\pcol@nextcol!$ which
% becomes $c=\!\pcol@currcol!$ by the very first assignment in this macro.
% Then we restore the \cctext{} in $\cc_c$ by \!\pcol@getcurrcol! and let
% $p=\cc_c(\vb^p)$ and $\!\@colroom!=\cc_c(\vb^r)$ before returning
% $\cc_c(\vb)$ to \!\@freelist! by \!\@cons! because it has become useless
% so far.  We also restore the \pctext{} of $p$ by \!\pcol@getcurrpage!.
% 
% Then we move everything in $\cc_c(\ft)$ into \!\footins! by
% \!\pcol@getcurrfoot!, and, if $\cc_c(\ft^b)$ was not void,
% \!\insert! its contents into \!\footins! itself by \!\unvbox!, returning
% $\cc_c(\ft)$ to \!\@freelist!.  Note that for the safe garbage collection
% of $\cc_c(\ft)$ we return it to \!\@freelist! if not void and then 
% invoke \!\pcol@getcurrfoot! because the latter makes $\cc_c(\ft^b)$
% void.  After that, we put the contents of $\cc_c(\vb^b)$ being the
% \ccolpage{} to the main vertical list by \!\unvbox!.  We also put
% $\!\penalty!=10000$ by \!\nobreak! if $\CSIndex{if@nobreak}=\true$ or
% \!\interlinepenalty! by \!\addpenalty!\footnote{
% 
% As done in \!\@specialoutput! but \!\penalty!\!\interlinepenalty! should
% be sufficient.}
% 
% otherwise to the list as the page break penalty at the returning point.
% 
%    \begin{macrocode}
\def\pcol@restartcolumn{%
  \global\pcol@currcol\pcol@nextcol
  \pcol@getcurrcol
  \global\pcol@page\count\@currbox
  \global\@colroom\dimen\@currbox
  \@cons\@freelist\@currbox
  \pcol@getcurrpage
  \ifvoid\pcol@currfoot\else \@cons\@freelist\pcol@currfoot \fi
  \pcol@getcurrfoot
  \ifvoid\footins\else \insert\footins{\unvbox\footins}\fi
  \unvbox\@currbox
  \if@nobreak \nobreak \else \addpenalty\interlinepenalty \fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@getcurrcol}
% \begin{macro}{\pcol@igetcurrcol}
% \begin{macro}{\pcol@iigetcurrcol}
% \changes{v1.0}{2011/10/10}
%	{Add restoration of \cs{pcol@textfloatsep}.}
% 
% The macro \!\pcol@getcurrcol! is invoked from the following macros to
% restore the typesetting parameters of the column $c=\!\pcol@currcol!$ from
% $\cc_c$, and to let \!\columnwidth!, \!\hsize! and \!\linewidth! commonly
% have $\w_c=|\pcol@columnwidth|{\cdot}c$.
% 
% \SpecialArrayIndex{c}{\pcol@columnwidth}
% 
% \begin{itemize}\item[]\begin{tabular}{lll}
% \!\pcol@output@start!&\!\pcol@output@switch!&\!\pcol@restartcolumn!\\
% \!\pcol@flushcolumn!&\!\pcol@measurecolumn!&\!\pcol@synccolumn!\\
% \!\pcol@makeflushedpage!&\!\pcol@flushfloats!&\!\pcol@freshpage!\\
% \!\pcol@output@end!
% \end{tabular}
% \end{itemize}
% 
% Since we represent $\cc_c$ as;
% 
% \begin{eqnarray*}
% &&\Arg{\cc_c(\vb)}\Arg{\cc_c(\ft)}\Arg{\cc_c(\pd)}\Arg{\cc_c(\tl)}
% \Arg{\cc_c(\ml)}\Arg{\cc_c(\bl)}\Arg{\cc_c(\dl)}\Arg{\cc_c(\tf)}|%|\\
% &&\Arg{\Arg{\cc_c(\fh)}\Arg{\cc_c(\mb)}\Arg{\cc_c(\tn)}\Arg{\cc_c(\tr)}
%        \Arg{\cc_c(\bn)}\Arg{\cc_c(\br)}\Arg{\cc_c(\cn)}\Arg{\cc_c(\sw)}
%        \Arg{\cc_c(\ep)}}
% \end{eqnarray*}
% 
% in the body of $|\pcol@col|{\cdot}c$,
% 
% \SpecialArrayIndex{c}{\pcol@col}
% 
% we restore first eight by \!\pcol@igetcurrcol! giving everything above as
% its arguments by double expansion of
% $$
% \!\csname!| pcol@col|\!\number!\!\pcol@currcol!\!\endcsname!
% $$
% and then of the resulting control sequence.  Then this macro gives its
% nineth argument to \!\pcol@iigetcurrcol! which restores the last nine.
% 
% Note that the restore operation is \!\global!, except for $\cc_c(\vb)$ and
% $\cc_d(\ft)$, including \CSIndex{if@nobreak} for which \!\@nobreaktrue!
% and \!\@nobreakfalse! are defined \!\global! by \LaTeX.  Also note that
% \!\dimen!-type parameters are saved in the form of integers and thus
% restoring them needs to specify the unit |sp|.
% 
% \changes{v1.1}{2012/05/11}
% 	{Add assignmnet $w_c$ to \cs{columnwidth}, \cs{hsize} and
%	 \cs{linewidth}.} 
% 
%    \begin{macrocode}
\def\pcol@getcurrcol{%
  \expandafter\expandafter\expandafter\pcol@igetcurrcol
    \csname pcol@col\number\pcol@currcol\endcsname
  \expandafter\global\expandafter\columnwidth
    \csname pcol@columnwidth\number\pcol@currcol\endcsname
  \global\hsize\columnwidth \global\linewidth\columnwidth}
\def\pcol@igetcurrcol#1#2#3#4#5#6#7#8#9{%
  \def\@currbox{#1}\def\pcol@currfoot{#2}\global\pcol@prevdepth#3sp\relax
  \gdef\@toplist{#4}\gdef\@midlist{#5}\gdef\@botlist{#6}\gdef\@deferlist{#7}%
  \global\pcol@textfloatsep#8sp\pcol@iigetcurrcol#9}
\def\pcol@iigetcurrcol#1#2#3#4#5#6#7#8#9{%
  \global\@textfloatsheight#1sp\relax \global\@mparbottom#2sp\relax
  \global\@topnum#3\relax \global\@toproom#4sp\relax
  \global\@botnum#5\relax \global\@botroom#6sp\relax
  \global\@colnum#7\relax
  \global\@afterindentfalse \@nobreaktrue
  \ifcase#8
    \@nobreakfalse \or
    \global\@afterindenttrue \else
    \relax
  \fi
  \global\everypar{#9}}
%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@getcurrfoot}
% The macro \!\pcol@getcurrfoot! is invoked from \!\pcol@restartcolumn!,
% \!\pcol@flushcolumn! and \!\pcol@makeflushedpage! to put everything in
% $\cc_c(\ft)=\!\pcol@currfoot!$ into \!\footins!.  That is, if
% $\cc_c(\ft^b)$ is void, we let $\!\box!{\cdot}\!\footins!$ be so.
% Otherwise, we move \!\box!, \!\count!, \!\dimen! and \!\skip! of
% $\cc_c(\ft)$ into those of \!\footins!\footnote{
% 
% Moving \!\count!, \!\dimen! and \!\skip! is redundant almost always
% because it is very unlikely that these footonote parameters are modified
% dynamically.  Moreover, dynamic modification of them is hardly consistent
% with repetitive self-\!\insert!ion of \!\footins! in
% \!\pcol@restartcolumn! and \!\@reinserts! of \LaTeX.  However, we dare to
% move them in order to, for example, allow each column has its own footnote
% parameters.}.
% 
% 
%    \begin{macrocode}
\def\pcol@getcurrfoot{%
  \ifvoid\pcol@currfoot \global\setbox\footins\box\voidb@x
  \else
    \global\setbox\footins\box\pcol@currfoot
    \global\count\footins\count\pcol@currfoot
    \global\dimen\footins\dimen\pcol@currfoot
    \global\skip\footins\skip\pcol@currfoot
  \fi}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@setcurrcol}
% \begin{macro}{\pcol@setcurrcolnf}
% The macro \!\pcol@setcurrcol! is invoked from \!\pcol@output@switch!,
% \!\pcol@measurecolumn! and \!\pcol@synccolumn! to save \cctext{} of
% $c=\!\pcol@currcol!$ in $\cc_c$.  It is also used in \!\pcol@setcurrcolnf!
% invoked from \!\pcol@output@start!, \!\pcol@flushcolumn!,
% \!\pcol@makeflushedpage!, \!\pcol@flushfloats! and \!\pcol@freshpage! for
% the saving when the \colpage{} is known to have no footnotes.
% 
% The macro \!\pcol@setcurrcol! at first calculates the combined code for
% \CSIndex{if@nobreak} and \CSIndex{if@afterindent}, and then saves
% parameters into $\cc_c$ by \!\xdef! to have the sequence shown in the
% description of \!\pcol@getcurrcol!.  Note that \!\dimen!-type parameters
% are saved by expansions with \!\number! and thus as decimal numbers.
% 
% The macro \!\pcol@setcurrcolnf! \!\def!ines $\cc_c(\ft)=\!\pcol@currfoot!$
% as \!\voidb@x!, and then invoke \!\pcol@setcurrcol! for saving.
% 
% \changes{v1.0}{2011/10/10}
%	{Add save of \cs{pcol@textfloatsep}.}
% 
%    \begin{macrocode}
\def\pcol@setcurrcol{{\let\@elt\relax
  \@tempcnta\if@nobreak\if@afterindent\@ne\else\tw@\fi\else\z@\fi
  \expandafter\xdef\csname pcol@col\number\pcol@currcol\endcsname{%
    {\@currbox}{\pcol@currfoot}{\number\pcol@prevdepth}%
    {\@toplist}{\@midlist}{\@botlist}{\@deferlist}{\number\pcol@textfloatsep}%
    {{\number\@textfloatsheight}{\number\@mparbottom}%
     {\number\@topnum}{\number\@toproom}{\number\@botnum}{\number\@botroom}%
     {\number\@colnum}{\number\@tempcnta}{\the\everypar}}}}}
\def\pcol@setcurrcolnf{\def\pcol@currfoot{\voidb@x}\pcol@setcurrcol}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% 
% 
% \subsection{Syncronization}
% \label{sec:imp-sout-sync}
% 
% \begin{macro}{\pcol@sync}
% \changes{v1.0}{2011/10/10}
%	{Add measurement of $D_T$.}
% 
% The macro \!\pcol@sync! is invoked solely from \!\pcol@output@switch! for
% \exsync{} with page flushing ($\CSIndex{ifpcol@clear}=\true$) or without
% it.  First we invoke \!\pcol@flushcolumn! for all $c\In0\C$ to flush the
% \ccolpage{} of $c$ into $\S_c$ if the \colpage{} is not in $\ptop$, i.e.,
% $\cc_c(\vb^p)<\ptop$ and then, if we have deferred floats, to
% ship out following \fpage{}s up to $\ptop-1$ into $\S_c$ and to place top
% and/or bottom floats in $\ptop$.  Then we ship out all pages $p$ such that
% $p<\ptop$ by \!\pcol@outputpage! giving argument 1.  After that, we obtain
% the \pctext{} of $\ptop$ by \!\pcol@getcurrpinfo!.
% 
% Next, we measure the vertical sizes of the contents in the \ccolpage{} of
% $c$ which is now in $\ptop$ for all $c\In0\C$ by \!\pcol@measurecolumn! as
% follows, where $h(x)$ and $d(x)$ are the height and depth of an object $x$
% respectively.
% 
% \begin{eqnarray*}
% \sigma&=&\rlap{\!\floatsep!}\hskip8em
% \sigma_t=\cases{\cc_c(\tf)&     $\cc_c(\tf)<\infty$\cr
% 		    \!\textfloatsep!&$\cc_c(\tf)=\infty$}\qquad
% \sigma_b=\!\textfloatsep!\\
% \Uidx\fc(t)&=&\rlap{$\displaystyle(\cc_c(\tl)\neq())$}\hskip8em
%     \fc(m)=(\cc_c(\vb)\neq\!\vbox!|{}|)\\
% \fc(f)&=&\rlap{$\displaystyle(\cc_c(\ft)\neq\mathit{void})$}\hskip8em
%     \fc(b)=(\cc_c(\bl)\neq())\\
% \Uidx\Fc(X)&=&\exists x\in X:\fc(x)\\
% \Uidx\vc(t)&=&\!\skip!{\cdot}\cc_c(\vb)=
% 	\sum_{\Sub{\phi\in\cc_c(\tl)}}(h(\phi)+d(\phi))+
% 	(\Abs{\cc_c(\tl)}-1)\cdot\sigma+\sigma_t\\
% \vc(m)&=&h(\cc_c(\vb))+d(\cc_c(\vb))\\
% \vc(f)&=&h(\cc_c(\ft))+d(\cc_c(\ft))\\
% \vc(b)&=&\sum_{\Sub{\phi\in\cc_c(\bl)}}(h(\phi)+d(\phi))+
% 	(\Abs{\cc_c(\bl)}-1)\cdot\sigma+\sigma_b\\
% \vc(b')&=&\vc(b)+\sigma_b\\
% \pd_c&=&\cases{\cc_c(\pd)&$\fc(m)$\cr
%                \infty   &$\lnot \fc(m)$}\\
% \Uidx\size_c(x)&=&\cases{\vc(x)&$\fc(x)$\cr
%                     0     &$\lnot \fc(x)$}\\
% \Uidx\Size_c(X)&=&\cases{\displaystyle\sum_{x\in X}\size_c(x)&$\Fc(X)$\cr
%                          -\infty&                         $\lnot \Fc(X)$}\\
% \Uidx\VT&=&\!\@tempdima!=\max_{0\leq c<\C}\{\Size_c(\{t,m\})\}\\
% \Uidx\VB&=&\!\@tempdimb!=\max_{0\leq c<\C}\{\size_c(f)+\size_c(b)\}\\
% \Uidx\VP&=&\!\pcol@colht!=\max_{0\leq c<\C}\{\Size_c(\{t,m,f,b'\})\}\\
% \Uidx\DT&=&\!\@tempdimc!=\min\Set{\pd_c}{\Size_c{\{t,m\}=\VT}}\\
% \Uidx\dc&=&\cases{
%   0&			$\fc(b)$\cr
%   d(\cc_c(\ft))&	$\lnot \fc(b)\land \fc(f)$\cr
%   d(\cc_c(\pd))&	$\lnot \fc(b)\land\lnot \fc(f)$}\\
% \Uidx\DP&=&\!\@pagedp!=\min\Set{\dc}{\Size_c(\{t,m,f,b'\})=\VP}\\
% \end{eqnarray*}
% 
% That is, $\VT$ is the maximum of combined vertical size (height plus
% depth) of the top floats and the main vertical list, and $\VB$ is that of
% the footnotes and bottom floats.  $\VP$ is the maximum of the sum of all
% four sizes but we add \!\textfloatsep! if the tallest column has bottom
% floats.  Note that $\VT$ and $\VP$ are $-\infty$ if any \colpage{}s don't
% have corresponding items, while $\VB=0$ if so.
% 
% $\DT$ and $\DP$ are the minimum $\pd_c$ and $\dc$ respectively among those
% gives $\VT$ and $\VP$ respectively, where $\pd_c$ is $\cc_c(\pd)$ if
% $f_m=\true$ or $\infty$ otherwise, and $\dc$ is 0 if $c$ has bottom float,
% or the depth of the last footnote if any and without any bottom float, or
% $\cc_c(\pd)$ otherwise.  The reason why $\DT$ and $\DP$ have minimums is
% that they are set into \!\prevdepth! for the items just following the
% \sync{}ation point, and thus a smaller value results in a larger interline
% skip and the special value $-1000\,|pt|$ to inhibit the skip is given the
% highest priority.
% 
% Note that $\VP$ and $\DP$ are only for the \lpage{} and thus referred to
% only by \!\pcol@output@end! to close the environment.  The reason why we
% add \!\textfloatsep! to $\VP$ is to make the last page is well separated
% from the \postenv{} if the tallest column, taking the addition into
% account, has bottom floats.
% 
% As described above, any items can be empty, naturally for top floats,
% footnotes and bottom floats, but also including main vertical lists if the
% \ccolpage{}s were not in $\ptop$ before the invocation of
% \!\pcol@flushcolumn!.  Moreover, all main vertical lists can be empty if
% all \lcolpage{}s just have started (by \!\newpage!, for example).  More
% weirdly, the case of all-empty main vertical lists can be accompanied with
% non-empty top floats when columns have floats which cannot be put in
% $\ptop-1$ but are found to be placed in $\ptop$.
%
% Therefore, we have to take care of the case $\VT<0$ to mean that all top
% floats and main vertical lists are empty\footnote{
% 
% In usual cases, but it can mean some of them have negative vertical
% sizes.  Even though we can detect such a very unlikely special case, it is
% very tough to define the reasonable \sync{}ation point above the top of
% $\ptop$.  Therefore, we assume the point is at the top of $\ptop$ and thus
% do nothing.},
% 
% i.e., $\Fc(\{t,m\})=\false$ for all $c\In0\C$, to let succeeding stuff in
% all \ccolpage{}s be put as if they are preceded by a \!\flushpage!.  In
% other words, we do nothing if $\VT<0$.
% 
% Then if $\VT\geq0$, we set the \sync{}ation point $\VT$ below the top of
% $\ptop$.  However, since the \sync{}ation {\em pushes down} everything
% below the main vertical list, footnotes and bottom floats in a \colpage{}
% $c$ such that $\Size_c(\{t,m\})<\VT$ may be overflown from the bottom of
% the page.  Therefore, we examine $\VT+\VB\geq\!\@colht!$ (it can be
% $\VT+\VB>\VP$) and if so flush all \ccolpage{}s in $\ptop$ to set the
% \sync{}ation point at the top of the next page $\ptop+1$.  This flush is
% also done when it is requested explicitly by
% $\CSIndex{ifpcol@clear}=\true$.  That is, we let
% $\CSIndex{if@tempswa}=\true$ iff one of them holds to flush the
% \colpage{}s in \!\pcol@synccolumn! invoked for each $c\In0\C$, which sets
% the \sync{}ation point otherwise.  This macro also takes care of the case
% of $\VT\geq0$ but empty main vertical lists as the special case that $\VT$
% is given by a column whose main vertical list is empty, i.e., its top
% float defines the \sync{}ation point.  In such a case in which we have
% $\DT=\infty$, the macro sets the \sync{}ation point at the top of the
% page for the main vertical list and enlarges the space for top floats if
% necessary.
% 
% Finally, we let $\CSIndex{ifpcol@sync}=\false$ to give the default for the
% next invocation of \!\pcol@output@switch!.
% 
%    \begin{macrocode}
%% Special Output Routines: Synchronization

\def\pcol@sync{%
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do\pcol@flushcolumn
  \pcol@outputpage\@ne
  \pcol@getcurrpinfo\@currbox{\global\c@page}{\global\@colht}{\global\topskip}%
  \@tempdima-\maxdimen \@tempdimb-\maxdimen \pcol@colht-\maxdimen
  \@tempdimc\maxdimen \@pagedp\maxdimen
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do\pcol@measurecolumn
  \ifdim\@tempdima<\z@\else
    \advance\@tempdimb\@tempdima
    \@tempswafalse
    \ifdim\@tempdimb<\@colht \ifpcol@clear\else
      \@tempswatrue
    \fi\fi
    \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do\pcol@synccolumn
  \fi
  \global\pcol@syncfalse}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@flushcolumn}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@maxpage} as \cs{pcol@toppage}.}
% \changes{v1.0}{2011/10/10}
%	{Add \cs{vfil} at the bottom of flushed column-page.}
% \changes{v1.0}{2011/10/10}
%	{Change order of the garbage collection of \cs{pcol@currfoot} and
%	 \cs{pcol@getcurrfoot}.} 
% 
% The macro \!\pcol@flushcolumn! is invoked for each column $c\In0\C$ from
% \!\pcol@sync! to ship out the \ccolpage{} of $c$ into $\S_c$ if it is not
% leading one\Index{leading column-page}, i.e., $p=\cc_c(\vb^p)<\ptop$.  The
% macro also ships out \fpage{}s from $p+1$ up to $\ptop-1$ if we have
% deferred floats to fill them and, if this float flushing still leaves
% deferred floats, puts some of them to the \lcolpage{} being
% current\Index{current column-page}{} now as its top and/or bottom floats.
% 
% First we obtain the \cctext{} in $\cc_c$ by \!\pcol@getcurrcol! and
% examines if $p=\cc_c(\vb^p)<\ptop$.  If it does not hold to mean $c$ has
% \lcolpage{}, we do nothing.
% 
% Otherwise, we put the contents of the \ccolpage{} $\cc_c(\vb^b)$ adding
% \!\vfil! at its tail into \!\box!|255| being the \TeX's standard interface
% to carry the main vertical list for \!\output! routine.  We also move
% everything in $\cc_c(\ft)$ obtained by \!\pcol@getcurrfoot! into
% \!\footins! and return $\cc_c(\ft)$ to \!\@freelist! if $\cc_c(\ft^b)$ is
% not void.  Then after obtaining $p$'s \pctext{} by \!\pcol@getcurrpage!,
% we invoke \!\@makecol!\footnote{
% 
% Not \!\pcol@makecol! because \!\box!\texttt{255} has \!\vfil! at its
% tail and the \colpage{} should be short enough.}
% 
% to build the complete \colpage{} in \!\@outputbox! to be
% added to the tail of $\S_c$ by \!\@cons!, with the following
% setting\footnote{
% 
% \LaTeX's has another \!\insert! named \!\@kludgeins! for \!\enlargepage!
% but \Paracol{} does not cares about it.}.
% $$
% \begin{array}{lll}
% \!\box!|255|=\cc_c(\vb^b)&
% \!\footins!=\cc_c(\ft)&
% \!\@colht!=\pp^h(\cc_c(\vb^p))\\
% \!\@midlist!=\cc_c(\ml)&
% \!\@toplist!=\cc_c(\tl)&
% \!\@botlist!=\cc_c(\bl)
% \end{array}
% $$
% 
%    \begin{macrocode}
\def\pcol@flushcolumn{%
  \pcol@getcurrcol
  \ifnum\count\@currbox<\pcol@toppage
    \pcol@page\count\@currbox
    \setbox\@cclv\vbox{\unvbox\@currbox \vfil}%
    \ifvoid\pcol@currfoot\else \@cons\@freelist\pcol@currfoot \fi
    \pcol@getcurrfoot
    \pcol@getcurrpage
    \@makecol
    \global\setbox\@currbox\box\@outputbox
    \expandafter\@cons\csname pcol@shipped\number\pcol@currcol\endcsname
      \@currbox
%    \end{macrocode}
% 
% Then for each $q\in[p{+}1,\ptop{-}1]$, we repeat the followings; get $q$'s
% \pctext{} by \!\pcol@getcurrpage!; try to make a \fcolumn{} in
% \!\@outputbox! by \!\@makefcolumn! giving it \!\@deferlist! being
% $\cc_c(\dl)$ at initial but will be shrunk; if the \fcolumn{} is made,
% acquire an \!\insert! by \!\@next! to keep the contents of \!\@outputbox!
% and to be added to the tail of $\S_c$ by \!\@cons!.
% 
%    \begin{macrocode}
    \advance\pcol@page\@ne
    \ifx\@deferlist\@empty\else
      \@whilenum\pcol@page<\pcol@toppage\do{%
        \pcol@getcurrpage
        \@makefcolumn\@deferlist
        \if@fcolmade
          \@next\@currbox\@freelist{\global\setbox\@currbox\box\@outputbox}%
            \pcol@ovf
          \expandafter\@cons
            \csname pcol@shipped\number\pcol@currcol\endcsname\@currbox
        \fi
       \advance\pcol@page\@ne}%
    \fi
%    \end{macrocode}
% 
% Next, we acquire the \ccolpage{} of $c$ which is now in $\ptop$ and thus
% is empty by \!\@next!.  Then we let $\!\@colht!=\!\@colroom!=\pp^h(\ptop)$
% by \!\pcol@getcurrpinfo!, and reinitialize the float placement parameters by
% \!\pcol@floatplacement!.  Then, if $\cc_c(\dl)$ still has some floats,
% we make a \fcolumn{} for some of them in the \tpage{} by
% \!\pcol@makefcolumn! if $\CSIndex{ifpcol@clear}={}\true$ meaning flushing,
% or try to move some of them to $\cc_c(\tl)=\!\@toplist!$ or
% $\cc_c(\bl)=\!\@botlist!$ by \!\pcol@trynextcolumn! otherwise.  Note that
% since \!\@colroom! is used in \!\pcol@makefcolumn! as a working register,
% we let $\!\@colroom!=\pp^h(\ptop)$ again after its invocation.  After that
% we save \cctext{} including those given by \!\pcol@floatplacement! and
% modified by \!\pcol@trynextcolumn!  into $\cc_c$ by \!\pcol@setcurrcolnf!
% because all footnotes are shipped out, and let $\cc_c(\vb^p)=\ptop$ and
% $\cc_c(\vb^r)=\!\@colroom!$ possibly modified by \!\pcol@trynextcolumn!
% too.
% 
% \changes{v1.0}{2011/10/10}
%	{Add $\cs{@colht}\EQ\pi^h(p)$.}
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{pcol@trynextcolumn} with \cs{pcol@makefcolumn} for the
%	 case of $\cs{ifpcol@clear}\EQ\mathit{true}$.}
% 
%    \begin{macrocode}
    \@next\@currbox\@freelist{\global\setbox\@currbox\vbox{}}\pcol@ovf
    \pcol@getcurrpinfo\reserved@a\@tempcnta{\global\@colht}\@tempskipa
    \global\@colroom\@colht \pcol@floatplacement 
    \ifx\@deferlist\@empty\else
      \ifpcol@clear
        \pcol@makefcolumn \global\@colroom\@colht
      \else
        \pcol@trynextcolumn
    \fi\fi
    \pcol@setcurrcolnf
    \global\count\@currbox\pcol@page
    \global\dimen\@currbox\@colroom
  \fi %\ifnum\count\@currbox<\pcol@toppage
  \advance\pcol@currcol\@ne}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@makefcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced to take special care of the float-column in the last
%	 page. }
% 
% The macro \!\pcol@makefcolumn! is invoked solely from \!\pcol@flushcolumn!
% to put deferred floats in the currently empty \colpage{} of $c$ in the
% \tpage{} $\ptop$ which is being flushed.  Since we have to take special care
% of the case of environment closing, we cannot do this operation by
% \!\@makefcolumn!\footnote{
% 
% We can do it for other cases of \!\flushpage! and \!\clearpage! but
% \!\pcol@makefcolumn! covers it easily.}.
% 
% First, we scan the copy of $\cc_c(\dl)$ applying \!\pcol@makefcolelt! to
% each element to have the floats to be put in \!\@toplist!, which is
% assuredly empty because the \ccolpage{} of $c$ has already been shipped
% out to empty it, and those still deferred in $\cc_c(\dl)$.  Prior to scan,
% we let $H_r=\pp^h(\ptop)+\alpha$ as the space initially available for
% floats each of which being $\phi$ is assumed to consume
% $v(\phi)=h(\phi)+d(\phi)+\alpha$, and $H_t=\!\@colroom!=-\alpha$ as the
% initial value of the accumulated size of $v(\phi)$ for all $\phi$ to be
% put, where $\alpha=\!\floatsep!$ if $\CSIndex{ifpcol@lastpage}=\true$
% 
% \SpecialIndex{\ifpcol@lastpage}
% 
% as discussed afterward, or $\alpha=\!\@fpsep!$ otherwise.
% 
% Then if the resulting \!\@toplist! is not empty\footnote{
% 
% It can happen if the first float is larger than $\pp^h(\ptop)$.},
% 
% we examine if $\ptop$ is the \lpage{} ($|\ifpcol@|\~|lastpage|=\true$)
% and $\cc_c(\dl)$ is empty to mean the last \colpage{} have all deferred
% floats.  This case is subtle because if we make the \colpage{} a \fcolumn{}
% it can be sparse and unnecessarily throw the \postenv{} to the next
% page.  Therefore, we intend to pack floats to the page top as top floats
% and thus have let $\alpha=\!\floatsep!$ in the building process of
% \!\@toplist! above\footnote{
% 
% We dare to do it knowing the natural component of \!\floatsep! is a little
% bit (4pt) larger than that \!\@fpsep! and the possibility of having
% fewer floats than those given by \!\@makefcolumn!.},
% 
% but it may make a too tall \colpage{} only having floats shrinking
% the \postenv{} in the page.  In addition, if other columns have
% \fpage{}s in the \lpage, packing the floats as top floats should give
% inconsistent appearance but we don't know whether the columns following
% $c$ has \fpage{}s.  Therefore, we performs this float packing if making
% the \fpage{} gives too sparse, more specifically if
% $H_t<\!\floatpagefraction!\times\pp^h(\ptop)=\!\@fpmin!$, but postpone the
% final decision until all columns are processed by \!\pcol@flushcolumn!.
% That is, if the all conditions above hold, we keep \!\@toplist! so that it
% is saved in $\cc_c(\tl)$ and let $\cc_c(\tr)=\infty$ to indicate that the
% column has pending floats.
% 
% Otherwise, i.e., if we make a \fcolumn{} in the \lpage, we put all floats in
% \!\@toplist! in $\cc_c(\vb^b)$ of $\pp^h(\ptop)$ tall, together with
% \!\vskip!  of \!\@fptop! and \!\@fpbot! at the top and bottom and that of
% \!\@fpsep!  between floats as \!\@makefcolumn! does.  Note that the last
% \!\vfilneg! is to cancel \!\vfil! which will be inserted at the bottom by
% \!\pcol@synccolumn!.  Then we return all floats in \!\@toplist! to
% \!\@freelist! and empty the list.
% 
%    \begin{macrocode}
\def\pcol@makefcolumn{%
  \ifpcol@lastpage \@tempdimc\floatsep \else \@tempdimc\@fpsep \fi
  \@tempdima\@colht \advance\@tempdima\@tempdimc \global\@colroom-\@tempdimc
  \begingroup
    \let\@elt\pcol@makefcolelt
    \let\reserved@b\@deferlist
    \global\let\@deferlist\@empty
    \reserved@b
  \endgroup
  \ifx\@toplist\@empty\else
    \@tempswatrue
    \ifpcol@lastpage \ifx\@deferlist\@empty \ifdim\@colroom<\@fpmin
      \@tempswafalse \global\@toproom\maxdimen
    \fi\fi\fi
    \if@tempswa
      \setbox\@currbox\vbox to\@colht{\vskip\@fptop \vskip-\@fpsep
        \def\@elt##1{\vskip\@fpsep\box##1}\@toplist \vskip\@fpbot \vfilneg}%
      \xdef\@freelist{\@freelist\@toplist}%
      \global\let\@toplist\@empty
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@makefcolelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced to take special care of the float-column in the last
%	 page. }
% 
% The macro $\!\pcol@makefcolelt!\<\phi\>$ is invoked solely from
% \!\pcol@makefcolumn! to be applied to each float element $\phi$ in (the
% copy of) $\cc_c(\dl)$.  We examine if $v(\phi)=h(\phi)+d(\phi)+\alpha\leq
% H_r$ to mean the \fcolumn{} being built has room large enough for the float
% $\phi$.  If so, we add $\phi$ to \!\@toplist! by \!\@cons!, and let
% $H_r\gets H_r-v(\phi)$ and $H_t\gets H_t+v(\phi)$.  Otherwise, we add
% $\phi$ to $\cc_c(\dl)$ by \!\@cons! to make it deferred again, and
% let $H_r=-\infty$ so that the examinations for any succeeding elements
% fail.
% 
%    \begin{macrocode}
\def\pcol@makefcolelt#1{%
  \@tempdimb\ht#1{}\advance\@tempdimb\dp#1{}\advance\@tempdimb\@tempdimc
  \ifdim\@tempdimb>\@tempdima \@cons\@deferlist#1\relax
    \@tempdima-\maxdimen
  \else \@cons\@toplist#1\relax
    \advance\@tempdima-\@tempdimb \global\advance\@colroom\@tempdimb
  \fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@magicpenalty}
% \begin{macro}{\pcol@measurecolumn}
% \changes{v1.0}{2011/10/10}
%	{Drastically changed to measure $D_T$, to deal with empty
%	 main vertical list, and to omit \cs{topfigrule} and \cs{botfigrule}
%	 from float size measurement.} 
% 
% The macro \!\pcol@measurecolumn! is invoked for each column $c\In0\C$ from
% \!\pcol@sync! to measure the sizes of the top floats $\size_c(t)$, main
% vertical list $\size_c(m)$, footnotes $\size_c(f)$ and bottom floats
% $\size_c(b)$ in the \ccolpage{} in the page $\ptop$.  After obtaining the
% \cctext{} in $\cc_c$ by \!\pcol@getcurrcol!, we calculate
% $\size_c(t)=\!\skip!{\cdot}\cc_c(\vb)$ by \!\pcol@addflhd! giving it
% $\cc_c(\tl)$ and \!\pcol@textfloatsep! as its arguments also to have
% $\CSIndex{if@tempswa}=\fc(t)$.  We also calculate
% $\size_c(m)=h(\cc_c(\vb))+d(\cc_c(\vb))$, and then the sum of it and
% $\size_c(t)$.
% 
%    \begin{macrocode}
\def\pcol@magicpenalty{12345}
\def\pcol@measurecolumn{%
  \pcol@getcurrcol
  \@tempswafalse
  \dimen@\z@ \pcol@addflhd\@toplist\pcol@textfloatsep
  \global\skip\@currbox\dimen@
  \advance\dimen@\ht\@currbox \advance\dimen@\dp\@currbox \dimen@ii\dimen@
%    \end{macrocode}
% 
% Next we examine if the main vertical list $\cc_c(\vb^b)$ is empty.
% Unfortunately, \TeX{} does not provide any convenient way for examination,
% we perform a series of tricky operations to put the followings into
% \!\@tempboxa!; a penalty of $\!\pcol@magicpenalty!=12345$ whose existence
% in $\cc_c(\vb^b)$ is (almost) impossible; contents of $\cc_c(\vb^b)$ put
% by \!\unvcopy!; and then a \!\global! \!\def!inition of \!\@gtempa! to let
% it have the decimal representation of \!\lastpenalty!.  Since
% \!\lastpenalty! has $\arg{pen}$ if the last item is
% $\!\penalty!\arg{pen}$, or 0 otherwise,
% $\!\@gtempa!=\!\pcol@magicpenalty!$ iff $\cc_c(\vb^b)$ is empty.
% Therefore if so, we let $\pd_c=\cc_c(\pd)=\infty$ and save it (together
% with others) by \!\pcol@setcurrcol! so that, if the column defines the
% $\VT$ finally by its top floats, $\DT$ is let $\infty$ and the fact that
% the column has empty list is remembered.  Otherwise, we let
% $\pd_c=\cc_c(\pd)$ and $\CSIndex{if@tempswa}=\true$ to represent
% $\Fc(\{t,m\})=f_t\lor f_m$ because $f_m=\true$.  Then we invoke
% \!\pcol@measureupdate! to let $\VT=\size_c(t)+\size_c(m)=\Size_c(\{t,m\})$
% and $\DT=\pd_c$ if $\Fc(\{t,m\})=\true$ and $\VT<\Size_c(\{t,m\})$.  It
% also lets $\DT=\pd_c$ if $\Fc(\{t,m\})=\true$, $\VT=\Size_c(\{t,m\})$ and
% $\DT>\pd_c$.
% 
%    \begin{macrocode}
  \setbox\@tempboxa\vbox{\penalty\pcol@magicpenalty
    \unvcopy\@currbox \xdef\@gtempa{\number\lastpenalty}}%
  \ifnum\@gtempa=\pcol@magicpenalty\relax \global\pcol@prevdepth\maxdimen
    \pcol@setcurrcol
  \else \@tempswatrue
  \fi
  \pcol@measureupdate\@tempdima\dimen@ii\@tempdimc\pcol@prevdepth
%    \end{macrocode}
% 
% Next we let $\size_c(f)=0$ if $\cc_c(\ft^b)$ is void, or otherwise let
% $\size_c(f)=h(\cc_c(\ft^b))+d(\cc_c(\ft^b))+{}\cc_c(\ft^s)$\footnote{
% 
% We ignore the height and depth of \!\footnoterule! because they are
% expected to be 0 and are so in the default setting.}
% 
% and $\CSIndex{if@tempswa}=\true$ because $\fc(f)=\true$ and thus
% $\Fc(\{t,m,f\})=\true$.  After that, we calculate $\size_c(f)+\size_c(b)$
% by \!\pcol@addflhd! giving it $\cc_c(\bl)$ and \!\maxdimen! as its
% argument also to have $\CSIndex{if@tempswa}=\Fc(\{t,m,f,b\})$.  Then we
% let $V_b=\size_c(f)+\size_c(b)$ if $V_b<\size_c(f)+\size_c(b)$, and
% calculate $\size_c(t)+\size_c(m)+\size_c(f)+\size_c(b)$ being
% $\Size_c(\{t,m,f,b\})$ for a non-empty \colpage{}.
% 
%    \begin{macrocode}
  \ifvoid\pcol@currfoot \dimen@\z@
  \else
    \dimen@\ht\pcol@currfoot \advance\dimen@\dp\pcol@currfoot
    \advance\dimen@\skip\pcol@currfoot
    \@tempswatrue
  \fi
  \pcol@addflhd\@botlist\maxdimen
  \ifdim\dimen@>\@tempdimb \@tempdimb\dimen@ \fi
  \advance\dimen@\dimen@ii
%    \end{macrocode}
% 
% Next, we let $\dc$ be the depth of the lowest non-empty items among the
% main vertical list, footnotes and bottom floats.  That is, we let
% $\dc\gets\cc_c(\pd)$ at first, and then override it by $\dc\gets
% d(\cc_c(\ft^b))$ if there are footnotes, and finally override it by
% $\dc\gets0$ for the bottom floats if exist adding \!\textfloatsep! to
% $\Size_c(\{t,m,f,b\})$ to have $\Size_c(\{t,m,f,b'\})$.  After that, we
% throw away the calculation of $\Size_c(\{t,m,f,b'\})$ and $\dc$ above and
% let them be $\pp^h(\ptop)$ and 0 if $\cc_c(\dl)\neq\emptyset$, because the
% \lpage{} should be {\em full size} for the following pages having
% \fcolumn{}s.  Finally, we invoke \!\pcol@measureupdate! again to let
% $\VP=\Size_c(\{t,m,f,b'\})$ and $\DP=\dc$ if $\Fc(\{t,m,f,b\})=\true$ and
% $\VP<\Size_c(\{t,m,f,b'\})$.  It also lets $\DP=\dc$ if
% $\Fc(\{t,m,f,b\})=\true$, $\VP=\Size_c(\{t,m,f,b'\})$ and $\DP>\dc$.
% 
%    \begin{macrocode}
  \dimen@ii\pcol@prevdepth
  \ifvoid\pcol@currfoot\else \dimen@ii\dp\pcol@currfoot \fi
  \ifx\@botlist\@empty\else \dimen@ii\z@ \advance\dimen@\textfloatsep \fi
  \ifx\@deferlist\@empty\else \dimen@\@colht \dimen@ii\z@ \fi
  \pcol@measureupdate\pcol@colht\dimen@\@pagedp\dimen@ii
  \advance\pcol@currcol\@ne}
%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@addflhd}
% \changes{v1.0}{2011/10/10}
%	{Drastically changed to omit \cs{topfigrule} and \cs{botfigrule}
%	 from float size measurement, to take care of top float enlargement,
%	 to add the measurement of $D_T$, and to revise the definition of
%	 $D_P$.}
% 
% \begin{macro}{\pcol@hdflelt}
% \def\xl{\lambda_x}
% 
% The macro $\!\pcol@addflhd!\arg{list}\arg{tfs}$ is invoked twice
% from \!\pcol@measurecolumn! for a column $c$ to measure $\size_c(x)$
% ($x\in\{t,b\}$) of top ($x=t$) or bottom ($x=b$) floats.  The arguments
% and registers referred to in the macro have the folloiwngs according to
% $x=t$ or $x=b$.
% $$
% \nosv\begin{array}{l|ll}
% &		x=t&			x=b\\\hline
% \arg{list}&	\cc_c(\tl)&		\cc_c(\bl)\\
% \arg{tfs}&	\!\pcol@textfloatsep!&	\!\maxdimen!\\
% \CSIndex{if@tempswa}&
%		\false&			\Fc(\{t,m,f\})\\
% \!\dimen@!&	0&			\size(f)
% \end{array}
% $$
% The macro at first examines if $\cc_c(\xl)=\arg{list}$ is empty and does
% nothing if so.  Otherwise, \CSIndex{if@tempswa} is turned $\true$ to have
% $\fc(t)=\true$ for $x=t$ or $\Fc(\{t,m,f,b\})=\true$ for $x=b$.  Then we
% scan all floats in $\arg{list}$ applying \!\pcol@hdflelt! to each float
% $\phi$ to add $h(\phi)+d(\phi)+\!\floatsep!$ to \!\dimen@!, from/to which
% we then subtract \!\floatsep! and add $\sigma_x$ because the last float is
% followed by the vertical skip of $\sigma_x$ instead of \!\floatsep!, to
% have $\size_c(t)$ for $x=t$ or $\size_c(f)+\size_c(b)$ for $x=b$ being
% {\em returned} to \!\pcol@measurecolumn!.
% 
% Note that $\sigma_t$ is $\arg{tfs}=\!\pcol@textfloatsep!$ if it is less
% than $\infty$ or \!\textfloatsep! otherwise, while
% $\sigma_b=\!\textfloatsep!$ always because $\arg{tfs}=\!\maxdimen!$.  Also
% note that $\sigma_t$ can be biased by 10000\,|pt| and thus larger than
% 5000\,|pt|, if we have a \mvlfloat{} in top floats.  Another caution is that
% we ignore the contribution by \!\topfigrule! nor \!\botfigrule! because
% they should insert vertical items whose total height and depth are 0.
% 
%    \begin{macrocode}
\def\pcol@addflhd#1#2{%
  \ifx#1\@empty\else
    \@tempswatrue
    \let\@elt\pcol@hdflelt
    #1\advance\dimen@-\floatsep 
    \ifdim#2=\maxdimen \advance\dimen@\textfloatsep
    \else
      \advance\dimen@\pcol@textfloatsep
      \ifdim\pcol@textfloatsep>5000\p@ \advance\dimen@-\@M\p@ \fi
    \fi
    \let\@elt\relax
  \fi}
\def\pcol@hdflelt#1{\advance\dimen@\ht#1\advance\dimen@\dp#1%
  \advance\dimen@\floatsep}
%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@measureupdate}
% \changes{v1.0}{2011/10/10}
%	{Introduced to let $D_T$ and $D_P$ have the minimum depth of items
%	 among those which give $V_T$ and $V_P$.}
% 
% The macro $\!\pcol@measureupdate!\<V\>\<v\>\<D\>\<d\>$ is invoked
% twice in \!\pcol@measurecolumn! for $c$ to update $\<V\>=V_X$ and
% $\<D\>=D_X$ where $X\in\{T,P\}$ as follows if \CSIndex{if@tempswa}, being
% $\Fc(\{t,m\})$ for $X=T$ or $\Fc(\{t,m,f,b\})$ for $X=P$, is $\true$.
% $$
% \<V\>\gets\max(\<V\>,\<v\>)\qquad
% \<D\>\gets\cases{\min(\<D\>,\<d\>)&$\<V\>=\<v\>$\cr
%                  \<D\>&            $\<V\>\neq\<v\>$}
% $$
% The arguments $\<v\>$ and $\<d\>$ have the followings according to $X$.
% $$
% \arraycolsep0pt
% \begin{array}{rll}
% X=T\;{:}\;&\<v\>=\Size_c(\{t,m\})&\quad \<d\>=\delta_c\\
% X=B\;{:}\;&\<v\>=\Size_c(\{t,m,f,b'))&\quad \<d\>=\dc
% \end{array}
% $$
% 
%    \begin{macrocode}
\def\pcol@measureupdate#1#2#3#4{\if@tempswa
  \ifdim#1<#2\relax#1#2\relax#3#4\relax
  \else\ifdim#1=#2\ifdim#3>#4\relax#3#4\fi\fi\fi\fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@synccolumn}
% \changes{v1.0}{2011/10/10}
%	{Drastically changed to correctly implement the top float
%	 enlargement and MVL-float.}
% 
% The macro \!\pcol@synccolumn! is invoked for each column $c\In0\C$ from
% \!\pcol@sync! to set a \sync{}ation point at $\VT$ from the top of the
% \ccolpage{} of $c$ if $\CSIndex{if@tempswa}=\true$, or flush it otherwise.
% After obtaining $c$'s \cctext{} $\cc_c$ by \!\pcol@getcurrcol!, we process
% one of the following three cases.
% 
% The first non-flushing case is for $\DT=\infty$ to mean the \sync{}ation
% point is set just below the top floats of a column whose main vertical
% list is empty.  In this case, we should not put anything back to the main
% vertical list, because the column having defined the point will restart
% from the top of its \colpage{} with \!\topskip! and thus other columns
% should do so for the stuff following the point.  Therefore, we put
% $\cc_c(\vb^b)$ as the last top float, namely {\em\Uidx\mvlfloat} because
% it is for the main vertical list, acquiring an \!\insert! from
% \!\@freelist! by \!\@next! and assigning it to \Midx{\!\pcol@float!} so
% that we pretend main vertical lists of all columns are empty.  The float
% has zero height and depth and $\cc_c(\vb^b)$ is put in it following a
% vertical skip of $-\!\floatsep!$ to go back to the bottom of the last real
% float, and \!\topfigrule! and a skip of \!\textfloatsep! to separate it
% from the last real float, if we have some floats.  Otherwise, neither of
% the skips nor \!\topfigrule! are put because we let
% $\!\floatsep!=\!\textfloatsep!=0$ and $\!\topfigrule!=\!\relax!$
% temporarily in a group.  Then we set the \sync{}ation point by enlarging
% the space below the \mvlfloat{} so that the total size of all floats
% including \!\floatsep! and \!\textfloatsep!, which may be 0 as set in the
% process above, is equal to $\VT$.  This enlarging is done by letting
% $\cc_c(\tf)=\VT-\vc(t)+\!\textfloatsep!-\!\floatsep!$ so as to enlarge the
% space by $h_c^v=\VT-\vc(t)$ replacing \!\textfloatsep! with $\cc_c(\tf)$
% in the top float insertion process\footnote{
% 
% This enlarging cannot be done by making the float's height 
% $h_c^v-\!\floatsep!$ (or \!\textfloatsep!) because the height can be
% negative.}.
% 
% Note that $\cc_c(\tf)$ is then biased by 10000\,|pt| so that \!\pcol@cflt!
% will not put \!\topfigrule! because it has been already put as a part of
% the \mvlfloat{} or we don't have any real floats.  We also let
% $\cc_c(\pd)=1000$ to mean the \colpage{}'s main vertical list is empty, so
% as to mimic \TeX's mechanism of \!\prevdepth! with an empty
% list\footnote{
% 
% The author is not sure if this setting is really necessary but, at least,
% it looks working well (though other setting looks all right too).}.
% 
% Note that \colpage{}s with $\cc_c(\tf)=\infty$ does not have any
% \sync{}ation points, and thus $\cc_c(\tf)<\infty$ means a \sync{}ation has
% already taken place in them.  If this $\cc_c(\tf)<\infty$ happens with
% $\DT=\infty$\footnote{
% 
% This can happen when a \sync{}ation with $\DT=\infty$ is immediately
% followed by another \sync{}ation or, more unlikely, by additions of
% items whose total amount is negative and then a \sync{}ation.},
% 
% we cannot update $\cc_c(\tf)$ because \!\pcol@measurecolumn! took care of
% its value on measuring $\vc(t)$.  Therefore, we do nothing if
% $\cc_c(\tf)<\infty$ but just let succeeding stuff be added to the main
% vertical list as in \cswitch{} without \sync{}ation.
% 
%    \begin{macrocode}
\def\pcol@synccolumn{%
  \pcol@getcurrcol
  \if@tempswa
    \@tempdimb\@tempdima
    \advance\@tempdimb-\skip\@currbox
    \ifdim\@tempdimc=\maxdimen
      \ifdim\pcol@textfloatsep=\maxdimen \begingroup
        \ifx\@toplist\@empty
          \textfloatsep\z@ \floatsep\z@ \let\topfigrule\relax
        \fi
        \@next\pcol@float\@freelist{\global\setbox\pcol@float\vbox to\z@{
          \vskip-\floatsep \topfigrule \vskip\textfloatsep
          \unvbox\@currbox \vss}}\pcol@ovf
        \@cons\@toplist\pcol@float
        \advance\@tempdimb\textfloatsep \advance\@tempdimb-\floatsep
        \advance\@tempdimb\@M\p@
        \global\pcol@prevdepth\@m\p@
        \global\pcol@textfloatsep\@tempdimb
      \endgroup \fi
%    \end{macrocode}
% 
% The second case is also non-flushing but $\DT<\infty$ and thus most
% usual.  In this case, we enclose everything in $\cc_c(\vb^b)$ in a \!\vbox!
% whose height is $h_c^v$ and let $\cc_c(\vb^b)$ have it so that the
% item following the \sync{}ation point start at $\VT$.  An attention we
% have to pay is that it can be $h_c^v<\!\topskip!$ to let \TeX{} insert a
% vertical skip of the difference when the box is returned to the main
% vertical list pushing down the \sync{}ation point a little bit.
% Therefore, if so, we let $\cc_c(\vb^b)$ have the followings; a \!\vbox! of
% \!\topskip! tall having its old contents at its top above which no
% vertical skip will be inserted; a vertical skip $-\!\topskip!$ going back
% to the page top; and a vertical skip $h_c^v$ going down to the
% \sync{}ation point.
% 
% Note that, in both cases of $h_c^v<\!\topskip!$ or not, we insert an
% infinite stretch of $1/1000\,|fil|$ at the bottom of $\cc_c(\vb^b)$ to push
% up its old contents respecting other infinite stretches if any, as done by
% \!\raggedbottom!\footnote{
% 
% This means finite stretches are nullified.  We could respect them by
% obtaining the total amount of them in \!\pagestretch! together with
% infinite ones to let stretches act as much as possible especially with
% \!\flushbottom! setting.  However, this improvement (if so) is too small
% to pay a tough coding effort.}.
% 
% In addition, we let $\cc_c(\pd)=\DT$ to {\em broadcast} $\DT$ to all
% columns by which the baselines of first items following the \sync{}ation
% point are aligned, if $\DT$ plus the hight of each item is less than
% \!\baselineskip!.  Further, we let $\cc_c(\tf)=\!\textfloatsep!$ to
% indicate the \colpage{} has the \sync{}ation point we just have set, if it
% was $\infty$ to mean the point is the first one.
% 
%    \begin{macrocode}
    \else
      \global\pcol@prevdepth\@tempdimc
      \ifdim\pcol@textfloatsep=\maxdimen
        \global\pcol@textfloatsep\textfloatsep \fi
      \global\setbox\@currbox\vbox{
        \ifdim\@tempdimb<\topskip
          \vbox to\topskip{\unvbox\@currbox \vskip\z@\@plus.0001fil}
          \vskip-\topskip \vskip\@tempdimb
        \else
          \vbox to\@tempdimb{\unvbox\@currbox \vskip\z@\@plus.0001fil}
        \fi}%
    \fi
%    \end{macrocode}
% 
% The third and last case is for flushing.  In this case we simply add
% \!\vfil! and \!\penalty! of $-10000$ to make the \colpage{} is immediately
% flushed when it is revisited.  We also let $\cc_c(\pd)=1000$ to mimic
% \TeX's \!\prevdepth! with empty main vertical list again.
% 
%    \begin{macrocode}
  \else
    \global\pcol@prevdepth\@m\p@
    \global\setbox\@currbox\vbox{\unvbox\@currbox \vfil \penalty-\@M}%
  \fi
%    \end{macrocode}
% 
% Finally, we let $\cc_c(\tn)=0$ to inhibit futher addition of top floats
% because we have fixed the space for them\footnote{
% 
% Allowing the addition is tremendously tough even when the \colpage{} has
% sufficiently large space above the \sync{}ation point.},
% 
% and save it and other \cctext{} members into $\cc_c$ by \!\pcol@setcurrcol!.
% 
%    \begin{macrocode}
  \global\@topnum\z@ \pcol@setcurrcol
  \advance\pcol@currcol\@ne}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \subsection{Page Flushing}
% \label{sec:imp-sout-flush}
% 
% \begin{macro}{\pcol@output@flush}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@makelastpage} as \cs{pcol@makeflushedpage}.}
% \changes{v1.0}{2011/10/10}
%	{Remove unnecessary assignment of \cs{@colht}.}
% 
% The macro \!\pcol@output@flush! is invoked solely from
% \!\pcol@specialoutput! to process the \!\output! request made by
% \!\flushpage!.  We invoke \!\pcol@makeflushedpage! giving it \!\@colht! as
% the height of each \colpage{} to have the shipping-out image of the
% \tpage{} in \!\@outputbox! whose height is then set to be \!\textheight!.
% Then we invoke \!\@outputpage! for shipping out, and then finally
% \!\pcol@freshpage! to have a new page to start new \colpage{}s in it.
% 
%    \begin{macrocode}
%% Special Output Routines: Page Flushing

\def\pcol@output@flush{%
  \pcol@makeflushedpage\@colht
  \setbox\@outputbox\vbox to\textheight{\unvbox\@outputbox}%
  \@outputpage
  \pcol@freshpage}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@output@clear}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@makelastpage} as \cs{pcol@makeflushedpage}.}
% \changes{v1.0}{2011/10/10}
%	{Remove unnecessary increment of \cs{pcol@page} and assignment of
%	 \cs{@colht}.}
% 
% The macro \!\pcol@output@clear! is invoked solely from
% \!\pcol@specialoutput! to process the \!\output! request made by
% \!\clearpage!.  The first three and the last lines of this macro are same
% as \!\pcol@output@flush! to flush the \tpage{} and to have a newpage.  In
% the remaining mid part, we invoke \!\pcol@flushfloats! to ship out all
% deferred single-column floats in all columns if any, and then do it for
% multi-column floats by the following invocations enclosed in a group;
% \!\@dblfloatplacement! to set up placement parameters; \!\@makefcolumn!
% with \!\@dbldeferlist! to have a \fpage{} in \!\@outputbox!  if any; and a
% loop of \!\@outputpage! and \!\@makefcolumn! repeated while we have a
% \fpage{}, i.e., $\CSIndex{if@fcolmade}=\true$.
% 
% Note that the mid part is same as that found in \!\@doclearpage! but we
% omit various adjuncts surrouding it as follows;  examination of
% \CSIndex{if@twocolumn} because we should have multiple columns;
% examination of \CSIndex{if@firstcolumn} because we have to clear the page
% immediately even when we are not in the first column;  concatenating
% \!\@dbltoplist! with \!\@dbldeferlist! and clearing it because the author
% believes \!\@dbltoplist! must be empty on the invocation of this macro;
% and letting $\!\@colht!=\!\textheight!$ because \!\pcol@flushfloats! did
% it.
% 
%    \begin{macrocode}
\def\pcol@output@clear{%
  \pcol@makeflushedpage\@colht
  \setbox\@outputbox\vbox to\textheight{\unvbox\@outputbox}%
  \@outputpage
  \pcol@flushfloats
  \begingroup
    \@dblfloatplacement
    \@makefcolumn\@dbldeferlist
    \@whilesw\if@fcolmade\fi{\@outputpage
      \@makefcolumn\@dbldeferlist}%
  \endgroup
  \pcol@freshpage}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@makeflushedpage}
% \changes{v1.0}{2011/10/10}
%	{Renamed from \cs{pcol@makelastpage}.}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{ifpcol@textonly} as \cs{ifpcol@nospan}.}
% \changes{v1.0}{2011/10/10}
%	{Judge the last page is empty if $V_P\EQ-\infty$ instead of $V_P<0$.}
% 
% The macro $\!\pcol@makeflushedpage!\arg{ht}$ is invoked from
% \!\pcol@output@flush! or \!\pcol@output@clear! with $\arg{ht}=\!\@colht!$
% and from \!\pcol@output@end! with $\arg{ht}=\!\pcol@colht!$.  At first, we
% invoke \!\pcol@output@switch! with setting $\CSIndex{ifpcol@clear}=\true$
% to flush all pages up to $\ptop-1$ and to let $\cc_c(\vb^b)$ have the
% shipping-out image of the main vertical list of each \colpage{} $c$ in
% $\ptop$.  Then after obtaining $p$'s \pctext{} to have
% $\page(\ptop)=\pp^p(\ptop)$, $\!\@colht!=\pp^h(\ptop)$ and
% \CSIndex{ifpcol@nospan} by \!\pcol@getcurrpage!, we build the shipping-out
% image of $\ptop$ in \!\@outputbox! as follows.
% 
% First, if $\CSIndex{ifpcol@nospan}=\false$ to mean the page $\ptop$ has
% \spanning{} in $\pp(\ptop)$, it is put in \!\@outputbox! and is returned
% to \!\@freelist! by \!\@cons!.  Then we examine if $\arg{ht}=-\infty$ to
% mean the macro is invoked from \!\pcol@output@end! (i.e.,
% $\arg{ht}=\!\pcol@colht!$) and all columns are empty.  If so, we do
% nothing but scans $\cc_c(\dl)$ for all $c\In0\C$ by \!\pcol@getcurrcol! to
% let $\CSIndex{if@fcolmade}=\exists c\In0\C:(\cc_c(\dl)\neq())$ to tell it
% to \!\pcol@output@end!.
% 
%    \begin{macrocode}
\def\pcol@makeflushedpage#1{%
  \pcol@cleartrue \pcol@output@switch \pcol@clearfalse
  \pcol@getcurrpinfo\@currbox{\global\c@page}{\global\@colht}\@tempskipa
  \global\@fcolmadefalse
  \setbox\@outputbox\vbox{%
    \ifpcol@nospan\else
      \unvbox\@currbox
      \@cons\@freelist\@currbox
    \fi
    \ifdim#1=-\maxdimen
      \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
        \pcol@getcurrcol
        \ifx\@deferlist\@empty\else \global\@fcolmadetrue \fi
       \advance\pcol@currcol\@ne}%
%    \end{macrocode}
% 
% Otherwise, i.e., the macro is invoked from \!\pcol@output@flush! or
% \!\pcol@output@clear!, or from \!\pcol@output@end! with
% $\!\pcol@colht!\geq0$ being the size of the tallest column, we put
% $\cc_c(\vb^b)$ for all $c\In0\C$ in a \!\hbox! of \!\textwidth! wide
% separating them by \!\hfil! as follows.  First, if
% $\arg{ht}<\!\@colht!=\pp^h(\ptop)$ to mean the invoker is
% \!\pcol@output@end! and the tallest column is shorter than \!\@colht!, we
% let $\!\@colht!=\arg{ht}$ to let \!\@makecol! build a short \colpage{},
% saving the original value in \!\@pageht! temporarily.  Note that it can
% be $\arg{ht}>\!\@colht!$ due to the additional \!\textfloatsep! below the
% bottom floats but this excess is recovered by the shrink following it.
% Then for each $c$ we obtain $c$'s \cctext{} $\cc_c$ by
% \!\pcol@getcurrcol!, let $\CSIndex{if@fcolmade}=\true$ if
% $\cc_t(\dl)\neq()$, move $\cc_c(\vb^b)$ into \!\box!|255|, and let
% $\!\footins!=\cc_c(\ft)$ by \!\pcol@getcurrfoot! returning it to
% \!\@freelist! if $c$ has footnotes.
% 
% After that we examine if $\cc_c(\tr)=\infty$ to mean we are working on the
% \lpage{} and the \colpage{} is for a \fcolumn{} whose floats can be put as
% top floats, and let $\cc_c(\tr)$ have its original value
% $\!\floatpagefraction!\times\pp^h(\ptop)$ and $\!\topfigrule!=\!\relax!$
% temporarily because the floats are not top ones in reality, if so.  Then
% we also check $\arg{ht}=\pp^h(\ptop)$ to mean the \lpage{} is full size.
% If both of them hold, the floats in $\cc_c(\tl)$ should be (or may be) put
% in the \fpage{} as usual and thus we put them in \!\@outputbox! of
% $\pp^h(\ptop)$ tall, together with \!\vskip! of \!\@fptop! and \!\@fpbot!
% at the top and bottom and that of \!\@fpsep! between floats as
% \!\@makefcolumn! does.  Otherwise we invoke \!\@makecol!\footnote{
% 
% Not \!\pcol@makecol! because the main vertical list has \!\vfil! at its
% tail and the shrink below bottom floats should not be nullified.}
% 
% to have the shipping-out image of the \colpage{} in \!\@outputbox!,
% possibily with the deferred floats in $\cc_c(\tl)$ but without
% \!\topfigrule!.
% 
% Then we put the \!\@outputbox! above in a \!\hbox! of \!\columnwidth! wide
% preceded by \!\pcol@hfil! being \!\relax! for the first column while
% \!\hfil! for others.  Finally, we save \cctext{} especially those for
% float parameters into $\cc_c$ by \!\pcol@setcurrcolnf! because all
% footnotes have been shipped out.
% 
% \changes{v1.0}{2011/10/10}
%	{Let \cs{@colht} be $\langle\mathit{ht}\rangle$ if the former is
%	 less than the latter.}
% \changes{v1.0}{2011/10/10}
%	{Add special care of the float column in the last page.}
% 
%    \begin{macrocode}
    \else
      \hb@xt@\textwidth{%
        \let\pcol@hfil\relax \@pageht\@colht \ifdim#1<\@colht \@colht#1\fi
        \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
          \pcol@getcurrcol
          \ifx\@deferlist\@empty\else \global\@fcolmadetrue \fi
          \setbox\@cclv\box\@currbox
          \ifvoid\pcol@currfoot\else \@cons\@freelist\pcol@currfoot \fi
          \pcol@getcurrfoot
          \@tempswafalse
          \ifdim\@toproom=\maxdimen
            \global\@toproom\topfraction\@pageht \let\topfigrule\relax
            \ifdim\@colht=\@pageht \@tempswatrue \fi
          \fi
          \if@tempswa
            \setbox\@outputbox\vbox to\@colht{\vskip\@fptop \vskip-\@fpsep
              \def\@elt##1{\vskip\@fpsep\box##1}\@toplist \vskip\@fpbot}%
            \xdef\@freelist{\@freelist\@toplist}\global\@toplist\@empty
          \else \@makecol
          \fi
          \pcol@hfil \hb@xt@\columnwidth{\box\@outputbox\hss}%
          \let\pcol@hfil\hfil
          \pcol@setcurrcolnf
         \advance\pcol@currcol\@ne}}%
    \fi}}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@flushfloats}
% \changes{v1.0}{2011/10/10}
%	{Add reinitialization of \cs{@colht}.}
% 
% The macro \!\pcol@flushfloats! is invoked from \!\pcol@output@clear! and
% \!\pcol@output@end! to flush all deferred single-column floats in each
% column if any.  After letting $\!\@colht!=\!\textheight!$ for
% \fcolumn{}s, we iterate shipping out a page having the \fcolumn{}s while
% $\CSIndex{if@fcolmade}=\exists c\In0\C:(\cc_c(\dl)\neq())$.
% 
% In the loop, we open a \!\vbox! containing a \!\hbox! of \!\textwidth! wide
% to be set into \!\@outputbox!.  For the \!\hbox!, we put an inner \!\hbox!
% of \!\columnwidth! wide preceded by \!\pcol@hfil! being \!\relax! at
% initial or \!\hfil! otherwise, for each $c\In0\C$ by the following
% operations after initializing $\CSIndex{if@tempswa}=f=\false$.  First we
% obtain $c$'s \cctext{} including $\cc_c(\dl)$ by \!\pcol@getcurrcol!
% and pass $\cc_c(\dl)$ to \!\@makefcolumn! to produce a \fcolumn{} in
% \!\@outputbox!  to be put into the inner \!\hbox!.  Then we do $f\gets
% f\lor(\cc_d(\dl)\neq())$ with $\cc_d(\dl)$ shrunk by \!\@makefcolumn! to
% let $f$ have $\exists{}c\In0\C:(\cc_c(\dl)\neq())$ at the end of the inner
% loop for $c$, and then save the \cctext{} into $\cc_c$ by
% \!\pcol@setcurrcolnf! because we have no footntoes in $c$.
% 
% After the end of the inner loop, we move $f$ to \CSIndex{if@fcolmade} for
% the termination check of the outer loop, and invoke \!\@outputpage! to ship
% out the \fpage.
% 
%    \begin{macrocode}
\def\pcol@flushfloats{%
  \global\@colht\textheight
  \@whilesw\if@fcolmade\fi{%
    \setbox\@outputbox\vbox{\hb@xt@\textwidth{%
      \let\pcol@hfil\relax
      \@tempswafalse
      \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
        \pcol@getcurrcol
        \@makefcolumn\@deferlist
        \pcol@hfil \hb@xt@\columnwidth{\if@fcolmade \box\@outputbox \fi \hss}%
        \ifx\@deferlist\@empty\else \@tempswatrue \fi
        \let\pcol@hfil\hfil
        \pcol@setcurrcolnf
       \advance\pcol@currcol\@ne}%
      \global\@fcolmadefalse
      \if@tempswa \global\@fcolmadetrue \fi}}%
    \@outputpage}}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@freshpage}
% \changes{v1.0}{2011/10/10}
%	{Rename \cs{pcol@maxpage} as \cs{pcol@toppage}.}
% \changes{v1.0}{2011/10/10}
%	{Add save and restore of \cs{@currbox}.}
% \changes{v1.0}{2011/10/10}
%	{Remove unnecessary assignment of \cs{pcol@currcol}.}
% 
% The macro \!\pcol@freshpage! is invoked from \!\pcol@output@flush! and
% \!\pcol@output@clear! to start a new page after column flushing.  At
% first, we let $p=\pbase=\ptop=0$ and $\PP=\emptyset$ because we know no
% pages are kept.  Then we invoke \!\pcol@startpage! to start a new page
% with a \!\def!inition of $\!\pcol@currpage!=|{}|$ to indicate the invoker
% is this macro (i.e., not \!\pcol@opcol!).  Then after keeping \!\@colht!
% in $h=\!\pcol@colht!$, we do the followings for each column $c\In0\C$.
% 
% First we obtain $c$'s \cctext{} in $\cc_c$ by \!\pcol@getcurrcol! but let
% $p=0$ and $\!\@colroom!=h$, which can be modified by $c'<c$, without
% referring to $\cc_c(\vb^p)$ nor $\cc_c(\vb^r)$ because they are obsolete.
% We also save \!\@currbox! to \Midx{\!\pcol@currboxsave!} because it may be
% modified by \!\pcol@opcol! if we make \fcolumn{}s afterward.  Then we invoke
% \!\pcol@getcurrpage! to have the \pctext{} of $p=0$, because it might be
% modified by a column $c'<c$ by producing \fcolumn{}s.  After that and the
% invocation of \!\pcol@floatplacement! for setting float parametners, we
% invoke \!\pcol@startcolumn! for $c$'s \colpage{} at $p=0$, and interate
% \!\pcol@opcol! and \!\pcol@startcolumn! while a \fcolumn{} is made by the
% latter\footnote{
% 
% Each column can have deferred floats on the invocation from
% \!\pcol@output@flush!.}.
% 
% At last in the loop, we restore \!\@currbox! from \!\pcol@currboxsave!,
% let $\cc_c(\vb^b)$ be an empty \!\vbox! because the main vertical list is
% empty, and save the \cctext{} into $\cc_c$ by \!\pcol@setcurrcolnf!
% because of no footnotes obviously, after saving $p$ and \!\@colroom!,
% which might be modified by the \fcolumn{} production, into $\cc_c(\vb^p)$
% and $\cc_c(\vb^r)$.
% 
% After the loop above, finally we invoke \!\pcol@restartcolumn! to return
% to the column in which \!\flushpage! or \!\clearpage! was issued.
% 
%    \begin{macrocode}
\def\pcol@freshpage{%
  \global\pcol@page\z@ \global\pcol@toppage\z@ \global\pcol@basepage\z@
  \global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
  \pcol@startpage \pcol@colht\@colht
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
    \pcol@getcurrcol \pcol@page\z@ \@colroom\pcol@colht
    \let\pcol@currboxsave\@currbox
    \pcol@getcurrpage
    \pcol@floatplacement
    \pcol@startcolumn
    \@whilesw\if@fcolmade\fi{\pcol@opcol \pcol@startcolumn}%
    \let\@currbox\pcol@currboxsave
    \global\setbox\@currbox\vbox{}%
    \global\count\@currbox\pcol@page \global\dimen\@currbox\@colroom
    \pcol@setcurrcolnf
   \advance\pcol@currcol\@ne}%
  \pcol@restartcolumn}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \subsection{Last Page}
% \label{sec:imp-sout-end}
% 
% \begin{macro}{\pcol@output@end}
% \changes{v1.0}{2011/10/10}
%	{Drastically changed to take special care of float columns in the
%	 last page, to deal with the empty last page with and without
%	 deferred floats, and to try to make post-environment float pages.} 
% 
% The macro \!\pcol@output@end! is invoked solely from
% \!\pcol@specialoutput! to process the \!\output! request made by
% \!\endparacol!.  We invoke \!\pcol@makeflushedpage!, after letting
% $\CSIndex{ifpcol@lastpage}=\true$ to notify it of the \lpage{}
% production, giving it $h=\!\pcol@colht!$ in which \!\pcol@sync! sets the
% height of the tallest \colpage{} to have the shipping-out image of the
% \tpage{} in \!\@outputbox!.  Then we process one of the following cases.
% 
% The first case is for $\CSIndex{if@fcolmade}=\true$ to mean
% \!\pcol@makeflushedpage! found columns with deferred floats.  Therefore,
% since we need to have one or more multi-column pages, we ship out the page
% in \!\@outputpage! setting its height to \!\textheight! adding \!\vfil! at
% its tail by \!\@outputpage!, unless the \lpage{} is perfectly empty,
% i.e., $h=-\infty$ and $\CSIndex{ifpcol@nospan}=f_{\it ns}=\true$.  Then we
% invoke \!\pcol@flushfloats! to produce and ship out \fpage{}s.  Finally we
% let $\CSIndex{if@tempswa}=f_{\it sp}=\true$ to remember we will start a
% new page and thus $\!\@pagedp!=\pd=\DP=1000$ to mimic \TeX's \!\prevdepth!
% mechanism.
% 
%    \begin{macrocode}
%% Special Output Routines: Last Page

\def\pcol@output@end{%
  \pcol@lastpagetrue \pcol@makeflushedpage\pcol@colht
  \@tempswafalse
  \if@fcolmade
    \ifdim\pcol@colht>-\maxdimen \@tempswatrue \fi
    \ifpcol@nospan\else \@tempswatrue \fi
    \if@tempswa
      \setbox\@outputbox\vbox to\textheight{\unvbox\@outputbox \vfil}%
      \@outputpage
    \fi
    \pcol@flushfloats
    \@tempswatrue \@pagedp\@m\p@
%    \end{macrocode}
% 
% The second case is for $h=-\infty$ without deferred single-column floats
% to mean all columns in the \lpage{} are empty.  In this case, we examine
% if $\Midx{\!\pcol@firstprevdepth!}=\!\relax!$ to mean we have had at least
% one new page in \env{paracol} environment, i.e., \!\pcol@startpage! have
% been invoked at least once.  If so, we let $f_{\it sp}=\true$ and
% $\pd=1000$ again and put nothing to the main vertical list so that the
% \postenv{} starts from the top of the page.  However, we have to take care
% of the case that $f_{\it ns}=\false$ and thus \!\@outputbox!  has
% \spanning.  If so, we acquire an \!\insert! from \!\@freelist! by
% \!\@next! to let it have the \spanning, i.e., the contents of
% \!\@outputbox! except for the last vertical skip being
% \!\dbltextfloatsep!.  Then the \!\insert! is added to the head of
% \!\@dbldeferlist! with the float placement code 10 to force \LaTeX's float
% placement mechanism to put it to the page to be started shortly.
% 
% On the other hand, $\!\pcol@firstprevdepth!\neq\!\relax!$ means that it has
% $\!\prevdepth!=\pd'$ just before \beginparacol{} in decimal integer
% representation.  Since we have not started any pages in the environment,
% and all columns in the \lpage{} is empty, we have almost nothing in the
% environment.  Note that the environment can have multi-column floats but
% they have not yet put into any pages but are kept in \!\@dbldeferlist!.
% Therefore, the \preenv{} and \postenv{} must be {\em connected} naturally
% and thus we put the \preenv{} kept in \!\@outputbox! to the main vertical
% list by \!\unvbox! and let $\pd=\pd'$\footnote{
% 
% The author of course know this situation is very unlikely but he is
% monomaniac.}.
% 
%    \begin{macrocode}
  \else\ifdim\pcol@colht=-\maxdimen
    \ifx\pcol@firstprevdepth\relax
      \@tempswatrue \@pagedp\@m\p@
      \ifpcol@nospan\else
        \@next\@currbox\@freelist{\global\setbox\@currbox\vbox{
          \unvbox\@outputbox \unskip}}\pcol@ovf
        \count\@currbox10\relax
        {\let\@elt\relax \xdef\@dbldeferlist{\@elt\@currbox\@dbldeferlist}}%
      \fi
    \else \unvbox\@outputbox \@pagedp\pcol@firstprevdepth sp\relax
    \fi
%    \end{macrocode}
% 
% The last case without deferred floats and with some non-empty columns is
% most usual.  In this case, we simply put \!\@outputbox! letting
% $\!\topskip!=0$ because \!\topskip! has already been inserted in
% \colpage{}s or \preenv{} in the box.
% 
%    \begin{macrocode}
  \else
    \topskip\z@ \box\@outputbox
  \fi\fi
%    \end{macrocode}
% 
% The followings are for clean-up and set-up for the \postenv; return all
% $\cc_c(\vb)$ obtained by \!\pcol@getcurrcol! to \!\@freelist!; let
% $\!\pcol@prevdepth!=\pd$ so that it is set to \!\prevdepth! by
% \!\pcol@invokeoutput!; let $\!\@colht!=\!\@colroom!=\!\textheight!$ to
% mean the single-column page does not have any floats so far because those
% produced in or before the environment have already been shipped out, are
% put to the main vertical list packed in \!\@outputbox!, or are in
% \!\@dbldeferlist!.
% 
% As for deferred multi-column floats produced in the environment, including
% those once put in the \lpage{} but returned to the list by the operation
% described above, we move them to \!\@deferlist! because they are now
% single-column floats.  Then we invoke \!\pcol@floatplacement! to
% reinitialize float placement parameters.  Finally, if $f_{\it sp}=\true$,
% we invoke \!\@startcolumn! and then repeat invocations of \!\@opcol! and
% \!\@startcolumn! while \fpage{}s are produced, after letting
% $\CSIndex{ifpcol@lastpage}=\false$ to make \!\@combinefloats! work as
% \LaTeX's original\footnote{
% 
% Letting $\!\pcol@textfloatsep!=\infty$ is done by \!\pcol@floatplacement!.}.
% 
%    \begin{macrocode}
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
    \pcol@getcurrcol \@cons\@freelist\@currbox
   \advance\pcol@currcol\@ne}%
  \global\pcol@prevdepth\@pagedp
  \global\@colht\textheight
  \global\@colroom\textheight
  \global\let\@deferlist\@dbldeferlist \gdef\@dbldeferlist{}%
  \pcol@floatplacement
  \if@tempswa
    \pcol@lastpagefalse
    \@startcolumn \@whilesw\if@fcolmade\fi{\@opcol\@startcolumn}%
  \fi}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \section{Starting Environment}
% \label{sec:imp-startenv}
% 
% \begin{macro}{\pcol@invokeoutput}
% \changes{v1.0}{2011/10/10}
%	{Let \cs{pcol@prevdepth} have \cs{prevdepth} directly instead of via
%	 \cs{tempdima}.}
% 
% Before giving the definition of \env{paracol} environment and commands
% used in it, we define the macro $\!\pcol@invokeoutput!\arg{pen}$ invoked
% from them to make an \!\output!-request with \!\penalty! of
% $\arg{pen}=|\pcol@op@|{\cdot}f$.  The macro's structure is similar to that
% for the request sequence in \!\end@float! as follows; insert a \!\penalty!
% of $-10004$ to save the main vertical list in \!\@holdpg!; save
% \!\prevdepth!; insert a \!\vbox! to make it sure the following \!\penalty!
% of $\arg{pen}$ is kept even when we are at top of a page; and finally
% restore \!\prevdepth!.
% 
% The difference is in the save\slash restore of \!\prevdepth!.  First, the
% value of the register is saved in our own \!\pcol@prevdepth! instead of
% \!\@tempdima! by a \!\global! assignment so that \!\output!-routine refers
% to it\footnote{
% 
% The assignment is not necessary to be done \!\global!ly but we dare to do
% it to make all assignments to \!\pcol@prevdepth! being \!\global!
% consistently.}.
% 
% Second, the value restored to \!\prevdepth! may be different from that we
% just have saved because \!\output!-routine may update \!\pcol@prevdepth!
% to have, for example, the value saved in $\cc_c(\pd)$ when we left from
% $c$ which we are now restarting.
% 
% The macro is invoked from \!\paracol! ($f=|start|$), \!\pcol@switchcol!
% for \!\switchcolumn! and \csenv{}s ($f=|switch|$), \!\pcol@com@flushpage!
% for \!\flushpage! ($f=|flush|$), \!\pcol@com@clearpage! for \!\clearpage!
% ($f=|clear|$), and \!\endparacol!  ($f=|end|$).
% \SpecialIndex{\pcol@op@start}
% \SpecialIndex{\pcol@op@switch}
% \SpecialIndex{\pcol@op@flush}
% \SpecialIndex{\pcol@op@clear}
% \SpecialIndex{\pcol@op@end}
% 
%    \begin{macrocode}
%% Starting Environment

\def\pcol@invokeoutput#1{%
  \penalty-\@Miv \global\pcol@prevdepth\prevdepth \vbox{}%
  \penalty#1\relax \prevdepth\pcol@prevdepth}

%    \end{macrocode}
% 
% \begin{macro}{\paracol}
% \changes{v1.0}{2011/10/10}
%	{Change the order of operations for sake of clarity.}
% \changes{v1.0}{2011/10/10}
%	{Add the mechanism of inter-environment local counter conservation.}
% \changes{v1.0}{2011/10/10}
%	{Let $\cs{col@number}\EQ1$ instead of $C$ to keep \cs{maketitle} from
%	 producing title with \cs{twocolumn}.}
% \changes{v1.0}{2011/10/10}
%	{Add initialization of \cs{pcol@textfloatsep}, \cs{ifpcol@lastpage},
%	 \cs{pcol@firstprevdepth} and \cs{@combinefloats}.}
% \changes{v1.0}{2011/10/10}
%	{Make API commands environment-local and inhibit nesting of
%	 \texttt{paracol}.} 
% 
% The API macro $\!\paracol!\<\C\>$ is invoked by \beginparacol{} to start
% \Midx{\env{paracol}} environment.  After making it sure to be in vertical
% mode by \CSIndex{par} and letting $\!\pcol@ncol!=\C$, we set up lists for
% counters as follows.  First we obtain $\CC=\!\cl@@ckpt!$ to have all
% counters defined by \!\newcounter! and \counter{page}.  Then we scan
% $\CG=\!\pcol@gcounters!$ applying \!\pcol@remctrelt! to each element to
% have $\CL=\!\pcol@counters!$ for all \lcounter{}s by removing all
% $\cg\in\CG$ from $\CC$, and to move $\clist(\cg)=|\cl@|{\cdot}\cg$ to
% $|\pcol@cl@|{\cdot}\cg$ redefining
% $|\cl@|{\cdot}\cg=\!\pcol@stepcounter!\Arg{\cg}$
% 
% \SpecialArrayIndex{\theta}{\cl@}
% 
% to clear descendant \lcounter{}s of $\cg$, i.e., those in $\clist(\cg)$.
% 
% Next we scan $\CL$ applying \!\pcol@thectrelt! to each element $\cl\in\CL$
% to let $|\pcol@thectr@|{\cdot}\~\cl=|\the|{\cdot}\cl$
% 
% \SpecialArrayIndex{\theta}{\pcol@thectr@}
% \SpecialArrayIndex{\theta}{\the}
% 
% so that the former has the {\em default} \lrep{} of $\cl$.  The macro
% \!\pcol@thectrelt! also lets
% $|\the|{\cdot}\cl=|\pcol@thectr@|{\cdot}\cl{\cdot}0$
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% \SpecialArrayIndex{\theta}{\the}
% 
% if the \lrep{} for $\cl$ and $c=0$ has been defined by
% \!\definethecounter!.  This is necessary because in the first visit to the
% leftmost column 0 we will not invoke \!\pcol@switchcol! nor thus scanning
% $\CL$ with \!\pcol@setctrelt! which defines \lrep{}s, unless a \mctext{}
% is specified with \beginparacol.
% 
% Next we give the intial value of $\val_c(\cl)$ for each column $c$ and
% \lcounter{} $\cl\in\CL$ by the followings enclosed in a group.  First we
% scan $\Cc_0$ applying \!\pcol@loadctrelt! to each
% $\cl\in\Cc'_0=\Set{\theta}{\<\theta,\val_0(\theta)\>\in\Cc_0}$ to have
% the value $\val_0(\cl)$ in $|\pcol@ctr@|{\cdot}\cl$
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
% temporarily.  Next we scan $\CL$ to pick \lcounter{}s $\theta$ such that
% $\Uidx\Val(\theta)\neq\val_0(\theta)$ where $\Val(\theta)$ is the value of
% $\theta$ outside \env{paracol} environment, or $\theta\notin\Cc'_0$, to
% let them be listed in \!\@gtempa!.  That is, we pick \lcounter{}s which
% have been updated or defined after the closing of the previous
% \env{paracol}, or everything in $\CL$ at the first \beginparacol{} because
% $\Cc_0=\emptyset$\footnote{
% 
% Undefined in fact.}.
% 
% Finally, we invoke \!\pcol@synccounter! giving it \!\@gtempa! as its
% argument to let $\val_c(\theta)=\Val(\theta)$ for all $c$ and for each
% $\theta$ in \!\@gtempa!.  That is, when \env{paracol} environment appears
% two or more times, the value of a \lcounter{} at the beginning of the
% second or succeeding environment is kept unchanged from that at the end of
% the previous environment, unless it has been updated between them.  Note
% that these scans above are enclosed in a group in order to make
% $|\pcol@ctr@|{\cdot}\cl$
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
% local and thus collected as a garbage at \!\endgroup!.
% 
%    \begin{macrocode}
\def\paracol#1{\par
  \global\pcol@ncol#1\relax
  \global\let\pcol@counters\cl@@ckpt
  \let\@elt\pcol@remctrelt \pcol@gcounters
  \let\@elt\pcol@thectrelt \pcol@counters
  \begingroup
    \let\@elt\pcol@loadctrelt \csname pcol@counters0\endcsname
    \let\@elt\pcol@cmpctrelt \global\let\@gtempa\@empty \pcol@counters
    \pcol@synccounter\@gtempa
  \endgroup
%    \end{macrocode}
% \end{macro}
% 
% Next, we set up a few \LaTeX's typesetting parameters which should have
% appropriate values in the environment.  First we invoke
% \!\pcol@setcolumnwidth! to let each of $\w_c=|\pcol@columnwidth|{\cdot}c$
% 
% \SpecialArrayIndex{c}{\pcol@columnwidth}
% 
% have the width of the column $c$ for all $c\In0\C$, and then let
% \!\columnwidth!, \!\hsize! and \!\linewidth! commonly have $\w_0$.  We then
% let $\CSIndex{if@twocolumn}=\true$ and $\CSIndex{if@firstcolumn}=\true$ so
% that \textit{float}|*| environments work for multi-column floats and
% \!\marginpar! produces marginal notes appropriately.  We also let
% $\!\col@number!=1$ instead of $\C$ so that its (almost surely) sole user
% \!\maketitle! will not produce the title with \!\twocolumn! which cannot
% be in the environment.
% 
% Then we initialize our own variables;  $\!\pcol@topskip!=\!\topskip!$ for
% the second and succeeding pages;  $\!\pcol@textfloatsep!=\infty$ to mean
% we don't have any \sync{}ation points so far;
% $\CSIndex{ifpcol@lastpage}=\false$ because the \spage{} is not the last so
% far;  and $\!\pcol@firstprevdepth!=\!\prevdepth!$ in decimal integer form
% for the extreme empty case.  We also make the macro
% \Midx{\!\@combinefloats!} \!\let!-equal to our own \!\pcol@combinefloats!
% throughout the environment so that our customization is in effect for any
% invocations including those from \LaTeX's own macros.
% 
% \changes{v1.1}{2012/05/11}
% 	{Replace the calculation of \cs{columnwidth} with the call of
%	 \cs{pcol@setcolumnwidth} and the assignment of $w_0$ to it.}
% 
%    \begin{macrocode}
  \pcol@setcolumnwidth
  \expandafter\global\expandafter\columnwidth
    \csname pcol@columnwidth0\endcsname
  \global\hsize\columnwidth \global\linewidth\columnwidth
  \global\@twocolumntrue \global\@firstcolumntrue \col@number\@ne
  \global\pcol@topskip\topskip
  \global\pcol@textfloatsep\maxdimen
  \pcol@lastpagefalse \xdef\pcol@firstprevdepth{\number\prevdepth}%
  \let\@combinefloats\pcol@combinefloats
%    \end{macrocode}
% 
% Next, we scans the list \!\pcol@localcommands! of $\arg{com}$ being the
% name of commands, e.g., |switchcolumn|, available only in the environment
% or customized for the environment, applying \!\pcol@defcomelt! to each
% $\arg{com}$ to let $|\|\arg{com}=|\pcol@com@|{\cdot}\arg{com}$
% 
% \SpecialArrayMainIndex{\<\string\mathit{com}\>}{\pcol@com@}
% 
% the latter of which is the real implementation of the former.  Note that
% the list does not have all \elocal{} API commands but we omit
% \!\column!(|*|) for \env{column}(|*|) environments because their
% implementations \!\pcol@com@column!(|*|) are modified after the first
% invocation.  Therefore, we \!\def!ine \!\column!(|*|) to have
% \!\pcol@com@column!(|*|) in their bodies\footnote{
% 
% We can do this for other commands instead of adhearing to \cs{let} to
% eliminate the execption, but the author loves to use \cs{let} as much as
% possible.}.
% 
% We also give the first \!\def!initions of
% \!\pcol@com@column!(|*|) to let them do nothing but re\!\def!ine
% themselves by \!\pcol@defcolumn! unless
% \!\pcol@com@column*! is given an optional \mctext{} argument which is
% directly processed by \!\pcol@mctext!, if they appear as the first
% \cswitch{} command\slash environment after \beginparacol.  Then we
% re\!\def!ine \!\paracol! itself so that it will complain of illegal
% nesting by \!\PackageError!.
% 
%    \begin{macrocode}
  \let\@elt\pcol@defcomelt \pcol@localcommands
  \def\column{\pcol@com@column}%
  \@namedef{column*}{\@nameuse{pcol@com@column*}}%
  \global\let\pcol@com@column\pcol@defcolumn
  \global\@namedef{pcol@com@column*}{\pcol@defcolumn
    \@ifnextchar[%]
     \pcol@mctext\relax}%
  \def\paracol##1{\PackageError{paracol}{%
    Environment paracol cannot be nested.}\@eha}%
%    \end{macrocode}
% 
% Then we let \!\output! have our output routine \!\pcol@output! as its sole
% token, and then make \!\output! request with
% $\!\penalty!=\!\pcol@op@start!$ by \!\pcol@invokeoutput! to invoke
% \!\pcol@output@start! for initialization, after letting
% $\!\@elt!=\!\relax!$ to make it sure that any lists can be manipulated
% without unexpected application of a macro to their elements.
% 
%    \begin{macrocode}
  \output{\pcol@output}%
  \let\@elt\relax
  \pcol@invokeoutput\pcol@op@start
%    \end{macrocode}
% 
% Finally, we let $\!\pcol@nextcol!=0$ in case \beginparacol{} has the
% optional argument for \mctext{}, and invoke \!\pcol@mctext! if it has.
% 
%    \begin{macrocode}
  \pcol@nextcol\z@
  \@ifnextchar[%]
    \pcol@mctext\relax}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\columnratio}
% \changes{v1.1}{2012/05/11}
% 	{Introduced to specify column width fractions.}
% \begin{macro}{\pcol@columnratio}
% \changes{v1.1}{2012/05/11}
% 	{Introduced to keep column width fractions.}
% 
% The API macro \!\columnratio!\Arg{$r_0,r_1,\cdots,r_{k-1}$} defines the
% column width fraction $r_c$ for column $c$.  This macro just |\global|y
% |\def|ines the macro \!\pcol@columnratio! whose body has its argument.
% The macro \!\pcol@columnratio! is initialized to be empty so that all
% columns have same width as default.
% 
%    \begin{macrocode}
\def\columnratio{\gdef\pcol@columnratio}
\columnratio{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% 
% \begin{macro}{\pcol@setcolumnwidth}
% \changes{v1.1}{2012/05/11}
% 	{Introduced to calculate $w_c$.}
% 
% The macro \!\pcol@setcolumnwidth! is invoked solely from \!\paracol! to
% calculate $\w_c=|\pcol@columnwidth|{\cdot}c$
% 
% \SpecialArrayIndex{c}{\pcol@columnwidth}
% 
% from the fractions $r_0$, $r_1$, \ldots, $r_{k-1}$ given through the
% argument of \!\columnratio! and thus kept in \!\pcol@columnratio!.  First,
% we calculate $W=\!\textwidth!-(\C-1)\!\columnsep!$ being the sum of $\w_c$
% for all $c\In0\C$.  Then we let $\w_c=r_cW$ for all $c\In0{k'}$ where
% $k'=\min(k,\C-1)$, in the \!\@for! loop scanning $r_c$ for all $c\In0k$.
% Finally, we let $\w_c=(W-\sum_{d=0}^{k'-1}w_d)/(\C-k')$ for all
% $c\In{k'}\C$.  Note that
% $|\pcol@columnwidth|{\cdot}c$ is a macro having the integer
% representation of $\w_c$ with the unit |sp|.
% 
%    \begin{macrocode}
\def\pcol@setcolumnwidth{
  \@tempcntb\pcol@ncol \advance\@tempcntb\m@ne
  \@tempdima-\columnsep \multiply\@tempdima\@tempcntb
  \advance\@tempdima\textwidth \@tempdimb\@tempdima
  \@tempcnta\z@
  \@for\reserved@a:=\pcol@columnratio\do{%
    \ifnum\@tempcnta<\@tempcntb
      \@tempdimc\reserved@a\@tempdima
      \expandafter\edef\csname pcol@columnwidth\number\@tempcnta\endcsname{%
        \number\@tempdimc sp}%
      \advance\@tempdimb-\@tempdimc
      \advance\@tempcnta\@ne
    \fi}%
  \@tempcntb\pcol@ncol \advance\@tempcntb-\@tempcnta
  \divide\@tempdimb\@tempcntb
  \@whilenum\@tempcnta<\pcol@ncol\do{%
    \expandafter\edef\csname pcol@columnwidth\number\@tempcnta\endcsname{%
      \number\@tempdimb sp}%
    \advance\@tempcnta\@ne}%
}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@localcommands}
% \changes{v1.0}{2011/10/10}
%	{Introduced to make API commands environment-local.}
% 
% The macro \!\pcol@localcommands! is the list of the names of the following
% {\em\Uidx\elocal} API commands (or {\em\Uidx\lcommand{}s} in short) and is
% solely referred to by \!\paracol!.
% 
% \begin{center}\begin{tabular}{llll}
% \!\switchcolumn!&
% \!\endcolumn!(|*|)&
% \!\nthcolumn!(|*|)&\!\endnthcolumn!(|*|)\\
% \!\leftcolumn!(|*|)&\!\endleftcolumn!(|*|)&
% \!\rightcolumn!(|*|)&\!\endrightcolumn!(|*|)\\
% \!\flushpage!&
% \!\clearpage!&
% \!\synccounter!&
% \!\syncallcounters!
% \end{tabular}\end{center}
% 
% Note that we omit \!\column!(|*|) from the list as discussed in the
% description of \!\paracol!.
% 
%    \begin{macrocode}
\def\pcol@localcommands{%
  \@elt{switchcolumn}%
  \@elt{endcolumn}\@elt{endcolumn*}%
  \@elt{nthcolumn}\@elt{endnthcolumn}\@elt{nthcolumn*}\@elt{endnthcolumn*}%
  \@elt{leftcolumn}\@elt{endleftcolumn}\@elt{leftcolumn*}\@elt{endleftcolumn*}%
  \@elt{rightcolumn}\@elt{endrightcolumn}%
    \@elt{rightcolumn*}\@elt{endrightcolumn*}%
  \@elt{flushpage}\@elt{clearpage}%
  \@elt{synccounter}\@elt{syncallcounters}}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@defcomelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced to make API commands environment-local.}
% 
% The macro \!\pcol@defcomelt! is invoked solely from \!\paracol! to be
% applied to each element $\arg{com}$ in \!\pcol@localcommands!.  Two
% lengthy \!\let!s with \!\expandafter!s are for doing
% $\!\let!|\|\arg{com}|=\pcol@com@|{\cdot}\arg{com}$ to bind the \elocal{}
% API command $|\|\arg{com}$ and its implementation
% $|\pcol@com@|{\cdot}\arg{com}$.
% 
% \SpecialArrayIndex{\<\string\mathit{com}\>}{\pcol@com@}
% 
%    \begin{macrocode}
\def\pcol@defcomelt#1{%
  \expandafter\let\expandafter\reserved@a\csname pcol@com@#1\endcsname
  \expandafter\let\csname #1\endcsname\reserved@a}

%    \end{macrocode}
% \end{macro}
% 
% 
% 
% \section{Counter Operations}
% \label{sec:imp-counter}
% 
% \begin{macro}{\globalcounter}
% \begin{macro}{\pcol@gcounters}
% The API macro $\!\globalcounter!\arg{ctr}$ defines that $\arg{ctr}$ is a
% \gcounter, and thus add it to $\CG=\Midx{\!\pcol@gcounters!}$, which has
% \counter{page} at initial.  Note that initial definition of
% \!\pcol@gcounters! is done by \!\gdef! just for cosistent \!\global!
% assignments to it.
% 
%    \begin{macrocode}
%% Counter Opearations

\def\globalcounter#1{\@cons\pcol@gcounters{{#1}}}
\gdef\pcol@gcounters{\@elt{page}}
%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@remctrelt}
% \begin{macro}{\pcol@iremctrelt}
% The macro $\!\pcol@remctrelt!\<\cg\>$ is invoked solely from \!\paracol!
% and is applied to each \gcounter{} $\cg\in\CG$ to remove it from
% $\CC=\!\pcol@counters!$ in which we have $\CL$ finally.  The macro also
% moves $|\cl@|{\cdot}\cg=\clist(\cg)$
% 
% \SpecialArrayIndex{\theta}{\cl@}
% 
% to $|\pcol@cl@|{\cdot}\cg$
% 
% \SpecialArrayMainIndex{\theta}{\pcol@cl@}
% 
% to keep the list of the descendant \lcounter{}s of $\cg$ in it, and then
% re\!\def!ines $|\cl@|{\cdot}\cg=\!\pcol@stepcounter!\Arg{\cg}$
% 
% \SpecialArrayMainIndex{\theta}{\cl@}
% 
% so that it is invoked on $\!\stepcounter!\Arg{\cg}$ to let $\val_c(\cl)=0$
% for all $c\In0\C$ and $\cl\in\clist(\cg)$, if $\cg\neq\counter{page}$.
% These operations are performed by a lengthy sequence with many occurences
% of \!\expandafter!, \!\csname! and \!\endcsname! but the sequence is
% equivalent to the following.
% 
% \begin{quote}
% $\!\let!|\pcol@cl@|{\cdot}\cg|=\cl@|{\cdot}\cg$\\
% $\CSIndex{ifx}|\c@|{\cdot}\cg\!\c@page!|\else |
%     |\def\cl@|{\cdot}\cg|{|\!\pcol@stepcounter!|{|\cg|}}\fi|$
% \end{quote}
% 
% As for the removal of $\cg$ from $\CC$, we do $\CC'\gets\CC$,
% $\CC\gets\emptyset$, and then apply \!\pcol@iremctrelt! to each
% $\theta\in\CC'$ to let $\CC\gets\CC\cup\{\theta\}$ by \!\@cons! if
% $\theta\neq\cg$.
% 
%    \begin{macrocode}
\def\pcol@remctrelt#1{%
  \expandafter\let\expandafter\reserved@a\csname cl@#1\endcsname
  \expandafter\let\csname pcol@cl@#1\endcsname\reserved@a
  \expandafter\ifx\csname c@#1\endcsname\c@page\else
    \@namedef{cl@#1}{\pcol@stepcounter{#1}}%
  \fi
  \def\reserved@a{#1}\let\reserved@b\pcol@counters
  \global\let\pcol@counters\@empty
  {\let\@elt\pcol@iremctrelt \reserved@b}}
\def\pcol@iremctrelt#1{%
  \def\reserved@b{#1}%
  \ifx\reserved@a\reserved@b\else \@cons\pcol@counters{{#1}}\fi}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\definethecounter}
% The API macro $\!\definethecounter!\<\cl\>\<c\>\arg{rep}$ define the
% \lrep{} $\arg{rep}$ for a \lcounter{} $\cl$ in a column $c$.  It
% \!\def!ines $|\pcol@thectr@|{\cdot}\cl{\cdot}c$
% 
% \SpecialArrayMainIndex{\theta{\cdot}c}{\pcol@thectr@}
% 
% to have $\arg{rep}$ in its  body.
% 
%    \begin{macrocode}
\def\definethecounter#1#2#3{\@namedef{pcol@thectr@#1#2}{#3}}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@thectrelt}
% The macro $\!\pcol@thectrelt!\<\cl\>$ is invoked solely in \!\paracol!
% and is applied to each $\cl\in\CL$ to define its \lrep{} of
% default and that of the leftmost column 0.  It performs a lengthy sequence
% with many occurences of \!\expandafter!, \!\csname! and \!\endcsname! but
% the sequence is equivalent to the followings.
% 
% \begin{quote}
% $\!\let!|\pcol@thectr@|{\cdot}\cl|=\the|{\cdot}\cl$\\
% $\CSIndex{ifx}|\pcol@thectr@|{\cdot}\cl{\cdot}0\!\relax!|\else |
%     \!\let!|\the|{\cdot}\cl|=\pcol@thectr@|{\cdot}\cl{\cdot}0| \fi|$
% \end{quote}
% 
% \SpecialArrayMainIndex{\theta}{\pcol@thectr@}
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% \SpecialArrayMainIndex{\theta}{\the}
% 
%    \begin{macrocode}
\def\pcol@thectrelt#1{%
  \expandafter\let\expandafter\reserved@a\csname the#1\endcsname
  \expandafter\let\csname pcol@thectr@#1\endcsname\reserved@a
  \expandafter\let\expandafter\reserved@a\csname pcol@thectr@#10\endcsname
  \ifx\reserved@a\relax\else
    \expandafter\let\csname the#1\endcsname\reserved@a
  \fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@loadctrelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced for inter-environment local counter conservation.}
% \begin{macro}{\pcol@storecounters}
% \changes{v1.0}{2011/10/10}
%	{Introduced for inter-environment local counter conservation.}
% \begin{macro}{\pcol@storectrelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced for inter-environment local counter conservation.}
% 
% The macro $\!\pcol@loadctrelt!\<\cl\>\<\val_c(\cl)\>$ is invoked from
% \!\paracol! and \!\pcol@synccounter! and is applied to each element
% $\<\cl,\val_c(\cl)\>\in\Cc_c$ for a column $c$ to define a macro
% $|\pcol@ctr@|{\cdot}\cl=v(\cl)$
% 
% \SpecialArrayMainIndex{\theta}{\pcol@ctr@}
% 
% having $\val_c(\cl)$ in its body for a temporary use.  This macro or its
% redefined version is then referred to by $\!\pcol@cmpctrelt!\<\cl\>$ or
% $\!\pcol@storectrelt!\<\cl\>$.  The latter is invoked from
% \!\pcol@storecounters! via \!\pcol@sscounters! to add $\<\cl,v(\cl)\>$ to
% \!\@gtempa! by \!\@cons! to rebuild $\CC_c$ for a column $c$ in
% \!\@gtempa!.
% 
% The macro \!\pcol@storecounters! is invoked solely from
% $\!\pcol@synccounter!\<\theta\>$ to update a \lcounter{} $\theta$ with
% $\Val(\theta)$ for \csync.  That is, \!\pcol@storecounters! is used to add
% $\<\cl,v(\cl)\>$ to \!\@gtempa! for all $\cl\in\CL$ by \!\pcol@sscounters!
% giving it \!\pcol@storectrelt! as its argument, where $v(\cl)$ is modified
% if $\cl=\theta$ or unmodifed otherwise after it is defined by
% \!\pcol@loadctrelt!.
% 
%    \begin{macrocode}
\def\pcol@loadctrelt#1#2{\@namedef{pcol@ctr@#1}{#2}}
\def\pcol@storecounters{\pcol@sscounters\pcol@storectrelt}
\def\pcol@storectrelt#1{\@cons\@gtempa{{#1}{\@nameuse{pcol@ctr@#1}}}}
%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@savecounters}
% \changes{v1.0}{2011/10/10}
%	{Move the body to \cs{pcol@sscounters}.}
% 
% \begin{macro}{\pcol@savectrelt}
% The macro \!\pcol@savecounters! is invoked from
% \!\pcol@com@syncallcounters!, \!\pcol@stepcounter! and \!\pcol@switchcol!
% to let $\CC_c$ for a column $c$ have the list of $\<\cl,\val_c(\cl)\>$
% where $\val_c(\cl)$ is the value of $|\c@|{\cdot}\cl$ to be saved in
% the list.
% 
% \SpecialArrayIndex{\theta}{\c@}
% 
% It does this operation invoking \!\pcol@sscounters! giving it
% \!\pcol@savectrelt! as its argument.
% 
% The macro $\!\pcol@savectrelt!\<\cl\>$ adds $\<\cl,\val_c(\cl)\>$ to
% \!\@gtempa! by \!\@cons! to rebuild $\CC_c$ for a column $c$ in
% \!\@gtempa!.
% 
%    \begin{macrocode}
\def\pcol@savecounters{\pcol@sscounters\pcol@savectrelt}
\def\pcol@savectrelt#1{\@cons\@gtempa{{#1}{\number\csname c@#1\endcsname}}}
%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@sscounters}
% \changes{v1.0}{2011/10/10}
%	{Introduced to implement the common operations of
%	 \cs{pcol@storecounters} and \cs{pcol@savecounters}.}
% 
% The macro $\!\pcol@sscounters!\arg{elt}$ is invoked from
% \!\pcol@storecounters! with $\arg{elt}=\!\pcol@storectrelt!$ or
% \!\pcol@savecounters! with $\arg{elt}=\!\pcol@savectrelt!$ to build
% $\CC_c=|\pcol@counters|{\cdot}c$ for a column $c$.
% 
% \SpecialArrayMainIndex{c}{\pcol@counters}
% 
% To do that, it lets $\!\@gtempa!=()$ and then apply $\arg{elt}$ to all
% $\cl\in\CL=\!\pcol@counters!$ to have updated $\CC_c$ in \!\@gtempa!.
% Then finally, \!\@gtempa! is moved into $\CC_c$ by \!\xdef!\footnote{
% 
% It can be done by \cs{global}\cs{let} more efficiently but it is lengthy
% due to two \cs{expandafter}.}.
% 
%    \begin{macrocode}
\def\pcol@sscounters#1{\begingroup
  \global\let\@gtempa\@empty
  \let\@elt#1\relax \pcol@counters
  \let\@elt\relax
  \expandafter\xdef\csname pcol@counters\number\pcol@currcol\endcsname{%
    \@gtempa}%
  \endgroup}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@cmpctrelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced for inter-environment local counter conservation.}
% 
% The macro $\!\pcol@cmpctrelt!\<\theta\>$ is invoked solely from
% \!\paracol!  and is applied to each $\theta\in\CC$ to examine if
% $\val_0(\theta)=\Val(\theta)$ where $\val_0(\theta)$ is in
% $|\pcol@ctr@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
% If the examination fails including due to that $|\pcol@ctr@|{\cdot}\theta$
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
% is undefined, we add $\theta$ to the list \!\@gtempa! by \!\@cons!.
% 
%    \begin{macrocode}
\def\pcol@cmpctrelt#1{\@tempswafalse \@tempcnta\@nameuse{c@#1}%
  \expandafter\ifx\csname pcol@ctr@#1\endcsname\relax \@tempswatrue
  \else\ifnum\@nameuse{pcol@ctr@#1}=\@tempcnta\else \@tempswatrue
  \fi\fi
  \if@tempswa \@cons\@gtempa{{#1}}\fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\synccounter}
% \changes{v1.0}{2011/10/10}
%	{Introduced as an environment-local API command.}
% \begin{macro}{\pcol@com@synccounter}
% \changes{v1.0}{2011/10/10}
%	{Introduced for the implementation of the new API command
%	 \cs{synccounter}.} 
% 
% The macro $\!\pcol@com@synccounter!\<\theta\>$, the implementation of the
% \elocal{} API macro \!\synccounter!, lets $\val_c(\theta)=\Val(\theta)$
% for all $c\In0\C$.  That is, the value of the counter $\theta$ is {\em
% broadcasted} to all columns for the {\em\Uidx\csync} of $\theta$.  This
% broadcast is done by \!\pcol@synccounter! with an argument
% $\!\@elt!|{|\theta|}|$ so that it works only on $\theta$.
% 
%    \begin{macrocode}
\def\pcol@com@synccounter#1{\pcol@synccounter{\@elt{#1}}}
%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@synccounter}
% \changes{v1.0}{2011/10/10}
%	{Introduced for \cs{synccounter} and inter-environment local counter
%	 conservation.}
% \begin{macro}{\pcol@syncctrelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced for \cs{synccounter} and inter-environment local counter
%	 conservation.}
% 
% The macro $\!\pcol@synccounter!\arg{lst}$ is invoked from \!\paracol! with
% $\arg{lst}=\!\@gtempa!$ and from $\!\pcol@com@synccounter!\arg{ctr}$ with
% $\arg{lst}=\!\@elt!\Arg{ctr}$, to let $\val_c(\theta)=\Val(\theta)$ for
% all $c\In0\C$ and all $\theta$ in $\arg{lst}$.  To do that, at first we
% move $\arg{lst}$ into \!\reserved@a! in order to make \!\@gtempa! free so
% that it can be used in \!\pcol@storecounters!.  Next, for each $c\In0\C$,
% we let $v(\cl)=\val_c(\cl)$ by applying \!\pcol@loadctrelt! to all
% $\<\cl,\val_c(\cl)\>\in\Cc_c$, then scan $\arg{lst}$ applying
% $\!\pcol@syncctrelt!\<\theta\>$ for each $\theta$ in $\arg{lst}$ to let
% $v(\theta)=\Val(\theta)$, and finally store all $v(\cl)$ back to $\Cc_c$
% by \!\pcol@storecounters!, where $v(\theta)$ is
% $|\pcol@ctr@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
% 
%    \begin{macrocode}
\def\pcol@synccounter#1{{%
  \let\@elt\relax \edef\reserved@a{#1}%
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
    \let\@elt\pcol@loadctrelt \@nameuse{pcol@counters\number\pcol@currcol}%
    \let\@elt\pcol@syncctrelt\reserved@a
    \pcol@storecounters
    \advance\pcol@currcol\@ne}}}
\def\pcol@syncctrelt#1{%
    \expandafter\edef\csname pcol@ctr@#1\endcsname{\number\@nameuse{c@#1}}}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\syncallcounters}
% \changes{v1.0}{2011/10/10}
%	{Introduced as an environment-local API command.}
% \begin{macro}{\pcol@com@syncallcounters}
% \changes{v1.0}{2011/10/10}
%	{Introduced for the implementation of the new API command
%	 \cs{syncallcounters}.} 
% 
% The macro \!\pcol@com@syncallcounters!, the implementation of the
% \elocal{} API macro \!\syncallcounters! makes all \lcounter{}s in all
% columns have the value in the current column.  That is, for each
% $c\In0\C$, we invoke \!\pcol@savecounters! to let $\val_c(\cl)=\Val(\cl)$
% for all $\cl\in\CL$.
% 
%    \begin{macrocode}
\def\pcol@com@syncallcounters{{%
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
    \pcol@savecounters \advance\pcol@currcol\@ne}}}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@setctrelt}
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{setcounter} with direct assignment with \cs{csname} and
%	 \cs{endcsname}}
% 
% The macro $\!\pcol@setctrelt!\<\cl\>\<\val_c(\cl)\>$ is solely inovked
% from \!\pcol@switchcol! to swich to a column $c$ and is applied to each
% $\<\cl,\val_c(\cl)\>\in\Cc_c$ to let $\Val(\cl)=\val_c(\cl)$ \!\global!ly.
% It also define the \lrep{} of $\cl$, being $|\the|{\cdot}\cl$,
% 
% \SpecialArrayIndex{\theta}{\the}
% 
% to be $|\pcol@thectr@|{\cdot}\cl{\cdot}c$
% 
% \SpecialArrayIndex{\theta{\cdot}c}{\pcol@thectr@}
% 
% if it is defined, or otherwise to be $|\pcol@thectr@|{\cdot}\cl$ which keeps
% the original $|\the|{\cdot}\cl$.
% 
% \SpecialArrayIndex{\theta}{\the}
% 
% This \lrep{} definition is done by a lengthy sequence with many occurences
% of \!\expandafter!, \!\csname! and \!\endcsname!, but it is equivalent to
% the followings.
% 
% \begin{quote}
% $\CSIndex{ifx}|\pcol@thectr@|{\cdot}\cl{\cdot}c\!\relax!| |
%     \!\let!|\the|{\cdot}\cl|=\pcol@thectr@|{\cdot}\cl$\\
% $|\else |\!\let!|\the|{\cdot}\cl|=\pcol@thectr@|{\cdot}\cl{\cdot}c$\\
% |\fi|
% \end{quote}
% % 
%    \begin{macrocode}
\def\pcol@setctrelt#1#2{%
  \global\csname c@#1\endcsname#2\relax
  \expandafter\ifx\csname pcol@thectr@#1\number\pcol@currcol\endcsname\relax
    \expandafter\let\expandafter\reserved@a\csname pcol@thectr@#1\endcsname
  \else
    \expandafter\let\expandafter\reserved@a
      \csname pcol@thectr@#1\number\pcol@currcol\endcsname
  \fi
  \expandafter\let\csname the#1\endcsname\reserved@a}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@stepcounter}
% \changes{v1.0}{2011/10/10}
%	{Change the order of operations.}
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{csname}/\cs{endcsname} with \cs{@nameuse}.}
% 
% \begin{macro}{\pcol@stpldelt}
% \begin{macro}{\pcol@stpclelt}
% The macro $\!\pcol@stepcounter!\<\cg\>$ is invoked from
% $\!\stepcounter!\<\cg\>$ for a \gcounter{} $\cg$ because
% $|\cl@|{\cdot}\cg$
% 
% \SpecialArrayIndex{\theta}{\cl@}
% 
% is modified by \!\pcol@remctrelt! so as to invoke this macro to zero-clear
% \lcounter{}s $\theta\in\clist(\cg)$.  To do that, we do the followings in
% a group for each $c\In0\C$.  First we apply
% $\!\pcol@stpldelt!\<\cl\>\<\val_c(\cl)\>$ to each
% $\<\cl,\val_c(\cl)\>\in\Cc_c$ to let $\Val(\cl)=\val_c(\cl)$ locally.
% Then we apply $\!\pcol@stpclelt!\<\theta\>$ to each $\theta\in\clist(\cg)$
% to let $\Val(\theta)=0$.  Finally, we invoke \!\pcol@savecounters! to let
% $\val_c(\cl)=\Val(\cl)$ for all $\cl\in\CL$ to reflect the zero-clear of
% $\theta\in\clist(\cg)$.
% 
% After the operations above, we apply $\!\@stpelt!\<\theta\>$ to each
% $\theta\in\clist(\cg)$ for \!\global! zero-clearing.
% 
%    \begin{macrocode}
\def\pcol@stepcounter#1{\begingroup
  \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
    \let\@elt\pcol@stpldelt \@nameuse{pcol@counters\number\pcol@currcol}%
    \let\@elt\pcol@stpclelt \@nameuse{pcol@cl@#1}%
    \pcol@savecounters
   \advance\pcol@currcol\@ne}%
  \endgroup
  \let\@elt\@stpelt \@nameuse{pcol@cl@#1}}
\def\pcol@stpldelt#1#2{\csname c@#1\endcsname#2\relax}
\def\pcol@stpclelt#1{\csname c@#1\endcsname\z@}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}
% 
% 
% 
% \section{Column-Switching Commands and Environments}
% \label{sec:imp-switch}
% 
% \begin{macro}{\pcol@par}
% \changes{v1.0}{2011/10/10}
%	{Introduced for \cs{par}-if-necessary operation.}
% 
% Before giving the definition of \cswitch{} commands and environments, we
% define a commonly used macro \!\pcol@par!, which do \CSIndex{par} if
% necessary, i.e., we are not in vertical mode.  The reason why we don't
% simply do \CSIndex{par} is that it may have some definition different from
% \!\@@par! and thus an incautious repetition of \CSIndex{par} may cause
% undesirable results.  This macro is used in \!\pcol@com@switchcolumn!,
% \!\pcol@mctext!, \!\pcol@com@endcolumn!, \!\pcol@com@flushpage!,
% \!\pcol@com@clearpage! and \!\endparacol!.
% 
%    \begin{macrocode}
%% Column-Switching Commands and Environments

\def\pcol@par{\ifvmode\else \par \fi}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\switchcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@switchcolumn} for localization.}
% \begin{macro}{\pcol@com@switchcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implementation of \cs{switchcolumn}.}
% \changes{v1.0}{2011/10/10}
%	{Add \cs{pcol@defcolumn} to clarify the behavior of \texttt{column}.}
% \begin{macro}{\pcol@switchcolumn}
% \changes{v1.0}{2011/10/10}
%	{Add the check of $d\geq0$.}
% 
% \begin{macro}{\pcol@iswitchcolumn}
% The macro $\!\pcol@com@switchcolumn!|[|d|]|$, the implementation of the
% \elocal{} API macro \!\switchcolumn!, switches to the column $d$ if provided
% through its optional argument, or to $d=(c+1)\bmod\C$ otherwise where $c$
% is the ordinal of the current column.  After making it sure to be in
% vertical mode by \!\pcol@par!, it invokes \!\pcol@defcolumn! to give
% \!\pcol@com@column!(|*|) their
% \!\def!initions for occurences not as the very first \cswitch{} command
% nor environment of \env{paracol} environment.  Then, after calculating
% $d=(c+1)\bmod\C$, this macro simply invokes
% $\!\pcol@switchcol!|[|d|]|$ with or without the calculated $d$
% depending on the existance of the optional argument delimitor `|[|'.
% 
% The macro $\!\pcol@switchcol!|[|d|]|$ lets $\!\pcol@nextcol!=d$ and
% confirms $0\leq d<\C$ or abort the execution by \!\PackageError! if it
% does not hold.  Then it invokes \!\pcol@iswitchcolumn! if
% $\!\switchcolumn!|[|d|]|$ is followed by a `|*|', or \!\pcol@switchcol!
% othewise.
% 
% The macro $\!\pcol@iswitchcolumn!|[|\arg{txt}|]|$ invokes
% $\!\pcol@mctext!|[|\arg{txt}|]|$ if the optional argument is provided, or
% \!\pcol@switchcol! otherwise, after letting $\CSIndex{ifpcol@sync}=\true$
% for \exsync{}.
% 
%    \begin{macrocode}
\def\pcol@com@switchcolumn{\pcol@par
  \pcol@defcolumn
  \@tempcnta\pcol@currcol \advance\@tempcnta\@ne
  \ifnum\@tempcnta<\pcol@ncol\else \@tempcnta\z@ \fi
  \@ifnextchar[%]
    \pcol@switchcolumn{\pcol@switchcolumn[\@tempcnta]}}
\def\pcol@switchcolumn[#1]{%
  \pcol@nextcol#1\relax
  \@tempswafalse
  \ifnum#1<\z@ \@tempswatrue \fi
  \ifnum#1<\pcol@ncol\else \@tempswatrue \fi
  \if@tempswa
    \PackageError{paracol}{%
      Column number \number#1 must be less than\number\pcol@ncol}\@eha
    \pcol@nextcol\z@
  \fi
  \@ifstar\pcol@iswitchcolumn\pcol@switchcol}
\def\pcol@iswitchcolumn{%
  \global\pcol@synctrue
  \@ifnextchar[%]
    \pcol@mctext\pcol@switchcol}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@mctext}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{long} to allow \cs{par} in its argument.}
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{par} with \cs{pcol@par}.}
% \changes{v1.0}{2011/10/10}
%	{Add $\cs{ifpcol@mctexttrue}\EQ\mathit{true}$ for restriction of the
%	 broadcast of \cs{if@nobreak} and \cs{everypar}.}
% 
% The macro $\!\pcol@mctext!|[|\arg{txt}|]|$ is invoked from \!\paracol! and
% \!\pcol@iswitchcolumn! to put a \Uidx\mctext{} $\arg{txt}$ given as the
% optional argument of the former and \!\switchcolumn!|*|.  The macro has
% \!\long!  attribute because the \mctext{} may have \CSIndex{par}.  Since
% the text is put in the column 0 always, we switch to the column by
% \!\pcol@switchcol! turning $\CSIndex{ifpcol@sync}=\true$ to set a
% \sync{}ation point above the text, afetr saving the target column
% $d=\!\pcol@nextcol!$ in \!\@tempcnta!.  Then the text is put in a group in
% which we let $\!\hsize!=\!\textwidth!$ to let \mctext{} span across all
% columns, and $\!\col@number!=1$ to ensure again that \!\maketitle!
% produces a title without \!\twocolumn! if it is in the \mctext.  Then,
% after invoking \!\pcol@par! to ensure to be in vertical mode, we let
% $\CSIndex{pcol@mctext}=\true$ so that \!\pcol@output@switch!  broadcasts
% $\CSIndex{if@nobreak}$ if true and \!\everypar! which is \!\global!ized by
% a sequence with three \!\expandafter!.  Finally after closing the group,
% we let $\!\pcol@nextcol!=d$ and $\CSIndex{pcol@sync}=\true$ to set another
% \sync{}ation point below the \mctext, and then invoke \!\pcol@switchcol!
% to switch the coloumn $d$.
% 
%    \begin{macrocode}
\long\def\pcol@mctext[#1]{%
  \@tempcnta\pcol@nextcol
  \global\pcol@synctrue \pcol@nextcol\z@
  \pcol@switchcol
  \begingroup
    \hsize\textwidth \col@number\@ne #1\pcol@par
    \global\pcol@mctexttrue
    \expandafter\global\expandafter\everypar\expandafter{\the\everypar}%
  \endgroup
  \pcol@nextcol\@tempcnta \global\pcol@synctrue \pcol@switchcol}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@switchcol}
% \changes{v1.0}{2011/10/10}
%	{Add \cs{pcol@aconly} for disabling \cs{addcontentsline}.}
% 
% The macro \!\pcol@switchcol! is invoked from \!\pcol@switchcolumn!,
% \!\pcol@iswitchcolumn!, \!\pcol@mctext! and \!\endparacol! to switch the
% column $d=\!\pcol@nextcol!$.  First, we save \lcounter{}s in the current
% column $c$ into $\Cc_c$ by \!\pcol@savecounters!.  Next, we make an
% \!\output! request with $\!\penalty!=\!\pcol@op@switch!$ to invoke
% \!\pcol@output@switch! by \!\pcol@invokeoutput! to switch to the column
% $d$.
% 
% Then we let $\CSIndex{if@firstcolumn}$ be $\true$ or $\false$ according to
% $d=0$ or not respectively, so that \!\marginpar! produces marginal notes
% appropriately.  Then we scan $\Cc_d$ applying \!\pcol@setctrelt! to each
% $\<\cl,\val_d(\cl)\>\in\Cc_d$ to let $\Val(\cl)=\val_d(\cl)$.  We also
% scan $\T=\!\pcol@aconly!$ applying \!\pcol@aconlyelt! to each
% $\<t_c,c\>\in T$ to inhibit \!\addcontentsline! to the contents file of
% type $t_d$ as specified so by $\!\addcontentsonly!\arg{t_d}\arg{d}$.
% Finally, we let $\!\@elt!=\!\relax!$ to make it sure that any lists can be
% manipulated without unexpected application of a macro to their elements.
% 
%    \begin{macrocode}
\def\pcol@switchcol{%
  \pcol@savecounters
  \pcol@invokeoutput\pcol@op@switch
  \ifnum\pcol@currcol=\z@ \global\@firstcolumntrue
  \else                   \global\@firstcolumnfalse
  \fi
  \let\@elt\pcol@setctrelt
  \csname pcol@counters\number\pcol@currcol\endcsname
  \let\@elt\pcol@aconlyelt \pcol@aconly
  \let\@elt\relax}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\column}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@column} for localization.}
% \begin{macro}{\column*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@column*} for localization.}
% \begin{macro}{\pcol@com@column}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{column}.}
% \begin{macro}{\pcol@com@column*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{column*}.}
% \begin{macro}{\pcol@defcolumn}
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{column} with \cs{pcol@com@column} and \cs{switchcolumn}
%	 with \cs{pcol@switchenv}.}
% 
% The macros \!\pcol@com@column!(|*|), the implementations of the \elocal{}
% API commands \!\column!(*), starts the environment \Midx{\env{column}}.
% Basically, the macros do \!\switchcolumn!\~(|*|), but if the environment
% starts just after \beginparacol{} the macro have to switch to the column
% 0.  Therefore, the definitions for this very-beginning appearance are
% given in \!\paracol! to do (almost) nothing, and then those for other ones
% are given by \!\pcol@defcolumn! invoked in \!\pcol@com@switchcolumn!  to 
% invoke \!\pcol@switchenv!|{column|(|*|)|}|(|*|) which then invokes
% \!\switchcolumn!.  Note that the definition
% of non-starred \!\pcol@com@column! has \!\relax!  after the invocatoin of
% \!\pcol@switchenv!  so that \!\@ifnextchar! and \!\@ifstar! to examine the
% existence of `|[|' and `|*|' definitely tell us no even if the body of the
% environment starts with a `|[|' or `|*|'.
% 
%    \begin{macrocode}
\def\pcol@defcolumn{%
  \gdef\pcol@com@column{\pcol@switchenv{column}\relax}%
  \global\@namedef{pcol@com@column*}{\pcol@switchenv{column*}*}}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\nthcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@nthcolumn} for localization.}
% \begin{macro}{\nthcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@nthcolumn*} for localization.}
% \begin{macro}{\pcol@com@nthcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{nthcolumn} with the
%	 inhibitation of column-switching in the environment.}
% \begin{macro}{\pcol@com@nthcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{nthcolumn*} with the
%	 inhibitation of column-switching in the environment.}
% \begin{macro}{\leftcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@leftcolumn} for localization.}
% \begin{macro}{\leftcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@leftcolumn*} for localization.}
% \begin{macro}{\pcol@com@leftcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{leftcolumn} with the
%	 inhibitation of column-switching in the environment.}
% \begin{macro}{\pcol@com@leftcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{leftcolumn*} with the
%	 inhibitation of column-switching in the environment.}
% \begin{macro}{\rightcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@rightcolumn} for localization.}
% \begin{macro}{\rightcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@rightcolumn*} for localization.}
% \begin{macro}{\pcol@com@rightcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{rightcolumn} with the
%	 inhibitation of column-switching in the environment.}
% \begin{macro}{\pcol@com@rightcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{rightcolumn*} with the
%	 inhibitation of column-switching in the environment.}
% 
% The macros $\!\pcol@com@nthcolumn!(|*|)\arg{d}$,
% \!\pcol@com@leftcolumn!(|*|) and |\pcol@com@right|\~|column|(|*|) are the
% implementations of \elocal{} API macros \!\nthcolumn!(|*|)$\arg{d}$,
% \!\leftcolumn!(|*|) and \!\rightcolumn!(|*|) respectively.  They start
% corresponding environments \Midx{\env{nthcolumn}}, \Midx{\env{leftcolumn}}
% and \Midx{\env{rightcolumn}} simply invoking
% \!\pcol@switchenv!$\Arg{env}$(|*|), where $\arg{env}$ is the name of each
% environment, giving it $d$, 0 and 1 repectively as its optional argument
% for the target column.
% 
%    \begin{macrocode}
\def\pcol@com@nthcolumn#1{\pcol@switchenv{nthcolumn}[#1]\relax}
\@namedef{pcol@com@nthcolumn*}#1{\pcol@switchenv{nthcolumn*}[#1]*}
\def\pcol@com@leftcolumn{\pcol@switchenv{leftcolumn}[0]\relax}
\@namedef{pcol@com@leftcolumn*}{\pcol@switchenv{leftcolumn*}[0]*}
\def\pcol@com@rightcolumn{\pcol@switchenv{rightcolumn}[1]\relax}
\@namedef{pcol@com@rightcolumn*}{\pcol@switchenv{rightcolumn*}[1]*}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@switchenv}
% \changes{v1.0}{2011/10/10}
%	{Introduced to inhibit column-switching in the environment.}
% 
% The macro $\!\pcol@switchenv!\arg{env}$ is invoked from
% $|\pcol@com@|{\cdot}\arg{env}$ where $\arg{env}\in
% \{\env{column}\~(|*|),\env{nthcolumn}(|*|),\env{leftcolumn}(|*|),
% \env{rightcolumn}(|*|)\}$ to invoke \!\switchcolumn! with the arguments
% following $\arg{env}$ given by the invoker macros.  Before invoking
% \!\switchcolumn!, we save it in \!\reserved@a! for the invocation and
% re\!\def!ine it so that it will complain the illegal usage of \cswitch{}
% commands\slash environments in the environment $\arg{env}$ by
% \!\PackageError!.
% 
%    \begin{macrocode}
\def\pcol@switchenv#1{\let\reserved@a\switchcolumn
  \def\switchcolumn{\PackageError{paracol}{%
    Column swicthing commands and environments cannot be used in #1}\@eha}
  \reserved@a}

%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\endcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endcolumn} for localization.}
% \begin{macro}{\endcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endcolumn*} for localization.}
% \begin{macro}{\pcol@com@endcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endcolumn} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\pcol@com@endcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endcolumn*} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\endnthcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endnthcolumn} for localization.}
% \begin{macro}{\endnthcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endnthcolumn*} for
%	 localization.}
% \begin{macro}{\pcol@com@endnthcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endnthcolumn} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\pcol@com@endnthcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endnthcolumn*} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\endleftcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endleftcolumn} for
%	 localization.} 
% \begin{macro}{\endleftcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endleftcolumn*} for
%	 localization.}
% \begin{macro}{\pcol@com@endleftcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endleftcolumn} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\pcol@com@endleftcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endleftcolumn*} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\endrightcolumn}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endrightcolumn} for
%	 localization.}
% \begin{macro}{\endrightcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@endrightcolumn*} for
%	 localization.}
% \begin{macro}{\pcol@com@endrightcolumn}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endrightcolumn} with the
%	 globalizatoin of \cs{everypar}.}
% \begin{macro}{\pcol@com@endrightcolumn*}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{endrightcolumn*} with the
%	 globalizatoin of \cs{everypar}.}
% 
% The macro \!\pcol@com@endcolumn! is the implementation of the \elocal{}
% API macro \!\endcolumn! to close \env{column} environment.  The macro
% makes it sure we are in vertical mode by \!\pcol@par! and \!\global!ize
% \!\everypar! so that it is saved in $\cc_c(\ep)$ of the current column
% $c$ on the switch to another column.  The macro also gives the commmon
% definition of \!\pcol@com@endcolumn*!  for \!\endcolumn*!,
% \!\pcol@com@endnthcolumn!(|*|) for \!\endnthcolumn!(|*|),
% \!\pcol@com@endleftcolumn!(|*|) for \!\endleftcolumn!(|*|), and
% \!\pcol@com@endrightcolumn!(|*|) for \!\endrightcolumn!(|*|).
% 
%    \begin{macrocode}
\def\pcol@com@endcolumn{\pcol@par
  \expandafter\global\expandafter\everypar\expandafter{\the\everypar}}
\expandafter\let\csname pcol@com@endcolumn*\endcsname\pcol@com@endcolumn
\let\pcol@com@endnthcolumn\pcol@com@endcolumn
\expandafter\let\csname pcol@com@endnthcolumn*\endcsname\pcol@com@endcolumn
\let\pcol@com@endleftcolumn\pcol@com@endcolumn
\expandafter\let\csname pcol@com@endleftcolumn*\endcsname\pcol@com@endcolumn
\let\pcol@com@endrightcolumn\pcol@com@endcolumn
\expandafter\let\csname pcol@com@endrightcolumn*\endcsname\pcol@com@endcolumn

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}\end{macro}
% 
% 
% 
% \section{Disabing \cs{addcontentsline}}
% \label{sec:imp-aconly}
% 
% \begin{macro}{\addcontentsonly}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@aconly}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% 
% The API macro $\!\addcontentsonly!\arg{t}\arg{c}$ makes the type $t$
% contents file written by commands appearing only in the column $c$.  The
% macro simply add the pair $\<t,c\>$ to the list $\Uidx\T=\!\pcol@aconly!$
% being empty at initial, after confirming we know the type $t$, one of
% |toc|, |lof| and |lot| so far, by the fact $|\pcol@ac@def|{\cdot}t$ is
% defined, or abort execution by \!\PackageError!.
% 
%    \begin{macrocode}
%% Disabling \addcontentsline

\def\addcontentsonly#1#2{%
  \@ifundefined{pcol@ac@def@#1}
    {\PackageError{paracol}{Unknown contents type #1}\@eha}\relax
  \@cons\pcol@aconly{{#1}{#2}}}
\gdef\pcol@aconly{}

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@aconlyelt}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% 
% The macro $\!\pcol@aconlyelt!\arg{t_d}\arg{d}$ is invoked solely in
% \!\pcol@switchcol!  for the \cswitch{} to column $c$, and is applied to
% each $\<t_d,d\>\in\T$ to enable \!\addcontentsline! for $t$ if $d=c$ by
% the invocation of $|\pcol@ac@def@|{\cdot}t$ with an argument |enable|, or
% to disable if $d\neq c$ with |disable|.
% 
%    \begin{macrocode}
\def\pcol@aconlyelt#1#2{%
  \ifnum#2=\pcol@currcol \@nameuse{pcol@ac@def@#1}{enable}%
  \else \@nameuse{pcol@ac@def@#1}{disable}%
  \fi}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\pcol@gobblethree}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@addcontentsline}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% 
% \hfuzz0.39pt
% The macro $\!\pcol@gobblethree!\arg{file}\arg{sec}\arg{entry}$ is used in
% \!\pcol@ac@disable@toc! and \!\pcol@ac@caption! to make
% \!\addcontentsline! \!\let!-equal to this macro, which does nothing but
% discarding three arguments, for disabling.  The macro
% \!\pcol@addcontentsline! is the \LaTeX's original \!\addcontentsline! and
% is used in the macros mentioned above to let \!\addcontentsline! act as
% original.
% 
%    \begin{macrocode}
\def\pcol@gobblethree#1#2#3{}
\let\pcol@addcontentsline\addcontentsline

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% \begin{macro}{\pcol@ac@def@toc}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@enable@toc}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@disable@toc}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% 
% The macro $\!\pcol@ac@def@toc!\arg{eord}$ is invoked solely in
% $\!\pcol@aconlyelt!|{toc}|\arg{c}$ to enable or disable
% \!\addcontentsline! according to $\arg{eord}$ by making \!\@sect!
% \!\let!-equal to \!\pcol@ac@enable@toc! which is the \LaTeX's original
% \!\@sect!, or to \!\pcol@ac@disable@toc! respectively.  The macro
% $\!\pcol@ac@disable@toc!
% \<a_1\>\<a_2\>\<a_3\>\<a_4\>\<a_5\>\<a_6\>|[|\<a_7\>|]|\<a_8\>$ at first
% disables \!\addcontentsline! by making it \!\let!-equal to
% \!\pcol@gobblethree!, then invokes the original \!\@sect! saved in
% \!\pcol@ac@enable@toc! ginving it all arguments $a_1$ to $a_8$, and
% finally enables it by making it \!\let!-equal to \!\pcol@addcontentsline!.
% Note that the argument $a_7$ is surrounded by |{| and |}| on the
% invocation of \!\@sect! to conceal `|]|' in $a_7$.
% 
%    \begin{macrocode}
\def\pcol@ac@def@toc#1{%
  \expandafter\let\expandafter\@sect\csname pcol@ac@#1@toc\endcsname}
\let\pcol@ac@enable@toc\@sect
\def\pcol@ac@disable@toc#1#2#3#4#5#6[#7]#8{%
  \let\addcontentsline\pcol@gobblethree
  \pcol@ac@enable@toc{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
  \let\addcontentsline\pcol@addcontentsline}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@ac@def@lof}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@def@lot}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@caption@enable}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@caption@disable}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@caption@def}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@caption@if@lof}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@caption@if@lot}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% 
% The macro $\!\pcol@ac@def@lof!\arg{eord}$ and
% $\!\pcol@ac@def@lot!\arg{eord}$ are invoked solely in
% $\!\pcol@aconlyelt!\<t_c\>\<c\>$ when $t_c$ is |lof| or |lot|
% respectively.  They invoke \!\pcol@ac@caption@enable!$\<t\>$ or
% $\!\pcol@ac@caption@disable!\<t\>$ according to $\arg{eord}$, and then
% these macros invoke $\!\pcol@ac@caption@def!\<s\>\<t\>$ where
% $s=\!\@tempswatrue!$ or $s=\!\@tempswafalse!$ respectievely to let
% $\!\@caption!=\!\pcol@ac@caption!$ and $|\pcol@ac@caption@if@|{\cdot}t=s$
% which are \!\let!-equal to \!\@tempswatrue! in default.  That is,
% $|\pcol@ac@catption@if@|{\cdot}t$ lets $\CSIndex{if@tempswa}={}\true$ iff
% \!\addcontentsline! for $t$ is to be enable.
% 
%    \begin{macrocode}
\def\pcol@ac@def@lof#1{\@nameuse{pcol@ac@caption@#1}{lof}}
\def\pcol@ac@def@lot#1{\@nameuse{pcol@ac@caption@#1}{lot}}
\def\pcol@ac@caption@enable{\pcol@ac@caption@def\@tempswatrue}
\def\pcol@ac@caption@disable{\pcol@ac@caption@def\@tempswafalse}
\def\pcol@ac@caption@def#1#2{\let\@caption\pcol@ac@caption
 \expandafter\let\csname pcol@ac@caption@if@#2\endcsname#1}
\let\pcol@ac@caption@if@lof\@tempswatrue
\let\pcol@ac@caption@if@lot\@tempswatrue
%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}
% 
% \begin{macro}{\pcol@ac@caption}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% \begin{macro}{\pcol@ac@caption@latex}
% \changes{v1.0}{2011/10/10}
%	{Introduced for disabling \cs{addcontentsline}.}
% 
% The macro $\!\pcol@ac@caption!\arg{type}|[|\arg{lcap}|]|\<cap\>$ is made
% \!\let!-equal to \!\@caption! by \!\pcol@ac@caption@def! to do what
% \!\@caption! do but with enabling\slash disabling \!\addcontentsline!.  At
% first, it invokes $|\pcol@ac@cation@if@|{\cdot}t$ where
% $t=|\ext@|{\cdot}\arg{type}$
% 
% \SpecialIndex{\ext@figure}\SpecialIndex{\ext@table}
% 
% to let \CSIndex{if@tempswa} be $\true$ or $\false$ according to the
% enable\slash disable status of $t$.  Then, after letting
% $\!\addcontentsline!=\!\pcol@gobblethree!$ for disabing if $\false$, we
% invoke \!\pcol@ac@caption@latex!, being the \LaTeX's orignial \!\@caption!,
% giving all three arguments of \!\pcol@ac@caption! itself surrounding
% $\arg{lcap}$ with |{| and |}| for the concealment of `|]|'.  Finally, we
% let $\!\addcontentsline!=\!\pcol@addcontentsline!$ so that other macros
% uses it with its original definition.
% 
%    \begin{macrocode}
\long\def\pcol@ac@caption#1[#2]#3{%
  \@nameuse{pcol@ac@caption@if@\@nameuse{ext@#1}}%
  \if@tempswa\else \let\addcontentsline\pcol@gobblethree \fi
  \pcol@ac@caption@latex{#1}[{#2}]{#3}%
  \let\addcontentsline\pcol@addcontentsline}
\let\pcol@ac@caption@latex\@caption

%    \end{macrocode}
% \end{macro}\end{macro}
% 
% 
% 
% \section{Page Flushing Commands}
% \label{sec:imp-flush}
% 
% \begin{macro}{\flushpage}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@flushpage} for
%	 localization.}
% \begin{macro}{\pcol@com@flushpage}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{flushpage} with the
%	 replacement of \cs{par} with \cs{pcol@par}.}
% \begin{macro}{\clearpage}
% \changes{v1.0}{2011/10/10}
%	{Made \cs{let}-equal to \cs{pcol@com@clearpage} for
%	 localization.}
% \begin{macro}{\pcol@com@clearpage}
% \changes{v1.0}{2011/10/10}
%	{Introduced as the implemenatation of \cs{clearpage} with the
%	 replacement of \cs{par} with \cs{pcol@par}.}
% 
% The macros \!\pcol@com@flushpage! and \!\pcol@com@clearpage! are the
% implementations of \elocal{} API macro \!\flushpage! and \!\clearpage!
% respectively.  They have a common structure in which we at first invoke
% \!\pcol@par! to make it sure to be in vertical mode, let
% $\!\pcol@nextcol!=\!\pcol@currcol!$ to stay in the current column, and then
% make an \!\output! request by \!\pcol@invokeoutput! with \!\penalty! being
% \!\pcol@op@flush! or \!\pcol@op@clear! according to the commands.
% 
%    \begin{macrocode}
%% Page Flushing Commands

\def\pcol@com@flushpage{\pcol@par
  \pcol@nextcol\pcol@currcol
  \pcol@invokeoutput\pcol@op@flush}
\def\pcol@com@clearpage{\pcol@par
  \pcol@nextcol\pcol@currcol
  \pcol@invokeoutput\pcol@op@clear}

%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% 
% 
% 
% \section{Closing Environment}
% \label{sec:imp-end}
% 
% \begin{macro}{\endparacol}
% \changes{v1.0}{2011/10/10}
%	{Replace \cs{par} with \cs{pcol@par}.}
% 
% The macro \!\endparacol! is invoked from \Endparacol{} to close
% \env{paracol} environment.  After making it sure to be in vertical mode by
% \!\pcol@par!, we switch to the column 0 by \!\pcol@switchcol! to let
% \lcounter{} have the values for the column 0 so that they are referred to
% outside the environment.  Then we make an \!\output! request by
% \!\pcol@invokeoutput! with $\!\penalty!=\!\pcol@op@end!$.  Next, we let
% \!\columnwidth!, \!\hsize! and \!\linewidth! commonly be \!\textwidth!
% for single-column typesetting and also let
% $\CSIndex{if@twocolumn}=\false$.  Finally, we let
% $\!\topskip!=\!\pcol@topskip!$ to make it sure that the parameter has the
% value used outside in \env{paracol} environment.
% 
%    \begin{macrocode}
%% Closing Environment

\def\endparacol{\pcol@par
  \pcol@nextcol\z@ \pcol@switchcol
  \pcol@invokeoutput\pcol@op@end
  \global\columnwidth\textwidth
  \global\hsize\columnwidth
  \global\linewidth\columnwidth
  \global\@twocolumnfalse
  \global\topskip\pcol@topskip}
%    \end{macrocode}
% \end{macro}
%\iffalse
%</paracol>
%\fi
\endinput