summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/floatrow/floatrow.dtx
blob: 904d61654c25ef958d4e226563fd71fad316e3b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
% \iffalse
%    floatrow.dtx - The floatrow package (extension of float package)
%    (c) 2004-2007 Olga Lapko (Lapko.O@g23.relcom.ru http://www.ru.net/~Lapko.O/)
%
%    This package borrowed code (core parts) from:
%    float package 2001/11/08 v1.3d,
%       Copyright (c) 1991-2000 Anselm Lingnau
%    rotfloat package, 2002/02/02 v1.1,
%       Copyright (c) 1995-2002 Axel Sommerfeldt
%
%    During creation of floatsetup stuff there was borrowed code structure
%    from caption package v3.x ((c) 1994-2007 Axel Sommerfeldt)
%
%    This program is provided under the terms of the
%    LaTeX Project Public License distributed from CTAN
%    archives in directory macros/latex/base/lppl.txt.
%
%<*dtx>
          \ProvidesFile{floatrow.dtx}
%</dtx>
%<floatrow,frfancy,floatpagestyle,listpen,frforsubfig,forlongtable>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<floatrow>\ProvidesPackage{floatrow}
%<frfancy>\ProvidesPackage{fr-fancy}
%<floatpagestyle>\ProvidesPackage{floatpagestyle}
%<listpen>\ProvidesPackage{listpen}
%<frforsubfig>\ProvidesPackage{fr-subfig}
%<forlongtable>\ProvidesPackage{fr-longtable}
%
%         \ProvidesFile{floatrow.dtx}
%<floatrow>       [2008/08/02 v0.3b floatrow: float package extension]
%<frfancy>       [2007/11/28 v0.1i floatrow: fancy boxes]
%<floatpagestyle>       [2005/10/02 v0.1h floating page style]
%<listpen>       [2007/10/28 v0.1d list penalty managing]
%<frforsubfig>       [2007/12/24 v0.1g (beta) floatrow: additions for subfig]
%<forlongtable>       [2007/11/28 v0.1b (beta) floatrow: additions for longtable]
%
%<*driver>
\input pictures
\documentclass[twoside]{ltxdoc}

\makeatletter%^^A -----------------------

\usepackage{calc}
\usepackage{tabularx,array}

\ifx\pdfoutput\undefined \else
  \ifcase\pdfoutput \else
    \usepackage{mathptm}\def\ttdefault{pxtt}
    \usepackage[scaled=0.90]{helvet}
  \fi
\fi
\settowidth\marginparwidth{\texttt{0DeclareFloatFootnoterule}}
\advance\oddsidemargin.25\marginparwidth
\evensidemargin\oddsidemargin

\IfFileExists{titlesec.sty}{\usepackage[raggedright]{titlesec}}{}
\let\FRorisection\section
\let\FRorisubsection\subsection
\let\FRorisubsubsection\subsubsection
\def\section{\RestoreSpaces\FRorisection}
\def\subsection{\RestoreSpaces\FRorisubsection}
\def\subsubsection{\RestoreSpaces\FRorisubsubsection}

\IfFileExists{footmisc.sty}{\usepackage[perpage]{footmisc}}{}

\IfFileExists{fancyhdr.sty}{\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}\fancyfoot{}
\fancyhead[LE]{\setlength{\dimen@}{\marginparwidth+\marginparsep}%^^A
          \leavevmode\hbox to\dimen@{\normalsize\bfseries\thepage\hfil}
          \ignorespaces{\nouppercase\leftmark}\hfil\strut}
\fancyhead[LO]{\setlength{\dimen@}{\marginparwidth+\marginparsep}%^^A
          \leavevmode\hbox to\dimen@{}
          \ignorespaces{\nouppercase\rightmark}\hfill
          \hbox to2em{\hfil\normalsize\bfseries\thepage}\strut}
\fancyheadoffset[L]{\marginparwidth+\marginparsep}
}{}

\usepackage[font=small,labelfont=bf,labelsep=period,
            justification=centerlast]
            {caption}[2007/04/11]
\usepackage[format=default,justification=centerlast,
            labelfont=up,captionskip=5pt]
            {subfig}[2005/06/28]

\IfFileExists{rotating.sty}{\usepackage[figuresright]{rotating}}{}

\usepackage{longtable}
\usepackage{wrapfig}
%\usepackage{psfrag}
\usepackage[vflt]{floatflt}
\usepackage{picins}
%^^A\RequirePackage[writefile]{listings}[2004/09/07]

\usepackage[font=small,captionskip=5pt,
   footskip=.5\skip\footins,footnoterule=fullsize,
   floatrowsep=qquad,capbesidesep=quad,capbesideposition=inside,
   facing=yes,floatHaslist=yes,doublefloataswide=yes]{floatrow}

\usepackage{floatpagestyle,listpen}
\allowprelistbreaks[-4]
\newseparatedlabel\Flabel{\@captype}{sub\@captype}
\newseparatedref\Fref{,\,\textit}

\usepackage{fr-fancy}

\usepackage{color}
\definecolor{gray}{gray}{.5}
%\definecolor{emphblue}{rgb}{0,0,0.5}
\definecolor{emphblue}{rgb}{0,0,1}
\def\emphcolor{\color{emphblue}}

\usepackage[
    linktocpage,
    hyperindex,%
    plainpages=false,%
    bookmarksopenlevel=1,%
    bookmarksnumbered=false,%
    pdfview=FitH,
    pdfstartview=FitH,
   ]{hyperref}
\usepackage{hypcap}

\def\@linkbordercolor{1 .5 .5}

\ifx\pdftexversion\undefined
  \IfFileExists{pstricks.sty}{\usepackage{pstricks,pst-eps}}{}
\else\ifcase\pdfoutput
  \IfFileExists{pstricks.sty}{\usepackage{pstricks}}{}
\or
%^^A  \IfFileExists{pdftricks.sty}{
%^^A  \usepackage{pdftricks}
%^^A  }{}
\fi\fi
\ifx\pdfdisplay\undefined\else
  \begin{psinputs}
  \usepackage{pstricks}
  \end{psinputs}
\fi

\IfFileExists{makecell.sty}{\usepackage{makecell}}{}

\@ifundefined{thead}{\newcommand\thead[1]{\footnotesize\raisebox
   {0pt}[\height+\jot][\depth+\jot]{\begin{tabular}{@{}c@{}} #1\end{tabular}}}
%^^A For this documentation only
  \def\multirowthead#1[#2]#3{\raisebox{-1.5ex}{\thead{#3}}}}{}

\IfFileExists{multirow.sty}{\usepackage{multirow}}{}
\IfFileExists{lscape.sty}{\usepackage{lscape}}{}
\floatsetup[table]{style=Plaintop,footnoterule=none}

%^^A -----------------------
\floatstyle{ruled}
\newfloat{Program}{tbp}{lop}[section]

\DeclareNewFloatType{Example}{placement=tb,
    within=section,fileext=loe}

\newfloatcommand{fcapsideleft}{figure}[{\capbeside
  \captionsetup[capbesidefigure]{labelsep=newline,
   justification=raggedleft}%
   \thisfloatsetup{capbesideposition=left}}][\FBwidth]
\newfloatcommand{fcapsideright}{figure}[{\capbeside
  \captionsetup[capbesidefigure]{labelsep=newline,
   justification=raggedright}%
   \thisfloatsetup{capbesideposition=right}}][\FBwidth]

\DeclareFloatStyle{MyBoxed}{style=Boxed,
  captionskip=5pt,frameset={\fboxrule1pt\fboxsep12pt}}

\DeclareFloatVCode{lowthickrule}{\par\vskip2pt\rule{\hsize}{.8pt}\par}
\DeclareFloatVCode{grayruleabove}{{\color{gray}\par\hrule height2.8pt depth0pt\vskip4pt\par}}
\DeclareFloatVCode{grayrulebelow}{{\color{gray}\par\vskip4pt\hrule height2.8pt depth0pt}}

\DeclareObjectSet{colorred}{\parskip2pt\parindent15pt\color{red}}

\DeclareMarginSet{hangtoheads}{\setfloatmargins
    {\hfil}{\hskip-.7\headheight\hskip-\headsep}}

\DeclareFloatSeparators{colorsep}{\begingroup\color{blue}%
   \floatfacing*
    {\hskip16pt\vrule width4.8pt\hskip6pt}{\hskip6pt\vrule width4.8pt\hskip16pt}%
   \endgroup}
\DeclareFloatSeparators{none}{}
\DeclareFloatSeparators{cicero}{\hskip1cc}
\DeclareFloatSeparators{enskip}{\hskip.5em}
\DeclareFloatSeparators{marginparsep}{\hskip\marginparsep}
\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth}

\DeclareColorBox{framedfigure}{\fcolorbox{gray}{white}}
\DeclareColorBox{yellowplate}{\colorbox{yellow}}

\DeclareCBoxCorners{angles}
   {{\color{green}%green llcorner
      \linethickness{10pt}\put(-5pt,-5pt)
      {{\put(0pt,0pt){\line(0,1){\FRcolorboxht}}}%
       {\put(-5pt,0pt){\line(1,0){\FRcolorboxwd}}}}%
   }}{{\color{red}%red lrcorner
      \linethickness{10pt}\put(0pt,0pt)
      {{\put(0pt,0pt){\line(0,1){\FRcolorboxht}}}%
       {\put(5pt,0pt){\line(-1,0){\FRcolorboxwd}}}}%
   }}{{\color{blue}%blue urcorner
      \linethickness{10pt}\put(5pt,-5pt)
      {{\put(0pt,0pt){\line(0,-1){\FRcolorboxht}}}%
       {\put(5pt,0pt){\line(-1,0){\FRcolorboxwd}}}}%
   }}{{\color{magenta}%magenta ulcorner
      \linethickness{10pt}\put(0pt,0pt)
      {{\put(0pt,0pt){\line(0,-1){\FRcolorboxht}}}%
       {\put(-5pt,0pt){\line(1,0){\FRcolorboxwd}}}}%
   }}

%^^A -----------------------
\DeclareCaptionListOfFormat{comma-separated}{#1,\,#2}

\def\rightlast{\leftskip0ptplus1fil
  \rightskip0ptplus-1fil\parfillskip0ptplus1fil}
\def\leftlast{\leftskip0pt\rightskip0pt\parfillskip0ptplus1fil}

%^^A for all versions of caption 3.x?
\DeclareCaptionLabelFormat{rightline}{\rightline{\bothIfFirst{#1}{ }#2}}
\DeclareCaptionLabelFormat{continued}{\rightline{\bothIfFirst{#1}{ }#2 \textup{(\emph{Continued})}}}
\DeclareCaptionLabelFormat{finished}{\rightline{\bothIfFirst{#1}{ }#2 \textup{(\emph{Finished})}}}

\DeclareCaptionLabelFormat{thinspace}{\bothIfFirst{#1}{\,}#2}

\DeclareCaptionJustification{togglelast}{\floatfacing*\rightlast\leftlast}
\DeclareCaptionJustification{rightlast}{\rightlast}

\captionsetup[table]{labelformat=rightline,textfont=bf,labelfont={md,sl},labelsep=newline}
\captionsetup[capbesidefigure]{justification=togglelast}
\captionsetup[floatfoot]{format=default}

\DeclareCaptionFormat{break}{#1#2\par#3\par}

\newcounter{Note}
\newcommand\Note{\ifhmode\ifdim\lastskip>0pt\unskip\fi~\nobreak\quad\fi
    \addtocounter{Note}1\textup{\theNote)}\nobreak\enskip}
\newcommand\startNotes{\setcounter{Note}0}
%^^A -----------------------

\advance\oddsidemargin.25\marginparwidth
\evensidemargin\oddsidemargin
\@mparswitchfalse
\widowpenalty10000
\clubpenalty10000
\@beginparpenalty10000
\@itempenalty1000
\@endparpenalty0
\tolerance2000
\hbadness8000
\vbadness5000
\hfuzz7pt
\def\l@subsection{\@dottedtocline {2}{1.5em}{2.7em}}
\def\l@subsubsection{\@dottedtocline {3}{4.2em}{3.9em}}

\newcommand\Resizebox[5]{\setbox0\hbox{\setlength\unitlength{#1/#3}%^^A
   \ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi{#5}}%^^A
   \@tempdima\ht0\advance\@tempdima\dp0%^^A
   \ifdim\@tempdima>#2
     \setlength\unitlength{#2/#4}\ifx\pspicture\undefined
       \else\psset{unit=\unitlength}\fi
     {#5}\else\box0\fi}

\providecommand*{\file}[1]{\texttt{#1}}
\providecommand*{\package}[1]{\textsf{#1}}
\providecommand*{\cls}[1]{\textsf{#1}}
\providecommand*{\env}[1]{\texttt{#1}}
\providecommand*{\meta}[1]{$\langle$\textit{#1}$\rangle$}

\newenvironment{Options}[1]%
  {\RemoveSpaces
   \allowprelistbreaks[-4]\vspace*{\topsep}\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
   \settowidth{\labelwidth}{\texttt{#1\space}}%
   \setlength{\leftmargin}{\labelwidth}%
   \addtolength{\leftmargin}{\labelsep}%
   \setlength{\itemsep}{0pt}%
   \setlength{\parsep}{0pt}}}%
  {\endlist}

\newenvironment{Quote}[1][\parindent]{\par\hfuzz30pt\setlength{\leftmargini}{#1}\RestoreSpaces
    \small\begin{quote}\obeylines\parskip0pt}{\end{quote}\par\@endpetrue}
\def\OptionLabel{RaggedRight}

\newenvironment{preamble}{{\emphcolor\meta{preamble}}\nopagebreak
    \par\begingroup\advance\leftskip1em}{\par\endgroup{\emphcolor\nobreak\meta{preamble}}\par\vskip2ex}

\newcommand\FRkey[2][setup]{\hyperref[#1:#2]{\texttt{#2}}}

\DeclareRobustCommand\La{L\kern-.36em{\sbox\z@ T\vbox to\ht\z@{\hbox{\check@mathfonts
    \fontsize\sf@size\z@\math@fontsfalse\selectfont A}\vss}}}

%maybe there is better solution?
\def\DescribeMacro{\let\outer@nobreak\@nobreaktrue
    \leavevmode\everypar{\@nobreakfalse}\@bsphack
   \begingroup\MakePrivateLetters\Describe@Macro}
\def\DescribeEnv{\let\outer@nobreak\@nobreaktrue
    \leavevmode\everypar{\@nobreakfalse}\@bsphack
    \begingroup\MakePrivateLetters\Describe@Env}

\newcommand\FRmpar{\@ifstar{\@nobreaktrue\xFRmpar}{\xFRmpar}}

\newcommand\xFRmpar[2]{\label{#2}\marginpar{\footnotesize
    \raggedleft\advance\leftskip.3\hsize#1}}

\providecommand\sectionname{section}
\newcommand\seeIntro{\hyperref[sec:intro]{Intro}}

\makeatother%^^A---------------------------------

\OnlyDescription
\let\PrintChanges\relax
\let\PrintIndex\relax
\def\SpecialUsageIndex#1{}
\def\SpecialEnvIndex#1{}
\EnableCrossrefs
\RecordChanges
%\makeindex
\begin{document}
 \DocInput{floatrow.dtx}
\PrintChanges
%\PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{5863}
%
% \changes{v0.1e}{2005/03/22}{The user documentation loaded inside
%   \file{floatrow.dtx}.}
%
%   \ifx\pspicture\undefined\else\psset{unit=1pt}\fi
%
%   \def\fileversion{v0.3b}
%   \def\filedate{2009/08/02}
%   \title{The \package{floatrow} package\thanks{This
%          file has version number \fileversion, last revised
%          \filedate.}}
%
%   \author{%
%   Olga Lapko\\
%   {\tt Lapko.O@g23.relcom.ru} }
%   \date{\filedate}
%   \maketitle
%
%   \begin{abstract}\openup.5pt
%   This package was created as extension of the \package{float}
%   package. The \package{floatrow} package borrows core code from
%   the \package{float}\footnote{\package{float} package, version v1.3d dated
%   2001/11/08, \copyright{} 1991--2000 Anselm Lingnau.} and
%   \package{rotfloat}\footnote{\package{rotfloat} package, version v1.2
%   dated 2004/01/04, \copyright{} 1995--2004 Axel Sommerfeldt.}
%   packages, so you \emph{must not} load these packages.
%
%   The \package{float} package has a~good mechanism for the creation (and easy
%   modification) of common layout for all floats of one type without
%   adding any repeated code in the document; besides, this package allows to
%   create new float types; it deals only
%   with alone (plain) combinations ``object (float contents)---caption''.
%
%   The \package{rotfloat}
%   package changes environments of rotated floats (the |sideways...|
%   environment of \package{rotating} package)
%   to adapt them to \package{float}'s settings.
%
%   The  package \package{floatrow} extends these possibilities and, at last, it allows:
%   \begin{itemize}\itemsep0pt\parskip0pt
%   \item
%   to use mechanism, borrowed from \package{float} package, for
%   creation of new float types;
%   \item
%   to change width of float box, either to a fixed value or to the width of object;
%   \item
%   to put caption beside object;
%   \item
%   to put a few floats side by side on the row;
%   \item
%   to put footnotes inside float box (using |minipage|-like mode);
%   and also to put legend-like text;
%   \item
%   to create and/or modify special layout for each type of float and
%   for different positioning of float and its components, e.g.
%   two-column or rotated float.
%   \end{itemize}
%
%   The \package{floatrow} package is cooperated with \package{caption} package
%   (needs version 3.0\textbf{q} or later, \emph{the better} cooperation will be with
%   version \textbf{3.1\emph{x}}). Also the \package{floatrow} package (like
%   \package{caption} one) uses \package{keyval} package mechanism for layout
%   settings.
%   \medskip
%
%   \begingroup
%   \slshape
%   I do my best to follow this idea and I hope that someone
%   likes it: helps to maintain this idea in any way, or finds bugs
%   and absurdities in this package or documentation.
%   \endgroup
%   \medskip
%
%   \centerline{\textbf{Document Terminology}\nopagebreak\vspace{1ex}}
%   \begin{description}\itemsep0pt\parskip0pt
%   \item[float (float box)]
%   could include \emph{object}, \emph{caption}, and
%   \emph{foot material}; \emph{float} is created by |figure| or
%   |table| environments (\emph{plain float}), or by |\|\FRkey{floatbox}
%   command and its modifications (\emph{float box});
%
%   \item[float type]
%   means standard environment |figure| or |table|,
%   also their \emph{layout subtypes}, like e.g.~|wrapfigure| (\package{wrapfig} package),
%   |sidewaysfigure| (\package{rotating} and \package{rotfloat} packages),
%   |longtable|  (\package{longtable} package) etc.;
%
%   \item[object]means |tabular| or graphics, as contents of table
%   (|table|) or figure (|figure|) or other type of float;
%
%   \item[caption]means text in |\caption|;
%
%   \item[foot material]could include explications, legends and/or footnotes inside
%   \emph{float box} (|\footnote|/\allowbreak|\mpfootnotemark|/\allowbreak|\footnotetext|,
%   and |\|\FRkey{floatfoot} macros).
%   \end{description}
%   \end{abstract}
%
% \begingroup\small
% \vspace{2ex}\pdfbookmark[1]{Frequently Appeared Design}{FAD}\nopagebreak
% \centerline{\textbf{Frequently Appeared Design}\nopagebreak}
% \begin{multicols}{2}\raggedright\advance\rightskip1em
%   \makeatletter\let\item\@idxitem\ignorespaces\makeatother
%   \def\sectionname{sec.}
%^^A%   \item{``Anchored'' float (option~|H|)}
%^^A%       \strut\pfill
%^^A%       \textsl{\sectionname}~\ref{sec:floatborrowII}
%
%   \item{Caption}
%       \subitem{above float (|table|'s object, |\ttabbox|)\kern-1em\allowbreak}
%           \strut\pfill
%           \textsl{{\seeIntro}},~%^^A
%           \textsl{\sectionname}~\ref{sec:floatbox}
%
%       \subitem{beside float (|figure|'s object, |\fcapside|)}
%           \strut\pfill
%           \textsl{{\seeIntro}},~%^^A
%           \textsl{\sectionname}~\ref{sec:floatbox}
%
%       \subitem{width equals to |longtable|'s (|LTcapwidth=| key)}
%           \strut\pfill
%           page~\pageref{FAD:LTcapwidth}
%
%       \subitem{width equals to object's}
%           \emph{see}~{float box width equals to object's}{}
%
%       \subitem{like in plain \LaTeX\ (|\RawCaption|)}
%           \strut\pfill
%           page~\pageref{setup:RawCaption},
%                \pageref{subcap:RawCaption}
%
%   \item{Creation of new float type (|\DeclareNewFloatType|)}
%       \strut\pfill
%       \textsl{\sectionname}~\ref{sec:newfloat}
%
%   \item{Layout of Float types (|\floatsetup|)}
%       \strut\pfill
%       \textsl{\sectionname}~\ref{sec:floatsetup}
%
%   \item{Float}\nopagebreak
%      \subitem{box (|\floatbox|)}
%           \strut\pfill
%           \textsl{\sectionname}~\ref{sec:floatbox};
%           \subsubitem{figure box (|\ffigbox|)}
%               \strut\pfill
%               \textsl{{\seeIntro}},~%^^A
%               \textsl{\sectionname}~\ref{sec:floatbox}
%
%          \subsubitem{table box (|\ttabbox|)}
%               \strut\pfill
%               \textsl{{\seeIntro}},~%^^A
%               \textsl{\sectionname}~\ref{sec:floatbox}
%
%       \subitem{box width}
%
%           \subsubitem{option in |\floatbox| commands}
%               \strut\pfill
%               \textsl{\sectionname}~\ref{sec:floatbox}
%
%          \subsubitem{equals to object's (option |\FBwidth| (|\floatbox|))}
%               \strut\pfill
%               \textsl{{\seeIntro}},~%^^A
%               \textsl{\sectionname}~\ref{sec:floatbox}
%
%           \subsubitem{the rest space in the row
%           (option |\Xhsize| (|\floatbox|))}
%               \strut\pfill
%               page~\pageref{FAD:floatfillspace}
%
%       \subitem{empty (special) page style (|\emptyfloatpage|)}
%               \strut\pfill
%               page~\pageref{FAD:emptyfloatpage}
%
%       \subitem{rotated (|sideways..|~env.)}\nopagebreak
%               \strut\pfill
%           \textsl{\sectionname}~\ref{ssec:rotating}
%
%          \subsubitem{placing on the facing pages}
%               \strut\pfill
%               page~\pageref{FAD:ContRotated}
%
%       \subitem{\textbf{here!} (option |[H]|)}
%           \strut\pfill
%           \textsl{\sectionname}~\ref{sec:floatborrowII}
%
%       \subitem{row (|floatrow| env.)}
%           \strut\pfill
%           \textsl{{\seeIntro}},~%^^A
%           \textsl{\sectionname}~\ref{sec:floatrow}
%
%           \subsubitem{float(box) in the row occupies the rest space}
%           \emph{see}~{float box width, the rest space of the row}
%
%           \subsubitem{floats of different types side by side}
%               \strut\pfill
%               page~\pageref{FAD:MixedRowII},
%                    \pageref{FAD:MixedRow}
%
%       \subitem{like in plain \LaTeX\ (|\RawFloats|)}
%           \strut\pfill
%           \textsl{\sectionname}~\ref{sec:rawfloats}
%
%       \subitem{wrapped}
%               \strut\pfill
%               \textsl{\sectionname}~\ref{ssec:wrapfig}--\ref{ssec:picins}
%
%   \item{Footnote inside float}
%       \strut\pfill
%       \textsl{\sectionname}~\ref{sec:floatfootnote}
%
%       \subitem{footnote mark
%           (|\mpfootnotemark|)\kern-1em\allowbreak}
%           \strut\pfill
%           page~\pageref{FAD:FnoteInsideFloat}
%
%   \item{Legend-like macro (|\floatfoot|)}
%       \strut\pfill
%       \textsl{\sectionname}~\ref{subsec:floatfoot}
%
%   \item{Subfloat}
%       \strut\pfill
%       \subitem{subcaption above}
%           \strut\pfill
%           page~\pageref{FAD:subcapabove}
%       \subitem{subfloat label beside}
%           \strut\pfill
%           page~\pageref{FAD:sublabelbeside}
% \end{multicols}%
% \endgroup
%
%   \clearpage
%   \begingroup\addtocounter{lofdepth}1\addtocounter{lotdepth}1
%   \small\openup-.65pt
%   \pdfbookmark[1]{Contents}{TOC}\nopagebreak\tableofcontents
%   \pdfbookmark[1]{List of Figures}{LOF}
%       \nopagebreak\listoffigures
%   \pdfbookmark[1]{List of Tables}{LOT}
%       \nopagebreak\listoftables
%   \pdfbookmark[1]{List of Examples}{LOE}
%       \nopagebreak\listof{Example}{List of Examples}
%   \pdfbookmark[1]{List of Programs}{LOP}
%       \nopagebreak\listof{Program}{List of Programs}
%   \endgroup
%
%   \clearpage
%   \suppressfloats[t]
%
%   \section{Introduction}\label{sec:intro}
%
%   During creation of document, you usually type figures and tables as \emph{floating objects}
%   (\emph{floats}), i.e. put their contents
%   inside |figure| and~|table| environments consequently. The simplest floating environment
%   looks like:
%\begin{Quote}
%|\begin{|\meta{float type}|}|
%\meta{float contents (object)}
%|\caption{|\meta{caption contents}|}|
%|\end{|\meta{float type}|}|
%\end{Quote}
%   or (if you want to put caption above):
%\begin{Quote}
%|\begin{|\meta{float type}|}|
%|\caption{|\meta{caption contents}|}|
%\meta{float contents (object)}
%|\end{|\meta{float type}|}|
%\end{Quote}
%
%   \subsection{Loading The Package}\label{sec:load}\label{sec:start}
%
%   Just now you have loaded the \package{floatrow} package:
%\begin{Quote}
%\begin{preamble}
%|\usepackage{floatrow}|\quad.
%\end{preamble}
%\end{Quote}
%   In the time, when this package was loaded,
%   all float contents in the document will be centered (unless another alignment command
%   appears inside the float contents). All captions appear
%   below float contents, regardless of how they were typed in source file.
%   But, I'm almost sure, that you want to put table captions above table material.
%   If you put in the next line the |\floatsetup| command:
%\begin{Quote}
%\begin{preamble}
%|\usepackage{floatrow}|
%|\|\FRkey[sec]{floatsetup}|[table]{|\FRkey{style}|=plaintop}|\quad,
%\end{preamble}
%\end{Quote}
%   after that, again, you will get all table captions above table material, regardless of how
%   they were typed in source file. These first minimal settings will arrange all floats
%   contents and their captions accordingly to the real typographic rules.
%   (The {\sectionname}~\ref{sec:floatsetup} describes and demonstrates various layouts,
%   which you can get with the settings of |\|\FRkey[sec]{floatsetup} command.)
%
%   But surely the settings above are still not sufficient to you, because you need to get
%   the table caption width equal to the width of table material. Also you may want to put some
%   figure captions beside graphics. Besides that, it is better to put small floats beside
%   in one row. For all these reasons this package offers special commands for building of float boxes
%   and a special environment to put these float boxes beside each other.
%
%   \subsubsection{Float Box Commands}\label{sec:intro:flbox}
%   One of the first macros of this package for creation of float boxes
%   is a macro which builds contents of the table environment with caption
%   above (|\|\FRkey[FB]{ttabbox}). The width of caption equals to the width of contents, e.g.
%   of tabular (see table~\ref{intro:table}). (The first example uses plain \LaTeX{}
%   layout---the \package{caption} and \package{floatrow} packages loaded without package setting options;
%   the options at the end of |\usepackage| command define dates of package versions
%   which support correct work of this tandem today.)%^^A
%   \FRmpar{Caption above table object}{FAD:CaptionAbove}%^^A
%\begin{Quote}
%\begin{preamble}
%  |\usepackage{caption}[2007/04/11]|
%  |\usepackage{floatrow}[2007/08/24]|
%\end{preamble}
%|\begin{table}|\nopagebreak
%|\|\FRkey[FB]{ttabbox}
%|  {\caption{A small table ...}\label{...}}|
%|  {\begin{tabular}...\end{tabular}}|\nopagebreak
%|\end{table}|\vspace*{-\intextsep}
%\end{Quote}
%\begingroup
%\clearcaptionsetup{table}\clearfloatsetup{table}
%\floatsetup{style=default}\captionsetup{style=default}\def\thead#1{#1}\extrarowheight1pt
%   \begin{table}[H]\tabcolsep1.5\tabcolsep
%   \ttabbox
%     {\caption{A small table with caption text above (\cmd{\ttabbox}) with plain \LaTeX{}
%       layout}\label{intro:table}}
%     {\jot2pt\begin{tabular}{|c|c|c|}
%      \hline
%       \thead{First column} & \thead{Second column} & \thead{Third column} \\
%      \hline
%       A & B & C \\
%       D & E & F \\
%      \hline
%      \end{tabular}}
%   \end{table}%^^A
%\endgroup
%
%   Another command which creates figures---|\|\FRkey[FB]{ffigbox} (figure~\ref{intro:figure})---puts
%   caption below contents. The default width of caption equals
%   to the width of text. (In the following example the most popular
%   layout settings for captions were added.)
%\begin{Quote}
%\begin{preamble}
%  |\usepackage|{\emphcolor|[font=small,labelfont=bf,labelsep=period,|
%  |      justification=centerlast]|}|{caption}|\vspace{1ex}
%  |\usepackage{floatrow}|
%\end{preamble}
%|\begin{figure}|
%|\|\FRkey[FB]{ffigbox}
%|  {\caption{A simple figure ...}\label{...}}|
%|  {...}|
%|\end{figure}|\vspace*{-\intextsep}
%\end{Quote}
%\begingroup\floatsetup{style=default}
%   \begin{figure}[H]
%   \ffigbox
%     {\caption[A simple figure box (\cmd{\ffigbox})] {A plain figure box
%       with long long long long long long long long
%       long long long long long long long long long long multilined caption}\label{intro:figure}}
%     {\unitlength1\unitlength\input{Doll.picture}}
%   \end{figure}%^^A
%\endgroup
%   The example above shows that a float box, created by
%   the |\ffigbox| command looks similar to the plain |figure| environment.
%   But if you set, for example, the option |[\|\FRkey{FBwidth}|]| like below:
%     \FRmpar{Caption's width equals to object}{FAD:FBwidthI}
%\begin{Quote}
%|...|
%|\begin{figure}|\nopagebreak
%|\ffigbox[\|\FRkey[FB]{FBwidth}|]|
%|  {\caption{A figure}\label{...}}|
%|  {...}|
%|\end{figure}|\vspace*{-2\intextsep}
%\end{Quote}
%\begingroup\floatsetup{style=default}
%   \begin{figure}[H]
%   \ffigbox[\FBwidth]
%     {\caption[A figure box (\cmd{\ffigbox}) with the width equal to graphics]{A figure with
%       the width equal to graphics with long
%       long long long long multilined
%       caption}\label{intro:figure:FBwidth}}
%     {\unitlength1.44\unitlength\input{Horse.picture}}
%   \end{figure}%^^A
%\endgroup
%   you'll get a~caption width equal to the width of picture
%   (figure~\ref{intro:figure:FBwidth}).
%
%   The third macro---|\|\FRkey[FB]{fcapside} (figure~\ref{intro:beside})---puts
%   caption beside. (In the next example the float layout settings were added,
%   which put captions to the binding margin
%   and changed value of separation space between caption and object to |\quad|.)
%\begin{Quote}[0pt]
%\begin{preamble}
%|...|
%  |\usepackage|{\emphcolor|[|%^^A
%       \FRkey{capbesideposition}|=inside,|
%  |    |\FRkey{facing}|=yes,|\FRkey{capbesidesep}|=quad]|}|{floatrow}|
%\end{preamble}
%|\begin{figure}|
%|\|\FRkey[FB]{fcapside}
%|  {\caption{...}\label{...}}|
%|  {...}|
%|\end{figure}|\enlargethispage\baselineskip\vspace*{-\intextsep}
%\end{Quote}
%\begingroup\floatsetup{style=default,capbesideposition=inside,facing=yes,capbesidesep=quad}%
%\clearcaptionsetup{capbesidefigure}
%   \begin{figure}[H]
%   \fcapside
%   {\caption[Beside caption (`one-column' width)]{Beside caption
%   (width of caption equals to the width of object) and more text
%   and some more text and a bit more text and
%   a little more text and a little piece of text to fill
%   space}\label{intro:beside}}
%   {{\setlength\unitlength{3.5cm/100}%^^A
%   \input{Bear.picture}}}
%   \end{figure}
%\endgroup
%   The width of text,
%   by default, divided into two columns, their width equals to the half text width
%   (figure~\ref{intro:beside}) float margins and
%   horizontal space (or width of the separation material) between float and caption are taken into account.
%   The one column is occupied by the object, the other by the caption and foot material (explications
%   or legends and footnotes).
%
%   If you set the |[\FBwidth]| option:
%     \FRmpar{The width of object box equals to object}{FAD:FBwidthII}
%\begin{Quote}
%|...|\nopagebreak
%|\fcapside[\FBwidth]|\nopagebreak
%|...|
%\end{Quote}\vspace*{-.5\intextsep}
%\begingroup\floatsetup{style=default,capbesideposition=inside,facing=yes,capbesidesep=quad}%
%\clearcaptionsetup{capbesidefigure}
%   \begin{figure}[H]
%   \fcapside[\FBwidth]
%   {\caption[Beside caption (occupies rest space beside float object)]{Beside caption
%   (the caption text occupies the rest space beside float object) and more text
%   and some more text and a bit more text and
%   a little more text and a little piece of text to fill
%   space}\label{intro:beside:FBwidth}}
%   {{\setlength\unitlength{3.5cm/100}%^^A
%   \input{Bear.picture}}}
%   \end{figure}
%\endgroup
%   the graphic box width will be equal to the width of the graphics and the caption
%   will occupy the rest space (see figure~\ref{intro:beside:FBwidth}).
%
%   The examples above show the most frequent and most simple variants of float creation. Read
%   {\sectionname}~\ref{sec:floatbox} about usage of these commands in different ways
%   and how to create new commands for float creation.
%
%   \subsubsection{Float Boxes In The Row}\label{sec:intro:flrow}
%   If you need to put two or more floats of one type side by side,%^^A
%   \FRmpar{Floats of one type\\ side by side}{FAD:floatrow}
%   you may use the |floatrow| environment.
%
%\begin{Quote}
%\begin{preamble}
%  {\emphcolor %^^A
%  |\DeclareCaptionLabelFormat{rightline}{\rightline|\nopagebreak
%  |         {\bothIfFirst{#1}{ }#2}}|
%  |\captionsetup[table]{labelformat=rightline,labelsep=newline,|\nopagebreak
%  |      labelfont={md,sl},textfont=bf}|}\vspace{1ex}
%  |\usepackage[|{\emphcolor\FRkey{font}|=small,|%^^A
%       \FRkey{floatrowsep}|=qquad,|\FRkey{captionskip}|=5pt|}|]{floatrow}|\nopagebreak
%  |\|\FRkey[sec]{floatsetup}|[table]{|%^^A
%       {\emphcolor\FRkey{style}|=Plaintop|}|}|\nopagebreak
%\end{preamble}
%|\begin{table}|
%| \begin{|\FRkey[sec]{floatrow}|}|
%|  \|\FRkey[FB]{ttabbox}
%|    {\caption{...}\label{...}}|
%|    {...}|
%| |
%|  \ttabbox|
%|    {\caption{...}\label{...}}|
%|    {...}|
%| \end{floatrow}|\nopagebreak
%|\end{table}|\vspace*{-\intextsep}
%\end{Quote}
%   \DeleteShortVerb{\|}%
%\floatsetup{style=default,font=small,floatrowsep=qquad,captionskip=5pt}
%   \begin{table}[H]
%   \begin{floatrow}
%   \extrarowheight1pt\tabcolsep1.05\tabcolsep
%   \ttabbox
%    {\caption[Beside table~I long header]%^^A
%     {Beside table~I with long long long long long long and top aligned caption}%^^A
%     \label{tab:row:tabIII}}%^^A
%    {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
%     \hline
%     \multirowthead{2}[-1ex]{Left Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%     \\\hline
%     First row    &         1 &         2 \\
%     Second row   &         3 &         4 \\
%     Third row    &         6 &         8 \\
%     Fourth row   & \llap{1}0 & \llap{1}6 \\
%     \hline
%   \end{tabular}}
%
%   \ttabbox
%    {\caption{Beside table~II with top aligned
%      caption}\label{tab:row:tabIV}}%^^A
%    {\begin{tabular}{|l|c|c|c|}
%     \hline
%     \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{3}{c|}{\thead{Data}} \\
%                  \cline{2-4}
%                  & \thead{I}      & \thead{II}      & \thead{III}        \\
%     \hline
%     First row    & 1      & 2       & \phantom01 \\
%     Second row   & 3      & 4       & \phantom06 \\
%     Third row    & 6      & 8       &         28 \\
%     \hline
%   \end{tabular}}
%   \end{floatrow}
%   \end{table}
%   \MakeShortVerb{\|}%
%   As you see in the example with tables \ref{tab:row:tabIII} and~\ref{tab:row:tabIV},
%   you \emph{need} to use commands |\ttabbox|, which build box for each table.
%
%   In the example with beside floats the special settings for table captions were applied
%   (see \package{caption} package documentation).
%   Float layout: The value of the separation space between beside floats have been changed to |\qquad|,
%   the vertical skip between captions and float objects was changed to 5pt. For the tables
%   the style |Plaintop| was used which not only puts captions above, but also aligns them by top line
%   (see \sectionname~\ref{sec:floatsetup} of current documentation).
%
%   \subsection{Do Not Write That With \package{floatrow} Package}\label{floatrow:wrong}
%\begingroup
%   The \package{floatrow} package offers many features, and it causing some limitations
%   for writing code of float contents in source file, too. If you'll write something like
%\begin{Quote}
%\begin{preamble}
%|\usepackage{floatrow}|
%\end{preamble}
%|\begin{table}\captionsetup{position=top}|
%|  \caption{A table caption must be placed above, ...}|
%|  \centering \begin{tabular}{cc} A & B  \\ C & D \end{tabular}|
%|\end{table}|
%\end{Quote}
%   please do not expect that the caption appears at the top of table:
%
%   \begingroup\clearfloatsetup{table}
%   \begin{table}[H]
%   \captionsetup{position=top}
%   \caption{A table caption must be placed above, wrong expect}\label{Wrong:expect}
%   \centering \begin{tabular}{cc} A & B  \\ C & D \end{tabular}
%   \end{table}
%   \endgroup
%
%   So if you want to put table captions above its contents\startNotes
%   \Note change code, using command |\ttabbox|,
%   like in table~\ref{intro:table}; \Note
%   write |\|\FRkey[sec]{floatsetup}|[table]|\allowbreak|{|\FRkey{style}|=plaintop}| in the preamble
%   ({\sectionname}~\ref{sec:floatsetup}); or
%   \Note restore the standard \LaTeX{} behavior with the |\RawFloats| command
%   or the package option |rawfloats| ({\sectionname}~\ref{sec:rawfloats}).
%
%   The next example. If you put beside floats by following way:
%\par\nobreak\vbox{\begin{Quote}
%|...|\nopagebreak
%|\begin{figure}|\nopagebreak
%|\begin{minipage}{0.45\textwidth}|
%|  \centering ...|
%|  \caption{The figure caption, disappeared, ...}|
%|\end{minipage}\hfill|
%|\begin{minipage}{0.45\textwidth}|
%|  \captionof{table}{The table caption ...}}|
%|  \centering ...|
%|\end{minipage}|\nopagebreak
%|\end{figure}|
%\end{Quote}}\noindent
%   you'll get error message about lost caption.
%   Here you may:~\nobreak\quad1)\nobreak\enskip
%   to put table contents inside |\|\FRkey[FB]{ttabbox} resp.\ the figure contents inside
%   |\|\FRkey[FB]{ffigbox}; then both floats put inside \FRkey[sec]{floatrow} environment, and, since
%   there is mixed row (it includes floats of different types, and also with different caption position),
%   put the |\|\FRkey{killfloatstyle} command before ``foreign'' float |\ttabbox|, and
%   |\|\FRkey[FB]{CenterFloatBoxes} command before |floatrow| environment
%   (see~{\sectionname}~\ref{sec:mixrow} about mixed rows); or~\nobreak\quad2)\nobreak\enskip
%   to restore the standard \LaTeX{} behavior, using command |\|\FRkey{RawFloats}
%   or package option  \FRkey{rawfloats} ({\sectionname}~\ref{sec:rawfloats}).
%
%\endgroup
%\clearpage
%   \section{Macros for Building Floats}
%   \FRorisubsection{The \texorpdfstring{\cs{floatbox}}{floatbox} Macro}\label{sec:floatbox}
%
%   \DescribeMacro{\floatbox}
%   The examples in Introduction ({\sectionname}~\ref{sec:intro:flbox})
%   use three commands |\ttabbox|, |\ffigbox| and |\fcapside|. All these commands
%   were built using the |\floatbox| macro.
%   This macro creates the float box with defined positioning of its elements (object,
%   caption, foot material) and applies the layout of current float type.
%   The usage of the |\floatbox| macro looks like:
%   \begin{Quote}
%   |\floatbox|\oarg{preamble}\marg{captype}\oarg{width}\oarg{height}\oarg{vert pos}
%   |         |\marg{caption}\marg{object}
%   \end{Quote}%^^A
%   The |\floatbox|'s arguments\label{floatboxsets}:
%   \begin{description}\itemsep0pt
%   \item[\meta{preamble}]there could be |\capbeside|\label{FB:capbeside} command which
%     places caption beside float contents;
%     |\nocapbeside|\label{FB:nocapbeside}
%     (to put caption above/below, accordingly
%     to float type's style);
%     |\captop|\label{FB:captop}
%     (to put caption above);
%     or another systematic command
%     (even with usage of |\captionsetup|
%     and |\|\FRkey{thisfloatsetup},
%     see examples in documentation and appendix).
%   \item[\meta{captype}]the type of float this command is created for. Since this command
%     is supposed to appear outside floating environments or in ``foreign'' environments
%     (see {\sectionname}~\ref{sec:mixrow} below),
%     we write here, usually, the \emph{actual} name of float type;
%   \item[\meta{width}]the width of object---caption box
%     (in case of caption above or below object),
%     or width of object box (if caption stays beside object).
%     The empty width option, |[]|, and option |[\hsize]| mean the same;
%   \item[\meta{height}]the height of object---caption box
%     (in case of caption above or below object),
%     or height of object box (if caption stays beside object). With the empty height
%     option, |[]|, is used the natural height of object;
%   \item[\meta{vert pos}]vertical alignment of object contents in
%     object's box in case of the \meta{height} argument differs from the natural value of
%     object height, or in the float layout there are used settings
%     for common (max) height for float objects inside |floatrow| environment.
%     Arguments are analogous to |minipage|'s ones:
%   \begin{Options}{cc}
%     \item[t]
%     aligns objects by top line;
%     \item[c]
%     aligns objects by center line;
%     \item[b]
%     aligns objects by bottom line;
%     \item[s]
%     stretches objects by full height (if it is possible).
%   \end{Options}\pagebreak[1]
%   \item[\meta{caption}]text of caption; you
%     may also use the |\footnote|/\allowbreak|\mpfootnotemark|/\allowbreak|\footnotetext| stuff
%     for footnotes inside float, and/or |\floatfoot| command;
%   \item[\meta{object}]contents of float; you may also use the
%     |\footnote|/\allowbreak|\mpfootnotemark|/\allowbreak|\footnotetext| stuff and/or
%     |\floatfoot| command.
%   \end{description}\enlargethispage{\baselineskip}
%   \emph{Note}. The order of the two last mandatory arguments,
%     \meta{caption} and \meta{object}, and their contents makes no
%     difference during building of float box. The |\floatbox| macro
%     historically needs two mandatory arguments, but they could
%     be filled freely, i.e. you may fill only one mandatory argument with object contents, caption etc.
%     and left another one empty.
%
%   \subsubsection{Float Box Width Equals to The Width of Object Contents}
%   \DescribeMacro{\FBwidth}\label{FB:FBwidth}%^^A
%   The |[\FBwidth]| option%^^A
%   \FRmpar{Caption's width\\ equals to object}{FAD:FBwidthIII}
%   in~the \meta{width} argument
%   allows usage of natural width of float contents:\startNotes\Note
%   for full float box in the case of caption
%   above/\allowbreak below; \Note  in~the case of caption beside float object,
%   the natural width of float object expands to the
%   object box only.
%
%   \RestoreSpaces
%   \emph{Note}. If you use the \verb|\FBwidth| command in the
%   optional argument \meta{width}, please get sure that object contents can be placed
%   in |\hbox| command. (You only allowed to use |\vspace| (not |\vskip|!)
%   command at the very
%   beginning and very end of object contents for fine tuning
%   of vertical spaces and position of contents.)\medskip
%
%   \DescribeMacro{\FBheight}\label{FB:FBheight}%^^A
%   The similar command, |[\FBheight]|, was
%   created for the \meta{height} argument. The usage of this command makes sense, e.g.,
%   when \package{calc} is loaded: you may define height option like |[\FBheight+1cm]|.
%
%   \subsubsection{Complex Example of Usage of \texorpdfstring{\cs{floatbox}}{floatbox} Command}
%   The next example shows |figure| environment with beside  caption.
%   In this example the \meta{preamble} argument consists of rather complex definition.
%   The \meta{width} option includes the |\FBwidth| command, so the object box
%   has its natural width, the width of caption box equals to 4cm, and  all lines in
%   caption justified, but the last one flushed to the right.
%
%\begin{Quote}
%|\begin{figure}|
%\begin{preamble}
%|\newcommand\rightlast{\leftskip0ptplus1fil|
%|  \rightskip0ptplus-1fil\parfillskip0ptplus1fil}|
%|\DeclareCaptionJustification{rightlast}{\rightlast}|
%\end{preamble}
%|\begin{figure}|
%|\floatbox[{\capbeside|
%|     \captionsetup[capbesidefigure]{labelsep=newline,|
%|          justification=rightlast}%|
%|     \|\FRkey{thisfloatsetup}%^^A
%       |{|\FRkey{capbesideposition}|={left,center},|
%|      |\FRkey{capbesidewidth}|=4cm}}]{figure}[\FBwidth]|
%|  {\caption{...}\label{...}}|
%|  {...}|
%|\end{figure}|
%\end{Quote}\vspace*{-2\intextsep}\enlargethispage\baselineskip
%\begingroup
%   \begin{figure}[H]
%   \floatbox[{\capbeside
%     \captionsetup[capbesidefigure]{labelsep=newline,
%          justification=rightlast}%
%     \thisfloatsetup{capbesideposition={left,center},capbesidewidth=4cm}}]{figure}[\FBwidth]
%   {\caption[Beside caption (example width complex preamble in \cmd{\floatbox})]{Beside caption
%   and some more text and a bit more text and
%   a little more text to fill
%   space}\label{fig:beside:mouse}}
%   {{\setlength\unitlength{4cm/58}%^^A
%   \input{Mouse.picture}}}
%   \end{figure}
%\endgroup
%   Please note that complex preamble options, which contain more than one command, must be placed
%   inside curly braces. (See {\sectionname}~\ref{sec:floatsetup} about settings for floats
%   with |\floatsetup|.)
%
%   \subsection{Creation of Personal Commands for Float Boxes}\label{ssec:ffigbox:etc}
%   The usage of |\floatbox| command  with options (which could be cumbersome)
%   is sometimes rather complex.
%   The Introduction demonstrates the three already defined commands-abbreviations of this command.
%   You may define commands-abbreviations (or redefine existing) for your own purposes and
%   include  some additional style definitions and settings there.
%
%   \DescribeMacro{\newfloatcommand}\label{FB:newfloatcommand}%^^A
%   \DescribeMacro{\renewfloatcommand}\label{FB:renewfloatcommand}%^^A
%   The definition of new float abbreviation looks like:
%   \begin{Quote}
%   |\newfloatcommand|\marg{command}%^^A
%   \marg{captype}\oarg{preamble}\oarg{default width}
%   \end{Quote}
%   where:
%   \begin{description}\itemsep0pt\parskip1ptplus1pt
%   \item[\meta{command}]the user's command name (without backslash);
%   \item[\meta{captype}]the name of floating environment
%     this command is created for;
%   \item[\meta{preamble}]
%     you may use commands, mentioned in page~\pageref{floatboxsets}
%     and other layout commands, like was shown in examples;
%     you may try to add any other regular command (e.g. |\captionsetup|
%     or |\thisfloatsetup| stuff);
%   \item[\meta{default width}]the main purpose of this optional argument is
%     setting it to |\FBwidth|, which is already included in definition of |\ttabbox|---the command for
%     building tables. You may also use any dimensions like |6cm| or |\textwidth| here.
%   \end{description}
%
%   For example you may define command for figure~\ref{fig:beside:mouse}
%   like following:
%\begin{Quote}%
%|\newfloatcommand{fcapbesideleft}[{\capbeside|
%|     \captionsetup[capbesidefigure]{labelsep=newline,|
%|          justification=rightlast}%|
%|     \thisfloatsetup|%^^A
%       |{capbesideposition={left,center},|
%|      capbesidewidth=4cm}}][\FBwidth]|
%\end{Quote}
%
%   \subsubsection{Usage of Personal Float Box Commands}
%   Your defined commands can be used in the following way (example for |\ffigbox|):
%   \begin{Quote}
%   |\ffigbox|\oarg{width}\oarg{height}\oarg{vert pos}\marg{caption}\marg{object}
%   \end{Quote}
%   where the options are:
%   \begin{description}\itemsep0pt\parskip1ptplus1pt
%   \item[\meta{width}]
%     the width of object---caption box
%     (in case of caption above or below object),
%     or width of object box (if caption stays beside object).
%     The empty width option, |[]|, and option |[\hsize]| mean the same. The |[\FBwidth]|
%     option sets natural object width;
%   \item[\meta{height}]
%     the height of object---caption box
%     (in case of caption above or below object),
%     or height of object box (if caption stays beside object). The |[\FBheight]|
%     option sets natural object height. With the empty height option, |[]|, is used
%     the natural height of object;
%   \item[\meta{vert pos}]
%     vertical alignment of object contents in
%     object's box in the case of \meta{height} argument has a~different value than
%     natural height of object contents, or in the float layout there are used settings for common (max)
%     heights of float elements (object or/and caption) inside |floatrow| environment.
%     Arguments are analogous to |minipage|'s:
%      |t|, |c|, |b|, |s| (see above).
%   \end{description}
%   See examples with usage of all options on the page~\pageref{fig:rotrow:FcatI} and in Appendix.
%
%   \subsubsection{Predefined Float Box Commands}
%   Let's repeat three already defined commands-abbreviations, defined in package:\label{abbrcom}%^^A
%   \begin{Quote}
%   |\newfloatcommand{ffigbox}{figure}[\nocapbeside]|\label{FB:ffigbox}\nopagebreak
%   |\newfloatcommand{fcapside}{figure}[\capbeside]|\label{FB:fcapside}\nopagebreak
%   |\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]|\label{FB:ttabbox}
%   \end{Quote}
%   You may see that these commands-abbreviations are equivalent to the following code:
%   \begin{Options}{fcapside}
%   \item[\cmd\ttabbox]---|\floatbox[\captop]{table}[\FBwidth]|;
%   \item[\cmd\ffigbox]---|\floatbox{figure}| (simplest definition); and
%   \item[\cmd\fcapside]---|\floatbox|\allowbreak|[\capbeside]{figure}|.
%   \end{Options}%
%   The first two are defined for figures, and the third one for tables. You may
%   redefine existing macros using |\renewfloatcommand| command (it uses
%   the same arguments as |\newfloatcommand| one).
%
%   \emph{Note}. In the documentation text below the name of the |\floatbox| command means
%   both itself and all commands-abbreviations, defined with |\(re)newfloatcommand|.
%
%\begin{small}
%
%   \medskip\emph{Some explanation}. The strange ``stammering'' names of float boxes,
%   with doubled first letters, |\ffigbox| and |\ttabbox| were created, because of the
%   expected names, |\figbox| and |\tabbox|, are already used by the \package{floatflt}
%   package, which creates figures and tables which do not span the full width of a page and
%   are filled around by text (i.e. \emph{wrapped} floats, see {\sectionname}~\ref{ssec:floatflt}).
%   Also there were founded |\figbox| in \package{formlett}
%   and |\tabbox| in \package{automata} package among styles in \LaTeX{} folder.
%
%\end{small}
%
%   \subsection{Building Float Row}\label{sec:floatrow}
%   The |floatrow| environment allows to put two or more floats beside. The usage of it looks like:
%   \begin{Quote}
%   |\begin{floatrow}[|\meta{number of beside floats}|]|\nopagebreak
%   |\floatbox...|\nopagebreak
%   |\floatbox...|\nopagebreak
%   |...|\nopagebreak
%   |\end{floatrow}|
%   \end{Quote}
%
%   Please note that \emph{for each float box} inside |floatrow| you must use |\floatbox|, |\ffigbox|,
%   |\ttabbox| or your own command, created with |\newfloatcommand| macro.
%
%   The |floatrow| environment creates necessary number of ``columns'',
%   the default number is two, where floats are placed (during the calculation of width of column
%   the widths of the separations between beside floats and margins around the float row are taken into account).
%   You may redefine the width of each float box,
%   e.g. the boxes of tables~\ref{tab:row:tabIII} and~\ref{tab:row:tabIV} (page~\pageref{tab:row:tabIII})
%   have the width of their contents
%   (remember, the |[\FBwidth]| is default option of |\ttabbox|).
%
%   During building each float box inside float row, the |floatrow| environment calculates
%   the rest space in the row and writes this value at the special parameter |\Xhsize|, which you
%   may use inside \meta{width} option of |\floatbox| command.
%   The next example with figures uses |[\FBwidth]| command in option for the left float,
%   and |[\Xhsize]| command---for the right.
%\begin{Quote}
%|...|\nopagebreak
%|\begin{figure}|\nopagebreak
%| \begin{floatrow}|\nopagebreak
%|  \ffigbox[\FBwidth]|
%|    {...}{\caption{...}\label{...}}|
%
%|  \ffigbox[\Xhsize]|%^^A
%   \FRmpar{Float occupies the rest space in the row}{FAD:floatfillspace}
%|    {...}{\caption{...}\label{...}}|
%| \end{floatrow}|\nopagebreak
%|\end{figure}|
%\end{Quote}
%   \begin{figure}[H]
%    \begin{floatrow}
%   \ffigbox[\FBwidth]
%   {\caption[Left beside figure (\texttt{floatrow}), the float box has width of graphic]{Left beside figure,
%           the width of graphic}%
%   \label{intro:leftfig:FBwidth}}%
%   {\unitlength1.12\unitlength\input{Bear.picture}}
%
%   \ffigbox[\Xhsize]
%   {\caption[Right beside figure (\texttt{floatrow}), occupies the rest space of row]{Beside figure at the right side of simple figure row,
%           the box width occupies the rest space of row}%^^A
%    \label{intro:rightfig:Xhsize}}
%   {\unitlength1.44\unitlength\input{Doll.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%
%   Usually the command |\Xhsize|\label{FB:Xhsize} is used for the last float
%   box to occupy the rest space of the row.
%   But if you use \package{calc} package you may try to use |\Xhsize|
%   earlier, if the \emph{absolute} value of the width of float boxes to
%   the right in float row is known. Another variant: you may set something in \meta{width}
%   argument something like |\Xhsize/2| and then |\Xhsize| for two last
%   float boxes---the next example just uses it: the first float has default
%   width equal to ``column'' width, the next uses width of included
%   graphic (uses command |\FBwidth| in optional argument \meta{width}),
%   the last two floats divide the rest horizontal space of page into two equal pieces which were
%   calculated by command |\Xhsize| and  \package{calc} package.\pagebreak[1]
%\begin{Quote}
%\begin{preamble}
%   |\usepackage{calc}|\vspace{1ex}
%   |\makeatletter\@mparswitchfalse\makeatother|\vspace{1ex}
%   |\|\FRkey{DeclareMarginSet}|{hangleft}{\|\FRkey{setfloatmargins}
%   |    {\hskip-\marginparwidth\hskip-\marginparsep}{\hfil}}|\vspace{1ex}
%   |\|\FRkey[sec]{floatsetup}|[widefigure]{|%^^A
%       \FRkey{margins}|=hangleft}|
%\end{preamble}
%|\begin{figure*}|
%|\begin{floatrow}|{\emphcolor|[4]|}
%|  \ffigbox|\nopagebreak
%|    {\caption{Beside figure~I...}...}{...}|\nopagebreak
%
%|  \ffigbox[\FBwidth]|\nopagebreak
%|    {\caption{Beside figure~II...}...}{...}|\nopagebreak
%
%|  \ffigbox[\Xhsize/2]|\nopagebreak
%|    {\caption{Beside figure~III...}...}{...}|\nopagebreak
%
%|  \ffigbox[\Xhsize]|\nopagebreak
%|    {\caption{Beside figure~IV...}...}{...}|\nopagebreak
%|\end{floatrow}|
%|\end{figure*}|
%\end{Quote}
%\begingroup\makeatletter
%   \floatsetup[widefloat]{margins=hangleft}
%   \begin{figure*}%
%   \begin{floatrow}[4]
%   \ffigbox
%   {\caption{Figure~I in the row (\texttt{floatrow}), ``column'' width}%
%   \label{fig:row:Dog}}
%   {\input{TheDog.picture}}
%
%   \ffigbox[\FBwidth]
%   {\caption{Figure~II in the row (\texttt{floatrow}), graphics width}%
%   \label{fig:row:WcatI}}
%   {\unitlength1.08\unitlength\input{TheCat.picture}}
%
%   \ffigbox[\Xhsize/2]
%   {\caption{Figure~III in the row, float's width box has the
%     half of the rest space of row}%
%   \label{fig:row:mouse}}
%   {{\setlength\unitlength{\hsize/58}%^^A
%   {\input{Mouse.picture}}}}
%
%   \ffigbox[\Xhsize]
%   {\caption{Figure~IV in the row,
%   occupies the rest space of row}%
%   \label{fig:row:cheese}}
%   {\input{Cheese.picture}}
%   \end{floatrow}
%   \end{figure*}%
%\endgroup
%   The result you see in the row of
%   figures~\ref{fig:row:Dog}--\ref{fig:row:cheese}. Please note that in the examples with rows,
%   the vertical alignment of floats lays on the bottom of upper part (here: objects)
%   of float and the top of lower part (captions).
%
%   The current example uses the starred |figure*| environment, which demonstrates here the possibility
%   of creation and usage of the alternative layout for the float type (here for the figure).
%   It sets the special margin settings,
%   which allow to expand to the left margin (see page~\pageref{setup:margins} about margins settings
%   in |\floatsetup| command). The first command in this example, between |\makeatletter| and
%   |\makeatother| commands, switch of facing margins in twoside document: margins on all pages
%   appear on the left side (like in current document).
%
%   \subsubsection{Mixed Row}\label{sec:mixrow}
%   \textbf{Problems}.\startNotes\Note Sometimes, for example, it is necessary to put beside
%   figure and table. The problem of such mixed row is that you must put different types of float in
%   one floating environment, which sets its own layout for included float box(es).
%
%   \Note Another problem is that figures usually have captions below
%   graphics, but tables could have caption \emph{above} their contents.
%   The alignment of all floats is similar: the bottom of upper part and
%   top of lower part. In this case if you want to put such beside figure
%   and table you'll get an undesirable result.
%
%   \DescribeMacro{\killfloatstyle}
%   \textbf{Solutions}.\startNotes\Note For creation of right layouts for each float type in mixed row,
%   you ought to write |\|\FRkey{killfloatstyle} command just before each ``foreign''
%   (for current floating environment) |\floatbox| macro.
%
%   \DescribeMacro{\CenterFloatBoxes}
%   \DescribeMacro{\TopFloatBoxes}
%   \DescribeMacro{\BottomFloatBoxes}
%   {\sloppy\Note For correct vertical alignment of different float types, which put captions in different
%   positions, you may use one of the following commands:
%\begin{Quote}
%|\CenterFloatBoxes|\label{FB:CenterFloatBoxes}
%|\TopFloatBoxes|\label{FB:TopFloatBoxes}
%|\BottomFloatBoxes|\label{FB:BottomFloatBoxes}
%\end{Quote}
%   which align \emph{full} float boxes by center, top or bottom lines.
%   There is also |\PlainFloatBoxes|\label{FB:PlainFloatBoxes} which restores standard behavior of
%   |\floatbox|'es.\par}
%
%   \DescribeMacro{\buildFBBOX}
%   These macros were created by |\buildFBBOX|\label{FB:buildFBBOX} macro, which can be written like
%\begin{Quote}
%|\buildFBBOX|\marg{starting code of the box}\marg{finishing code of the box}
%\end{Quote}
%   just before any |\floatbox| command (or |floatrow| environment).
%   For example, definition of |\CenterFloatBoxes|
%   looks almost like following:
%\begin{Quote}
%^^A%|\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse|
%|\newcommand\CenterFloatBoxes{%|
%|  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip0pt}%|
%|             {\vskip0pt\egroup$\egroup}}|
%\end{Quote}
%   The other two commands use |\vtop| and |\vbox| boxes consequently.
%   (see also example with usage of |\buildFBBOX| command on the page~\pageref{buildFBBOX:def}).
%
%   In the next example we use |\CenterFloatBoxes| command before |floatrow|
%   and |\killfloatstyle| just before |\ttabbox| macro
%   (mixed float row with figure~\ref{fig:rowmixspec:WcatI} in |Boxed| style, and
%   table~\ref{tab:rowmixspec:tabI}\label{mixrow}):
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{style}|=Boxed}|
%\end{preamble}
%|\begin{figure}\CenterFloatBoxes|\nopagebreak
%|\begin{floatrow}|
%|  \|\FRkey[FB]{ffigbox}|[\|\FRkey[FB]{FBwidth}|]|
%|     ...|
%|  \|\FRkey{killfloatstyle}|\|\FRkey[FB]{ttabbox}
%|     ...|
%\end{Quote}
%   \DeleteShortVerb{\|}%
%   \begingroup\floatsetup[figure]{style=Boxed}
%   \begin{figure}[H]\CenterFloatBoxes
%   \begin{floatrow}
%   \ffigbox[\FBwidth]
%   {\unitlength1.75\unitlength\input{Horse.picture}}
%   {\caption{A \texttt{Boxed} figure in the mixed row}\label{fig:rowmixspec:WcatI}}%
%   \extrarowheight1pt
%    \killfloatstyle
%   \ttabbox
%   {\caption{A table in the mixed row}\label{tab:rowmixspec:tabI}}
%   {\tabcolsep5\tabcolsep\begin{tabular}{|c|c|}\hline A & B  \\ C & D \\ \hline\end{tabular}}
%   \end{floatrow}
%   \end{figure}
%   \endgroup
%   \MakeShortVerb{\|}%
%   \RestoreSpaces\enlargethispage{\baselineskip}
%
%   \emph{Note.} Both figure and table boxes have got width equal to
%   contents of objects: the |\ffigbox| command in the example has optional argument
%   |[\FBwidth]|, but |\ttabbox| does not have any option---it uses
%   |[\FBwidth]| option as default (see definitions on page~\pageref{abbrcom}).\label{FAD:MixedRowII}
%
%   \subsection{Running Floats in the Raw \LaTeX\ Mode}\label{sec:rawfloats}
%    The\label{FAD:PlainFloat}
%    \package{floatrow} package redefines floating environments for the case
%    of creation of common layout for all floats. This redefinition creates
%    some limitations for source document file, which were mentioned in
%    introduction (see \sectionname~\ref{floatrow:wrong}). If you still need a raw behavior
%    of floating environment, you may do that by one of the following three ways.\startNotes
%
%   \Note\DescribeMacro{\RawFloats}\label{setup:RawFloats}%^^A
%     If you want \LaTeX\ behavior \emph{just for one environment},
%    input a |\RawFloats| command \emph{inside} environment:
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{style}|=Boxed}|\%{ \em please note, it does nothing here}
%\end{preamble}\vskip-\lastskip
%|\begin{figure}\RawFloats|\nopagebreak
%|\captionsetup[table]{position=top}|
%|\begin{minipage}{0.45\textwidth}|
%|  \centering ...|
%|  \caption{...}\label{...}|
%|\end{minipage}|
%|\begin{minipage}{0.45\textwidth}|
%|  \captionof{table}{...}\label{...}|
%|  \centering ...|
%|\end{minipage}|\nopagebreak
%|\end{figure}|
%\end{Quote}
%    And you'll get figure~\ref{Right:expect:fig}
%    and table~\ref{Right:expect:tab}.
%\begingroup\floatsetup[figure]{style=Boxed}\relax
%    \begin{figure}[H]\RawFloats
%    \captionsetup[table]{position=top}
%    \begin{minipage}{0.45\textwidth}
%    \centering {\unitlength1.44\unitlength\input{Horse.picture}}
%    \caption{A figure in raw \LaTeX's mode}\label{Right:expect:fig}
%    \end{minipage}\quad\hfill
%    \killfloatstyle\begin{minipage}{0.45\textwidth}
%    \captionof{table}{A beside table in raw \LaTeX's mode}\label{Right:expect:tab}
%    \centering\tabcolsep5\tabcolsep
%    \begin{tabular}{|c|c|}\hline A & B  \\ C & D \\ \hline\end{tabular}
%    \end{minipage}
%    \end{figure}
%\endgroup
%   Compare this example with example in the {\sectionname}~\ref{sec:mixrow} and the following
%   figure~\ref{leftfig:raw} and table~\ref{righttab:raw}.
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{style}|=Boxed}|
%\end{preamble}
%|\begin{figure}\RawFloats\|\FRkey[FB]{CenterFloatBoxes}\nopagebreak
%|\begin{|\FRkey[sec]{floatrow}|}|
%|  \|\FRkey[FB]{ffigbox}|[\|\FRkey[FB]{FBwidth}|]|\nopagebreak
%|   {...}|\nopagebreak
%|   {\caption{...}\label{...}}|
%| |
%|  \|\FRkey[FB]{ttabbox}\nopagebreak
%|   {...}|\nopagebreak
%|   {\caption{...}\label{...}}|
%|\end{floatrow}|\nopagebreak
%|\end{figure}|
%\end{Quote}
%\begingroup\floatsetup[figure]{style=Boxed}
%   \begin{figure}[ht]\RawFloats\CenterFloatBoxes
%    \begin{floatrow}
%   \ffigbox[\FBwidth]
%   {\unitlength1.44\unitlength\input{Horse.picture}}
%   {\caption{A figure in \cmd{\ffigbox} and inside \texttt{floatrow} in raw \LaTeX's mode}%
%   \label{leftfig:raw}}%
%
%   \ttabbox
%   {\caption{A table in \cmd{\ttabbox} and inside \texttt{floatrow} in raw
%     \LaTeX's mode}\label{righttab:raw}}
%   {\tabcolsep5\tabcolsep
%    \begin{tabular}{|c|c|}\hline A & B    \\ C & D \\ \hline
%    \end{tabular}}
%    \end{floatrow}
%   \end{figure}%^^A
%\endgroup
%
%   \Note Canceling of \package{floatrow}'s behavior for \emph{all floats of one type
%   or subtype} should be done outside any floating environment, usually in the
%   preamble of the document. In this case the |\RawFloats| command needs optional
%   argument with name(s) of float type. You may set that by two ways:
% \begin{Quote}
% |\RawFloats|\oarg{type,type,\ldots}\quad or\nopagebreak
% |\RawFloats|\oarg{type}\oarg{subtype,subtype,\ldots}
% \end{Quote}
%   So if you set |\RawFloats[figure]|, that will return the plain \LaTeX{} mode to all
%   figures in all subtype environments (|figure|, |figure*|,
%   |sidewaysfigure|, |wrapfigure|, etc., see page~\pageref{sec:floatsetup}).
%   If there is also a table,
%   |\RawFloats[figure,table]|, you also will set the same for all table
%   subtypes.
%
%   The second way, with second optional argument, cancels \package{floatrow}'s
%   behavior for mentioned float ``subtype(s)'' of \emph{one} float type
%   in second optional argument you may use |float|, |widefloat|,
%   |rotfloat|, |widerotfloat|---the meaning of this options
%   analogous to options of |\floatsetup| macro (see
%   {\sectionname}~\ref{sec:floatsetup}, but you may use here only options
%   which include ``float'' word).\label{FAD:PlainFloatII}%^^A
%
%   \Note\DescribeMacro{rawfloats}\label{setup:rawfloats}%^^A
%   This option stores the plain \LaTeX{} mode (i.e. stores usage of
%   standard \LaTeX{} float macros) for all \emph{standard and new defined}
%   float types. This option can be used only in |\usepackage| line.
%
%\medskip
%   \emph{Notes}.\startNotes\nopagebreak
%
%   \Note Please note that with |\RawFloats[...]| command  and |rawfloats=| key
%   you will cancel layout (|\floatsetup|) settings of all chosen float types/subtypes
%   ({\sectionname}~\ref{sec:floatsetup}) for plain floats.
%
%\begingroup
%   {\emergencystretch2em\Note The |floatrow| environment ({\sectionname}~\ref{sec:floatrow})
%   and commands of |\floatbox| stuff ({\sectionname}~\ref{sec:floatbox})
%   still work  after |\RawFloats[...]| command and |rawfloats=| key
%   (see example with figure~\ref{leftfig:raw}
%   and table~\ref{righttab:raw})\label{FAD:MixedRow}.
%   Also note that\startNotes\def\theNote{\alph{Note}}\Note
%   the layout settings of the package, written in |\usepackage| line
%   and inside |\floatsetup{...}| command, and settings for main types of floats
%   like |\floatsetup|\allowbreak|[figure]{...}| or |\floatsetup|\allowbreak|[table]{...}|
%   still can work inside |\|\FRkey{floatbox} commands; \Note for the figures inside |\fcapside|
%   command and similar ones (with the |\|\FRkey{capbeside} command
%   inside the |\floatbox|'s \meta{preamble} option)---the settings |\floatsetup|\allowbreak|[capbesidefloat]{...}|
%   and |\floatsetup|\allowbreak|[capbesidefigure]{...}| or |\floatsetup|\allowbreak|[capbesidetable]{...}|
%   work; \Note inside the \FRkey{floatrow} environment---the settings |\floatsetup|\allowbreak|[floatrow]{...}|
%   and |\floatsetup|\allowbreak|[figurerow]{...}| or |\floatsetup|\allowbreak|[tablerow]{...}| are added
%   to the settings for |\floatbox|'es inside;
%   \Note also you may use |\|\FRkey{thisfloatsetup} settings in the case of usage of |\floatbox| commands.
%
%   The settings for all other layout subtypes
%   (see {\sectionname}~\ref{sec:floatsetup}) will be canceled.\par}
%\endgroup
%
%   \subsubsection{Raw Caption---Printing in Unusual Way}
%   \DescribeMacro{\RawCaption}\label{setup:RawCaption}%^^A
%   This command allows to ``release'' caption contents from special box register created by
%   \package{floatrow} package for the creation of necessary layout. The caption is placed as
%   argument of |\RawCaption|:
% \begin{Quote}
%   |\RawCaption{\caption\marg{contents}\label{...}}|\quad.
% \end{Quote}
%   In this case the settings of float layout of current type will be stored, but
%   you may put caption in non-standard way. For example in the free corner of the
%   graphics (figure~\ref{rawcaption:plain}):
%\begingroup
% \begin{Quote}
%\begin{preamble}
%|\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{style}|=plain}|
%\end{preamble}\vskip-\lastskip
%|\begin{figure}|\lineskip0pt
%|\framebox(70,60){...}\hspace{2\unitlength}%|
%|\framebox(70,60){...}\vspace{2\unitlength}\par|
%|\framebox(70,60){...}\hspace{2\unitlength}%|
%|\parbox[b][60\unitlength]{70\unitlength}%|
%|          {\RawCaption{\caption{...}\label{...}}}|
%|\end{figure}|
% \end{Quote}\enlargethispage\baselineskip
%\floatsetup{style=plain}
%\begin{figure}[H]\unitlength1.28\unitlength\lineskip0pt
%\framebox(70,60){\input{TheCat.picture}}\hspace{2\unitlength}%^^A%
%\framebox(70,60){\unitlength.5\unitlength\input{TheCat.picture}}\vspace{2\unitlength}\par
%\framebox(70,60){\unitlength.25\unitlength\input{TheCat.picture}}\hspace{2\unitlength}%^^A%
%\parbox[b][60\unitlength]{70\unitlength}{\RawCaption{\caption
%     [Caption in raw \LaTeX{} mode, placed in the free corner of figure]{Caption in raw \LaTeX{} mode, placed in the free corner of figure}\label{rawcaption:plain}}}
%\end{figure}%
%   The more suitable example of usage of the |\RawCaption| command see on the
%   page~\pageref{fig:subIcap:IcatsI} (figure~\ref{fig:subIcap:IcatsI} with modified
%   \verb|BOXED| style).
%\endgroup
%
%   \subsection{Usage of Footnotes Inside Float Environment}\label{sec:floatfootnote}
%   Sometimes table or figure contents have material, which authors mark
%   and then write some explanation like footnotes. This package has
%   a~mechanism which allows to put footnotes inside floating environments, in
%   the same way as is in \LaTeX's |minipage| environment.
%
%   In the case of few elements have the same footnote, we cannot
%   use standard |\footnotemark|---|\footnotetext| combination, because
%   |\footnotemark| in standard \LaTeX\ always creates the sign of main text footnote.
%   For these cases current package offers |\mpfootnotemark|%^^A
%   \FRmpar{Footnotemark \\inside float}{FAD:FnoteInsideFloat}\label{FB:mpfootnotemark}
%   macro instead of |\footnotemark|.
%   (The same macro also is defined in \package{footmisc} package.
%   The \package{floatrow} package doubles this definition.)
%   \begin{Quote}
%   \begin{preamble}
%   |\|\FRkey[sec]{floatsetup}|[table]{...,|\FRkey{footnoterule}|=none,|%^^A
%       \FRkey{footskip}|=.35\skip\footins,...}|
%   \end{preamble}\vskip-\lastskip
%     |\begin{table}|
%     |\|\FRkey[FB]{ttabbox}
%     | {\caption{...}\label{...}}%|
%\verb+ {\begin{tabular}{...}+
%     |... & 2\mpfootnotemark[1] \\|
%     |...|
%     |  \end{tabular}%|
%     |  \footnotetext[1]{Even numbers.}}|\nopagebreak
%     |\end{table}|\vspace*{-\intextsep}
%   \end{Quote}%
%   \DeleteShortVerb{\|}%
%\begingroup\floatsetup[table]{footnoterule=none,footskip=.35\skip\footins}
%   \begin{table}[H]
%   \ttabbox
%   {\caption{Table with footnote}%^^A
%   \label{tab:floatfnote}}%^^A
%    {\extrarowheight1pt
%   \begin{tabular}{|l|c|c|}
%     \hline
%     \thead{Column head}  & \thead{Data I}     & \thead{Data II} \\
%     \hline
%     First row    & \phantom01 & 2\mpfootnotemark[1]       \\
%     Second row   & \phantom06\mpfootnotemark[1] & 4\mpfootnotemark[1]       \\
%     Third row    &         28\mpfootnotemark[1] & 8\mpfootnotemark[1]       \\
%     \hline
%   \end{tabular}%^^A
%   \footnotetext[1]{Even numbers.}}
%   \end{table}%
%\endgroup
%   \MakeShortVerb{\|}%
%
%   {\sloppy The |\|\FRkey[sec]{floatbox} macro uses special definition of footnote rule
%   (the \FRkey{footnoterule}|=| key, see also
%   page~\pageref{sec:footnotestyle} for variants of footnote rule) and skip before footnotes and
%   explications or legends (the \FRkey{footskip}|=| key).\par}
%
%   \subsection{The Legend-Like Macro}\label{subsec:floatfoot}
%   In the case of table or figure have some additional explanations
%   which could not put in caption contents and they are definitely not
%   a footnote you may use the |\floatfoot|\label{FAD:Legend}
%   command. The |\floatfoot| is
%   build by usage of |\caption| stuff and uses by default caption's text justification:
%\begin{Quote}
%|\begin{table}|\nopagebreak
%|\|\FRkey[FB]{ttabbox}
%|  {\caption{...}\label{...}}|
% \verb+  {\begin{tabular}{...}+
%|  ...\end{tabular}%|
%|  \floatfoot{`Data I' column ...}}|\nopagebreak
%|\end{table}|\vspace*{-\intextsep}
%\end{Quote}
%   \DeleteShortVerb{\|}%
%\begingroup\floatsetup[table]{footnoterule=none,footskip=.35\skip\footins}
%   \begin{table}[H]
%   \ttabbox
%   {\caption{Table with foot material (e.g. legend)}%^^A
%   \label{tab:floatfoot}}%^^A
%    {\extrarowheight1pt%^^A\tabcolsep2\tabcolsep
%   \begin{tabular}{|l|c|c|}
%     \hline
%     \thead{Column head}  & \thead{Data I}     & \thead{Data II} \\
%     \hline
%     First row    & \phantom01 & 2       \\
%     Second row   & \phantom06 & 4       \\
%     Third row    &         28 & 8       \\
%     \hline
%   \end{tabular}%^^A
%   \floatfoot{`Data I' column---numbers which equal to sum of all
%   their divisors; `Data II' column---$2^n$ values}}
%   \end{table}%
%\endgroup
%   \MakeShortVerb{\|}%
%
%   The star form (|\floatfoot*|) prints its contents as plain unindented
%   paragraph (see table~\ref{tab:floatfoot}).
%\begin{Quote}
%|  ...\end{tabular}%|
%|  \floatfoot*{`Data I' column ...}}|\nopagebreak
%|\end{table}|\vspace*{-\intextsep}
%\end{Quote}
%   \DeleteShortVerb{\|}%
%\begingroup\floatsetup[table]{footnoterule=none,footskip=.35\skip\footins}
%   \begin{table}[H]
%   \ttabbox
%   {\caption{Table with foot material (e.g. legend) printed as unindented paragraph}%^^A
%   \label{tab:floatfoot}}%^^A
%    {\extrarowheight1pt%^^A\tabcolsep2\tabcolsep
%   \begin{tabular}{|l|c|c|}
%     \hline
%     \thead{Column head}  & \thead{Data I}     & \thead{Data II} \\
%     \hline
%     First row    & \phantom01 & 2       \\
%     Second row   & \phantom06 & 4       \\
%     Third row    &         28 & 8       \\
%     \hline
%   \end{tabular}%^^A
%   \floatfoot*{`Data I' column---numbers which equal to sum of all
%   their divisors; `Data II' column---$2^n$ values}}
%   \end{table}%
%\endgroup
%   \MakeShortVerb{\|}%
%
%   For defining of explication font use \FRkey{footfont}|=| option
%   in |\floatsetup| (page~\pageref{setup:footfont}). You may try to
%   define special settings for float foot using
%   \cmd{\captionsetup[floatfoot]} (see~{\sectionname}~\ref{sec:floatsetup}).
%
%   \emph{Notes.} \startNotes\Note The \package{float} package defines additional
%   optional argument after main caption text, possibly for explications.
%   Since this possibility
%   didn't declared in user part of documentation the current version of
%   \package{caption} (3.0 and later), and also \package{float\-row} package,
%   doesn't support this possibility. You may use |\floatfoot| and
%   |\footnote|/\allowbreak|\mpfootnotemark|/\allowbreak|\footnotetext| stuff instead.
%
%   \Note If you use both commands |\floatfoot| and |\footnote|
%   inside one float box, the |\floatfoot| appears above |\footnote|
%   contents.
%
%   \Note Foot material (footnotes and text in floatfoot) can be placed
%   in several variants: at the very bottom of float box, below caption
%   (even if caption is above float object; see description of \FRkey{footposition}|=| key
%   on the page \pageref{setup:footposition}
%   and sample file \file{frsample01.tex}). In case of caption beside
%   float object, footnotes and foot text are always placed below caption.
%
%   \subsection{Fine Tuning of Vertical Spaces of Float}\label{sec:FBabskips}
%   At the final variant of document you may need to correct vertical
%   spaces between float and main text, between float object and
%   caption.
%
%   To change space between float box and main text, you may use
%   two simple commands |\FBaskip| and |\FBbskip|. For example define
%   \begin{Quote}
%    |\renewcommand\FBaskip{-4pt}|
%    |\begin{figure}|
%    |  ...|
%    |\end{figure}|
%   \end{Quote}
%   to move up float box up (or reduce space above) by 4pt. Or write
%   \begin{Quote}
%    |\renewcommand\FBbskip{-5pt}|
%    |\begin{figure}[t]|
%    |  ...|
%    |\end{figure}|
%   \end{Quote}
%   to reduce space below (here: distance between figure and main text) by 5pt.
%   In current document the |\FBaskip| command  was necessary for moving up
%   some of wrapped figures.\nopagebreak
%
%   Use |\vspace| command for vertical space correction around float
%   object\footnote{The plain floating environment allows usage of
%   \cmd{\vskip} command. But \cmd{\floatbox} stuff
%   (\cmd{\floatbox} itself, \cmd{\ffigbox} etc.) in case
%   of usage of the \cmd{\FBwidth} option, gets error message
%   when \cmd{\vskip} appears.}.
%
%   \emph{Note}. If you'll write something like:
%   \begin{Quote}
%\begin{preamble}
%      |\usepackage{floatrow}|
%\end{preamble}
%    |\begin{figure}|\nopagebreak
%    |  ...|
%    |\caption{...}|
%    |\vspace{-6pt}|\nopagebreak
%    |\end{figure}|
%   \end{Quote}
%   in \emph{plain} floats like in example above, you will change space between caption
%   and object (in the case of caption below object).
%   Again, for layout with caption above:
%   \begin{Quote}
%\begin{preamble}
%      |\usepackage[|\FRkey{capposition}|=top]{floatrow}|
%\end{preamble}
%    |\begin{figure}|\nopagebreak
%    |\vspace{-6pt}|\nopagebreak
%    |\caption{...}|
%    |  ...|
%    |\end{figure}|
%   \end{Quote}
%   you will get the reduced space between caption above and object contents.
%
%   \clearpage
%   \section{Float Layout Settings}\label{sec:floatsetup}
%
%   The idea of \package{floatrow} package is to avoid a lot of repeated code
%   for creation of desired layout for floats inside the document text.
%   If you ought to change the layout of one float type or even of all float types,
%   the package allows also to make these modifications
%   of layout much easier. In this case you only have to care
%   about the \emph{markup} of floats and their contents.
%
%   The easy modification of common layout of all float types or only for one
%   float type is possible because of the borrowed code from the \package{float}
%   package, which allows to modify layout of floats of one type as a whole.
%
%   The common layouts and modification for captions for all float types as a whole,
%   for each float type separately, and other special settings
%   are supported by \package{caption} package, version~3.\emph{x}.
%
%   The layout settings of \package{floatrow} package are built similarly
%   to the settings from the \package{caption}~3.\emph{x} package. So the layout settings of the
%   |\floatsetup|\footnote{Some key and option names were changed from version 0.1d,
%   the reason was to arrange and make names more memorable, and, sometimes, reduction
%   of their names (see {\sectionname}~\ref{sec:changed}).} command are built in
%   similar way as layout settings
%   of the |\captionsetup| command\footnote{Look also at the \package{caption}
%   documentation (version 3.0 and later)}.
%
%   You may use the layout settings as \package{floatrow} option in
%   the |\usepackage| line in the preamble of codument.
%   \begin{Quote}
%\begin{preamble}
%      |\usepackage[|\meta{options}|]{floatrow}|\quad.
%\end{preamble}
%   \end{Quote}
%   You may write
%   \begin{Quote}
%\begin{preamble}
%      |\usepackage[style=boxed,font=small]{floatrow}|\quad.
%\end{preamble}
%   \end{Quote}
%
%   \DescribeMacro{\floatsetup}
%   The same result you get with the |\floatsetup| command:
%   \begin{Quote}
%\begin{preamble}
%      |\usepackage{floatrow}|
%      |\floatsetup{style=boxed,font=small}|\quad.
%\end{preamble}
%   \end{Quote}
%   The lines above declare the |boxed| float style (this style creates
%   the frame around float object which is built by \LaTeX's |\fbox| command) and the
%   |\small| font for contents of float objects. These settings are loaded for \emph{all} float types.
%
%   The usage of the |\floatsetup| command has following form:
%   \begin{Quote}
%      |\floatsetup|\oarg{float type}\marg{options}\quad,
%   \end{Quote}
%   where option \meta{float type} is the name of float type. You can use this optional
%   argument for creating of special settings of chosen float type. The following command
%   \begin{Quote}
%      |\floatsetup[table]{style=Plaintop}|
%   \end{Quote}
%   sets a special float style for floating tables: captions are placed above
%   float objects; in the case of floats are placed in one row, inside the |floatrow|
%   environment, text of captions is aligned by the top lines.
%
%   The |[table]| or the |[figure]| options are not the only options you are allowed to use.
%   The |\floatsetup| command allows usage of a number of special options for settings
%   for floats in different positioning: plain floats, two-column floats (in one-column layout
%   of the document, the starred environment like
%   |figure*| can be used for alternative float layout, e.g. for
%   wide floats, which expand to the margins) rotated floats, wrapped floats. There is also
%   minor support for floats with captions placed beside float objects.\medskip
%
%   Below are  lists of all possible options of the |\floatsetup| command.
%   They are based, as example, on the |figure| environment.
%   The ``strength'' of options in the lists below decreases
%   from the previous item to the next one.
%   \begin{itemize}\label{stsetorder}
%       \item
%       Wide or two-column floats (|figure*|):
%   \begin{itemize}
%       \item
%       |\floatsetup[widefigure]|\label{setup:widefigure}---the ``strongest'' settings;
%       if they are absent, the settings from the next item will be used;
%       \item
%       |\floatsetup[widefloat]|\label{setup:widefloat}---these settings ``stronger''
%       than settings from next item (|\floatsetup[figure]|);
%       if they are absent, the settings from the next item will be used;
%       \item
%       |\floatsetup[figure]|;
%       if they are absent, package uses settings from
%       optional argument in |\usepackage| line or |\floatsetup{...}|
%       command; if they are absent---the default package settings will be used
%       (see page~\pageref{sec:default});
%   \end{itemize}
%       \item
%       Wrapped floats (|wrapfigure|, used with \package{wrapfig} package):
%   \begin{itemize}
%       \item |\floatsetup[wrapfigure]|\label{setup:wrapfigure};
%       \item |\floatsetup[wrapfloat]|\label{setup:wrapfloat};
%       \item |\floatsetup[figure]|;
%   \end{itemize}
%       \item
%       Rotated floats (|sidewaysfigure|,
%       used with \package{rotating} package):
%   \begin{itemize}
%       \item |\floatsetup[rotfigure]|\label{setup:rotfigure};
%       \item |\floatsetup[rotfloat]|\label{setup:rotfloat};
%       \item |\floatsetup[figure]|;
%   \end{itemize}
%       \item
%       Wide or two-column rotated floats
%       (|sidewaysfigure*|):
%   \begin{itemize}
%       \item |\floatsetup[widerotfigure]|\label{setup:widerotfigure};
%       \item |\floatsetup[widerotfloat]|\label{setup:widerotfloat};
%       \item |\floatsetup[rotfigure]|;
%       \item |\floatsetup[rotfloat]|;
%       \item |\floatsetup[figure]|;
%   \end{itemize}\enlargethispage\baselineskip
%   \emph{Note}. The settings
%       for wide float (|widefloat|, |widefigure|)
%       are  skipped for rotated floats---use settings for |widerotfloat|
%       and---here---|widerotfigure|;\pagebreak[1]
%       \item
%       Beside floats:
%   \begin{itemize}
%       \item |\floatsetup[floatrow]|\label{setup:floatrow};
%       \item |\floatsetup[figurerow]|\label{setup:figurerow};
%       \item
%        settings of outer environment from previous items, e.g.,
%       |sidewaysfigure*|, |sidewaysfigure|, |figure*| and |figure|.
%   \end{itemize}
%       \item
%       Floats with beside captions (please note, that settings in these options are limited,
%        see next section):
%   \begin{itemize}
%       \item |\floatsetup[capbesidefigure]|\label{setup:capbesidefigure};
%       \item |\floatsetup[capbesidefloat]|\label{setup:capbesidefloat};
%       \item
%       settings for the float row; settings of outer environment from previous items, e.g.,
%       |sidewaysfigure*|, |sidewaysfigure|, |figure*| and |figure|.
%   \end{itemize}
%   \end{itemize}
%
%   \emph{Notes}.\startNotes\nopagebreak
%
%   \Note You can also create and change special settings for captions of
%   necessary float types or subtypes, using
%   co-named \meta{float~type} options inside the |\captionsetup| command,
%   e.g., |\captionsetup[widefigure]{...}|.
%
%   \Note Please note that with |\RawFloats[...]| command  and |rawfloats=| key
%   (\sectionname~\ref{sec:rawfloats}) you will cancel all layout
%   settings created as options in the |\usepackage| line or inside
%   the |\floatsetup| command for all chosen float types/subtypes.
%
%\begingroup
%   {\emergencystretch2em\Note The |floatrow| environment ({\sectionname}~\ref{sec:floatrow})
%   and |\floatbox| commands (e.g. |\ffigbox|, |\ttabbox|, see {\sectionname}~\ref{sec:floatbox})
%   still work after both |\RawFloats| (|\RawFloats[...]|) command and |rawfloats=| key (see example width
%   figure~\ref{leftfig:raw} and table~\ref{righttab:raw})\label{FAD:MixedRowA}.
%   Also note that\startNotes\def\theNote{\alph{Note}}\Note
%   inside |\|\FRkey{floatbox} commands still can work layout settings
%   of the package, written in |\usepackage| line and inside |\floatsetup{...}| command,
%   and settings for main types of floats like |\floatsetup|\allowbreak|[figure]{...}|
%   or |\floatsetup|\allowbreak|[table]{...}|; \Note for the figures inside |\fcapside|
%   command and similar ones (with the |\|\FRkey{capbeside} command
%   inside the |\floatbox|'s \meta{preamble} option) the settings |\floatsetup|\allowbreak|[capbesidefloat]{...}|
%   and |\floatsetup|\allowbreak|[capbesidefigure]{...}| or |\floatsetup|\allowbreak|[capbesidetable]{...}|
%   work; \Note inside the \FRkey{floatrow} environment the settings |\floatsetup|\allowbreak|[floatrow]{...}|
%   and |\floatsetup|\allowbreak|[figurerow]{...}| or |\floatsetup|\allowbreak|[tablerow]{...}| are added
%   to the settings for |\floatbox|'es inside;
%   \Note also you may use |\|\FRkey{thisfloatsetup} settings in the case of usage of |\floatbox| commands.
%
%   The settings for all other layout subtypes
%   (see {\sectionname}~\ref{sec:floatsetup}) will be canceled.\par}
%\endgroup
%
%   The next few sections describe keys of |\floatsetup| macro.
%\enlargethispage\baselineskip
%   \subsection{Floatsetup Keys}\label{sec:floatkeys}
%   \FRorisubsubsection{Float Style}
%   \DescribeMacro{style}\label{setup:style}%^^A
%   The \emph{float style} could include settings of the justification (in particular) of float contents;
%   margins (in particular the alignment of float boxes); separation material between objects and captions
%   and between float boxes in a~row (mainly spaces); frames or lines and other options.
%
%   The \emph{float style} is specified by following way:
%   \begin{Options}{style=float style name }
%     \item[style=\rmfamily\mdseries\meta{float style name} ,]
%   the name of the \meta{float style name} option you may take from
%   table~\ref{tab:floatlayouts}.
%     \item[...]
%   You may create your own options with the \\|\DeclareFloatStyle| command,
%   see page~\pageref{ssec:declstyle}.
%   \end{Options}
%
%   As you may see in the table~\ref{tab:floatlayouts}, the \package{floatrow} package
%   includes all float styles
%   which emulate co-named ones from the \package{float} package.
%
%   Please note, that usage of |style=| key for floats with beside captions,
%   i.e.~using |\floatsetup| settings with options like, e.g.,
%   |[capbesidefigure]|  or |[capbesidefloat]| can destroy layout for this float subtype.
%   For example that key cancels settings for beside position of caption.
%   If you really need to create the alternative
%   layout for floats with beside captions, for example to print float objects in frames,
%   using the |Boxed| style:~\nobreak\quad1)\nobreak\enskip if you are creating
%   one-column document, revise your settings
%   which were used for float creation, maybe you didn't use the settings for
%   starred floating environments, like |figure*|, so you can load necessary settings for
%   floats with beside caption inside |\floatsetup[widefigure]{...}|, and then
%   use |figure*| environment for floats with beside captions;~\nobreak\quad2)\nobreak\enskip
%   if you can't follow advice of the previous item, you may use a bit risky
%   variant with usage of |\killfloatstyle| command,
%   see {\sectionname}~\ref{page:killfloatstyle}.\bigskip
%
%   The \package{caption} package uses its own settings and names for caption layout styles.
%   The caption's |ruled| style is the only one from \package{float}
%   package, which was predefined in \package{caption} package. (The |ruled| style
%   is used by the \package{floatrow} package as well as other \package{float} package's
%   styles.) To use caption settings of the |ruled| style, you may write
%   \begin{Quote}
%   |\captionsetup[figure]{style=ruled}|\quad .
%   \end{Quote}
%
%   \begingroup\vfill
%   \jot4pt\tabcolsep1.5\tabcolsep
%   \newlengthtocommand\settowidth\Icolumn{\small\texttt{wshadowboxx}}
%   \newlengthtocommand\settowidth\IIcolumn{\small\texttt{framestyle=wshadowbox}}
%   \newlengthtocommand\setlength\IIIcolumn{\textwidth-\Icolumn-\IIcolumn
%       -6\tabcolsep-1.6pt}
%   \newcommand\leftcell[2][16.5mm]{%^^A%
%     \hspace*{-\tabcolsep}\begin{tabular}[t]{>{%
%     \noindent
%     \vphantom{\small()\mpfootnotemark[1]}}
%       p{\hsize}}
%      #2\unskip\botstrut\end{tabular}\hspace*{-\tabcolsep}%
%     }
%   \def\LongtableHead{
%   \hfil\thead{Style} &
%   \hfil\thead{\cmd{\floatsetup} keys} &
%   \hfil\thead{Description}
%   }
%   \begin{longtable}{|>{\extrarowheight0pt\def\arraystretch{.75}\ttfamily\openup-.325pt}p{\Icolumn}
%   |>{\extrarowheight0pt\def\arraystretch{.75}\ttfamily\openup-.325pt}p{\IIcolumn}
%   |>{\parindent1em\sloppy\topstrut}p{\IIIcolumn}<{\botstrut}|}
%   \caption{Float layout styles}\label{tab:floatlayouts}\\
%   \hline
%   \LongtableHead \\ \hline\noalign{\vskip-.4pt}
%   \endfirsthead
%   \captionsetup{labelformat=continued}\caption[]{}\\
%   \hline
%   \LongtableHead \\ \hline\noalign{\vskip-.4pt}
%   \endhead
%   \captionsetup{labelformat=finished}\caption[]{}\\
%   \hline
%   \LongtableHead \\ \hline\noalign{\vskip-.4pt}
%   \endlasthead
%   \noalign{\vskip-.4pt}\hline
%   \multicolumn{3}{r@{}}{\topstrut\emph{Continued on next page}}
%   \endfoot
%   \noalign{\vskip-.4pt}\hline
%   \multicolumn{3}{r@{}}{\topstrut\emph{Finished on next page}}
%   \endprelastfoot
%   \endlastfoot
%   \multicolumn{3}{|c|}{Offered by \package{floatrow} package\botstrut\topstrut}\\
%   \hline \leftcell{plain\label{setup:plain}{\mpfootnotemark[1]\mpfootnotemark[2]\mpfootnotemark[3]}}
%   & \leftcell{\meta{none}}
%   &The style |plain| is standard \LaTeX's layout. Puts captions always below float object's contents.
%   \\\hline
%   \leftcell{\topstrut plaintop{\mpfootnotemark[1]}\botstrut}
%   & \leftcell[50mm]{\topstrut capposition=top\botstrut}
%   &The style |plaintop| is the same as |plain| style, but puts captions above
%   float object's contents---this style is analog to
%   the co-named style from the \package{float} package.\\ \cline{1-2}
%   \leftcell{\topstrut Plaintop\botstrut}
%   %^^A
%   & \leftcell[50mm]{\topstrut capposition=TOP\botstrut}
%   & Capitalized form, |Plaintop|,
%   aligns captions of the floats, which were placed in one row
%   (in the |floatrow| environment),
%   by top line (see example on the page~\pageref{tab:row:tabIII}).
%   \\\hline
%   \leftcell{\topstrut ruled\label{setup:ruled}\mpfootnotemark[1]\mpfootnotemark[3]\botstrut}
%   & \leftcell[50mm]{\topstrut capposition=top,\\ precode=thickrule,\\
%     midcode=rule,\\ postcode=lowrule,\\
%     heightadjust=all\botstrut}
%   & The first style, |ruled|, emulates co-named style from the  \package{float} package.
%   It places thick rule
%   above float box, and thin rules between caption and object and below float. Rules are separated
%   from contents by small 2pt skip (see example on the page~\pageref{leftfig:ruled}).\\ \cline{1-2}
%   %^^A
%   \leftcell{\topstrut Ruled\smash{\mpfootnotemark[2]}\botstrut}
%   &  \leftcell[50mm]{\topstrut style=ruled,\\ capposition=TOP\botstrut}
%   & Capitalized form, |Ruled|, aligns captions of the floats, which were placed beside
%   in one row (in the |floatrow| environment),
%   by top line (see example on the page~\pageref{leftfig:Ruled}).
%   \\\hline
%   \leftcell{\topstrut boxed\mpfootnotemark[1]\mpfootnotemark[2]\mpfootnotemark[3]\mpfootnotemark[4]\botstrut}
%   & \leftcell[50mm]{captionskip=2pt,\\framestyle=fbox,\\
%     heightadjust=object,\\framearound=object\botstrut}
%   &The first style, |boxed|, emulates co-named style from the  \package{float} package.
%   The \emph{width of object} equals to the width of main text (usually |\textwidth|),
%   predefined |\hsize|, or the width in |\floatbox|'s option;
%   frame climbs out to the right and left sides (see example on the page~\pageref{fig:setup:boxed}).
%   Frame separation and rule width equal to current |\fboxsep| and |\fboxrule| settings.
%   (Default values
%   are \texttt{3pt} and \texttt{.4pt} consequently.)\\ \cline{1-2}
%   %^^A
%   \leftcell{\topstrut|Boxed|\label{setup:Boxed}\mpfootnotemark[2]\mpfootnotemark[3]\botstrut}
%   & \leftcell[50mm]{\topstrut style=boxed,\\ framefit=yes\botstrut}
%   & In capitalized form, |Boxed|, \emph{the width of frame} around object fits the width of main text
%   (usually |\textwidth|), predefined |\hsize|,
%   or the width in |\floatbox|'s option; the width of object
%   is reduced to fit inside frame (see example on the page~\pageref{fig:setup:Boxed}).\\ \cline{1-2}
%   %^^A
%   \leftcell{\topstrut|BOXED|\smash{\mpfootnotemark[2]}\mpfootnotemark[3]\botstrut}
%   & \leftcell[50mm]{\topstrut framestyle=fbox,\\ framefit=yes,\\
%     heightadjust=all,\\ framearound=all\botstrut}
%   & Uppercase form, |BOXED|,
%   draws frame which fits to the width of main text (usually |\textwidth|),
%   predefined |\hsize|, or the width in |\floatbox|'s option,
%   but around all float elements: caption, object and foot material
%   (see example on the page~\pageref{BOXED:heightmod}).
%   \\ \hline
%   \multicolumn{3}{|c|}{Offered by \package{fr-fancy} package.
%   They also need \package{fancybox} package.\botstrut\topstrut}\cr\noalign{\nobreak\hrule\nobreak}
%   \leftcell{|shadowbox|\smash{\mpfootnotemark[4]}
%   \\ \botstrut\\ \hline\topstrut|Shadowbox|
%   \\ \botstrut\\ \hline\topstrut|SHADOWBOX|}
%   & \leftcell[50mm]{style=boxed,\\framestyle=shadowbox\botstrut\\ \hline\topstrut
%     style=Boxed,\\framestyle=shadowbox\botstrut\\ \hline\topstrut
%     style=BOXED,\\framestyle=shadowbox}
%   &The same as |boxed|, |Boxed| and |BOXED|
%   consequently. The |\fbox| frame changed to |\shadowbox|
%   from \package{fancybox} package (see example on the page~\pageref{fig:subfig:catsI}).
%    Besides |\fboxsep| and |\fboxrule|, there is added parameter
%   |\shadowsize|---the width of shadow,
%    default is |4pt|.
%   \\ \hline
%   \leftcell{|doublebox|\smash{\mpfootnotemark[4]}
%   \\ \botstrut\\ \hline\topstrut|Doublebox|\\
%   \botstrut\\ \hline\topstrut|DOUBLEBOX|}
%   & \leftcell[50mm]{style=boxed,\\ framestyle=doublebox\botstrut\\  \hline\topstrut
%     style=Boxed,\\ framestyle=doublebox\botstrut\\ \hline\topstrut
%     style=BOXED,\\ framestyle=doublebox}
%   &The same as |boxed|, |Boxed| and |BOXED|
%   consequently. The |\fbox| frame changed to |\doublebox|
%   from \package{fancybox} package (see example on the page~\pageref{fig:parpic:BcatII}).
%   The frame shape is controlled by |\fboxrule| and |\fboxsep| parameters.
%   \\ \hline\noalign{\penalty-9000}
%   \multicolumn{3}{|c|}{Additional float styles. They also need
%   \package{fancybox} package.\botstrut\topstrut}\cr\noalign{\nobreak\hrule\nobreak}
%   \leftcell{|wshadowbox|\smash{\mpfootnotemark[4]}
%   \\ \botstrut\\ \hline\topstrut|Wshadowbox|
%   \\ \botstrut\\ \hline\topstrut|WSHADOWBOX|}
%   & \leftcell[50mm]{style=boxed,\\framestyle=wshadowbox\botstrut\\ \hline\topstrut
%     style=Boxed,\\framestyle=wshadowbox\botstrut\\ \hline\topstrut
%     style=BOXED,\\framestyle=wshadowbox}
%   &The same as |boxed|, |Boxed| and |BOXED|
%   consequently. The |\fbox| frame changed to |\wshadowbox|,
%   based on |\shadowbox| (but drops white shade from frame, or
%   draws edges of ``second copy'') from \package{fancybox} package
%   (see example on the page~\pageref{fig:floatflt:WcatI}), you may use the same frame parameters like
%   in |shadowbox| style.
%   \\\hline
% %^^A  \multicolumn3{@{}p{\hsize}@{}}
%   \noalign
%   {\floatfoot*{When a~float style is set with frame around object which is
%   fitted to the box width (like |Boxed|), and
%   \cmd{\floatbox} macro uses \cmd{\FBwidth} command as \meta{width}
%   option, which sets box width equal to float contents, the width of all other
%   float elements in this case enlarged to get width of framed object
%   (see figure~\ref{fig:setup:FBwidth:Boxed} on the page~\pageref{fig:setup:FBwidth:Boxed}).\vspace{-3pt}\par
%   \rule{1in}{.4pt}\vspace{2pt}\parindent15pt
%^^A   \footnoterule
%
%   \mpfootnotemark[1]{The styles co-named and analogous to \package{float} package styles.}
%
%   \mpfootnotemark[2]{This style is used in the sample file \file{frsmaple01.tex}}
%
%   \mpfootnotemark[3]{This style is used in the sample file \file{frsmaple02.tex}}
%
%   \mpfootnotemark[4]{During usage of these styles in
%   |floatrow| environment you ought to enlarge
%   space between floats, using key \texttt{floatrowsep}.}
%   }}
%   \end{longtable}
%
%   \endgroup
%
%   \subsubsection{Font Settings}\label{setup:start}
%   \DescribeMacro{font}\label{setup:font}%^^A
%   Defines font for float object contents. Option
%   analogous to |font=| key in |\captionsetup| stuff.\enlargethispage\baselineskip\nopagebreak
%
%   Available font setting options:
%
%   \begin{Options}{\OptionLabel}
%     \item[scriptsize]   {\scriptsize Very small size}\allowitembreaks[-4]
%     \item[footnotesize] {\footnotesize The size usually used for footnotes}\allowitembreaks[1]
%     \item[small]        {\small Small size}
%     \item[normalsize]   {\normalsize Normal size}
%     \item[large]        {\large Large size}
%     \item[Large]        {\Large Even larger size}
%
%     \item[up]           {\upshape Upright shape}
%     \item[it]           {\itshape Italic shape}
%     \item[sl]           {\slshape Slanted shape}
%     \item[sc]           {\scshape Small Caps shape}\pagebreak[2]
%
%     \item[md]           {\mdseries Medium series}\pagebreak[2]
%     \item[bf]           {\bfseries Bold series}\pagebreak[2]
%
%     \item[rm]           {\rmfamily Roman family}
%     \item[sf]           {\sffamily Sans Serif family}
%     \item[tt]           {\ttfamily Typewriter family}
%     \item[...]
%   You may create your own options with the |\DeclareFloatFont| command,
%   see page~\pageref{ssec:declfont}.
%   \end{Options}
%
%   You may set font for float object like
%   \begin{Quote}
%      |font=small|
%   \end{Quote}
%   (which is used in current documentation), or
%   \begin{Quote}
%      |font={small,sf}|\quad .
%   \end{Quote}
%   If you need to color text of your float object, you may use the mechanism,
%   created by the version \textbf{3.1} of the \package{caption} package:
%   \begin{Quote}
%      |font={small,color={blue}}|\quad .
%   \end{Quote}
%
%   \addvspace\medskipamount\noindent
%   \DescribeMacro{footfont}\label{setup:footfont}%^^A
%   Defines font for legends or explications (defined by the |\floatfoot| command,
%   see~\textsl{\sectionname}~\ref{subsec:floatfoot}). This macro
%   uses |\captionsetup| mechanism (because |\floatfoot| macro
%   uses \package{caption} package's mechanism and utilities). By default the font size
%   of float foot text equals to footnote text: |footfont=footnotesize|.
%
%   \paragraph{Font  Settings for longtable.}
%   If you use \package{caption} package version 3.0\textbf{q},
%   the font settings, loaded in |\floatsetup|
%   in |longtable| environment, could expand to captions.
%   In this case, when you write something like
%   \begin{Quote}
%   |\floatsetup{font={sf,scriptsize,it}...|
%   \end{Quote}
%    or
%   \begin{Quote}
%   |\floatsetup[longtable]{font={sf,scriptsize,it}...|
%   \end{Quote}
%   for floats (or for [long]tables only, option [longtable] of |\floatsetup|), you ought to restore
%   correct font size, family, shape (here) and series for caption contents and write:
%   \begin{Quote}
%   |\captionsetup{font={rm,small,up}...|
%   \end{Quote}
%    or
%   \begin{Quote}
%   |\captionsetup[longtable]{font={rm,small,up}...|
%   \end{Quote}
%   The version \textbf{3.1} of \package{caption} package corrects that.
%
%   \subsubsection{Position of Caption}
%   \DescribeMacro{capposition}\label{setup:capposition}%^^A
%   Defines position of captions. It is similar to |position=|
%   key in \package{caption} package, but it has two additional
%   options:\startNotes\Note|TOP|%^^A
%   \FRmpar{Caption above\\ table object}{FAD:CaptionAboveTableII}, if you prefer to align captions
%   above  objects, in the case of beside floats (in |floatrow|
%   environment), by the top line; \Note|beside| to put caption
%   beside object (this option could be more popular in settings
%   for one environment, see about |\thisfloatsetup| on the
%   page~\pageref{thisfloatsetup}):
%   \begin{Options}{\OptionLabel}
%     \item[top]  caption above object;
%     \item[TOP]  caption above object and also aligned by top line in float
%       row.
%       For example the |Plaintop| style is the variant of
%       |plaintop| where used |capposition=TOP| settings,
%       see tables~\ref{tab:row:tabIII:CAPTOP}--\ref{tab:row:tabIV:CAPTOP};
%     \item[bottom]  caption below object;
%     \item[beside]  caption beside object.%^^A
%^^A%   \FRmpar{Beside caption and float object}{FAD:BesideCaptionII}
%   \end{Options}
%   \emph{Floatrow note}. The |auto| option does not used by the
%   |capposition=| key.
%
%   Compare two examples:
%   \begin{Quote}
%      |\floatsetup[table]{|\FRkey{style}%^^A
%       |=plain,capposition=top}%|${}\equiv{}$|style=plaintop|
%   \end{Quote}
%   \DeleteShortVerb{\|}%
%   \begingroup
%   \floatsetup[table]{style=plain,capposition=top}
%   \begin{table}[H]
%   \begin{floatrow}\tabcolsep2\tabcolsep
%   \extrarowheight1pt
%   \ttabbox
%    {\caption[Long caption of table~I with key \texttt{capposition=top}]%^^A
%     {The table~I in the row with long, long, long, long, long, long caption}\label{tab:row:tabIII:captop}}%^^A
%    {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
%     \hline
%     \multirowthead{2}[-1ex]{Left Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%     \\\hline
%     First row    &         1 &         2 \\
%     Second row   &         3 &         4 \\
%     Third row    &         6 &         8 \\
%     Fourth row   & \llap{1}0 & \llap{1}6 \\
%     \hline
%   \end{tabular}}
%
%   \ttabbox
%    {\caption[Table~II in the row with caption with key \texttt{capposition=top}]%^^A
%       {Table~II in the row with caption}\label{tab:row:tabIV:captop}}%^^A
%    {\begin{tabular}{|l|c|c|c|}
%     \hline
%     \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{3}{c|}{Data} \\
%                  \cline{2-4}
%                  & \thead{I}      & \thead{II}      & \thead{III}        \\
%     \hline
%     First row    & 1      & 2       & \phantom01 \\
%     Second row   & 3      & 4       & \phantom06 \\
%     Third row    & 6      & 8       &         28 \\
%     \hline
%   \end{tabular}}
%   \end{floatrow}
%   \end{table}
%   \endgroup
%   \MakeShortVerb{\|}%
%
%   \begin{Quote}
%      |\|\FRkey{floatsetup}|[table]{|\FRkey{style}%^^A
%           |=plain,capposition=TOP}%|${}\equiv{}$|style=Plaintop|
%   \end{Quote}
%   \DeleteShortVerb{\|}%
%   \begingroup
%   \floatsetup[table]{style=plain,capposition=TOP}
%   \begin{table}[H]
%   \begin{floatrow}\tabcolsep2\tabcolsep
%   \extrarowheight1pt
%   \ttabbox
%    {\caption[Long top-aligned caption of table~I key \texttt{capposition=TOP}]%^^A
%     {The table~I in the row with long, long, long, long, long, long caption,
%      aligned by the top line}\label{tab:row:tabIII:CAPTOP}}%^^A
%    {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
%     \hline
%     \multirowthead{2}[-1ex]{Left Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%     \\\hline
%     First row    &         1 &         2 \\
%     Second row   &         3 &         4 \\
%     Third row    &         6 &         8 \\
%     Fourth row   & \llap{1}0 & \llap{1}6 \\
%     \hline
%   \end{tabular}}
%
%   \ttabbox
%    {\caption[Table~II in the row with caption, aligned
%      at the top line with key \texttt{capposition=TOP}]{Table~II in the row with caption, aligned
%      at the top line}\label{tab:row:tabIV:CAPTOP}}%^^A
%    {\begin{tabular}{|l|c|c|c|}
%     \hline
%     \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{3}{c|}{Data} \\
%                  \cline{2-4}
%                  & \thead{I}      & \thead{II}      & \thead{III}        \\
%     \hline
%     First row    & 1      & 2       & \phantom01 \\
%     Second row   & 3      & 4       & \phantom06 \\
%     Third row    & 6      & 8       &         28 \\
%     \hline
%   \end{tabular}}
%   \end{floatrow}
%   \end{table}
%   \endgroup
%   \MakeShortVerb{\|}%
%
%   \emph{Note}. The option |TOP| uses |\label|---|\ref|
%   mechanism, so, to get necessary result with it, you need to run \LaTeX{}
%   twice (when you make changes in contents which could change number
%   of lines, you get correct result also on the second run).
%
%   \subsubsection{Position of Beside Caption}
%   \DescribeMacro{capbesideposition}\label{setup:capbesideposition}%^^A
%   Defines position of beside captions: vertical and horizontal.
%   For horizontal position there are defined four options:
%   \begin{Options}{\OptionLabel}
%     \item[left]
%     caption is printed to the left side of object (the default option, see example above);
%     \item[right]
%     caption is printed to the right side of object;
%     \item[inside]
%     caption is printed in binding side of page if |twoside| option
%     switched on in document class and key \FRkey{facing}|=yes| is used;
%     in |oneside| option of document (or key |facing=no| is used),
%     caption is printed at the left side;
%     \item[outside]
%     least popular option: caption printed in
%     outer side of page if |twoside| option switched on
%     in document class and key |facing=yes| is used;
%     in |oneside| option of document (or key |facing=no| is used),
%     caption is printed at the right side; this option makes sense for the document with usage of
%     outer margins.
%   \end{Options}
%
%   For vertical position there are defined three options
%   \begin{Options}{\OptionLabel}\samepage
%     \item[top]
%     caption aligned to the top of object;
%     \item[bottom]
%     caption aligned to the bottom of object;
%     \item[center]
%     caption aligned to the center of object.
%   \end{Options}
%   You may define position of beside caption by following:
%   \begin{Quote}
%     |capbesideposition={top,outside}|\quad.
%   \end{Quote}
%
%   \begingroup
%   \begin{Quote}
%   \begin{preamble}
%   |\floatsetup[widefigure]{|\FRkey{margins}|=hangleft,capposition=beside,|\\%^^A
%   |    capbesideposition={top,left},|\FRkey{floatwidth}|=\textwidth}|\nopagebreak
%   \end{preamble}
%   |\begin{figure*}|
%   |  \includegraphics{BlackDog}|
%   |  \caption{...}\label{...}|\nopagebreak
%   |\end{figure*}|
%   \end{Quote}%
%
%   \floatsetup[widefigure]{margins=hangleft,capposition=beside,capbesideposition={top,left},floatwidth=\textwidth}
%   \begin{figure*}[H]
%   \setlength\unitlength{2.12\unitlength}\input{BlackDog.picture}%^^A
%   \caption[Wide figure with the settings of float box width \texttt{floatwidth=}\cmd{\textwidth};
%       caption beside object (on the margins),
%       top aligned]{Wide figure with the settings of float box width
%       \texttt{floatwidth=}\cmd{\textwidth}; caption beside object (on the margins),
%       aligned by top of graphics}%
%   \label{fig:capbeside}
%   \end{figure*}%
%   \endgroup
%
%   See examples in file \file{frsample02.tex} with all variants of
%   position of captions beside float objects.
%
%   \subsubsection{Defining The Width of Beside Caption}
%   \DescribeMacro{capbesidewidth}\label{setup:capbesidewidth}%^^A
%   Defines width of beside caption. This option could be more preferable
%   in settings for one environment, see about |\thisfloatsetup| on the
%   page~\pageref{thisfloatsetup}. You may set:
%   \begin{Quote}
%      |capbesidewidth=4cm|\quad.
%   \end{Quote}
%   (see figure~\ref{capbesideframeI}). If you'll write |capbesidewidth=none| or
%   |capbesidewidth=sidefil| (this is default key setting), the
%   width of caption will be calculated by usual way, accordingly
%   to float width (i.e. occupies the rest width of float box, see
%   figure~\ref{intro:beside:FBwidth} on the page~\pageref{intro:beside:FBwidth}).
%
%   \subsubsection{Defining Width of Object}\label{sec:wd:object}
%   \noindent
%   \DescribeMacro{floatwidth}\label{setup:floatwidth}%^^A
%   It is used for redefinition of width of objects.
%   This key, similar to |\capbesidewidth=|:
%   \begin{Quote}
%      |floatwidth=.35\hsize|
%   \end{Quote}
%   or
%   \begin{Quote}
%      |floatwidth=7cm|
%   \end{Quote}
%   It could be used at first for settings of one floating environment
%   (see page~\pageref{thisfloatsetup} about settings for current floating environment
%   and |\thisfloatsetup|). Such settings anyway may be used for example for wide floats
%   with the object width equal to main text width (|floatwidth=\textwidth|) and
%   beside caption placed on the margins (see figure~\ref{color:frame}).
%   \pagebreak[1]
%
%   \begingroup
%   \begin{Quote}
%   \begin{preamble}
%   |\floatsetup[figure]{|\FRkey{margins}|=raggedright}|\nopagebreak
%   \end{preamble}
%   |\|\FRkey{thisfloatsetup}%^^A
%       |[figure]{floatwidth=.35\hsize}|\nopagebreak
%   |\begin{figure}|
%   |  \includegraphics[width=\hsize]{Bear}|
%   |  \caption{...}\label{...}|
%   |\end{figure}|
%   \end{Quote}%
%
%   \floatsetup[figure]{margins=raggedright}
%   \thisfloatsetup{floatwidth=.35\hsize}
%   \begin{figure}[H]
%   \setlength\unitlength{\hsize/100}\input{Bear.picture}%^^A
%   \caption{Graphics with settings \texttt{floatwidth=0.35}\cmd{\hsize} moved to the left margin}%
%   \label{fig:floatwidth}
%   \end{figure}%
%   \endgroup
%
%   \begingroup
%   \begin{Quote}%
%   |\|\FRkey{thisfloatsetup}%^^A
%       |{floatwidth=.35\hsize,|\FRkey{capbesidewidth}|=sidefil,|\nopagebreak
%   |      |\FRkey{capposition}|=beside,|\FRkey{capbesideposition}|=right}|
%   |...|
%   \end{Quote}%
%
%   \thisfloatsetup{floatwidth=.35\hsize,capbesidewidth=sidefil,
%           capposition=beside,capbesideposition=right}
%   \begin{figure}[H]
%   \setlength\unitlength{\hsize/100}\input{Bear.picture}%^^A
%   \caption{Caption beside graphics with the width settings \texttt{floatwidth=0.35}\cmd{\hsize}}%^^A
%   \label{fig:beside:floatwidth}
%   \end{figure}%
%   \endgroup
%   (These examples you can write also using box commands with the width option: |\ffigbox[.35\hsize]|
%   and |\fcapside[.35\hsize]| consequently.)
%
%   If you use option |floatwidth=sidefil| for objects with beside
%   captions (in the case of key |capbesidewidth=|, uses absolute
%   value, like |capbesidewidth=4cm|) the box with object contents (instead of caption's)
%   occupies the rest space of float box (see
%   figure~\ref{capbesideframeI} on the page~\pageref{capbesideframeI} and appendix,
%   figure~\ref{fig:capbeside:trick} on the
%   page~\pageref{fig:capbeside:trick}).
%
%   \subsubsection{Other Settings for Beside Captions}
%   \medskip\noindent
%   \DescribeMacro{capbesideframe}\label{setup:capbesideframe}%^^A
%   This boolean key declares whether the beside caption stays near the framed object
%   (|capbesideframe=yes|) in this case caption lines will be aligned by top
%   or bottom of frame; otherwise caption lines will be aligned with top or
%   bottom of framed object's \emph{contents} (|capbesideframe=no|).
%   \newcommand\TEXTBOX[1][]{\par
%   Here goes first line of text \Text\par
%   There goes second line of text#1\par
%   Hence goes third line of text\par
%   Thence goes fourth line of text}
%   \def\Text{{\mdseries and more text and some more text and a bit more text and
%           a little more text and a little piece of text to fill space}}
%\begingroup
%  \begin{Quote}
%   \begin{preamble}
%   |\floatsetup[figure]{|\FRkey{style}|=Boxed,|%^^A
%       \FRkey{frameset}|={\fboxsep8pt},|\nopagebreak
%   |  |\FRkey{objectset}|=justified,|%^^A
%   |capbesideposition={right,top},capbesideframe=yes}|
%   |\captionsetup[figure]{...,strut=no}|
%   \end{preamble}
%   |\|\FRkey{thisfloatsetup}%^^A
%   |{|\FRkey{capposition}|=beside,|
%   |      |\FRkey{floatwidth}|=sidefil,|%^^A
%       \FRkey{capbesidewidth}|=4cm}|
%   |\begin{figure}|
%   |  ...|
%   |  \caption{...}\label{...}|\nopagebreak
%   |\end{figure}|
%   | |
%  \end{Quote}%
%   \floatsetup[figure]{style=Boxed,frameset={\fboxsep8pt},capbesideframe=yes,objectset=justified,
%       capbesideposition={right,top},footnoterule=limited}
%   \captionsetup[figure]{strut=no}
%   \thisfloatsetup{capposition=beside,floatwidth=sidefil,capbesidewidth=4cm}
%   \begin{figure}[H]
%   {\TEXTBOX}
%   {\caption{Caption beside framed object, (caption has width 4\,cm), aligned by top of frame}%^^A%
%   \label{capbesideframeI}}%
%   \end{figure}
%  \begin{Quote}
%   \begin{preamble}
%   |\floatsetup[figure]{...,capbesideframe=no}|
%   |...|
%   \end{preamble}
%   |\|\FRkey{thisfloatsetup}%^^A
%   |{|\FRkey{capposition}|=beside,|
%   |      |\FRkey{floatwidth}|=9cm,|%^^A
%       \FRkey{capbesidewidth}|=sidefil}|
%  \end{Quote}%
%   \floatsetup[figure]{capbesideframe=no}
%   \thisfloatsetup{capposition=beside,floatwidth=9cm,capbesidewidth=sidefil}
%   \captionsetup{strut=no}
%   \begin{figure}[H]
%   {\TEXTBOX}
%   {\caption{Caption beside framed object, (object has width 9cm), aligned by top of object contents}%
%   \label{row:text:I}}%
%   \end{figure}
%\endgroup
%
%   \emph{Floatrow note.} For examples above the |\captionsetup{strut=no}| sentence also was used,
%   which cancels struts at the beginning and end of caption (|\strut|: the rules with height
%   and depth, which are set accordingly to current |\baselineskip|).
%
%   \penalty-9000
%   \subsubsection{Defining Float Foot Position (Legends and Footnotes)}\label{sec:footposition}
%   \DescribeMacro{footposition}\label{setup:footposition}%^^A
%   Defines position of |\footnote|'s and |\floatfoot|'s in float box
%   with above/below captions.
%   (See examples in file \file{frsample01.tex}.)
%   \begin{Options}{\OptionLabel}
%     \item[default]
%     if caption above float object foot material is placed below float
%     object, otherwise below caption;
%     \item[caption]
%     always placed below caption;
%     \item[bottom]
%     always placed at the bottom of float box.
%   \end{Options}
%   In the case of caption
%   beside float object, footnotes and foot text are always placed below
%   caption.
%
%   The next example shows the usage of the |caption| option of this key:
%\begin{Quote}
%\begin{preamble}
%|\floatsetup{|\FRkey{style}|=ruled,footposition=caption}|
%\end{preamble}
%   |\begin{figure}|
%   |    ...|
%   |    \caption{...}\label{...}%|
%   |    \floatfoot{...}|
%   |\end{figure}|
%\end{Quote}%
%\begingroup\floatsetup[figure]{style=ruled,footposition=caption}
%   \begin{figure}[H]
%   \unitlength1.2\unitlength\input{TheCat.picture}
%   \caption{The \texttt{ruled} figure with explications which are placed under caption contents}%
%   \label{ruled:footposition}%
%   \floatfoot{The graphics demonstrate very pleasant muzzle of the very funny ginger cat with very
%       fluffy fur. The cat has yellow eyes, big ears, a small pink wet nose, and thick white whiskers}
%   \end{figure}%^^A
%\endgroup
%
%   \subsubsection{Vertical Alignment of Float Elements}\label{sec:heightadjust}
%   \DescribeMacro{heightadjust}\label{setup:heightadjust}%^^A
%   Defines whether the common maximum height of objects
%   or/and captions in the |floatrow| environment will be used for building of float row.
%   It has following options\par
%   \begin{Options}{\OptionLabel}\samepage
%     \item[all]
%     adjust both caption and object heights (e.g. for styles
%     |ruled|, |Ruled| and |BOXED|);
%     \item[caption]
%     adjust caption heights (e.g. for  |Plaintop| style);
%     \item[object]
%     adjust object heights (e.g. for |Boxed| style);
%     \item[none]
%     nothing to be adjusted (the |plain| style);
%     \item[nocaption]
%     no adjusting for captions;
%     \item[noobject]
%     no adjusting for objects;
%   \end{Options}
%   You may define height adjustment even as followed:
%   \begin{Quote}
%     |heightadjust={caption,noobject}|\quad.
%   \end{Quote}
%
%   The following two examples show |ruled| and |Ruled| style.
%   Both styles use |heightadjust=all| key option, but first style
%   uses |capposition=top|, and second one---|capposition=TOP|.
%\begin{Quote}
%\begin{preamble}
%|\floatsetup{|\FRkey{style}|=ruled}|
%\end{preamble}
%   |\begin{figure}|
%   |\begin{|\FRkey[sec]{floatrow}|}|
%   |  \|\FRkey[FB]{ffigbox}
%   |    {...}{\caption{The left ...}\label{...}}%|
%
%   |  \ffigbox|
%   |    {\caption{The beside ...}\label{...}}{...}|
%   |\end{floatrow}|\nopagebreak
%   |\end{figure}|\vspace*{-.75\intextsep}
%\end{Quote}%
%   \begin{figure}[H]\floatsetup{style=ruled}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox
%   {\unitlength.75\unitlength\input{BlackCat.picture}}
%   {\caption{Left \texttt{ruled} figure}%
%   \label{leftfig:ruled}}%
%
%   \ffigbox
%   {\caption{The beside figure at the right side uses settings of  \texttt{ruled} layout}%^^A
%    \label{rightfig:ruled}}
%   {\unitlength1.15\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%\begin{Quote}
%\begin{preamble}
%|\floatsetup{style=Ruled}|
%\end{preamble}\nopagebreak
%   |...|\vspace*{-.75\intextsep}
%\end{Quote}%
%   \begin{figure}[H]\floatsetup{style=Ruled}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox
%   {\unitlength.75\unitlength\input{BlackCat.picture}}
%   {\caption{Left \texttt{Ruled} figure}%
%   \label{leftfig:Ruled}}%
%
%   \ffigbox
%   {\caption{The beside figure at the right side uses settings of  \texttt{Ruled} layout}%^^A
%    \label{rightfig:Ruled}}
%   {\unitlength1.15\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}\pagebreak[1]
%
%   \addvspace\medskipamount\noindent
%   \DescribeMacro{valign}\label{setup:valign}%^^A
%   Defines vertical alignment of
%   float objects in |floatrow| if |heightadjust=all| or
%   |heightadjust=object| keys were used, or |\floatbox| stuff uses \meta{height}
%   argument with value, which differs from the height of object.
%   The options of this key are analogous to vertical
%   alignment option in |minipage| environment and |\parbox|
%   command. Default option is |c| (centered vertical alignment).
%   \begin{Options}{cc}\samepage
%     \item[t]
%     aligns objects by top line;
%     \item[c]
%     aligns objects by center line (this is default for all float styles which
%     use |heightadjust=object| or |heightadjust=all| settings, see examples above);
%     \item[b]
%     aligns objects by bottom line;
%     \item[s]
%     stretches objects by full height (if it is possible).
%   \end{Options}\pagebreak[1]
%
%   Next example (figure~\ref{BOXED:heightmod}) shows default vertical centered alignment
%   for figure with changed  height (remember that empty \meta{width} option means |\hsize|).
%\begin{Quote}\openup-.5pt
%\begin{preamble}
%|\floatsetup{style=BOXED}|
%|\usepackage{calc}|\nopagebreak
%\end{preamble}\vskip-.5\lastskip
%   |\begin{figure}|\nopagebreak
%   |  \|\FRkey[FB]{ffigbox}|[][\FBheight+2cm]|\nopagebreak
%   |...|
%   |\end{figure}|\vspace*{-.75\intextsep}
%\end{Quote}\pagebreak[1]
%   \begin{figure}[H]\floatsetup{style=BOXED}\killfloatstyle
%   \ffigbox[][\FBheight+2cm]
%   {\unitlength.95\unitlength\input{TheCat.picture}}
%   {\caption{The figure inside \cmd{\ffigbox} has \meta{height} option, vertically centered}%
%   \label{BOXED:heightmod}}%
%   \end{figure}%^^A
%
%   The example with figures \ref{leftfig:BOXED:valigned}
%   and \ref{rightfig:BOXED:valigned} shows |BOXED| style, which
%   uses |heightadjust=all| settings already, and
%   also the |valign=t| option was added.
%^^A%   (see also example with various alignment on the page
%^^A%    \pageref{example:ruledcapposTOP}).
%\begin{Quote}\openup-.5pt
%\begin{preamble}
%|\floatsetup{style=BOXED,valign=t}|
%|\usepackage{calc}|\nopagebreak
%\end{preamble}
%   |\begin{figure}|
%   |\begin{|\FRkey[sec]{floatrow}|}|
%   |  \|\FRkey[FB]{ffigbox}|[\|\FRkey[FB]{FBwidth}|+2cm]|
%   |    {...}|
%   |    {\caption{Left ...}\label{...}}%|
%
%   |  \ffigbox[\FBwidth+2cm][2\|\FRkey[FB]{FBheight}|]|\nopagebreak
%   |    {\caption{The beside ...}\label{...}}|
%   |    {...}|
%   |\end{floatrow}|\nopagebreak
%   |\end{figure}|\vspace*{-.75\intextsep}
%\end{Quote}%
%   \begin{figure}[H]\floatsetup{style=BOXED,valign=t}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.8\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure uses settings for vertical top alignment}%
%   \label{leftfig:BOXED:valigned}}%
%
%   \ffigbox[\FBwidth+2cm][2\FBheight]
%   {\caption{The beside figure at the right side in float row uses settings for vertical top alignment too}%^^A
%    \label{rightfig:BOXED:valigned}}
%   {\unitlength1\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%   Please look at the \meta{height} and \meta{width} options of |\ffigbox|
%   commands of the figure~\ref{BOXED:heightmod}
%   and beside figures~\ref{leftfig:BOXED:valigned}, \ref{rightfig:BOXED:valigned} consequently:
%   you may set the height and widths in this way with \package{calc} package.
%   Right figure in the row has double height in the \meta{height} argument of |\ffigbox|.
%
%
%   \subsubsection{Facing Layout}
%   \DescribeMacro{facing}\label{setup:facing}%^^A
%   This key defines whether facing layout is used
%   for floats, if it is switched on, key options, which create different layout for even and odd pages
%   are switched on. This key works if |twoside| option is switched on inside the
%   document class line.
%
%   The most popular usage of |facing| key is printing of
%   beside captions to the inner sides of pages with option
%   |capbesideposition=inside| (the opposite option is |capbesideposition=outside|)
%   works together with switched |facing=yes| key.
%
%   The figures~\ref{intro:beside} and~\ref{intro:beside:FBwidth} with beside captions
%   in the Introduction illustrate these options---%^^A
%   |facing=yes,|\allowbreak|capbesideposition=inside|.
%
%   \subsubsection{Object Settings}\label{sec:set:object}
%   \noindent
%   \DescribeMacro{objectset}\DescribeMacro{justification}\label{setup:objectset}%^^A
%   Defines justification of float object
%   (float contents). Predefined options are similar to
%   |justification=| key in |\captionsetup|.
%   \begin{Options}{RaggedRigh}
%     \item[justified]
%     Blocks (in the case of a~picture or text in parbox)
%     moved to the left, the text aligned as a normal paragraph (without indentation).
%
%     \item[centering]
%     Blocks centered, each line of the object text will be centered. (This is the default.)
%
%     \item[raggedright]
%     Blocks moved to the left, each line of the text shoved to the left margin.
%
%     \item[RaggedRight]
%     As in previous item, each line of the text shoved to the
%     left margin, too.
%     But this time the command |\RaggedRight| of the \package{ragged2e} package
%     will be used to achieve this. This difference is that this time
%     the word breaking algorithm of \TeX\ will work inside the text.
%
%     \item[raggedleft]
%     Blocks moved to the right,
%     each line of the text shoved to the right margin.
%
%^^A%     \item[RaggedLeft]
%^^A%     Analogous to |RaggedRight|.
%
%     \item[...]
%   You may also create  your own settings with the |\DeclareObjectSet| command (see
%   page~\pageref{ssec:decl:oset})
%   \end{Options}
%
%   \subsubsection{Defining Float Margins}\label{sec:set:box}
%   \DescribeMacro{margins}\label{setup:margins}%^^A
%   Defines margins (skips, rules or other margin material) of alone float boxes with
%   captions above/below, of float boxes with beside captions, and of
%   |floatrow| environments. It has following three predefined
%   options:
%   \begin{Options}{hangoutside}
%     \item[centering]
%     float box centered;
%     \item[raggedright]
%     float box flushed to the left (see figure~\ref{fig:floatwidth});
%     \item[raggedleft]
%     float box flushed to the right;
%     \item[hangleft]
%     usually for wide floats: left edge of float boxes hangs to the margin space (there are used
%     |\marginparwidth| and |\marginparsep| values; the |\leftskip| and |\rightskip| values are
%     added, which have been taken from the settings of the |objectset=| key);
%     \item[hangright]
%     analogous to previous, right edge of floats boxes hangs to the margin space;
%     \item[hanginside]
%     analogous to previous, but in this option hangs inner edge for facing/twoside layout,
%     or left margin for one side layout;
%     \item[hangoutside]
%     analogous to previous, but in this option hangs outer edge for facing/twoside layout,
%     or right margin for one side layout;
%     \item[...]
%   You may create your own alignment settings with \\|\DeclareMarginSet| command, see
%   page~\pageref{ssec:decl:marg}.
%   \end{Options}
%
%   \subsubsection{Defining Float Separators}\label{sec:set:sep}
%   \noindent
%   \DescribeMacro{floatrowsep}\label{setup:floatrowsep}%^^A
%   Sets separation material between beside float boxes in one row
%   inside |floatrow| environment (see page~\pageref{sec:floatrow}).
%
%   \addvspace\smallskipamount\noindent
%   \DescribeMacro{capbesidesep}\label{setup:capbesidesep}%^^A
%   Sets separation material between object and beside caption (see page~\pageref{intro:beside}).
%
%   \RestoreSpaces
%   Both key settings work similarly to |labelsep=| key
%   from |\captionsetup|.
%^^A
%   They use following predefined options:
%   \begin{Options}{\OptionLabel}
%     \item[columnsep]
%     horizontal skip${}={}$|\columnsep| (default for both keys);
%     \item[quad]
%     horizontal skip${}={}1$\,em;
%     \item[qquad]
%     horizontal skip${}={}2$\,em;
%     \item[hfil]
%     horizontal skip${}={}1$\,fil (like |\hfil|);
%     \item[hfill]
%     horizontal skip${}={}1$\,fill (like |\hfill|);
%     \item[none]
%     empty separator.
%     \item[...]
%   You may also create  your own settings with the\\ |\DeclareFloatSeparators| command (see
%   page~\pageref{setup:DeclareFloatSeparators})
%   \end{Options}
%   This documentation uses settings |floatrowsep=qquad| for separation of
%   beside floats and\allowbreak\ |capbesidesep=quad|
%   for floats with beside captions.
%
%   The figure \ref{fig:plain:trick} uses tricky float style, which shows you layout, where
%   the |capbesidewidth=| key with absolute value appears very useful.
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey{DeclareFloatSeparators}|{mcapwidth}{\hskip-\FCwidth}|
%|\floatsetup[figure]|
%| {|\FRkey{style}|=plain,|\FRkey{objectset}|=centering,|\FRkey{margins}|=centering,|
%|  |\FRkey{capbesidewidth}|=6cc,|%^^A
%    \FRkey{capbesideposition}|=left,|\FRkey{capbesidesep}|=mcapwidth,|
%|  |\FRkey{floatwidth}|=sidefil}|\smallskip
%|\captionsetup[capbesidefigure]{labelsep=newline,|
%|  justification=raggedright}|\nopagebreak
%\end{preamble}
%   |\begin{figure}|\nopagebreak
%   |\|\FRkey[FB]{fcapside}\nopagebreak
%   |\end{figure}|
%\end{Quote}
%   In this style all figures with beside captions centered accordingly to
%   full text \verb|\hsize|, because of the separator between float object and
%   caption has negative value of caption width.
%   Usage of such float layout supposes that all
%   float objects with beside captions are narrower than |\hsize| (|\textwidth|) by at least 2~caption
%   widths. Please note the |\FCwidth| command in the definition of |mcapwidth|
%   key---later you may change the width of beside caption (loading e.g.
%   |\thisfloatsetup|\allowbreak|{capbesidewidth=8cc}| settings), and, in spite of the value
%   the separator also will be changed, picture will be anyway
%   centered accordingly to full \verb|\hsize|.
%
%   \begingroup
%   \clearfloatsetup{figure}\floatsetup[figure]
%    {style=plain,objectset=centering,
%     floatwidth=\columnwidth,capbesidewidth=6cc,
%     capbesideposition=left,capbesidesep=mcapwidth,
%     margins=centering,floatwidth=sidefil}
%   \captionsetup[capbesidefigure]{labelsep=newline,
%     justification=raggedright}
%   \begin{figure}[H]
%     \fcapside{}{\unitlength1.1\unitlength
%     \input{Doll.picture}
%     \caption[Beside caption with ``hidden'' width (\texttt{=6cc}),
%       object is centered at the full text width]{%^^A
%     Plain figure}\label{fig:plain:trick}}
%   \end{figure}%
%   \endgroup
%
%   \subsubsection{Defining Float Rules/Skips}\label{sec:set:rule}
%   \DescribeMacro{precode}\label{setup:precode}%^^A
%   Defines skip, rule or other analogous code above float box (see page~\pageref{intro:leftfig:box}).
%
%   \addvspace\smallskipamount\noindent
%   \DescribeMacro{rowprecode}\label{setup:rowprecode}%^^A
%   Defines skip, rule or other analogous code above alone float box,
%   or, in the case of beside floats inside |floatrow| environment,
%   above float row (see page~\pageref{intro:leftfig:row} and~\pageref{fig:rotrow:WcatI}).
%
%   \addvspace\smallskipamount\noindent
%   \DescribeMacro{midcode}\label{setup:midcode}%^^A
%   Defines skip, rule or other analogous code between
%   caption above/below and float object.
%
%   \addvspace\smallskipamount\noindent
%   \DescribeMacro{postcode}\label{setup:postcode}%^^A
%   Defines skip, rule or other analogous code below float box (see page~\pageref{intro:leftfig:box}).
%
%   \addvspace\smallskipamount\noindent
%   \DescribeMacro{rowpostcode}\label{setup:rowpostcode}%^^A
%   Defines skip, rule or other analogous code below alone float box, or,
%   in the case of beside floats inside |floatrow| environment,
%   below float row (see page~\pageref{intro:leftfig:row} and~\pageref{fig:rotrow:WcatI}).
%
%   For all these keys there are predefined following options (settings
%   were taken from styles created in \package{float} package):
%   \begin{Options}{\OptionLabel}\allowitembreaks[-1]
%     \item[none]
%     absent code (the default option for |precode=|, |rowprecode=|, |postcode=| and |rowpostcode=|
%     keys); in |plain|, |plaintop|, |boxed|, and similar styles;
%     \item[thickrule]
%     thick rule (.8pt) with 2pt vertical skip below---rule above float box
%     in |ruled| and |Ruled| styles which is used there by
%     |precode=| key (see figures~\ref{leftfig:ruled}--\ref{rightfig:Ruled});
%     \item[rule]
%     rule of default thickness (.4pt), with 2pt vertical skips above and below---middle rule
%     in |ruled| and |Ruled| styles is printed between object and caption, and
%     used there by |midcode=| key;
%     \item[lowrule]
%     rule of default thickness (.4pt), with 2pt vertical skip above---rule below float box
%     in |ruled| and |Ruled| styles, used there by
%     |postcode=| key;
%     \item[captionskip]
%     vertical skip which uses the value, defined in |captionskip=| key; the default option for
%     |midcode=| key: this option is used
%     in |plain|, |plaintop|, |boxed|, and similar styles.
%     \item[...]
%   You may create your own options with the |\DeclareFloatVCode| command,
%   see page~\pageref{ssec:decl:rule}.
%   \end{Options}
%   The |rowprecode=| and~|rowpostcode=| keys, in the case of unfilled row
%   may occupy the whole width of the predefined size or get the natural width of row,
%   depending to the defined settings  of row contents (see description of the
%   \FRkey{rowfill} key, page~\pageref{setup:rowfill}).
%
%   \subsubsection{Defining Float Frames}
%   \DescribeMacro{framestyle}\label{setup:framestyle}%^^A
%   Defines type of frame; the
%   \package{floatrow} package offers only two types of frames:
%   \begin{Options}{\OptionLabel}
%     \item[fbox]
%     standard frame;
%     \item[colorbox]
%     colored frame, needs also \package{color} package;
%     if not defined,  the |\fbox| command is used instead.
%     \item[FRcolorbox]\label{setup:FRcolorbox}%
%     colored frame which allow to set additional material attached to its corners,
%     needs also \package{color} package;
%     if not defined, there is used |\fbox|;
%     \item[corners]\label{setup:corners}%
%     the same as previous but without |\colorbox|---it puts the corner material only
%     (current option doesn't need the frame definition);
%     anyway it needs also \package{color} package.
%   \end{Options}
%   There are options for additional frames, offered by \package{fr-fancy}
%   package, installed with |floatrow|:
%   \begin{Options}{\OptionLabel}
%     \item[doublebox]
%     double frame, needs also \package{fancybox} package;
%     \item[shadowbox]
%     frame with shadow, needs also \package{fancybox} package;
%     \item[wshadowbox]
%     modified |shadowbox| frame (frame with ``white shadow''),
%     needs also \package{fancybox} package.
%   \end{Options}
%
%   \enlargethispage{\baselineskip}
%   \addvspace\medskipamount\noindent
%   \DescribeMacro{frameset}\label{setup:frameset}%^^A
%   The parameters for chosen frame; there are no predefined options
%   for this key, just write something like:
%   \begin{Quote}
%     |frameset={\fboxrule1pt\fboxsep12pt}|\quad.
%   \end{Quote}
%   The default settings for frame building with the
%   |\fbox| command:
%   \begin{Quote}
%     |\fboxrule=.4pt \fboxsep=3pt|\quad.
%   \end{Quote}
%
%   \noindent
%   \DescribeMacro{framearound}\label{setup:framearound}%^^A
%   Declares element of float box to be framed:
%   \begin{Options}{\OptionLabel}
%     \item[none]
%     no frames (usually not used);
%     \item[object]
%     float object contents;
%     \item[all]
%     full float box including object, caption, and any foot text;
%     \item[row]
%     float row of beside floats, or alone float;
%     \item[none]
%     nothing.
%   \end{Options}
%
%   \addvspace\medskipamount\noindent
%   \DescribeMacro{framefit}\label{setup:framefit}%^^A
%   Boolean which sets whether the \textit{frame width} will
%   be equal to current |\hsize|, predefined width or value of \meta{width} option of
%   float box (|framefit=yes|), in this case object size reduced (see
%   figures~\ref{fig:setup:Boxed} and~\ref{fig:setup:FBwidth:Boxed});
%   or the frame climbs out in the left and
%   right sides, and \textit{width of object} has current
%   |\hsize|, predefined width or value of \meta{width} option of
%   float box (|framefit=no|, see figure~\ref{fig:setup:boxed}).
%  \begingroup
%  \begin{Quote}%
%\begin{preamble}%
%   |\floatsetup[figure]{framestyle=fbox,|\nopagebreak
%   |      framearound=object,frameset={\fboxrule1pt\fboxsep10pt},|
%   |      framefit=yes}%|$\approx|style=Boxed|$
%\end{preamble}%
%   |\begin{figure}|
%   |\|\FRkey[FB]{ffigbox}|[4cm]|
%   |   {...}{\caption{...}}|\nopagebreak
%   |\end{figure}|
%  \end{Quote}\pagebreak[1]
%   \floatsetup[figure]{framestyle=fbox,heightadjust=object,
%     framearound=object,frameset={\fboxrule1pt\fboxsep10pt},framefit=yes}%^^A$\equiv|style=Boxed|$
%  \begin{figure}[H]%
%  \ffigbox[4cm]
%  {\input{Cat.picture}}{\caption{The frame around graphics fits to the width of float
%       box (here: caption)}\label{fig:setup:Boxed}}
%  \end{figure}%
%  \begin{Quote}%
%\begin{preamble}%
%   |\floatsetup[figure]{...,framefit=no}%|$\approx|style=boxed|$
%\end{preamble}%
%   |\begin{figure}|%
%   |\|\FRkey[FB]{ffigbox}|[4cm]|
%   |  {...}{\caption{...}}|\nopagebreak
%   |\end{figure}|\vspace*{-\intextsep}
%  \end{Quote}%
%   \floatsetup[figure]{framestyle=fbox,heightadjust=object,
%     framearound=object,frameset={\fboxrule1pt\fboxsep10pt},framefit=no}%^^A$\equiv|style=boxed|$
%  \begin{figure}[H]%
%  \ffigbox[4cm]
%  {\input{Cat.picture}}{\caption{The frame around graphics climbs out to the right and
%   left sides}\label{fig:setup:boxed}}
%  \end{figure}%
%
%   Next follows an example with |framefit=yes| key in the case of |[\|\FRkey{FBwidth}|]|
%   option of |\ffigbox|
%   command. In this case the width of float box (here: the width of caption) expanded to the
%   width of framed object.
%  \begin{Quote}%
%\begin{preamble}%
%   |\floatsetup[figure]{...,framefit=yes}%|$\approx|style=Boxed|$
%\end{preamble}%
%   |\begin{figure}|
%   |\|\FRkey[FB]{ffigbox}|[\|\FRkey[FB]{FBwidth}|]|
%   |   {...}{\caption{...}}|
%   |\end{figure}|\vspace*{-\intextsep}
%  \end{Quote}\pagebreak[1]
%   \floatsetup[figure]{framestyle=fbox,heightadjust=object,
%     framearound=object,frameset={\fboxrule1pt\fboxsep10pt},framefit=yes}%^^A$\equiv|style=Boxed|$
%  \begin{figure}[H]%
%  \ffigbox[\FBwidth]
%  {\input{Cat.picture}}{\caption[The framed object contents have natural width; the
%        the width of float box (here: caption) was expanded to fit the width of
%        framed object]{Framed object has natural width;
%        the caption width expanded}\label{fig:setup:FBwidth:Boxed}}
%  \end{figure}%
%  \endgroup
%
%   \addvspace\medskipamount\noindent
%   \DescribeMacro{rowfill}\label{setup:rowfill}%^^A
%   Boolean key which in the case of |true| the material above and below float
%   row (the |rowprecode=| and |rowpostcode=| keys) or row frames (|framestyle=row| option)
%   will be expanded to full predefined width, otherwise the rule or frame material will
%   have natural width of beside float boxes. (Unfilled row aligned using the
%   |objectset=| settings.) Default value is |false|.
%
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey{DeclareColorBox}|{yellowplate}{\colorbox{yellow}}|
%|\floatsetup{style=plain,|\FRkey{framestyle}|=colorbox,|
%|   |\FRkey{framearound}|=row,|\FRkey{colorframeset}|=yellowplate,|\FRkey{frameset}|={\fboxrule0pt},|
%|   |\FRkey{framestyle}|=colorbox,|\FRkey{framefit}|=yes,|\FRkey{heightadjust}|=object,|\FRkey{valign}|=c}|
%|\usepackage{calc}|\nopagebreak
%\end{preamble}
%   |\begin{figure}|
%   |\begin{|\FRkey[sec]{floatrow}|}|
%   |  \|\FRkey[FB]{ffigbox}|[\|\FRkey[FB]{FBwidth}|+2cm]|
%   |    {...}|
%   |\end{floatrow}|\nopagebreak
%   |\end{figure}|\vspace*{-.75\intextsep}
%\end{Quote}%
%\begingroup\floatsetup{style=plain,framearound=row,colorframeset=yellowplate,frameset={\fboxrule0pt},
%       framestyle=colorbox,framefit=yes,heightadjust=object,valign=c}
%   \begin{figure}[H]
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.9\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure uses settings for vertical top alignment}%
%    \label{leftfig:BOXED:valigned:rowbox}}%
%   \ffigbox[\FBwidth+2.4cm]
%   {\caption{The beside figure at the right side in float row uses settings for vertical top alignment too}%^^A
%    \label{rightfig:BOXED:valigned:rowbox}}
%   {\unitlength1.25\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%\endgroup
%   The result you see in the row of
%   figures~\ref{leftfig:BOXED:valigned:rowbox}, \ref{rightfig:BOXED:valigned:rowbox}.
%
%\begin{Quote}
%\begin{preamble}
%|\floatsetup{...rowfill=yes}|
%|...|\nopagebreak
%\end{preamble}
%   |...|\vspace*{-.75\intextsep}
%\end{Quote}%
%\begingroup\floatsetup{style=plain,framearound=row,colorframeset=yellowplate,rowfill=yes,
%       framestyle=colorbox,framefit=yes,heightadjust=object,valign=c,frameset={\fboxrule0pt}}
%   \begin{figure}[H]
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.9\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure uses settings for vertical top alignment}%
%    \label{leftfig:BOXED:valigned:fillrowbox}}%
%   \ffigbox[\FBwidth+2.4cm]
%   {\caption{The beside figure at the right side in float row uses settings for vertical top alignment too}%^^A
%    \label{rightfig:BOXED:valigned:fillrowbox}}
%   {\unitlength1.25\unitlength\input{Cat.picture}}
%   ^^A\ffigbox[\Xhsize]{}{\strut}
%    \end{floatrow}
%   \end{figure}%^^A
%\endgroup
%   The result you see in the row of
%   figures~\ref{leftfig:BOXED:valigned:fillrowbox}, \ref{rightfig:BOXED:valigned:fillrowbox}.
%
%\begin{Quote}
%\begin{preamble}
%|\floatsetup[widefloat]{margins=hanfleft}|
%|\floatsetup{...}|
%|...|\nopagebreak
%\end{preamble}
%   |...|\vspace*{-.75\intextsep}
%\end{Quote}%
%\begingroup\floatsetup{margins=hangleft,style=plain,framearound=row,colorframeset=yellowplate,
%       framestyle=colorbox,framefit=yes,heightadjust=object,valign=c}
%   \begin{figure*}[H]
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.9\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure uses settings for vertical top alignment}%
%    \label{leftfig:BOXED:valigned:widerowbox}}%
%   \ffigbox[\FBwidth+2.4cm]
%   {\caption{The beside figure at the right side in float row uses settings for vertical top alignment too}%^^A
%    \label{rightfig:BOXED:valigned:widerowbox}}
%   {\unitlength1.25\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure*}%^^A
%\endgroup
%   The result you see in the row of
%   figures~\ref{leftfig:BOXED:valigned:widerowbox}, \ref{rightfig:BOXED:valigned:widerowbox}.
%
%\begin{Quote}
%\begin{preamble}
%|...|\\
%|\floatsetup{...rowfill=yes}|
%|...|\nopagebreak
%\end{preamble}
%   |...|\vspace*{-.75\intextsep}
%\end{Quote}%
%\begingroup\floatsetup{margins=hangleft,style=plain,framearound=row,colorframeset=yellowplate,rowfill=yes,
%       framestyle=colorbox,framefit=yes,heightadjust=object,valign=c}
%   \begin{figure*}[H]
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.9\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure uses settings for vertical top alignment}%
%    \label{leftfig:BOXED:valigned:widefillrowbox}}%
%   \ffigbox[\FBwidth+2.4cm]
%   {\caption{The beside figure at the right side in float row uses settings for vertical top alignment too}%^^A
%    \label{rightfig:BOXED:valigned:widefillrowbox}}
%   {\unitlength1.25\unitlength\input{Cat.picture}}
%   ^^A\ffigbox[\Xhsize]{}{\strut}
%    \end{floatrow}
%   \end{figure*}%^^A
%\endgroup
%   The result you see in the row of
%   figures~\ref{leftfig:BOXED:valigned:widefillrowbox}, \ref{rightfig:BOXED:valigned:widefillrowbox}.
%
%
%   \subsubsection{Settings for Colored Frames}
%   \DescribeMacro{colorframeset}\label{setup:colorframeset}%^^A
%   \DescribeMacro{\DeclareColorBox}\label{setup:DeclareColorBox}%^^A
%   This key (needs \package{color} package) defines
%   a~color box in the case of the |framestyle=colorbox| or |framestyle=FRcolorbox| settings are loaded
%   (default is standard |\fbox|). There are not any predefined options for this key so you
%   must define your color box option, using the |\DeclareColorBox| command like following:
%   \begin{Quote}
%     |\DeclareColorBox{mycolorbox}{\fcolorbox{red}{yellow}}|
%   \end{Quote}
%   then use this option in |colorframeset=| key:
%   \begin{Quote}
%     |colorframeset=|\meta{option}\quad,
%   \end{Quote}
%   for example:
%   \begin{Quote}
%     |\floatsetup{colorframeset=mycolorbox}|\quad.
%   \end{Quote}
%
%   \DescribeMacro{colorframecorners}\label{setup:colorframecorners}%^^A
%   \DescribeMacro{\DeclareCBoxCorners}\label{setup:DeclareCBoxCorners:pre}%^^A
%   This key defines material attached to the corners of the frame defined
%   by the |framestyle=FRcolorbox| option.
%   This key, as the previous one, has not predefined options; the needed material is
%   set by the |\|\FRkey{DeclareCBoxCorners} command
%   (page~\pageref{setup:DeclareCBoxCorners}).
%
%   \subsubsection{Defining Float Skips}
%   \DescribeMacro{captionskip}\label{setup:captionskip}%^^A
%   Defines vertical space between caption and float object
%   in case of \FRkey{midcode} key defined as |midcode=captionskip|;
%   or in case of usage of float styles (|style=|
%   key) |plain|, |boxed| and similar to them:
%   \begin{Quote}
%      |captionskip=10pt|\quad.
%   \end{Quote}
%   The settings above are default and equal to \LaTeX's settings (|\abovecaptionskip=10pt|).
%   The settings of current documentation: |captionskip=5pt|.
%
%   \addvspace\medskipamount\noindent
%   \DescribeMacro{footskip}\label{setup:footskip}%^^A
%   Defines vertical space before foot material and footnotes. It can be defined like:
%   \begin{Quote}
%      |footskip=4pt|\quad,
%   \end{Quote}
%   or
%   \begin{Quote}
%      |footskip=\skip\footins|\quad.
%   \end{Quote}
%   the last line shows default settings.
%
%   \subsubsection{Defining Float Footnote Rule's Style}\label{sec:footnotestyle}
%   \DescribeMacro{footnoterule}\label{setup:footnoterule}%^^A
%   Defines type of footnote rule for footnotes inside floating environment.
%   \begingroup
%   \begin{Options}{\OptionLabel}
%     \item[normal]
%     standard \LaTeX{} definition, the
%     width of it equals to 0.4 of current width of text (|\columnwidth|);
%     \item[limited]
%     like previous one but max width of footnote rule equals to the value
%     defined by |\frulemax|\label{setup:frulemax} command, like:
%     \begin{Quote}
%     |\newcommand\frulemax{1in}|
%     \end{Quote}
%     \item[fullsize]
%     rule to full current text width.
%     \item[none]
%     Absent rule.
%     \item[...]
%   You may create your own options with the \\ |\DeclareFloatFootnoterule| command,
%   see page~\pageref{ssec:fnoterule}.
%   \end{Options}
%   \endgroup
%
%   \label{setup:end}
%
%^^A%   %^^A ???needed?
%^^A%   \subsubsection{Loading Style for Fancy Boxes}
%^^A%
%^^A%   \DescribeMacro{fancyboxes}\label{setup:fancyboxes}%^^A
%^^A%   This boolean key  loads \package{fr-fancy} package. This key you may use
%^^A%   only in optional argument in |\usepackage| line. The styles, supported by this package
%^^A%   are described in the table~\ref{tab:floatlayouts}.
%
%   \subsubsection{Managing Floats with \texttt{[H]} Placement Option}
%   \DescribeMacro{doublefloataswide}\label{setup:doublefloataswide}%^^A
%   This boolean key redefines starred floating environment \emph{in onecolumn layout}
%   like non-starred ones, but in this case they are still store layout
%   settings, declared by |[wide...]| options of |\floatsetup| (page~\pageref{sec:floatsetup}).
%   This key is necessary
%   for usage of the \texttt{[H]} option
%   in starred environments in the same way as in non-starred.
%
%   \medskip\noindent
%   \DescribeMacro{floatHaslist}%^^A
%   This boolean key adds values of penalties before and after
%   this ``anchored'' float like in the list environment and cancels
%   paragraph indentation, if there is no blank line appears after environment
%   (see also page~\pageref{sec:listpen}).
%
%   \subsection{Settings for Current Float Environment}
%   \DescribeMacro{\thisfloatsetup}\label{thisfloatsetup}\label{setup:thisfloatsetup}%^^A
%   You may define some settings only for one float just
%   before necessary environment. Command |\thisfloatsetup| could
%   contain the same keys and options as in |\floatsetup|. It has
%   only mandatory argument (the \cmd{\thisfloatsetup} is defined
%   as abbreviation of the \cmd{\floatsetup[tmpset]} command).
%
%   \subsection{Clearing of Settings for Current Float Type}
%   \DescribeMacro{\clearfloatsetup}\label{setup:clearfloatsetup}%^^A
%   If you want to get rid of parameters marked
%   for an automatic use within a particular environment
%   you can use the command\footnote{Created as additional macro for
%   \cs{clearcaptionsetup} macro, see also documentation
%   of \package{caption} package about \cmd{\clearcaptionsetup} command}:\allowpostlistbreaks[-4]
%   \begin{Quote}
%      |\clearfloatsetup|\marg{float type}\quad,
%   \end{Quote}\allowpostlistbreaks
%   where \marg{float type}---types as |figure|, |widefloat| etc.
%
%   \subsection{Temporary Clearing of All Float Settings}\label{page:killfloatstyle}
%   \DescribeMacro{\killfloatstyle}\label{setup:killfloatstyle}%^^A
%   The first case when this command is needed: mixed rows of floats where figure stays beside table
%   and you need to cancel layout of ``foreign'' float (see page~\pageref{mixrow}).
%   The |\killfloatstyle| command is used before any
%   command of |\floatbox| stuff (see {\sectionname}~\ref{sec:floatbox}).
%
%   Another case---layout of floats with beside captions is quite different from
%   other subtypes: |[figure]| option of
%   floatsetup defined with |style=plain| and
%   |[cabesidefigure]| must be defined with |style=boxed|.
%   In this case you may define your command, based on predefined
%   |\fcapside|:
%\begingroup
%   \begin{Quote}
%   \begin{preamble}
%      |\newcommand\myfcapside{\killfloatstyle|\nopagebreak
%      |     \floatsetup[figure]{style=Boxed,capbesideframe=yes}\fcapside}|\quad.
%   \end{preamble}
%      |\begin{figure}|
%        |\myfcapside[\FBwidth]|
%        |...|
%      |\end{figure}|\quad.\vspace*{-\intextsep}
%   \end{Quote}
%      \newcommand\myfcapside{\killfloatstyle
%           \floatsetup[figure]{style=Boxed,capbesideframe=yes,capbesideposition=left}\fcapside}
%   \begin{figure}[H]
%   \myfcapside[\FBwidth]
%     {\input{Horse.picture}}%
%     {\caption[Figure with beside caption in \texttt{Boxed} style.]{%^^A
%       Figure with beside caption in \texttt{Boxed} style. The special command \cmd{\myfcapside}
%       created to change layout for figures from plain in the case of captions below float
%       to boxed in the case of caption beside}\label{fig:beside:Boxed}}%
%   \end{figure}
%\endgroup
%   The option |[figure]| is necessary if you have defined settings for this option
%   in the preamble.
%
%  \emph{Notes}.\startNotes\nopagebreak \par
%   \Note Please remember that such command with redefined settings can be placed
%   only \emph{inside an environment} or \emph{group}.
%
%   \Note Before creation of such risky command, please revise your layout settings:
%   maybe the |[widefigure]| option never used in your documentation settings, so you can define
%   necessary settings in |\floatsetup[widefigure]|\allowbreak|{style=Boxed,|\allowbreak
%   |capposition=|\allowbreak|beside...}|
%   and then use ``starred'' floats in following way:
%\begingroup
%   \begin{Quote}
%   \begin{preamble}
%   |\floatsetup[widefigure]{|\FRkey{style}|=Boxed,|\FRkey{capposition}|=beside,|
%   |    |\FRkey{capbesideframe}|=yes}|
%   \end{preamble}
%      |\begin{figure*}|
%        |\fcapside[\FBwidth]|
%        |...|
%      |\end{figure*}|\quad.\vspace*{-\intextsep}
%   \end{Quote}
%   \floatsetup[widefigure]{margins=centering,style=Boxed,capposition=beside,capbesideframe=yes,capbesideposition=left}
%   \begin{figure*}[H]
%     \fcapside[\FBwidth]{\input{Horse.picture}}%
%     {\caption[Figure with beside caption in \texttt{Boxed} style in ``starred'' environment.]{%^^A
%       Figure with beside caption in \texttt{Boxed} style. The special settings for framed graphics
%       were created in ``starred'' environment}\label{figs:beside:Boxed}}%
%   \end{figure*}
%\endgroup
%
%   \subsection{The Default Float Type Settings}\label{sec:default}
%   The following keys and options are switched on when the \package{floatrow}
%   package loaded. They equal to |default| style:
%   \begin{Options}{\OptionLabel}\par
%     \item[font=normalsize]\allowitembreaks[-4]
%     \item[footfont=footnotesize]\allowitembreaks[1]
%     \item[capposition=bottom]
%     \item[capbesideposition=left]
%     \item[capbesideframe=no]
%     \item[footposition=default]
%     \item[heightadjust=none]
%     \item[facing=no]
%     \item[margins=centering]
%     \item[objectset=centering] ($\equiv$|justification=centering|, \package{caption})
%     \item[floatrowsep=columnsep]
%     \item[capbesidesep=columnsep]
%     \item[precode=none]
%     \item[rowprecode=none]
%     \item[postcode=none]
%     \item[rowpostcode=none]
%     \item[framearound=none]
%     \item[rowfill=no]
%     \item[midcode=captionskip]\allowitembreaks[-4]
%     \item[captionskip=10pt]
%   \end{Options}
%
%   \subsection{Defining New Options}
%   In the next few sections a list of commands is presented, which help to define
%   additional key options for the |\floatsetup| command.
%
%   \subsubsection{Float Style Option (\texttt{style=})}\label{ssec:declstyle}
%   \DescribeMacro{\DeclareFloatStyle}\label{setup:DeclareFloatStyle}%^^A
%   Defines new float style. Example shows definition of new float
%   style |MyBoxed|. The figures~\ref{fig:plain:MyBoxed}, and
%   some others in current documentation show result.
%\begin{Quote}
%|\DeclareFloatStyle{MyBoxed}{|\FRkey{style}|=Boxed,|\FRkey{captionskip}|=5pt,|\nopagebreak
%|      |\FRkey{frameset}|={\fboxrule1pt\fboxsep12pt}}|\nopagebreak
%|\floatsetup[figure]{style=MyBoxed}|
%\end{Quote}\pagebreak[1]
%
%   \begingroup
%
%   \floatsetup[figure]{style=MyBoxed}
%   \begin{figure}[H]
%     {\unitlength1.28\unitlength\input{Horse.picture}}%
%     \caption{%^^A
%   Plain figure in \texttt{MyBoxed} style}%
%   \label{fig:plain:MyBoxed}%
%   \floatfoot{Much more, more and more and more and more and more and
%     more and more and more text inside macro \cmd{\floatfoot}}%
%   \end{figure}
%
%   The same result you get with:
%\begin{Quote}
%|\floatsetup[figure]{style=Boxed,captionskip=5pt,|
%|      frameset={\fboxsep12pt\fboxrule1pt}}|
%\end{Quote}
%   \endgroup
%
%   \subsubsection{Float Font Option (\texttt{font=})}\label{ssec:declfont}
%   \DescribeMacro{\DeclareFloatFont}\label{setup:DeclareFloatFont}%^^A
%   With this macro you may define new option
%   for font (|font=| key) of float contents. This macro works
%   like |\DeclareCaptionFont| in \package{caption} package: you may also
%   use key options declared by |\DeclareCaptionFont| command.
%
%   To get red color for text in the example with figure~\ref{color:fig} on the page~\pageref{color:fig},
%   you may define the red color by following way:
%   \begin{Quote}%
%   |\DeclareFloatFont{red}{\color{red}}|
%   \end{Quote}%
%   and then write, for example
%   \begin{Quote}%
%   |\floatsetup[figure]{font={small,red}}|\quad.
%   \end{Quote}%
%   The version \textbf{3.1} of the \package{caption} package offers special option inside
%   |font=| key. Since the \package{floatrow} package uses the same mechanism for its |font=|
%   key, the example above you can write as following:
%   \begin{Quote}%
%   |\floatsetup[figure]{font={small,color={red}}}|\quad.
%   \end{Quote}%
%
%   \subsubsection{Option for Float Rules/Skips (\texttt{precode=} etc.)}\label{ssec:decl:rule}
%   \DescribeMacro{\DeclareFloatVCode}\label{setup:DeclareFloatVCode}%^^A
%   This command defines the skip, rule or other analogous code above
%   and below full float box and between caption above/below and
%   object. The defined option might be used  in |rowprecode|,
%   |precode|, |midcode|, |postcode|, and
%   |rowpostcode| keys (page~\pageref{setup:precode}).
%
%   Compare two examples:\enlargethispage\baselineskip
%   \begin{Quote}
%   \begin{preamble}
%   |\DeclareFloatVCode{grayruleabove}%|
%   |      {{\color{gray}\par\rule\hsize{2.8pt}\vskip4pt\par}}|
%   |\DeclareFloatVCode{grayrulebelow}%|
%   |      {{\color{gray}\par\vskip4pt\rule\hsize{2.8pt}}}|
%   |\floatsetup{...,|\FRkey{heightadjust}|=all,|%^^A
%           \FRkey{valign}|=c,|
%   |      |\FRkey{rowprecode}|=grayruleabove,|%^^A
%           \FRkey{rowpostcode}|=grayrulebelow}|\nopagebreak
%   \end{preamble}
%   |\begin{figure}|\nopagebreak
%   |\begin{floatrow}|\nopagebreak
%   |  \ffigbox|\nopagebreak
%   |    {...}{\caption{The left ...}\label{...}}%|
%   |  \ffigbox|\nopagebreak
%   |    {...}{\caption{The beside ...}\label{...}}|
%   | \end{floatrow}|\nopagebreak
%   |\end{figure}|
%   |\begin{figure}|\nopagebreak
%   |  ...|
%   |  \caption{Alone figure ...}\label{...}%|\nopagebreak
%   |\end{figure}|
%   \end{Quote}\pagebreak[2]
%
%\begingroup
%   \begin{figure}[H]\floatsetup{heightadjust=all,valign=c,rowprecode=grayruleabove,
%       rowpostcode=grayrulebelow}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox
%   {\unitlength.65\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure inside float row with defined row rules above and below}%
%   \label{intro:leftfig:row}}%
%
%   \ffigbox
%   {\caption{The beside figure at the right inside float row with defined row rules above and below}%^^A
%    \label{intro:rightfig:row}}
%   {\unitlength.85\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%   \begin{figure}[H]\floatsetup{heightadjust=all,valign=c,rowprecode=grayruleabove,
%       rowpostcode=grayrulebelow}\killfloatstyle
%   \ffigbox
%   {\caption{Alone figure with defined row rules above and below}%^^A
%    \label{intro:alone:row}}
%   {\unitlength.85\unitlength\input{TheCat.picture}}
%   \end{figure}%^^A
%   \begin{Quote}\openup-.65pt
%   \begin{preamble}
%   |...|\nopagebreak
%   |\floatsetup{...,|\FRkey{heightadjust}|=all,|\nopagebreak
%   |   |\FRkey{precode}|=grayruleabove,|%^^A
%        \FRkey{postcode}|=grayrulebelow}|\nopagebreak
%   \end{preamble}\nopagebreak
%   |...|
%   \end{Quote}%^^A
%
%   \begin{figure}[H]\floatsetup{heightadjust=all,valign=c,
%       precode=grayruleabove,postcode=grayrulebelow}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox
%   {\unitlength.65\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure inside float row with defined rules for float box}%
%   \label{intro:leftfig:box}}%
%
%   \ffigbox
%   {\caption{The beside figure at the right inside float row with defined rules for float box
%       above and below}%^^A
%    \label{intro:rightfig:box}}
%   {\unitlength.85\unitlength\input{Cat.picture}}
%    \end{floatrow}%
%   \end{figure}%^^A
%   \begin{figure}[H]\floatsetup{heightadjust=all,valign=c,
%       precode=grayruleabove,postcode=grayrulebelow}\killfloatstyle
%   \ffigbox
%   {\caption{Alone figure with defined rules above and below for float box}%^^A
%    \label{intro:alone:box}}
%   {\unitlength.85\unitlength\input{TheCat.picture}}
%   \end{figure}%^^A
%\endgroup
%   Please note that for ruled styles defined for boxes, like for figures \ref{intro:leftfig:box}
%   and \ref{intro:rightfig:box}, which could be placed in one row, you need to
%   set |heightadjust=all| key.
%
%\begingroup
%   The examples with unfill rows.\RemoveSpaces\vspace*{\topsep}
%   \begin{Quote}\openup.5pt
%   \begin{preamble}
%   |\floatsetup{...,|\FRkey{heightadjust}|=all,|%^^A
%           \FRkey{valign}|=c,|
%   |      |\FRkey{rowprecode}|=grayruleabove,|%^^A
%           \FRkey{rowpostcode}|=grayrulebelow}|
%   \end{preamble}
%   |\begin{figure}|\nopagebreak
%   |\begin{floatrow}|\nopagebreak
%   |  \ffigbox[\FBwidth]...|\nopagebreak
%   |  \ffigbox[\FBwidth]...|\nopagebreak
%   | \end{floatrow}|\nopagebreak
%   |\end{figure}|
%   \end{Quote}%^^A
%   \begin{figure}[H]\floatsetup{heightadjust=all,valign=c,rowprecode=grayruleabove,
%       rowpostcode=grayrulebelow}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.65\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure inside unfill float row with defined row rules above and below}%
%   \label{intro:leftfig:rownofill}}%
%
%   \ffigbox[\FBwidth+2cm]
%   {\caption{The beside figure at the right inside unfill float row with defined row rules above and below}%^^A
%    \label{intro:rightfig:rownofill}}
%   {\unitlength.85\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%   The same, but with \FRkey{rowfill} option.
%   \begin{Quote}\openup.5pt
%   \begin{preamble}
%   |\floatsetup{...,|\FRkey{rowfill}|=yes}|
%   \end{preamble}
%   |...|
%   \end{Quote}%^^A
%   \begin{figure}[H]\floatsetup{heightadjust=all,valign=c,rowprecode=grayruleabove,
%       rowpostcode=grayrulebelow,rowfill=yes}\killfloatstyle
%    \begin{floatrow}
%   \ffigbox[\FBwidth+2cm]
%   {\unitlength.65\unitlength\input{BlackCat.picture}}
%   {\caption{The left beside figure inside unfill float row with defined row full size rules above and below}%
%   \label{intro:leftfig:rowfill}}%
%
%   \ffigbox[\FBwidth+2cm]
%   {\caption{The beside figure at the right inside unfill float row with defined row full size rules above and below}%^^A
%    \label{intro:rightfig:rowfill}}
%   {\unitlength.85\unitlength\input{Cat.picture}}
%    \end{floatrow}
%   \end{figure}%^^A
%\endgroup
%
%   \subsubsection{Settings for Colored Frame (\texttt{colorframeset=})}\label{ssec:color:frame}
%   \DescribeMacro{\DeclareColorBox}%^^A
%   Let's repeat the command for definition of colored box used by |colorframeset=| key
%   (see also page~\pageref{setup:DeclareColorBox}).
%   Here is defined frame for figure~\ref{color:frame} below:
%   \begin{Quote}
%     |\DeclareColorBox{framedfigure}{\fcolorbox{gray}{white}}|\quad.
%   \end{Quote}
%   The yellow plate for figure rows on the page~\pageref{setup:rowfill}:
%   \begin{Quote}
%     |\DeclareColorBox{yellowplate}{\colorbox{yellow}}|\quad.
%   \end{Quote}
%   Please note, that for correct positioning of the color plate during usage of the |\colorbox|
%   command you need set to zero value for the |\fboxrule| command in the \FRkey{frameset} option:
%   \begin{Quote}
%     |frameset={\fboxrule0pt}|\quad.
%   \end{Quote}
%
%   \DescribeMacro{\DeclareCBoxCorners}\label{setup:DeclareCBoxCorners}%^^A
%   If you use the \FRkey{FRcolorbox} option for the \FRkey{framestyle} key
%   (page~\pageref{setup:framestyle}), you may set additional material (rules or something),
%   attached to four corners.
%\begin{Quote}%
%|\DeclareCBoxCorners|\marg{option}\marg{llcorner}\marg{lrcorner}\marg{urcorner}\marg{ulcorner}
%\end{Quote}%
%   The \marg{option} argument defines name of option of the \FRkey{colorframecorners} key.
%   The four others define material attached to four corners.
%
%   The order of corner material analogous to the order in the METAPOST's |bbox| box
%   for the  |label| command: first goes lower left corner (\marg{llcorner})
%   then, counterclockwise, lower right corner (\marg{lrcorner}), upper right corner
%   (\marg{urcorner}) and last goes upper left corner (\marg{ulcorner}).
%   There are used modified commands of |picture| environment inside these arguments:
%   all lengths and coordinates must have units like points, millimeters etc., but
%   here you may use usual length parameters like |\textwidth|. When the color box is created
%   the |\FRcolorboxht|, |\FRcolorboxwd| and~|\FRcolorboxdp| parameters define
%   height, width and depth of the box, you may use them inside settings
%   of the |\DeclareCBoxCorners| xommand. You may use the
%   |\|\FRkey{floatfacing} command to create facing layout.
%
%   The example with material in all corners, which shows overlapping.
%\begin{Quote}%
%|\DeclareCBoxCorners{angles}|
%|   {{\color{green}%green llcorner|
%|      \linethickness{10pt}\put(-5pt,-5pt)|
%|      {{\put(0pt,0pt){\line(0,1){\FRcolorboxht}}}%|
%|       {\put(-5pt,0pt){\line(1,0){\FRcolorboxwd}}}}%|
%|   }}{{\color{red}%red lrcorner|
%|      \linethickness{10pt}\put(0pt,0pt)|
%|      {{\put(0pt,0pt){\line(0,1){\FRcolorboxht}}}%|
%|       {\put(5pt,0pt){\line(-1,0){\FRcolorboxwd}}}}%|
%|   }}{{\color{blue}%blue urcorner|
%|      \linethickness{10pt}\put(5pt,-5pt)|
%|      {{\put(0pt,0pt){\line(0,-1){\FRcolorboxht}}}%|
%|       {\put(5pt,0pt){\line(-1,0){\FRcolorboxwd}}}}%|
%|   }}{{\color{magenta}%magenta ulcorner|
%|      \linethickness{10pt}\put(0pt,0pt)|
%|      {{\put(0pt,0pt){\line(0,-1){\FRcolorboxht}}}%|
%|       {\put(-5pt,0pt){\line(1,0){\FRcolorboxwd}}}}%|
%|   }}|
%\end{Quote}%
%   Please note, that this material has not any width and its values do not used during calculation
%   of frame position and width. Please note also that material in the left lower and upper corners
%   will be covered by frame, but right lower and upper corner material cover the frame
%   (inside these ``layers'' the material from upper corners covers lower ones)
%   the object contents appear in the upper layer.
%\begingroup
%\begin{Quote}%
%|\floatsetup{style=Boxed,|\FRkey{framestyle}|=FRcolorbox,|
%|  |\FRkey{colorframeset}|=yellowplate,|\FRkey{colorframecorners}|=angles,|
%|  |\FRkey{frameset}|={\fboxrule=0pt\fboxsep=2pt},|\FRkey{framefit}|=yes,|\FRkey{captionskip}|=15pt}|\vspace*{\baselineskip}
%\end{Quote}%
%\floatsetup{style=Boxed,framestyle=FRcolorbox,colorframeset=yellowplate,colorframecorners=angles,
%  framefit=yes,frameset={\fboxrule=0pt\fboxsep=2pt},captionskip=15pt}
%   \ffigbox[\FBwidth+2.4cm]
%   {\caption{The picture on the color plate with multicolored corners}%^^A
%    \label{BOXED:yellowplate:Redangles}}
%   {\unitlength1.25\unitlength\input{BlackDog.picture}}
%\endgroup
%
%\begingroup
%   The same but without color plate.
%\begin{Quote}%
%|\floatsetup{style=Boxed,|\FRkey{framestyle}|=corners,|%^^A
%    \FRkey{colorframecorners}|=angles,|
%|  |\FRkey{frameset}|={\fboxrule=0pt\fboxsep=2pt},|\FRkey{framefit}|=yes,|\FRkey{captionskip}|=15pt}|\vspace*{\baselineskip}
%\end{Quote}%
%\floatsetup{style=Boxed,framestyle=corners,colorframecorners=angles,
%  framefit=yes,frameset={\fboxrule=0pt\fboxsep=2pt},captionskip=15pt}
%   \ffigbox[\FBwidth+2.4cm]
%   {\caption{The picture on the ``transparent'' box with multicolored corners}%^^A
%    \label{BOXED:transparent:Redangles}}
%   {\unitlength1.25\unitlength\input{BlackDog.picture}}
%\endgroup
%
%   \subsubsection{Object Justification Option (\texttt{objectset=})}\label{ssec:decl:oset}
%   \DescribeMacro{\DeclareObjectSet}\label{setup:DeclareObjectSet}%^^A
%   You may define justification for |objectset=| key (page~\pageref{setup:objectset})
%   like\nopagebreak:
%   \begin{Quote}
%     |\DeclareObjectSet{centering}{\centering}|
%   \end{Quote}
%   In option's definition you may try to include any regular commands
%   (it could be the repeated head text also)
%   which you need to put before each object contents in float
%   environment. You may also use key options declared by
%   \cmd{\DeclareCaptionJustification} command of \package{caption} package
%   as options for |objectset=| key.
%
%   \subsubsection{Option for Float Box Alignment/Settings (\texttt{margins=})}\label{ssec:decl:marg}
%   \DescribeMacro{\DeclareMarginSet}\label{setup:DeclareMarginSet}%^^A
%   You may define box alignment for float box (|margins=| key) like:
%   \begin{Quote}
%   |\DeclareMarginSet{center}{%|\nopagebreak
%   |  \setfloatmargins{\hfil}{\hfil}}|
%   \end{Quote}
%   or like (see also sample files):
%   \begin{Quote}
%   |\DeclareMarginSet{outside}{\setfloatmargins*{\hfil}{}}|\nopagebreak
%   \end{Quote}
%   The |\DeclareMarginSet| command uses the |\setfloatmargins| command, which defines
%   fill code for each margin.
%
%   \DescribeMacro{\setfloatmargins}\label{setup:setfloatmargins}%^^A
%   Non-starred form of |\setfloatmargins| defines left and right
%   margin.
%   \begin{Quote}
%     |\setfloatmargins{|\meta{left margin}|}{|\meta{right margin}|}|
%   \end{Quote}
%
%   Here goes rather complex example which was created as alternative float layout for one-column
%   document. The starred, |figure*|, environment places caption on the left margin, beside
%   object. Frame around object has default width of main text.
%   \begin{Quote}[0pt]
%   \begin{preamble}
%   |\makeatletter\@mparswitchfalse\makeatother|\vspace{1ex}
%   |\DeclareMarginSet{hangleft}%|
%   |  {\setfloatmargins|
%   |    {\hskip-\marginparwidth\hskip-\marginparsep}{\hfil}}|\vspace{1ex}
%   |\|\FRkey{DeclareColorBox}|{framedfigure}{\fcolorbox{gray}{white}}|\vspace{1ex}
%   |\|\FRkey{DeclareFloatSeparators}|{marginparsep}{\hskip\marginparsep}|
%   |\|\FRkey[sec]{floatsetup}|[widefigure]{|%^^A
%       \FRkey{margins}|=hangleft,|%^^A
%       \FRkey{floatwidth}|=\textwidth,|
%   |   |\FRkey{capposition}|=beside,|%^^A
%       \FRkey{capbesideposition}|=left,|%^^A
%       \FRkey{capbesideframe}|=yes,|
%   |   |\FRkey{capbesidewidth}|=\marginparwidth,|%^^A
%       \FRkey{capbesidesep}|=marginparsep,|
%   |   |\FRkey{framestyle}|=colorbox,|\FRkey{framefit}|=yes,|\nopagebreak
%   |   |\FRkey{colorframeset}|=framedfigure,|%^^A
%       \FRkey{frameset}|={\fboxrule3pt\fboxsep8pt}}|\vspace{1ex}
%   |\captionsetup[capbesidefigure]{justification=RaggedRight,|\nopagebreak
%   |    font=small,labelfont={normalsize,sf,bf},labelsep=newline,strut=no}|\nopagebreak
%   \end{preamble}
%   |\begin{figure*}|\nopagebreak
%   |...|\nopagebreak
%   |\end{figure*}|
%   \end{Quote}
%   \begingroup
%   \floatsetup[widefigure]{margins=hangleft,floatwidth=\textwidth,
%       capposition=beside,capbesideposition=left,capbesideframe=yes,
%       capbesidewidth=\marginparwidth,capbesidesep=marginparsep,framestyle=colorbox,framefit=yes,
%       frameset={\fboxrule3pt\fboxsep8pt},colorframeset=framedfigure}
%   \captionsetup[capbesidefigure]{justification=RaggedRight,
%       font=small,labelfont={normalsize,sf,bf},labelsep=newline,strut=no}
%   \begin{figure*}[H]%
%   {\input{Mouse.picture}}{\caption{Figure with alternative layout (``starred'' environment) caption
%       placed on the left margin}\label{color:frame}}
%   \end{figure*}%
%   \endgroup
%
%   \emph{Note}. The row of figures~\ref{fig:row:Dog}--\ref{fig:row:cheese} on the page
%   \pageref{fig:row:Dog} uses the same |margin=| settings of option |margins=|.
%
%   Starred form, |\setfloatmargins*|, defines facing layout: inside and
%   outside margin.
%   \begin{Quote}
%     |\setfloatmargins*{|\meta{inside margin}|}{|\meta{outside margin}|}|
%   \end{Quote}
%
%   You may even set much more complex definition:
%   \begin{Quote}\leftmargin0pt
%   |\DeclareMarginSet{facingrule}{%|\nopagebreak
%   |\setfloatmargins*{%|\nopagebreak
%   |   \floatfacing{\hskip-12pt\vrule width4pt\hskip8pt\hfill}%|\nopagebreak
%   |               {\hfill\hskip8pt\vrule width4pt\hskip-12pt}}{}}|
%   \end{Quote}
%   \DescribeMacro{\floatfacing}\label{setup:floatfacing}%^^A
%   the |\floatfacing| defines following
%   \begin{Quote}
%     |\floatfacing{|\meta{odd page definition}|}{|\meta{even page definition}|}|
%   \end{Quote}
%   This macro has also starred form |\floatfacing*|,
%   which you can use in key options for |\captionsetup| stuff and for floats with beside captions.
%
%   \emph{Note}. Please remember that all options, which set different layout for facing pages
%   need |facing=yes| key option.
%
%   \DescribeMacro{\floatboxmargins}\label{setup:floatboxmargins}%^^A
%   \DescribeMacro{\floatrowmargins}\label{setup:floatrowmargins}%^^A
%   \DescribeMacro{\floatcapbesidemargins}\label{setup:floatcapbesidemargins}%^^A
%   The |\setfloatmargins| could be ``separated'' into the three macros which set margins
%   for three main variants of float positions:
%   \begin{Options}{\OptionLabel}
%   \item[\cmd{\floatboxmargins}]sets left/right margins around alone
%        float box;
%   \item[\cmd{\floatrowmargins}]sets left/right margins around
%        |floatrow| environment;
%   \item[\cmd{\floatcapbesidemargins}]sets left/right margins around
%        alone float box with beside caption.
%   \end{Options}
%   The grammar for using three mentioned commands is similar to
%   |\setfloatmargins|. Again, the settings which use |\floatfacing| command
%   work only in the case when key |facing=yes| is used.
%
%\RestoreSpaces
%   \paragraph{Alignment Settings for longtable.}
%   \label{ssec:decl:ltable:marg}
%   The \package{floatrow} expands some settings of table layout
%   to the |longtable| environment, so you may set |\LTleft| and
%   |\LTright| parameters inside |\DeclareMarginSet| settings. For example,
%   |centering| option was defined like:
%   \begin{Quote}
%   |\DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}%|
%   |  \LTleft=\fill \LTright=\fill}|
%   \end{Quote}
%
%   \subsubsection{Float Separators Options (\texttt{floatrowsep=}, \texttt{capbesidesep=})}
%   \DescribeMacro{\DeclareFloatSeparators}\label{setup:DeclareFloatSeparators}%^^A
%   You may define separator
%   between float boxes, or between float object and beside caption:
%   \begin{Quote}
%   |\DeclareFloatSeparators{columnsep}{\hskip\columnsep}|\quad.
%   \end{Quote}
%   Please remember, that you may use options defined with |\DeclareFloatSeparators|
%   by both |floatrowsep=| and |capbesidesep=| keys.
%   You may also use key options declared
%   by \cmd{\DeclareCaptionLabelSeparator} command.\par%
%
%   The next example uses more complex separator, which uses, the \package{color} package.
%   \begin{Quote}[0pt]
%   \begin{preamble}
%   |\|\FRkey{DeclareObjectSet}|{colorred}{\parskip2pt\parindent15pt\color{red}}|
%   |\DeclareFloatSeparators{colorsep}%|
%   |  {\begingroup\color{blue}%|
%   |    \hskip8pt\vrule width4.8pt\hskip8pt\endgroup}|
%   |\|\FRkey[sec]{floatsetup}|[widefigure]{|%^^A
%       \FRkey{margins}|=hangleft,|\FRkey{capbesidesep}|=colorsep,|
%   |   |\FRkey{objectset}|=colorred,|\FRkey{floatwidth}|=\textwidth}|
%   |\captionsetup[figure]{justification=justified,|
%   |    labelfont={color={magenta},bf},textfont={color={green}},|
%   |    labelsep=newline}|
%   \end{preamble}
%   |\begin{figure*}|\nopagebreak
%   |...|\nopagebreak
%   |\end{figure*}|
%   \end{Quote}
%   \begingroup
%   \floatsetup[widefigure]{margins=hangleft,capbesidesep=colorsep,objectset=colorred,
%      floatwidth=\textwidth,capposition=beside,capbesideposition=left}
%   \captionsetup[figure]{justification=justified,
%       labelfont={color={magenta},bf},textfont={color={green}},labelsep=newline}
%   \begin{figure*}[H]%
%   {\TEXTBOX}{\caption[Multi-colored figure and beside caption]{Multi-colored
%        figure with beside caption. And A bit more text, and some more text}\label{color:fig}}
%   \end{figure*}%
%   \emph{Note}. The settings of  color of caption font like
%   |labelfont=|\allowbreak|{color={magenta},bf,}|\allowbreak
%   |textfont={color={green}}|
%   were documented first time in the \package{caption} documentation version~\textbf{3.1}.
%   \endgroup
%
%   \subsubsection{Option for Footnote Rule's Style (\texttt{footnoterule=})}\label{ssec:fnoterule}
%   \DescribeMacro{\DeclareFloatFootnoterule}\label{setup:DeclareFloatFootnoterule}%^^A
%   You may define new footnoterule (|footnoterule=| key) like:
%   \begin{Quote}
%   \begin{preamble}
%   |...|
%   |\usepackage{ifthen}|
%   |\renewcommand\frulemax{72pt}|
%   |\newcommand \Limitedrule{.33\columnwidth}|
%   |\DeclareFloatFootnoterule{Limited}{\kern-3pt|
%   |  \def\Limitedrule{.33\columnwidth}%|
%   |  \ifthenelse{\lengthtest{\frulemax<\Limitedrule}}%|
%   |         {\def\Limitedrule{\frulemax}}{}%|
%   |  \hrule width\Limitedrule\kern2.6pt}|
%   \end{preamble}
%   \end{Quote}
%   Remember, that the summary vertical height for footnote rule must be
%   equal to~0pt.
%
%\clearpage
%   \section{Creation of New Float Types}\label{sec:newfloat}
%   \DescribeMacro{\DeclareNewFloatType}\label{setup:DeclareNewFloatType}%^^A
%   For creation of new float type the |\DeclareNewFloatType|\label{FAD:newfloattype}
%   command was created
%    which also uses
%   \meta{key}${}=\nobreak {}$\meta{value} mechanism:
%   \begin{Quote}
%   |\DeclareNewFloatType|\marg{type}\marg{options}
%   \end{Quote}
%   The \meta{type} argument includes the new floating environment name.\\
%   The \meta{options} could include the following keys:
%
%   \noindent
%   \DescribeMacro{placement}\label{setup:placement}%^^A
%   The value of this key could contain any combination of the letters
%   |t|, |b|, |h|, and |p|, which
%   define the placement of current float type on the page in
%   the case floating environment has no option argument.
%   (As default is declared |placement=tbp|.)
%
%   \noindent
%   \DescribeMacro{name}\label{setup:name}%^^A
%   Defines the name of environment in the caption
%   label. (As default for caption label is declared the
%   name of environment.)
%
%   \noindent
%   \DescribeMacro{fileext}\label{setup:fileext}%^^A
%   Defines extension of the file in which
%   gathered list of floats.
%
%   \emph{Note.} In the version v0.2b, in the case of this key not defined,
%   the captions of one type are gathered in the file with extension,
%   co-named to current floating environment with perfix ``lo''. This new feature allows
%   to create separate float lists by default.%^^A\footnote{In some systems these extensions could fail?}
%
%   \noindent
%   \DescribeMacro{within}\label{setup:within}%^^A
%   Declares the section head of document, by which
%   current float resets its numbering to zero. If this key is absent,
%   the float numbering increases during whole documentation.
%
%   \noindent
%   \DescribeMacro{relatedcapstyle}\label{setup:relatedcapstyle}%^^A
%   In the \package{float} package the non-starred
%   \cmd{\newfloat}/\cmd{\restylefloat} macros attach the related
%   caption style for float styles (see {\sectionname}~\ref{sec:floatst}).
%   If you use |\DeclareNewFloatType| mechanism and exists (you created
%   it by |\captionsetup[...]|) co-named, i.e. related, caption style
%   you may attach this style with key |relatedcapstyle=yes|.\medskip
%
%   Below is an example of the |\DeclareNewFloatType| command,
%   which was used for definition of the |Example|
%   environment demonstrated on page \pageref{exa1.1}.
%   It consists of following code:
%   \begin{Quote}
%      |\DeclareNewFloatType{Example}%|
%      |    {placement=t,within=section,fileext=loe}|
%   \end{Quote}
%
%   \subsection{How to replace \texorpdfstring{\cs{newfloat}}{newfloat}
%    with \texorpdfstring{\cs{DeclareNewFloatType}}{DeclareNewFloatType}}\label{sec:oldtonew}
%   The |\newfloat| command takes three required and
%   one optional argument:
%   \begin{Quote}
%   |\newfloat|\marg{type}^^A
%     \marg{placement}\marg{ext}\oarg{within}
%   \end{Quote}
%   which could be replaced with
%   \begin{Quote}
%   |\DeclareNewFloatType|\marg{type}|%|
%     |    {placement=|\meta{placement}|,fileext=|\meta{ext}|,widthin=|\meta{within}|}|
%   \end{Quote}
%
%   The \package{float} package offers also other commands of float type declaring:
%   the |\floatname| command can be replaced by the |name=| key of |\DeclareNewFloatType|
%   command; the |\floatplacement|---by the |placement=| key.
%
%   \clearpage
%   \section{Borrowed Code}\label{sec:borrow}
%   \FRorisubsection{The \package{float} Package: Compatibility}\label{sec:floatst}
%   The \package{floatrow} package includes some macros of \package{float}
%   (version v1.3d, dated 2001/11/08)
%   with necessary modifications. In the case of loaded \package{float}
%   package \emph{before} \package{floatrow} you'll get error message.
%
%   \emph{Note}.
%   In the case of some packages
%   could call \package{float} package\footnote{I'm aware about \package{algorithm}
%   package.} the \package{floatrow} package loads code which emulates
%   already loaded \package{float} package v1.3, so future requests for
%   this package will be  ignored. This will help to avoid strange error messages
%   in the case of these packages loaded after \package{floatrow}.
%   Please note that packages, which load \package{float} must be loaded
%   \emph{after} \package{floatrow}.
%
%   I hope that old documents, which use the \package{float} package,
%   could work with \package{floatrow}. The first
%   limitation or feature is---if you didn't use any |\restylefloat|
%   command---all figures and tables appear in |plain| float style
%   with bottomed captions. Another limitation---you ought to put all
%   |\newfloat| and |\floatstyle| and |\restylefloat| commands in
%   preamble, before |\begin{document}|. The commands |\restylefloat|,
%   |\newfloat| and |\floatstyle| are obsolete but
%   supported\footnote{The better
%   way is to use \cmd{\floatsetup} macros. The \package{floatrow} package
%   supports obsolete macros but there is no guarantee that they will work as expected.} (see section below).
%
%   The sections below explain how \package{float} commands and options work in \package{floatrow}.
%   Sections, signed with ``[\package{float}]'' and typed with slanted font, were borrowed from
%   \package{float}'s  documentation. The section which
%   describes commands of layout settings of \package{float} package was moved
%   in the section~\ref{sec:changed}
%   (subsection~\ref{sec:floatborrowI}, ``The User Interface---New
%   Floats [\package{float}]''), this section describes obsolete stuff.
%
%   \subsubsection{How Settings From The \package{float} Package
%     Work in \package{floatrow}}\label{float-obs}
%   The combination of command |\floatstyle|\marg{style} and one of commands
%   \begin{Quote}
%   |\floatstyle|\marg{style}
%   \cmd{\newfloat}\marg{float}
%   \end{Quote}
%   or
%   \begin{Quote}
%   |\floatstyle|\marg{style}
%   \cmd{\restylefloat}\marg{float}
%   \end{Quote}
%   in \package{floatrow} package set float layout in the following way:
%   \begin{Quote}
%   |\floatsetup|\oarg{float}|{style=|\meta{style}|}|
%   \end{Quote}
%   Please note that there is used |\floatsetup|\oarg{float}|{...}|
%   settings for current type of float, but not |\floatsetup{...}|.
%
%   \pagebreak\subsubsection{Printing of Float List [\package{float}]}
%   \label{sec:floatborrowIa}
%   \begin{slshape}
%   \nobreak\DescribeMacro{\listof}
%   \nopagebreak
%   The |\listof| command produces a list of all the floats
%   of a given class. Its syntax~is
%   \begin{Quote}
%   \hspace*{\MacroIndent}|\listof{|\meta{type}|}{|\meta{title}|}|^^A
%   \end{Quote}
%   \meta{type} is the float type given in the |\newfloat| command.
%   \meta{title} is used for the title of the list as well as the
%   headings if the current page style includes them. Otherwise, the
%   |\listof| command is analogous to the built-in \LaTeX\ commands
%   |\listoffigures| and |\listoftables|.
%
%^^A%\begin{em}%
%^^A%   \noindent\textit{Floatrow note}.
%^^A%   Please remember that for each float type list
%^^A%   you must set file extension where the entries of each float type gathered.
%^^A%   Use key \texttt{fileext=...} in |\DeclareNewFloatType|.
%^^A%   If two or more float types will have the same file
%^^A%   for list of floats, you will get all floats in the
%^^A%   first appeared |\listof|, and all next will be empty.
%^^A%\end{em}%
%
%   \subsubsection{The User Interface---\texttt{[H]}
%   Placement Specifier [\package{float}]}\label{sec:floatborrowII}
%   Many%^^A
%   \FRmpar{Anchored float}{FAD:AnchoredFloat}
%   people find \LaTeX's float placement specifiers too
%   restrictive. A Commonly Uttered Complaint (CUC) calls for a way to
%   place a float exactly at the spot where it occurs in the input file,
%   i.e., to \emph{not} have it float at all. It seems that the
%   \texttt{[h]} specifier should do that, but in fact it only suggests
%   to \LaTeX\ something along the lines of ``put the float here if it's
%   OK with you''. As it turns out, \LaTeX\ hardly ever feels inclined
%   to actually do that. This situation can be improved by judicious
%   manipulation of float style parameters.
%
%   \RestoreSpaces
%   The same effect can be achieved by changing the actual method of
%   placing floats. David Carlisle's \package{here} option introduces a new
%   float placement specifier, namely \texttt{[H]}, which, when added to
%   a float, tells \LaTeX\ to ``put it HERE, period''. If there isn't
%   enough space left on the page, the float is carried over to the next
%   page together with whatever follows, even though there might still
%   be room left for some of that. This style option provides the
%   \texttt{[H]} specifier for newly defined classes of floats as well
%   as the predefined |figure|s and |table|s, thereby
%   superseding \package{here}. David suggests that the \package{here} option be
%   withdrawn from the archives in due course.
%
%   The {\tt[H]} specifier may simply be added to the float as an
%   optional argument, like all the other specifiers. It may \emph{not}
%   be used in conjunction with any other placement specifiers, so
%   {\tt[Hhtbp]} is illegal. Neither may it be used as the default
%   placement specifier for a whole class of floats. The following table
%   is defined like this:
%   \begin{Quote}
%   |\begin{table}|\nopagebreak
%   |\begin{tabular}{cl}|
%   |\tt t & Top of the page\\|
%   \dots\ more stuff \dots\\
%   |\end{tabular}|
%   \end{Quote}
%   (It seems that I have to add some extraneous chatter here just so
%   that the float actually comes out right in the middle of a printed
%   page. When I \LaTeX ed the documentation\footnote{For \package{float}
%   package.} just now it turned out that there was a page break that
%   fell exactly between the ``So now'' line and the float. This
%   wouldn't Prove Anything. Bother.) So now we have the following float
%   placement specifiers:\nopagebreak
%   \RestoreSpaces
%   \begin{table}[H]
%   \begin{tabular}{cl}
%   \tt t & Top of the page\\
%   \tt b & Bottom of the page\\
%   \tt p & Page of floats\\
%   \tt h & Here, if possible\\
%   \tt H & Here, definitely
%   \end{tabular}
%   ^^A\caption{Could it be that this just needs a caption?}
%   \end{table}
%
%   \smallskip\em \textit{Floatrow note}. Please don't mix meaning of
%   \texttt{[H]} and \texttt{[h]} options.
%   Float with \texttt{[h]} and \texttt{[!h]} option, if succeed, appears
%   \emph{after completing line} of text,
%   where it was appeared in the source file. That could be visible if you
%   put floating environment within a~paragraph (and at the middle of line also).
%
%   The \texttt{[H]} option places the float just \emph{at the point} where it appeared
%   in the source file, it is used (\emph{but that strongly
%   not recommended when typesetting books}!) for floats after text like ``\dots{}shown in this
%   \textbf{figure:}'', i.e. the \texttt{[H]} float, almost like math formulas, continues the current
%   paragraph.
%
%\end{slshape}
%
%   \subsubsection{The {[H]}
%   Placement Specifier---Managing of Page Breaks}\label{sec:listpen}
%   The strange phrase at the end of previous paragraph, ``almost like math formulas''
%   means, that ``anchored'' floats have no management of page breaking, and also
%   the text, typed without blank line after float, always gets |\parindent|.
%
%   To follow the idea of |\allowdisplaybreaks| command from
%   \package{amsmath} package there is created a \emph{beta-temp}\footnote{I~hope
%   that such support sooner or later could appear in
%   \package{paralist} package and think it is better to follow
%   grammar of master-package for similar situations.} version
%   of \package{listpen} package (it can be used separately). It offers commands,
%   which manage the penalty values in the list environments:
%   \begin{Options}{\OptionLabel}
%   \item[\cmd{\allowprelistbreaks}]sets penalty before lists
%      (and also  ``anchored'' floats);
%   \item[\cmd{\allowpostlistbreaks}]sets penalty after lists;
%   \item[\cmd{\allowitembreaks}]sets penalty between list items
%       (surely, this command not for floats!).
%   \end{Options}
%   All of them can be set globally, inside groups, and inside
%   environments. These penalties are set accordingly to digits
%   from |[-4]| (never break) to |[4]| (always break). The positive
%   values of optional argument in these commands analogous to values
%   of optional arguments in |\pagebreak| command. The negative
%   ones---to optional arguments |[1]|--|[4]| in |\nopagebreak| command.
%   The default value of all three commands is |[-1]| which equal
%   to settings of standard \LaTeX{} classes: \cls{book}, \cls{article}
%   etc. (|[-1]| option equal to |\@lowpenalty| value).
%
%   \DescribeMacro{floatHaslist}\label{setup:floatHaslist}%^^A
%   The key, if true,
%   uses list penalties, otherwise anchored float works without any penalty, i.e. like
%   defined in \package{float}.
%
%   Also (added in version 0.1k with current key):
%   Since list environments do \emph{not make indentation} in the
%   paragraphs next to them, in the case of \emph{no blank} line after environment,
%   the ``anchored'' floating environment does
%   the same, if this option is true. Default value of |floatHaslist|
%   is |false|
%   (for backward compatibility with previous version 0.1j).
%
%   \DescribeMacro{\floatHpenalties}\label{setup:floatHpenalties}%^^A
%   This macro, defined with |\renewcommand| can include settings for
%   list penalties around anchored floats. If you define
%   \begin{Quote}
%\begin{preamble}
%   |\makeatletter|
%   |\renewcommand\floatHpenalties{\@beginparpenalty\@M}|
%   |\makeatother|
%\end{preamble}
%   \end{Quote}
%   or, with \package{listpen} package
%   \begin{Quote}
%\begin{preamble}
%   |\renewcommand\floatHpenalties{\allowprelistbreaks[-4]}|\quad,
%\end{preamble}
%   \end{Quote}
%   you'll never get page breaks before anchored floats.
%
%   \medskip\noindent
%   \DescribeMacro{\RestoreSpaces}
%   \DescribeMacro{\RemoveSpaces}
%   The commands-aliases
%   of the |\if@nobreak| flag were added. The first is equal to |\@nobreakfalse|.
%   The main (and most visible) usage of this flag is for managing
%   vertical spaces: The |true| value in the case of two sectioning commands
%   cancels usage of the space before next
%   |\..section| command of the pair; in the case of
%   spaces around list environments it cancels usage of the space
%   before list just after sectioning command.
%   Usually the |\@nobreakfalse| flag toggles at the next paragraph (or |\par| command),
%   but in some cases this ``toggling'' cannot be happen in necessary point.
%   The |\RestoreSpaces| command would help. Opposite command |\RemoveSpaces| equals to |\@nobreaktrue|.
%
%   \subsection{The \package{rotfloat} Package}
%   Code of \package{rotfloat} package was also borrowed by \package{floatrow}
%   package.
%   This package originally allows to expand settings of \package{float} package to
%   rotated environments like |sidewaysfigure| and |sidewaystable|. This mechanism
%   was borrowed to expand the \package{floatrow}'s settings in the similar way.
%
%   In the case of loaded \package{rotfloat} package \emph{before}
%   \package{floatrow} you will get error message.
%
%   The \package{floatrow} package loads code which pretends that
%   \package{rotfloat} is already loaded, so next loads are ignored.
%   The \package{rotfloat} allowed in the |\usepackage|
%   line with \package{rotating} package, which could have options. It is
%   necessary to delete \package{rotfloat} package from |\usepackage| line
%   where also \package{rotating} package loaded with options: otherwise
%   you may get an `option clash' error message.
%
%\clearpage
%   \section{The \package{floatrow} Package and The \package{caption} Package}\label{ssec:caption}
%   Tested (and compatible) with \package{caption} version from v3.0q to~v3.1j.
%
%   The \package{caption} package has strong mechanism for creation of
%   caption layout, so \package{floatrow} addresses the creation of new
%   caption styles to this package (see documentation for \package{caption}
%   package%^^A
%   \footnote{The English documentation is
%   \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/caption/caption-eng.pdf}%^^A
%   {\meta{texmf folder}\texttt{/doc/latex/caption/caption-eng.pdf}}.}).
%
%   The \package{floatrow} package adds a~possibility to create variations of caption layouts
%   for floats in different positions or float layouts (e.g. like wide or
%   two-column floats, rotated floats, wrapped floats) in the same time when |\floatsetup|
%   settings were loaded, using the same optional argument in
%   |\captionsetup| settings.
%
%   For example you want to create a~special caption layout for wide or
%   two-column floats. In this case you may use
%   \begin{Quote}
%   |\captionsetup[widefloat]|\marg{options}
%   \end{Quote}
%   or for wide or two-column figures:
%   \begin{Quote}
%   |\captionsetup[widefigure]|\marg{options}
%   \end{Quote}
%   The priority of |\captionsetup| optional arguments is similar to
%   |\floatsetup| ones: in current examples |\captionsetup[widefigure]|
%   will be stronger than |\captionsetup[widefloat]|---the priority
%   and usage of ``\meta{float subtypes}'' in optional arguments
%   see on  page~\pageref{stsetorder}\label{cap:beside:order}.
%
%\begingroup
%\providecommand*\subcaption{\captionsetup{subtype*}\caption}
%
%   \captionsetup[subtable]{labelformat=brace,textfont=md,labelfont=up}
%
%   \subsection{Managing of Float Parts With the \texttt{subfloatrow} Environment}\label{ssec:subcaption}
%   \DescribeMacro{\subcaption}
%   The version~3.1 of caption package offers possibility for creation of
%   subcaptions, using the |subtype| settings (and |\DeclareCaptionSubType| command, see \package{caption}
%   documentation), which allow to create captions for parts of floats.
%
%   In this section you may see some examples with building of rows of beside parts of floats.
%
%   The example with subtables \Fref{subcaptab:tabIIIa} and \Fref{subcaptab:tabIIIb}
%   (table~\ref{captab:tabIII}).%^^A
%   \FRmpar{Subcaption above subtable}{FAD:subcapabove:subcaption}
%   \begin{Quote}
%\begin{preamble}
%\verb|...|
%\verb|\DeclareCaptionSubType[alph]{table}|
%\verb|\captionsetup[subtable]{labelformat=brace,textfont=md,labelfont=up}|\vspace{1ex}
%\verb|\floatsetup[subtable]{style=Plaintop}%|
%\end{preamble}
%   \verb|\begin{table}|
%   \verb|\ttabbox[\FBwidth]|
%   \verb|{\begin{subfloatrow}|
%   \verb|  \ttabbox|
%   \verb|    {\caption{First subtable}\Flabel{...}%|
%   \verb|     \begin{tabular}{..}...|
%
%   \verb|  \ttabbox...|
%   \verb|\end{subfloatrow}}|
%   \verb|{\caption{Two ...}\Flabel{...}}|\nopagebreak
%   \verb|\end{table}|
%   \end{Quote}%
%   \DeleteShortVerb{\|}%
%\begingroup
%   \floatsetup[subtable]{style=Plaintop}
%   \begin{table}[H]\extrarowheight1pt\tabcolsep1.5\tabcolsep
%   \ttabbox[\FBwidth]
%   {\begin{subfloatrow}
%    \ttabbox
%     {\caption{First subtable}\Flabel{subcaptab:tabIIIa}%^^A
%      \begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
%       \hline
%       \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%       \\\hline
%       First row    &         1 &         2 \\
%       Second row   &         3 &         4 \\
%       Third row    &         6 &         8 \\
%       Fourth row   & \llap{1}0 & \llap{1}6 \\
%       \hline
%       \end{tabular}}{}
%
%    \ttabbox
%    {\caption{Second subtable inside of \cs{ttabbox} and \texttt{floatrow} environment}%^^A
%        \Flabel{subcaptab:tabIIIb}%^^A
%     \begin{tabular}{|l|c|c|}
%     \hline
%       \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%     \\\hline
%     First row    & \phantom01 & \phantom02 \\
%     Second row   & \phantom03 & \phantom04 \\
%     Third row    & \phantom06 & \phantom08 \\
%     \hline
%   \end{tabular}}{}%
%   \end{subfloatrow}}
%   {\caption{Two {subtable}s
%    (captions for parts of float created with \cs{caption} command)}\label{captab:tabIII}}
%   \end{table}%
%\endgroup
%   \MakeShortVerb{\|}%
%   Please note that for the labels of table parts the special option
%   \verb|brace| of the \verb|labelformat| key was used.
%
%   \DescribeMacro{subfloatrow}
%   The |subfloatrow| is analogous to the |floatrow| environment\footnote{
%       It skips some features of ``parent'' environment, (e.g. margins or margin material
%       this environment build box and follows |objectset=| option).}.
%   The usage is similar to |floatrow|, you may write for example:
%   \begin{Quote}
%   \verb|\begin{subfloatrow}[|\meta{number of beside parts of floats}\verb|]|\nopagebreak
%   \verb|\floatbox...|\nopagebreak
%   \verb|\floatbox...|\nopagebreak
%   \verb|...|\nopagebreak
%   \verb|\end{subfloatrow}|
%   \end{Quote}
%   i.e.\ by default there are allowed two parts of floats. For other number of parts
%   you ought to put number in the optional argument. This environment
%   puts  horizontal separator, defined by |subfloatrowsep=|
%   key. This key uses the same options
%   as |floatrowsep=| and |capbesidesep=| keys (options of
%   these keys defined by the \verb|\|\FRkey{DeclareFloatSeparators} command).
%
%   Inside the  |subfloatrow| environment you may use the |\caption| command, which
%   this time creates the label for parts of float. This is because of setting
%   \begin{Quote}
%   |\captionsetup{subtype}|
%   \end{Quote}%
%   at the very beginning of  this environment.
%
%   \emph{Note}: With the \package{floatrow} package you may use also |\captionsetup[subfloat]|
%   settings, the \package{caption} package offers
%   the |\captionsetup[subtype]{...}| settings which will be stronger than previous, to say nothing
%   about  |\captionsetup[subfigure]{...}| for parts of figure, which are strongest. (Please note
%   that in \package{caption} terms word ``subtype'' means part of float.)
%
%   Next follows an example with beside main caption (figure~\ref{fig:subcap:catsI}).%^^A
%   \begin{Quote}[0pt]
%   \begin{preamble}\nopagebreak
%   \verb|...|
%   \verb|\DeclareCaptionSubType[alph]{figure}|
%   \verb|\captionsetup[subfigure]{labelformat=brace,justification=centerlast}|\vspace{1ex}
%   \verb|\floatsetup[figure]{|\FRkey{style}\verb|=Shadowbox,|%^^A%
%        \FRkey{capbesidesep}\verb|=columnsep,%|
%   \verb|    |\FRkey{capbesideframe}\verb|=yes,|%^^A
%        \FRkey{capbesideposition}\verb|={left,bottom}}|\nopagebreak
%   \verb|\floatsetup[subfigure]{|\FRkey{style}\verb|=plain,|\FRkey{heightadjust}\verb|=object}|
%   \end{preamble}
%   \verb|\begin{figure}|
%   \verb|\fcapside[\FBwidth]|
%   \verb|  {\begin{subfloatrow}|
%   \verb|    \ffigbox[\FBwidth]{\caption{One funny cat}\Flabel{...}...}{}|
%   \verb| |
%   \verb|    \ffigbox[\FBwidth]{\caption{Another pleasant cat}\Flabel{...}...}{}%|
%   \verb|   \end{subfloatrow}}|
%   \verb|  {\caption{... \Fref{...} and \Fref{...}}\label{...}}|\nopagebreak
%   \verb|\end{figure}|
%   \end{Quote}\par\kern-\textfloatsep\kern-\baselineskip
%\begingroup
%   \captionsetup[subfigure]{labelformat=brace,justification=centerlast,strut=no}
%   \floatsetup[figure]{style=Shadowbox,capbesidesep=columnsep,
%     capbesideframe=yes,capbesideposition={left,bottom}}
%   \floatsetup[subfigure]{style=plain,heightadjust=object}
%   \begin{figure}[H]
%   \fcapside[\FBwidth]
%   {\begin{subfloatrow}
%   \ffigbox[\FBwidth]{\caption{One funny cat}\Flabel{subcapfig:w}%
%     \unitlength1.2\unitlength\input{Cat.picture}}{}
%   \ffigbox[\FBwidth]{\caption{Another pleasant cat}\Flabel{subcapfig:b}%^^A
%     \unitlength1.32\unitlength\input{TheCat.picture}}{}%
%   \end{subfloatrow}}
%   {\caption[Subfloat row]{Beside figure
%       caption vertically bottom aligned; fancy
%   \texttt{Shadowbox} layout. There are two parts:
%   \Fref{subcapfig:w} and \Fref{subcapfig:b}}\label{fig:subcap:catsI}}
%   \end{figure}\kern-\lastskip
%\endgroup
%
%   In the next example the main caption will be placed below, but labels of figure parts were
%   printed beside (see figure~\ref{fig:subcap:catsII}). For this reason the
%   \cs{useFCwidth} command was used, which creates the width of caption box equal to natural caption width.
%   \begin{Quote}\vskip-\lastskip%
%\begin{preamble}\nopagebreak
%\verb|...|
%\verb|\captionsetup[subfigure]{labelformat=brace,list=off}|\vspace{1ex}
%\verb|\floatsetup[subfigure]{|\FRkey{style}\verb|=plain,|%^^A
%   \FRkey{capbesideposition}\verb|=left,|
%\verb|      |\FRkey{capbesidesep}\verb|=space,|%^^A
%   \FRkey{heightadjust}\verb|=object}|\nopagebreak
%\end{preamble}
%   \verb|\begin{figure}[H]|
%   \verb|  \ffigbox[\FBwidth]|
%   \verb|    {\begin{subfloatrow}\useFCwidth|
%   \verb|       \fcapside[\FBwidth]{\caption{}\Flabel{...}...}{}|
%
%   \verb|       \fcapside[\FBwidth]{\caption{}\Flabel{...}...}{}|
%   \verb|     \end{subfloatrow}}|
%   \verb|    {\caption[...]{...}\label{...}}|\nopagebreak
%   \verb|\end{figure}|\pagebreak[1]
%   \end{Quote}
%\begingroup
%   \captionsetup[subfigure]{labelformat=brace,justification=raggedleft,list=off}
%   \floatsetup[subfigure]{style=plain,capbesideposition=left,
%       capbesidesep=space,floatrowsep=qquad}
%   \begin{figure}[H]
%   \ffigbox[\FBwidth]
%   {\begin{subfloatrow}\useFCwidth
%
%   \fcapside[\FBwidth]
%     {\caption{}\Flabel{subcap:wI}\hbox{\unitlength1.02\unitlength\input{Cat.picture}}}{}
%
%   \fcapside[\FBwidth]
%     {\caption{}\Flabel{subcap:bI}\hbox{\unitlength.85\unitlength\input{TheCat.picture}}}{}%
%   \end{subfloatrow}}
%   {\caption[Two parts of figure with
%       labels beside]{Two parts of figure in a row with
%       labels beside. Main caption below. There are two subfigures:
%       \Fref{subcap:wI} and \Fref{subcap:bI}}\label{fig:subcap:catsII}}
%   \end{figure}
%\endgroup
%
%   In the next example the difference from previous layout settings is in usage
%   of the top vertical alignment. The height of the right graphics was enlarged by 1cm just
%   to show how the alignment for parts (here is default centering alignment)
%   and the top alignment for their captions (they are aligned by top) works.
%   \begin{Quote}%
%\begin{preamble}\nopagebreak
%\verb|...|
%\verb|\floatsetup[subfigure]{|\FRkey{style}\verb|=plain,|%^^A
%   \FRkey{heightadjust}|=object,|
%\verb|      |\FRkey{capbesideposition}\verb|={left,top},|\FRkey{capbesidesep}\verb|=space}|
%\end{preamble}
%   \verb|\begin{figure}[H]|
%   \verb|  \ffigbox[\FBwidth]|
%   \verb|    {\begin{subfloatrow}\useFCwidth|
%   \verb|       \fcapside[\FBwidth]{\caption{}\Flabel{...}...}{}|
%
%   \verb|       \fcapside[\FBwidth][\FBheight+1cm]{\caption{}\Flabel{...}...}{}|
%   \verb|     \end{subfloatrow}}|
%   \verb|{\caption[...]{...}\label{...}}|
%   \verb|\end{figure}|
%   \end{Quote}
%\begingroup
%   \captionsetup[subfigure]{labelformat=brace,justification=raggedleft,list=off}
%   \floatsetup[figure]{heightadjust=object}
%   \floatsetup[subfigure]{style=plain,capbesideposition={left,top},heightadjust=object,
%       capbesidesep=enskip,floatrowsep=qquad}
%   \begin{figure}[H]
%   \ffigbox[\FBwidth]
%   {\begin{subfloatrow}\useFCwidth
%
%   \fcapside[\FBwidth]
%     {\caption{}\Flabel{subcap:wIi}\hbox{\unitlength1.02\unitlength\input{Cat.picture}}}{}
%
%   \fcapside[\FBwidth][\FBheight+1cm]
%     {\caption{}\Flabel{subcap:bIi}\hbox{\unitlength.85\unitlength\input{TheCat.picture}}}{}%
%   \end{subfloatrow}}
%   {\caption[Two labeled parts of figure (centered vertically);
%       beside labels aligned by top]{Two parts
%       of figure centered vertically; beside labels aligned by top. Main caption below.
%       There are two subfigures:
%       \Fref{subcap:wIi} and \Fref{subcap:bIi}}\label{fig:subcap:catsIiI}}
%   \end{figure}
%\endgroup
%
%   Another example (\ref{fig:subcap:IcatsI}) demonstrates, that you
%   may not only use the option |style=plain| for parts of float,
%   and there can not only be labels for beside subcaptions.
%   \begin{Quote}[0pt]
%   \begin{preamble}\nopagebreak
%   \verb|\captionsetup[subfigure]{labelformat=brace,justification=rightlast,|
%   \verb|      format=hang}|\vspace{1ex}
%   \verb|\floatsetup[figure]{|\FRkey{style}\verb|=plain}|
%   \verb|\floatsetup[subfigure]{|\FRkey{style}\verb|=BOXED,|\FRkey{capbesideposition}\verb|={left,top}}|
%   \end{preamble}
%   \verb|\begin{figure}|
%   \verb|\ffigbox|
%   \verb|  {\begin{subfloatrow}|
%   \verb|    \fcapside[1.1\FBwidth]{\caption{One ...}\Flabel{...}...}{}|
%   \verb| |
%   \verb|    \fcapside[1.1\FBwidth]{\caption{Another ...}\Flabel{...}...}{}%|
%   \verb|   \end{subfloatrow}}|
%   \verb|  {\caption{... \Fref{...} and \Fref{...}}\label{...}}|\nopagebreak
%   \verb|\end{figure}|
%   \end{Quote}
%\begingroup
%   \captionsetup[subfigure]{labelformat=brace,justification=rightlast,format=hang}
%   \floatsetup[figure]{style=plain}
%   \floatsetup[subfigure]{style=BOXED,capbesideposition={left,top}}
%   \begin{figure}[H]
%   \ffigbox
%   {\begin{subfloatrow}
%   \fcapside[1.1\FBwidth]{\caption{One very funny cat with half-circle eyes, triangle ears,
%    and small black nose}\Flabel{subcapfig:ww}%
%     \input{Cat.picture}}{}
%   \fcapside[1.1\FBwidth]{\caption{Another very pleasant cat with big whiskers, oval eyes, and pink
%    wet nose}\Flabel{subcapfig:bb}%^^A
%     \input{TheCat.picture}}{}%
%   \end{subfloatrow}}
%   {\caption[Two parts of figure in a row with captions beside]{Beside
%       subcaptions vertically top aligned. There are two subfigures:
%   \Fref{subcapfig:ww} and \Fref{subcapfig:bb}}\label{fig:subcap:IcatsI}}
%   \end{figure}\vskip-\lastskip\kern-\baselineskip
%\endgroup
%
%   \DescribeMacro{\captionlabel}%
%   \DescribeMacro{\subcaptionlabel}%
%   The last example demonstrates new command \verb|\subcaptionlabel| for caption
%   labels, which can be used inside,
%   e.g., |picture| environment or as replacing text in \verb|psfrag| command of \package{psfrag}
%   package. Unlike the \verb|\caption| and \verb|\subcaption| commands, the \verb|\subcaptionlabel|
%   will not be saved in special box register when the float box is building, and
%   will be typed like caption label, which follows settings of caption layout.
%   This command is based on \verb|\subcaption| command but with changed internal command of \package{caption}
%   package. There is also the \verb|\captionlabel| command.
%   \captionsetup[subfigure]{labelformat=brace,justification=raggedleft}
%   \begin{Quote}%
%\begin{preamble}\nopagebreak
%\verb|...|
%\verb|\floatsetup[figure]{|\FRkey{style}\verb|=plain}|
%\end{preamble}
%   |{\begin{picture}(82,28)(0,0)|
%   |\put(0,0){\framebox(40,28)[bl]{}}|
%   |\put(2,2){\makebox(0,0)[bl]{\relax\hbox{\subcaptionlabel{}\Flabel{scap:I}}}}|
%   |...|
%   |\put(42,0){|
%   |\put(0,0){\framebox(40,28)[bl]{}}|
%   |\put(2,2){\makebox(0,0)[bl]{\hbox{\subcaptionlabel{}\Flabel{scap:II}}}}|
%   |...}|
%   |\end{picture}}|
%   |{\caption{Here are two simple subfigures.|
%   |\textit{Left} shows cat's eyes (\Fref{scap:I});|
%   |\textit{right}---cat's ears (\relax\Fref{scap:II})%|
%   |}\label{figcap:label}}|
%   |\end{figure}|
%   \end{Quote}
%\begingroup\par\kern-\textfloatsep
%   \floatsetup[figure]{style=plain}
%   \begin{figure}[H]
%   \fcapside[\FBwidth]
%   {\unitlength2\unitlength\fboxsep-.4pt
%   \begin{picture}(82,28)(0,0)
%   \put(0,0){\framebox(40,28)[bl]{}}
%   \put(2,2){\makebox(0,0)[bl]{\relax\hbox{\subcaptionlabel{}\Flabel{scap:I}}}}
%   \put(20,2){{
%               \put(-12,5){\put(4.5,4.5){\oval(9,9)[t]}
%                         \put(4.5,4.5){\line(0,1){4.5}}
%                         \put(0,4.5){\line(1,0){9}}}
%               \put(3,5){\put(4.5,4.5){\oval(9,9)[t]}
%                         \put(4.5,4.5){\line(0,1){4.5}}
%                         \put(0,4.5){\line(1,0){9}}}}}
%   \put(42,0){
%   \put(0,0){\framebox(40,28)[bl]{}}
%   \put(2,2){\makebox(0,0)[bl]{\hbox{\subcaptionlabel{}\Flabel{scap:II}}}}%^^A\label{}
%   \put(20,2){{
%               \put(-14,12){\put(0,0){\line(2,3){5}}
%                         \put(10,0){\line(-2,3){5}}}
%               \put(4,12){\put(0,0){\line(2,3){5}}
%                          \put(10,0){\line(-2,3){5}}}}}}
%   \end{picture}}
%   {\caption[The graphic with subfloat labels]{%^^A
%   Here are two simple subfigures.
%   \textit{Left} shows cat's eyes (\Fref{scap:I});
%   \textit{right}---cat's ears (\relax\Fref{scap:II})
%   \unskip}\label{figcap:label}}
%   \end{figure}
%\endgroup
%
%   \subsection{Support of The Label--Sublabel References}\label{ssec:Flabel}
%   In the examples above of the current section  the \verb|\Flabel| and
%   \verb|\Fref| commands were used for cross referencing (you may see
%   these commands in the code examples).
%   The \verb|\Flabel| gets a~modified format of current label of subfloat number:
%   In these definitions the float and subfloat
%   separators are divided by a~special separator command, which by default has no effect.
%   The label command \verb|\Flabel| can be defined like following:
%   \begin{Quote}%
%\begin{preamble}
%   \verb|\newseparatedlabel\Flabel{figure}{subfigure}|
%\end{preamble}
%   \end{Quote}
%   or, for all floats:
%   \begin{Quote}%
%\begin{preamble}
%   \verb|\makeatletter|\nopagebreak
%   \verb|\newseparatedlabel\Flabel{\@captype}{sub\@captype}|\nopagebreak
%   \verb|\makeatother|
%\end{preamble}
%   \end{Quote}
%   Next command, \verb|\Fref|, redefines this separator, and defines, if necessary,
%   the font emphasize (or other command which uses one argument)
%   of following part of label, and prints reference with
%   standard \verb|\ref| command. It was defined in this documentation like following:
%   \begin{Quote}%
%\begin{preamble}
%   \verb|\newseparatedref\Fref{,\,\textit}|\quad.
%\end{preamble}
%   \end{Quote}
%   Thus, labels, which use \verb|\Flabel| command can be referenced by usual way with \verb|\ref|
%   command and with \verb|\Fref| command. The labels in current section and in the section, which describes
%   the \package{subfig} package, use the \verb|\Flabel|. You may see the result of this command
%   in all \verb|\Fref|erences to these parts of figures.
%
%   The last command, \verb|\makelabelseparator|, defines label separator globally:
%   \begin{Quote}%
%\begin{preamble}
%   \verb|\makelabelseparator{,\,\textit}|\quad.
%\end{preamble}
%   \end{Quote}
%   In this case both \verb|\Fref| and \verb|\ref| commands give the same result with |\Flabel|ed
%   elements.
%
%    \subsubsection{The \texorpdfstring{\cs{RawCaption}}{RawCaption} with Parts of Figure}
%\begingroup
%   \DescribeMacro{\RawCaption}\label{subcap:RawCaption}%^^A
%   The example with usage of |\subcaption| and |\RawCaption| command.
%   The layout of figure float is modified \verb|BOXED| style. The idea behind this example is
%   to place caption in the free right lower corner of graphics. The \verb|\RawCaption|
%   allows to put the caption in necessary place without disturbing the float layout.
%   \captionsetup[subfigure]{labelformat=brace,justification=rightlast,format=hang}
%
%   \DescribeMacro{subfloatrow*}
%   The starred form loads settings for creation captions of float parts, but
%   in this environment the |\caption| command restores its meaning. Thus,
%   you need the |\subcaption| command for typesetting sub-captions.
%   You may define it by yourself:
%   \begin{Quote}
%   |\newcommand*\subcaption{\captionsetup{subtype*}\caption}|
%   \end{Quote}%
%   or use the additional package called \package{subcaption} which on top of everything
%   defines the |\subcaption| command.
%
%   \begin{Quote}[0pt]%
%\begin{preamble}\nopagebreak
%   |\|\FRkey{DeclareColorBox}|{framedfigure}{\fcolorbox{gray}{white}}|\vspace{1ex}
%   |\floatsetup[figure]{style=BOXED,heightadjust=object,|
%   |    colorframeset=framedfigure,|
%   |    framestyle=colorbox,frameset={\fboxrule3pt\fboxsep8pt}}|\vspace{1ex}
%   |\floatsetup[subfigure]{style=plain,capbesideposition={left,top},|
%   |    heightadjust=object}|
%\end{preamble}
%   |\begin{figure}[H]|
%   |\ffigbox{}{\begin{subfloatrow*}|
%   |\fcapside[1.1\FBwidth]{\subcaption{...}\Flabel{...}...}{}|
%   |\fcapside[1.1\FBwidth]{\subcaption{...}\Flabel{...}...}{}%|
%   |\end{subfloatrow*}%|
%   |\renewlengthtocommand\settowidth\Mylen{\subfloatrowsep}\vskip\Mylen|
%   |\BottomFloatBoxes\floatsetup[subfigure]{heightadjust=none}|
%   |\begin{subfloatrow*}|
%   |\fcapside[1.1\FBwidth]{\subcaption{...}\Flabel{...}...}{}|
%   |\ffigbox[][][b]{}{\RawCaption{\caption[...}\label{...}}}|
%   |\end{subfloatrow*}}|\nopagebreak
%   |\end{figure}|
%   \end{Quote}
%   \floatsetup[figure]{style=BOXED,heightadjust=object,colorframeset=framedfigure,
%       framestyle=colorbox,frameset={\fboxrule3pt\fboxsep8pt}}
%   \floatsetup[subfigure]{style=plain,capbesideposition={left,top},heightadjust=object}
%   \begin{figure}[H]
%   \ffigbox{}{\begin{subfloatrow*}
%   \fcapside[1.1\FBwidth]{\subcaption{One very funny cat with half-circle eyes, triangle ears,
%    and small black nose}\Flabel{subIcapfig:ww}%
%     \setlength\unitlength{61\unitlength/48}\input{Cat.picture}}{}
%   \fcapside[1.1\FBwidth]{\subcaption{Another very pleasant cat with big whiskers, oval eyes, and pink
%    wet nose}\Flabel{subIcapfig:bb}%^^A
%     \input{TheCat.picture}}{}%
%   \end{subfloatrow*}\renewlengthtocommand\settowidth\Mylen{\subfloatrowsep}\vskip\Mylen
%   \BottomFloatBoxes\floatsetup[subfigure]{heightadjust=none}
%   \begin{subfloatrow*}
%   \fcapside[1.1\FBwidth]{\subcaption{The very big cat, sitting on the window and
%    looking at the birds on the tree in the yard}\Flabel{subIcapfig:bc}%
%     \input{BlackCat.picture}}{}
%   \ffigbox[][][b]{}{\RawCaption{\caption[Three labeled parts of figure and raw caption]{Beside
%       subcaptions vertically top aligned. There are three subfigures:
%   \Fref{subIcapfig:ww}, \Fref{subIcapfig:bb} and \Fref{subIcapfig:bc}. Caption placed
%       at the free space of right lower corner}\label{fig:subIcap:IcatsI}}}
%   \end{subfloatrow*}}
%   \end{figure}
%\endgroup
%
%\endgroup
%
%\clearpage
%   \section{Style Tandems}
%   The next few sections show examples and explain some noticed
%   features with usage of \package{floatrow} and other packages. There is no
%   full list of style compatibilities. You may succeed with other
%   versions of mentioned packages, and maybe with not mentioned
%   packages too.
%
%\begingroup
%   \subsection{The \package{subfig} Package}\label{ssec:subfig}
%   Tested (and compatible) with version 1.3,
%   dated 2005/06/28%^^A
%   \footnote{The English documentation is
%   \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf}%^^A
%   {\meta{texmf folder}\texttt{/doc/latex/subfig/subfig.pdf}}.}.
%   For the \package{subfig} package there are additional
%   macros in \package{floatrow} which
%   put subcaption label beside contents of subfloat and put alone
%   subcaption label.
%
%   \subsubsection{Additions in \package{floatrow}}
%   The example with \cmd{\subfloat}'s (table~\ref{tab:tabIII}). The
%   setting command in preamble |\floatsetup[table]{style=Plaintop}|%^^A
%   \FRmpar{Subcaption above subtable}{FAD:subcapabove}
%   includes also settings for subcaption positions used with the
%   \package{subfig} package (like |\captionsetup[table]{position=top}| in
%   \package{caption} package):
%\begin{Quote}\obeylines\parskip-.15pt
%|\begin{table}\setlength\extrarowheight{1pt}|\nopagebreak
%|  \|\FRkey[sec]{floatbox}|{table}[\FBwidth]|
%|   {\caption{Two ...}\label{...}}|
%|   {\begin{subfloatrow}|
%|     \subfloat[First subtable]|
%\verb+      {\begin{tabular}{|l|c|c|}+
%|        ...\end{tabular}}|
%|     \subfloat[Second subtable...]|
%\verb+      {\begin{tabular}{|l|c|c|}+
%|        ...\end{tabular}}%|
%|    \end{subfloatrow}}|
%|\end{table}|
%\end{Quote}
%   \DeleteShortVerb{\|}%
%   \captionsetup[subtable]{textfont=md}
%   \begin{table}[h]\extrarowheight1pt\tabcolsep1.25\tabcolsep
%   \floatbox{table}[\FBwidth]
%   {\caption{Two \cmd{\subtable}'s
%    (created with \package{subfig} package)}\label{tab:tabIII}}
%   {\begin{subfloatrow}
%     \subfloat[First subtable]
%      {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
%       \hline
%       \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%       \\\hline
%       First row    &         1 &         2 \\
%       Second row   &         3 &         4 \\
%       Third row    &         6 &         8 \\
%       Fourth row   & \llap{1}0 & \llap{1}6 \\
%       \hline
%       \end{tabular}}
%
%   \subfloat[Second subtable with long long long subcaption]
%   {\begin{tabular}{|l|c|c|}
%     \hline
%       \multirowthead{2}[-1ex]{Column Head}
%                  & \multicolumn{2}{c|}{\thead{Data}} \\
%                  \cline{2-3}
%                  & \multicolumn{1}{c|}{\thead{I}}
%                              & \multicolumn{1}{c|}{\thead{II}}
%     \\\hline
%     First row    & \phantom01 & \phantom02 \\
%     Second row   & \phantom03 & \phantom04 \\
%     Third row    & \phantom06 & \phantom08 \\
%     \hline
%   \end{tabular}}%
%   \end{subfloatrow}}
%   \end{table}%
%   \MakeShortVerb{\|}%
%
%   The |subfloatrow| is analogous to the |floatrow| environment.
%   The usage is similar to |floatrow|:
%   \begin{Quote}
%   |\begin{subfloatrow}[|\meta{number of beside floats}|]|\nopagebreak
%   |\subfloat...|\nopagebreak
%   |\subfloat...|\nopagebreak
%   |...|\nopagebreak
%   |\end{subfloatrow}|
%   \end{Quote}
%   i.e. by default two subfloats are allowed. For other number of subfloats
%   you ought to put number in optional argument.
%   This environment
%   puts a~horizontal separator between subfloats, defined by |subfloatrowsep=|
%   key instead of |floatrowsep=|. This key uses the same options
%   as |floatrowsep=| and |capbesidesep=| keys (options of
%   these keys defined by |\DeclareFloatSeparators| command,
%   page~\pageref{setup:DeclareFloatSeparators}).
%
%   Next follows an example with beside caption (see
%   figure~\ref{fig:subfig:catsI}).%^^A
%\begingroup
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{style}|=Shadowbox,|%^^A
%     \FRkey{capbesidesep}|=columnsep,|
%|    |\FRkey{capbesideframe}|=yes,|%^^A
%     \FRkey{capbesideposition}|={left,top}}|
%|\floatsetup[subfigure]{|\FRkey{style}|=plain}|
%|\captionsetup[subfigure]{labelformat=brace,justification=centerlast,|
%|      strut=no}|\nopagebreak
%\end{preamble}
%|\|\FRkey[FB]{fcapside}|[\|\FRkey[FB]{FBwidth}|]|
%|   {\begin{subfloatrow}|
%|   \subfloat[...\label{...}]{...}|
%|   \subfloat[...\label{...}]{...}|
%|   \end{subfloatrow}}|
%|{\caption{...}}|
%\end{Quote}
%   \floatsetup[figure]{style=Shadowbox,capbesidesep=columnsep,
%     capbesideframe=yes,capbesideposition={left,top}}
%   \floatsetup[subfigure]{style=plain}
%   \captionsetup[subfigure]{labelformat=brace,justification=centerlast,strut=no}
%   \begin{figure}[h]
%   \fcapside[\FBwidth]
%   {\begin{subfloatrow}
%   \subfloat[One cat]{%
%     \input{Cat.picture}\Flabel{subfig:w}}
%   \subfloat[Another cat]{\input{TheCat.picture}\Flabel{subfig:b}}
%   \end{subfloatrow}}
%   {\caption[Subfloat row]{Beside
%       caption vertically top aligned; fancy
%   |Shadowbox| layout. There are two subfigures:
%   \Fref{subfig:w} and \Fref{subfig:b}}\label{fig:subfig:catsI}}
%   \end{figure}
%\endgroup
%
%   \DescribeMacro{\sidesubfloat}
%   Another addition in \package{floatrow} for subfloats is the command,%^^A
%   which puts subcaption label beside subfloat. The subcaption label always
%   appears on the left side. The key |subcapbesideposition=|
%   \DescribeMacro{subcapbesideposition}\label{setup:subcapbesideposition}%^^A
%   sets vertical alignment of beside subcaption and subfloat.
%   The options are analogous to the ones for |capbesideposition=| key:
%   \begin{Options}{\OptionLabel}\samepage
%     \item[top]
%     subcaption label aligned to the top of object;
%     \item[bottom]
%     subcaption label aligned to the bottom of object;
%     \item[center]
%     subcaption label aligned to the center of float contents.
%   \end{Options}
%
%   The figure~\ref{fig:subfig:catsII} shows layout with subfloat labels beside.
%   \FRmpar{Subcaption beside subfloat}{FAD:sublabelbeside}
%   \begingroup
%   \begin{Quote}%
%\begin{preamble}
%|...|
%|\floatsetup[figure]{|\FRkey{style}|=plain,|%^^A
%   \FRkey{subcapbesideposition}|=top}|
%\end{preamble}
%   |\begin{figure}[H]|
%   |  \ffigbox[\FBwidth]|
%   |    {\begin{subfloatrow}|
%   |       \sidesubfloat[]{...\label{...}}%|
%   | |
%   |       \sidesubfloat[]{...\label{...}}%|
%   |     \end{subfloatrow}}|
%   |{\caption[...]{...}\label{...}}|
%   |\end{figure}|
%   \end{Quote}
%   \floatsetup[figure]{style=plain,subcapbesideposition=top}
%   \begin{figure}[h]
%   \ffigbox[\FBwidth]
%   {\begin{subfloatrow}
%   \sidesubfloat[]{%
%     \input{Cat.picture}\Flabel{subfig:wI}}
%
%   \sidesubfloat[]{\input{TheCat.picture}\Flabel{subfig:bI}}%
%   \end{subfloatrow}}
%   {\caption[Subfloat row (labels beside)]{Beside caption vertically centered.
%   There are two subfigures:
%   \Fref{subfig:wI} and \Fref{subfig:bI}}\label{fig:subfig:catsII}}
%   \end{figure}
%   \endgroup
%
%   \DescribeMacro{\subfloatlabel}
%   There are cases when usage of something like |\subfloat[]{\label{..}}|
%   is needed. The first case shows the figure~\ref{fig:subfig:catsIII}---the
%   funny |picture| environment where subfloat labels were |\put|
%   as a part of subfigures.
%   Other---when you use mechanism of \package{psfrag} package and replace text entries
%   from PostScript file with \LaTeX{} ones. Unfortunately, the \package{subfig} package
%   creates unnecessary spaces around alone subfloat label in the
%   |\subfloat[]{\label{..}}| combination. The \package{fr-subfig} tries to fix this problem.
%
%   This command is based on |\subfloat[]{\label{..}}| sentence and
%   puts alone subcaption label with necessary number. The full variant
%   of |\subfloatlabel|
%   \begin{Quote}
%   |\subfloatlabel|\oarg{subfloat number}\oarg{label entry}
%   \end{Quote}
%   is the abbreviation of the following:
%   \begin{Quote}
%   |\setcounter|\marg{sub{\upshape\texttt{\char`\\@captype}}}\marg{subfloat number-1}
%   |\subfloat[]{\label{|\meta{label entry}|}}|
%   \end{Quote}
%
%   Another example:
%   \begingroup
%   \begin{Quote}%
%\begin{preamble}
%|...|
%|\floatsetup[figure]{|\FRkey{style}|=plain}|
%\end{preamble}
%   |\begin{figure}[h]|
%   |\fcapside[\FBwidth]|
%   |    {\unitlength2\unitlength\fboxsep-.4pt|
%   |       \begin{picture}(90,30)(0,0)|
%   |           \put(0,0){\framebox(40,30)[bl]{}}|
%   |           \put(2,2){\makebox(0,0)[bl]{\subfloat[]{\Flabel{subfig:wII}}}}|
%|...|
%   |           \put(50,0){\framebox(40,30)[bl]{}}|
%   |           \put(52,2){\makebox(0,0)[bl]{\subfloatlabel[3][subfig:bII]{}}}%|^^A
%|...|
%   |       \end{picture}}|
%   |{\caption{...}\label{...}}|%^^A
%   |\end{figure}|
%   \end{Quote}
%   \floatsetup[figure]{style=plain}
%   \captionsetup[subfigure]{listofformat=comma-separated,labelformat=brace,justification=centerlast,strut=no}
%\makeatletter
%   \begin{figure}[ht]
%   \fcapside[\FBwidth]
%   {\unitlength2\unitlength\fboxsep-.4pt
%   \begin{picture}(90,30)(0,0)
%   \put(0,0){\framebox(40,30)[bl]{}}
%   \put(2,2){\makebox(0,0)[bl]{\subfloat[]{\Flabel{subfig:wII}}}}
%   \put(0,0){
%   \put(8,10){\put(4.5,4.5){\oval(9,9)[t]}
%             \put(4.5,4.5){\line(0,1){4.5}}
%             \put(0,4.5){\line(1,0){9}}}
%   \put(23,10){\put(4.5,4.5){\oval(9,9)[t]}
%             \put(4.5,4.5){\line(0,1){4.5}}
%             \put(0,4.5){\line(1,0){9}}}}
%
%   \put(50,0){\framebox(40,30)[bl]{}}
%   \put(52,2){\makebox(0,0)[bl]{\subfloatlabel[3][subfig:bII]{}}}%^^A
%   %^^A\label{}
%   \put(50,0){
%   \put(6,18){\put(0,0){\line(2,3){5}}
%             \put(10,0){\line(-2,3){5}}}
%   \put(24,18){\put(0,0){\line(2,3){5}}
%              \put(10,0){\line(-2,3){5}}}}
%   \end{picture}}
%   {\caption[The graphic with subfloat labels; these two labels of subfloats use changed settings
%       of the \texttt{listofformat=} key]{%^^A
%   Here are two simple subfigures.
%   Left one shows cat's eyes (\Fref{subfig:wII}), labeled with
%   \cs{subfloat}\texttt{[]\char`\{\char`\}} macro;
%   with \cs{subfloatlabel}\texttt{[3][subfig:bII]} sentence were labeled the cat's ears
%   (\Fref{subfig:bII})}%^^A
%   \label{fig:subfig:catsIII}}
%   \end{figure}
%   \endgroup
%   In the examples of current section the \verb|\Flabel| and \verb|\Fref|
%   commands for cross referencing of the subfloats were used
%   (you may see these commands in the code examples). As described in section~\ref{ssec:Flabel}
%   these commands allow to create combined references which consist of the parent and current
%   labels separated by predefined punctuation sign.
%
%\begin{small}
%
%   \medskip
%   \emph{Some explanation}.
%   Previous versions of documentation used the |listofformat=| key; the necessary option
%   was defined by |\DeclareCaptionListOfFormat| command:
%   \begin{Quote}%
%   |\DeclareCaptionListOfFormat{comma-separated}{#1,\,#2}|
%   \end{Quote}%
%   This format is used, in particular, by |\subref| command. But usage of this key changes output
%   of subfloat numbers in the lists (list of tables and list of figures etc.),
%   which could be undesirable (see numbers of subfigures \subref{subfig:wII}
%   and \subref{subfig:bII} in the List of Figures).
%   \medskip
%
%\end{small}
%
%   See examples with |subfloatrow| environments in sample files
%   \file{frsample03.tex}, \file{frsample05.tex}; and also
%   \file{frsample10.tex}--\file{frsample12.tex} where aligned contents
%   of beside subfloats are used in different layouts.
%
%\endgroup
%
%   \clearpage
%   \subsection{The \package{longtable} Package}\label{ssec:longtable}
%   Tested with version v4.11, dated 2004/02/01.%^^A
%   \footnote{The English documentation is
%   \href{ftp://ctan.tug.org/tex-archive/macros/latex/required/tools/longtable.dvi}%^^A
%   {\meta{texmf folder}\texttt{/doc/latex/tools/longtable.dvi}}.}
%
%   Please note that almost all settings in the |\floatsetup|'s
%   argument do not work inside |longtable| environments, except
%   settings for caption width (see below) and plain horizontal alignment in the |margins=| key.
%   So, during building of |\floatsetup| settings for the tables, be aware
%   that you may use only something like |style=plaintop| or |style=Plaintop|,
%   to place caption above, also you may use options of the
%   |margins=| key, which use only spacing commands, like defined ones
%   in this package (page~\pageref{setup:margins}), and do not forget settings for |\LTleft| and |\LTright|
%   margins, which set the alignment of |longtable| environment.
%
%   Please see the \package{caption} documentation about how to build necessary caption layout
%   when |longtable| environment is used.
%
%   \subsubsection{Additions in The \package{floatrow} Package}\label{ssec:LTcapwidth}
%   A patch was added to the \package{longtable}
%   package\footnote{Thanks to A.~Sommerfeldt for help to make this
%   code compact.}: this patch adds the same font settings
%   as for |table| environments, and adds code which helps
%   to get the width of |longtable| caption equal to the
%   width of table. For settings of the caption width  the special key was created.
%
%   \DescribeMacro{LTcapwidth}\label{setup:LTcapwidth}%^^A
%   \FRmpar{Caption width equals to longtable's}{FAD:LTcapwidth}
%   This key could have any value, like |5cm| or |\hsize|. The key value will be sent to
%   the |\LTcapwidth| command. If you'll write
%   |LTcapwidth=table| or |LTcapwidth=contents|, you will get
%   the caption width equal to the width of table. In this case settings for
%   width of caption use information from the |aux|-file, so you'll get
%   correct caption width at the time when the width of full table \emph{become
%   stable}.
%
%   The |longtable| environment uses layout settings from
%   |\floatsetup[table]| and |\floatsetup[longtable]| contents.
%   The |\floatsetup[longtable]| will be ``strongest'' in this pair.\medskip
%
%   \emph{The addition with version 0.1k}.
%   A~\textrm{beta-temp}\footnote{Again, like with \package{listpen} package,
%   I~hope that such support sooner or later could appear in
%   \package{longtable} and think it is better to follow
%   grammar of master-package for similar situations. Also it is necessary to say
%   that command names from \package{fr-longtable} package ``intrude'' in the
%   \package{longtable}'s naming space.} package \package{fr-longtable}
%   with additions is added,  which allows creation of special head for the last
%   page of longtable environment and special foot for pages before last
%   (the table~\ref{tab:floatlayouts} uses these commands for head and foot settings).
%
%^^A%   \DescribeMacro{\LTlastpage}
%   \DescribeMacro{\endlasthead}
%   \DescribeMacro{\endprelastfoot}
%   The |\endlasthead| command defined for last head of longtable; second command,
%   |\endprelastfoot|, defined for foot on the page before last.
%   Since these names of commands ``intrude'' in the \package{longtable} naming
%   territory they get defined if they are still unknown, i.e.~the main,
%   \package{longtable}, package didn't defined them.
%   The syntax is also analogous as for commands |\endhead|, |\endfirsthead| etc.
%   (See examples and additional explanation in the sample file
%    \texttt{sample-longtable.tex} file.)\medskip
%
%^^A%   \DescribeMacro{\floatfoot}
%   \emph{Note}. Please remember that the footnote stuff  inside |longtable| works like in main
%   text and puts the text of footnotes
%   at the bottom of page\footnote{See also |longtable| documentation.}.
%
%   The \package{floatrow} package's command for legends or explications, |\floatfoot|,
%   in current version has emulation mode inside |longtable|, and needs stuff,
%   similar to |\noalign{\floatfoot{...}}|. Since the default font definition for explications (|\floatfoot|)
%   is also set to |\footnotesize|, like for footnotes, you may put footnotes-emulations at the end of table,
%   inside this explication block, using |\mpfootnotemark| commands inside table contents and at the
%   beginning of each text of footnote.
%
%   The fragments from the longtable \ref{tab:floatlayouts} on the page
%   \pageref{tab:floatlayouts},
%   which describes float styles, will be the resum\'e for
%   this section.
%\begin{Quote}
%\begin{preamble}%
%|\DeclareCaptionLabelFormat{continued}{\rightline|
%|              {\bothIfFirst{#1}{ }#2 (\emph{Continued})}}|
%|\DeclareCaptionLabelFormat{finished}{\rightline|
%|              {\bothIfFirst{#1}{ }#2 (\emph{Finished})}}|
%\end{preamble}%
%   |\def\LongtableHead{|
%   |   \hfil\thead{Style} &|
%   |   \hfil\thead{\cmd{\floatsetup} keys} &|
%   |   \hfil\thead{Description}|
%   |   }|
%   |\begin{longtable}{|\meta{tabular preamble}|}|
%   |\caption{Float layout styles}\label{tab:floatlayouts}\\|
%   |\hline|
%   |\LongtableHead|
%   |\\ \hline|
%   |\endfirsthead|\% \emph{end of standard box of \package{longtable} package}
%   |\captionsetup{labelformat=continued}|\% %^^A
%       \smash{\em\tabular[t]l caption settings for continued page\endtabular}
%   |\caption[]{}\\|
%   |\hline|
%   |\LongtableHead|
%   |\\ \hline|
%   |\endhead|\% \emph{end of standard box of \package{longtable} package}
%   |\captionsetup{labelformat=finished}|\% %^^A
%       \smash{\em\tabular[t]l caption settings for finished page\endtabular}
%   |\caption[]{}\\|
%   |\hline|
%   |\LongtableHead|
%   |\\ \hline|
%   |\endlasthead|\% \emph{end of box offered by \package{fr-longtable} package}
%   |\hline|
%   |\multicolumn{3}{r@{}}{\topstrut\emph{Continued on next page}}|
%   |\endfoot|\% \emph{end of standard box of \package{longtable} package}
%   |\hline|
%   |\multicolumn{3}{r@{}}{\topstrut\emph{Finished on next page}}|
%   |\endprelastfoot|\% \emph{end of box offered by \package{fr-longtable} package}
%   |\endlastfoot|\% \emph{end of standard box of \package{longtable} package}
%   \meta{Contents of long table}
%   \meta{Contents of long table}|\mpfootnotemark[1]|
%   \meta{Contents of long table}
%   |\\ \hline|
%   |\noalign{\floatfoot*{|\meta{Text of foot material}|.\vspace{-3pt}\par|\nopagebreak
%   |\rule{1in}{.4pt}\vspace{2pt}|\% \emph{Emulation of footnote rule}\nopagebreak
%   |\parindent15pt|\nopagebreak
%   \% \emph{emulations of footnote texts}\nopagebreak
%   |\mpfootnotemark[1]|\meta{Text of footnote}\nopagebreak
%   |...|\nopagebreak
%   |}}|\nopagebreak
%   |\end{longtable}|
%\end{Quote}%
%   \emph{Note}. The usage of settings |\captionsetup{labelformat=continued}|
%   inside |longtable| environment was documented in the \package{caption} package 3.1.
%
% \clearpage
%   \subsection{The \package{wrapfig} Package}\label{ssec:wrapfig}
%   \captionsetup[wrapfigure]{name=Fig.,labelformat=thinspace}
%   \begingroup
%   \def\FBaskip{-12pt}
%   \floatsetup[figure]{style=ruled,relatedcapstyle=yes,
%     footposition=caption}
%   \begin{wrapfigure}[10]{O}{40mm}
%^^A   \ffigbox[40mm]
%   {\caption{Wrapped plain figure (\package{wrapfig} package)}%
%   \floatfoot{Plain figure fails with package version
%   3.3}\label{fig:wrapfig:WcatI}}
%   {\unitlength1.095\unitlength
%   \input{TheCat.picture}}
%   \end{wrapfigure}
%
%   Tested with version 3.3 dated 1999/10/12 (style from \package{ltxmisc}
%   bundle) and 3.6 dated 2003/01/31 (the separate \LaTeX\ package)%^^A
%   \footnote{The English documentation is
%   \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/wrapfig/wrapfig.pdf}%^^A
%   {\meta{texmf folder}\texttt{/doc/latex/wrapfig/wrapfig.pdf}}.}.
%
%   Options for environment (text borrowed from package comments):
%   \begin{Quote}
%   |\begin{wrapfigure}%|\nopagebreak
%   \strut\quad\oarg{number}\marg{placement}|%|\nopagebreak
%   \strut\quad\oarg{overhang}\marg{width of figure}
%   |...|\nopagebreak
%   |\end{wrapfigure}|
%   \end{Quote}
%
%   {\slshape\meta{Placement} is one of |r|, |l|, |i|,
%   |o|, |R|, |L|, |I|, |O|,  for
%   right, left, inside, outside. Lowercase letters set unfloated
%   positioning, uppercase---floated variant. The figure sticks into
%   the margin by \meta{overhang}, if given, or by the length
%   |\wrapoverhang|, which is normally zero. The \meta{number} of
%   wrapped text lines is normally calculated from the height of the
%   figure, but may be specified manually, e.g.}
%
%   \begin{Quote}
%   |\begin{wrapfigure}[10]{r}[34pt]{5cm}|\nopagebreak
%       \meta{figure}\nopagebreak
%   |\end{wrapfigure}|
%   \end{Quote}
%   \endgroup
%
%   \begingroup\sloppy
%   \def\FBaskip{-12pt}
%   \floatsetup[figure]{style=BOXED,frameset={\fboxsep12pt}}
%   \par\begin{wrapfigure}{o}{0mm}
%   \ffigbox[\FBwidth]
%   {\caption{Wrapped figure in \cs{ffigbox} (\package{wrapfig} package)}%
%   \label{fig:wrapfig:WcatII}}
%   {{\setlength\unitlength{36mm/48}%^^A
%   \input{Cat.picture}}}
%   \end{wrapfigure}
%
%   \emph{Notes.}\startNotes
%   \Note For figure, contents in e.g. in |wrapfigure| environment you set width
%   in mandatory argument. If you'll write \texttt{0mm} as \marg{width
%   of figure} argument, the \hbox{\package{wrapfig}} package will calculate a~natural width
%   of float contents. If you use the |\floatbox| command, put |\FBwidth| option to use natural object width.
%
%   \Note Sometimes above (below) float box in |wrap...| environment
%   appears unwanted space. To correct vertical position, use |\FBaskip|
%   (|\FBbskip|) commands (see {\sectionname}~\ref{sec:FBabskips}) and optional argument
%   \meta{number} of |wrap...| environments.
%
%   \Note Please note that the label of wrapped floats changed to `Fig.~\meta{number}'.
%   This happened because of the following settings:
%   \begin{Quote}
%   \begin{preamble}%
%   |\DeclareCaptionLabelFormat{thinspace}{\bothIfFirst{#1}{\,}#2}|
%   \end{preamble}%
%   |\captionsetup[wrapfigure]{name=Fig.,labelformat=thinspace}|
%   \end{Quote}
%   In preamble was added special format |thinspace| with smallest space between
%   `Fig.' and number which we use in the |wrapfig| settings.
%   See also \package{caption} documentation.
%
%   \emph{Special settings}.
%
%   You may create settings for |wrap...| environment, there are
%   following priorities.
%   (Please note that you can also create special caption settings with
%   |\captionsetup| stuff.):
%   \begin{itemize}\itemsep0pt
%   \item %
%    if exists |\floatsetup[wrap|\meta{captype}|]{...}|
%    \package{floatrow} uses these settings---they are the ``strongest''
%    settings; if they are absent---uses settings of next item;
%^^A   \end{itemize}
%
%^^A   \begin{itemize}
%   \item
%    if exists |\floatsetup[wrapfloat]{...}|
%    \package{floatrow} uses these settings---these settings are ``stronger''
%    than next ones; if they are absent---settings of current
%    float\\[\medskipamount]
%    |\floatsetup[|\meta{captype}|]{...}|\,;\\[\medskipamount]
%    if they are absent---uses
%    |\floatsetup{...}| settings, package settings inside |\usepackage| command or default settings of
%    package (page~\pageref{sec:default}).
%   \end{itemize}
%
%
%   \emph{Founded limitations}.\startNotes\nopagebreak
%
%   \Note The usage of plain floating environment in version 3.3 will
%   not succeed with \package{floatrow}---use |\floatbox|
%   stuff. The version 3.6 allows usage of plain |wrap...|
%   environment with \FRkey{plain} (or \FRkey{ruled}) styles, but
%   the framed styles, like |Boxed| (which use key |framefit=yes|, where text inside frames
%   changes its |\hsize| to fit frames, fitted to defined |\hsize|)
%   could work only with |\floatbox| macro, otherwise you'll get
%   incorrect widths and layout.
%
%   \Note The |wrap...| environments could fail inside list ones.
%   You ought be careful with grouping around wrapping environment (float can sail away or disappear).
%   Tests show that you may set |wrap...| environment at the very beginning of list, in the case of
%   you created faked or empty paragraph just before list (i.e. between |wrap...| and list)
%   with compensate negative spacing, like following:
%   |\noindent|\allowbreak|\strut|\allowbreak|\par|\allowbreak
%   |\nobreak|\allowbreak|\vskip-\baselineskip|.
%   \endgroup
%
%   \begingroup\sloppy
%   \floatsetup[figure]{style=WSHADOWBOX,captionskip=8pt}
%   \captionsetup[floatingfigure]{name=Fig.,labelformat=thinspace}
%   \subsection{The \package{floatflt} package}\label{ssec:floatflt}
%   \begin{floatingfigure}[v]{50mm}\def\FBaskip{-2.5pt}
%   \ffigbox[50mm]
%   {\setlength\unitlength{\hsize/72}%^^A%
%   \input{BlackDog.picture}}
%   {\caption{\hyphenpenalty-100\pretolerance-1%
%   Wrapped figure inside floating\-figure environment
%   (\package{floatflt})}\label{fig:floatflt:WcatI}}
%   \end{floatingfigure}%\FBbuildtrue
%
%   \noindent Tested with version v1.3 dated
%   1996/02/27\kern-1pt.
%
%   \emph{Founded limitations}. \startNotes\Note There is not support for
%   creation of new |floating...| environment. Since |floatflt|
%   environments need usage of |\floatbox| in any case, you can use
%   either |floatingfigure| or |floatingtable| and put
%   necessary float type in |\floatbox| argument (or use necessary
%   macro abbreviation, like |\ffigbox|). For these wrapped floats
%   the |\usepackage| option can be used  or |\floatsetup{...}| settings
%   and main settings for float types like
%   |\floatsetup[figure]{...}| settings.
%
%   The next limitations could not tied with \package{floatrow} package.
%
%   \Note If you put a~|floatingfigure| environment just after
%   |\...section| command you need (if you do not indentation after
%   heads) to put |\noindent| for the first paragraph.
%
%   \Note The |floatflt| environments could fail with list
%   environments.
%
%   \Note The special caption settings were created for figure label.
%   \begin{Quote}
%   |\captionsetup[floatingfigure]{name=Fig.,labelformat=thinspace}|
%   \end{Quote}
%
%   %^^A\newpage
%
%   \captionsetup[parpic]{name=Fig.,labelformat=thinspace}
%   \floatsetup[figure]{style=Doublebox,captionskip=10pt}\abovecaptionskip10pt
%   \subsection{The \package{picins} Package}\label{ssec:picins}
%   \noindent Tested with version v\,3.0 dated 1999/10/12.\nopagebreak
%
%   This package produces pictures inside paragraphs. This package
%   supports usage of captions with command |\piccaption|. It also allows
%   the \package{caption} package settings.
%
%   \piccaption[Wrapped figure in \cmd{\floatbox} and \cmd{\parpic}]{Wrap\-ped
%   figure (\cmd{\parpic})\label{fig:parpic:BcatI}}%^^A
%   \parpic[l]{\hsize0pt
%   \ffigbox[\FBwidth ]{}{%^^A
%   {\setlength\unitlength{24mm/72}%^^A
%   \input{TheDog.picture}}
%   }%^^A
%   }
%   The \cmd{\parpic} macro usually allows usage of |\floatbox| macro
%   inside of its mandatory argument. In this case the |\floatsetup{...}|
%   settings and main settings of for float types like |\floatsetup[figure]{...}|
%   settings are used (but, unfortunately, they are the only here).
%
%   \emph{Founded limitations}.\startNotes\nopagebreak
%
%   \Note In |\parpic| argument you ought to to define the width of contents. If you put |\hsize0pt| before
%   the |\floatbox| command, you will get box width equals to
%   |\parpic| contents. (Compare with usage of |0mm| value inside the \marg{width
%   of figure} option in the |wrapfigure| environment.)
%
%   \floatsetup[figure]{style=DOUBLEBOX}
%
%   The next limitations could not tied with \package{floatrow} package.
%
%   \parpic[r]{\hsize36mm\def\FBaskip{6pt}
%   \ffigbox[\hsize]
%   {\setlength\unitlength{16mm/72}%^^A
%   \input{TheDog.picture}}
%   {\caption{Wrapped figure (\cmd{\parpic})}\label{fig:parpic:BcatII}}}
%
%   \Note If you put \cmd{\parpic} just after |\...section| command
%   you need (if you do not indentation after heads) to put |\noindent|
%   for the first paragraph.
%
%   \Note It seems that the |\parpic| command cancels non-breaking mechanism
%   between section command and text in the case of appearance
%   at the very beginning of the first paragraph (this situation appeared
%   during testing of current documentation).
%
%   \Note You may try to use \cmd{\parpic} inside list environment, but sometimes usage of
%   this command in this environment could create wrong layout. (Tests show that paragraph(s)
%   where the \cmd{\parpic} is used must be placed in group---compare it with the
%   \package{wrapfig} package, which does not like grouping.)
%
%   \Note This package has not options \meta{outside} or
%   \meta{inside}, like previous two packages (the option |[o]| means
%   oval box around picture), so you ought to set horizontal position
%   manually. Or you may create command:
%\begin{Quote}\openup-.5pt
%\begin{preamble}
%|\usepackage{ifthen}|
%|\newcommand\oparpic{\ifthenelse{\isodd{\value{page}}}%|
%|      {\def\next{\parpic[r]}}{\def\next{\parpic[l]}}\next}|
%\end{preamble}
%\end{Quote}
%
%   \Note The special caption settings were created for figure label
%   \begin{Quote}
%   |\captionsetup[parpic]{name=Fig.,labelformat=thinspace}|
%   \end{Quote}
%   If you use |\piccaption| command these settings are switched on.
%   In the first picture in this section the |\piccaption| co-operates
%   with the |\ffigbox| command:
%   \begin{Quote}
%   |\piccaption{...\label{...}}%|\nopagebreak
%   |\parpic[l]{\hsize0pt\ffigbox[\FBwidth]{}{...}}|\pagebreak[3]
%   \end{Quote}
%   Second picture uses the |\caption| command inside |\ffigbox|, so
%   the |\captionsetup|\allowbreak|[parpic]{...}| settings do not work:
%   \begin{Quote}\openup-.5pt
%   |\parpic[r]{\hsize36mm\def\FBaskip{6pt}|
%   |   \ffigbox[\hsize]{}{...\caption{...}\label{fig:parpic:BcatII}}|
%   \end{Quote}
%   \enlargethispage{\baselineskip}
%   You may see that label of the second figure was printed as `Figure'~number.
%
%   \endgroup
%
%   \subsection{The \package{rotating} Package and \texttt{sideways\ldots}
%             Environment}\label{ssec:rotating}
%   Tested with version v2.13 dated Sep. 1992.
%
%   There is example (figure~\ref{fig:rot:ii}) with rotated float, using
%   |sidewaysfigure|.
%\begin{Quote}
%\begin{preamble}
%     |\usepackage[figuresright]{rotating}|
%|\|\FRkey[sec]{floatsetup}|[rotfigure]{|%^^A
%   \FRkey{style}|=WSHADOWBOX}|
%\end{preamble}
%|\begin{sidewaysfigure}\emptyfloatpage|
%|\|\FRkey[FB]{ffigbox}|[\|\FRkey[FB]{FBwidth}|]|
%|  {...}|
%|  {\caption{Figure ...}%|
%|  \label{...}}|
%|\end{sidewaysfigure}%|
%\end{Quote}
%   \floatsetup[rotfigure]{style=WSHADOWBOX}
%   \begin{sidewaysfigure}\emptyfloatpage
%   \ffigbox[\FBwidth] {\includegraphics[width=4in]{pslearn}}
%   {\caption{Figure inside \texttt{sidewaysfigure} environment}%
%   \label{fig:rot:ii}}
%   \end{sidewaysfigure}%
%
%   \emph{Special settings}.\nopagebreak
%
%   You may create special settings for all rotated floats, which use
%   |sideways...| environment (see page \pageref{stsetorder}).
%
%   For one-column rotated float
%   \RestoreSpaces
%   \begin{itemize}
%   \item %
%    if exists |\floatsetup[rot|\meta{captype}|]{...}|
%    package uses these settings---the ``strongest'' settings; if they are
%    absent---uses settings from next item, the same for each item of the list;
%   \item
%    |\floatsetup[rotfloat]{...}|;
%   \item
%    |\floatsetup[|\meta{captype}|]{...}|;
%   \item
%    if all settings absent---the settings
%    inside |\floatsetup{...}| and |\usepackage| commands, and, at last, package default settings are used.
%   \end{itemize}
%
%   For two-column or wide rotated float (starred environment)
%   \begin{itemize}
%   \item %
%    if exists |\floatsetup[widerot|\meta{captype}|]{...}|
%    package uses these settings---the ``strongest'' settings;
%    if they are absent---uses settings of next item, the same for each item of the list;
%   \item %
%    |\floatsetup[widerotfloat]{...}|;
%   \item %
%    |\floatsetup[rot|\meta{captype}|]{...}|;
%   \item %
%    |\floatsetup[rotfloat]{...}|;
%   \item %
%    |\floatsetup|\marg{captype}|{...}|;
%   \item %
%    if all settings absent---the settings inside
%    |\floatsetup{...}| and |\usepackage| commands, and, at last, the package default settings are used.
%   \end{itemize}
%
%   \subsubsection{Special Page Style for Float Page}
%   In example with figure~\ref{fig:rot:ii} you may see the command |\emptyfloatpage|.%^^A
%    \FRmpar{Empty page style for rotated floats}{FAD:emptyfloatpage}\label{setup:emptyfloatpage}
%   It is offered by \package{floatpagestyle} package, (installed with
%   \package{floatrow} package, can be used separately). The macro |\emptyfloatpage| is an abbreviation of
%   |\floatpagestyle{empty}|. The last macro redefines the page style for
%   the page where \emph{current} floating environment appears in the way, analogous to |\thispagestyle|
%   command.
%
%   \RestoreSpaces
%   The version 0.1h patches the core \LaTeX{} macro
%   |\@outputpage|\footnote{At the start of document
%   \package{floatpagestyle} package puts additional code at the very beginning
%   of this output routine.}
%   and I hope that it could work.\footnote{If you know more honest
%   way to get the same result---the redefinition of \emph{alone}
%   \emph{float} page style (in the case when this page can \emph{float}
%   inside document)---please let me know.} Since this package uses
%   |\label|---|\ref| mechanism, the |\floatpagestyle| command works
%   after \emph{second} \LaTeX{} run.
%
%   \subsubsection{Rotated Floats on the Facing Pages}
%   \startNotes\Note If you place two continued rotated floats%^^A
%   \FRmpar{Continued rotated floats}{FAD:ContRotated} on facing pages,
%   the better way is to gather them to binder margin, using |\buildFBBOX| command
%   (see page~\pageref{FB:buildFBBOX}). For this reason you
%   may define\label{buildFBBOX:def}
%   \begin{Quote}
%     \begin{preamble}
%     |\usepackage[figuresright]{rotating}|
%     |\newlengthtocommand\setlength\rottextwidth{\textwidth}|
%     \end{preamble}
%     |\begin{sidewaysfigure}|\nopagebreak
%     |\|\FRkey[FB]{buildFBBOX}|{\vbox to\rottextwidth\bgroup\vss}{\egroup}|
%     |\|\FRkey[FB]{ffigbox}|{}{|\meta{contents of first figure}|}|\nopagebreak
%     |\end{sidewaysfigure}|
%     |\begin{sidewaysfigure}|
%     |\buildFBBOX{\vbox to\rottextwidth\bgroup}{\vss\egroup}|
%     |\ffigbox{}{|\meta{contents of second figure}|}|\nopagebreak
%     |\end{sidewaysfigure}|
%   \end{Quote}
%
%   \Note In the example above (and also in the example with figure~\ref{fig:rot:ii})
%   the \package{rotating} package has
%   |[figuresright]| option; in this case all |sideways...| floats on even and odd pages
%   will be rotated by 90$^\circ$ counterclockwise.
%
%
%   \subsubsection{Commands instead of lengths}
%\begingroup
%   \sloppy
%    The |\rottextwidth| command in the example above stores value of the |\textwidth| of the
%   document; the |\columnwidth| and |\textwidth| inside
%   \texttt{sideways...} environment are redefined and equal to
%   |\textheight|.
%   If\startNotes\def\theNote{\alph{Note}}\Note
%   you are limited in creation of the new length or dimension command
%   (for example you use the \package{pictex}
%   package\footnote{The \texttt{e-TeX} engine could solve this problem.}),
%   or \Note the width/height or the space values, defined with
%   the |\newcommand|
%   (like the |\headrulewidth| command from \package{fancyhdr} package) need complex calculation
%   with usage of the \package{calc} package, or get the width of some text---the \package{floatrow}
%   package provides commands
%   \DescribeMacro{\newlengthtocommand}\label{setup:newlengthtocommand}%^^A
%   \DescribeMacro{\renewlengthtocommand}\label{setup:renewlengthtocommand}%^^A
%   \label{setup:newlengthtocommand}%^^A
%   \label{setup:renewlengthtocommand}%^^A
%\begin{Quote}%
%   \cmd{\newlengthtocommand} \quad or
%   \cmd{\renewlengthtocommand}
%\end{Quote}%
%   which are placed just before standard \LaTeX{} commands like \cmd{\setlength} or
%   \cmd{\settowidth} and save the \emph{absolute}
%   value from their arguments; here the usual code like
%\begin{Quote}%
%\begin{preamble}
%|\usepackage{calc}|
%\end{preamble}
%|\newlength\fulltextwidth|
%|\setlength\rottextwidth{\textwidth+\marginparsep+\marginparwidth}|
%\end{Quote}%
%   changed to
%\begin{Quote}%
%\begin{preamble}
%|\usepackage{calc}|
%\end{preamble}
%   |\newlengthtocommand\setlength|
%   |\fulltextwidth{\textwidth+\marginparsep+\marginparwidth}|\quad.
%\end{Quote}%
%   Please note than the usage of calculation inside |\setlength| command (and its analogs)
%   can be used only with the \package{calc} package.
%
%\endgroup
%
%   \subsection{The \package{lscape} Package and \texttt{landscape}
%        Environment}\label{ssec:lscape}
%   Tested with version v3.0a dated 1999/02/16.\nopagebreak
%
%\ifx\landscape\undefined\else
%   \ifx\landscape\relax\else
%   The example with usage of |landscape| environment from
%   \package{lscape} package on the page~\pageref{fig:rotrow:WcatI}, figures
%   \ref{fig:rotrow:WcatI}--\ref{fig:rotrow:FcatI}):
%   \RestoreSpaces
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey{DeclareFloatVCode}|{lowthickrule}{\kern2pt\rule{\hsize}{.8pt}}|
%|\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{style}|=ruled,|\FRkey{rowprecode}|=thickrule,|
%|  |\FRkey{rowpostcode}|=lowthickrule,|\FRkey{capposition}|=TOP}|
%\end{preamble}
%|\begin{landscape}|
%|\begin{figure}\|\FRkey{emptyfloatpage}
%|...|
%\end{Quote}
%   |\floatsetup| code sets |ruled| float style,
%   then settings for above and below material are redefined:
%   |rowprecode=| and |rowpostcode=| keys define thick
%   rules but for floatrow as a~whole (the `individual' |\hrule|'s
%   above/below float boxes are absent).
%\fi\fi
%
%   The |landscape| environment creates a new page. It would be
%   useful~\nobreak\qquad1)\nobreak\enskip for rotation of multipage rotated float (in this case
%   it is better to put this float in a separate file, and to start from necessary page,
%   in this case you need the
%   \package{afterpage} package and its |\afterpage| command)~\nobreak\qquad2)\nobreak\enskip and also
%   to start new section of document, e.g., appendix. (In current
%   document the |landscape| environment was placed just before appendix)
%
%^^A   \emph{Founded limitations}.\nopagebreak
%^^A   The tested version works incorrect (does not rotates contents)
%^^A   with \package{hypcap} package.
%
%   \subsection{The \package{listings} Package}\label{ssec:listings}
%   Tested with version v1.3 dated 2004/09/07.\nopagebreak
%
%   This package has its own strong layout mechanism for creation of floating
%   algorithms itself. The usage of |\lstset| command (see package documentation) and \package{caption}
%   package settings gives you necessary result\footnote{Please note and read
%   \package{caption} documentation: the co-operation of \package{caption}3.x and
%   \package{listings} succeeds with version of last one not older than 1.2.}
%   for algorithm type of float.
%
%   For the cases of appearance of listings inside of other float
%   environments, which get settings from \package{floatrow} package,
%   there is a limitation: you can't put |lstlisting| inside
%   |\floatbox| contents. The plain float environment is still allowed.
%   Also you are still free with settings for float type, used |lstlisting| inside: you may still use the
%   |BOXED|, |Boxed| and other unusual styles: the float width will be recalculated for mentioned two styles
%   and similar ones and then will be used necessary setting.
%   If you need to change box width---use  |\thisfloatsetup| settings.
%
%   \subsection{The \package{hyperref} and \package{hypcap} Packages}
%   There were tested versions v6.77i (\package{hyperref})
%   and v1.7 (\package{hypcap}).
%
%   The \package{floatrow} package tries not to expand its code to |\caption| stuff.
%   I hope that environments supported by \package{floatrow} won't
%   make harm to \package{caption}---\package{hyperref}/\package{hypcap} tandem.
%
%   \subsection{The \package{setspace} Package}
%   There was bug during usage of \package{setspace} package---this package redefines
%   \LaTeX's command |\@xfloat|, adding definition of font size to |\normalsize|
%   which appears after \package{floatrow} settings.
%   The version 0.2d of \package{floatrow} tried to fix it but this was incorrect
%   and destroyed interaction between \package{hyperref} and \package{caption} packages.
%   In the version 0.3b the code was changed to restore this interaction\footnote
%   {By suggestions of A.\,Sommerfeldt.} with hope that it will work.
%   The default baseline stretch is equal to~1. The version 3.1 of \package{caption} 
%   package offers special font settings (see \package{caption} documentation)
%   for captions. You may try the same for the float font:
%\begin{Quote}%
%|\floatsetup{font=onehalfspacing}|
%\end{Quote}%
%   or
%\begin{Quote}%
%|\floatsetup{font={stretch=|\meta{amount}|}}|\quad.
%\end{Quote}%
%
%   \section{The Incompatibilities}
%   At first the incompatibilities or rules of co-operation with other
%   packages could follow the \package{caption}~3.x package.
%   \textit{Please look first in the \package{caption}
%   package documentation to know the newest rules}.
%
%   The known incompatibilities of \package{floatrow} package itself:
%   \startNotes\nobreak\quad \Note \package{sidecap} package\footnote{Despite that
%   I'm trying to follow all offered layouts of this package. Great thanks
%   for Rolf Niepraschk and Hubert G\"{a}\ss{}lein for package with
%   rich implementation of such float
%   layouts.}: the \package{floatrow} package doesn't expands its
%   layouts to |SCfigure| and |SCtable| environments;~\nobreak\quad
%   \Note \package{ctable} package; if you used to use
%   \package{ctable}'s tools, e.g. for tables, please set |\RawFloats[table]|
%   in the preamble, and remember that commands like |\ttabbox| won't
%   loose its strength (see also {\sectionname}~\ref{sec:rawfloats}).
%
%   \addtocontents{toc}{\string\pagebreak[3]}
%   \section{Limitations}
%
%   There are known limitations, which were found during usage of
%   \package{floatrow}:
%   \begin{itemize}
%   %^^A \item %
%   %^^A Limitations for boxed and ruled styles in beside floats: be
%   %^^A careful with usage of \emph{alone} minipage environment in object
%   %^^A or caption in |\floatbox| macro. Since the object and caption are
%   %^^A created in minipage environment already, the added |minipage|
%   %^^A could get wrong layout (vertical alignment). But, as I
%   %^^A found, you may use a few |minipage|s in object without harm.
%   \item %
%   You cannot use |\floatbox| stuff for floats with |verbatim|
%   environment and/or \verb|\verb|. But you still can use plain float environments.
%   If you need to change width of float box, you may change it with
%   |\thisfloatsetup| settings. The usage of |verbatim| and~|\verb|
%   do not create limitations for layout: you may still use the |BOXED|, |Boxed|
%   and other unusual styles: the float width will be recalculated for mentioned two styles
%   and similar ones and then will be used necessary setting.
%   \item %
%   The |tabbing| environment in current version creates incorrect layout for float box
%   which must occupy whole text width: it recalculates the width of object box to the natural width
%   of its contents. The problem will be solved with the |minipage| environment
%   and width option |\hsize|: you'll get necessary layout with full width and
%   for the styles like |BOXED| and~|Boxed| the width of contents will be recalculated.
%   \item %
%   Be careful with minipages inside |floatrow| environment---there could be wrong alignment.
%   Use |heightadjust=| key for this case. (Fortunately I~cannot imagine
%   good readability of two beside |tabbing|s.)
%   \item %
%   This limitation was mentioned above: some tools of the package use
%   |\label|---|\ref| mechanism, thus, if you use float layout which
%   demands common height of objects and/or captions in float row,
%   you'll get correct result after second or more  runs. If you change
%   contents of float which change its height you must run \LaTeX{}
%   twice or more times too.
%
%   Beside captions and other facing layout will appears correctly only
%   after second \LaTeX's run (sometimes you need to run more times).
%   \item %
%   The  \package{caption} and
%   \package{floatrow} packages do not support an~optional argument \emph{after}
%   caption ``title'' (the \package{float} package's stuff). You may use |\floatfoot|
%   macro after main caption argument.
%   \item %
%   Do not use the |\FBwidth| option for complex float contents (which you
%   could not put inside one |\hbox|). But you are allowed to use |\vspace|
%   macro at the very end/very beginning of object contents for fine
%   vertical tuning for them.
%   \item %
%   The |floatrow| environment allows spaces (and even empty
%   lines, which sometimes create better and correct result!) between
%   |\floatbox|'es, but if you add some code between them you
%   must put
%   |%| after this command.
%   \item %
%   This is a~common rule---be careful with spaces at the end of lines
%   inside float contents (see \texttt{CTAN:/info/epslatex.ps} for more
%   explanations).
%
%   When you build plain floating environments the better way is to separate
%   |\caption| and object contents (and also
%   |\floatfoot|/|\footnotetext| contents) each by empty lines or (if
%   not empty lines) end each part (and arguments of mentioned commands)
%   by percent sign. In this case you'll avoid unwanted spaces/lines at
%   the end of contents of each part, or wrong justification of float
%   components.
%   %^^A \item %
%   %^^A Usage of fancy boxes |shadowbox| and |wshadowbox|
%   %^^A could get wrong layout with beside captions.
%   \item If you use |tabularx| or |tabular*| environments
%   inside |\floatbox| stuff (or any other) with
%   |\hsize| command inside \meta{width} argument, you must repeat the
%   |\hsize| argument in \meta{width} argument of |\floatbox| macro.
%
%   If you want to set width of |tabularx| or |tabular*|
%   environments (or any other) like |.8\hsize| (or |1.2\hsize|) and
%   these environments placed inside any |\floatbox| macro, load
%   |.8\hsize| in \meta{width} argument of |\floatbox| macro, and in
%   \meta{width} argument of |tabularx| or |tabular*| load only
%   |\hsize| macro (see also sample file \file{frsample03.tex}).
%
%   In other cases (especially in fancy layout or settings) be careful
%   with usage of |\hsize| as \meta{width} option of |\floatbox|.
%   \end{itemize}
%
%   \addtocontents{toc}{\string\nopagebreak}
%
%   \section{Acknowledgements}
%   Thanks for Steven Cochran and Axel Sommerfeldt for all their advices
%   and spirit. Special thanks for Axel for the patient answering, code, finding and showing
%   bugs, and help in \emph{all} my questions and problems in \package{floatrow} package.
%   All good text pieces in this documentation are filled with Axel's advices and great help.
%
%   \medskip\noindent
%   Thanks for \emph{all} involuntary (\La)\TeX{} teachers, who teaches
%   me with their program code all these years.
%
%   \medskip\noindent
%   Thanks for Keith Reckdahl, author of \file{epslatex}, which
%   documentation, at last, encouraged me to create the CTAN version of
%   this package.
%
%   \medskip\noindent
%   \emph{Thanks for \emph{all} authors of second edition of \LaTeX{}
%   Companion for this book.}
%
%\ifx\landscape\undefined\else\begingroup
%   \ifx\landscape\relax\else
%   \clearfloatsetup{figure}
%   \floatsetup[figure]{style=ruled,rowprecode=thickrule,
%     rowpostcode=lowthickrule,capposition=TOP,margins=hangtoheads,
%     footposition=caption}
%   \renewlengthtocommand\setlength\Mylen{\textwidth}
%
%   \begin{landscape}
%
%   \begin{figure}\emptyfloatpage\label{example:ruledcapposTOP}
%
%   \begin{floatrow}[4]%^^A
%   \ffigbox[][][t]
%   {{\input{TheCat.picture}}%^^A
%    \footnotetext[1]{This
%    picture was created with  \cmd{\qbezier}
%    macros}}%
%   {\caption[Figure in the row~I, top of object box]%
%    {Figure in the row~I, top of object box\protect\mpfootnotemark}%
%   \label{fig:rotrow:WcatI}}%
%
%   \floatbox{figure}[2\FBwidth][][b]
%   {\caption{Figure in the row~II, bottom of object box}%
%   \label{fig:rotrow:BcatI}%
%   \floatfoot{There are all \cmd{\qbezier} macros and only
%              two vertical lines}}%
%   {\input{BlackCat.picture}\footnote[2]%
%    {Look at funny footnotemark!}}%
%
%   \ffigbox[\FBwidth]
%   {{\unitlength2.5\unitlength
%   \input{Cat.picture}}}
%   {\caption{Figure in the row~III, center of object box}%
%   \label{fig:rotrow:mouseI}\floatfoot{The image of cat}}%
%
%   \floatbox{figure}[\Xhsize][\Mylen]
%   {\caption{Figure in the row~IV}\label{fig:rotrow:FcatI}}
%   {\Resizebox\hsize\vsize{35}{136}{\input{BlackCat2.picture}}}
%   \end{floatrow}
%
%   \end{figure}
%
%   \end{landscape}
%\endgroup\fi\fi
%
%   \clearpage
%   \suppressfloats[t]
%   \section{Appendix}
%   \FRorisubsection{Miscellaneous}
%   \FRorisubsubsection{Usage of Captionsetup and Thisfloatsetup
%     Inside Floatbox Stuff}\label{ssec:app:besidestart}
%   Example of figures in row (figures~\ref{FB:FR:lfig} and
%   \ref{FB:FR:fig}). There predefined float commands
%   |\fcapsideleft| and  |\fcapsideright| with were used additional |\captionsetup| and
%   |\thisfloatsetup| settings:
%\begin{Quote}\openup-.5pt
%\begin{preamble}
%|\|\FRkey[FB]{newfloatcommand}|{fcapsideleft}{figure}[{\|\FRkey[FB]{capbeside}
%|  \captionsetup[capbesidefigure]{labelsep=newline,|
%|   justification=raggedleft}%|
%|   \|\FRkey{thisfloatsetup}|{|\FRkey{capbesideposition}|=left}}][\|\FRkey[FB]{FBwidth}|]|
%|\newfloatcommand{fcapsideright}{figure}[{\capbeside|
%|  \captionsetup[capbesidefigure]{labelsep=newline,|
%|   justification=raggedright}%|
%|   \thisfloatsetup{capbesideposition=right}}][\FBwidth]|
%|\|\FRkey[sec]{floatsetup}|[figure]|
%| {|\FRkey{style}|=Boxed,|%^^A
%    \FRkey{objectset}|=centering,|%^^A
%    \FRkey{margins}|=centering,|
%|  |\FRkey{capposition}|=beside,|%^^A
%    \FRkey{capbesidesep}|=cicero,|%^^A
%    \FRkey{capbesideframe}|=yes}|
%\end{preamble}
%   |\begin{figure}|
%   |\begin{|\FRkey[sec]{floatrow}|}|
%   |  \fcapsideleft{...}{...}|
%   |  \fcapsideright[\hsize]{...}{...}|
%   |\end{floatrow}|
%   |\end{figure}|
%\end{Quote}
%
%   \clearfloatsetup{figure}
%   \floatsetup[figure]
%    {style=Boxed,capposition=beside,objectset=centering,
%     capbesidesep=cicero,margins=centering,
%     capbesideframe=yes}
%
%   \begin{figure}[H]
%   \begin{floatrow}
%   \fcapsideleft
%     {\unitlength1.44\unitlength
%     \input{Cat.picture}}
%     {\caption[Float in the row with beside caption (graphic box has width of its contents)]{%^^A
%   Float box (\cmd{\fcapsideleft})
%   width of graphics}\label{FB:FR:lfig}}%
%    \fcapsideright[\hsize]
%     {\setlength\unitlength{\hsize/61}%^^A
%     \input{BlackCat.picture}}%
%     {\caption[Float in the row with beside caption (occupies rest space)]{%^^A
%   Float box (\cmd{\fcapsideright})
%   width of rest float row space}\label{FB:FR:fig}}%
%   \end{floatrow}%
%   \end{figure}%
%
%   Since the key \FRkey{heightadjust}|=object| is used in
%   the |Boxed| float style, both objects have the same
%   height.\RestoreSpaces
%
%   \subsubsection{Predefined Beside Caption Width}
%   This example includes the |\useFCwidth|\label{setup:useFCwidth} command which switches on usage
%   of previously defined caption width with |capbesidewidth=| key
%   (in command |\thisfloatsetup| before |\floatbox| macro) or, if you
%   didn't set caption width (like in current example), macro calculates natural
%   width of caption contents (see figure~\ref{fig:Idog:w}). In this case
%   the object---caption box is aligned
%   using alignment settings from |margins| key (its options are defined
%   by |\setfloatmargins| or |\floatcapbesidemargins| macro). In this
%   documentation they are centered (see page~\pageref{setup:DeclareMarginSet}).
%\begin{Quote}
%\begin{preamble}
%|\floatsetup[figure]{|\FRkey{style}|=plain}|
%\end{preamble}
%|\begin{figure}|
%|\floatbox[\capbeside\useFCwidth]{figure}[\|\FRkey[FB]{FBwidth}|]|
%| ...|
%|\end{figure}|
%\end{Quote}
%   \clearfloatsetup{figure}
%   \floatsetup[figure]{style=plain}
%
%   \begin{figure}[H]
%   \floatbox[\capbeside\useFCwidth]{figure}[\FBwidth]
%   {\caption[One-line beside
%   caption, width equals to caption's text]{}\label{fig:Idog:w}}
%   {{\setlength\unitlength{{3.6cm}/60}%^^A
%   \input{BlackDog.picture}}}
%   \end{figure}%
%
%   Please note that inside
%   \cmd{\floatbox} you may not set predefined width of caption, but remember
%   that you \emph{must} define width of caption in case of usage of plain
%   floating environment.\RestoreSpaces
%
%   \subsubsection{Predefined Beside Caption Width with
%     The Rest Space for Object}\label{FAD:RestSpaceforObject}
%   The figure \ref{fig:capbeside:trick} uses the following float style:%^^A
%\begin{Quote}
%\begin{preamble}
%|\|\FRkey{renewlengthtocommand}|\settowidth\Mylen{\captionfont\captionlabelfont|
%|   \figurename\ \thefigure}|
%\end{preamble}
%|\floatsetup[figure]|
%| {|\FRkey{style}|=Boxed,|\FRkey{capposition}|=beside,|\FRkey{objectset}|=centering,|
%|  |\FRkey{capbesidewidth}|=\Mylen,|%^^A
%    \FRkey{capbesideposition}|=left,|\FRkey{capbesidesep}|=cicero,|
%|  |\FRkey{margins}|=centering,|\FRkey{capbesideframe}|=yes,|
%|  |\FRkey{floatwidth}|=sidefil}|
%\end{Quote}
%   The \verb|\Mylen| dimension was defined as width of caption label.
%
%   \clearfloatsetup{figure}
%   \floatsetup[figure]
%    {style=Boxed,capposition=beside,objectset=centering,
%     capbesidewidth=\Mylen,capbesideposition=left,capbesidesep=cicero,
%     margins=centering,capbesideframe=yes,floatwidth=sidefil}
%   \renewlengthtocommand\settowidth\Mylen{\captionfont\captionlabelfont
%      \figurename\ \thefigure}
%
%\begingroup
%   \begin{figure}[H]
%^^A   \captionsetup[capbesidefigure]{format=default,labelsep=none}
%   \fcapside
%     {\unitlength1.44\unitlength
%     \input{Horse.picture}}
%     {\caption[The box of beside caption has width of caption contents (here: caption label)]{}\label{fig:capbeside:trick}}
%   \end{figure}%
%\endgroup
%
%   \subsubsection{Width Definition for Beside
%     Caption---Object Box in Float Row}
%   The float row with predefined width boxes ``beside object---caption''
%   (figures~\ref{floatrow:pre:figI} and
%   \ref{floatrow:pre:figII}): just define before \verb|\fcapside|
%   command something like:
%\begin{Quote}
%\begin{preamble}
%|\floatsetup[figure]|
%| {|\FRkey{style}|=plain,|\FRkey{objectset}|=centering,|\FRkey{margins}|=centering,|
%|  |\FRkey{capbesideposition}|=left,|\FRkey{capbesidesep}|=enskip,|
%|  |\FRkey{floatwidth}|=sidefil}|
%\end{preamble}
%   |\begin{figure}\|\FRkey{useFCwidth}\nopagebreak
%   | \begin{floatrow}|
%   |   \setlength\hsize{1.2\hsize}%|
%   |   \|\FRkey[FB]{fcapside}|...|
%   |   \setlength\hsize\|\FRkey[FB]{Xhsize}
%   |   \fcapside...|
%   | \end{floatrow}|\nopagebreak
%   |\end{figure}|
%\end{Quote}
%   (please remember that option of |\fcapside| command defines the width of object contents but
%   not the full box object---caption).
%
%^^A%   Since the \verb|\fcapside| commands were used at the beginning of the
%^^A%   |floatrow| environment the \verb|\FCwidth| command was defined
%^^A%   as \verb|\relax|---in this case the width of caption equals to the
%^^A%   width of their contents.
%
%\begingroup
%   \clearfloatsetup{figure}
%   \floatsetup[figure]
%    {style=plain,capposition=beside,objectset=centering,
%     capbesideposition=left,capbesidesep=enskip,
%     margins=centering,capbesideframe=yes,floatwidth=sidefil}
%   \begin{figure}[H]\useFCwidth
%^^A   \captionsetup[capbesidefigure]{format=default,labelsep=none}
%   \begin{floatrow}
%   \setlength\hsize{1.16\hsize}%
%   \fcapside
%     {\setlength\unitlength{\hsize/100}%^^A
%     \input{Bear.picture}}
%     {\caption[Left figure with beside caption in the row]{%^^A
%     }\label{floatrow:pre:figI}}
%   \setlength\hsize\Xhsize
%   \fcapside
%     {\setlength\unitlength{\hsize/44}%^^A
%     \input{Doll.picture}}
%     {\caption[Right figure with beside caption in the row]{%^^A
%   }\label{floatrow:pre:figII}}
%   \end{floatrow}%
%   \end{figure}%
%\endgroup
%
%   \subsubsection{Caption Above/Below and Caption Beside at
%      The Float Row}\label{FAD:CapBesideandBelow}
%   The float row with object and beside caption combined with object
%   and caption below (figures~\ref{flrow:mix:figI} and
%   \ref{flrow:mix:figII}). There we ought to use
%   \verb|\TopFloatBoxes|, \verb|\CenterFloatBoxes|, or
%   |\BottomFloatBoxes| commands to get correct layout---since the
%   \meta{height} argument in both float boxes has the same value,
%   you may use each of these three commands. Unfortunately you must set
%   the height of such beside floats by hand (the \FRkey{heightadjust}|=| key works here incorrectly).
%   The lines which create the described float row:
%   \RestoreSpaces
%\begin{Quote}
%\begin{preamble}
%|\floatsetup[figure]|\nopagebreak
%| {|\FRkey{style}|=Boxed,|\FRkey{frameset}|={\fboxsep4pt},|\FRkey{captionskip}|=5pt,|
%|  |\FRkey{capposition}|=bottom,|\FRkey{objectset}|=centering,|\FRkey{capbesidewidth}|=sidefil,|
%|  |\FRkey{capbesideposition}|=inside,|\FRkey{capbesidesep}|=enskip,|\FRkey{margins}|=centering,|
%|  |\FRkey{capbesideframe}|=yes}|
%\end{preamble}
%|\begin{figure}\|\FRkey[FB]{CenterFloatBoxes}
%|\begin{floatrow}|
%|\hsize1.098\hsize|
%|    \fcapside[\FBwidth][3.6cm]|
%|      ...|
%| |
%|    \ffigbox[\|\FRkey[FB]{Xhsize}|][3.6cm]|
%|      ...|
%|\end{floatrow}%|
%|\end{figure}|
%\end{Quote}
%
%   \clearfloatsetup{figure}
%   \floatsetup[figure]
%    {style=Boxed,frameset={\fboxsep6pt},captionskip=5pt,capposition=bottom,
%     objectset=centering,capbesidewidth=sidefil,capbesideposition=inside,
%     capbesidesep=enskip,margins=centering,capbesideframe=yes}
%
%   \begin{figure}[H]\CenterFloatBoxes
%   \begin{floatrow}
%   \hsize1.098\hsize \fcapside[\FBwidth][3.6cm]
%     {\unitlength1.44\unitlength
%     \input{Cat.picture}}
%     {\caption[Float box \cmd{\fcapside} in float row beside \cmd{\ffigbox}]{%^^A
%   Float box (\cmd{\fcapside}) with beside caption in float row
%   width float with caption below}\label{flrow:mix:figI}}%
%
%   \ffigbox[\Xhsize][3.6cm]
%     {\unitlength1.44\unitlength
%     \input{BlackDog.picture}}
%     {\caption{%^^A
%   Float box (\cmd{\ffigbox}) width of rest float row
%   space} \label{flrow:mix:figII}}
%   \end{floatrow}%
%   \end{figure}
%
%   The code for ``mirror'' layout (but not identical) looks like:
%   \allowprelistbreaks[-4]\RestoreSpaces
%\begin{Quote}
%|\begin{figure}\CenterFloatBoxes|\nopagebreak
%|\begin{floatrow}|\nopagebreak
%|   \ffigbox[1.28\|\FRkey[FB]{FBwidth}|][3.6cm]|
%|      ...|
%| |
%|   \hsize\Xhsize|
%|   \fcapside[\FBwidth][3.6cm]|
%|      ...|
%|\end{floatrow}%|\nopagebreak
%|\end{figure}|
%\end{Quote}
%
%   \begin{figure}[H]\CenterFloatBoxes
%   \begin{floatrow}
%   \ffigbox[1.28\FBwidth][3.6cm]
%     {\unitlength1.44\unitlength
%     \input{BlackDog.picture}}
%     {\caption{%^^A
%   Float box (\cmd{\ffigbox})
%   in mirror float row}\label{floatrow:mirrmix:figII}}%
%   \hsize\Xhsize
%
%   \fcapside[\FBwidth][3.6cm]
%     {\unitlength1.44\unitlength
%     \input{Cat.picture}}
%     {\caption[Float box (\cmd{\fcapside}) in mirror float row]{%^^A
%   Float box with beside caption (\cmd{\fcapside}) in mirror float row
%   width float with caption below}\label{floatrow:mirrmix:figI}}
%   \end{floatrow}%
%   \end{figure}
%
%   \subsubsection{Photo-Album-Like Layouts}
%   Another example of miscellaneous float row
%   (figures~\mbox{\ref{flrow:three:figIII}--\ref{floatrow:threemirr:figII}},
%   and, ``mirror layout''---^^A
%   \mbox{\ref{floatrow:threemirr:figI}--\ref{floatrow:threemirr:figIII}}) were
%   created by following lines:
%\begin{Quote}
%|\begin{figure}\|\FRkey[FB]{BottomFloatBoxes}
%|\begin{floatrow}|
%|\hsize1.2\hsize \|\FRkey[FB]{ffigbox}|[][6.7cm]|
%|  ...|
%| |
%|\vbox to6.7cm|
%| {\|\FRkey[sec]{floatsetup}|[figure]{|\FRkey{floatrowsep}|=none}\|\FRkey{killfloatstyle}
%|    \ffigbox[.8\hsize]|
%|      ...|
%|    \vss|
%|    \ffigbox[.8\hsize]|
%|      ...%|
%| }%|
%|\end{floatrow}%|
%|\end{figure}|
%\end{Quote}
%
%   \floatsetup[figure]{heightadjust=none}
%   \begin{figure}[H]\BottomFloatBoxes
%   \begin{floatrow}
%   \hsize1.2\hsize
%   \ffigbox[][6.7cm]
%     {\setlength\unitlength{\hsize/58}%^^A
%     \input{Mouse.picture}}%
%     {\caption[Photo-album-like layout: left float]{Float
%       box in photo-album-like layout:
%       alone in left column}\label{flrow:three:figIII}}%
%
%   \vbox to6.7cm {\floatsetup[figure]{floatrowsep=none}\killfloatstyle
%    \ffigbox[.8\hsize]
%     {\input{TheCat.picture}}
%     {\caption[Photo-album-like layout: upper right float]{%^^A
%   Float box in photo-album-like layout: upper float in right
%   column}\label{floatrow:three:figI}} \vss \ffigbox[.8\hsize]
%     {\input{BlackDog.picture}}%
%     {\caption[Photo-album-like layout: lower right float]{%^^A
%   Lower float in right column}%
%   \label{floatrow:threemirr:figII}}}%
%   \end{floatrow}%
%   \end{figure}
%
%   The ``mirror'' layout created by following commands:
%   \RestoreSpaces
%\begin{Quote}
%|\begin{figure}[t]\|\FRkey[FB]{TopFloatBoxes}
%|\begin{floatrow}|
%|\vtop to7cm|
%| {\floatsetup[figure]{floatrowsep=none}\killfloatstyle|
%|    \ffigbox[.8\hsize]|
%|      ...|
%|    \vss|
%|    \ffigbox[.8\hsize]|
%|      ...%|
%| \vskip0pt}\floatrowsep|
%| |
%|\ffigbox[\Xhsize][7cm-11pt]|
%|  ...|
%|\end{floatrow}%|
%|\end{figure}|
%\end{Quote}
%   Note that in second example with ``mirror'' layout the
%   trick with \meta{height} definition was used---caption of float in the left
%   column is one line longer, so for the right column height of float
%   was reduced by 11pt---|\baselineskip| for |\small|
%   size
%   (here the \package{calc} package possibilities were used). The |\vtop| of
%   left column ends with |\vskip0pt|, otherwise you get fanny unwanted
%   layout.
%
%   \begin{figure}\TopFloatBoxes
%   \begin{floatrow}
%   \vtop to7cm {\floatsetup[figure]{floatrowsep=none}\killfloatstyle
%    \ffigbox[.8\hsize]
%     {\input{TheCat.picture}}
%     {\caption[Photo-album-like layout, mirror: upper left float]{%^^A
%   Float box in photo-album-like layout: upper float in left
%   column}\label{floatrow:threemirr:figI}} \vss \ffigbox[.8\hsize]
%     {\input{BlackDog.picture}}%
%     {\caption[Photo-album-like layout, mirror: lower left float]{%^^A
%   Float box in photo-album-like layout: lower float in the left column}%
%   \label{floatrow:three:figII}}\vskip0pt}\floatrowsep
%
%   \ffigbox[\Xhsize][7cm-11pt]
%     {\setlength\unitlength{\hsize/58}%^^A
%     \input{Mouse.picture}}%
%     {\caption[Photo-album-like layout, mirror: right float]{%^^A
%   Float box in photo-album-like layout: alone in right
%   column}\label{floatrow:threemirr:figIII}}
%   \end{floatrow}%
%   \end{figure}
%
%   In both examples for two floats one above another was cancelled
%   |\floatrowsep| code inside |\vbox|/|\vtop|.
%
%   Note that these examples are rather specific---you may try with
%   other combinations (e.g. more-``columned''), but maybe these layouts
%   need more care with usage of |\Xhsize| and/or |\floatrowsep|.
%
%   I suppose that last two examples could conflict with ``motto'' of
%   this package---to reduce and remove layout code from document; but
%   photo-album-like layout is rather rare in technical literature (It
%   isn't?).\RestoreSpaces
%
%   \subsubsection{Photo-Album-Like Layouts: Common Height for Beside Photos}
%   \captionsetup[subfigure]{labelformat=brace,font=footnotesize}
%   This section shows example which allows to set common height for rectangular graphics,
%   i.e. photos and fill full width of this row. To emulate the rectangular photos here,
%   each graphic was loaded inside |\fbox| with zeroed |\fboxsep|. (See also file \texttt{frsample06.tex}.)
%
%   The code of example uses the |\includegraphics| command (\package{graphicx}
%   package).
%   You load the |\CommonHeightRow| command:
%\begin{Quote}%
%|\CommonHeightRow|\oarg{supposed height}\marg{floatrow environment}
%\end{Quote}%
%   with supposed value of height in the optional argument,
%   which could be near the necessary common height.
%   The second argument---the contents of the |floatrow| environment.
%   \emph{All} float boxes in this row must use the |[\FBwidth]| option.
%\begin{Quote}%
%\begin{preamble}%
%|\usepackage{graphicx}|
%|\floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}|
%\end{preamble}%
%   |\begin{figure*}\fboxsep-.4pt|\nopagebreak
%   |\CommonHeightRow{\begin{floatrow}[4]|\nopagebreak
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|\nopagebreak
%   |\end{floatrow}}|\nopagebreak
%   |\end{figure*}%|
%\end{Quote}%
%
%  Here you may see the result.
%\begingroup
%  \floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}
%   \begin{figure*}[H]\fboxsep-.4pt%^^A
%   \CommonHeightRow{\begin{floatrow}[4]%^^A
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Figure~I in the row with common heights}%^^A%
%   \label{fig:CH:Dog}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Figure~II in the row with common heights}%^^A%
%   \label{fig:CH:WcatI}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Figure~III in the row with common heights}%^^A%
%   \label{fig:CH:mouse}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Figure~IV in the row with common heights}%^^A%
%   \label{fig:CH:cheese}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A
%   \end{floatrow}}%^^A
%   \end{figure*}%
%\endgroup
%
%   The next example is a~variation of previous one. The command |\CommonHeightRow| here
%   was used for the |subfloatrow| environment.
%\begin{Quote}%
%\begin{preamble}%
%|\usepackage{graphicx}|
%|\floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}|
%\end{preamble}%
%   |\begin{figure*}\fboxsep-.4pt|\nopagebreak
%   |\ffigbox{}{\CommonHeightRow{\begin{subfloatrow}[4]|\nopagebreak
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|
%   |\ffigbox[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{...}}|\nopagebreak
%   |\end{subfloatrow}}\caption{Figure with a row of parts with common height}}|
%   |\end{figure*}%|
%\end{Quote}%
%
%  Here you may see the result.
%\begingroup
%  \floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}
%   \begin{figure*}[H]\fboxsep-.4pt%^^A
%   \ffigbox{}{\CommonHeightRow{\begin{subfloatrow}[4]%^^A
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Part~I in the row with common heights}%^^A%
%   \label{fig:CHI:Dog}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Part~II in the row with common heights}%^^A%
%   \label{fig:CHI:WcatI}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Part~III in the row with common heights}%^^A%
%   \label{fig:CHI:mouse}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]%^^A
%   {\caption{Part~IV in the row with common heights}%^^A%
%   \label{fig:CHI:cheese}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A%
%   \end{subfloatrow}}\caption{Figure with a row of parts with common height}}%^^A
%   \end{figure*}%
%\endgroup
%
%   The last example load labels of parts of figures beside graphics.
%\begin{Quote}%
%\begin{preamble}%
%|\usepackage{graphicx}|
%|\floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}|
%|\floatsetup[subfigure]{capbesideposition=left}|
%\end{preamble}%
%   |\begin{figure*}\fboxsep-.4pt|\nopagebreak
%   |\ffigbox{}{\CommonHeightRow{\begin{subfloatrow}[4]\useFCwidth|\nopagebreak
%   |\fcapside[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{}}|
%   |\fcapside[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{}}|
%   |\fcapside[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{}}|
%   |\fcapside[\FBwidth]|\nopagebreak
%   |{\includegraphics[height=\CommonHeight]{...}}{\caption{}}|\nopagebreak
%   |\end{subfloatrow}}\caption{Figure with a row of parts with common height}}|
%   |\end{figure*}%|
%\end{Quote}%
%
%  Here you may see the result.
%\begingroup
%  \floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}
%  \floatsetup[subfigure]{capbesideposition=left}
%   \begin{figure*}[H]\fboxsep-.4pt%^^A
%   \ffigbox{}{\CommonHeightRow{\begin{subfloatrow}[4]\useFCwidth
%   \fcapside[\FBwidth]%^^A
%   {\caption{}%^^A%
%   \label{fig:CHII:Dog}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A
%^^A%
%   \fcapside[\FBwidth]%^^A
%   {\caption{}%^^A%
%   \label{fig:CHII:WcatI}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A
%^^A%
%   \fcapside[\FBwidth]%^^A
%   {\caption{}%^^A%
%   \label{fig:CHII:mouse}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A
%^^A%
%   \fcapside[\FBwidth]%^^A
%   {\caption{}%^^A%
%   \label{fig:CHII:cheese}}%^^A
%   {\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A%
%   \end{subfloatrow}}\caption{Figure with a row of parts with common height (labels beside)}}%^^A
%   \end{figure*}%
%\endgroup
%
%  The examples with beside figures which also include labeled parts.
%
%  The row with labels beside.
%\begin{Quote}%
%  |\floatsetup[subfigure]{capbesideposition=left}|
%   |\begin{figure*}[H]|
%   |\CommonHeightRow*%|
%   |{\begin{floatrow}|
%   |\ffigbox[\FBwidth]{}%|
%   |{\begin{subfloatrow}\useFCwidth|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\end{subfloatrow}\caption{Common caption~I}}|
%   |\ffigbox[\FBwidth]{}%|
%   |{\begin{subfloatrow}\useFCwidth|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\end{subfloatrow}\caption{Common caption~II...}}|
%   |\end{floatrow}}%|
%   |\end{figure*}|%
%\end{Quote}%
%^^A%  Here you may see the result.
%  Íèæå ïîêàçàí ðåçóëüòàò.
%\begingroup\makeatletter
%  \floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}
%  \floatsetup[subfigure]{capbesideposition=left}
%   \begin{figure*}[H]\fboxsep-.4pt
%   \CommonHeightRow*%^^A\def\CommonHeight{2.5cm}
%   {\begin{floatrow}%^^A%
%   \ffigbox[\FBwidth]{}%^^A%
%   {\begin{subfloatrow}\useFCwidth
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \label{fig:CHs:Dog}\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A
%^^A%
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \label{fig:CHs:WcatI}\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A
%   \end{subfloatrow}\caption{Common caption~I in a~multilevel row with common height of graphics}}%^^A
%^^A%
%   \ffigbox[\FBwidth]{}%^^A%
%   {\begin{subfloatrow}\useFCwidth
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \label{fig:CHs:mouse}\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A
%^^A%
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \label{fig:CHs:cheese}\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A
%   \end{subfloatrow}\caption{Common caption~II in a~multilevel row with common height of graphics}}%^^A
%   \end{floatrow}}%^^A%
%   \end{figure*}%
%\endgroup
%
%  The row with labels below.
%\begin{Quote}%
%  |\floatsetup[subfigure]{capbesideposition=left}|
%   |\begin{figure*}[H]|
%   |\CommonHeightRow*%|
%   |{\begin{floatrow}|
%   |\ffigbox[\FBwidth]{}%|
%   |{\begin{subfloatrow}|
%   |\ffigbox[\FBwidth]{}{\caption{}\label{...}...}|
%   |\ffigbox[\FBwidth]{}{\caption{}\label{...}...}|
%   |\end{subfloatrow}\caption{Common caption~I}}|
%   |\ffigbox[\FBwidth]{}%|
%   |{\begin{subfloatrow}|
%   |\ffigbox[\FBwidth]{}{\caption{}\label{...}...}|
%   |\ffigbox[\FBwidth]{}{\caption{}\label{...}...}|
%   |\end{subfloatrow}\caption{Common caption~II...}}|
%   |\end{floatrow}}%|
%   |\end{figure*}|%
%\end{Quote}%
%  Here you may see the result.
%\begingroup\makeatletter
%  \floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}
%   \begin{figure*}[H]\fboxsep-.4pt%^^A
%   \CommonHeightRow*%
%   {\begin{floatrow}%^^A%
%   \ffigbox[\FBwidth]{}%^^A%
%   {\begin{subfloatrow}%^^A%
%   \ffigbox[\FBwidth]{}{\caption{Part~I in the row with common heights}%^^A%
%   \label{fig:CHsI:Dog}\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]{}{\caption{Part~II in the row with common heights}%^^A%
%   \label{fig:CHsI:WcatI}\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A
%   \end{subfloatrow}\caption{Common caption~I in a~row with common height of graphics}}%^^A
%^^A%
%   \ffigbox[\FBwidth]{}%^^A%
%   {\begin{subfloatrow}%^^A%
%   \ffigbox[\FBwidth]{}{\caption{Part~III in the row with common heights}%^^A%
%   \label{fig:CHsI:mouse}\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A
%^^A%
%   \ffigbox[\FBwidth]{}{\caption{Part~IV in the row with common heights}%^^A%
%   \label{fig:CHsI:cheese}\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A
%   \end{subfloatrow}\caption{Common caption~II in a~row with common height of graphics}}%^^A
%   \end{floatrow}}%^^A%
%   \end{figure*}%
%\endgroup
%
%  The row with labels beside.
%\begin{Quote}%
%  |\floatsetup[subfigure]{capbesideposition=left}|
%   |\begin{figure*}[H]|
%   |\CommonHeightRow*%|
%   |{\begin{floatrow}|%
%   |\ffigbox[\FBwidth]{}|
%   |{\begin{subfloatrow}[3]\useFCwidth|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\fcapside[\FBwidth]{}{\caption{}\label{...}...}|
%   |\end{subfloatrow}\caption{Common caption~I}}|
%   |\ffigbox[\FBwidth]{}{\caption{Caption~II...}\label{...}...}|
%   |\end{floatrow}}%|
%   |\end{figure*}|%
%\end{Quote}%
%  Here you may see the result.
%\begingroup\makeatletter
%  \floatsetup[figure]{style=plain}\floatsetup[widefloat]{margins=hangleft}
%  \floatsetup[subfigure]{capbesideposition=left}
%   \begin{figure*}[H]\fboxsep-.4pt%^^A
%   \CommonHeightRow*%^^A%
%   {\begin{floatrow}[2]%^^A%
%   \ffigbox[\FBwidth]{}%^^A%
%   {\begin{subfloatrow}[3]\useFCwidth
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A%
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A%
%   \fcapside[\FBwidth]{}{\caption{}%^^A%
%   \resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A%
%   \end{subfloatrow}\caption{Common caption~I}}%^^A%
%   \ffigbox[\FBwidth]{}{\caption{}%^^A%
%   \resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A%
%   \end{floatrow}}%^^A%
%   \end{figure*}%
%\endgroup
%
%   \clearpage
%   \subsection{Sample Files}\label{sec:samples}
%   The |floatrow| package distribution offers a few files with
%   examples, which show settings, not covered by current document (some
%   of them are bit exotic for technical literature). The samples have no aim to
%   create perfect layout, but to show easy modification for all float
%   types, and show goals and drawbacks in combinations of chosen layout
%   with different float types and their contents.
%
%   \emph{Note}. All miscellaneous float styles (i.e.\ almost
%   all sample files) need at least two \LaTeX{} runs.
%
%   The list of samples:
%
%   \begin{Options}{\OptionLabel}
%     \item[frsample01.tex]   all possible combinations of predefined
%       \package{floatrow} styles for captions above/below floats with foot
%       material; the plain floating environments and
%       |floatrow|s were created, also the boxes with
%       alone objects and alone captions;
%     \item[frsample02.tex] all possible combinations of predefined
%       \package{floatrow} styles for beside captions and all possible
%       caption positions;
%     \item[frsample03.tex]   various tests with tables;
%     \item[frsample04.tex]   sample with fancy layout with usage of
%        beside captions;
%     \item[frsample05.tex]   one-column facing layout; miscellaneous
%        caption settings.
%     \item[frsample06.tex]   examples of attempts to get common height for
%        rectangular graphics (photos) in the filled row of floats or parts
%        of floats. Also the examples of usage of the |\Xhsize| command
%        in the mixed-level rows were added.
%   \end{Options}
%
%   The next bundle of samples is a few file-headers with various
%   preambles which run the same file with various float
%   layouts. For these examples a new float type of
%   float |textbox| was created. It includes text in its object contents.
%   \begin{Options}{\OptionLabel}
%     \item[frsample10.tex]   one column non-facing layout; figures
%       printed in |plain| style; text boxes use miscellaneous
%       ruled style;
%     \item[frsample11.tex]   one-column non-facing layout with elements
%       hanged on left margin (e.g. wide floats, in starred environments,
%       like |figure*|);
%     \item[frsample12.tex]   two-column layout with attempts of
%       colored float styles.
%   \end{Options}
%
%    {\sloppy Also added sample file \file{sample-longtable.tex} was added
%    which uses \emph{beta-temp} package-patch \package{fr-longtable}
%    with defined commands |\endlasthead| and |\endprelastfoot| which
%    defines captions for continued and last pages of long table in three
%    possible ways.\par}
%
%\vfil
%
%   \begin{small}
%   \subsection{Obsolete Commands}\label{sec:changed}
%   \FRorisubsubsection{The User Interface---New Floats [\package{float}]}
%   \label{sec:floatborrowI}
%
%   \DescribeMacro{\newfloat}\slshape
%   The most important command in \package{float}
%   is the |\newfloat| command\footnote{It doubles the
%   \cmd{\DeclareNewFloatType} command.}. It is patterned on
%   |\newtheorem|. The |\newfloat| command takes three required and
%   one optional argument; it is of the form
%   \begin{Quote}
%   \hspace*{\MacroIndent}|\newfloat{|\meta{type}|}{|^^A
%     \meta{placement}|}{|\meta{ext}|}[|\meta{within}{\tt]}
%   \end{Quote}
%   \begin{itemize}\advance\itemsep2ptplus2pt
%   \item \marg{type} is the `type' of the new class of floats, like
%   |program| or |algorithm|. After the appropriate
%   |\newfloat|, commands like |\begin{program}| or |\end{algorithm*}|
%   will be available.
%   \item \marg{placement} gives the default placement
%   parameters for this class of floats. The placement parameters are
%   the same as in standard \LaTeX, i.e., |t|, |b|,
%   |p| and |h| for `top', `bottom', `page' and `here',
%   respectively.
%   \item \marg{ext} When \LaTeX\ writes the captions to an auxiliary file
%   for the list of figures (or whatever), it'll use the job name
%   followed by \marg{ext} as a file name.
%   \item \oarg{within} Finally, the optional
%   argument \meta{within} determines whether floats of this class will
%   be numbered within some sectional unit of the document. For example,
%   if \oarg{within}${}={}$|chapter|, the floats will be numbered
%   within chapters. (In standard \LaTeX, this happens with figures and
%   tables in the \cls{report} and \cls{book} document styles.) As an
%   example, Program~\ref{prog1.1}  was created by a command sequence
%   similar to that shown in the following
%   Example\footnote{Settings for Example float
%   environment were created by \cs{}\FRkey{DeclareNewFloatType} macro stuff.}.
%   \end{itemize}
%\begin{em}
%   \emph{Floatrow note.}
%   Also a |\newfloat*| pair was created which works similar to
%   |\restylefloat*| command (see below).\pagebreak[2]
%\end{em}
%   \begin{Example}[H]
%   \begin{Quote}\openup-.5pt
%   |\floatstyle{ruled}|
%   |\newfloat{Program}{tbp}{lop}[section]|\pagebreak[3]
%   \dots\ loads o' stuff \dots
%   |\begin{Program}|
%   |\begin{verbatim}|
%   \dots\ program text \dots
%   |\end{verbatim}|
%   |\caption{|\dots\ caption \dots|}|
%   |\end{Program}|
%   \end{Quote}
%   \caption{This is another silly floating Example. Except
%     that this one doesn't actually float
%     because it uses the {\tt[H]} optional parameter
%     to appear \textbf{Here}. (Gotcha.)}\label{exa1.1}
%   \end{Example}\pagebreak[3]
%   \begin{Program}
%\begin{verbatim}
%#include <stdio.h>
%
%
%int main(int argc, char **argv) {
%       int i;
%       for (i = 0; i < argc; ++i)
%               printf("argv[%d] = %s\n", i, argv[i]);
%       return 0;
%}
%\end{verbatim}
%   \caption{The first program. This hasn't got anything to do with the
%   package but is included as an example.
%   Note the \texttt{ruled} float style.%
%      \label{prog1.1}}
%   \end{Program}
%
%   \DescribeMacro{\floatstyle}
%   The |\floatstyle| command sets a default
%   float style. This float style will be used for all the floats that
%   are subsequently defined using |\newfloat|, until another
%   |\floatstyle| command appears. The |\floatstyle| command takes one
%   argument, the name of a float style. For instance,
%   |\floatstyle{ruled}|. Specifying a string that does not name a valid
%   float style is an error.
%
%   \DescribeMacro{\floatname}
%   The |\floatname| command lets you define
%   the \emph{float name} that \LaTeX\ uses in the caption of a float,
%   i.e., `Figure' for a figure and so on. For example,
%   |\floatname{program}{Program}|. The |\newfloat| command sets the
%   float name to its argument \meta{type} if no other name has been
%   specified before.
%
%   \DescribeMacro{\floatplacement}
%   The |\floatplacement| command resets
%   the default placement specifier of a class of floats. E.g.,
%   |\floatplacement{figure}{tp}|.
%
%   \DescribeMacro{\restylefloat}\nopagebreak
%   The |\restylefloat| command is necessary
%   to change styles for the standard float types
%   |figure| and |table|. Since these aren't usually
%   defined via |\newfloat|, they don't have a style associated with
%   them. Thus you have to say, for example,
%   \begin{Quote}
%   \hspace*{\MacroIndent}|\floatstyle{ruled}|
%   \hspace*{\MacroIndent}|\restylefloat{table}|
%   \end{Quote}
%   to have tables come out |ruled|. The command also lets you
%   change style for floats that you define via |\newfloat|, although
%   this is, typographically speaking, not a good idea. See
%   table~\ref{table1} for an example\footnote{The \package{float} package
%   created special caption style with bold label for |boxed|
%   style. Please note that |plain| and |boxed| float
%   styles have not any special settings in \package{caption} 3.x package.
%   To emulate |boxed| style from \package{float} documentation there
%   were: cleared all special caption settings for tables, and restored
%   default colon separator after label.}. There is a |\restylefloat*|
%   command which will restyle an existing float type but will keep the
%   new float style from taking over the |\caption| command. In this
%   case the user is responsible for handling their own captions.
%   \DeleteShortVerb{\|}
%   %^^AEmulation of float's documentation settings
%   %^^A\floatstyle{boxed}
%   %^^A\restylefloat{table}
%   \begingroup
%   \clearcaptionsetup{table}
%   \captionsetup{labelsep=default,labelfont=bf}
%   \floatsetup[table]{style=boxed}
%   \begin{table}[h] \def\B#1{$\displaystyle{n\choose#1}$}
%   \begin{center} \begin{tabular}{c|cccccccc}
%   $n$&\B0&\B1&\B2&\B3&\B4&\B5&\B6&\B7\\ \hline
%    0 & 1\\
%    1 & 1&1\\
%    2 & 1&2&1\\
%    3 & 1&3&3&1\\
%    4 & 1&4&6&4&1\\
%    5 & 1&5&10&10&5&1\\
%    6 & 1&6&15&20&15&6&1\\
%    7 & 1&7&21&35&35&21&7&1
%   \end{tabular} \end{center}
%   \caption{Pascal's triangle. This is a re-styled \LaTeX\
%      \texttt{table}.\label{table1}}
%   \end{table}
%   \endgroup
%   \MakeShortVerb{\|}
%
% \end{small}\pagebreak[2]
%
%\clearpage
%\RestoreSpaces
%   \begingroup\extrarowheight1.75pt\small\openup-.5pt\tabcolsep.5\tabcolsep\LTpre=0ptplus3pt\LTpost\LTpre
%   \subsubsection{The \texorpdfstring{\cs{floatsetup}}{floatsetup} Keys, Renamed or Deleted After Version 0.1b}
%   \parindent0pt
%   \begin{longtable}{@{\extracolsep{-.3ptplus1fill}}|
%     >{\rightskip0ptplus1fil}p{.35\hsize}|
%     >{\rightskip0ptplus1fil}p{.6\hsize}|}
%   \multicolumn{2}{c}{Removed or changed commands}
%   \\\hline
%   \thead{Command}
%   &
%   \thead{Changed to}
%   \\\hline
%   \endhead
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%   |\renewfloatstyle|,\\
%   |\newfloatstyle|,\\
%   |\definefloatstyle|
%   \end{tabular}&
%   |\DeclareFloatStyle|---this command uses |\floatsetup|
%   mechanism
%   \\\hline
%    |\restorerestylefloat| & removed
%   \\\hline
%    |\captionskip| & command, not a skip
%   \\\hline
%    |\floatfootskip| & command, not a skip
%   \\\hline
%   \end{longtable}
%
%   \vskip1pt
%   \begin{longtable}{@{\extracolsep{-.3ptplus1fill}}|
%     >{\rightskip0ptplus1fil}p{.35\hsize}|
%     >{\rightskip0ptplus1fil}p{.6\hsize}|}
%   \multicolumn{2}{c}{Commands, replaced by keys}
%   \\\hline
%   \thead{Deleted Command}
%   &
%   \thead{Key Analog}
%   \\\hline
%   \endhead
%    |\floatobjectset| &
%   in current version \emph{do not use for definition of object
%   settings}, use key
%    |objectset=|
%   \\\hline
%    |\alignsidecaption|&
%     |capbesideframe=yes|
%   \\\hline
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%    |\capbesidecenter|,\\ |\capbesidetop|,\\
%    |\capbesidebottom|,\\
%         |\capbesideinside|,\\
%         |\capbesideoutside|,\\
%         |\capbesideleft|,\\ |\capbesideright|
%   \end{tabular}&
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%         |capbesideposition=center|\\
%         |capbesideposition=top|\\
%         |capbesideposition=bottom|\\
%         |capbesideposition=inside|\\
%         |capbesideposition=outside|\\
%         |capbesideposition=left|\\
%         |capbesideposition=right|
%   \end{tabular}
%   \\\hline
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%    |\floatrowsep|,\\ |\floatcapbesidesep|
%   \end{tabular}&
%   in current version \emph{do not use for definition of separation
%   material}, use keys\par
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%    |floatrowsep=|\\
%    |capbesidesep=|
%   \end{tabular}
%   \\\hline
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%    |\FBcenter|\vphantom{g},\\ |\FBleft|\vphantom{g},\\
%    |\FBright|,\\ |\FBnormal|
%   \end{tabular}&
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%         |margins=center|,\\
%         |margins=raggedright|,\\
%         |margins=raggedleft|, \\
%         |margins=center|,\\
%   \end{tabular}
%   \\\hline
%    |\setfloatstyle| & |style=|
%   \\\hline
%   \extrarowheight0pt\begin{tabular}[t]{@{}l}
%    |\Setframe|\\
%    |\setframe|
%   \end{tabular}
%   & use |framestyle=| and |frameset=| keys
%   \\\hline
%    \cmd{\setrules}
%   & use |precode=|, |postcode=|, |midcode=| (also
%   |rowpercode| and |rowpostcode|) keys
%   \\\hline
%   \end{longtable}
%
%   \RestoreSpaces\vskip1pt\pagebreak[3]
%
%   \begin{longtable}{@{\extracolsep{-.3ptplus1fill}}|
%     >{\rightskip0ptplus1fil}p{.35\hsize}|
%     >{\rightskip0ptplus1fil}p{.6\hsize}|}
%   \multicolumn{2}{c}{Renamed keys}
%   \\\hline
%   \thead{Key}
%   &
%   \thead{Changed to}
%   \\\hline
%   \endhead
%    |attachedcapstyle=| & |relatedcapstyle=|
%   \\\hline
%    |floatstyle=| & |style=|
%   \\\hline
%    |floatfont=| & |font=|
%   \\\hline
%    |putcaptionbeside=| & |capposition=beside|
%   \\\hline
%    |besidecapposition=| & |capbesideposition=|
%   \\\hline
%    |besidecapwidth=| & |capbesidewidth=|
%   \\\hline
%    |besidecapframe=| & |capbesideframe=|
%   \\\hline
%    |floatmarginsset=| & |margins=|
%   \\\hline
%    |besidecapsep=| & |capbesidesep=|
%   \\\hline
%    |Precode=| & |rowprecode=|
%   \\\hline
%    |Postcode=| & |rowpostcode=|
%   \\\hline
%    |framereduce=| & |framefit=|
%   \\\hline
%   \extrarowheight0pt\begin{tabular}[t]{@{}l@{}}
%    \vphantom{(}options of |objectset=|\\\quad
%                and |margins=|\\
%    |flushleft|,\\ |flushright|,\\|center|
%   \end{tabular} &
%   \extrarowheight0pt\begin{tabular}[t]{@{}l@{}}
%    \vphantom{(}options of |objectset=| and |margins=|
%      (for unification\\\quad with analogous key options in \package{caption}
%       package)\\
%    |raggedright|,\\ |raggedleft|,\\ |centering|
%   \end{tabular}
%   \\\hline
%   \end{longtable}
%   \endgroup
%   \MakeShortVerb{\|}%
%
% \StopEventually{}
% \hfuzz70pt\clearpage
%
% \section{The Code}
%
% \changes{v0.2b}{2007/09/14}{The \cmd{\changes} of \texttt{v0.1}\meta{x} versions revised
%       and many of them transformed into document text.}
%
% \FRorisubsection{The Prelude}
%
% The first step is to check whether \package{float} and
% \package{rotfloat} are loaded or not. If yes, there go error messages;
% if you run through this error message \package{floatrow} loading will be skipped.
%    \begin{macrocode}
%<*floatrow>
\@ifundefined{float@caption}{%
  \@ifundefined{rotfloat@float}{}%
    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
        The latter will be skipped}{}%
  \@namedef{opt@floatrow.sty}{}\endinput}}%
  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
        The latter will be skipped}{}%
  \@namedef{opt@floatrow.sty}{}\endinput}
%    \end{macrocode}
%
% The next lines emulate already loaded \package{float} and \package{rotfloat}
% packages.
%
% If in preamble, after loading of \package{floatrow} package is used
% |\usepackage| with \package{float} package (the \package{float} package
% doesn't support any options), the defining of command |\ver@float.sty|,
% which emulates loading of package will do not any harm.
%
% Unfortunately the \package{rotfloat} package allows to transfer options of
% \package{rotating} package in the case of appearance
% of both packages in one |\usepackage| line. Thus, if someone loads
% options in \package{rotating}---\package{rotfloat} line, he will get
% `option clash' error. A followed help gives a simple solution of such
% problem---moving options in |\documentclass| line and make them global.
% I hope, that moving option in this way will do not harm
% to document, but now you aware of ``non-necessity'' of loading
% of \package{rotfloat} package.
%    \begin{macrocode}
\@namedef{ver@float.sty}{2001/11/08 v1.3d (excerpt)
    Float enhancements (AL)}
\@namedef{ver@rotfloat.sty}{2004/01/04 v1.2 (excerpt)
    Combining float+rotating package (AS)}
%    \end{macrocode}
%
% The \package{floatrow} package uses \package{keyval}'s mechanism widely.
%    \begin{macrocode}
\RequirePackage{keyval}
%    \end{macrocode}
%
% Here goes request for \file{caption3} file, core part of \package{caption}
% package (the \package{floatrow} package uses macros, similar to \package{caption}'s
% in ``append'' mode). There is not any compatibility for versions,
% older than \texttt{3.0q}, so in the case of older version you'll get error message
% and skip loading of \package{floatrow}.
% \changes{v0.2a}{2007/08/24}{Added check and error message for version older 3.0q}
%    \begin{macrocode}
\RequirePackage{caption3}
\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
    {floatrow}{For a successful cooperation we need at least\MessageBreak
    version `2007/04/11 v3.0q' of package caption,\MessageBreak
        but only version\MessageBreak
          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
        is available}\@eha\endinput}
%    \end{macrocode}
% This provide command loaded for compatibility with 3.0q.
%    \begin{macrocode}
\providecommand*\caption@fnum[1]{%
   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
%    \end{macrocode}
%
% Here is list of macronames of \package{caption} package which are used inside \package{floatrow}.
%\begin{Options}{/caption@setfloattype}%
%\item[\cmd{\l@addto@macro}]local version of |\g@addto@macro|;
%\item[\cmd{|\@nameundef}]opposite to |\@namedef| used, for example, in |\clearfloatsetup|;%^^A
%\\[1ex]%^^A
%\item[\cmd{\caption@fnum}]defined with |\providecommand| few lines above (for compatibility with caption 3.0q);
%\item[\cmd{\caption@ifinlist}]widely used in key--val options (|\floatsetup| stuff);
%\item[\cmd{\caption@setkeys}]custom definition for |\setkeys| macro: to refer to current package
%   (error messages for |\floatsetup| stuff);
%\item[\cmd{\caption@setoptions}]used in current package to switch on necessary float settings
%   (|\floatsetup| stuff);
%^^A\item[\cmd{\caption@set@bool}]used for boolean key options (|\floatsetup| stuff);
%\item[\cmd{\caption@@make}]used in |\floatfoot@box| macro for building of float foots
%   (|\floatfoot| command);
%\item[\cmd{\caption@@@make}]used during calculation of caption height or width, also used for creation of
%   caption labels only (|\floatbox| stuff);
%\item[\cmd{\caption@lfmt}]obsolete, used together inside |\caption@@@make| macro;
%\item[\cmd{\caption@setposition}]follows caption position options of current package
%   (|capposition| key of |\floatsetup| stuff; |\captop|, |\CAPTOP|,
%   |\capbeside| and |\nocapbeside| commands);
%\item[\cmd{\caption@settype}]obsolete variant of |\caption@setoptions|, used for cooperation with
%   caption 3.0q;
%\item[\cmd{\caption@setfloattype}]used in current package to switch on necessary float settings
%   (together with |\caption@setoptions|);
%\item[\cmd{\caption@setstyle*}]used in current package to switch on necessary float settings
%   (together with |\caption@setoptions|)
%\item[\cmd{\caption@setfont}]used for font definition in font option of current package and for definition
%   of float foot font (|font| key  of |\floatsetup| stuff);%^^A
%\\[1ex]%^^A
%\item[\cmd{\DeclareCaptionOption}]declares |\floatfoot| font option;
%\item[\cmd{\DeclareCaptionFont}]$\to$|\DeclareFloatFont|;
%\item[\cmd{\DeclareCaptionJustification}]$\to$|\DeclareObjectSet|;
%\item[\cmd{\DeclareCaptionLabelSeparator}]$\to$|\DeclareFloatSeparators|;%^^A
%\\[1ex]%^^A
%\item[\cmd{\caption@sty@}\meta{float style}]used in current package to switch on necessary float settings
%   (together with |\caption@setoptions|);
%\item[\cmd{\caption@fnt}\meta{font option}]used in |\flrow@setfont|
%   (|\caption@setfont| analog);
%\item[\cmd{\caption@hj@}\meta{justification}]used in |\flrow@FBoAlign| \\
%   (|\caption@setjustification| analog);
%\item[\cmd{\caption@lsep@}\meta{separator}]used in |\flrow@setFRsep| \\
%   (|\caption@setlabelseparator| analog);
%\end{Options}%
%
% \subsection{Storing of \LaTeX's Internal Macros}
%
% \begin{macro}{\FR@flboxreset}
% First goes storage of \LaTeX's macros |\@floatboxreset| and |\@makecaption|
% from bundle of float definitions.
%    \begin{macrocode}
\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
%    \end{macrocode}
% Please note, since the \package{caption3} package already loaded in this point, here are stored the
% \package{caption}'s definition.
%    \begin{macrocode}
\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
%    \end{macrocode}
% \end{macro}
%
% \emph{Floatrow note}. The next macro and few of others were renamed to change prefix ``|@FB|''
% to ``|flrow@|'' to avoid possible conflict with French babel package.
%
% \begin{macro}{\flrow@caption}
% Here is repeated standard \LaTeX's code of |\caption| command
% (it is used below for caption width counting).
%    \begin{macrocode}
\newcommand\flrow@caption{%
   \ifx\@captype\@undefined
     \@latex@error{\noexpand\caption outside float}\@ehd
     \expandafter\@gobble
   \else
     \refstepcounter\@captype
     \expandafter\@firstofone
   \fi
   {\@dblarg{\@caption\@captype}}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\float@caption}
% This emulation code which says to some other packages
% that \package{float} package's mechanism is used for building of floats.
%    \begin{macrocode}
\@ifdefinable\float@caption{\let\float@caption\@caption}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Borrowed Code (with original comment) from The \package{float}
% Package}
%
% From this point starts \package{float} package's core code (version 1.3).
% The necessary explanation of macro code also borrowed from \package{float}
% package and typed with slanted font. Some macros
% were skipped or edited (see \emph{floatrow notes}).
%
% \begin{sl}\medskip
% In \LaTeX, floats are assigned `type numbers' that are powers of~$2$.
% Since there are only two classes of floats, their type numbers are
% hardwired into the document styles. We need to be somewhat more flexible,
% and thus we initialize a counter to hold the next type number to be
% assigned. This counter will be incremented appropriately later.
%    \begin{macrocode}
\newcounter{float@type}
\@ifundefined{c@figure}%
  {\setcounter{float@type}{1}}%
  {\setcounter{float@type}{4}}
%    \end{macrocode}
%
% \begin{macro}{\floatstyle}
% The |\floatstyle| command puts its argument into the
% |\float@style| macro as the name of the new float style.
% But if the argument doesn't denote a float style, an error message
% is output instead: Each float style \meta{style} has a corresponding
% command |\fs@|\meta{style} that contains the appropriate declarations.
% If the control sequence |\fs@|\meta{arg} (which goes with the
% argument \meta{arg} to |\floatstyle|) is undefined, i.e.,
% equals |\relax| under |\ifx|, then the float style \meta{arg}
% is unknown, and we call |\float@error{|\meta{arg}|}| for the
% error message.
%
% \begin{macro}{\flrow@package}
% \begin{macro}{\flrow@error}
%   {\em [floatrow] The \package{float}'s error message
%   (the command \cmd{\float@error}\meta{arg}) changed to
%   \cmd{\flrow@error}\meta{arg}. It is similar to \package{caption}'s one.
%   (First goes the command of name of package.)}
%    \begin{macrocode}
\newcommand\flrow@package{floatrow}
\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\flrow@eh}
%   {\em[floatrow] This is the analog of \package{caption} package's help |\caption@eh|.}
%    \begin{macrocode}
\newcommand*\flrow@eh{%
  If you do not understand this error, please take look\MessageBreak
  at `floatrow' and `caption' package documentations.\MessageBreak
  \@ehc}
%    \end{macrocode}
% \end{macro}
% Here is the \package{floatrow} package version of \package{float}'s command.
%    \begin{macrocode}
\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\floatname}
% \begin{macro}{\floatplacement}
% The next two commands are even simpler. \LaTeX\ says that
% |\fps@|\meta{float} contains the default placement specifier for
% the class of floats \meta{float}. |\|\meta{float}|name| expands
% to the name that appears in \meta{float} captions, e.g., `Figure'.
% (This is our own definition.)
% \changes{v0.1p}{2007/06/24}{The \cmd{\fname@}\meta{floatname} changed to
%    \cs{}\meta{floatname}|name| macros redefined locally (AS).}
%    \begin{macrocode}
\newcommand\floatname[2]{\@namedef{#1name}{#2}}
\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
%    \end{macrocode}
%   {\em [floatrow] \startNotes\Note The definition of command name for float,
%   in the |\floatname| macro, from version \texttt{0.1p}
%   is build like |\|\meta{floatname}|name|.} \quad
%   {\em\Note Here was stuff of undocumented command
%   \cmd{\floatevery} which, I suppose, allowed to set special settings for
%   current type of float. In \package{floatrow} package it was deleted.
%   Use \cmd{\floatsetup} stuff instead.}
% \end{macro}
% \end{macro}
%
% \begin{em}
%   [floatrow]
%   The definitions of |\restylefloat| stuff were changed.
%
% \begin{macro}{\if@@FS}
%   The first goes flag command which, if |true|, stops repetition of float
%   layout settings.
%    \begin{macrocode}
\newif\if@@FS
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FR@redefs}
%   This macro makes temporary redefinitions of |\@makecaption|
%   and |\@floatboxreset| macros.
%    \begin{macrocode}
\newcommand\FR@redefs{%
%  \@ifundefined{sf@end@float}{}{\let\end@float\sf@end@float}%
%  \@ifundefined{sf@end@dblfloat}{}{\let\end@dblfloat\sf@end@dblfloat}%
  \@ifundefined{HyOrg@float@makebox}{}%
    {\let\float@makebox\HyOrg@float@makebox}%
  \ifx\flrow@makecaption\@makecaption\relax
  \else
    \let\FR@makecaption\@makecaption
    \let\@makecaption\flrow@makecaption
  \fi
  \let\@floatboxreset\flrow@flboxreset}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@makecaption}
%   The definition of this caption borrowed mechanism of saving caption contents
%   into special box (like in \package{float} package).
%   The |\FBc@wd| parameter here is used as flag for wrapped floats (for the
%   case when natural width of float calculated).
%   Since |\caption| stuff uses
%   |\linewidth| parameter, here it is redefined to predefined |\hsize|.
% \changes{v0.2b}{2007/10/28}{Added check and error message for second caption outside
%   \cmd{\floatbox} command.}
%    \begin{macrocode}
\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
    \ifvoid\@floatcapt
      \else\flrow@error{Caption(s) lost}\fi\fi
  \global\setbox\@floatcapt
  \vbox\bgroup\@parboxrestore
   \reset@font
   \if@@FS
      \ifdim\FBc@wd>\z@
        \hsize\FBc@wd
      \else
        \adj@dim\hsize+\FBo@wadj=\hsize
      \fi
   \fi
   \linewidth\hsize
%    \end{macrocode}
% The check of |\hsize| for |\sloppy| paragraph settings.
% \changes{v0.2b}{2007/10/28}{The \cmd{\sloppy} settings added for short lines.}
%    \begin{macrocode}
   \ifdim\hsize<70mm\sloppy\fi
   \normalsize
   \abovecaptionskip\z@\belowcaptionskip\z@
   \FR@makecaption{#1}{#2}\egroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\killfloatstyle}
%   The third one allows to define again float layout style: it could be
%   necessary in mixed float rows. These redefinitions make local changes.
%    \begin{macrocode}
\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@capsetup}
%   This only additional definition which is used with \package{caption} package
%   version 3.0. With this macro you may (re)define some layout settings
%   for captions.
%    \begin{macrocode}
\newcommand\flrow@capsetup{}
%    \end{macrocode}
% \end{macro}
%
%   Definitions of default float style.
%    \begin{macrocode}
\edef\float@style{plain}
%    \end{macrocode}
%
% \begin{macro}{\FBB@wd}
%   This command stores absolute width for |\floatbox|'s |\hsize|.
%   The usage of |\FBB@wd| as command needs definitions like
%   |\edef\FBB@wd{\the\textwidth}| to get right layout in float rows
%   with |BOXED|-like layouts. The |\relax| meaning is used as flag.
%    \begin{macrocode}
\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\restylefloat}
%   The redefined \package{float} package macros to follow |\floatsetup| stuff.
%
%   This macro starts to work at the beginning of document, so it has tests
%   for loaded packages.
%    \begin{macrocode}
\newcommand\restylefloat{%
   \@ifstar{\flrow@restylefloat{no}\flrow@restyle}%
     {\flrow@restylefloat{yes}\flrow@restyle}}
\newcommand\flrow@restylefloat[3]{%
   \edef\FR@tmp{\noexpand
     \floatsetup[#3]{style=\float@style,relatedcapstyle=#1}}\FR@tmp
   #2{#3}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@restyle}
%   The command which redefines macros for building of floats in the way similar to \package{float}
%   package after |\restylefloat| macro. That means that contents of floating environment analyzed,
%   caption and foot material are saved in special box registers, then full float box is built
%   accordingly to current settings.
%    \begin{macrocode}
\newcommand\flrow@restyle[1]{%
%    \end{macrocode}
%   One-column floating environment.
%    \begin{macrocode}
  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
    \flrow@setlist{{#1}}%
    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
%    \end{macrocode}
%   Two-column (wide) floating environment.
%    \begin{macrocode}
  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
%    \end{macrocode}
%   The |\@captype| definition needed here and in next definitions to get
%   correct and non-doubled |\captionsetup| contents.
%    \begin{macrocode}
    \flrow@setlist{{#1}{widefloat}{wide#1}}%
    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
%    \end{macrocode}
% {\sl[float] The standard |\@xdblfloat| macro changes |\hsize| to |\textwidth|.
% This way is not correct so use |\@xfloat| instead.}
%   Here added flag which, if true, allows redefinition of starred float
%   environment like non-starred but with special layout. This redefinition
%   allows usage of |[H]| option.
%    \begin{macrocode}
    \let\@xdblfloat\@xfloat\relax
    \FR@ifdoubleaswide
     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
    \@dblfloat{#1}}%
  \expandafter\let\csname end#1\endcsname\float@end
  \expandafter\let\csname end#1*\endcsname\float@dblend
%    \end{macrocode}
%   One-column rotated floating environment.
%   The code contents of |\rotfloat@float| macro (\package{rotfloat} package)
%   moved here.
%    \begin{macrocode}
 \@ifundefined{@rotfloat}{}{%
  \@namedef{sideways#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
    \flrow@setlist{{#1}{rotfloat}{rot#1}}%
    \columnwidth\textheight\edef\FBB@wd{\the\textheight}%
    \FRifFBOX\@@setframe\relax\@@FStrue
    \let\rotfloat@@makebox\float@makebox
    \let\float@makebox\rotfloat@makebox
    \@float{#1}}%
  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
%    \end{macrocode}
%   Two-column rotated floating environment without support.
%    \begin{macrocode}
  \ifx\@rotdblfloat\undefined
   \@namedef{sideways#1*}{%
     \flrow@error{%
      You need rotating version 2.10 or newer to do this}%
     \@nameuse{sideways#1}}%
  \else
%    \end{macrocode}
%   Two-column rotated floating environment with support.
%    \begin{macrocode}
   \@namedef{sideways#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
     \flrow@setlist{{#1}{rotfloat}{rot#1}{widerotfloat}{widerot#1}}%
     \columnwidth\textheight\edef\FBB@wd{\the\textheight}%
     \FRifFBOX\@@setframe\relax\@@FStrue
%    \end{macrocode}
% {\sl[float] The standard |\@xdblfloat| macro changes |\hsize| to |\textwidth|.
% This way is not correct so use |\@xfloat| instead.}
%
%   The code contents of |\rotfloat@dblfloat| macro (\package{rotfloat}
%   package) moved here.
%    \begin{macrocode}
     \let\@xdblfloat\@xfloat
     \let\rotfloat@@makebox\float@makebox
     \let\float@makebox\rotdblfloat@makebox
     \@dblfloat{#1}}%
  \fi
  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
%    \end{macrocode}
%   Wrapped floating environment from \package{wrapfig} package.
%    \begin{macrocode}
 \@ifundefined{wrapfloat}{}{%
   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
     \dimen@##2\relax
     \ifdim\dimen@>\z@
       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
     \fi
     \flrow@WF@rapt[##1]{\dimen@}%
%    \end{macrocode}
% \changes{v0.1k}{2007/05/24}{Commented \cmd{\capstart} for a while}
%    \begin{macrocode}
%       \@ifundefined{capstart}{}{\capstart}%
       \the\FR@everyfloat\ignorespaces}%
   }{}%
   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
%    \end{macrocode}
%   ^^A The \cmd{\FloatHBarrier} for \package{flafplins}.
%   ^^A \changes{v0.1j}{2006/03/12}{Added \cmd{\FloatHBarrier} in wrapfloat}
%    \begin{macrocode}
     \FR@redefs\FBc@wd\z@
     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
%    \end{macrocode}
%   Here is the repeated code from |\float@end| and |\float@dblend|: check whether
%   |\floatbox| stuff appeared or not.
%    \begin{macrocode}
     \def\WF@floatstyhook{\let\@currbox\WF@box
       \ifFBbuild
%    \end{macrocode}
%   (|^^A|---The attempts to arrange the widths of Boxed wrapped floats.)
%    \begin{macrocode}
%^^A       \adj@dim\hsize+\FB@wadj=\hsize
%^^A       \adj@dim\hsize+\FBo@wadj=\hsize
         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
       \else
         \global\let\flrow@typ@tmpset\undefined
         \global\let\WF@box\@currbox
       \fi}%
     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
%   \expandafter\let\csname endwrap#1\endcsname\endwrapfloat}
   \@namedef{endwrap#1}{\endwrapfloat
     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
     }}
%^^A   \@namedef{endwrap#1}{\ifdim\hsize>\z@
%^^A      \adj@dim\hsize+\FBo@wadj=\hsize\fi\endwrapfloat}}
%    \end{macrocode}
%   At last the definitions for new subfloat numeration for \package{subfig} package.
%   The subfloats for figures and tables (|\c@subfigure| and |\c@subtable|)
%   already defined: so at first goes check, whether defined this command for
%   subfloat (suggestions of Steven Cochran).
%    \begin{macrocode}
 \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\RawFloats}
%   This macro restores plain \LaTeX{} mode for floats. i.e. returns core
%   macros for commands of floating environment.
%   Non-optional variant can be used inside environments only.
%   Variant with option better to be used in preamble. (Option allow
%   to restore plain \LaTeX{} mode for necessary float type.)
%    \begin{macrocode}
\newcommand\RawFloats{\@ifnextchar[%]
    \flrow@rawfloatschk\flrow@rawfloats}
%    \end{macrocode}
%   The macro for usage inside one environment. It redefines only |\end|\meta{float type}
%   commands to \LaTeX's standard behavior.
%    \begin{macrocode}
\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
    \let\@makecaption\FR@makecaption
    \expandafter\ifx\csname end\@captype\endcsname\float@endH
        \global\FBbuildfalse
    \else
        \@namedef{end\@captype}{\end@float}%
    \fi
    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
        \global\FBbuildfalse
    \else
        \@namedef{end\@captype*}{\end@dblfloat}%
    \fi
  \@ifundefined{@rotfloat}{}{%
    \@namedef{endsideways\@captype}{\end@rotfloat}%
    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
  }%
  \@ifundefined{wrapfloat}{}{%
    \@namedef{endwrap\@captype}{\endwrapfloat}%
  }}
%    \end{macrocode}
%
%    \begin{macrocode}
\@ifdefinable\flrow@rawfloatschk{}
\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
%    \end{macrocode}
%
%   The next two macros redefine the |\|\meta{float type} commands. The |\end|\meta{float type}
%   in this case won't touched at all. Since at the beginning of document all float commands
%   redefined accordingly to \package{floatrow} package's settings, the |\flrow@raw@set|
%   command is used: in the preamble area it works like |\AtBeginDocument| macro, in the
%   |document| area it simply runs its argument.
%   \changes{v0.2b}{1007/10/24}{Added \cmd{\flrow@raw@set} command to allow usage of \cmd{\RawFloats}
%       both in the preamble and in the document areas.}
%    \begin{macrocode}
\@ifdefinable\flrow@RawFloats{}
\newcommand\flrow@raw@set{\AtBeginDocument}
\AtBeginDocument{\let\flrow@raw@set\@firstofone}
\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
\def\flrow@RawFloats@[#1]#2,{%
  \caption@ifinlist{#2}{float}{\flrow@raw@set
        {\@namedef{#1}{\@float{#1}}}%
  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
  }{\caption@ifinlist{#2}{rotfloat}{%
    \@ifundefined{@rotfloat}{}{\flrow@raw@set
        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
  }{\caption@ifinlist{#2}{widerotfloat}{%
    \@ifundefined{@rotfloat}{}{\flrow@raw@set
        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
  }{\caption@ifinlist{#2}{wrapfloat}{%
    \@ifundefined{wrapfloat}{}{\flrow@raw@set
        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
  }{\caption@ifinlist{#2}{all,allfloats}{%
    \flrow@@RawFloats{#1}%
  }{\flrow@error{Undefined float subtype `#2'}%
  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
%    \end{macrocode}
%
%    \begin{macrocode}
\@ifdefinable\flrow@@RawFloats{}
\def\flrow@@RawFloats#1,{%
 \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
  \@ifundefined{@rotfloat}{}{%
    \@namedef{sideways#1}{\@rotfloat{#1}}%
    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
  }%
  \@ifundefined{wrapfloat}{}{%
    \@namedef{wrap#1}{\wrapfloat{#1}}}%
  }\@ifnextchar;\@gobble\flrow@@RawFloats
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@Raw@restyle}
%   This macro is used by |rawfloats=| key. If this key is true, it replaces
%   the |\flrow@restyle| command when definitions of float run.
%    \begin{macrocode}
\newcommand\flrow@Raw@restyle[1]{%
    \@namedef{#1}{\@float{#1}}%
    \@namedef{#1*}{\@dblfloat{#1}}%
    \@namedef{end#1}{\end@float}%
    \@namedef{end#1*}{\end@dblfloat}%
  \@ifundefined{@rotfloat}{}{%
    \@namedef{sideways#1}{\@rotfloat{#1}}%
    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
    \@namedef{endsideways#1}{\end@rotfloat}%
    \@namedef{endsideways#1*}{\end@rotdblfloat}%
  }%
  \@ifundefined{wrapfloat}{}{%
    \@namedef{wrap#1}{\wrapfloat{#1}}%
    \@namedef{endwrap#1}{\endwrapfloat}%
  }%
 }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\RawCaption}
%   The command of caption which doesn't use box register.
%    \begin{macrocode}
\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
%    \end{macrocode}
% \end{macro}
%
% \end{em}
%
% \begin{macro}{\newfloat}
% Now we can explain how to define a new class of floats. Recall that
% the three required arguments to |\newfloat| are \meta{type},
% \meta{placement} and \meta{ext}, respectively. First we save the
% latter two; we also maintain a list of active \meta{ext}s so we can
% later iterate over all currently-open lists of floats.
%    \begin{macrocode}
\@ifdefinable\float@exts{\newtoks\float@exts}
%    \end{macrocode}
%   {\em [floatrow]
%   The |\newfloat| changed and uses |\floatsetup| stuff (redefined by
%   suggestions of Axel Sommerfeldt).}
%    \begin{macrocode}
\newcommand\newfloat{\@ifstar{\flrow@restylefloat{no}\newfloat@}%
   {\flrow@restylefloat{yes}\newfloat@}}
\newcommand\newfloat@[3]{\@ifnextchar[{\@@newfloat{#1}{#2}{#3}}%
  {\@newfloat{#1}{#2}{#3}}}
\newcommand\@newfloat[3]{%
  \DeclareNewFloatType{#1}{placement=#2,fileext=#3}}
\@ifdefinable\@@newfloat{}
\def\@@newfloat#1#2#3[#4]{%
  \DeclareNewFloatType{#1}{placement=#2,fileext=#3,within=#4}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\float@newx}
%   {\em [floatrow] Macro |\float@newx|, which defines a new float
%   counter, was removed. It was replaced by |\DeclareNewFloatType| stuff.}
% \end{macro}
%
% \subsubsection{The \package{float} Package: Adapting \LaTeX\ Internals}
%
% We have to adapt some of \LaTeX's internal macros to our needs.
% There are several things that have to be changed around
% in order to provide the functionality of David Carlisle's \package{here}.
% The following is thus lifted from \package{here}, with changes and with
% David's permission:
%
% \begin{macro}{\@float@Hx}
% We save the original version of |\@xfloat|. (This macro is called from
% |\@float|, which we used above to define the environment commands for a
% new class of floats.)
%    \begin{macrocode}
\let\@float@Hx\@xfloat
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@xfloat}
% The new version of |\@xfloat| looks for a |[H]| argument.
% If it is present |\@float@HH| is called, otherwise the original macro
% (renamed to |\@float@Hx|) is called.
%    \begin{macrocode}
\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
%    \end{macrocode}
% \end{macro}
%   {\em[floatrow] Since \package{floatrow} always uses float style,
%   the stuff of flag \cmd{\@flstyle} (which sets whether use or not any
%   predefined float style) moved out.}
%
%   {\em[floatrow] In the case of loaded \package{setspace} package, the |\@xfloat|
%   definition ought to be fixed.}
%   \changes{v0.3b}{2009/08/02}{The fixation re-fixed by suggestions of A.Sommerfeldt}
%    \begin{macrocode}
\AtBeginDocument{%
  \@ifundefined{latex@xfloat}{}{%
    \let\floatrow@ORI@xfloat\@xfloat
    \def\@xfloat#1[#2]{%
      \floatrow@ORI@xfloat{#1}[#2]%
      \floatfont}}}%
%    \end{macrocode}
%
% Later on we'll need a box to save a |[H]| float.
%    \begin{macrocode}
\newsavebox\float@box
%    \end{macrocode}
%
% \begin{macro}{\@float@HH}
% First gobble the |[H]|. Note that |H| should not be used in
% conjunction with the other placement options, nor as the value of the
% default placement, as set in |\fps@|{\it type}.
%    \begin{macrocode}
\def\@float@HH#1[H]{%
%    \end{macrocode}
%   ^^A {\em[floatrow]  If we want to put barrier
%   ^^A (i.e. use beta-package \package{flafplins}).}
%   ^^A \changes{v0.1j}{2006/03/12}{Added \cmd{\FloatHBarrier}}
%    \begin{macrocode}
  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
%    \end{macrocode}
%   {\em[floatrow] Locally redefine the end of the environment. To allow usage of |[H]| option in wide floats
%   i.e. starred environments in one-column layout there is added the \cmd{\FR@ifdoubleaswide} flag.}
%    \begin{macrocode}
  \expandafter\let\csname end#1\endcsname\float@endH
  \FR@ifdoubleaswide
   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
%    \end{macrocode}
% We don't get a |\@currbox| if we don't actually use the float mechanism.
% Therefore we fake one using the |\float@box| defined above.
%   {\em[floatrow] The special settings for H-floats |floatH| were added.}
% \changes{v0.3b}{2009/08/02}{Fixed bug of \cs{thisfloatsetup} usage}
%    \begin{macrocode}
  \let\@currbox\float@box
  \flrow@setlist*{{floatH}{#1H}}%
%    \end{macrocode}
% Now we save the current float class name for use in constructing the
% |\caption|. The caption box (defined below) is initialized to an empty
% box to avoid trouble with floats not having a caption. Then we start the
% box that'll hold the float itself.
% |\parindent| is set to zero for compatibility with the standard
% \texttt{[h]} option.
%
% {\em [floatrow]
% Here added zeroing of list margins in the case of appearance of |\floatbox|
% inside list environment.
%   Also the settings for \verb|\linewidth| and were zeroed
%   margins were added for the case of appearance
%   of \verb|\floatbox| inside list environment.}
%    \begin{macrocode}
  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
  \setbox\@currbox\color@vbox\normalcolor
    \vbox\bgroup
      \hsize\columnwidth
      \linewidth\columnwidth
      \@parboxrestore\leftmargin\z@\rightmargin\z@
      \@floatboxreset \@setnobreak
%    \end{macrocode}
% The final |\ignorespaces| is needed to gobble any spaces or new lines
% after the {\tt[H]} tokens.
%    \begin{macrocode}
  \ignorespaces}
%    \end{macrocode}
% \end{macro}
%
% \begin{em}
% \begin{macro}{\flrow@flboxreset}
%   [floatrow]
%   The stuff of |\@floatboxreset| changed.
%   At first goes original \LaTeX's macro |\@floatboxreset| saved as
%   |\FR@flboxreset| at the beginning of package.
%   Then goes flag for facing layout and command which inputs references from
%   |aux|-file and temporary settings. At last \package{floatrow} looks
%   whether caption stays above/below object, or beside and chooses necessary
%   macro of width counting.
%    \begin{macrocode}
\newcommand\flrow@flboxreset{\FR@flboxreset
  \@ifundefined{capstart}{}{\capstart}%
  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
  \if@tempswa\FB@readaux{\relax}\fi
  \global\let\FBcheight\relax\global\let\FBoheight\relax
  \global\let\FBfheight\relax
  \FBifcapbeside\FC@fs@wd\FB@fs@wd
  \the\FR@everyfloat}
%    \end{macrocode}
%   The definition of three height commands as |\relax|.
%   We define \emph{height} arguments of caption,
%   object, and foot boxes as |\relax| which (like in |minipage|
%   environment or in |\parbox|) mean usage of natural height of components.
%    \begin{macrocode}
\@ifdefinable\FBcheight{\let\FBcheight\relax}
\@ifdefinable\FBoheight{\let\FBoheight\relax}
\@ifdefinable\FBfheight{\let\FBfheight\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FB@fs@wd}
%   The width settings for float box with caption above or below object.
%    \begin{macrocode}
\newcommand\FB@fs@wd{\@tempdima\FBB@wd
%    \end{macrocode}
%   The |\flrow@setwd| could define the width for current float.
%    \begin{macrocode}
  \flrow@setwd\textwidth\@tempdima
  \adj@dim\@tempdima-\FB@wadj=\@tempdima
  \settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
  \advance\@tempdima-\@tempdimb
  \global\FBc@wd\@tempdima\global\FB@wd\@tempdima
  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
  \hsize\FBo@wd\linewidth\hsize
  \FBifcaptop
    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
    {\columnwidth\FBc@wd}%
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FC@fs@wd}
%   The width settings for float box with caption beside object.
%    \begin{macrocode}
\newcommand\FC@fs@wd{\@tempdima\FBB@wd\flrow@FClist
  \settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
  \advance\@tempdima-\@tempdimb
  \adj@dim\@tempdima-\FB@wadj=\@tempdima
  \settowidth\@tempdimb{{\floatcapbesidesep}}%
  \advance\@tempdima-\@tempdimb
%    \end{macrocode}
%   This flag controls predefined width of caption.
%    \begin{macrocode}
  \FC@ifc@wd\@tempswatrue\@tempswafalse
  \if@tempswa
     \ifx\FCwidth\relax
        \flrow@error{You didn't define width of caption\MessageBreak
          for plain floating environment.}%
     \else
        \global\FBc@wd=\FCwidth
%    \end{macrocode}
%   This flag controls whether to fill rest space of float box with object
%   contents when caption width was predefined.
%    \begin{macrocode}
        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
     \fi
  \else
    \global\FBc@wd\@tempdima
  \fi
  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
%    \end{macrocode}
%   The |\flrow@setwd| could define the width for followed float.
%    \begin{macrocode}
    \flrow@setwd\FB@wd\@tempdima}%
  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
  \FCset@vpos}
%    \end{macrocode}
% \end{macro}
% \end{em}
%
% \begin{macro}{\float@makebox}
% Basically, we must arrange for `style commands' to be executed
% at certain points during the generation of the float.
% \LaTeX\ puts a float into a vertical box |\@currbox| which it takes
% off a list of empty boxes for insertions. When the |\float@makebox| macro
% is called, |\@currbox| contains the complete float, minus the caption^^A
% ---we'll see later that we use our own |\caption| command to
% put the caption into a |\vbox| of its own. This is the only way
% we can control the position of the caption by the float style,
% regardless of where the caption appears in the float's input text itself.
%
%   {\em [floatrow \ldots Skipped explanation of float package.]}
%
% \begin{em}
%   [floatrow]
%   Macro |\float@makebox| was redefined to fit more float object---caption
%   combinations. There was created the |\float@makebox| stuff.
%   First goes changed \package{float} |\float@makebox| which loads necessary
%   layout macro for above/below or beside captions.
%
%   The  |\float@makebox| stuff includes |\FB@foot| macro
%   to allow usage of |\floatfoot| (any foot non-caption material)
%   and |\footnotetext| stuff inside floating environment in minipage-like mode.
%
%    \begin{macrocode}
\newcommand\float@makebox[1]{%
  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
%    \end{macrocode}
%   The definitions of vertical fine tuning corrections.
%    \begin{macrocode}
\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
\newif\ifFBbuild\FBbuildtrue
%    \end{macrocode}
% \begin{macro}{\flrow@FB}
%   The macro of |\float@makebox| stuff which builds float box with
%   above/below caption.
%   Here added zeroing of list margins in the case of appearance of |\floatbox|
%   inside list environment.
%    \begin{macrocode}
\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
  \@parboxrestore\leftmargin\z@\rightmargin\z@
  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
  \FBleftmargin\flrow@FB@\FBrightmargin}%
  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
%    \@tempswafalse\FR@iffacing\@tempswatrue\relax
%    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
%    \if@tempswa
%        \FB@writeaux{\string\c@FBcnt\thepage
%          \string\def\string\FB@@boxmax{%
%          \ifOADJ\string\FBo@ht\the\FBo@ht
%          \string\FBf@ht\the\FBf@ht\fi
%          \ifCADJ\string\FBc@ht\the\FBc@ht\fi}}\fi
  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@FC}
%   Definition of float with beside caption.
%   Here added zeroing of list margins in the case of appearance of |\floatbox|
%   inside list environment.
%    \begin{macrocode}
\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
%    \@tempswafalse\FR@iffacing\@tempswatrue\relax
%    \if@tempswa
%        \FB@writeaux{\string\c@FBcnt\thepage
%          \string\def\string\FB@@boxmax{%
%          \ifOADJ\string\FBo@ht\the\FBo@ht
%          \string\FBf@ht\the\FBf@max\fi
%          \ifCADJ\string\FBc@ht\the\FBc@ht\fi}}\fi
  \nocapbeside\global\let\FCwidth\relax
  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
%    \end{macrocode}
% \end{macro}
%   These macros define box,
%   which is changed accordingly for creation of axis at the top, bottom,
%   or center of boxes.
%    \begin{macrocode}
\newcommand\FCc@box[1]{\def\@parboxto{}\FC@bbox#1\FC@ebox}
\newcommand\FC@bbox{\vbox\@parboxto\bgroup}
\newcommand\FC@ebox{\vskip\z@\egroup}
\newcommand\FCo@box[1]{\def\@parboxto{}\ifx\FBoheight\relax\FC@bbox\else
  \def\@parboxto{to\FBoheight}\FC@bbox\vsize\FBoheight\fi#1\FC@ebox}
%    \end{macrocode}
%   Definitions for fill material for vertical alignment and command with
%   width settings of boxes.
%    \begin{macrocode}
\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#1%
  \normalfont\normalcolor}
\newcommand\FB@vbox[3]{\ifx#2\relax\vbox\bgroup\else
  \vbox to#2\bgroup\vsize#2\fi\FBw@box#1#3\vskip\z@\egroup}
\newcommand\FB@vtop[3]{\ifx#2\relax\vtop\bgroup\else
  \vtop to#2\bgroup\vsize#2\fi\vskip\z@\FBw@box#1#3\egroup}
%    \end{macrocode}
%
% \begin{macro}{\flrow@FB@}
% \begin{macro}{\flrow@FC@}
%   |\float@makebox|-like macros for usage inside float row
%   (they don't create any left/right fill material).
%
%   First macro builds box with caption above/below.
%   At first we reset temporary definitions for current float.
%    \begin{macrocode}
\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
 \FB@frame{\begin@FBBOX
  \adj@dim\FBo@wd+\FBo@wadj=\hsize
  \@tempdima\ht\@currbox\advance\@tempdima\dp\@currbox
  \ifdim\@tempdima=\z@
     \def\@@FBskip{}\let\FBo@frame\@gobble
  \fi
%    \end{macrocode}
%   Here added zeroing of list margins in the case of appearance of |\floatbox|
%   inside list environment.
%    \begin{macrocode}
  \@parboxrestore\leftmargin\z@\rightmargin\z@
  \@@FBabove
  \FBifcaptop\@tempswatrue\@tempswafalse
  \if@tempswa
%    \end{macrocode}
%   If needed and exists---caption box above float object.
%   If key |footposition=caption| under caption loaded
%   foot material.
%    \begin{macrocode}
    \ifvoid\@floatcapt\else
      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
        \unvbox\@floatcapt
        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
      \@@FBskip\hrule\@height\z@\@depth\z@
    \fi
%    \end{macrocode}
%   Box of float object. If key |footposition=default|
%   foot material loaded in the bottom of float object box. In the case of
%   |footposition=foot| foot material loads after float object box.
%    \begin{macrocode}
    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
      {\FBafil\unvbox\@currbox\FBbfil
%    \end{macrocode}
%   The zero vertical skip must be here in any case.
%    \begin{macrocode}
      \vskip\z@
      \ifnum\FPOScnt=\z@
        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
      \vskip\z@
      \ifnum\FPOScnt=\tw@\vskip\z@
        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
%    \end{macrocode}
%   If needed and exists---caption box below float object.
%   If key |footposition=default| or |footposition=caption|
%   foot material loaded under caption contents.
%    \begin{macrocode}
  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\fi
    \FBo@frame{\FB@vbox\FBo@wd\FBoheight{\FBafil
       \unvbox\@currbox\FBbfil}}\par
    \ifvoid\@floatcapt\else
      \@@FBskip\hrule\@height\z@\@depth\z@
      \FB@vtop\FBc@wd\FBcheight{\hsize\columnwidth\unvbox\@floatcapt
        \ifnum\FPOScnt=\@ne\vtop{\FB@foot}%
    \fi\par
%    \end{macrocode}
%   The |\vss| glue appears here because the included box with foot material
%   sometimes creates a small overfull in float rows and crashes alignment of
%   |postcode=| material.
% \changes{v0.2b}{2007/10/28}{Caption box deleted if still exists.}
%    \begin{macrocode}
        \vfill\vskip\z@\vss
        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
        }\fi
  \fi\@@FBbelow\FB@zskip\end@FBBOX
  \global\setbox\@floatcapt\box\voidb@x}}
%    \end{macrocode}
%
%   Second internal macro for float row builds float box with beside caption.
%   At first we reset temporary definitions for current float.
%    \begin{macrocode}
\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
 \FB@frame{\begin@FBBOX
   \adj@dim\FBo@wd+\FBo@wadj=\hsize
   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
%    \end{macrocode}
%   Here added zeroing of list margins in the case of appearance of |\floatbox|
%   inside list environment.
%    \begin{macrocode}
   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
   \@@FBabove
    \hbox{\floatfacing*%
      {\ifvoid\@floatcapt\else
         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
         \floatcapbesidesep\fi
%    \end{macrocode}
%   |\FBf@raise| uses |\raisebox| correction to align top (bottom) of caption
%   text with top (bottom) of object frame.
% \changes{v0.2b}{2007/10/28}{Caption box deleted if still exists.}
%    \begin{macrocode}
       \FBf@raise{\FBo@frame{\FCo@box{\FBw@box\FBc@wd\unvbox\@currbox}}}}%
      {\FBf@raise{\FBo@frame{\FCo@box{\FBw@box\FBo@wd\unvbox\@currbox}}}%
       \ifvoid\@floatcapt\else
         \floatcapbesidesep\FCc@box{\FBw@box\FBc@wd
           \unvbox\@floatcapt\FB@foot}\fi
      }}\par\@@FBbelow\vskip\z@
    \end@FBBOX
    \global\setbox\@floatcapt\box\voidb@x}}
%    \end{macrocode}
%    Macro for foots and command for skip outside float row.
%    \begin{macrocode}
\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
\newcommand\FB@zskip{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{em}
% \end{macro}
%
% \begin{macro}{\float@end}
% [float] The internal macro |\end@float| appears here under the name of
% |\float@end|. The main thing which is changed is that we call
% |\float@makebox| to reconstruct the float according to the float style.
% We want to do exactly what the \LaTeX\ kernel does without copying
% actual kernel code if we can help it; therefore we finish off the
% float using the kernel |\@endfloatbox|, then replace \LaTeX's
% contents of the |\@currbox| with our own processed version, and then
% hand the thing off to \LaTeX{} again. Of course we have already done
% |\@endfloatbox|, which comes at the beginning of |\end@float|, ourselves;
% therefore we neutralize it before calling |\end@float|. This doesn't
% matter since we're in a group anyway (we wanted to keep the style
% commands local), so everything is undone at the end of the environment.
%
%   {\em [floatrow] Added flag |\ifFBbuild| for float box layout building.
%       This flag stops repeated usage of |\float@makebox| after |\floatbox|
%       in |\float@end|, |\float@endH| and
%       |\float@dblend| macros and, if \package{rotating} used,
%       in replaces usage of |\float@makebox| to \LaTeX's standard box |\@currbox|
%       |\rotfloat@makebox| and |\rotfloat@dblmakebox| commands.}
%    \begin{macrocode}
\newcommand\float@end{\ifFBbuild\@endfloatbox
    \global\setbox\@currbox\float@makebox\columnwidth
    \let\@endfloatbox\relax\fi
  \end@float}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\float@endH}
% The |\float@endH| command is, again, derived from \package{here}. It'll
% deal correctly with a non-floating float, inserting the proper amounts
% of white space above and below.
%
%   {\em [floatrow] Added flag |\ifFBbuild| for float box layout building.
%       This flag stops repeated usage of |\float@makebox| after |\floatbox|.}
%       There is also added flag for loading of list penalties around anchored float.
%    \begin{macrocode}
\newcommand\floatHpenalties{}
\newcommand\float@endH{\@endfloatbox\par
  \FR@iffloatHaslist
   {\floatHpenalties\relax
    \addpenalty\@beginparpenalty}\relax
  \vskip\intextsep
  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
  \box\@currbox\par
  \FR@iffloatHaslist
   {\addpenalty\@endparpenalty\@endpetrue}\relax
  \vskip\intextsep\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\float@dblend}
% The |\float@dblend| command finishes up double-column floats. This
% uses the same approach as |\float@end| above. It seems to work.
%
%   {\em [floatrow]
%       Added flag |\ifFBbuild| for float box layout building.
%       This flag stops repeated usage of |\float@makebox| after |\floatbox|.}
%    \begin{macrocode}
\newcommand\float@dblend{\ifFBbuild\@endfloatbox
    \global\setbox\@currbox\float@makebox\textwidth
    \let\@endfloatbox\relax\fi
  \end@dblfloat}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The \package{float} Package: Captions and Lists of Floats}
%
% Now for the caption routines.
% We use a box, |\@floatcapt|, to hold the caption while the float
% is assembled.
%    \begin{macrocode}
\newsavebox\@floatcapt
%    \end{macrocode}
%
% [floatrow \ldots Skipped explanation. Original definition of caption is stored in |\flrow@caption| above.
%  The storing mechanism of caption box was moved in |\@makecaption| stuff (|\flrow@makecaption| command).]
%
% \begin{macro}{\listof}
% The |\listof| command reads the desired list of floats from the
% appropriate auxiliary file. The file is then restarted.
% First of all, we check whether the float style that's supposed to be
% listed is actually defined. If not, we output a |\float@error|
%   {\em([floatrow] the |\float@error| changed to
%   |\flrow@error|)}.
%    \begin{macrocode}
\newcommand*{\listof}[2]{%
  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
%    \end{macrocode}
% All's well until now. We define the |\l@|\meta{float} command
% that \LaTeX\ needs for formatting the list, and then typeset the
% appropriate list header.
%   {\em [floatrow] The definition of list entry
%       layout moved in \cmd{\DeclareNewFloatType} command.}
% \changes{v0.2b}{2007/12/09}{The main definition of list entry layout moved in
%    \cmd{\DeclareNewFloatType} command, here it is provided.}
%    \begin{macrocode}
    \expandafter\providecommand\csname l@#1\endcsname
        {\@dottedtocline{1}{1.5em}{2.3em}}%
    \float@listhead{#2}%
%    \end{macrocode}
% Next we call |\@starttoc| with the correct file extension
% to do the actual work.
% If |\parskip| is non-zero, vertical space would be added between
% the individual list entries. To avoid this, we zero |\parskip|
% locally. This should be done after the |\float@listhead| above since
% |\parskip| also influences the spacing of headings, and the listings
% would look different from other chapters otherwise. (Suggested by
% Markus Kohm.)
%    \begin{macrocode}
    \begingroup\setlength{\parskip}{\z@}%
      \@starttoc{\@nameuse{ext@#1}}%
    \endgroup}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\float@listhead}
% This command generates the beginning of a list of floats.
% Currently the list appears at the chapter or the section level, depending
% on whether chapters are supported in the document class. According to
% a suggestion from Markus Kohm, this is now in a separate command so it
% can be overridden by other packages. We also use |\MakeUppercase| instead
% of |\uppercase|; when this piece of code was first written |\MakeUppercase|
% hadn't been invented yet, and for some reason this never got updated.
%    \begin{macrocode}
\providecommand*{\float@listhead}[1]{%
  \@ifundefined{chapter}{\def\@tempa{\section*}}%
    {\def\@tempa{\chapter*}}%
  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\float@addtolists}
% This command allows \LaTeX\ programmers to add something to all
% currently-defined lists of floats, such as some extra vertical
% space at the beginning of a new chapter in the main text
% (|\float@addtolists{\protect\addvspace{10pt}}|), without knowing
% exactly which lists of floats are currently being constructed.
% This command currently does \emph{not} operate on the |lot| and |lof|
% lists.
%    \begin{macrocode}
\newcommand\float@addtolists[1]{%
  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
%    \end{macrocode}
% \end{macro}
%
%   {\em [floatrow] Here goes \package{floatrow} message about
%       finishing of loading of \package{float} package's corrected code.}
%    \begin{macrocode}
\PackageInfo{floatrow}{Modified float package code loaded}
%    \end{macrocode}
%
% ^^A -------------------------------------------------------------------------------------------------------
%
% \subsection{Borrowed Code (With Original Comment)
%     from The \package{rotfloat} Package}
%
%   {\em [floatrow] If there is the \package{rotating} package in \LaTeX's
%       installation the \package{rotfloat} package's stuff will be loaded.}
%    \begin{macrocode}
\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
\if@tempswa
%    \end{macrocode}
%
%   {\em [floatrow]
%       The main redefinitions for \package{rotfloat} (|\flrow@restyle| stuff) purposes
%       were made above (in \package{float} part).\\{}[\dots]
%
%       Code contents of |\rotfloat@float| and |\rotfloat@dblfloat| moved up
%       inside |\flrow@restyle| macro.}
%
% \begin{macro}{\@float@HH}
% We have to extend |\@float@HH|\emph{[\dots]}.
% {\em [floatrow] Since |\rotfloat@endH| was originally defined
% as |\float@endH| in current macro used |\float@endH|}
%    \begin{macrocode}
  \let\rotfloat@HH\@float@HH
  \def\@float@HH#1{%
    \expandafter\let\csname endsideways#1\endcsname\float@endH
%   \expandafter\let\csname endsideways#1*\endcsname\rotfloat@dblendH
    \let\end@float\relax
    \rotfloat@HH{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\rotfloat@endH}
% This one hasn't to be changed. {\em [floatrow] Commented.}
%    \begin{macrocode}
%  \newcommand\rotfloat@endH{\float@endH}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\rotfloat@makebox}
% \begin{macro}{\rotdblfloat@makebox}
% |\float@makebox| has a parameter here which will be set to |\columnwidth|
% or |\textwidth|. (In the \package{float} package $v1.2$ the |\columnwidth| was
% hard wired into |\float@makebox|.) So we have to pass this parameter
% through the original version of |\float@makebox| which we have saved to
% |\rotfloat@@makebox| within |\rotfloat@float|.)
%    \begin{macrocode}
  \newcommand*\rotfloat@makebox[1]{%
    \vbox{\def\@float##1[##2]{}\let\end@float\relax
      \@rotfloat{}[]%
      \ifFBbuild\rotfloat@@makebox{#1}\else\box\@currbox\fi
      \end@rotfloat}}
  \newcommand*\rotdblfloat@makebox[1]{%
    \vbox{\def\@float##1[##2]{}\let\end@dblfloat\relax
      \@rotdblfloat{}[]%
      \ifFBbuild\rotfloat@@makebox{#1}\else\box\@currbox\fi
      \end@rotdblfloat}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% That's all folks\dots {\em  [floatrow] of borrowed code of
%   \package{rotfloat} package, v1.2. And here goes message about loading of
%   \package{rotfloat} package's code.}
%    \begin{macrocode}
\PackageInfo{floatrow}{Modified rotfloat package code loaded}
\fi
%    \end{macrocode}
%
% \end{sl}
%
% \subsection{Stuff to Load Footnotes and Float Foot Material}
%
% \begin{macro}{\FR@everyfloat}
% These token macros add redefinition of float stuff to arrange usage
% of footnotes inside plain float contents. The footnote stuff works like
% in minipage,
%    \begin{macrocode}
\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
  \floatobjectset\floatfont}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FR@ifFOOT}
% Flag for placing foot material.
%    \begin{macrocode}
\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FB@putfnotes}
% The excerpt from minipage macro (\LaTeX's core stuff) to put footnotes.
%    \begin{macrocode}
\newcommand\FB@putfnotes{%
  \ifvoid\@mpfootins\else\FR@ifFOOT
%    \end{macrocode}
% A special skip (|\skip\@mpfootins|) dimension for footnotes in
% float box changed to |\floatfootskip|.
%    \begin{macrocode}
    {\vskip\floatfootskip\normalcolor\FBfootnoterule
    \unvbox\@mpfootins\@@par}\relax
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FB@putfoots}
% Macro analogous to previous one, but for loading of |\floatfoot| stuff.
% To load float foot material there is defined |\newinsert| for its stuff.
%    \begin{macrocode}
\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
\newcommand\FB@putfoots{%
  \ifvoid\flrow@foot\else\FR@ifFOOT
%    \end{macrocode}
% The |\footnoterule| is not used for float foot.
%    \begin{macrocode}
    {\vskip\floatfootskip\normalcolor
    \unvbox\flrow@foot\@@par}\relax
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \subsection{New Definitions for Footnotes}
%
% \begin{macro}{\mpfootnotemark}
% There is the definition of |\footnotemark| which creates the same mark as
% |\footnote| inside |minipage| environment. That could be useful in
% multiple footnote marks in tables. Since the same definition was loaded
% in \package{footmisc} version 4.10, dated 2003/01/20 and later, these macros are defined at the
% beginning of document in the case only if \package{footmisc} was not loaded.
%    \begin{macrocode}
\AtBeginDocument{\providecommand\mpfootnotemark{\@ifnextchar[%]
   \@xmpfootnotemark{\stepcounter\@mpfn
   \protected@xdef\@thefnmark{\thempfn}\@footnotemark}}%
 \@ifundefined{@xmpfootnotemark}
   {\def\@xmpfootnotemark[#1]{\begingroup\c@mpfootnote#1\relax
    \unrestored@protected@xdef\@thefnmark{\thempfn}\endgroup
    \@footnotemark}}{}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Macro for Legends, Explications, etc.}
%
% \begin{macro}{\floatfoot}
% This command made for the same reasons as \package{ccaption}'s |\legend|
% macro and follows its style. It uses |\caption| mechanism.
%    \begin{macrocode}
\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
\newcommand\floatfoot{\@ifstar
    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
\newcommand\floatfoot@[1]{%
  \global\setbox\flrow@foot\vbox{%
  \floatfoot@box{#1}}}%
%    \end{macrocode}
%
% \begin{macro}{\floatfoot@box}
% For the case of usage outside of |\floatbox|  and floating environments. E.g.
% inside |longtable| environment.
%    \begin{macrocode}
\newcommand\floatfoot@box[1]{%
  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
%    \end{macrocode}
% The |\if@@FS| flag stored for |wrap...| environments.
%    \begin{macrocode}
    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
    \@parboxrestore\reset@font\color@begingroup
%    \end{macrocode}
% Apply current float settings.
%    \begin{macrocode}
  \caption@setoptions{\@captype}%
%    \end{macrocode}
% Apply floatfoot settings.
%    \begin{macrocode}
  \caption@setoptions{floatfoot}%
%    \end{macrocode}
% No captionlabel.
%    \begin{macrocode}
     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
  \color@endgroup}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Defining New Float Box Commands}
%
% \begin{macro}{\newfloatcommand}
% \begin{macro}{\renewfloatcommand}
% The following macros allow to define user commands-abbreviations of |\floatbox| command:
% they have common unchanged preamble and setting for default width of
% float box.
% The definition of command for new float command.
%    \begin{macrocode}%
\newcommand\newfloatcommand[2]{%
  \@ifundefined{#1}{}%
    {\flrow@error{\string#1 already defined}}%
  \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
\newcommand\renewfloatcommand[2]{%
  \@ifundefined{#1}{}%
    {\PackageInfo{floatrow}{Redefining \string#1}}%
  \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
\@ifdefinable\FB@nc{}\@ifdefinable\FB@@nc{}
\def\FB@nc#1#2[#3]{%
  \@ifnextchar[{\FB@@nc{#1}{#2}[#3]}{\FB@@nc{#1}{#2}[#3][]}}
%    \end{macrocode}
% This group ends at the end of  |\@@@floatbox| macro.
%    \begin{macrocode}%
\def\FB@@nc#1#2[#3][#4]{%
  \@namedef{#1}{\begingroup
%    \end{macrocode}
% The option with temporary settings for float
%   box saved to temporary command.
%    \begin{macrocode}%
  \def\FB@tmpset{#3}\def\@captype{#2}%
  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Predefined Abbreviations for Figures and Tables}
%
% \begin{macro}{\ffigbox}
% \begin{macro}{\ttabbox}
% \begin{macro}{\fcapside}
% The abbreviations for object---caption combination in float
% figures and tables and also for figures with beside captions
% (there is not given \emph{abbreviation} command for beside
% caption in tables---I can't imagine such book design).
%    \begin{macrocode}
\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
\newfloatcommand{fcapside}{figure}[\capbeside][]
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Building Float Box}
%
% \FRorisubsubsection{Dimensions Used in Float Box Building}
%
% \begin{macro}{\FB@wd}
% \begin{macro}{\FBo@wd}
% \begin{macro}{\FBc@wd}
% These internal dimensions used for defining widths for
% float boxes entirely and for object and caption separately
% (they could differ in special style layouts). The |\newdimen| register is
% necessary because of these parameters can catch values from skip parameters
% during calculations,
% also the skip values of widths could ``conflict'' with skips-separators between floats.
%    \begin{macrocode}
\@ifdefinable\FB@wd {\newdimen\FB@wd}
\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FBo@ht}
% \begin{macro}{\FBc@ht}
% \begin{macro}{\FBf@ht}
% The internal dimensions for heights of object and caption.
% Third dimension defines height of footnote and float foot stuff.
%    \begin{macrocode}
\newlength\FBo@ht
\newlength\FBc@ht
\newlength\FBf@ht
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FBo@max}
% \begin{macro}{\FBc@max}
% \begin{macro}{\FBf@max}
% These three internal dimensions determine maximum object, caption and
% foot boxes in float row environments for special styles.
%    \begin{macrocode}
\newlength\FBo@max
\newlength\FBc@max
\newlength\FBf@max
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Commands for Counting Width and Height}
%
% \begin{macro}{\FR@loc@fcaddcnt}
% \begin{macro}{\FR@loc@}
% \begin{macro}{\FBtmp@cap}
% Redefinition of \cmd{\addtocounter} macro---localization of counter change.
%    \begin{macrocode}
\newcommand\FR@loc@addcnt[2]{%
  \@ifundefined{c@#1}{\@nocounterr{#1}}%
    {\advance\csname c@#1\endcsname #2\relax}}
%    \end{macrocode}
% The command for localization of |\refstepcounter|, |\stepcounter| and
% |\refsteponlycounter|.
%    \begin{macrocode}
\newcommand\FR@loc@refcnt[1]{%
  \@ifundefined{c@#1}{\@nocounterr{#1}}%
   {\advance\csname c@#1\endcsname1\relax}}
%    \end{macrocode}
% Gobbling of caption label and localization of counter change.
%    \begin{macrocode}
\newcommand\FR@loc@{%
%  \flrow@gobble
  \let\FR@ifunloc\@gobble
  \let\label\@gobble
  \let\refstepcounter\FR@loc@refcnt
  \let\stepcounter\FR@loc@refcnt
  \let\refsteponlycounter\FR@loc@refcnt
  \let\FR@ifcountH\@secondoftwo
%    \end{macrocode}
% The |\cl@@ckpt| is macro which ``globalizes'' all counters. It is used by
% |tabularx| environment. Here it is emptied during local creation of
% caption box. Also here is gobbled macro from \package{subfig} package.
% \changes{v0.2b}{2008/01/06}{Added redefinitions of \texttt{..addcontentsline}
%    commands for (subcaption) compatibility with caption 3.1. (AS)}
%    \begin{macrocode}
  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
  \let\caption@kernel@addcontentsline\@gobbletwo
  \let\caption@addcontentsline\@gobbletwo
  \def\sf@updatecaptionlist##1##2##3##4{}}
%    \end{macrocode}
% The macro for temporary redefinition for counting of caption width.
% \changes{v0.1p}{2007/06/24}{Added \cmd{\relax} for compatibility with
%    caption 3.1.}
% \changes{v0.2b}{2007/12/10}{Contents of \cmd{\FBtmp@cap} became \cmd{\captionlabel} for (sub)caption labels.}
%    \begin{macrocode}
\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
  \global\@tempdimb\wd\@tempboxa}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\captionlabel}
% \begin{macro}{\subcaptionlabel}
% Here goes support for caption and subcaption labels. (The |\captionlabel| command is
% used as internal macro for calculating width of caption.)
% This macro uses internal \package{caption} commands |\caption@@@make| and |\caption@lfmt|.
% The temporary macro |\FR@tmp| defined as |\@captype| or |sub\@captype|, depending to
% ``depth'' of float box.
% \changes{v0.2b}{2007/12/10}{The \cmd{\captionlabel} created for (sub)caption label,
%   with suggestions A.Sommerfeldt.}
%    \begin{macrocode}
\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
%    \end{macrocode}
% The |\subcaptionlabel| command
%    \begin{macrocode}
\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FBget@box}
% This macro calculates widths and heights of caption and
% object boxes accordingly to \meta{width} and \meta{height}
% arguments of |\floatbox| macro.
% \label{code:FBwidth}
%    \begin{macrocode}
\newcommand\FBget@box[3]{%
%    \end{macrocode}
% At first macro defines |\hsize| (which could be used in width definition),
% i.e. change it for fit contents in boxes.
% The |\FBget@box| macro uses the |\FBB@wd| command. In the case of
% |\hsize=0pt| the |\FBB@wd| still defined as |\relax|. It will be
% defined later.
%
% The |\hsize=0pt| can be defined in mandatory argument of |wrap...|
% environment in the case of creation space equal to float contents.
% If |\floatbox| macro has not any \oarg{width} argument, the |\hsize|
% of wrapped figure equals to beside text (i.e. current text is `divided'
% into two columns).
%    \begin{macrocode}
  \FBiffloatrow\relax
    {\ifx\FBB@wd\relax
      \ifdim\hsize=\z@
%    \end{macrocode}
% The |\floatbox| stuff doesn't use special |\caption| definition inside
% |wrap...| environment---|\caption| restores its behavior.
%    \begin{macrocode}
        \@ifundefined{wf@@caption}{}{\let\caption\wf@@caption}%
        \hsize.5\columnwidth\advance\hsize-.5\columnsep
      \else
        \edef\FBB@wd{\the\hsize}%
      \fi
    \else
      \hsize\FBB@wd
    \fi}%
  \adj@dim\hsize-\FB@wadj=\@tempdima
  \FBifcapbeside
    {\FCget@@wd{#1}{#3}}%
    {\nofilFCOhsize
    \FBiffloatrow\relax
      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
      \advance\@tempdima-\@tempdimb}}%
  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
%    \end{macrocode}
% This line is doubled below but it is necessary here in case
% you use |\hsize| in any width argument in current float contents.
%    \begin{macrocode}
  \FBiffloatrow\relax{\hsize\FBo@wd}%
%    \end{macrocode}
% |\FB@wd| changed only for beside captions.
%    \begin{macrocode}
  \FBifcapbeside{\hsize\FB@wd}\relax
  \linewidth\hsize
%    \end{macrocode}
% If there are defined the width and/or height arguments in |\floatbox|
% macro (re)calculates width of object and caption.
%    \begin{macrocode}
  \def\reserved@a{#1}\ifx\reserved@a\empty
    \else\FBget@@wd{#1}{#3}\fi
  \hsize\FBo@wd\linewidth\hsize
  \FBifcapbeside
    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
    {\FBc@wd\FB@wd}%
%    \end{macrocode}
% From this point macro calculates heights of caption and object if necessary.
%    \begin{macrocode}
  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
    \FBifcaptop
      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
      {\columnwidth\FBc@wd}%
    #3}%
  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
  \setbox\tw@\vbox{\null\par\FB@foot\par}%
  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
  \FBiffloatrow
    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
    \ifCADJ
      \FBifcaptop
        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
        {\ifnum\FPOScnt=\tw@
          \ifdim\FBf@ht>\FBf@max
            \global\advance\FBc@ht\FBf@ht
          \else
            \global\advance\FBc@ht\FBf@max
          \fi
        \else
          \global\advance\FBc@ht\FBf@ht
        \fi}%
      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
    \fi}\relax
  \def\reserved@a{#2}\ifx\reserved@a\empty
    \FBiffloatrow{\ifOADJ
      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
      \FBifcaptop
        {\ifnum\FPOScnt=\z@
          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
        \fi}\relax
      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
    \fi}\relax
  \else
%    \end{macrocode}
% \changes{v0.2b}{2007/12/09}{The argument with floatbox contents added.}
%    \begin{macrocode}
     \FBget@@ht{#2}{#3}%
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FCget@@wd}
% Counts the width of caption if caption was placed beside float object.
%    \begin{macrocode}
\newcommand\FCget@@wd[2]{\flrow@FClist
  \FBiffloatrow\relax
    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
  \FC@ifo@fil{\FB@wd\@tempdima}\relax
  \FC@ifc@wd\@tempswatrue\@tempswafalse
  \if@tempswa
%    \end{macrocode}
% If |\FCwidth| was not defined (|\relax|), macro calculates
% natural caption width (in this case |\caption| restores plain \LaTeX's
% behavior). The contents of float thrown out in |\box\@ne|.
%    \begin{macrocode}
    \ifx\FCwidth\relax
      \setbox\@ne\vbox{\FR@loc@
        \let\caption\flrow@caption
        \let\@caption\FBtmp@cap
         #2}%
      \FBc@wd=\@tempdimb
    \else
      \FBc@wd=\FCwidth
%    \end{macrocode}
% The |\FCwidth| is local dimension.
%    \begin{macrocode}
    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
  \else
    \FBc@wd\@tempdima
  \fi
  \@tempdima.5\@tempdima}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@gobble@}
% \begin{macro}{\flrow@gobble}
%    \begin{macrocode}
\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
\newcommand\flrow@gobble{%
    \let\caption\flrow@gobble@
    \let\floatfoot\flrow@gobble@
    \let\footnote\flrow@gobble@
    \let\footnotetext\flrow@gobble@
    }
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\FBget@@wd}
% Counts the width of object if the width optional argument not empty.
%
% There is na\u\i{}ve check of existence of |\FBwidth| and/or
% |\FBheight| commands in optional arguments. I hope it could work
% unless you are manipulating with metre dimensions (I hope you're not
% preparing a metre book!) or set more than
% |5\FBwidth| (|5\FBheight|) in \meta{width} (\meta{height}) option.
%    \begin{macrocode}
\newcommand\FBget@@wd[2]{\@tempswafalse
  \begingroup
    \@tempdima-3000pt\let\FBwidth\@tempdima
    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
  \endgroup
  \if@tempswa
    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
    \setlength\FBo@wd{#1}%
    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
%    \end{macrocode}
% The width |\FB@wd| localized.
%    \begin{macrocode}
    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
%    \end{macrocode}
% Throw out floatfoot and float footnote contents (if exist).
%    \begin{macrocode}
    \setbox\flrow@foot\box\voidb@x
    \setbox\@mpfootins\box\voidb@x
  \else
    \setlength\FB@wd{#1}%
%    \end{macrocode}
% The width |\FB@wd| localized.
%    \begin{macrocode}
    \adj@dim\FB@wd-\FB@wadj=\FB@wd
    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
    \let\FBwidth\FBo@wd
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FBget@@ht}
% Counts the height of object if the height optional argument not empty.
% \changes{v0.2b}{2007/12/09}{The argument with floatbox contents added. Corrected bug
%   with height calculating.}
%    \begin{macrocode}
\newcommand\FBget@@ht[2]{\@tempswafalse
  \begingroup
    \@tempdimb-3000pt\let\FBheight\@tempdimb
    \setlength\dimen@{#1}\ifdim\dimen@<\z@
      \global\@tempswatrue\fi
  \endgroup
  \if@tempswa
    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
  \else
    \setlength\FBo@ht{#1}%
    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
      \vtop{\@@FBbelow}}%
    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
    \FBifcapbeside\relax\FBget@@@ht
  \fi
  \FBiffloatrow{\ifOADJ
    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
%    \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
%    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
  \fi}\relax
  \def\FBoheight{\FBo@ht}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FBget@@@ht}
% If there was set the height of float box this macro
% calculates height of additional vertical material (except of space
% created by frames) in object---caption box plus height of
% caption box. The result is used to get correct height of object box.
%    \begin{macrocode}
\newcommand\FBget@@@ht{%
%    \end{macrocode}
% The |\box\z@| settings moved up in |\FBget@@ht| macro.
%    \begin{macrocode}
%    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
    \ifdim\FBc@ht>\FBc@max
      \global\advance\FBo@ht-\FBc@ht
    \else
      \global\advance\FBo@ht-\FBc@max
    \fi
    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
      \ifdim\FBf@ht>\FBf@max
        \global\advance\FBo@ht-\FBf@ht
      \else
        \global\advance\FBo@ht-\FBf@max
      \fi
    \fi}\relax
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Storing Heights for Current Float Box}
%
% \begin{macro}{\FB@writeaux}
% \begin{macro}{\FB@readaux}
% Excerpt from \LaTeX's |\protected@write|. This command is used for
% printing in \texttt{.aux}-file the necessary settings which will work
% in next \LaTeX{} run.
%    \begin{macrocode}
\newcommand\FB@writeaux[1]{%
  \begingroup
    \let\thepage\relax\let\protect\@unexpandable@protect
    \edef\reserved@a{\write\@auxout{\string\gdef
    \expandafter\string\csname @@FBset@\romannumeral
    \the\c@FBl@b\endcsname{#1}}}\reserved@a
  \endgroup
  \addtocounter{FBl@b}{1}}
\newcommand\FB@readaux[1]{%
  \@ifundefined{@@FBset@\romannumeral\the\c@FBl@b}%
    {#1}{\@nameuse{@@FBset@\romannumeral\the\c@FBl@b}}}
%    \end{macrocode}
%
% \begin{macro}{\c@FBl@b}
% This counter helps to define unique
% command for each float row environment or object---caption
% beside box if necessary.
%    \begin{macrocode}
\newcounter{FBl@b}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Building Caption and Object Boxes}\label{putFB}
%
% \begin{macro}{\FR@ifFCBOX}
% \begin{macro}{\FBs@raise}
% \begin{macro}{\FBf@raise}
% \begin{macro}{\FCset@vpos}
% The |\FR@ifFCBOX| flag if true aligns top or bottom of object's
% frame with top or bottom of beside caption if fancy layout used.
%    \begin{macrocode}
\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
\newcommand\FBs@raise{\raisebox{-\totalheight}}
\newcommand\FBf@raise{}
%    \end{macrocode}
% Setting of vertical position for beside caption and object.
% Here is used \LaTeX's |\@parboxto| command, because of here is used
% analogous mechanism of box building as in |\parbox| command and
% |minipage| environment.
%    \begin{macrocode}
\newcommand\FCset@vpos{\@FC@vpos
  \ifcase\count@
    \gdef\FC@bbox{$\vcenter\@parboxto\bgroup\vskip\z@}%
    \gdef\FC@ebox{\vskip\z@\egroup$}%
    \gdef\FBf@raise{}%
    \gdef\FBs@raise{\raisebox{-.5\totalheight}}%
  \or\gdef\FC@bbox{\vtop\@parboxto\bgroup\vskip\z@}%
    \gdef\FC@ebox{\vskip\z@\egroup}%
    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
     {\gdef\FBf@raise{}}%
    \gdef\FBs@raise{\raisebox{-\totalheight}}%
  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
     {\gdef\FBf@raise{}}%
    \gdef\FBs@raise{}\fi}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\adj@dim}
% Dimension defines locally box widths and heights in special styles.
% The argument |#4| can be set in form like |{\global\hsize}| to
% globalize result.
%    \begin{macrocode}
\@ifdefinable\adj@dim{}
\def\adj@dim#1#2#3=#4{\dimen@\z@#3\ifdim\dimen@=\z@#4#1\else
  \adj@@dim#1#2#3{#4}\fi}
\newcommand\adj@@dim[4]{\@tempdima#1\advance\@tempdima#2\dimen@
  #4=\@tempdima}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Caption---Object Box Building Macro}
%
% \begin{macro}{\floatbox}
% The start of main macro of object---caption box building.
%
% The preparation of optional arguments. The option with settings for float
% box saved to temporary command. For possible including |\floatbox| in |\floatbox|
% the |\floatbox@depth| counter was added. We need to do all settings and calculations
% in group.
%    \begin{macrocode}
\newcommand\floatbox[2][]{\begingroup
  \def\FB@tmpset{#1}\def\@captype{#2}%
  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
\def\@floatbox[#1]{%
  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
\def\@@floatbox[#1][#2]{%
  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
%    \end{macrocode}
%
% \begin{macro}{\@@@floatbox}
% Building object---caption box.
%    \begin{macrocode}
\@ifdefinable\@@@floatbox{}
\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
  \@FB@vpos{#3}%
%    \end{macrocode}
% If object---caption stays alone here go
% special style settings for current float type.
% Then go the settings for caption layout.
%    \begin{macrocode}
  \if@@FS\else\FR@redefs
    \ifcase\floatbox@depth\or
      \flrow@setlist{{\@captype}}\or
%    \end{macrocode}
% The |\caption| stuff catches |sub\@captype| settings by itself. In this case
% in the second label were loaded only float layout settings.
% \changes{v0.2b}{2007/12/10}{The redundant(?) caption settings for subtypes removed.}
%    \begin{macrocode}
      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
    \fi
    \FRifFBOX\@@setframe\relax\@@FStrue
  \fi
%    \end{macrocode}
% Put temporary command with option settings
%   for float box.
%    \begin{macrocode}
  \FB@tmpset
%    \end{macrocode}
% Then load settings for beside captions, in the case we use this
% layout---the beside caption could use a bit different layout.
%    \begin{macrocode}
  \FBifcapbeside\flrow@FClist\relax
%    \end{macrocode}
% Restoring standard justified paragraph settings${{}+{}}$|\parindent\z@|.
%    \begin{macrocode}
  \@parboxrestore\leftmargin\z@\rightmargin\z@
  \floatobjectset\floatfont
%    \end{macrocode}
% Here is called macro which calculates widths and heights of caption
% and object.
%    \begin{macrocode}
  \FBget@box{#1}{#2}{#4#5}%
%    \end{macrocode}
% In this point defined macros for building of beside object---caption box.
% \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} added as
%    a)~\cmd{\FR@floatbox} argument (outside float row).}
%    \begin{macrocode}
  \FBifcapbeside\FCset@vpos\relax
  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
%    \end{macrocode}
% The restoring of full |\hsize| of current float box.
% For the case of counting of float width inside |wrap...| environment
% here defined the |\FBB@wd| macro. Inside the |\FBsetbox@obj| macro it |\relax|ed
% again to get brand-new settings for possible inner |\floatbox|es.
% \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} added as
%   b)~\cmd{\FBsetbox@obj} argument (in float row).}
%    \begin{macrocode}
   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
    #4#5}\FBbuildtrue
    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
    \global\FBbuildfalse
    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
%    \global\FB@wd\hsize
   }\advance\floatbox@depth\m@ne
%    \end{macrocode}
% End of the group.
%    \begin{macrocode}
  \endgroup\ignorespaces}
%    \end{macrocode}
%
% Code for recounting parameters and building boxes inside |floatrow|
% environment.
%    \begin{macrocode}
\newcommand\FR@floatbox[1]{\@tempswafalse
%    \end{macrocode}
% For beside floats in special layouts of float (e.g. |boxed|
% or |ruled|) there is necessary the definition of maximum heights
% of captions and objects to align boxes or rules. Here goes command
% which loads the result of max dimensions from previous run.
%    \begin{macrocode}
    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
%    \end{macrocode}
% Here we create boxes of float contents.
%    \begin{macrocode}
    \FBsetbox@obj{#1}\begin@FBBOX
      \FBifcapbeside\flrow@FC@\flrow@FB@
    \end@FBBOX
%    \end{macrocode}
% The each float box in float row reduces special counter |FRobj|
% by~1.
%    \begin{macrocode}
    \addtocounter{FRobj}\m@ne
    \@tempswafalse\FR@iffacing\@tempswatrue\relax
    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
%    \end{macrocode}
% At end of row it equals zero.
%    \begin{macrocode}
    \advance\Xhsize-\FB@wd
    \FBifcapbeside
      {\advance\Xhsize-\FBc@wd
       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
       \settowidth\@tempdimb{\floatcapbesidesep}%
       \advance\Xhsize-\@tempdimb
       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
    \ifnum\c@FRobj=\z@
%    \end{macrocode}
% Here goes macro which prints in \file{.aux}-file the final
% countdown of maximum caption and object heights if necessary.
% At last goes flag for float box layout building.
%    \begin{macrocode}
      \if@tempswa
        \FB@writeaux{\string\c@FBcnt\thepage
          \string\def\string\FB@@boxmax{%
          \ifOADJ\string\FBo@ht\the\FBo@max
          \string\FBf@ht\the\FBf@max\fi
          \ifCADJ\string\FBc@ht\the\FBc@max\fi}}\fi
      \global\FBbuildfalse
    \else
%    \end{macrocode}
% Between floats in float row macro puts separation material.
%    \begin{macrocode}
%      \FBifcapbeside
%        {\advance\Xhsize-\FBc@wd
%         \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
%         \settowidth\@tempdimb{\floatcapbesidesep}%
%         \advance\Xhsize-\@tempdimb
%         \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
      \floatrowsep
      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
    \fi}
%    \end{macrocode}
% The macro for storing float object in box in the same way as
% in plain environment. There is added code for possible usage of
% \package{color} package and color boxes.
%    \begin{macrocode}
\newcommand\FBsetbox@obj[1]{%
  \setbox\float@box\color@vbox\normalcolor
  \FBifcaptop
     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
      \columnwidth\FBc@wd}%
  #1\FBbfil\egroup\color@endbox
  \let\@currbox\float@box}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Building Float Row}
%
% \FRorisubsubsection{The Flag, Counter and Dimension for Float Row Environment}
%
% \begin{macro}{\FBiffloatrow}
% Switch used in |\floatbox| to define whether it placed inside of
% environment of beside floats (float row) or not.
%    \begin{macrocode}
\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@FRobj}
% Counter of objects in a row, which helps to put correct spaces between
% float boxes and also to define the rest width (|\Xhsize|) for boxes.
%    \begin{macrocode}
\newcounter{FRobj}
\newcounter{FRsobj}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Xhsize}
% \begin{macro}{\Yhsize}
% \begin{macro}{\Zhsize}
% This dimension is used for defining of the rest width which float box
% can occupy in current float row environment.
%    \begin{macrocode}
\newlength\Xhsize
%    \end{macrocode}
% Next dimensions are used for calculation of the common height of photos
% in a row.
%    \begin{macrocode}
\newlength\sXhsize
\newlength\Zhsize
\newlength\sZhsize
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Float Row Environment}
%
% \begin{environment}{floatrow}
% \label{floatrow}
% Environment for placing beside floats (of one type).
% First goes counter of floats in row, then the settings for float layout.
% \changes{v0.2a}{2007/08/24}{Redefined boxes for building of above and below
%    material}
%    \begin{macrocode}
\newcommand\flrow@to{to\hsize}
\newcommand\flrow@boxset[1]{#1}
\newcommand\flrow@setrowhbox{%
\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
}
\newcommand\flrow@left{}\newcommand\flrow@right{}
\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
    \bgroup\flrow@left}
\newcommand\flrow@hbox@egroup{\flrow@right
    \egroup}
\newbox\flrow@rowbox
\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
%    \end{macrocode}
% If depth of row more than~0 the subfloatrow settings are switched.
% \changes{v0.3b}{2009/08/02}{Fixed bug of \cs{thisfloatsetup} usage}
%    \begin{macrocode}
  \ifcase\floatbox@depth
    \flrow@setlist*{{floatrow}{\@captype row}}%
  \or
%    \end{macrocode}
% The |\caption| stuff catches |sub\@captype| settings by itself. The other reason to skip
% caption settings here is possible usage of upper level |\caption| inside of |\RawCaption|
% command which need ``parent'' settings. In this case
% in the second label were loaded only float layout settings.
%    \begin{macrocode}
    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
  \fi%
%    \end{macrocode}
% Settings for facing/non-facing layout, common/non-common heights of captions and objects.
%    \begin{macrocode}
  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
  \if@tempswa\FB@readaux{\relax}\fi
  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
%    \end{macrocode}
% Settings analyzed.
% The building of box of row of floats started.
%    \begin{macrocode}
  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
  \hbox\flrow@to\bgroup%outer h box
  \FRleftmargin
  \flrow@boxset{\hsize\FBB@wd
     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
  \setbox\flrow@rowbox\vbox\bgroup%v box
%    \end{macrocode}
% Material above.
%    \begin{macrocode}
        \@@FRabove
%    \end{macrocode}
% Row |\hbox|.
%    \begin{macrocode}
    \flrow@setrowhbox
    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
%    \end{macrocode}
% Here starts trick with redefinition of |\hsize| inside float row.
% The |\hsize| will be equal to one ``column'' (the number of
% ``columns''-floats gives optional argument---the default is \texttt{2}).
%    \begin{macrocode}
      \Xhsize\hsize\count@#1\advance\count@\m@ne
%      \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\Xhsize-\@tempdima
      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
      \@tempdimb\Xhsize
      \FR@iftwolevel
        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
%    \end{macrocode}
% Here goes recalculated |\hsize|.
%    \begin{macrocode}
      \hsize\@tempdimb\ignorespaces}
%    \end{macrocode}
% Macro for float row end.
%    \begin{macrocode}
\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
      \flrow@hbox@egroup%h box
%    \end{macrocode}
% Material below.
%    \begin{macrocode}
    \@@FRbelow
    \egroup%v box
    \FR@frame{\box\flrow@rowbox}%
    \egroup%frame set
    \FRrightmargin\egroup%outer h box
    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
%    \end{macrocode}
% The building of box of row of floats finished.
% Values of common heights and skips zeroed, default box settings restored.
%    \begin{macrocode}
  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{subfloatrow}\label{subfloatrow}
% Environment for placing beside subfloats. It is simpler than
% |floatrow|. First go counter of floats (here it is local)
% in row, then the settings for float layout.
% \changes{v0.2a}{2007/08/24}{The \cmd{\subfloatrow} moved from \package{fr-subfig}
%   in main package body}
%    \begin{macrocode}
\newenvironment{subfloatrow}{\capsubrowsettings
    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
%    \end{macrocode}
% \end{environment}
%
% The definition of subfloat separator.
%    \begin{macrocode}
\newcommand\subfloatrowsep{\hskip\columnsep}
%    \end{macrocode}
%
%    \begin{macrocode}
\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
\newcommand\CommonHeightRow{\@ifstar
    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand\DefaultCommonHeight{25pt}
\newcommand\CommonHeight{\DefaultCommonHeight}
\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
    \FR@calc@CommonHeight#2}
\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
%    \end{macrocode}
% The width of row, occupied by graphics divided in |1pt| segments. (To get |2pt|
% segment the |\count@| value must be divided by |131072|;
% to get |1pt| segment the |\count@| value must be divided by |65536|;
% to get |.5pt| segment the |\count@| value must be divided by |32768|.)
%    \begin{macrocode}
\newcommand\FR@calc@CommonHeight{%
    \@tempdima\@tempb\advance\@tempdima-\@tempa
    \count@\@tempdima\relax\divide\count@16384\relax
%    \end{macrocode}
% The same number of segments will be for the necessary width of graphics.
% The value of segment loaded in |\FR@Zunitlength| dimension.
%    \begin{macrocode}
    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
    \@tempdima\CommonHeight\relax
%    \end{macrocode}
% Now divide |\CommonHeight| in |1pt| segments.
%    \begin{macrocode}
    \count@\@tempdima\relax\divide\count@16384\relax
    \@tempdima\count@\FR@Zunitlength\relax
%    \end{macrocode}
% And then these segments get value of |\FR@Zunitlength|.
%    \begin{macrocode}
    \edef\CommonHeight{\the\@tempdima}}
%    \end{macrocode}
%
% \subsection{Aligning Float Boxes}
%
% \begin{macro}{\CenterFloatBoxes}
% \begin{macro}{\TopFloatBoxes}
% \begin{macro}{\BottomFloatBoxes}
% \begin{macro}{\PlainFloatBoxes}
% Aligning float boxes.
% Firstly defined plain macros for float boxes.
%    \begin{macrocode}
\newcommand\begin@FBBOX{\vbox\bgroup}
\def\end@FBBOX{\egroup}
%    \end{macrocode}
% Here these boxes are redefined to align floats in desired way.
% First definition for centered.
%    \begin{macrocode}
\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
             {\vskip\z@\egroup$\egroup}}
%    \end{macrocode}
% Definition for topped.
%    \begin{macrocode}
\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
%    \end{macrocode}
% Definition for aligned bottom.
%    \begin{macrocode}
\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
%    \end{macrocode}
% Restoring of plain behavior of boxes in |floatrow|.
%    \begin{macrocode}
\newcommand\PlainFloatBoxes{%
  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
%    \end{macrocode}
% Macro which defines |\begin@FBBOX| and |\end@FBBOX|.
%    \begin{macrocode}
\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\newdimentocommand}
% \begin{macro}{\renewdimentocommand}
% \begin{macro}{\newskiptocommand}
% \begin{macro}{\renewskiptocommand}
% \begin{macro}{\newlengthtocommand}
% \begin{macro}{\renewlengthtocommand}
% These macros substitute usage of \LaTeX's macro |\newlength| and \TeX's
% macros |\newdimen| and |\newskip|. These commands are are placed as prefix
% before  \LaTeX's commands |\settowidth|/\allowbreak|\settoheght|/\allowbreak
% |\settodepth|, |\setlength| and |\addtolength|.
%    \begin{macrocode}
\def\newdimentocommand  #1#2#3{%
    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
\def\renewdimentocommand#1#2#3{%
    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
\def\newskiptocommand   #1#2#3{%
    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
\def\renewskiptocommand #1#2#3{%
    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
%    \end{macrocode}
% The company to standard |\newlength| command.
%    \begin{macrocode}
\def\newlengthtocommand{\newskiptocommand}
\def\renewlengthtocommand{\renewskiptocommand}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%    \begin{macrocode}
%</floatrow>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*floatsetup>
%    \end{macrocode}
%
% \subsection{Float Settings Stuff}
%
% \FRorisubsubsection{Definitions Analogous to The \package{caption}'s Ones}
%
%
% \begin{macro}{\flrow@setbool}
% The next definition follows \package{caption} package macro
% to organize analogous mechanism of booleans.
% It uses |\caption@set@bool| macro.
% \changes{v0.2b}{2007/09/14}{The \cmd{\flrow@setbool}}
%    \begin{macrocode}
\newcommand*\flrow@setbool[1]{%
  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Defining Stuff for Float Layout Settings}
%
% \begin{macro}{\floatsetup}
% This macro analogous to |\captionsetup|.
%    \begin{macrocode}
\def\floatsetup{\@ifnextchar[\flrow@setuptype\flrow@setup}
\def\flrow@setuptype[#1]#2{%
  \@ifundefined{flrow@typ@#1}{\@namedef{flrow@typ@#1}{#2}}%
    {\expandafter\l@addto@macro\csname flrow@typ@#1\endcsname{,#2}}}
%    \end{macrocode}
% Setup for only following float.
%    \begin{macrocode}
\newcommand\thisfloatsetup{\floatsetup[tmpset]}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@setup}
% \begin{macro}{\flrow@esetup}
% \begin{macro}{\flrow@settype}
% Macros analogous to |\caption@setup|, |\caption@esetup| and
% |\caption@setoptions|. Here is used the |\caption@setkeys| instead of |setkeys|
% to get correct error messages about misspelled keys.
%    \begin{macrocode}
\def\flrow@setup{\caption@setkeys[floatrow]{floatrow}}
\def\flrow@esetup#1{%
  \edef\FR@tmp{\noexpand\flrow@setup{#1}}\FR@tmp}
\def\flrow@settype#1{\@ifundefined{flrow@typ@#1}{}%
  {\flrow@esetup{\csname flrow@typ@#1\endcsname}}}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\flrow@setlist}
% \begin{macro}{\flrow@FClist}
% This macro declares list of float and caption settings (like |widefloat|,
% {rotfloat} etc.); the temporary settings created by |\thisfloatsetup|
% command are added at very end of the float
% settings list. The contents of temporary settings are emptied immediately after
% their first usage, so the second usage of emptied settings discard
% previously defined temporary definitions.
% But there are two points where the additional list of special settings is loaded:
% the floats with the option |[H]| and at the start of |floatrow|
% environment. In this cases is used starred form of |\flrow@setlist|
% without temporary settings (since they always will be loaded  
% when floating environment is loaded or, in the case of usage
% outside floating environment, the |\floatbox| command is loaded).
% \changes{v0.3b}{2009/08/02}{Fixed bug of \cs{thisfloatsetup} usage}
%    \begin{macrocode}
\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
  \caption@setposition{\FBifcaptop tb}}
\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
  \caption@setposition{\FBifcaptop tb}}
\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
  \@flrow@setlist}
%    \end{macrocode}
% The compatibility with both version of \package{caption} \texttt{3.0q}
% and new version \texttt{3.1} (code suggestions of Axel Sommerfeldt).
%    \begin{macrocode}
\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
%    \end{macrocode}
% The code of |\@cap@setlist| co-operated with \package{caption} package
%   (code suggestions of Axel Sommerfeldt).
%    \begin{macrocode}
\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
%    \end{macrocode}
% This macro adds list of possible settings for beside captions.
%    \begin{macrocode}
\newcommand\flrow@FClist{\flrow@setlist
  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\clearfloatsetup}
% Removes all settings for chosen type of float. The |\@nameundef| macro is
% defined in \package{caption}.
%    \begin{macrocode}
\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareFROpt}
% The |\DeclareCaptionOption|-analog.\\
% Since this command has internal usage (before end of package) it has
% abbreviation-like name.
%    \begin{macrocode}
\newcommand\DeclareFROpt{%
  \@ifstar{\flrow@declopt\AtEndOfPackage}
          {\flrow@declopt\@gobble}}
\newcommand*\flrow@declopt[2]{%
  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
%    \end{macrocode}
% These macros allowed only in preamble.
%    \begin{macrocode}
\@onlypreamble\DeclareFROpt
\@onlypreamble\flrow@declopt
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{rawfloats}
% The default behavior of floats is like in \package{float}-like mode after
% |\restylefloat|.
%    \begin{macrocode}
\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
%    \end{macrocode}
% The boolean key which defines, whether floats run in plain \LaTeX{} mode.
%    \begin{macrocode}
\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{doublefloataswide}
% Starred environments work like non-starred with special |\floatsetup| settings.
%    \begin{macrocode}
\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
%    \end{macrocode}
% The boolean key which defines, whether starred non-rotated float in onecolumn
% layout work like non-starred one but with special |\floatsetup| settings
% for wide floats.
%    \begin{macrocode}
\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{floatHaslist}
% The anchored float has list penalties around. If there are not blank line or
% |\par| command, next paragraph starts without indentation.
%    \begin{macrocode}
\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
%    \end{macrocode}
% The boolean key which defines, whether anchored float
% uses the same penalties before and after environment as list environments.
%    \begin{macrocode}
\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Declaring of Float Styles}
%
% \begin{macro}{\DeclareFloatStyle}
% Declares float style using |\floatsetup| mechanism.
%    \begin{macrocode}
\newcommand*\DeclareFloatStyle[2]{%
  \global\@namedef{flrow@sty@#1}{#2}}
%    \end{macrocode}
% This macro is allowed only in preamble.
%    \begin{macrocode}
\@onlypreamble\DeclareFloatStyle
%    \end{macrocode}
% The definition of command which defines settings for new float style.
% There are also loaded the co-named caption settings, if exist.
% \changes{v0.2a}{2007/08/24}{Added star to \cmd{\caption@setstyle}
%     (AS).}
%    \begin{macrocode}
\newcommand*\flrow@setstyle[1]{%
  \@ifundefined{flrow@sty@#1}%
    {\flrow@error{Undefined float style `#1'}}%
    {\FBstyle@reset
     \def\flrow@capsetup{%
        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
        \caption@setoptions {#1}}%
     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
%    \end{macrocode}
% Declarations of \package{float} package's emulating styles and new
% \package{floatrow} styles. The |plain| style is consists of default settings.
%    \begin{macrocode}
\DeclareFloatStyle{plain}{}
\DeclareFloatStyle{plaintop}{capposition=top}
\DeclareFloatStyle{boxed}{captionskip=2pt,
  framestyle=fbox,heightadjust=object,framearound=object}
\DeclareFloatStyle{ruled}{precode=thickrule,midcode=rule,postcode=lowrule,
  capposition=top,heightadjust=all}
\DeclareFloatStyle{Ruled}{style=ruled,capposition=TOP}
\DeclareFloatStyle{Plaintop}{capposition=TOP}
\DeclareFloatStyle{Boxed}{style=boxed,framefit=yes}
\DeclareFloatStyle{BOXED}{framestyle=fbox,
  framefit=yes,heightadjust=all,framearound=all}
%    \end{macrocode}
%
% The default style settings.
% \changes{v0.2b}{2007/11/09}{The style with default settings added.}
%    \begin{macrocode}
\DeclareFloatStyle{default}{%
     style=plain,captionskip=10pt,
     margins=centering,objectset=centering,
     capbesideposition=left,facing=no,
     floatrowsep=columnsep,capbesidesep=columnsep,
     font=default,footfont=footnotesize}
%    \end{macrocode}
%
% \begin{macro}{style}
% Declaring of key for float styles.
%    \begin{macrocode}
\DeclareFROpt{style}{\flrow@setstyle{#1}}
%    \end{macrocode}
% \end{macro}
%
% The flag, which loads related caption style (if exists), to chosen float
% style. The \package{caption} 3.0 package defines only one related caption
% style to \package{float} package's style---|ruled|.
%    \begin{macrocode}
\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{relatedcapstyle}
% The boolean key which defines, whether to use caption style, related
% to chosen float style.
%    \begin{macrocode}
\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Defining Font}
%
% \begin{macro}{font}
% \begin{macro}{footfont}
% Fonts for object and |\floatfoot| contents. The settings of font for
% |\floatfoot| use |\captionsetup| mechanism, so its name follows
% \package{caption} package's rules (|\captionfootfont|).
%    \begin{macrocode}
\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\floatfont}
% This command sets the font for float objects (|\floatfont|)
% it could be smaller than caption text.
% \changes{v0.2d}{2009/05/24}{Defined using let to use that as flag}
%    \begin{macrocode}
\@ifdefinable\floatfont{\let\floatfont\empty}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\captionfootfont}
% Font for |\legend|-like command |\floatfoot|. This font is used inside
% macro which uses \package{caption} package mechanism, so the name of this
% font follows rules of font naming in \package{caption} package.
%    \begin{macrocode}
\newcommand*\captionfootfont{\normalfont\footnotesize}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareFloatFont}
% The |\DeclareCaptionFont|-twin (uses
%   caption's key-val settings).\\
% It's usage:\\
% |\DeclareFloatFont{|\meta{name}|}{|\meta{code}|}|.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\let\DeclareFloatFont\DeclareCaptionFont
\@onlypreamble\DeclareFloatFont
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@setfont}
% The |\caption@setfont|-analog.\\
% It's usage:\\
% |\flrow@setfont{|\meta{command}|}{|\meta{keyval-list of names}|}|.
% \changes{v0.1p}{2007/06/24}{Changed definition of \cmd{\flrow@setfont}
%   for compatibility with caption 3.1 (AS).}
%    \begin{macrocode}
\newcommand*\flrow@setfont[2]{%
   \caption@setfont{@tempa}{#2}%
   \expandafter\let\csname float#1\endcsname\caption@tempa}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Declaring of Caption Position}
%
% \begin{macro}{capposition}
% Keys for defining caption position in float box.
%    \begin{macrocode}
\DeclareFROpt{capposition}{\flrow@cappos{#1}}
\DeclareFROpt{position}{\flrow@cappos{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@cappos}
% Macro analogous to |\caption@setposition|. Instead of |auto| here is
% used |beside| set. Here are also settings for key |position=| from
% |\captionsetup|.
%    \begin{macrocode}
\newcommand*\flrow@cappos[1]{%
  \caption@ifinlist{#1}{t,top,above}{\captop\nocapbeside
  }{\caption@ifinlist{#1}{T,TOP,ABOVE}{\CAPTOP\nocapbeside
  }{\caption@ifinlist{#1}{b,bottom,below,default}{\capbot\nocapbeside
  }{\caption@ifinlist{#1}{beside,side}{\caption@setposition{a}\capbeside
  }{\flrow@error{Undefined caption position `#1'}%
  }}}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FBifcaptop}
% \begin{macro}{\captop}
% \begin{macro}{\capbot}
% The positions for captions in float box. There are defined
% traditional place of captions at the bottom of
% object---caption box.
%    \begin{macrocode}
\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
\newcommand\captop{\let\FBifcaptop\@firstoftwo}
\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FBifCAPTOP}
% \begin{macro}{\CAPTOP}
% Someone, using beside float boxes (see~\ref{floatrow}),
% would prefer the captions, which placed at the top
% of these boxes to align them by top line (the default
% alignment is the bottom line of upper box and the top line of
% lower box).
%    \begin{macrocode}
\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
%    \end{macrocode}
% In this case if you change contents of caption which could enlarge
% or reduce the number of lines, you ought to run \LaTeX{} twice.
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FBifcapbeside}
% \begin{macro}{\capbeside}
% \begin{macro}{\nocapbeside}
% There is flag and commands for printing caption and object beside.
%    \begin{macrocode}
\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Defining for Beside Captions}
%
% \begin{macro}{capbesideframe}
% This boolean key declares whether near beside caption stays framed
% object.
%    \begin{macrocode}
\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{capbesidewidth}
% This key defines width of beside caption.
%    \begin{macrocode}
\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
\@ifdefinable\FCwidth{\let\FCwidth\relax}
\newcommand\flrow@FCc@wd[1]{%
  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
  }{\useFCwidth\def\FCwidth{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{capbesideposition}
% Declares position of beside caption in document.
%    \begin{macrocode}
\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareSCPos}
% \begin{macro}{\flrow@scpos}
% The key which defines position of beside captions: vertical and
% horizontal. This macro is allowed only in preamble. This key is
% internal (usage till end of package) so it has abbreviation-like name.
%    \begin{macrocode}
\newcommand\DeclareSCPos[2]{%
  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
\newcommand*\flrow@scpos[1]{%
  \let\FR@tmp\@empty
  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
  \FR@tmp}
\@onlypreamble\DeclareSCPos
%    \end{macrocode}
% Declaring options.
%    \begin{macrocode}
\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
  }}
\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
  }}
\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
%    \end{macrocode}
% Command for default key: |capbesideposition=bottom|
%    \begin{macrocode}
\newcommand*\@FC@vpos{\count@\tw@}
%    \end{macrocode}
% Command for default key: |capbesideposition=left|.
% In version 0.2b of package it was |capbesideposition=inside|, since
% default key is |facing=no|, the
% |capbesideposition=inside| will be equal to |capbesideposition=left|.
%    \begin{macrocode}
\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\c@FBcnt}
% Count used as flag for facing layouts.
%    \begin{macrocode}
\newcounter{FBcnt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{footposition}
% Keys for defining foot text position.
%    \begin{macrocode}
\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareFtPos}
% \begin{macro}{\flrow@ftpos}
% Settings for positions of float foot material (footnotes and foot text).
% This macro is allowed only in preamble.
%    \begin{macrocode}
\newcommand\DeclareFtPos[2]{%
  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
\newcommand*\flrow@ftpos[1]{%
  \let\FR@tmp\@empty
  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
  \FR@tmp}
\@onlypreamble\DeclareFtPos
%    \end{macrocode}
% Declaring options.
%    \begin{macrocode}
\@ifdefinable\FPOScnt{\newcount\FPOScnt}
\DeclareFtPos{caption}{\FPOScnt1\relax}
\DeclareFtPos{bottom}{\FPOScnt2\relax}
\DeclareFtPos{default}{\FPOScnt0\relax}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{heightadjust}
% Keys for vertical adjustment and alignment.
%    \begin{macrocode}
\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareHtAdj}
% \begin{macro}{\flrow@htadj}
% This key defines adjustment of heights of objects or/and captions
% in float row.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\newcommand\DeclareHtAdj[2]{%
  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
  \FR@tmp}
\@onlypreamble\DeclareHtAdj
%    \end{macrocode}
% Declaring options.
%    \begin{macrocode}
\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
\DeclareHtAdj{caption}{\CADJtrue}
\DeclareHtAdj{object}{\OADJtrue}
\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
\DeclareHtAdj{nocaption}{\CADJfalse}
\DeclareHtAdj{noobject}{\OADJfalse}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ifCADJ}
% \begin{macro}{\ifOADJ}
% These flags define whether common height is used of captions
% or/and objects in float row.
%    \begin{macrocode}
\newif\ifCADJ
\newif\ifOADJ
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{valign}
% Keys for vertical alignment.
%    \begin{macrocode}
\DeclareFROpt{valign}{\@FB@vpos{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@FB@vpos}
% The vertical alignment of float objects in float row. The fill skips for
% |c|enter and |s|tretch alignment were set in |\vss|-like mode.
%    \begin{macrocode}
\newcommand\@FB@vpos[1]{%
  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
                 \def\FBbfil{\vskip0ptminus1000pt}%
  \fi\fi\fi\fi}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Facing Pages}
%
% \begin{macro}{\FR@iffacing}
% \begin{macro}{facing}
% Defines, if necessary, flag for facing pages.
%    \begin{macrocode}
\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FB@facing}
% Flag and command for |facing=|.
%    \begin{macrocode}
\newcommand\FB@facing{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Float Box and Float Object Settings}
%
% \begin{macro}{margins}
% \begin{macro}{\flrow@FBAlign}
% Declaring of option for |\floatbox| alignment and margins material.
%    \begin{macrocode}
\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
%    \end{macrocode}
% Macros analogous to |\caption@setjustification|.
%    \begin{macrocode}
\newcommand*\flrow@FBAlign[1]{%
  \@ifundefined{flrow@mj@#1}%
    {\flrow@error{Undefined float alignment `#1'}}%
    {\@nameuse{flrow@mj@#1}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\DeclareMarginSet}
% This macro defines margin filling material.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\newcommand*\DeclareMarginSet[2]{%
  \global\@namedef{flrow@mj@#1}{#2}}
\@onlypreamble\DeclareMarginSet
%    \end{macrocode}
% \end{macro}
%
% Declaring of float box alignment. We don't know whether \package{longtable}
% is loaded. Since in original package (till version v4.11) these skips
% were defined through |\newskip| command it is not harm to repeat this code
% for a while.
%    \begin{macrocode}
\newskip\LTleft\newskip\LTright
\DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}%
  \LTleft=\fill \LTright=\fill}
\DeclareMarginSet{raggedright}{\setfloatmargins{}{\hfil}%
  \LTleft=\z@ \LTright=\fill}
\DeclareMarginSet{raggedleft}{\setfloatmargins{\hfil}{}%
  \LTleft=\fill \LTright=\z@}
%    \end{macrocode}
%
%    \begin{macrocode}
\newskip\LTleft\newskip\LTright
\DeclareMarginSet{hangleft}{\setfloatmargins
    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
  \LTright=\fill}
\DeclareMarginSet{hangright}{\setfloatmargins
    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
  \LTleft=\fill
  \LTright-\marginparwidth\advance\LTright-\marginparsep}
\DeclareMarginSet{hanginside}{\setfloatmargins
    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
%    \end{macrocode}
% With the \texttt{hangoutside} and \texttt{hanginside} settings the usage of
% |longtable| environment looks absurdly.
%    \begin{macrocode}
  }
\DeclareMarginSet{hangoutside}{\setfloatmargins
    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
  }
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand\flrow@mj@default{\flrow@mj@centering}
%    \end{macrocode}
%
% \begin{macro}{\floatfacing}
% Defines settings accordingly to left (even) or right (odd) pages.
% Starred from used for facing settings of float with beside captions.
%    \begin{macrocode}
\newcommand\floatfacing{\@ifstar
  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\floatboxmargins}
% \begin{macro}{\floatrowmargins}
% \begin{macro}{\floatcapbesidemargins}
% First goes definition for margins around alone float box.
% Second defines margins in float row.
% Third---margins around float box with beside caption.
%
% You may define different settings for each of these layouts, or set
% common margins, using macro |\setfloatmargins|.
%    \begin{macrocode}
\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
%    \end{macrocode}
% To create facing and non-facing layout in macros |\FB@mset@| and
% |\FB@@mset| loaded definition of |\FB@facing| command. The temporary
% |\count@| get value of |\c@FBcnt|,
% which is usually equals to number of page where float appears.
%    \begin{macrocode}
\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
\newcommand\FB@mset@[2]{%
  \def\FB@facing{\let\FR@iffacing\@firstoftwo\count@\c@FBcnt}%
  \@namedef{\FR@tmp leftmargin}{\floatfacing{#1}{#2}}%
  \@namedef{\FR@tmp rightmargin}{\floatfacing{#2}{#1}}}
\newcommand\FB@@mset[2]{\def\FB@facing{}%
  \@namedef{\FR@tmp leftmargin}{#1}\@namedef{\FR@tmp rightmargin}{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\setfloatmargins}
% Alignment settings for object---caption boxes and float rows.
%    \begin{macrocode}
\newcommand\setfloatmargins{\@ifstar\FB@allset@\FB@@allset}
\newcommand\FB@allset@[2]{%
  \def\FR@tmp{FR}\FB@mset@{#1}{#2}%
  \def\FR@tmp{FB}\FB@mset@{#1}{#2}%
  \def\FR@tmp{FC}\FB@mset@{#1}{#2}}
\newcommand\FB@@allset[2]{%
  \def\FR@tmp{FR}\FB@@mset{#1}{#2}%
  \def\FR@tmp{FB}\FB@@mset{#1}{#2}%
  \def\FR@tmp{FC}\FB@@mset{#1}{#2}}
%    \end{macrocode}
% Default setting: centering of floats.
%    \begin{macrocode}
\setfloatmargins\hfill\hfill
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{objectset}
% \begin{macro}{justification}
% Declaring of option for float object contents' alignment.
%    \begin{macrocode}
\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\DeclareObjectSet}
% The |\DeclareCaptionJustification|-twin (uses
%   caption's key-val settings).\\
% Macros for float object's contents justification and |\floatbox|
% alignment. This macro is allowed only in preamble.
%    \begin{macrocode}
\let\DeclareObjectSet\DeclareCaptionJustification
\@onlypreamble\DeclareObjectSet
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@FBoAlign}
% |\caption@setjustification|-analog (uses
%   caption's key-val settings).\\
% Command for |objectset=|
%    \begin{macrocode}
\newcommand*\flrow@FBoAlign[1]{%
  \@ifundefined{caption@hj@#1}%
    {\flrow@error{Undefined object setting `#1'}}%
    {\expandafter\let\expandafter\floatobjectset
     \csname caption@hj@#1\endcsname}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\floatobjectset}
% Definition of command for object alignment
%    \begin{macrocode}
\newcommand*\floatobjectset{\centering}
%    \end{macrocode}
% \end{macro}
% \changes{v0.1f}{2005/06/14}{The \cmd{\centerlast} \cmd{\rightlast}
%   commands deleted.}
%
% \subsubsection{Defining Float Width}
%
% \begin{macro}{floatwidth}
% The float width settings mainly for plain floating environments.
%    \begin{macrocode}
\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\filFCOhsize}
% \begin{macro}{\nofilFCOhsize}
% Flags and commands for |floatwidth=|.
%    \begin{macrocode}
\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
\newcommand\flrow@setwd{\relax}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\flrow@FBo@wd}
% Settings for the width of object.
%    \begin{macrocode}
\newcommand\flrow@FBo@wd[1]{%
  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Defining Float Separators}
%
% \begin{macro}{floatrowsep}
% \begin{macro}{capbesidesep}
% Option |floatrowsep| sets separations for beside float boxes
% in float row.
%    \begin{macrocode}
\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
%    \end{macrocode}
% Option |subfloatrowsep| sets separations for beside captions and objects.
%    \begin{macrocode}
\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
%    \end{macrocode}
% Option |capbesidesep| sets separations for beside captions.
%    \begin{macrocode}
\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\DeclareFloatSeparators}
% \begin{macro}{\flrow@setFRsep}
% \begin{macro}{\flrow@setFCsep}
% Next macros  declare material, defined for usage as separator of
% both float boxes in |floatrow| environment and for beside
% object and caption.
%
% The |\DeclareCaptionLabelSeparator|-twin (uses
%   caption's key-val settings).\\
% This macro is allowed only in preamble.
%    \begin{macrocode}
\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
\@onlypreamble\DeclareFloatSeparators
%    \end{macrocode}
%
% The |\caption@setlabelseparator|-analog (uses
%   caption's key-val settings).\\
% Command which defines settings for separators in float row, and
% between beside caption and float object.
%    \begin{macrocode}
\newcommand*\flrow@setFRsep[2]{%
  \@ifundefined{caption@lsep@#2}%
    {\flrow@error{Undefined float separator `#2'}}%
    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
%    \end{macrocode}
% A few options define possible separators. In float settings can be used the caption separators
% |quad| and |none|.
%    \begin{macrocode}
\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
%\DeclareFloatSeparators{quad}{\quad}
\DeclareFloatSeparators{qquad}{\qquad}
\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
%\DeclareFloatSeparators{none}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\floatrowsep}
% \begin{macro}{\floatcapbesidesep}
% Separators between beside floats, and between object and
% beside caption.
%    \begin{macrocode}
\newcommand\floatrowsep{\hskip\columnsep}
\newcommand\floatcapbesidesep{\hskip\columnsep}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Defining Float Rules/Skips}
%
% \begin{macro}{precode}
% \begin{macro}{rowprecode}
% \begin{macro}{midcode}
% \begin{macro}{postcode}
% \begin{macro}{rowpostcode}
% Keys for building of float style (rules).
%    \begin{macrocode}
\DeclareFROpt{precode}{\flrow@FBrule\@@FRabove\@@FBabove{#1}}
\DeclareFROpt{rowprecode}{\flrow@FRrule\@@FRabove\@@FBabove{#1}}
\DeclareFROpt{midcode}{\flrow@FBskip{#1}}
\DeclareFROpt{postcode}{\flrow@FBrule\@@FRbelow\@@FBbelow{#1}}
\DeclareFROpt{rowpostcode}{\flrow@FRrule\@@FRbelow\@@FBbelow{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\DeclareFloatVCode}
% Declaring options for keys of vertical material for building of
% float style. They could be used above and below of float box,
% and between object and caption in the case when caption
% above/below object. This macro is allowed only in preamble.
%    \begin{macrocode}
\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
\@onlypreamble\DeclareFloatVCode
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@FBrule}
% \begin{macro}{\flrow@FRrule}
% \begin{macro}{\flrow@FBskip}
% Vertical code above/below float box.
%    \begin{macrocode}
\newcommand*\flrow@FBrule[3]{%
  \@ifundefined{flrow@FBr@#3}%
    {\flrow@error{Undefined rule `#3'}}%
    {\let#1\empty
     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
%    \end{macrocode}
% Vertical code above/below float row.
%    \begin{macrocode}
\newcommand*\flrow@FRrule[3]{%
  \@ifundefined{flrow@FBr@#3}%
    {\flrow@error{Undefined rule `#3'}}%
    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
%    \end{macrocode}
% Vertical code between caption and object.
%    \begin{macrocode}
\newcommand*\flrow@FBskip[1]{%
  \@ifundefined{flrow@FBr@#1}%
    {\flrow@error{Undefined rule `#1'}}%
    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% Declared options for keys for building of float style (rules).
%    \begin{macrocode}
\DeclareFloatVCode{none}{}
\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
\DeclareFloatVCode{captionskip}{\vskip\captionskip}
%    \end{macrocode}
%
% The command for definition of material which you
% could put at the top and bottom of object---caption box
% and between caption and float.
%
% \begin{macro}{\FBstyle@reset}
% Reset of all used layout settings. All settings localized---that allows
% usage |\floatbox| inside |\floatbox|.
%    \begin{macrocode}
\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
  \def\@@FBabove{}\def\@@FBbelow{}%
  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
\newcommand\@@FBskip{\vskip\captionskip}
\@ifdefinable\@@FRabove{\def\@@FRabove{}}
\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
\@ifdefinable\@@FBabove{\def\@@FBabove{}}
\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
\@ifdefinable\FB@frame {\def\FB@frame {}}
\@ifdefinable\FBo@frame{\def\FBo@frame{}}
\@ifdefinable\FR@frame {\def\FR@frame {}}
\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Defining Float Frames}
%
% Keys for building of float style (boxes).
%
% \begin{macro}{framestyle}
% This key defines style of frame.
%    \begin{macrocode}
\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{framearound}
% This key defines object to be framed.
%    \begin{macrocode}
\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@fr@round}
% Command for |framearound|.
%    \begin{macrocode}
\newcommand*\flrow@fr@round[1]{%
 \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
    \def\FB@BO@{FBo}%
  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
    \def\FB@BO@{FB}%
  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
    \def\FB@BO@{FR}%
  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
  }{\flrow@error{Undefined framed object `#1'}%
  }}}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{framefit}
% \begin{macro}{rowfill}
% \begin{macro}{frameset}
% This boolean key defines whether frame size fits to current |\hsize|.
%    \begin{macrocode}
\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
\@ifdefinable\flrow@@setROWFILL{}
\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
%    \end{macrocode}
%    \begin{macrocode}
\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
%    \end{macrocode}
% This key defines parameters for chosen frame.
%    \begin{macrocode}
\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@@setframe}
% Macro which prepares box settings accordingly to predefined float layout.
%    \begin{macrocode}
\newcommand\FB@BO@{FBo}\newcommand\FB@B@{}
\newcommand\@@setframe{%
  \@namedef{\FB@BO@ @hadj}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
    \@nameuse{FB@\FB@B@ @adj}}%
  \@namedef{\FB@BO@ @wadj}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
    \@nameuse{FB@\FB@B@ @adj}}\relax}%
  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
    \@nameuse{FB@\FB@B@ @frame}}%
  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
       \@nameuse{FB@\FB@B@ @adj}}%
     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
       \@nameuse{FB@\FB@B@ @adj}}\relax}%
     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
       \@nameuse{FB@\FB@B@ @frame}}%
  \fi%\fi
  }
%    \end{macrocode}
% If box layout used.
%    \begin{macrocode}
\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FB@fbox@frame}
% \begin{macro}{\FB@fbox@adj}
% \begin{macro}{\FB@fbox@reset}
% First macro is the definition of frame style (here is |\fbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
%    \begin{macrocode}
\newcommand\FB@fbox@frame[1]{\hbox{%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Macros for Color Frame}
%
% \begin{macro}{\FB@colorbox@frame}
% \begin{macro}{\FB@colorbox@adj}
% \begin{macro}{\FB@colorbox@reset}
% First macro is the definition of frame style (here is |\colorbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
% \changes{v0.2b}{2007/11/09}{The \cmd{\setcolorframe} deleted.}
%    \begin{macrocode}
\newcommand\FB@colorbox@frame[1]{\hbox{%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
\newcommand\FB@fcolorbox{\fbox}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FB@FRcolorbox@frame}
% \begin{macro}{\FB@FRcolorbox@adj}
% \begin{macro}{\FB@FRcolorbox@reset}
% First macro is the definition of frame style (here is |\colorbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
% \changes{v0.2b}{2007/11/09}{The \cmd{\setcolorframe} deleted.}
%    \begin{macrocode}
\newcommand\FB@fcolorcorners{}
\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FB@corners@frame}
% \begin{macro}{\FB@corners@adj}
% \begin{macro}{\FB@corners@reset}
% First macro is the definition of frame style (here is |\colorbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
% \changes{v0.2b}{2007/11/09}{The \cmd{\setcolorframe} deleted.}
%    \begin{macrocode}
\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\flrow@l@color@side}
% \begin{macro}{\flrow@r@color@side}
%    \begin{macrocode}
\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
    \picture(\z@,\z@)(\z@,\z@)
    \put(\z@,#1){{\flrow@ll@col@put}}
    \put(\z@,#2){{\flrow@ul@col@put}}
    \endpicture}}
\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
    \picture(\z@,\z@)(\z@,\z@)
    \put(\z@,#1){{\flrow@lr@col@put}}
    \put(\z@,#2){{\flrow@ur@col@put}}
    \endpicture}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\flrow@ll@col@put}
% \begin{macro}{\flrow@ul@col@put}
% \begin{macro}{\flrow@lr@col@put}
% \begin{macro}{\flrow@ur@col@put}
%    \begin{macrocode}
\newcommand\flrow@ll@col@put{}
\newcommand\flrow@ul@col@put{}
\newcommand\flrow@lr@col@put{}
\newcommand\flrow@ur@col@put{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\flrow@cboxcorners}
% User command. The (rule) material placed on the corners of the frame. The order of corners
% is similar to corners of the label box (|bbox|) in METAPOST picture.
%    \begin{macrocode}
\newcommand\flrow@cboxcorners[4]{%
    \def\flrow@ll@col@put{#1}%
    \def\flrow@lr@col@put{#2}%
    \def\flrow@ur@col@put{#3}%
    \def\flrow@ul@col@put{#4}%
    }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\flrow@ur@col@put}
%    \begin{macrocode}
\newcommand\FRcolorboxwd{\z@}
\newcommand\FRcolorboxht{\z@}
\newcommand\FRcolorboxdp{\z@}
\def\FRcolor@block#1#2#3{%
  {\FRset@color
   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
   \ifcolors@\else\let\FR@phantom\phantom\fi
     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
    }}}
%    \end{macrocode}
% \end{macro}
%
% This key defines parameters (definition) for color frame.
%    \begin{macrocode}
\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
\newcommand*\flrow@fcolorbox[1]{%
  \@ifundefined{flrow@fcolorbox@#1}%
    {\flrow@error{Undefined color box `#1'}}%
    {\expandafter\let\expandafter\FB@fcolorbox
     \csname flrow@fcolorbox@#1\endcsname}}
\newcommand*\flrow@fcolorcorners[1]{%
  \@ifundefined{flrow@fcolorcorners@#1}%
    {\flrow@error{Undefined color box corners `#1'}}%
    {\expandafter\let\expandafter\FB@fcolorcorners
     \csname flrow@fcolorcorners@#1\endcsname}}
\newcommand*\DeclareColorBox[2]{%
%  \@ifundefined{color}{\flrow@error
%    {For usage of colored frames\MessageBreak load color package}}%
%  {\long\@namedef{flrow@fcolorbox@#1}{#2}}}
  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
\newcommand*\DeclareCBoxCorners[5]{%
  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
\@onlypreamble\DeclareColorBox
\@onlypreamble\DeclareCBoxCorners
\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
%    \end{macrocode}
%
% \subsubsection{Defining Float Skips}
%
% \begin{macro}{captionskip}
% \begin{macro}{footskip}
% The following options define skips: first---between float object and
% caption (if it used in float style); second---before foot material
% (footnote or other foot text). The |\abovecaptionskip| used for compatibility with caption.
%    \begin{macrocode}
\DeclareFROpt{captionskip}{\def\captionskip{#1}%
  \setlength\abovecaptionskip{#1}}
\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\captionskip}
% \begin{macro}{\floatfootskip}
% The skip between caption and object. Here goes standard value.
%    \begin{macrocode}
\newcommand\captionskip{10\p@}
%    \end{macrocode}
%
% The skip before float footnotes. Here it is equal to
% used skip in mini pages.
%    \begin{macrocode}
\newcommand\floatfootskip{\skip\@mpfootins}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Defining Float Footnote Rule}
%
% \begin{macro}{footnoterule}
% \begin{macro}{\flrow@footrule}
% The definitions of |\footnoterule| inside floating environment.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
\newcommand\DeclareFloatFootnoterule[2]{%
  \long\@namedef{flrow@fnrule@#1}{#2}}
\newcommand*\flrow@footrule[1]{%
  \@ifundefined{flrow@fnrule@#1}%
    {\flrow@error{Undefined footnoterule `#1'}}%
    {\let\@@FRabove\empty
     \expandafter\let\expandafter\FBfootnoterule\csname
       flrow@fnrule@#1\endcsname}}
\@onlypreamble\DeclareFloatFootnoterule
%    \end{macrocode}
% Here goes standard \LaTeX{} definition used in minipages.
%    \begin{macrocode}
\DeclareFloatFootnoterule{normal}{\kern-3\p@
  \@tempdima.4\columnwidth
  \hrule\@width\@tempdima\kern2.6\p@}
%    \end{macrocode}
% Here goes standard \LaTeX{} definition used in minipages with
% limited maximal width.
%    \begin{macrocode}
\DeclareFloatFootnoterule{limited}{\kern-3\p@
  \@tempdima.4\columnwidth
  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
  \hrule\@width\@tempdima\kern2.6\p@}
\newcommand\frulemax{1in}
%    \end{macrocode}
% The width of |\footnoterule| equals to full |\hsize|.
%    \begin{macrocode}
\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
  \hrule\@width\hsize\kern2.6\p@}
%    \end{macrocode}
% Absent footnoterule.
%    \begin{macrocode}
\DeclareFloatFootnoterule{none}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FBfootnoterule}
% The definition of special footnote rule.
% By default it defined as standard \LaTeX{} |\footnoterule|
%    \begin{macrocode}
\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Loading Fancy Float Styles}
%
% Options for loading of fancy float styles. Commented.
%    \begin{macrocode}
\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
%    \end{macrocode}
%
% \subsubsection{New Float Type Setup}
%
% \begin{macro}{\DeclareFNOpt}
% Declaring new float type like |\newfloat| does.
% These macros allowed only in preamble.
%    \begin{macrocode}
\newcommand\DeclareFNOpt{%
   \@ifstar{\flrow@declfnopt\AtBeginDocument}
           {\flrow@declfnopt\@gobble}}
\newcommand*\flrow@declfnopt[2]{%
   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
\@onlypreamble\DeclareFNOpt
%    \end{macrocode}
% \changes{v0.2b}{2007/09/24}{\cmd{\flnew@setdefault} removed.}
%
% The |\newtoks| for defining of floating environments (using
% |\flrow@restyle| command) at the end of preamble. (Took a leaf with
% settings for lists of floats from \package{float} package's book.)
% \changes{v0.1p}{2007/06/24}{Double code with \texttt{ftype@}\meta{captype}
%   deleted.}
% \changes{v0.1p}{2007/06/24}{The \cmd{\fname@}\meta{floatname} changed to
%    \cs{}\meta{floatname}\texttt{name} macros redefined locally.}
% \changes{v0.2a}{2007/08/24}{Corrected bug with \texttt{ftype@} definition (AS).}
% \changes{v0.2b}{2007/09/24}{Defined default extension of list file in the same way as caption's
%   \cmd{\DeclareFloatingEnvironment}.}
% \changes{v0.2b}{2007/09/24}{The definition of list entry layout moved here.}
% \changes{v0.2b}{2007/09/24}{Corrected bugs with listof file and \cmd{\fps@}\meta{float type} commands.}
%    \begin{macrocode}
\@ifdefinable\flrow@types{\newtoks\flrow@types}
\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
  \addtocounter{float@type}{\value{float@type}}%
  \@namedef{#1name}{#1}\newcounter{#1}%
  \expandafter\edef\csname fnum@#1\endcsname
    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
       \expandafter\noexpand\csname the#1\endcsname}%
  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
  \@tempa}
\@onlypreamble\DeclareNewFloatType
%    \end{macrocode}
% Key for placement defining.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\DeclareFNOpt*{placement}{\flnew@fps{#1}}
\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
\@onlypreamble\flnew@fps
%    \end{macrocode}
% Key for float label name defining.
% This macro is allowed only in preamble.
% \changes{v0.1p}{2007/06/24}{The \cmd{\fname@}\meta{floatname} changed to
%    \cs{}\meta{floatname}\texttt{name} macros redefined locally.}
%    \begin{macrocode}
\DeclareFNOpt*{name}{\flnew@fname{#1}}
\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
\@onlypreamble\flnew@fname
%    \end{macrocode}
% Key for extension of ``toc''-file.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\DeclareFNOpt*{fileext}{\flnew@ext{#1}}
\newcommand\flnew@ext[1]{\@namedef{ext@\FB@captype}{#1}%
  \let\float@do=\relax
  \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#1}}}%
  \@tempa}
\@onlypreamble\flnew@ext
%    \end{macrocode}
% The section of document which resets numbering of float.
% This macro is allowed only in preamble.
%    \begin{macrocode}
\DeclareFNOpt*{within}{\flnew@within{#1}}
\newcommand\flnew@within[1]{\@addtoreset{\FB@captype}{#1}%
  \expandafter\edef\csname the\FB@captype\endcsname{%
      \expandafter\noexpand\csname
        the#1\endcsname.\noexpand\arabic{\FB@captype}}}
\@onlypreamble\flnew@within
%    \end{macrocode}
% \end{macro}
%
%\changes{v0.2b}{2007/10/24}{The double definition of `relatedcapstyle' option deleted}
%
% \subsubsection{Processing of Floatsetup Options}
%
% \begin{macro}{\ProcessOptionsWithKV}
% As in caption style options are processed with usage of the
% \package{keyval} package.
% \changes{v0.1j}{2006/02/24}{Edited by suggestions of A.Sommerfeldt}
%    \begin{macrocode}
\def\ProcessOptionsWithKV#1{%
  \let\@tempc\relax
  \let\FR@tmp\@empty
  \@for\CurrentOption:=\@classoptionslist\do{%
    \@ifundefined{KV@#1@\CurrentOption}%
    {}%
    {%
%    \end{macrocode}
% In the case of co-named global option, appeared in
% |\documentclass| line.
% ^^A added line (|\@ifundefined| stuff)
% ^^A first part of command
%    \begin{macrocode}
      \@ifundefined{KV@#1@\CurrentOption @default}{%
       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
%    \end{macrocode}
% ^^A doubling of first line from second part of |\@ifundefined|
% ^^A but first line edited (moved |\CurrentOption,|)
% ^^A   \begin{macrocode}
% ^^A     \edef\FR@tmp{\FR@tmp,}%
% ^^A   \end{macrocode}
% ^^A end doubling
% ^^A added line
%    \begin{macrocode}
      }{%
%    \end{macrocode}
% ^^A second part of |\@ifundefined|
%    \begin{macrocode}
      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
      \@expandtwoargs\@removeelement\CurrentOption
        \@unusedoptionlist\@unusedoptionlist
%    \end{macrocode}
% ^^A end of doubled code
% ^^A added line
%    \begin{macrocode}
        }%
    }%
  }%
  \edef\FR@tmp{%
    \noexpand\caption@setkeys[floatrow]{#1}{%
      \FR@tmp\@ptionlist{\@currname.\@currext}%
    }%
  }%
  \FR@tmp
  \let\CurrentOption\@empty
  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
\ProcessOptionsWithKV{floatrow}
\FR@iffancy{\RequirePackage{fr-fancy}}\relax
\let\ProcessOptionsWithKV\undefined
%    \end{macrocode}
% \end{macro}
%
% At beginning of document there are loaded macros |\flrow@restyle|
% for table and figure floats. (Any new float type gets this command
% when |\newfloat| macro of |\DeclareNewFloatType| are used.)
% \changes{v0.1k}{2007/05/24}{The support for raw float mode added.}
%    \begin{macrocode}
\AtBeginDocument{
 \FR@ifrawfloats
  {\let\FR@tmp\flrow@Raw@restyle
 }{\flrow@restyle{table}\flrow@restyle{figure}%
   \let\FR@tmp\flrow@restyle
  }\the\flrow@types
 \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
 \flrow@types={}}
%    \end{macrocode}
%
%    \begin{macrocode}
%</floatsetup>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*frfancy>
\RequirePackage{fancybox}
%    \end{macrocode}
%
% \subsection{Additional Definitions for Fancy Frames}
%
% \FRorisubsubsection{Macros for Fancy Frames}
%
% \begin{macro}{\FB@wshadowbox}
% The variant of shadowbox with white contoured shadow.
%    \begin{macrocode}
\newcommand\wshadowbox{\VerbBox\@wshadowbox}
\newcommand\@wshadowbox[1]{%
  \setbox\@fancybox\hbox{\fbox{#1}}%
  \leavevmode\vbox{\offinterlineskip
    \hbox{\copy\@fancybox\kern-\fboxrule\lower\shadowsize\hbox{%
      \dimen@\ht\@fancybox\advance\dimen@-\fboxrule
      \vrule\@height\ht\@fancybox\@depth-\dimen@\@width\shadowsize
      \vrule\@height\ht\@fancybox\@depth\dp\@fancybox\@width\fboxrule}}%
    \vskip-\fboxrule\vskip-\shadowsize
    \moveright\shadowsize\vbox{%
      \hrule\@width\fboxrule\@height\shadowsize
      \hrule\@width\wd\@fancybox\@height\fboxrule}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FB@shadowbox@frame}
% \begin{macro}{\FB@shadowbox@adj}
% \begin{macro}{\FB@shadowbox@reset}
% First macro is the definition of frame style (here is |\shadowbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
%    \begin{macrocode}
\newcommand\FB@shadowbox@frame[1]{\hbox{%
  \FR@ifFIT\relax{\hskip-\fboxrule\hskip-\fboxsep}\FBs@raise{\shadowbox{#1}}%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep\kern-\shadowsize}}}
\newcommand\FB@shadowbox@adj{\dimen@=2\fboxsep
  \advance\dimen@2\fboxrule\advance\dimen@\shadowsize}
\newcommand\FB@shadowbox@reset{\fboxsep3\p@\fboxrule.4\p@\shadowsize4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FB@wshadowbox@frame}
% \begin{macro}{\FB@wshadowbox@adj}
% \begin{macro}{\FB@wshadowbox@reset}
% The definition for frame |wshadowbox|---similar to
% |shadowbox| from \package{fancybox}.
% First macro is the definition of frame style (here is |\wshadowbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
%    \begin{macrocode}
\newcommand\FB@wshadowbox@frame[1]{\hbox{%
  \FR@ifFIT\relax{\hskip-\fboxrule\hskip-\fboxsep}\FBs@raise{\wshadowbox{#1}}%
  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep\kern-\shadowsize}}}
\@ifdefinable\FB@wshadowbox@adj{\let\FB@wshadowbox@adj\FB@shadowbox@adj}
\newcommand\FB@wshadowbox@reset{\fboxsep3\p@\fboxrule.4\p@\shadowsize4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FB@doublebox@frame}
% \begin{macro}{\FB@doublebox@adj}
% \begin{macro}{\FB@doublebox@reset}
% First macro is the definition of frame style (here is |\doublerbox|);
% second defines compensating material to get frame fitted to current
% |\hsize|; third defines default values of compensating material.
%    \begin{macrocode}
\newcommand\FB@doublebox@frame[1]{\hbox{%
  \FR@ifFIT\relax{\kern-4.75\fboxrule\kern-.5pt\kern-\fboxsep}\doublebox{#1}%
  \FR@ifFIT\relax{\kern-4.75\fboxrule\kern-.5pt\kern-\fboxsep}}}
\newcommand\FB@doublebox@adj{\dimen@=2\fboxsep
  \advance\dimen@7.5\fboxrule\advance\dimen@\p@}
\newcommand\FB@doublebox@reset{\fboxsep3\p@\fboxrule.4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\fs@shadowbox}
% \begin{macro}{\fs@Shadowbox}
% \begin{macro}{\fs@SHADOWBOX}
% There are going three float styles with usage of |\shadowbox|.
%    \begin{macrocode}
\DeclareFloatStyle{shadowbox}{style=boxed,framestyle=shadowbox}
\DeclareFloatStyle{Shadowbox}{style=Boxed,framestyle=shadowbox}
\DeclareFloatStyle{SHADOWBOX}{style=BOXED,framestyle=shadowbox}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\fs@wshadowbox}
% \begin{macro}{\fs@Wshadowbox}
% \begin{macro}{\fs@WSHADOWBOX}
% There are going three float styles with usage of |\wshadowbox|.
%    \begin{macrocode}
\DeclareFloatStyle{wshadowbox}{style=boxed,framestyle=wshadowbox}
\DeclareFloatStyle{Wshadowbox}{style=Boxed,framestyle=wshadowbox}
\DeclareFloatStyle{WSHADOWBOX}{style=BOXED,framestyle=wshadowbox}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\fs@doublebox}
% \begin{macro}{\fs@Doublebox}
% \begin{macro}{\fs@DOUBLEBOX}
% There are going three float styles with usage of |\doublebox|.
%    \begin{macrocode}
\DeclareFloatStyle{doublebox}{style=boxed,framestyle=doublebox}
\DeclareFloatStyle{Doublebox}{style=Boxed,framestyle=doublebox}
\DeclareFloatStyle{DOUBLEBOX}{style=BOXED,framestyle=doublebox}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%    \begin{macrocode}
%</frfancy>
%    \end{macrocode}
%
%
%
%
%    \begin{macrocode}
%<*floatpagestyle>
%    \end{macrocode}
%
% \subsection{Empty Floating Page}
%
% Here goes small sneaky-tricky style to put desired page style
% for one floating page.
%
% \begin{macro}{\floatpagestyle}
% First goes macro which defines desired page style for page with
% current float.
%    \begin{macrocode}
\newcommand\floatpagestyle[1]{\@ifundefined{ps@#1}\undefinedpagestyle
  {\begingroup
   \let\thepage\relax\let\protect\@unexpandable@protect
   \edef\reserved@a{\write\@auxout{\expandafter\string
     \csname @setfloatpage\endcsname{\thepage}{#1}}}\reserved@a
   \endgroup}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\emptyfloatpage}
% The abbreviation for empty float page style.
%    \begin{macrocode}
\newcommand\emptyfloatpage{\floatpagestyle{empty}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@setfloatpage}
% The macro which writes necessary code for changed float page style.
%    \begin{macrocode}
\newcommand\@setfloatpage[2]{%
  \edef\reserved@a{floatpage@\romannumeral#1}%
  \global\expandafter\def\csname\reserved@a\endcsname{#2}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@chkfloatpage}
% The macro which checks whether exists necessary code for changing
% of current float page style.
%    \begin{macrocode}
\newcommand\@chkfloatpage{%
  \edef\reserved@a{floatpage@\romannumeral\the\c@page}%
  \@ifundefined{\reserved@a}{\relax}{\global\@specialpagetrue
   \gdef\@specialstyle{\csname\reserved@a\endcsname}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@outputpage}
% The |\@chkfloatpage| added at as a patch at the very beginning of
% current definition of |\@outputpage| command.
%    \begin{macrocode}
\AtBeginDocument
  {\@ifdefinable\FBori@outputpage{\let\FBori@outputpage\@outputpage}
  \let\@outputpage\FB@outputpage}
\newcommand\FB@outputpage{\@chkfloatpage\FBori@outputpage}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%</floatpagestyle>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*listpen>
%    \end{macrocode}
%
% \subsection{List Penalties Managing}
%
%   The package \package{listpen} is a beta-temp package, which
%   offers commands |\allowprelistbreaks|,
%   |\allowpostlistbreaks| and |\allowitembreaks| which help
%   to manage page breaking at the beginning and the end of
%   lists, and between list items consequently.
%
%   This package follows idea of |\allowdisplaybreaks|
%   (\textsf{amsmath} package) and |\pagebreak|/|\nopagebreak| stuff.
%
% \DescribeMacro{\allowprelistbreaks}
% \DescribeMacro{\allowpostlistbreaks}
% \DescribeMacro{\allowitembreaks}
% These commands set penalties before lists, after lists and between items.
% They set globally or inside group or (also list!)
% environment\footnote{Look also at \cmd{\allowdisplaybreaks}
%   macro from \package{amsmath} package.} penalties accordingly to digits
% from |[-4]| (never break) to |[4]| (always break). The values of optional
% argument in these commands analogous to values of optional arguments
% in, e.g., |\pagebreak| command. The default value of all three commands
% is |[-1]| which equal to \cls{book.cls} etc. class settings (which equal to
% |-\@lowpenalty| value).
%
% \begin{macro}{\allowprelistbreaks}
% Sets penalty before lists.
%    \begin{macrocode}
\newcommand\allowprelistbreaks{\let\LP@penalty\@beginparpenalty
  \@testopt{\LP@setlistbreaks}{-1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\allowpostlistbreaks}
% Sets penalty after lists.
%    \begin{macrocode}
\newcommand\allowpostlistbreaks{\let\LP@penalty\@endparpenalty
  \@testopt{\LP@setlistbreaks}{-1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\allowitembreaks}
% Sets penalty between items.
%    \begin{macrocode}
\newcommand\allowitembreaks{\let\LP@penalty\@itempenalty
  \@testopt{\LP@setlistbreaks}{-1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\LP@setlistbreaks}
% This macro reverses the $+/-$ signs before digits.
%    \begin{macrocode}
\@ifdefinable\LP@setlistbreaks{}
\def\LP@setlistbreaks[#1#2]{\def\tempa{-}\def\tempb{#1}\ifx\tempa\tempb
   \LP@nolbk[#2]\else\LP@nolbk-[#1]\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\LP@nolbk}
% Macro for setting necessary penalties.
%    \begin{macrocode}
\@ifdefinable\LP@nolbk{}\@ifdefinable\LP@penalty{}
\def\LP@nolbk#1[#2]{%
    \ifcase#2\LP@penalty\z@
       \or\LP@penalty#1\@lowpenalty
          \or\LP@penalty#1\@medpenalty
             \or\LP@penalty#1\@highpenalty
                \or\LP@penalty#1\@M
    \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\RestoreSpaces}
% \begin{macro}{\RemoveSpaces}
% A simple command to turn off |\if@nobreak| flag.
%    \begin{macrocode}
\newcommand\RestoreSpaces{\@nobreakfalse}
%    \end{macrocode}
% Opposite command. Turns on |\if@nobreak| flag.
%    \begin{macrocode}
\newcommand\RemoveSpaces {\@nobreaktrue}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\newseparatedlabel}
% \begin{macro}{\newseparatedref}
% \begin{macro}{\makelabelseparator}
% A simple command to create combined label in `label\meta{sep}sublabel' variant.
%    \begin{macrocode}
\newcommand\newseparatedlabel[3]{%
    \@ifdefinable#1{%
        \def#1##1{\protected@edef\@currentlabel{\string
            \LP@label@sep {\csname the#3\endcsname}}\label{sub##1}%
          \protected@edef\@currentlabel{\csname the#2\endcsname
            \string\LP@label@sep {\csname the#3\endcsname}}\label{##1}}}}
%    \end{macrocode}
% Command which switch on the necessary \meta{sep}.
%    \begin{macrocode}
\newcommand\newseparatedref[2]{\@ifdefinable#1{\def#1##1{{\def\LP@label@sep{#2}\ref{##1}}}}}
%    \end{macrocode}
% The definition-check of existence of command name, which will be used for separator.
% The second command defines this label separator globally.
%    \begin{macrocode}
\@ifdefinable\LP@label@sep{}
\newcommand\makelabelseparator[1]{\def\LP@label@sep{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%    \begin{macrocode}
%</listpen>
%    \end{macrocode}
%
%
%
%
%    \begin{macrocode}
%<*floatrow>
\AtBeginDocument{%
\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
\if@tempswa\RequirePackage{fr-subfig}\fi}
%</floatrow>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*frforsubfig>
%    \end{macrocode}
%
% \subsection{Support for The \package{subfig} Package}
%
% \changes{v0.2a}{2007/08/24}{Added compatibility check.}
%    \begin{macrocode}
\def\@tempb{2005/06/28 ver: 1.3 subfig package}
\expandafter\let\csname @tempa\expandafter\endcsname
    \csname ver@subfig.\@pkgextension\endcsname
\ifx\@tempa\@tempb\else
    \PackageWarning{fr-subfig}{The additions cooperated with \MessageBreak
        version `2005/06/28 ver: 1.3' of package subfig,\MessageBreak
        but only version\MessageBreak
        \csname ver@subfig.\@pkgextension\endcsname'\MessageBreak
        is available}\relax
    \fi
%    \end{macrocode}
%
% \subsubsection{Building Subfloatrow}
%
% At first defined dimension for maximal height of subcaption. Then macro
% for defining height of subcaption box.
%    \begin{macrocode}
\newlength\FBsc@max
\newlength\FBso@max
\@ifdefinable\FBsubcheight{\let\FBsubcheight\relax}
\@ifdefinable\FBsuboheight{\let\FBsuboheight\relax}
%    \end{macrocode}
%
% \begin{macro}{\adjustsubfloats}
% The user command which loaded at the end of row of subcaptions.
%    \begin{macrocode}
\newcommand\adjustsubfloats{\@tempswafalse
  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
  \if@tempswa\FB@writeaux{%
    \string\global\string\c@FBcnt\thepage
    \ifCADJ\string\edef\string\FBsubcheight{\the\FBsc@max}\fi
    \ifOADJ\string\edef\string\FBsuboheight{\the\FBso@max}\fi
   }\fi
  \global\let\FBsubcheight\relax\global\let\FBsuboheight\relax
  \global\FBso@max\z@\global\FBsc@max\z@}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Small Correction of The \package{subfig} Macro}
%
% There is a \package{subfig}'s macro with corrections wich allow to put
% alone subfloat label.
%    \begin{macrocode}
\long\def\sf@@@subfloat#1[#2][#3]#4{%
    \@ifundefined{FBsc@max}{}%
        {\FB@readaux{\let\FBsuboheight\relax}}%
    \@tempcnta=\@ne
    \if@minipage
      \@tempcnta=\z@
    \else\ifdim \lastskip=\z@ \else
      \@tempcnta=\tw@
    \fi\fi
    \ifmaincaptiontop
      \sf@top=\sf@nearskip
      \sf@bottom=\sf@farskip
    \else
      \sf@top=\sf@farskip
      \sf@bottom=\sf@nearskip
    \fi
    \leavevmode
    \setbox\@tempboxa \hbox{#4}%
%    \end{macrocode}
% In the case of empty contents of subfloat all vertical spaces zeroed.
% subcaption label created like oneline |\vtop|.
%    \begin{macrocode}
    \ifdim\wd\@tempboxa=\z@\ht\@tempboxa\z@\dp\@tempboxa\z@
      \setbox\z@\hbox{{\caption@@@make
           {\caption@lfmt{\@nameuse{sub\@captype name}}%
           {\@nameuse{thesub\@captype}}\relax}{}}}\@tempdima=\wd\z@
      \sf@top=\z@
      \sf@bottom=\z@
      \sf@capskip\z@
      \sf@captopadj\z@
      \let\sf@ifpositiontop\@firstoftwo
    \else
      \@tempdima=\wd\@tempboxa
      \@ifundefined{FBsc@max}{}%
          {\global\advance\Xhsize-\wd\@tempboxa
           \dimen@=\ht\@tempboxa
           \advance\dimen@\dp\@tempboxa
           \ifdim\dimen@>\FBso@max
             \global\FBso@max\dimen@
           \fi}%
    \fi
    \vtop\bgroup
      \vbox\bgroup
        \ifcase\@tempcnta
          \@minipagefalse
        \or
          \vskip\sf@top
        \or
          \ifdim \lastskip=\z@ \else
            \@tempskipb\sf@top\relax\@xaddvskip
          \fi
        \fi
%    \end{macrocode}
% In the case of empty contents there is used only first variant.
%    \begin{macrocode}
        \sf@ifpositiontop{%
          \ifx \@empty#3\relax \else
            \sf@subcaption{#1}{#2}{#3}%
            \vskip\sf@capskip
            \vskip\sf@captopadj
          \fi\egroup
%    \end{macrocode}
% In the case of empty contents the |\@tempboxa| box skipped .
%    \begin{macrocode}
          \hrule width0pt height0pt depth0pt
          \box\@tempboxa
        }{%
        \@ifundefined{FBsc@max}%
            {\box\@tempboxa}%
            {\ifx\FBsuboheight\relax
               \box\@tempboxa
             \else
               \vbox to \FBsuboheight{\FBafil\box\@tempboxa\FBbfil}%
             \fi}%
          \egroup
          \ifx \@empty#3\relax \else
            \vskip\sf@capskip
            \hrule width0pt height0pt depth0pt
            \sf@subcaption{#1}{#2}{#3}%
         \fi
        }%
      \vskip\sf@bottom
    \egroup
    \@ifundefined{FBsc@max}{}%
        {\addtocounter{FRobj}{-1}%
%    \end{macrocode}
% Here is the small correction:
% |\ifnum\c@FRobj>0| instead of |\ifnum\c@FRobj=0\else|.
%    \begin{macrocode}
         \ifnum\c@FRobj>0%  bugfix
           \subfloatrowsep
         \fi}%
    \ifmaincaptiontop\else
      \global\advance\@nameuse{c@\@captype}\m@ne
    \fi
  \endgroup\ignorespaces}
%    \end{macrocode}
%
% \subsubsection{Beside Labels for Subfloats}
%
% New key for beside caption of subfloat label. Beside label of subfloat
% always on the left side.
%    \begin{macrocode}
\DeclareFROpt{subcapbesideposition}{\flrow@SFbesidealign{#1}}
\newcommand*\flrow@SFbesidealign[1]{%
  \caption@ifinlist{#1}{t,top}{%
     \let\flrow@SFBalign\TopFloatBoxes
  }{\caption@ifinlist{#1}{b,bottom,default}{%
     \let\flrow@SFBalign\BottomFloatBoxes
  }{\caption@ifinlist{#1}{c,center}{%
     \let\flrow@SFBalign\CenterFloatBoxes
  }{\PackageError{floatrow}%
     {Undefined sublabel position `#1'}{\flrow@eh}%
  }}}}
\newcommand\flrow@SFBalign{\BottomFloatBoxes}
%    \end{macrocode}
%
% Macro for beside float label. Labels always placed on the left side.
%    \begin{macrocode}
\newcommand\sidesubfloat{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\subfloat outside float}\@ehd
     \expandafter\@gobble
  \else
    \expandafter\@firstofone
  \fi
  {\flrow@sidesubfloat}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\flrow@sidesubfloat{\flrow@SFBalign
  \begingroup
    \@ifundefined{caption@setfloattype}%
      \caption@settype
      \caption@setfloattype
          \@captype
%    \caption@setoptions\@captype
    \sf@ifpositiontop{%
      \maincaptiontoptrue
    }{%
      \maincaptiontopfalse
    }%
    \caption@setoptions{subfloat}%
    \caption@setoptions{sub\@captype}%
    \let\sf@oldlabel=\label
    \let\label=\subfloat@label
%    \end{macrocode}
%
% Next, a decision (based on the \texttt{\char`\\ ifmaincaptiontop}
% flag) is made of how to advance the float counter; then the
% sub-float counter is advanced and saved and a check is made if an
% optional argument is present (if not, one is supplied).
%
%    \begin{macrocode}
    \ifmaincaptiontop\else
      \advance\@nameuse{c@\@captype}\@ne
    \fi
    \refstepcounter{sub\@captype}%
    \setcounter{sub\@captype @save}{\value{sub\@captype}}%
    \@ifnextchar [%  %] match left bracket
      {\flrow@@sidesubfloat}%
      {\flrow@@sidesubfloat[\@empty]}}
%    \end{macrocode}
%
%    \begin{macrocode}
\long\def\flrow@@sidesubfloat[#1]{%
    \@ifnextchar [%  %] match left bracket
      {\flrow@@@sidesubfloat{sub\@captype}[{#1}]}%
      {\flrow@@@sidesubfloat{sub\@captype}[\@empty{#1}][{#1}]}}
%    \end{macrocode}
%
%    \begin{macrocode}
\long\def\flrow@@@sidesubfloat#1[#2][#3]#4{%
    \@ifundefined{FBsc@max}{}%
        {\FB@readaux{\let\FBsuboheight\relax}}%
    \@tempcnta=\@ne
    \if@minipage
      \@tempcnta=\z@
    \else\ifdim \lastskip=\z@ \else
      \@tempcnta=\tw@
    \fi\fi
    \sf@bottom=\z@
    \sf@top=\z@
    \leavevmode
    \setbox\@tempboxa \hbox{#2}%
    \@tempdima\wd\@tempboxa
    \setbox\@tempboxa \hbox{#4}%
    \advance\@tempdima\wd\@tempboxa
    \advance\@tempdima\labelsep
    \@ifundefined{FBsc@max}{}%
        {\global\advance\Xhsize-\wd\@tempboxa
         \dimen@=\ht\@tempboxa
         \advance\dimen@\dp\@tempboxa
         \ifdim\dimen@>\FBso@max
           \global\FBso@max\dimen@
         \fi}%
    \begin@FBBOX
        \ifcase\@tempcnta
          \@minipagefalse
        \or
          \vskip\sf@top
        \or
          \ifdim \lastskip=\z@ \else
            \@tempskipb\sf@top\relax\@xaddvskip
          \fi
        \fi
        \hbox{%
        \begin@FBBOX
           \ifx \@empty#3\relax \else
               \hbox{\caption@@@make
                  {\caption@lfmt{\@nameuse{sub\@captype name}}%
                  {\@nameuse{thesub\@captype}}\relax}{}}%
        \fi
        \end@FBBOX\hskip\labelsep\ignorespaces
        \begin@FBBOX
           \box\@tempboxa
        \end@FBBOX
        }%
        \vskip\sf@bottom
    \end@FBBOX
    \@ifundefined{FBsc@max}{}%
        {\addtocounter{FRobj}{-1}%
         \ifnum\c@FRobj>0
           \subfloatrowsep
         \fi}%
    \ifmaincaptiontop\else
      \global\advance\@nameuse{c@\@captype}\m@ne
    \fi
  \endgroup\ignorespaces}
%    \end{macrocode}
%
% \subsubsection{Alone Labels for Subfloats}
%
% Macro for creation of subfloat label only. That could be useful
% for usage with \package{psfrag} package, placing labels inside
% |picture| environment, using in tabulars etc.
%    \begin{macrocode}
\newcommand\subfloatlabel{\@ifnextchar[%]
    {\flrow@subfloatlabel}{\subfloat[]{}}}
\@ifdefinable\flrow@subfloatlabel{}
\def\flrow@subfloatlabel[#1]{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\subfloat outside float}\@ehd
  \fi
  \begingroup
    \count@#1\advance\count@\m@ne
    \csname c@sub\@captype\endcsname\count@\relax
    \@ifnextchar[%]
      {\flrow@@subfloatlabel[#1]}%
      {\subfloat[]{}\endgroup}}
\@ifdefinable\flrow@@subfloatlabel{}
\@ifundefined{newseparatedlabel}\@tempswatrue\@tempswafalse
\if@tempswa
    \def\FRsf@Flabel{\label}
\else
    \newseparatedlabel\FRsf@Flabel{\@captype}{sub\@captype}
\fi
\def\flrow@@subfloatlabel[#1][#2]{%
    \subfloat[]{\FRsf@Flabel{#2}}\endgroup}
%    \end{macrocode}
%
%    \begin{macrocode}
%</frforsubfig>
%    \end{macrocode}
%
%
%
%
%    \begin{macrocode}
%<*floatrow>
\AtBeginDocument{%
\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
\if@tempswa\RequirePackage{fr-longtable}\fi}
%</floatrow>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*forlongtable>
%    \end{macrocode}
%
% \subsection{Support for The \package{longtable} Package}
%
% First goes requirement of necessary packages.
%    \begin{macrocode}
\RequirePackage{longtable}[2004/02/01]
%\RequirePackage{floatrow}[2007/05/24]
%    \end{macrocode}
%
% \subsubsection{Caption Width Settings}
%
% To follow layout for tables which need size of caption equal to width
% of table, here added a code which catches width of table from
% \file{aux}-file and sets to |\LTcapwidth| parameter (great thanks
% A.~Sommerfeldt for compact code created as patch of |\LT@array| command).
%
% At first we save macro |\LT@array| under name |\flrow@LT@array|.
% Then start redefinition.
%    \begin{macrocode}
\@ifdefinable\flrow@oriLT@array{\let\flrow@oriLT@array\LT@array}
\renewcommand\LT@array{%
%    \end{macrocode}
% Here are added settings for table font (similar to other table
% environments) skip after caption (\cmd{\belowcaptionskip} is set
%   equal to \cmd{\captionskip}).
%    \begin{macrocode}
   \flrow@setlist{{table}{longtable}}\flrow@useLTcapwidth\normalfont\floatfont
   \belowcaptionskip\captionskip
%    \end{macrocode}
% Here goes safe and redefinition of |\LT@make@row| macro in the way
% of managing of counting of table width.
%    \begin{macrocode}
   \FBifLTcapwidth
     {\let\flrow@LT@make@row\LT@make@row
     \def\LT@make@row{%
       \let\LT@make@row\flrow@LT@make@row
       \LT@make@row
%    \end{macrocode}
% The |\LT@entry| here used for width calculation.
%    \begin{macrocode}
       \ifx\LT@save@row\relax\else\begingroup
         \LTcapwidth\z@
         \def\LT@entry####1####2{\advance\LTcapwidth####2}\LT@save@row\relax
         \ifdim\LTcapwidth=\z@\else\global\LTcapwidth\LTcapwidth\fi
       \endgroup\fi}}%
%    \end{macrocode}
% Definition for table foot
%   material (\cmd{\floatfoot}).
%    \begin{macrocode}
   \def\floatfoot@{\vskip\floatfootskip
       \def\@captype{table}\floatfoot@box}%
%    \end{macrocode}
% At last goes \package{longtable}'s macro itself.
%    \begin{macrocode}
   \flrow@oriLT@array}
%    \end{macrocode}
% The repeated definitions in the case of separate usage of \package{fr-longtable} package.
%    \begin{macrocode}
\providecommand\floatfont{}
\providecommand\floatfootskip{\skip\@mpfootins}
\providecommand\captionskip{10\p@}
\providecommand\floatfoot@box[1]{%
%    \end{macrocode}
% The |\if@@FS| flag stored for |wrap...| environments.
%    \begin{macrocode}
%    \hsize\columnwidth\linewidth\columnwidth
    \@parboxrestore\reset@font\color@begingroup
%    \end{macrocode}
% Apply current float settings.
%    \begin{macrocode}
  \caption@setoptions{\@captype}%
%    \end{macrocode}
% Apply floatfoot settings.
%    \begin{macrocode}
  \caption@setoptions{floatfoot}%
%    \end{macrocode}
% No captionlabel.
%    \begin{macrocode}
    \captionsetup{labelformat=empty,labelsep=none}%
     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
  \color@endgroup}
%    \end{macrocode}
%
% The definition of caption width for |longtable| environment.
%    \begin{macrocode}
\let\FBifLTcapwidth\@gobble
\providecommand\caption@ifinlist[2]{%
  \let\next\@secondoftwo
  \edef\caption@tempa{#1}%
  \@for\caption@tempb:={#2}\do{%
    \ifx\caption@tempa\caption@tempb
      \let\next\@firstoftwo
    \fi}%
  \next}
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand*\flrow@useLTcapwidth{}
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand*\setLTcapwidth[1]{%
  \caption@ifinlist{#1}{table,contents,LTcapwidthtotable}{\def\flrow@useLTcapwidth
    {\let\FBifLTcapwidth\@firstofone}}{\def\flrow@useLTcapwidth
    {\let\FBifLTcapwidth\@gobble\setlength\LTcapwidth{#1}}}}
\@ifpackageloaded{floatrow}
    {\DeclareFROpt{LTcapwidth}{\setLTcapwidth{#1}}
     \DeclareOption{table}{\setLTcapwidth{table}}
     \ProcessOptions
      }
    {\DeclareOption{LTcapwidthtotable}{\setLTcapwidth{table}}
     \DeclareOption{table}{\setLTcapwidth{table}}
     \ProcessOptions
     \let\flrow@setlist\@gobble}
%    \end{macrocode}
%
% \subsubsection{Additional Settings for Last Head and Pre-Last Foot}
%
% The box for last head. Defined in the same way as analog macros in
% \package{longtable} package.
%    \begin{macrocode}
\newbox\flrow@LT@lasthead
\newbox\flrow@LT@prelastfoot
%    \end{macrocode}
% This counter register is used for checking of last longtable page.
%    \begin{macrocode}
\newcounter{FBLTpage}
%    \end{macrocode}
%
% Storing of original definition of |\longtable| macro.
% In the new definition was added counting of |longtable|'s pages
% with |FBLTpage| counter defined before.
%    \begin{macrocode}
\@ifdefinable\FB@ori@longtable{\let\FB@ori@longtable\longtable}
\def\longtable{%
  \setcounter{FBLTpage}\@ne
  \FB@ori@longtable}
%    \end{macrocode}
%
% Storing original definition of |\LT@ouput| macro.
% Here, in new definition, added increasing of |FBLTpage|.
% In the case of defined |\lasthead| contents and last page was
% checked, the contents of last head loaded.
%    \begin{macrocode}
\@ifdefinable\FB@ori@LT@output{\let\FB@ori@LT@output\LT@output}
\def\LT@output{%
  \@ifundefined{FBLTpage@\romannumeral\c@LT@tables}%
    {\gdef\flrow@LTlastpage{2}}{\@nameuse{FBLTpage@\romannumeral\c@LT@tables}}%
  \addtocounter{FBLTpage}\@ne
  \ifvoid\flrow@LT@lasthead\else
     \ifnum\value{FBLTpage}=\flrow@LTlastpage
        \let\LT@head\flrow@LT@lasthead
     \fi
  \fi
%    \end{macrocode}
% Switching on of the |\LT@prelastfoot| also needs the real value of
% |\flrow@LTlastpage| (why???).
%    \begin{macrocode}
  \ifvoid\flrow@LT@prelastfoot\else
     \count@\flrow@LTlastpage\relax
     \ifnum\value{FBLTpage}=\count@
        \let\LT@foot\flrow@LT@prelastfoot
     \fi
  \fi
  \FB@ori@LT@output}
%    \end{macrocode}
%
% The definition of last head box and foot of the page before last.
% They are defined in the same way as other commands in \package{longtable}
% package, like |\endlastfoot|.
% Here was used |\def| as for all |\end..| commands. I hope if \package{longtable}
% will use these synonyms it will use also synonyms for
% || and || box register commands at the very beginning of package.
% Use command names with the analogous names
% in the hope that their synonyms will appear in the ``host''-package
% and in this case current package stops interfere.
%    \begin{macrocode}
\@tempswafalse
\ifx\endlasthead\undefined\@tempswatrue\else
   \ifx\endlasthead\relax\@tempswatrue
\fi\fi
\if@tempswa
    \def\endlasthead{\LT@end@hd@ft\flrow@LT@lasthead}
\else
\PackageError{fr-longtable}{The command \string\endlasthead\MessageBreak
            already defined by longtable package}
\fi
\@tempswafalse
\ifx\endprelastfoot\undefined\@tempswatrue\else
   \ifx\endprelastfoot\relax\@tempswatrue
\fi\fi
\if@tempswa
    \def\endprelastfoot{\LT@end@hd@ft\flrow@LT@prelastfoot}
\else
\PackageError{fr-longtable}{The command \string\endprelastfoot\MessageBreak
            already defined by longtable package}
\fi
%    \end{macrocode}
%
% Redefined |\endlongtable| command---added code which writes
% the number of pages of long table.
%    \begin{macrocode}
\@ifdefinable\FB@ori@endlongtable{\let\FB@ori@endlongtable\endlongtable}
\def\endlongtable{%
  \FB@ori@endlongtable
%    \end{macrocode}
% Here is additional code.
% Why it is necessary to reduce counter of pages by~1?
%    \begin{macrocode}
  \if@filesw
    {\advance\c@FBLTpage\m@ne
    \immediate\write\@auxout{%
      \gdef\expandafter\noexpand
        \csname FBLTpage@\romannumeral\c@LT@tables\endcsname
          {\string\gdef\string\flrow@LTlastpage{\the\c@FBLTpage}}%
      }}%
  \fi
  }
%    \end{macrocode}
%    \begin{macrocode}
%</forlongtable>
%    \end{macrocode}
%
%
% \Finale
\endinput