summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fixme/fixme.dtx
blob: 6cf902ef5f2da6df34bbc9674b67ccd192acb79e (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
% \iffalse
%
% fixme.dtx --- docTeX file for FiXme
%
% Copyright (C) 1998-2002, 2004-2007, 2009, 2013, 2017-2019 Didier Verna
%
% Author: Didier Verna <didier@didierverna.net>
%
% This file is part of FiXme.
%
% FiXme may be distributed and/or modified under the conditions of the LaTeX
% Project Public License, either version 1.3 of this license or (at your
% option) any later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt and version 1.3 or later is part of
% all distributions of LaTeX version 2005/12/01 or later.
%
% FiXme consists of the files listed in the file `README.md'.
%
%
% Commentary:
%
%
% Code:
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
\usepackage{xspace}

\usepackage{dox}[2009/09/21]
\doxitem[idxtype=env.]{Env}{environment}{environments}
\doxitem[idxtype=opt.]{Option}{option}{options}
\doxitem[idxtype=cnt.]{Counter}{counter}{counters}
\doxitem[idxtype=lang.]{Lang}{lang}{languages}
\doxitem[idxtype=cond.]{Cond}{cond}{conditionals}
\doxitem{Face}{face}{faces}
\doxitem{Color}{color}{colors}
\doxitem[idxtype={note lt.}]{Layout}{layout}{note layouts}
\doxitem[idxtype={env. lt.}]{EnvLayout}{envlayout}{env. layouts}
\doxitem[idxtype={target lt.}]{TargetLayout}{targetlayout}{target layouts}
\doxitem{Theme}{theme}{themes}

% #### NOTE: I don't want to \usepackage{fixme} just for getting the file
% information. So here what I do: generate a header with only the
% \ProvidesPackage command, and also the \fixmelogo. Then, I \input it so that
% \GetFileInfo works. However, I need to manually set the current file name
% and extension that would normally be set by \RequirePackage. Also, note that
% the call to \GetFileInfo below needs to use the extension of the header,
% that is inc instead of sty, even the file fixme.inc does not really exist.
\makeatletter
  \def\@currname{fixme}
  \def\@currext{inc}
\makeatother
\input{header.inc}
% \OnlyDescription
\CodelineIndex
% \RecordChanges
\setcounter{secnumdepth}{4}
\begin{document}
\DocInput{fixme.dtx}
\end{document}
%</driver>
%
% \fi
%
% \CheckSum{1769}
% \GetFileInfo{fixme.inc}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%
% \MakeShortVerb{\|}
%
% \makeatletter
% \def\ps@mystyle{
%   \def\@oddfoot{\hfil\thepage\hfil}
%   \def\@evenfoot{\hfil\thepage\hfil}
%   \def\@evenhead{\hfil\slshape\leftmark}
%   \def\@oddhead{\slshape\rightmark\hfil}}
% \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{%
%     -3.25ex\@plus -1ex \@minus -.2ex}{%
%     1.5ex \@plus .2ex}{%
%     \normalfont\normalsize\bfseries}}
% \makeatother
%
% \newcommand*\DescribeBooleanOption[1]{%
%   {\let\oldpdo\PrintDescribeOption%
%     \def\PrintDescribeOption##1{\oldpdo{[no]##1}}%
%     \let\oldsoi\SpecialOptionIndex%
%     \def\SpecialOptionIndex##1{\oldsoi{##1}\oldsoi{no##1}}%
%     \DescribeOption{#1}}}
%
% \newenvironment{booleanoption}[1]{%
%   \let\oldpon\PrintOptionName%
%   \def\PrintOptionName##1{\oldpon{[no]##1}}%
%   \let\oldsmoi\SpecialMainOptionIndex%
%   \def\SpecialMainOptionIndex##1{\oldsmoi{##1}\oldsmoi{no##1}}%
%   \begin{option}{#1}}{%
%     \end{option}}
%
% ^^A Let's not depend on varioref for just that:
% \newcommand\sectionref[1]{\ref{#1} on page \pageref{#1}}
%
% \newcommand\etc{\textit{etc.}\xspace}
% \newcommand\vs{\textit{vs.}\xspace}
% \newcommand\ie{\textit{i.e.}\xspace}
% \newcommand\komascript{\textsc{Koma}-Script\xspace}
% \newcommand\auctex{AUC\TeX\xspace}
% \newcommand\emacs{\textsf{Emacs}\xspace}
%
% \newcommand\fx{\fixmelogo\xspace}
% \newcommand\packagecopyright{%
%   Copyright \copyright{} 1998--2002, 2004--2007, 2009, 2013, 2017-2019 Didier Verna}
%
% \pagestyle{mystyle}
% \newcommand\fxmarkright{%
%   \markright{\hskip-.5\marginparwidth \fx \fileversion{} (\filedate)}}
% \fxmarkright
%
% \date{\texttt{\fileversion{} (\filedate)}}
% \title{\fx{} -- Collaborative annotation tool for \LaTeX\footnote{%
%     \fx homepage: %
%     \texttt{http://www.lrde.epita.fr/\~{}didier/software/latex.php\#fixme}}}
% \author{Didier Verna\\
%   \texttt{mailto:didier@didierverna.net}\\
%   \texttt{http://www.lrde.epita.fr/\~{}didier/}}
% \maketitle
%
%
% \begin{abstract}
%   \fx is a collaborative annotation tool for \LaTeX{} documents. Annotating
%   a document here refers to inserting meta-notes, that is, notes that do not
%   belong to the document itself, but rather to its development or reviewing
%   process. Such notes may involve things of different importance levels,
%   ranging from simple ``fix the spelling'' flags to critical ``this
%   paragraph is a lie'' mentions. Annotations like this should be visible
%   during the development or reviewing phase, but should normally disapear in
%   the final version of the document.
%
%   \fx is designed to ease and automate the process of managing collaborative
%   annotations, by offering a set of predefined note levels and layouts, the
%   possibility to register multiple authors, to reference annotations by
%   listing and indexing \etc \fx is extensible, giving you the possibility to
%   create new layouts or even complete ``themes'', and also comes with
%   support for \auctex.
%
%   The \fx package is \packagecopyright{}, and distributed under the
%   terms of the LPPL license.
% \end{abstract}
%
% \tableofcontents
%
% \section{Installation}
% \subsection{Extraction}
% If you are building \fx from the tarball you need to execute the following
% steps in order to extract the necessary files. \fx also requires the
% \textsf{DoX} package (version 2.0, release date 2009/09/21 or later), to
% build. It is not required to use the package.
% \begin{verbatim}
% [pdf]latex fixme.ins
% [pdf]latex fixme.dtx
% [pdf]latex fixme.dtx
% makeindex -s gind fixme.idx
% [pdf]latex fixme.dtx
% [pdf]latex fixme.dtx
% \end{verbatim}
% After that, you need to install the generated documentation and style files
% to a location where \LaTeX{} can find them.
%
% \subsection{TDS-compliant layout}
% For a TDS-compliant layout, the following locations are suggested:
% \begin{verbatim}
% [TEXMF]/tex/latex/fixme/fixme.sty
% [TEXMF]/tex/latex/fixme/layouts/fxlayout*.sty
% [TEXMF]/tex/latex/fixme/layouts/env/fxenvlayout*.sty
% [TEXMF]/tex/latex/fixme/layouts/target/fxtargetlayout*.sty
% [TEXMF]/tex/latex/fixme/themes/fxtheme*.sty
% [TEXMF]/doc/latex/fixme/fixme.[pdf|dvi]
% \end{verbatim}
%
% \subsection{\auctex support}
% \auctex is a powerful major mode for editing \TeX{} documents in
% \emacs. In particular, it provides automatic completion of command names
% once they are known. \fx supports \auctex by providing a style file named
% \texttt{fixme.el} which contains \auctex definitions for the relevant
% commands. This file should be installed in a place where \auctex can find it
% (usually in a subdirectory of your \LaTeX{} styles directory). Please refer
% to the \auctex documentation for more information on this.
%
% \section{Features summary}
% If you're new to \fx, you might be interested in a brief summary of the
% features it provides. Otherwise, you may only take a look at the History
% section (section \sectionref{sec:manual:history}) to see what's new.
% \subparagraph{Annotation levels} \fx annotations may be of four different
% importance levels, ranging from simple not-so-important notices to critical
% things that must absolutely be fixed in the final version.
% \subparagraph{Layouts and themes} \fx gives you full and extensible control
% on the layout of these annotations: they can be displayed inline, as
% marginal paragraphs, as footnotes and also in any kind of user-defined way.
% All these ``layouts'' may be combined together. \fx also comes with support
% for ``themes'', globally modifying existing layouts, or providing new ones.
% \subparagraph{Annotation targets} Annotations may be ``targeted'' to a
% specific portion of text that will be highlighted, and on the contrary
% ``floating'' around, in which case they may even appear in the document's
% preamble.
% \subparagraph{Listing and indexing} Annotations may be indexed and
% summarized in a ``list of fixmes''.
% \subparagraph{Logging} Annotations are recorded in the log file, and
% (depending on their importance level) some of them are displayed on the
% terminal during compilation. A final summary is also created at the end of
% the compilation process.
% \subparagraph{Modes} All these features are actually available when you're
% working in \texttt{draft} mode. In \texttt{final} mode, the behavior is
% slightly different: any remaining critical note generates an error (the
% compilation aborts), while non critical ones are just removed from the
% document's body (they're still recorded in the log file though).
% \subparagraph{Authoring} \fx provides support for collaborative annotating
% by allowing you to ``register'' several authors.
% \subparagraph{Internationalization} \fx currently supports 7 different
% languages and features automatic language tracking for multilingual
% documents.
%
% \section{Using \fx}
% \subsection{Initialization}
% \subsubsection{Requirements}
% In order to work properly, \fx requires the presence of some \LaTeX{}
% packages. You don't have to load them explicitly though. As long as
% \LaTeX{} can locate them, they will be used automatically. \fx currently
% depends on \texttt{xspace}, \texttt{ifthen}, \texttt{verbatim} and
% \texttt{xkeyval} (version 2.5f, release date 2006/11/18 or later).
%
% \subsubsection{Loading the package}
% In order to load \fx, simply say |\usepackage[|\meta{options}|]{fixme}|
% in the preamble of your document. There is an important number of options
% that you can use in order to customize \fx's default or global behavior.
% These options will be discussed when appropriate.
%
% There might be times where you would like to use \LaTeX{} commands in
% package options (for example, see section \sectionref{sec:manual:faces}). In
% such a case, you should know that \LaTeX{} normally can't handle this. In
% order to make it work, you need to use the \texttt{xkvltxp} package first,
% like this:
% \begin{verbatim}
% \usepackage{xkvltxp}
% \usepackage[myoption=\mymacro]{fixme}
% \end{verbatim}
%
% \subsubsection{Global setup modification}
% \DescribeMacro{\fxsetup}\marg{options}\\
% Another way of customizing \fx's global behavior is to use the
% \cs{fxsetup} command. \cs{fxsetup} understands the same options as the
% package itself and can be used in the preamble as well as in the document's
% body.
%
% \subsubsection{Local setup modification}
% Finally, note that unless specified otherwise, all package options are also
% understood by the annotation commands or environments described in
% section \sectionref{sec:manual:insertion}. The effect is then local to that
% particular command.
%
% \subsection{Inserting \fx notes\label{sec:manual:insertion}}
% \subsubsection{Commands}
% \DescribeMacro{\fxnote}
% \DescribeMacro{\fxwarning}
% \DescribeMacro{\fxerror}
% \DescribeMacro{\fxfatal}\oarg{options}\marg{note}\\
% \fx provides four annotation commands corresponding to different
% levels of importance (notes, warnings, errors and fatal errors).
% \cs{fxfatal} is a bit different from the other ones, as will be explained in
% section \sectionref{sec:manual:behavior}.\par
% \begin{quotation}\itshape
%   \DescribeMacro{\fixme}
%   \textbf{Warning:} as of version 4, the \cs{fixme} command is a synonym for
%   \cs{fxfatal} and is considered deprecated.
% \end{quotation}
%
% \subsubsection{Targeted commands}
% \DescribeMacro{\fxnote*}
% \DescribeMacro{\fxwarning*}
% \DescribeMacro{\fxerror*}
% \DescribeMacro{\fxfatal*}\oarg{options}\marg{note}\marg{text}\\
% Sometimes, you might not only want to issue a \fx note, but also highlight
% the relevant part of the text to which it applies. This is what I call
% ``targeting'' the annotation. As of version 4, \fx provides starred versions
% of its annotation commands to do that. In star form, these commands expect
% an additional mandatory argument containing the text to be highlighted.
%
% \subsubsection{Environments}
% \begin{quotation}\itshape
%   \textbf{Warning:} as of version 4.0, the environment interface has changed
%   and is \emph{not} backward-compatible.
% \end{quotation}
% \DescribeEnv{anfxnote}
% \DescribeEnv{anfxwarning}
% \DescribeEnv{anfxerror}
% \DescribeEnv{anfxfatal}\oarg{options}\marg{summary}\\
% \fx annotations are normally meant to be short: consider that they are
% likely to go in the list of fixmes and in the index for instance. If you
% feel the need for writing longer comments, the environments described below
% might come in handy. \fx provides four annotation environments; one for
% every note level. These environments take one mandatory argument (meant to
% be a short summary of the long note) and behave in exactly the same way as
% their command counterpart. The layout policy is a bit different though (see
% section \sectionref{sec:manual:layout}): the environment's contents will
% always appear inline, and the \meta{summary} will obey all active annotation
% layouts except for the \texttt{inline} one, just as if it had been passed to
% one of the \fx annotation commands described in the previous section.
% \begin{quotation}\itshape
%   \DescribeEnv{afixme}
%   \textbf{Warning:} as of version 4, the \texttt{afixme} environement is a
%   synonym for \texttt{anfxfatal}, and is considered deprecated.
% \end{quotation}
%
%
%
% \subsubsection{Targeted environments}
% \DescribeEnv{anfxnote*}
% \DescribeEnv{anfxwarning*}
% \DescribeEnv{anfxerror*}
% \DescribeEnv{anfxfatal*}\oarg{options}\marg{summary}\marg{text}\\
% \fx environments can also be targeted to a specific portion of text. When
% using the starred version, the environments expect one additional mandatory
% argument: the text in question that will be highlighted.
%
% \subsection{List of \fx's\label{sec:manual:lox}}
% \DescribeMacro{\listoffixmes}
% \fx remembers where you put your annotations in a toc-like file whose
% extension is \texttt{lox}. The \cs{listoffixmes} command generates the
% annotations lists in a manner similar to that of the ``list of figures''. A
% standard layout is automatically selected for the \texttt{article},
% \texttt{report} and \texttt{book} classes and the AMS ones. If loaded, \fx
% will also use the \texttt{tocbasic} package which makes it compliant with
% the \komascript classes and any other document using it.  If another class
% is used, the \texttt{article} layout is selected. Also, note that if there
% isn't any annotation left in the document, this command doesn't generate an
% empty list, but rather stays silent. It also stays silent in \texttt{final}
% mode, regardless of the presence of remaining annotations (see
% section \sectionref{sec:manual:behavior}).
%
% \subsection{Controlling the behavior of \fx\label{sec:manual:behavior}}
% \DescribeOption{final}
% \DescribeOption{draft}
% The behavior of \fx is controlled by the two standard options
% \texttt{final} and \texttt{draft}. These options are usually given to
% \cs{documentclass} which in turn passes them to all packages. In addition,
% you can also use them as options to \cs{usepackage}, in the call to
% \cs{fxsetup}, and even to the annotation commands and environments.
%
% In \texttt{draft} mode, annotations are recorded in the log file and appear
% in the document as specified by the layout settings (see section
% \sectionref{sec:manual:layout}). Additionally, warnings, errors and fatal
% errors are also displayed on the terminal.
%
% In final mode, non fatal annotations (those generated by \cs{fxnote},
% \cs{fxwarning}, \cs{fxerror} and their corresponding environments) are still
% logged, but they're not typeset. On the other hand, fatal ones (those
% generated by the \cs{fxfatal} command and the \texttt{anfxfatal}
% environment) will throw a \LaTeX{} error and thus interrupt or abort
% compilation with an informative message. This will help you track down
% forgotten important caveats in your document.
%
% Let me rephrase: final documents can only have \fx notes, warnings, and (non
% fatal) errors left. Of course, this is not completely true: remember that
% these options are understood locally by all the annotation commands and
% environments, so even in \texttt{final} mode, you can use something like
% this:
% \begin{verbatim}
% \fxfatal[draft]{bla bla}
% \end{verbatim}
%
% \DescribeOption{status}
% By default, \fx is in \texttt{final} mode (\LaTeX{} itself behaves that
% way). If you're manipulating the document status at the level of \fx
% itself (as opposed to the \cs{documentclass} level), then the preferred way
% to do this is to use the \texttt{status} option, and give it the value
% \texttt{final} or \texttt{draft}.
%
% \subsection{Controlling the layout of annotations\label{sec:manual:layout}}
% Annotations can appear in several forms in your document. Each of these
% forms can be individually selected, or they can be combined together to some
% extend.
%
% \subsubsection{Selecting a layout}
% \paragraph{Individual control}
% For each annotation layout, there is a corresponding boolean option (for
% instance, the ``inline'' layout is controlled by the \texttt{inline}
% option). These options are understood by the package itself, the
% \cs{fxsetup} command and also locally by every annotation command or
% environment. There are some restrictions on their usage however, as
% discussed in the next section.
%
% To activate a layout, use the option alone or give it a value of
% \texttt{true}. For instance, these two forms are equivalent:
% \begin{verbatim}
% \fxnote[inline]{note...}
% \fxnote[inline=true]{note...}
% \end{verbatim}
% For convenience, each layout option has a counterpart that deactivates the
% corresponding layout. The counterpart option has the same name, prefixed
% with \texttt{no} (for instance, \texttt{noinline}). Again, these options are
% understood by the package itself, the \cs{fxsetup} command and also locally
% by every annotation command or environment (with the same usage
% restrictions, discussed in the next section). For instance, these two forms
% are equivalent:
% \begin{verbatim}
% \fxsetup{inline=false}
% \fxsetup{noinline}
% \end{verbatim}
%
% \paragraph{Global control}
% \DescribeOption{layout}
% \DescribeOption{morelayout}
% An even more convenient way to specify the required layout is to use the
% \texttt{layout} and \texttt{morelayout} options. In fact, the use of
% individual control is considered more or less deprecated. Both of these
% options take a comma-separated list of the individual options described
% above (this includes the \texttt{no}\meta{option} form as well).
%
% While the \texttt{morelayout} option \emph{adds} to the current layout
% configuration, the \texttt{layout} one completely overrides it. For
% instance, knowing that by default, only the \texttt{margin} layout is
% active, the following forms are all equivalent:
% \begin{verbatim}
% \usepackage[nomargin,inline,index]{fixme}
% \usepackage[margin=false,inline=true,index=true]{fixme}
% \usepackage[morelayout={nomargin,inline,index}]{fixme}
% \usepackage[layout={inline,index}]{fixme}
% \end{verbatim}
% Again, these two options are understood by the package itself, the
% \cs{fxsetup} command and also locally by every annotation command or
% environment (with the same usage restrictions, discussed in the next
% section).
%
% \noindent\DescribeMacro{\fxuselayouts}\marg{name,\ldots}\\
% Finally, an alternative way of selecting (or deselecting) several layouts
% simultaneously is to use the \cs{fxuselayouts} command, giving it a
% comma-separated list of layout options as its only, mandatory, argument.
%
% \subsubsection{Built-in \vs external layouts}
% Annotation layouts are provided either in the core of \fx, or in separate
% files loaded dynamically on demand. Simple layouts are typically built-in,
% whereas those requiring additional packages are external, so that they don't
% consume \TeX{} resources if not used. As a consequence, selecting an
% external layout might involve loading the relevant file first.
%
% For technical reasons, it is not possible to do such a thing outside the
% preamble, neither in the middle of processing \cs{usepackage} options. As a
% result, layout options are restricted and you have three possibilities for
% using an external layout:
% \begin{enumerate}
% \item Use its corresponding option in a call to \cs{fxsetup} in the
%   preamble, like this: |\fxsetup{|\meta{option}|}|. This will load it
%   \emph{and} select it immediately.
% \item Use the \cs{fxuselayouts} command in the preamble like this:\\
%   |\fxuselayouts{|\meta{name}|}|. This is strictly equivalent to the
%   previous solution.
% \end{enumerate}
% \DescribeMacro{\fxloadlayouts}\marg{name,\ldots}
% \begin{enumerate}
% \item[3]
%   If on the other hand you want to load one or several external layouts
%   \emph{without} using them immediately (perhaps in order to use them
%   locally in some specific annotation), use the \cs{fxloadlayouts} command
%   in the preamble like this: |\fxloadlayouts{|\meta{name}|,...}|. After
%   that, you can select any of those layouts anywhere you wish.
% \end{enumerate}
%
% \subsubsection{Available layouts}
% \DescribeBooleanOption{inline}
% \DescribeBooleanOption{margin}
% \DescribeBooleanOption{footnote}
% \DescribeBooleanOption{index}
% \DescribeLayout[noprint]{inline}
% \DescribeLayout[noprint]{margin}
% \DescribeLayout[noprint]{footnote}
% \DescribeLayout[noprint]{index}
% Table \ref{table:layouts} lists the annotation layouts currently distributed
% with \fx. By default, only the \texttt{margin} layout is active. Most of
% these layouts should be self-explanatory, but some precisions are given
% below.
% \begin{table}
%   \centering
%   \DeleteShortVerb{\|}
%   \begin{tabular}{|l|c|p{7cm}|}
%     \hline
%     \textbf{Name} & \textbf{External} & \textbf{Description}\\
%     \hline\hline
%     \texttt{inline} & & Display note inline\\
%     \texttt{margin} & & Display note in the margin\\
%     \texttt{footnote} & & Display note in a footnote\\
%     \texttt{index} & & Display note in the index\\
%     \texttt{marginclue} & & Display a marginal clue\\
%     \texttt{marginnote} & \texttt{*} & Display non-floating note in the
%     margin\\
%     \texttt{pdfnote} & \texttt{*} & Display note as inline PDF comment\\
%     \texttt{pdfmargin} & \texttt{*} & Display note as marginal PDF
%     comment\\
%     \texttt{pdfsignote} & \texttt{*} & Display signed note ala
%     \texttt{pdfnote}\\
%     \texttt{pdfsigmargin} & \texttt{*} & Display signed note ala
%     \texttt{pdfmargin}\\
%     \texttt{pdfcnote} & \texttt{*} & Display colored note ala
%     \texttt{pdfnote}\\
%     \texttt{pdfcmargin} & \texttt{*} & Display colored note ala
%     \texttt{pdfmargin}\\
%     \texttt{pdfcsignote} & \texttt{*} & Display colored note ala
%     \texttt{pdfcsignote}\\
%     \texttt{pdfcsigmargin} & \texttt{*} & Display colored note ala
%     \texttt{pdfsigmargin}\\
%     \hline
%   \end{tabular}
%   \MakeShortVerb{\|}
%   \caption{Available annotation layouts}
%   \label{table:layouts}
% \end{table}
% \paragraph{\texttt{marginclue}}
% \DescribeBooleanOption{marginclue}
% \DescribeLayout[noprint]{marginclue}
% If your preferred layout is \texttt{inline} or say, \texttt{footnote}, it
% might be somewhat difficult to localize the annotation on the page,
% especially its vertical position. That's where marginal clues come into
% play. A marginal clue does not display the annotation's contents, but only
% an indication that there is one at that (vertical) position. So you need to
% use another layout as well (again, typically \texttt{inline} or
% \texttt{footnote}) in order to get the actual annotation.
%
% Obviously, the margin and margin clue layouts are mutually exclusive, so if
% you try to activate both, only the most recently activated one will be
% enabled (and you'll get a notice in the log file and on the terminal).
%
% \paragraph{\texttt{marginnote}}\label{sec:manual:marginnote}
% \DescribeBooleanOption{marginnote}
% \DescribeLayout[noprint]{marginnote}
% The \texttt{marginnote} layout is an alternate (external) way to display
% annotations in the margin, using the eponymous package. Contrary to \LaTeX's
% standard marginal paragraphs, the ones issued by \texttt{marginnote} are
% constructed in a non-floating way. This might be an advantage in some
% situations but \texttt{marginnote} also comes with some disadvantages of its
% own. For more information, please refer to \texttt{marginnote}'s
% documentation, and also read the next section. Also, note that it is not
% currently possible to pass options to the \cs{marginnote} command through
% this layout.
%
% For a reasonably robust marginal layout accross all annotations, including
% those issued in floats, consider using \texttt{marginnote} in conjunction
% with \texttt{innerlayout=noinline} (see
% section \sectionref{sec:manual:inner}).
%
% \paragraph{PDF comments}
% \DescribeBooleanOption{pdfnote}
% \DescribeLayout[noprint]{pdfnote}
% \DescribeBooleanOption{pdfmargin}
% \DescribeLayout[noprint]{pdfmargin}
% \DescribeBooleanOption{pdfsignote}
% \DescribeLayout[noprint]{pdfsignote}
% \DescribeBooleanOption{pdfsigmargin}
% \DescribeLayout[noprint]{pdfsigmargin}
% \DescribeBooleanOption{pdfcnote}
% \DescribeLayout[noprint]{pdfcnote}
% \DescribeBooleanOption{pdfcmargin}
% \DescribeLayout[noprint]{pdfcmargin}
% \DescribeBooleanOption{pdfcsignote}
% \DescribeLayout[noprint]{pdfcsignote}
% \DescribeBooleanOption{pdfcsigmargin}
% \DescribeLayout[noprint]{pdfcsigmargin}
% The PDF format comes with a concept of \emph{comment}, which \fx can use to
% display its own annotations. Support for PDF comments varies across PDF
% viewers. Acrobat Reader is usually considered a reference, and MacOS X's
% Preview supports them reasonably well. The \texttt{pdfnote} and
% \texttt{pdfmargin} layouts use the \texttt{pdfcomment} package to display
% annotations as PDF inline or marginal comments.
%
% The \texttt{sig} versions additionally display the author's tag (see
% \sectionref{sec:manual:modes}) as a signature instead of as a prefix.
%
% The versions with a \texttt{c} in their name (as in \textbf{c}olor) use one
% of four different colors named \texttt{fx}\meta{level} (according to the
% annotation's importance level). They also avoid printing the annotation's
% level since this information is already conveyed by the color.
%
% \subsubsection{Inner layout}\label{sec:manual:inner}
% There might be various reasons for you to change the layout locally for one
% particular annotation: creating a floating one is an example, see also
% section \sectionref{sec:manual:othercommonproblems} for some others. One
% frequent reason (described below) can be handled automatically by \fx.
%
% Remember that the default layout is to use margin paragraphs. Unfortunately,
% margin paragraphs are forbidden by \TeX{} in several situations, like a
% figure's caption for instance. If you try that, you will get a cryptic ``Not
% in outer par mode'' error message.
%
% \DescribeOption{innerlayout}
% The good news is that this situation can be detected automatically. \fx
% provides an option named \texttt{innerlayout} that allows you to specify an
% alternative layout setting to use when \TeX{} is in \emph{inner} mode. In
% addition to that, \fx automatically disables the \texttt{margin} and
% \texttt{marginclue} layouts. If you really want to use marginal paragraphs
% in inner mode, a good idea is then to set your inner layout to
% \texttt{marginnote} (see section \ref{sec:manual:marginnote}).
%
% Using \texttt{innerlayout} is not as trivial as it may seem: it
% \emph{really} is an alternative layout configuration, and as such, you can
% use any combination you like of individual layout options, or you can even
% use the \texttt{layout} and \texttt{morelayout} options. This means that
% your alternative layout can either \emph{add} to the existing one, or
% \emph{override} it. Here are some examples to clarify things a little. You
% should try to understand them.
% \begin{itemize}
% \item By default, the \fx inner layout is set to just \texttt{inline}.
%   This can be simulated by the following call:
% \begin{verbatim}
% \usepackage[layout=margin,innerlayout={layout=inline}]{fixme}
% \end{verbatim}
% \item The following happens to give the same result in our particular case,
%   while having a different semantics:
% \begin{verbatim}
% \usepackage[layout=margin,innerlayout=inline]{fixme}
% \end{verbatim}
% \item If you have set \fx to use a safe layout globally (for instance,
%   \texttt{inline} and \texttt{index}), and you want to use the same layout
%   in inner mode, then you should provide an \emph{empty} inner layout, like
%   this:
% \begin{verbatim}
% \fxsetup{layout={inline,index},innerlayout=}
% \end{verbatim}
%   What would happen if you didn't provide the \texttt{innerlayout} option?
% \end{itemize}
%
% One final remark on the \texttt{innerlayout} option: this option is not
% processed immediately when you specify it, but instead, its value is stored
% and used only when needed. As a result, if you plan to use an external
% layout in inner mode (typically, \texttt{marginnote})~, you need to load it
% explicitely in the preamble first. Use \cs{fxloadlayouts} for that.
%
% \subsubsection{Other common layout
%   problems\label{sec:manual:othercommonproblems}}
% This section describes some other common problems that people have
% encountered using \fx. Although \fx might not be directly responsible
% for them, it is still good to keep them in mind.
%
% \subparagraph{Annotations in captions being counted twice} You are most
% likely using \cs{listofsomething} (figure, table, or any other kind of
% float). Note that a caption will be used twice here: once in the float
% itself, and once in the list of floats. Any \fx annotation in the caption
% will consequently be generated twice as well. The solution to this problem
% is to use the optional argument to \cs{caption}, for example:
% \begin{verbatim}
% \caption[caption text]{caption text\fxnote{yuck!}}
% \end{verbatim}
%
% \subparagraph{Footnotes and margin paragraphs in floats} Using footnotes in
% figures (and \emph{a fortiori} in a figure's caption) does not work in
% general. Although there are some workarounds out there (for instance, using
% \cs{footnotemark} and \cs{footnotetext} directly), there is no completely
% reliable solution and it is not possible to detect that situation
% automatically. Similarly, marginal paragraphs will cause problems in a
% figure (even when not in its caption) because floats can't be nested in
% \LaTeX. Usual symptoms of these situations are: a footnote not being
% typeset, compilation breakage with the ``Floats lost'' message \etc If
% you're facing this problem, you need to change your layout locally.
%
% \subparagraph{Marginal paragraphs showing up on the wrong margin} You want
% to look at the \texttt{mparhack} package.
%
% \subparagraph{ACM classes compatibility} The ACM \textsc{Sig} classes
% (\texttt{acm\_proc\_article-sp} and \texttt{sig-alternate}) forbid the use
% of \cs{marginpar}, so if you use these classes, don't forget to choose
% another layout for \fx, and also avoid using marginal clues.
%
% \subparagraph{Annotation indexing}
% Remember that some characters are special in an index entry (the \texttt{!}
% for instance). \fx currently does nothing to escape those characters, so
% avoid using them in your annotations.
%
% \subsection{Corollary: floating annotations}
% At some point, people suggested that it would be nice to have global
% annotations, not related to any portion of the text in particular. Such
% annotations could be general comments about the whole document, and could
% even be issued in the preamble. This is what I call ``floating''
% annotations.
%
% I know you don't care, but originally, I started writing a new set of
% commands to do just that. However, with the flexibility that \fx 4.0
% provides, I quickly realized that such commands were an unnecessary
% addition.
%
% Since floating anotations are not supposed to relate to any part of the
% text, they should not be typeset anywhere in it. This is especially true if
% you want to put some of them in the document's preamble. However, even a
% preamble annotation could be recorded and displayed in the index or in the
% list of fixmes. And it turns out that you can specify all that with the
% layout options described in section \sectionref{sec:manual:layout}.
%
% \DescribeOption{target}
% The only remaining problem is the page number, which normally appears in the
% list of fixmes and in the index: if you choose to reference a floating
% annotation that way, the page number is likely to be completely meaningless.
% To compensate, a new option named \texttt{target} is provided. When used,
% the given value will replace the page number in both the index and the list
% of fixmes. The target can be anything you like, but should remain rather
% short. By default, \texttt{target} is set the special value
% \texttt{thepage}, which as you guessed means to use the page number.
%
% The name "target" bears an intentional resemblance to \fx's targeted
% commands and environments, because we are indeed targetting the annotation
% to something. The only difference is that in the case of floating
% annotations, the target is non-textual.
%
% Here is an example of a floating annotation that would typically appear in
% the document's preamble:
% \begin{verbatim}
% \usepackage{hyperref}
% \fxfatal[layout=index,target=hyperref]{Fill in PDF fields (title etc.)}
% \end{verbatim}
%
% \subsection{Controlling the layout of
%   environments\label{sec:manual:envlayoutcontrol}}
% As discussed in section \sectionref{sec:manual:insertion}, the contents of a
% \fx environment (a longer annotation) always appears inline. However, the
% exact way this contents is typeset (in draft mode only) is subject to a
% layout of its own, called the ``environment layout''.
%
% \subsubsection{Selecting a layout}
% \DescribeOption{envlayout}
% The desired environment layout can be selected with the \texttt{envlayout}
% option. Contrary to the annotation layouts, only one environment layout can
% be active at a time. The \texttt{envlayout} option is understood by the
% package itself, the \cs{fxsetup} command and all the annotation environments
% (not the commands!). There are some restrictions on its usage however, as
% discussed in the next section.
%
% \noindent\DescribeMacro{\fxuseenvlayout}\marg{name}\\
% An alternative way of selecting an environment layout is to use the
% \cs{fxuseenvlayout} command, giving it the layout's name as its only,
% mandatory, argument.
%
% \subsubsection{Built-in \vs external layouts}
% Environments layouts are provided either in the core of \fx, or in separate
% files loaded dynamically on demand. Simple layouts are typically built-in,
% whereas those requiring additional packages are external, so that they don't
% consume \TeX{} resources if not used. As a consequence, selecting an
% external layout with the \texttt{envlayout} option might involve loading the
% relevant file first.
%
% \noindent\DescribeMacro{\fxloadenvlayouts}\marg{name,\ldots}\\
% For technical reasons, it is not possible to do such a thing outside the
% preamble, neither in the middle of processing \cs{usepackage} options. As a
% result, the \texttt{envlayout} option is restricted and you have three
% possibilities for using an external layout:
% \begin{enumerate}
% \item Use the \texttt{envlayout} option in a call to \cs{fxsetup} in the
%   preamble, like this: |\fxsetup{envlayout=name}|. This will load it
%   \emph{and} select it immediately.
% \item Use the \cs{fxuseenvlayout} command in the preamble like this:\\
%   |\fxuseenvlayout{name}|. This is strictly equivalent to the previous
%   solution.
% \item If on the other hand you want to load one or several environment
%   layouts \emph{without} using them immediately (perhaps in order to use
%   them locally in some specific annotation), use the \cs{fxloadenvlayouts}
%   command in the preamble like this: |\fxloadenvlayouts{|\meta{name}|,...}|.
%   After that, you can select any of those layouts anywhere you wish.
% \end{enumerate}
%
% \subsubsection{Available layouts\label{sec:manual:envlayoutslist}}
% Table \ref{table:envlayouts} lists the environment layouts currently
% distributed with \fx.
% \begin{itemize}
% \item \DescribeEnvLayout{plain}
%   The \texttt{plain} environment layout prints its contents as-is, only
%   in bold font (by default) in order to distinguish it from the surrounding
%   text.
% \item \DescribeEnvLayout{signature}
%   The \texttt{signature} environment layout prints the author's tag (see
%   \sectionref{sec:manual:modes}) as a signature instead of as a prefix. This
%   layout is used by the \texttt{signature} theme (see section
%   \sectionref{sec:manual:themes}).
% \item \DescribeEnvLayout{color}
%   \DescribeColor{fxnote}
%   \DescribeColor{fxwarning}
%   \DescribeColor{fxerror}
%   \DescribeColor{fxfatal}
%   The \texttt{color} environment layout uses one of four colors named
%   \texttt{fx}\meta{level} (according to the annotation's importance level)
%   to display its contents. It also avoids printing the annotation level,
%   since that information is already conveyed by the color. This layout is
%   used by the \texttt{color} theme (see section
%   \sectionref{sec:manual:themes}).
% \item  \DescribeEnvLayout{colorsig}
%   The \texttt{colorsig} environment layout combines the features of the
%   \texttt{signature} and \texttt{color} ones. This layout is used by the
%   \texttt{colorsig} theme (see section \sectionref{sec:manual:themes}).
% \end{itemize}
% \begin{table}
%   \centering
%   \DeleteShortVerb{\|}
%   \begin{tabular}{|l|c|p{7cm}|}
%     \hline
%     \textbf{Name} & \textbf{External} & \textbf{Description}\\
%     \hline\hline
%     \texttt{plain} & & Display contents as-is\\
%     \texttt{signature} & & Display signed contents\\
%     \texttt{color} & \texttt{*} & Display contents in color\\
%     \texttt{colorsig} & \texttt{*} & Display signed contents in color\\
%     \hline
%   \end{tabular}
%   \MakeShortVerb{\|}
%   \caption{Available environment layouts}
%   \label{table:envlayouts}
% \end{table}
%
% \subsection{Controlling the layout of
%   targets\label{sec:manual:targetlayoutcontrol}}
% As discussed in section \sectionref{sec:manual:insertion}, the starred
% versions of the \fx annotation commands and environments let you highlight a
% portion of text which is relevant to the current annotation. The exact way
% this textual target is typeset (in draft mode only; otherwise it is typeset
% as-is) is subject to a layout of its own, called the ``target layout''.
%
% \subsubsection{Selecting a layout}
% \DescribeOption{targetlayout}
% The desired layout can be selected with the \texttt{targetlayout} option.
% Contrary to the annotation layouts, only one target layout can be active at
% a time. The \texttt{targetlayout} option is understood by the package
% itself, the \cs{fxsetup} command and all the starred versions of the
% annotation commands and environments. There are some restrictions on its
% usage however, as discussed in the next section.
%
% \noindent\DescribeMacro{\fxusetargetlayout}\marg{name}\\
% An alternative way of selecting a target layout is to use the
% \cs{fxusetargetlayout} command, giving it the layout's name as its only,
% mandatory, argument.
%
% \subsubsection{Built-in \vs external layouts}
% Target layouts are provided either in the core of \fx, or in separate files
% loaded dynamically on demand. Simple layouts are typically built-in, whereas
% those requiring additional packages are external, so that they don't consume
% \TeX{} resources if not used. As a consequence, selecting an external layout
% with the \texttt{targetlayout} option might involve loading the relevant
% file first.
%
% \noindent\DescribeMacro{\fxloadtargetlayouts}\marg{name,\ldots}\\
% For technical reasons, it is not possible to do such a thing outside the
% preamble, neither in the middle of processing \cs{usepackage} options. As a
% result, the \texttt{targetlayout} option is restricted and you have two
% possibilities for using an external layout:
% \begin{enumerate}
% \item Use the \texttt{targetlayout} option in a call to \cs{fxsetup} in the
%   preamble, like this: |\fxsetup{targetlayout=name}|. This will load it
%   \emph{and} select it immediately.
% \item Use the \cs{fxusetargetlayout} command in the preamble like this:\\
%   |\fxusetargetlayout{name}|. This is strictly equivalent to the previous
%   solution.
% \item If on the other hand you want to load one or several target layouts
%   \emph{without} using them immediately (perhaps in order to use them
%   locally in some specific annotation), use the \cs{fxloadtargetlayouts}
%   command in the preamble like this:
%   |\fxloadtargetlayouts{|\meta{name}|,...}|. After that, you can select any
%   of those layouts anywhere you wish.
% \end{enumerate}
%
% \subsubsection{Available layouts\label{sec:manual:targetlayoutslist}}
% Table \ref{table:targetlayouts} lists the target layouts currently
% distributed with \fx.
% \begin{itemize}
% \item \DescribeTargetLayout{plain}
%   The \texttt{plain} target layout displays its contents as-is, only in
%   italics (by default) in order to distinguish it from the surrounding text.
% \item \DescribeTargetLayout{changebar}
%   The \texttt{changebar} target layout displays a vertical bar in the
%   margin, on the side of the target text.
% \item \DescribeTargetLayout{color}
%   \DescribeColor{fxtarget}
%   The \texttt{color} target layout uses the color named \texttt{fxtarget}
%   to display the target text. This layout is used by the \texttt{color}
%   and \texttt{colorsig} themes (see section \sectionref{sec:manual:themes}).
% \item \DescribeTargetLayout{colorcb}
%   \DescribeColor{fxnote}
%   \DescribeColor{fxwarning}
%   \DescribeColor{fxerror}
%   \DescribeColor{fxfatal}
%   The \texttt{colorcb} target layout uses one of four colors named
%   \texttt{fx}\meta{level} (according to the annotation's importance
%   level) to display a colored vertical bar in the margin, on the side of the
%   target text.
% \end{itemize}
% \begin{table}
%   \centering
%   \DeleteShortVerb{\|}
%   \begin{tabular}{|l|c|p{7cm}|}
%     \hline
%     \textbf{Name} & \textbf{External} & \textbf{Description}\\
%     \hline\hline
%     \texttt{plain} & & Display target as-is\\
%     \texttt{changebar} & \texttt{*} & Display a vertical bar aside target\\
%     \texttt{color} & \texttt{*} & Display target in color\\
%     \texttt{colorcb} & \texttt{*} & Display a colored vertical bar aside
%     target\\
%     \hline
%   \end{tabular}
%   \caption{Available target layouts}
%   \label{table:targetlayouts}
%   \MakeShortVerb{\|}
% \end{table}
%
% \subsection{Faces\label{sec:manual:faces}}
% In the \fx jargon, a ``face'' characterizes the visual aspect of some
% portion of text. If you're familiar with the \emacs editor, this will come
% as no surprise to you. \fx provides several faces that allow you to further
% customize the layout of annotations or their targets.
%
% \subsubsection{Setting face values}
% There are different ways to customize a face. The first one is to use the
% corresponding face option. For each face \meta{name}, their is a
% \meta{name}\texttt{face} option. For instance, the ``inline'' face is
% controlled by the \texttt{inlineface} option. Face options are
% understood by the package itself, the \cs{fxsetup} command and locally by
% all annotation commands or environments. Here is an example:
% \begin{verbatim}
% \fxsetup{inlineface=\bfseries}
% \end{verbatim}
%
% Since you will probably want to use \LaTeX{} commands in face values, you
% should know that \LaTeX{} normally can't handle such commands in package
% options. If you want this to work, you need to use the \texttt{xkvltxp}
% package first, like this:
% \begin{verbatim}
% \usepackage{xkvltxp}
% \usepackage[inlineface=\bfseries]{fixme}
% \end{verbatim}
%
% \noindent\DescribeMacro{\fxsetface}\marg{name}\marg{value}\\
% Another way to customize a face is to use the \cs{fxsetface} command by
% providing the face name and the face value as two mandatory arguments. For
% example:
% \begin{verbatim}
% \fxsetface{inline}{\bfseries}
% \end{verbatim}
%
% \subsubsection{Available faces}
% \subparagraph{The \texttt{inline} face}
% \DescribeFace{inline}
% By default, the \texttt{inline} annotation layout displays its contents in
% bold font, to distinguish the note from the surrounding text. This is
% controlled by the \texttt{inline} face whose value is \cs{bfseries} by
% default.
%
% \subparagraph{The \texttt{margin} face}
% \DescribeFace{margin}
% By default, the \texttt{margin} and \texttt{marginclue} layouts display
% their contents in footnote size. This is controlled by the \texttt{margin}
% face whose value is \cs{footnotesize} by default.
%
% \subparagraph{The \texttt{env} face}
% \DescribeFace{env}
% By default, the \texttt{plain} environment layout displays its contents in
% bold font, to distinguish it from the surrounding text. This is controlled
% by the \texttt{env} face whose value is \cs{bfseries} by default. The
% \texttt{color} and \texttt{colorsig} environment layouts honor this face as
% well, but reset it to \meta{nothing} first. You should probably keep the
% same value for the \texttt{inline} and \texttt{env} faces, since they are
% both used to display annotations within the document's body.
%
% \subparagraph{The \texttt{signature} face}
% \DescribeFace{signature}
% The \texttt{signature} environment layout honors the \texttt{env} face, and
% adds a \texttt{signature} face on top of it for the signature part. It is
% set to \cs{itshape} by default. The \texttt{colorsig} environment layout
% honors this face as well.
%
% \subparagraph{The \texttt{target} face}
% \DescribeFace{target}
% By default, the \texttt{plain} target layout displays its contents in
% italics, to distinguish it from the surrounding text. This is controlled by
% the \texttt{target} face whose value is \cs{itshape} by default. The
% \texttt{changebar}, \texttt{color} and \texttt{colorcb} target layouts honor
% this face as well, but reset it to \meta{nothing} first.
%
% \subsection{Controlling the logging of annotations}
% As well as being displayed in the document itself, all annotations are
% ``logged'' in different ways: by default, simple notes are recorded in the
% log file while the others (warnings, errors and fatal errors) are also
% displayed on the terminal output during compilation.
%
% \DescribeBooleanOption{silent}
% You have the ability to suppress logging altogether by using the
% \texttt{silent} option. This option is understood by the package itself, the
% \cs{fxsetup} command and all annotation commands and environments. Just
% as individual layout options, \texttt{silent} is a boolean option, so all
% those forms are possible: \texttt{silent}, equivalent to
% \texttt{silent=true}, and \texttt{nosilent}, equivalent to
% \texttt{silent=false} (the default).
%
% \subsection{Controlling the language of \fx\label{sec:manual:i18n}}
% \subsubsection{Available languages}
% \DescribeOption{english}
% \DescribeOption{french}
% \DescribeOption{francais}
% \DescribeOption{spanish}
% \DescribeOption{italian}
% \DescribeOption{german}
% \DescribeOption{ngerman}
% \DescribeOption{danish}
% \DescribeOption{croatian}
% \fx currently supports English (the default), French, Spanish, Italian,
% German, Danish and Croatian. You can select your preferred language by using
% the corresponding language option. These options usually appear in the call
% to \cs{documentclass} or \cs{usepackage}, but they are also understood by
% \cs{fxsetup} and all the annotation commands or environments. This
% allows you to change the selected language either globally or locally, and
% at any point in the document. The \texttt{french} and \texttt{francais}
% options are synonyms. The \texttt{german} and \texttt{ngerman} options are
% currently equivalent.
%
% \DescribeOption{lang}
% If you're manipulating language settings at the level of \fx itself (as
% opposed to the \cs{documentclass} level), then the preferred way to specify
% a language is to use the \texttt{lang} option, and give it the language name
% as a value. For instance:
% \begin{verbatim}
% \usepackage[lang=french]{fixme}
% \end{verbatim}
%
% \subsubsection{Language tracking}
% \DescribeOption{langtrack}
% If the document you're working on has parts written in different languages,
% it might be the case that the annotations should follow the current language
% as well (especially if you're in collaborative mode; see section
% \sectionref{sec:manual:modes}). \fx provides a boolean option named
% \texttt{langtrack}. When specified, \fx assumes that you're using
% \texttt{babel} and automatically switches to the current language (as
% specified by \texttt{babel}'s \cs{languagename} command), without requiring
% an explicit language option.
%
% \DescribeOption{defaultlang}
% In the case where tracking falls on a language unsupported by \fx, a
% warning will be issued and \fx will switch to the language specified by
% the \texttt{defaultlang} option (\texttt{english} by default). If you happen
% to get one of these warnings, please consider sending me a patch with
% support for this new language (see section \sectionref{sec:code:i18n}).
%
% Finally, note that specifying a language explicitely (by means of a language
% option) in the annotation commands and environments always takes
% precedence over the language tracking behavior.
%
% \subsubsection{Indexing in different languages}
% If your document contains annotations written in different languages, and
% you have requested the \texttt{index} layout, \fx will not only classify the
% notes by their level of importance, but also by language. For example, if
% you have \fx warnings in both English and French, you will find two
% different subcategories for warnings in the index: one called ``Warnings''
% and one called ``Avertissements''.
%
% \subsection{Standalone or collaborative mode\label{sec:manual:modes}}
% \fx supports collaborative annotations as well as ``standalone'',
% single-author documents.
%
% \subsubsection{Standalone mode}
% By default, \fx is in standalone mode, meaning that it assumes there is
% only one person annotating the document. This has several implications on
% the layout. If you've tried it already, you may have noticed the following
% points.
% \begin{itemize}
% \item All the built-in annotation layouts (index excepted) put the \fx logo
%   in front of every note. This is also true for the environments. The idea
%   is to distinguish \fx contents from the rest of the document (for instance
%   other marginal notes or footnotes).
% \item All annotations are indexed under the main \fx category, and sorted by
%   importance level, but the \fx logo is not repeated constantly (that would
%   be useless).
% \item Similarly, the list of fixmes does not clutter itself with the logo,
%   because we already know that its contents is specific to \fx.
% \end{itemize}
% As a matter of fact, when you see the \fx logo appear somewhere, you're not
% actually contemplating it, but rather the annotation's \emph{author}. It
% just happens that by default (meaning in standalone mode), the only author
% is \fx itself.
%
% \DescribeOption{author}
% In standalone mode, you might be annoyed by this orgy of \fx logos. This
% might happen if for instance you're using the \texttt{margin} layout and you
% \emph{know} there is nothing but \fx annotations in there. In such a case,
% you will most likely want to change the author to \emph{nothing}. This can
% be acomplished by using the \texttt{author} option, which is understood by
% the package itself, the \cs{fxsetup} command and all the annotation
% commands or environments. Doing something like the following will get rid of
% the damn logo for good:
% \begin{verbatim}
% \usepackage[author=]{fixme}
% \end{verbatim}
%
% \subsubsection{Collaborative mode}
% If, on the other hand, you're working in collaboration with other people,
% every potential ``fixer'' might want to tag his or her own annotations. So
% assuming that John Doe is another author, he would most likely do something
% like this:
% \begin{verbatim}
% \fxfatal[author=JD]{rephrase this}
% \end{verbatim}
% And suddenly, John's fatal comment will be prefixed with his initials. This
% is not a very satisfactory solution however, because it would require you to
% explicitely provide the author's tag in every single note you create.
% Fortunately, \fx offers an easier way to achieve this.
%
% \paragraph{Registering new authors}
% \DescribeMacro{\FXRegisterAuthor}\marg{cmdprefix}\marg{envprefix}\marg{tag}\\
% The command \cs{FXRegisterAuthor} registers a new author with \fx. It takes
% three arguments: the last one (\meta{tag}) is just the same as the value you
% would pass to the \texttt{author} option: it will serve as a prefix (or
% signature) for John's annotations. In addition to that, a complete new set
% of user-level commands (prefixed with \meta{cmdprefix}) and environments
% (prefixed with \meta{envprefix}) will be created. To clarify, suppose that
% we have registered John like this:
% \begin{verbatim}
% \FXRegisterAuthor{jd}{ajd}{JD}
% \end{verbatim}
% Now, John can use the commands \cs{jdnote}, \cs{jdwarning} \etc, along with
% their starred versions, and he can also use the environments
% \texttt{ajdnote}, \texttt{ajdwarning} \etc, along with their starred
% versions as well. If you really want to know the whole story, it turns out
% that the main \fx interface described in section
% \sectionref{sec:manual:insertion} is created with this single line of code:
% \begin{verbatim}
% \FXRegisterAuthor{fx}{anfx}{fixme}
% \end{verbatim}
%
% \textbf{Warning!} \meta{cmdprefix} and \meta{envprefix} need to be
% different, or you will get very strange errors. The technical reason is that
% in \LaTeX, an environment named \texttt{foo} is defined in terms of two
% commands: \cs{foo} and \cs{endfoo} (yes, this is silly; the first one should
% really be \cs{beginfoo}). As a consequence, if you use the same prefix, you
% will get a name clash between the annotation commands and environments.
%
% \paragraph{Fun with the \texttt{author} option}
% Some precisions about the author option are in order here. When a new
% author is registered with \fx, the generated commands and environments
% work by \emph{presetting} the author option to the specified \meta{tag}.
% This means that it is still possible to override it explicitely like this:
% \begin{verbatim}
% \jdfatal[author=Anonymous]{For $500.00, you got your Ph.D.}
% \end{verbatim}
% I don't see any good reason for doing it though, the above example
% notwithstanding.^^A $ AUCTeX hack to prevent math-mode
%
% The final remark is about the default \texttt{fx*} user interface: the
% \texttt{fixme} default user is special in that it is the only registered
% user to honor a global \texttt{author} option (provided in the call to
% \cs{usepackage} or \cs{fxsetup}). The intended use of this is that the
% \emph{main} author of the document uses the \texttt{fx*} interface
% (preferably with a personal \texttt{author} setting, different from the \fx
% logo), and all other authors are registered via \cs{FXRegisterAuthor}.
%
% \paragraph{Globally switching to collaborative mode}
% We're getting close, but we're not quite there yet. Perhaps you would like
% to see the tags from the different authors in the list of fixmes, or even in
% the index? Remember that \fx is in standalone mode by default, so the
% (only) tag does not appear in those places.
%
% \noindent
% \DescribeOption{singleuser}
% \DescribeOption{multiuser}
% \DescribeOption{mode}
% If you want this additional information, you've got to ask \fx to
% globally switch to collaborative mode. This can be done with either one of
% the three options \texttt{singleuser}, \texttt{mutliuser} or \texttt{mode}.
% \texttt{singleuser} and \texttt{multiuser} are boolean options. The
% \texttt{mode} option takes a value of either \texttt{singleuser} or
% \texttt{multiuser}. This is the preferred way to switch the mode. These
% options are understood globally by \cs{usepackage} or \cs{fxsetup}, and also
% locally by the annotation commands or environments.
%
% When collaborative mode is active, \fx adjusts the list of fixmes layout to
% display the authors tags as well. Additionally, the annotations are indexed
% as before, but additional index entries, sorted by author, are generated as
% well.
%
% \subsection{Themes\label{sec:manual:themes}}
% Themes are orthogonal to layouts: they provide a way to modify the overall
% appearance of \fx by overriding the existing layouts and/or by providing new
% ones. In fact, a theme can be any kind of customization that you would
% otherwise put in your preamble.
%
% \subsubsection{Using themes}
% \DescribeOption{theme}
% The interface for using a theme is quite simple: use the \texttt{theme}
% option and give it the name of the theme you want to use. Themes are always
% external: there are none in the  core of \fx but instead they are provided
% as independent files. As a consequence, the \texttt{theme} option has the
% same usage restrictions as all the layout options we've encountered so far.
% Moreover, it is not possible to ``maintain'' several themes and switch
% between them in a single document. Themes can be loaded only in the
% preamble.
%
% \noindent\DescribeMacro{\fxusetheme}\marg{name}\\
% An alternative to the \texttt{theme} option is to use the \cs{fxusetheme}
% command, which takes the theme's name as its only mandatory argument.
%
% \subsubsection{Available themes}
% \fx comes with a number of predefined themes listed below.
%
% \paragraph{The \texttt{signature} theme}
% \DescribeTheme{signature}
% This theme uses the \texttt{signature} environment layout (see section
% \sectionref{sec:manual:envlayoutslist}), and overrides the built-in ones to
% display the author tags as a signature (\ie at the end of the annotations)
% instead of as a prefix. All original layout faces are honored.
%
% \paragraph{The \texttt{color} theme}
% \DescribeTheme{color}
% This theme uses the \texttt{color} environment and target layouts (see
% sections \sectionref{sec:manual:envlayoutslist} and
% \sectionref{sec:manual:targetlayoutslist}), and overrides the built-in ones
% to use different colors for the different annotation levels. As a
% consequence, it also avoids printing the annotation names because this
% information is already contained in the colors themselves. All original
% layout faces are honored, but the \texttt{inline} one is reset to
% \meta{nothing}. Remember that the \texttt{env} and \texttt{target} faces are
% reset as well (this is actually done by the \texttt{color} environment and
% target layouts).
%
% \paragraph{The \texttt{colorsig} theme}
% \DescribeTheme{colorsig}
% This theme combines the features of the \texttt{color} and
% \texttt{signature} ones. All original layout faces are honored, but
% the \texttt{inline} one is reset to \meta{nothing}.
%
% \section{Extending \fx}
% Hear hear, this is where you start spending more time hacking \LaTeX{} than
% actually writing your document\ldots
%
% \subsection{Modifying existing layouts}
% \fx annotations, environment and target layouts are implemented as a (set
% of) commands conforming to strict prototypes. If you're not happy with the
% way they perform, you have the possibility to \cs{renewcommand} them (in
% fact, you should use \cs{renewcommand*} for annotation and environment
% layouts). In such a case, it is probably best to have a look at the code in
% order to figure out how the original ones are written. However, a
% description of their prototypes is given below.
%
% \subsubsection{Modifying existing annotation layouts}
% \DescribeMacro[noindex]{\FXLayout\meta{name}}
% \marg{type}\marg{annotation}\marg{author}\\
% \DescribeMacro[noprint]{\FXLayoutInline}
% \DescribeMacro[noprint]{\FXLayoutMargin}
% \DescribeMacro[noprint]{\FXLayoutFootnote}
% \DescribeMacro[noprint]{\FXLayoutIndex}
% \DescribeMacro[noprint]{\FXLayoutMarginClue}
% Each annotation layout is implemented as a macro taking three mandatory
% arguments. By convention, this macro is named \cs{FXLayout}\meta{name}, for
% instance \cs{FXLayoutInline}. \meta{type} is the annotation type. It can be
% one of \texttt{note}, \texttt{warning}, \texttt{error} and \texttt{fatal}.
% \meta{annotation} is the annotation itself, and \meta{author} is the
% author's tag.
%
% \subsubsection{Modifying existing environment layouts}
% \DescribeMacro[noindex]{\FXEnvLayout\meta{name}Begin}
% \DescribeMacro[noindex]{\FXEnvLayout\meta{name}End}\marg{type}\marg{author}\\
% \DescribeMacro[noprint]{\FXEnvLayoutPlainBegin}
% \DescribeMacro[noprint]{\FXEnvLayoutPlainEnd}
% \DescribeMacro[noprint]{\FXEnvLayoutSignatureBegin}
% \DescribeMacro[noprint]{\FXEnvLayoutSignatureEnd}
% \DescribeMacro[noprint]{\FXEnvLayoutColorBegin}
% \DescribeMacro[noprint]{\FXEnvLayoutColorEnd}
% \DescribeMacro[noprint]{\FXEnvLayoutColorSigBegin}
% \DescribeMacro[noprint]{\FXEnvLayoutColorSigEnd}
% \begin{sloppypar}\noindent
%   Each environment layout is implemented as two macros taking two mandatory
%   arguments. By convention, these macros are named
%   \cs{FXEnvLayout}\meta{name}\texttt{Begin} and
%   \cs{FXEnvLayout}\meta{name}\texttt{End}, for instance
%   \cs{FXEnvLayoutPlainBegin} and \cs{FXEnvLayoutPlainEnd}.  \meta{type} is
%   the annotation type. It can be one of \texttt{note}, \texttt{warning},
%   \texttt{error} and \texttt{fatal}. \meta{author} is the author's tag.
% \end{sloppypar}
%
% \subsubsection{Modifying existing target layouts}
% \DescribeMacro[noindex]{\FXTargetLayout\meta{name}}\marg{type}\marg{target}\\
% \DescribeMacro[noprint]{\FXTargetLayoutPlain}
% \DescribeMacro[noprint]{\FXTargetLayoutColor}
% Each target layout is implemented as a macro taking two mandatory arguments.
% By convention, this macro is named \cs{FXTargetLayout}\meta{name}, for
% instance \cs{FXTargetLayoutPlain}. \meta{type} is the annotation type. It
% can be one of \texttt{note}, \texttt{warning}, \texttt{error} and
% \texttt{fatal}.  \meta{target} is the textual target.
%
% \subsection{Creating new layouts}
% Creating a new layout first requires that you write new layout macros as
% described in the previous section. Once you've done that, the next step is
% to make \fx aware of this addition. This is called ``registering'' a layout.
%
% \subsubsection{Registering a new annotation layout}
% \paragraph{Early \vs late layouts} Normally, \fx typesets your annotations
% at the current position in the text, using a sensible order for built-in
% layouts. For instance, the \texttt{footnote} layout, if active, is performed
% before the \texttt{inline} one, so that the footnote mark is sticked to the
% preceding text and not to the annotation. When using targeted commands or
% environments, the situation is a bit more complex: some layouts make more
% sense at the beginning of the textual target, and some others at the end.
% The former ones are called ``early layouts'' and the later ones are called
% ``late layouts''. A typical example of an early layout is the
% \texttt{margin} one: if you're highlighting a long portion of text, it is
% more convenient to see the marginal note appear near the top of that text,
% rather than near the end of it (a nice illustration of this is to combine
% the \texttt{changebar} target layout and \texttt{margin} annotation layout).
% As for built-in layouts, only the \texttt{margin} and \texttt{marginclue}
% ones are early. All others are late. When you create a new layout, you need
% to decide whether it is an early or a late one.
%
% \paragraph{Registering late layouts}
% \begin{sloppypar}
%   \DescribeMacro{\FXRegisterLayout}\oarg{mutex}\marg{name}\marg{macro}\\
%   In order to register a late annotation layout with \fx, use the command
%   \cs{FXRegisterLayout}. This macro has two mandatory arguments: the layout
%   \meta{name} (at least 3 characters long) and the associated layout
%   \meta{macro}. For instance, the \texttt{inline} layout is registered like
%   this:
% \end{sloppypar}
% \begin{verbatim}
% \FXRegisterLayout{inline}{\FXLayoutInline}
% \end{verbatim}
% Once registered, the new layout gets a boolean option \meta{name} and is
% also recognized by the \texttt{layout} and \texttt{morelayout} options, as
% well as by the \cs{fxuselayouts} command as \meta{name}.
%
% The first (optional) argument \meta{mutex} is a comma-separated list of
% other layout names that should be in mutual exclusion with the layout we are
% registering (for example, the \texttt{margin} and \texttt{marginclue}
% layouts are in mutual exclusion). Note that mutual exclusion between two
% layouts need only be registered once. In other words, a previsouly
% registered layout will automatically be made aware of subsequent mutex
% declarations.
%
% \paragraph{Registering early layouts}
% \DescribeMacro{\FXRegisterLayout*}\oarg{mutex}\marg{name}\marg{macro}\\
% In order to register an early annotation layout with \fx, use the starred
% form of \cs{FXRegisterLayout}. Everything else behaves the same.
%
% \paragraph{Providing a layout}
% \DescribeMacro{\FXProvidesLayout}\marg{name}\oarg{release information}\\
% If you want to save your layout externally, you need to store it in a file
% named \texttt{fxlayout}\meta{name}\texttt{.sty} and advertise it by calling
% \cs{FXProvidesLayout}. It will then be recognized by the \cs{fxloadlayouts}
% command as \meta{name}.
%
% \subsubsection{Registering a new environment layout}
% \begin{sloppypar}
%   \DescribeMacro{\FXRegisterEnvLayout}\marg{name}\marg{begin}\marg{end}\\
%   In order to register a new environment layout with \fx, use the command
%   \cs{FXRegisterEnvLayout}. This macro has three mandatory arguments: the
%   layout \meta{name} and the associated \meta{begin} and \meta{end} macros.
%   For instance, the \texttt{color} layout is registered like this:
% \end{sloppypar}
% \begin{verbatim}
% \FXRegisterEnvLayout{color}{\FXEnvLayoutColorBegin}{\FXEnvLayoutColorEnd}
% \end{verbatim}
% Once registered, the new layout is recognized by the \texttt{envlayout}
% option and by the \cs{fxuseenvlayout} command as \meta{name}.
%
% \noindent
% \DescribeMacro{\FXProvidesEnvLayout}\marg{name}\oarg{release information}\\
% If you want to save your layout externally, you need to store it in a file
% named \texttt{fxenvlayout}\meta{name}\texttt{.sty} and advertise it by
% calling \cs{FXProvidesEnvLayout}. It will then be recognized by the
% \cs{fxloadenvlayouts} commands as \meta{name}.
%
% \subsubsection{Registering a new target layout}
% \begin{sloppypar}
%   \DescribeMacro{\FXRegisterTargetLayout}\marg{name}\marg{macro}\\
%   In order to register a new target layout with \fx, use the command
%   \cs{FXRegisterTargetLayout}. This macro has two mandatory arguments: the
%   layout \meta{name} and the associated \meta{macro}. For instance, the
%   \texttt{color} layout is registered like this:
% \end{sloppypar}
% \begin{verbatim}
% \FXRegisterTargetLayout{color}{\FXTargetLayoutColor}
% \end{verbatim}
% Once registered, the new layout is recognized by the \texttt{targetlayout}
% option and by the \cs{fxusetargetlayout} as \meta{name}.
%
% \noindent
% \DescribeMacro{\FXProvidesTargetLayout}\marg{name}\oarg{release
%   information}\\
% If you want to save your layout externally, you need to store it in a file
% named \texttt{fxtargetlayout}\meta{name}\texttt{.sty} and advertise it by
% calling \cs{FXProvidesTargetLayout}. It will then be recognized by the
% \cs{fxloadtargetlayouts} commands as \meta{name}.
%
% \subsection{Adding new options}
% \begin{quotation}\itshape
%   \textbf{Note:} \fx uses the \texttt{xkeyval} package for its underlying
%   options management, so some knowledge of this package is required in order
%   to understand the remainder of this section.
% \end{quotation}
% Yet another way to customize \fx is to plug additional behavior in, by way
% of options. As of version 4.5, \fx provides a convenient interface for
% creating new options, and associate them with code to execute.
%
% First of all, new options must belong to a ``family'', which essentially
% defines exactly where they make sense. \fx currently provides three option
% families: \texttt{Layout}, \texttt{EnvLayout}, and
% \texttt{TargetLayout}. Obviously, these families allow you to define options
% that will affect the behavior of the corresponding three kinds of layouts.
%
% For each family, \fx provides five commands wrapping around \texttt{xkeyval}
% to define special kinds of options (\emph{keys} in the \texttt{xkeyval}
% jargon). They are explained below.
%
% \noindent\DescribeMacro[noindex]{\FXDefine\meta{family}Key}
% \marg{key}\oarg{default}\marg{function}\\
% \DescribeMacro[noprint]{\FXDefineLayoutKey}
% \DescribeMacro[noprint]{\FXDefineEnvLayoutKey}
% \DescribeMacro[noprint]{\FXDefineTargetLayoutKey}
% Define an \texttt{xkeyval} ordinary \meta{key} belonging to \meta{family}.
%
% \noindent\DescribeMacro[noindex]{\FXDefine\meta{family}CmdKey}
% \oarg{mp}\marg{key}\oarg{default}\marg{function}\\
% \DescribeMacro[noprint]{\FXDefineLayoutCmdKey}
% \DescribeMacro[noprint]{\FXDefineEnvLayoutCmdKey}
% \DescribeMacro[noprint]{\FXDefineTargetLayoutCmdKey}
% Define an \texttt{xkeyval} command \meta{key} belonging to \meta{family}.
%
% \noindent\DescribeMacro[noindex]{\FXDefine\meta{family}ChoiceKey}
% \marg{key}\oarg{bin}\marg{alternatives}\oarg{default}\marg{function}\\
% \DescribeMacro[noprint]{\FXDefineLayoutChoiceKey}
% \DescribeMacro[noprint]{\FXDefineEnvLayoutChoiceKey}
% \DescribeMacro[noprint]{\FXDefineTargetLayoutChoiceKey}
% Define an \texttt{xkeyval} choice \meta{key} belonging to \meta{family}.
%
% \noindent\DescribeMacro[noindex]{\FXDefine\meta{family}VoidKey}
% \marg{key}\marg{func}\\
% \DescribeMacro[noprint]{\FXDefineLayoutVoidKey}
% \DescribeMacro[noprint]{\FXDefineEnvLayoutVoidKey}
% \DescribeMacro[noprint]{\FXDefineTargetLayoutVoidKey}
% A ``void \meta{key}'' is an option that is not supposed to get an
% argument. This property is automatically checked everytime the option is
% used.
%
% \noindent\DescribeMacro[noindex]{\FXDefine\meta{family}BoolKey}
% \oarg{func}\marg{key}\\
% \DescribeMacro[noprint]{\FXDefineLayoutBoolKey}
% \DescribeMacro[noprint]{\FXDefineEnvLayoutBoolKey}
% \DescribeMacro[noprint]{\FXDefineTargetLayoutBoolKey}
% Finally, a ``boolean \meta{key}'' is like an \texttt{xkeyval} one, with the
% addition that for every such \texttt{key}, there is a  void \texttt{nokey}
% counterpart.
%
% Every new option you define is inserted into the global options management
% mechanism, which has some implications.
% \begin{itemize}
% \item First of all, new options are automatically available almost
%   everywhere, and in particular in the \cs{fxsetup} macro, in the
%   annotations commands and environments, \etc Note however that the
%   \texttt{EnvLayout} and \texttt{TargetLayout} family options are only
%   processed when it makes sense, that is, when environments or targeted
%   commands are involved.
% \item Because new options are treated globally, they may affect every layout
%   (existing, loaded in the future, \etc) and of course, also the built-in
%   ones. Suppose, for example, that you want the ability to adjust the
%   vertical position of the marginal notes layout. One solution is to create
%   a \texttt{vadj} option like this:
%   |\FXDefineLayoutKey{vadj}{\def\marginnotevadjust{#1}}|, which you can then
%   use like that: |\fxnote[vadj=.5ex]{...}|.
% \item Finally, and again, because options are treated globally, beware of
%   name clashes! Every option name must be unique within a family.
% \end{itemize}
%
% \subsection{Creating a new theme}
% Creating a new theme may involve anything from using (by way of
% \cs{fxsetup}) or modifying existing layouts, to providing new ones. If your
% new theme has specific layouts, you may consider writing them in seperate
% files as described before, in order to make them more generally available.
%
% \noindent
% \DescribeMacro{\FXRequireLayouts}\marg{layout names}\\
% In order to use external layouts in a theme, use the command
% \cs{FXRequireLayouts}, passing it a list of \meta{layout names} as
% argument.\\
% \DescribeMacro{\FXRequireEnvLayout}
% \DescribeMacro{\FXRequireTargetLayout}\marg{name}\\
% In order to use and external environment or target layout in a theme, use
% the commands \cs{FXRequire*Layout} and give them the layout's name as
% argument.
%
% \noindent
% \DescribeMacro{\FXProvidesTheme}\marg{name}\oarg{release information}\\
% A theme should be saved in a file named
% \texttt{fxtheme}\meta{name}\texttt{.sty} and advertised by calling
% \cs{FXProvidesTheme}. It will then be recognized by the \texttt{theme}
% option and the \cs{fxusetheme} command.
%
% \subsection{Internationalization}
% \DescribeMacro[noindex]{\fx\meta{lang}name}
% \DescribeMacro[noindex]{\fx\meta{lang}sname}
% \DescribeMacro[noprint]{\fxenglishnotename}
% \DescribeMacro[noprint]{\fxenglishnotesname}
% \DescribeMacro[noprint]{\fxenglishwarningname}
% \DescribeMacro[noprint]{\fxenglishwarningsname}
% \DescribeMacro[noprint]{\fxenglisherrorname}
% \DescribeMacro[noprint]{\fxenglisherrorsname}
% \DescribeMacro[noprint]{\fxenglishfatalname}
% \DescribeMacro[noprint]{\fxenglishfatalsname}
% \DescribeMacro[noprint]{\fxfrenchnotename}
% \DescribeMacro[noprint]{\fxfrenchnotesname}
% \DescribeMacro[noprint]{\fxfrenchwarningname}
% \DescribeMacro[noprint]{\fxfrenchwarningsname}
% \DescribeMacro[noprint]{\fxfrencherrorname}
% \DescribeMacro[noprint]{\fxfrencherrorsname}
% \DescribeMacro[noprint]{\fxfrenchfatalname}
% \DescribeMacro[noprint]{\fxfrenchfatalsname}
% \DescribeMacro[noprint]{\fxspanishnotename}
% \DescribeMacro[noprint]{\fxspanishnotesname}
% \DescribeMacro[noprint]{\fxspanishwarningname}
% \DescribeMacro[noprint]{\fxspanishwarningsname}
% \DescribeMacro[noprint]{\fxspanisherrorname}
% \DescribeMacro[noprint]{\fxspanisherrorsname}
% \DescribeMacro[noprint]{\fxspanishfatalname}
% \DescribeMacro[noprint]{\fxspanishfatalsname}
% \DescribeMacro[noprint]{\fxitaliannotename}
% \DescribeMacro[noprint]{\fxitaliannotesname}
% \DescribeMacro[noprint]{\fxitalianwarningname}
% \DescribeMacro[noprint]{\fxitalianwarningsname}
% \DescribeMacro[noprint]{\fxitalianerrorname}
% \DescribeMacro[noprint]{\fxitalianerrorsname}
% \DescribeMacro[noprint]{\fxitalianfatalname}
% \DescribeMacro[noprint]{\fxitalianfatalsname}
% \DescribeMacro[noprint]{\fxgermannotename}
% \DescribeMacro[noprint]{\fxgermannotesname}
% \DescribeMacro[noprint]{\fxgermanwarningname}
% \DescribeMacro[noprint]{\fxgermanwarningsname}
% \DescribeMacro[noprint]{\fxgermanerrorname}
% \DescribeMacro[noprint]{\fxgermanerrorsname}
% \DescribeMacro[noprint]{\fxgermanfatalname}
% \DescribeMacro[noprint]{\fxgermanfatalsname}
% \DescribeMacro[noprint]{\fxdanishnotename}
% \DescribeMacro[noprint]{\fxdanishnotesname}
% \DescribeMacro[noprint]{\fxdanishwarningname}
% \DescribeMacro[noprint]{\fxdanishwarningsname}
% \DescribeMacro[noprint]{\fxdanisherrorname}
% \DescribeMacro[noprint]{\fxdanisherrorsname}
% \DescribeMacro[noprint]{\fxdanishfatalname}
% \DescribeMacro[noprint]{\fxdanishfatalsname}
% \DescribeMacro[noprint]{\fxcroatiannotename}
% \DescribeMacro[noprint]{\fxcroatiannotesname}
% \DescribeMacro[noprint]{\fxcroatianwarningname}
% \DescribeMacro[noprint]{\fxcroatianwarningsname}
% \DescribeMacro[noprint]{\fxcroatianerrorname}
% \DescribeMacro[noprint]{\fxcroatianerrorsname}
% \DescribeMacro[noprint]{\fxcroatianfatalname}
% \DescribeMacro[noprint]{\fxcroatianfatalsname}
% \fx's language control has been described in section
% \sectionref{sec:manual:i18n}. For every supported language \meta{lang}, a
% number of macros define the language-dependent part of \fx. The commands
% \cs{fx}\meta{lang}\texttt{notename}, \cs{fx}\meta{lang}\texttt{notesname},
% and their equivalent for the other annotation levels define the singular and
% plural forms of the note names.\\
% \DescribeMacro[noindex]{\ \unskip\meta{lang}listfixmename}
% \DescribeMacro[noprint]{\englishlistfixmename}
% \DescribeMacro[noprint]{\frenchlistfixmename}
% \DescribeMacro[noprint]{\spanishlistfixmename}
% \DescribeMacro[noprint]{\italianlistfixmename}
% \DescribeMacro[noprint]{\germanlistfixmename}
% \DescribeMacro[noprint]{\danishlistfixmename}
% \DescribeMacro[noprint]{\croatianlistfixmename}
% The title for the list of fixmes is defined by the command
% \cs{}\meta{lang}\texttt{listfixmename}.
%
% All of these commands may be renewed, and their values will be honored by
% \fx in all situations, including potential language changes across the
% document.
%
% \section{History\label{sec:manual:history}}
% \begin{itemize}
% \item[v4.5] Public interface for extending \fx with new key/value options.\\
%   Revamp the \auctex support, with help from Arash Esbati and
%   Ikumi Keita.\\
%   Fix PDF signature layouts not working anymore, reported by Soeren
%   Wolfers.\\
%   Fix spurious space at the end of environments contents, reported
%   by Frank Mittelbach.
% \item[v4.4] Handle existing yet empty lox file properly, meaning don't
%   actually typeset an empty list of corrections.\\
%   Don't update the \texttt{lox} file in final mode, avoiding potential
%   typesetting artifacts, reported by Lars Madsen.\\
%   Various internals and documentation improvements.
% \item[v4.3] Add a paragraph about the duplication of notes in captions, upon
%   exchange with Kreuvf.\\
%   Update support for the \komascript classes by using the
%   \texttt{tocbasic} interface when available, reported by Dirk Surmann.\\
%   Separate inline notes from the text they follow, suggested by Victor
%   Porton.\\
%   Fix potential inline layouts color leakage, reported by Victor Porton.\\
%   Fix several parsing problems when passing optional arguments containing
%   brackets, thanks to Joseph Wright and Lars Madsen.
% \item[v4.2] Improve Danish translation, thanks to Lars Madsen.\\
%   Fix buglet in \cs{@wrindex} redefinition, reported by Norman Gray.
% \item[v4.1] 8 new PDF-specific annotation layouts.\\
%   New annotation layout: \texttt{marginnote}, suggested by S\'ebastien
%   Mengin.\\
%   Better mechanism for handling layout mutual exclusion.\\
%   Fix bug in inner layout processing.
% \item[v4.0] Support for collaborative annotations, suggested by Michael
%   Kubovy.\\
%   Support for ``targeted'' notes and environments (highlighting a portion of
%   text), suggested by Mark Edgington.\\
%   Support for ``floating notes'' (not specific to any portion of text),
%   suggested by Rasmus Villemoes.\\
%   Support for alternative layout autoswitch in \TeX's inner mode, suggested
%   by Will Robertson.\\
%   Support for automatic language tracking in multilingual documents.\\
%   Support for themes.\\
%   Extended support for user-provided layouts.\\
%   Support for \texttt{key=value} argument syntax in the whole user
%   interface.\\
%   New command \cs{fxsetup}.\\
%   Homogenize the log and console messages.\\
%   Heavy internals refactoring.
% \item[v3.4] \cs{fixme}, \cs{fxerror}, \cs{fxwarning} and \cs{fxnote} are now
%   robust, thanks to Will Robertson.\\
%   Fix incompatibility with \komascript classes version of \cs{@starttoc}
%   when the lox file is inexistent, reported by Philipp Stephani.
% \item[v3.3] Document incompatibility between marginal layout and the ACM
%   SIG classes, reported by Jochen Wuttke.\\
%   Honor \texttt{twoside} option in marginal layout, suggested by Jens
%   Remus.\\
%   Support for \komascript classes version 2006/07/30 v2.95b, suggested by
%   Jens Remus.\\
%   Documentation improvements suggested by Brian van den Broek.\\
%   Fix incompatibility with \texttt{amsart} reported by Lars Madsen:
%   \cs{@starttoc} takes two arguments.\\
%   Fix bug reported by Stefan Mann: a typo in the \cs{fixme@footnotetrue}
%   macro name.
% \item[v3.2] Added the marginclue layout option which only signals a fixme in
%   the margin, withtout the actual contents.\\
%   Support for Croatian thanks to Marcel Maretic.\\
%   Fix incompatibility with \texttt{amsbook} reported by Claude
%   Lacoursi\`ere: \cs{@starttoc} takes two arguments.\\
%   Fix incompatibility with Beamer reported by Akim Demaille: protect
%   contents of lox file.
% \item[v3.1] Fix bug reported by Arnold Beckmann: the environments were
%   visible in final mode.
% \item[v3.0] Added environments corresponding to the annotation
%   commands.\\
%   Added an optional first argument to the annotation commands
%   to change the layout locally.\\
%   Fix bug reported by Akim Demaille: marginal notes could mess up the
%   document's layout by flushing it right.
% \item[v2.2] New option \texttt{silent} to suppress notes logging.\\
%   Support for Danish thanks to Kim Rud Bille.
% \item[v2.1] Use \cs{nobreakspace} instead of the tilda character. This
%   avoids conflicts with Babel in Spanish environments.\\
%   Fix bug reported by Knut Lickert: index entries were unconditionally
%   built.
% \item[v2.0] New feature: note levels.\\
%   New feature: \fx note counters and usage summary.\\
%   Suggestions from Kasper B. Graversen.\\
%   Support for Spanish thanks to Agust\'in Mart\'in.
% \item[v1.5] New appearance option: \texttt{inline}.
% \item[v1.4] Support for the \komascript classes.\\
%   Fix bug reported by Ulf Jaenicke-Roessler: the \cs{listoffixmes} command
%   didn't work when called before the first \fx note.
% \item[v1.3] Support for Italian thanks to Riccardo Murri.
% \item[v1.2] Support for German thanks to Harald Harders.
% \end{itemize}
%
% \StopEventually{\vfill\hfill\small \packagecopyright{}.}
%
% \section{Implementation}
% \subsection{Preamble}
%    \begin{macrocode}
%<fixme>
\NeedsTeXFormat{LaTeX2e}
%<*header>
\ProvidesPackage{fixme}[2019/01/03 v4.5 Collaborative annotations for LaTeX2e]

%</header>
%    \end{macrocode}
% Some required packages:
%    \begin{macrocode}
%<*fixme>
\RequirePackage{ifthen}
\RequirePackage{verbatim}
\RequirePackage{xkeyval}[2006/11/18]

%</fixme>
%    \end{macrocode}
% \begin{macro}{\fixmelogo}
% The \fx logo:
%    \begin{macrocode}
%<*header>
\newcommand\fixmelogo{\textsf{FiXme}}

%</header>
%    \end{macrocode}
% \end{macro}
%
% \subsection{Utilities}
% \subsubsection{Miscellaneous}
% \begin{macro}{\@fxpkginfo}
% \begin{macro}{\@fxpkgwarning}
% \marg{msg}\\
% Issue a \fx package info or warning:
%    \begin{macrocode}
%<*fixme>
\newcommand\@fxpkginfo{\PackageInfo{FiXme}}
\newcommand\@fxpkgwarning{\PackageWarning{FiXme}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxpkgerror}
% \marg{shortmsg}\marg{longmsg}\\
% Issue a \fx package error:
%    \begin{macrocode}
\newcommand\@fxpkgerror{\PackageError{FiXme}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxaddtolist}
% \marg{list}\marg{elt}\\
% Add \meta{elt} at the end of \meta{list}. We should check for duplicates,
% but this is not currently done.
%    \begin{macrocode}
\newcommand*\@fxaddtolist[2]{%
  \expandafter\ifx\csname #1\endcsname\relax%
    \expandafter\def\csname #1\endcsname{#2}%
  \else%
    \expandafter\ifx\csname #1\endcsname\empty%
      \expandafter\g@addto@macro\csname #1\endcsname{#2}%
    \else%
      \expandafter\g@addto@macro\csname #1\endcsname{,#2}%
    \fi%
  \fi}

%    \end{macrocode}
% \end{macro}
% \subsubsection{Key-value management (\texttt{xkeyval})}
% \paragraph{Shortcuts}
% The following macros are simple shortcuts for using \texttt{xkeyval} with
% the \texttt{fx} prefix.
% \begin{macro}{\@fxkeyifundefined}
% \marg{families}\marg{key}\marg{then}\marg{else}
%    \begin{macrocode}
\newcommand\@fxkeyifundefined{\key@ifundefined[fx]}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxdefinekey}
% \marg{family}\marg{key}\oarg{default}\marg{function}
%    \begin{macrocode}
\newcommand\@fxdefinekey{\define@key[fx]}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxdefinecmdkey}
% \marg{family}\oarg{mp}\marg{key}\oarg{default}\marg{function}
%    \begin{macrocode}
\newcommand\@fxdefinecmdkey{\define@cmdkey[fx]}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxdefinechoicekey}
% \marg{family}\marg{key}\oarg{bin}\marg{alternatives}\ignorespaces
% \oarg{default}\marg{function}
%    \begin{macrocode}
\newcommand\@fxdefinechoicekey{\define@choicekey[fx]}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxsetkeys}
% \marg{families}\oarg{na}\marg{keys}
%    \begin{macrocode}
\newcommand\@fxsetkeys{\setkeys[fx]}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxpresetkeys}
% \marg{families}\marg{head keys}\marg{tail keys}
%    \begin{macrocode}
%%      Note: currently unused
%%      \newcommand\@fxpresetkeys{\presetkeys[fx]}

%    \end{macrocode}
% \end{macro}
%
% \paragraph{Wrappers}
% \begin{macro}{\@fxvoidkeyerror}
% \marg{key}\marg{value}\\
% Issue a \fx error about a void \meta{key} misuse (see below):
%    \begin{macrocode}
\newcommand*\@fxvoidkeyerror[2]{%
  \@fxpkgerror{misuse of key '#1'}{%
    You have given the key '#1' the argument '#2' but it takes
    none.\MessageBreak
    Type X to quit, fix that key and re-run LaTeX.\MessageBreak}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxdefinevoidkey}
% \marg{family}\marg{key}\marg{func}\\
% A \fx ``void \meta{key}'' isn't supposed to get an argument.
%    \begin{macrocode}
\newcommand*\@fxdefinevoidkey[3]{%
  \define@key[fx]{#1}{#2}[]{%
    \ifthenelse{\equal{##1}{}}{%
      #3}{%
      \@fxvoidkeyerror{#2}{##1}}}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxdefineboolkey}
% \oarg{func}\marg{family}\marg{key}\\
% A \fx ``boolean \meta{key}'' is like an \texttt{xkeyval} one, with the
% addition that for every such \texttt{key}, there is a void \texttt{nokey}
% counterpart.
%    \begin{macrocode}
\newcommand*\@fxdefineboolkey[3][]{%
  \define@boolkey[fx]{#2}{#3}[true]{#1}
  \@fxdefinevoidkey{#2}{no#3}{\@nameuse{fx@#2@#3}{false}}}

%    \end{macrocode}
% \end{macro}
%
% \paragraph{Extension-level option creation interface}
% \begin{macro}{\@fxdefineoptioninterface}
% \marg{family}\marg{infix}
% \begin{macro}[noindex]{\FXDefine...Key}
% \begin{macro}[noindex]{\FXDefine...CmdKey}
% \begin{macro}[noindex]{\FXDefine...ChoiceKey}
% \begin{macro}[noindex]{\FXDefine...VoidKey}
% \begin{macro}[noindex]{\FXDefine...BoolKey}
% This macro defines the extension-level interface allowing users to define
% new \texttt{xkeyval} options for a certain \meta{family}. Note that the core
% of \fx could use those interfaces once defined, but it wouldn't bring much
% to the picture. Indeed, it basically boils down to using a \meta{family}
% within the names of the macros instead of as an argument (and avoiding the
% use of the ``at'' character).
%    \begin{macrocode}
\newcommand*\@fxdefineoptioninterface[2]{%
  \expandafter\newcommand\csname FXDefine#2Key\endcsname{%
    \@fxdefinekey{#1}}%
  \expandafter\newcommand\csname FXDefine#2CmdKey\endcsname{%
    \@fxdefinecmdkey{#1}}%
  \expandafter\newcommand\csname FXDefine#2ChoiceKey\endcsname{%
    \@fxdefinechoicekey{#1}}%
  \expandafter\newcommand\csname FXDefine#2VoidKey\endcsname{%
    \@fxdefinevoidkey{#1}}%
  \expandafter\newcommand\expandafter*\csname FXDefine#2BoolKey\endcsname[2][]{%
    \@fxdefineboolkey[##1]{#1}{##2}}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{List macros}
% \subsubsection{Contents lines\label{sec:code:contentsline}}
% \begin{macro}{\l@fixme}
%   We use the same layout as for the list of figures.
%    \begin{macrocode}
\let\l@fixme\l@figure
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxdottedtocline}
%   \marg{tocdepth}\marg{indent}\marg{numwidth}\marg{contents}\marg{target}\\
%   This macro is copied almost verbatim from \LaTeX's core. The intent is to
%   do a similar layout, but replacing the last argument, normally a page
%   number, by arbitrary text (in our case, a note's target). The original
%   macro defines a restricted width to typeset the page number which is much
%   too short for us, so we just let the \meta{target} text take all the space
%   it needs.
%    \begin{macrocode}
\newcommand*\@fxdottedtocline[5]{%
  \ifnum #1>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #3\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {#4}\nobreak
     \leaders\hbox{$\m@th
       \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
       mu$}\hfill
     \nobreak
     #5\par}%
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fxcontentsline}
%   \marg{contents}\marg{target}\\
%   Similar to \LaTeX's \cs{contentsline} macro, but temporarily bind
%   \cs{@dottedtocline} to our own version. The nice thing about this
%   implementation is that we can still use \cs{l@fixme} (remember that it is
%   bound to \cs{l@figure}) without exactly knowing what its definition is.
%   This macro is at the user level because \cs{contentsline} is, but it is
%   not currently documented in the user manual.
%    \begin{macrocode}
\newcommand*\fxcontentsline[2]{%
  \begingroup%
  \let\@dottedtocline\@fxdottedtocline%
  \l@fixme{#1}{#2}%
  \endgroup}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fxaddcontentsline}
%   \marg{contents}\\
%   Wrapper around \LaTeX's \cs{addcontentsline} macro to handle the
%   \texttt{target} option. If a specific target is provided, we can't use the
%   normal \cs{addcontentsline} macro for reasons explained above, so we use
%   our own version of \cs{contentsline} instead. This macro is at the user
%   level because \cs{addcontentsline} is, but it is not currently documented
%   in the user manual.
%    \begin{macrocode}
\newcommand*\fxaddcontentsline[1]{%
  \ifthenelse{\equal{\cmdfx@note@target}{thepage}}{%
    \addcontentsline{lox}{fixme}{#1}}{%
    \addtocontents{lox}{\protect\fxcontentsline{#1}{\cmdfx@note@target}}}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{List headers}
% \fx recognizes the standard \texttt{article}, \texttt{report} and
% \texttt{book} classes, the AMS ones, and adapts the list header
% accordingly. It also detects when the package \texttt{basictoc} is loaded
% and uses it, which notably makes it compliant with the \komascript classes
% as well. Otherwise, the standard \texttt{article} layout is used.
%
% \paragraph{\texttt{article} version}
% \begin{macro}{\@lox@prtc@article}
% \begin{macro}{\@lox@psttc@article}
%   \mbox{}
%    \begin{macrocode}
\newcommand\@lox@prtc@article{%
  \section*{\@fxlistfixmename%
    \@mkboth{\MakeUppercase\@fxlistfixmename}{\MakeUppercase\@fxlistfixmename}}}
\let\@lox@psttc@article\relax

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \paragraph{\texttt{report} version}
% \begin{macro}{\@lox@prtc@report}
% \begin{macro}{\@lox@psttc@report}
%   \mbox{}
%    \begin{macrocode}
\newcommand\@lox@prtc@report{%
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \else
    \@restonecolfalse
  \fi
  \chapter*{\@fxlistfixmename%
    \@mkboth{\MakeUppercase\@fxlistfixmename}{\MakeUppercase\@fxlistfixmename}}}
\newcommand\@lox@psttc@report{\if@restonecol\twocolumn\fi}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \paragraph{\texttt{book} version}
% \begin{macro}{\@lox@prtc@book}
% \begin{macro}{\@lox@psttc@book}
%   \mbox{}
%    \begin{macrocode}
\newcommand\@lox@prtc@book{%
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \else
    \@restonecolfalse
  \fi
  \chapter*{\@fxlistfixmename%
    \@mkboth{\MakeUppercase\@fxlistfixmename}{\MakeUppercase\@fxlistfixmename}}}
\newcommand\@lox@psttc@book{\if@restonecol\twocolumn\fi}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Status/class-dependent implementation}
% \begin{macro}{\lox@final}
% \begin{macro}{\lox@draft}
%   In the new implementation of the \texttt{draft} mode below, we not only
%   check that the \texttt{lox} file exists, but also that it is not empty
%   before actually typesetting anything.
%    \begin{macrocode}
\let\lox@final\relax

\newread\lox@file
\newif\iflox@typeset
\def\lox@eol{\par}
\newcommand\lox@draft{%
  \lox@typesetfalse%
  \openin\lox@file\jobname.lox\relax
  \ifeof\lox@file\else
    \read\lox@file to \lox@maybeeol
    \ifeof\lox@file
      \ifx\lox@maybeeol\lox@eol\else\lox@typesettrue\fi
    \else
      \lox@typesettrue
    \fi
  \fi
  \closein\lox@file
  \iflox@typeset\@lox@prtc\@starttoc{lox}\@lox@psttc\else\@starttoc{lox}\fi}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\lox@draft@ams}
%   The \texttt{amsbook} and \texttt{amsart} classes have the very ugly idea
%   of redefining the \cs{@starttoc} macro to take two arguments. Therefore, I
%   need to provide a specific version of the \cs{listoffixmes} macro:
%    \begin{macrocode}
\newcommand\lox@draft@ams{\@starttoc{lox}\@fxlistfixmename}

%    \end{macrocode}
% \end{macro}
%
% \subsection{Faces}
% \begin{macro}{\fxsetface}
%   \marg{name}\marg{value}
%    \begin{macrocode}
\newcommand*\fxsetface[2]{\@fxsetkeys{face}{#1face=#2}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxnewface}
%   \oarg{default}\marg{name}\\
%   A face is just a command key:
%    \begin{macrocode}
\newcommand*\@fxnewface[2][]{%
  \@fxdefinecmdkey{face}{#2face}{}%
  \fxsetface{#2}{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxuseface}
%   \marg{name}
%    \begin{macrocode}
\newcommand*\@fxuseface[1]{\@nameuse{cmdfx@face@#1face}}

%    \end{macrocode}
% \end{macro}
%
% \subsection{Annotation layouts}
% \subsubsection{Layout modes}
% \begin{option}{multiuser}
% \begin{option}{singleuser}
% \begin{option}{mode}
%   These options specify whether \fx should function in standalone or
%   collaborative mode, allowing the different layouts to tweak their output.
%    \begin{macrocode}
\@fxdefineboolkey[%
  \ifthenelse{\equal{#1}{true}}{%
    \fx@mode@singleuserfalse}{%
    \fx@mode@singleusertrue}]{%
    mode}{multiuser}
\@fxdefineboolkey[%
  \ifthenelse{\equal{#1}{true}}{%
    \fx@mode@multiuserfalse}{%
    \fx@mode@multiusertrue}]{%
    mode}{singleuser}
\@fxdefinechoicekey{mode}{mode}{multiuser,singleuser}{\@fxsetkeys{mode}{#1}}

%    \end{macrocode}
% \end{option}
% \end{option}
% \end{option}
%
% \subsubsection{Layout creation}
% Separating between ``early'' and ``late'' layouts is needed in starred
% context, that is, when we are using targeted commands or environments.
% \begin{macro}{\@fxearlylayouts}
% \begin{macro}{\@fxlatelayouts}
%   Comma-separated lists of available early and late layouts.
%    \begin{macrocode}
\let\@fxearlylayouts\empty
\let\@fxlatelayouts\empty
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\FXProvidesLayout}
%   \marg{name}\oarg{release information}
%    \begin{macrocode}
\newcommand*\FXProvidesLayout[1]{\ProvidesPackage{fxlayout#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxrecordlayoutmutex}
%   \marg{layout}\marg{layouts}\\
%   Record mutual exclusion between \meta{layout} and the comma-separated list
%   of \meta{layouts}. For each \meta{layout}, the mutual exclusion list is
%   stored in \cs{@fxlayout@}\meta{layout}\texttt{@mutex}.
%    \begin{macrocode}
\newcommand*\@fxrecordlayoutmutex[2]{%
  \edef\@fxlts{\zap@space#2 \@empty}%
  \def\@fxexpr{\@fxaddtolist{@fxlayout@#1@mutex}}%
  \expandafter\@fxexpr\expandafter{\@fxlts}%
  \@for\@fxlt:=\@fxlts\do{\@fxaddtolist{@fxlayout@\@fxlt @mutex}{#1}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxhandlelayoutmutex}
%   \marg{layout}\\
%   Handle \meta{layout}'s mutual exclusion list.
%    \begin{macrocode}
\newcommand*\@fxhandlelayoutmutex[1]{%
  \ifthenelse{\boolean{fx@layout@#1}}{%
    \def\@fxexpr{\@for\@fxlt:=}%
    \expandafter\@fxexpr\csname @fxlayout@#1@mutex\endcsname\do{%
      \@ifundefined{iffx@layout@\@fxlt}{}{%
        \ifthenelse{\boolean{fx@layout@\@fxlt}}{%
          \@fxpkgwarning{%
            #1 layout requested;\MessageBreak
            turning \@fxlt\space layout off}%
          \@nameuse{fx@layout@\@fxlt}{false}}{}}}}{}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@FXRegisterLayout}
%   \marg{when}\oarg{mutex}\marg{name}\marg{funcname}\\
%   Register a new layout with \fx. This currently involves creating the
%   boolean layout option with an optional function argument, constructing the
%   translation macro to call the actual layout macro, and updating the
%   appropriate layout list (early or late). The translation macro can't be
%   \cs{let} to the real one, because themes might want to redefine latter. An
%   optional mutual exclusion list may also be given.
%    \begin{macrocode}
\def\@FXRegisterLayout#1[#2]#3#4{%
  \@fxkeyifundefined{layout}{#3}{%
    \@fxrecordlayoutmutex{#3}{#2}%
    \@fxdefineboolkey[\@fxhandlelayoutmutex{#3}]{layout}{#3}%
    \expandafter\def\csname @fxlayout@#3\endcsname{#4}%
    \@fxaddtolist{@fx#1layouts}{#3}}{%
    \@fxpkgerror{layout '#3' already registered}{%
      You have called \string\FXRegisterLayout\space with a name already
      in use.\MessageBreak
      If you want to modify an existing layout, renew its
      command.\MessageBreak
      Otherwise, you must choose a different name.}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FXRegisterLayout}
% \begin{macro}{\FXRegisterLayout*}
%   \meta{\texttt{*}}\oarg{mutex}\marg{name}\marg{funcname}\\
%   And the use-level interface:
%    \begin{macrocode}
\newcommand\FXRegisterLayout{%
  \@ifstar{%
    \@ifnextchar[%]
    {\@FXRegisterLayout{early}}{\@FXRegisterLayout{early}[]}}{%
    \@ifnextchar[%]
    {\@FXRegisterLayout{late}}{\@FXRegisterLayout{late}[]}}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}[noindex]{\FXDefineLayout...Key}
% \begin{macro}[noprint]{\FXDefineLayoutKey}
% \begin{macro}[noprint]{\FXDefineLayoutCmdKey}
% \begin{macro}[noprint]{\FXDefineLayoutChoiceKey}
% \begin{macro}[noprint]{\FXDefineLayoutVoidKey}
% \begin{macro}[noprint]{\FXDefineLayoutBoolKey}
% Finally, the extension-level option creation interface:
%    \begin{macrocode}
\@fxdefineoptioninterface{layout}{Layout}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Standard textual dispositions}
% \begin{macro}{\@fxtextstd}
%   \marg{type}\marg{note}\marg{author}\\
%   The standard text disposition.
%    \begin{macrocode}
\newcommand*\@fxtextstd[3]{\ignorespaces#3 \fxnotename{#1}: #2}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxsignature}
%   \marg{author}\\
%   Typeset the signature part unless \meta{author} is empty. Note that
%   \cs{ifthenelse} is fragile, so we need to make the signature stuff robust.
%    \begin{macrocode}
\DeclareRobustCommand*\@fxsignature[1]{%
  \ifthenelse{\equal{#1}{}}{}{ -- {\@fxuseface{signature}#1}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxsigstd}
%   \marg{type}\marg{note}\marg{author}\\
%   The standard signature disposition.
%    \begin{macrocode}
\newcommand*\@fxsigstd[3]{\fxnotename{#1}: #2\@fxsignature{#3}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Built-in layouts}
% Let's start with the early layouts, and continue with the late ones.
% \paragraph{Margin}
% \begin{layout}[noprint]{margin}
% \begin{face}{margin}
%   \mbox{}
%    \begin{macrocode}
\@fxnewface{margin}
%    \end{macrocode}
% \end{face}
% \begin{macro}{\FXLayoutMargin}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutMargin[3]{%
  \marginpar[\raggedleft\@fxuseface{margin}\@fxtextstd{#1}{#2}{#3}]{%
    \raggedright\@fxuseface{margin}\@fxtextstd{#1}{#2}{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@margin}
%   \begin{booleanoption}{margin}
%     \mbox{}
%    \begin{macrocode}
\FXRegisterLayout*{margin}{\FXLayoutMargin}
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \paragraph{Margin clue}
% \begin{layout}[noprint]{marginclue}
% \begin{macro}{\FXLayoutMarginCLue}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutMarginClue[3]{%
  \marginpar[%
  {\raggedleft\@fxuseface{margin}\ignorespaces#3 \fxnotename{#1}!}]{%
    \raggedright\@fxuseface{margin}\ignorespaces#3 \fxnotename{#1}!}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@marginclue}
%   \begin{booleanoption}{marginclue}
%     \mbox{}
%    \begin{macrocode}
\FXRegisterLayout*[margin]{marginclue}{\FXLayoutMarginClue}
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \paragraph{Footnote}
% \begin{layout}[noprint]{footnote}
% \begin{macro}{\FXLayoutFootnote}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutFootnote[3]{\footnote{\@fxtextstd{#1}{#2}{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@footnote}
%   \begin{booleanoption}{footnote}
%     \mbox{}
%    \begin{macrocode}
\FXRegisterLayout{footnote}{\FXLayoutFootnote}
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \paragraph{Inline}
% \begin{layout}[noprint]{inline}
% \begin{face}{inline}
%   \mbox{}
%    \begin{macrocode}
\@fxnewface{inline}
%    \end{macrocode}
% \end{face}
% \begin{macro}{\FXLayoutInline}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutInline[3]{ \@fxuseface{inline}\@fxtextstd{#1}{#2}{#3}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@inline}
%   \begin{booleanoption}{inline}
%     \mbox{}
%    \begin{macrocode}
\FXRegisterLayout{inline}{\FXLayoutInline}
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \paragraph{Index}
% \begin{layout}[noprint]{index}
% \begin{macro}{\fixmeindexname}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fixmeindexname{\fixmelogo}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@wrindex}
%   \marg{contents}\\
%   A replacement for \LaTeX's standard \cs{@wrindex} macro to deal with the
%   \texttt{target} option. When given, it is supposed to replace the page
%   number, just as in the list of fixmes.
%    \begin{macrocode}
\def\@wrindex#1{%
  \ifthenelse{\equal{\cmdfx@note@target}{thepage}}{%
    \protected@write\@indexfile{}{\string\indexentry{#1}{\thepage}}}{%
    \protected@write\@indexfile{}{\string\indexentry{#1}{\cmdfx@note@target}}}%
  \endgroup
  \@esphack}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxnotekey}
% \begin{macro}{\@fxwarningkey}
% \begin{macro}{\@fxerrorkey}
% \begin{macro}{\@fxfatalkey}
%   The keys used to sort indexed annotations by importance level:
%    \begin{macrocode}
\newcommand\@fxnotekey{***a}
\newcommand\@fxwarningkey{***b}
\newcommand\@fxerrorkey{***c}
\newcommand\@fxfatalkey{***d}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\FXLayoutIndex}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutIndex[3]{%
  \iffx@mode@multiuser%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !\@nameuse{thefx#1count}: #3: #2}%
    \index{***#3@\fixmeindexname{} (#3):%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !\@nameuse{thefx#1count}: #2}%
  \else%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !\@nameuse{thefx#1count}: #2}%
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@index}
%   \begin{booleanoption}{index}
%     \mbox{}
%    \begin{macrocode}
\FXRegisterLayout{index}{\FXLayoutIndex}
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \paragraph{Contents line\label{sec:code:contentslinelayout}}
% The contents of the \texttt{lox} file is handled through this
% pseudo-layout. It follows the normal layout design, but is not registered
% the usual way because we don't want to give the user control over it. It is
% triggered explicitely by \cs{@@@fxnote@late@draft}.
% \begin{macro}{\FXLayoutContentsLine}
%   \marg{type}\marg{note}\marg{author}\\
%    \begin{macrocode}
\newcommand*\FXLayoutContentsLine[3]{%
  \iffx@mode@multiuser%
    \fxaddcontentsline{\@fxtextstd{#1}{#2}{#3}}%
  \else%
    \fxaddcontentsline{\fxnotename{#1}: #2}%
  \fi}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Layout loading}
% \begin{macro}{\fxloadlayouts}
%   \marg{name,\ldots}
%    \begin{macrocode}
\newcommand*\fxloadlayouts[1]{%
  \edef\@fxlts{\zap@space#1 \@empty}%
  \@for\@fxlt:=\@fxlts\do{\usepackage{fxlayout#1}}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Layout control}
% \begin{macro}{\@fxsetlayoutkeys}
%   \marg{keys}
%   This macro would probably be overkill if we didn't need to
%   \cs{expandafter} it at some point (See \cs{@fxhandleinnermode}).
%    \begin{macrocode}
\newcommand\@fxsetlayoutkeys{\@fxsetkeys{layout}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxparselayout}
%   Utility macro to detect the \texttt{no}\meta{name} form of layout options.
%   The drawback of this technique is that layout options must be at least 3
%   characters long. No big deal though\ldots
%    \begin{macrocode}
\def\@fxparselayout#1#2#3\relax{\def\@fxltprefix{#1#2}\def\@fxltrest{#3}}
% \begin{macro}{\fxuselayouts}
%   \marg{[no]names}\\
%   First, ensure that those layouts are available, then activate them.
%   \cs{\FXRequireLayouts} is a better style for theme programming.
%    \begin{macrocode}
\newcommand*\fxuselayouts[1]{%
  \edef\@fxlts{\zap@space#1 \@empty}%
  \@for\@fxlt:=\@fxlts\do{%
    \expandafter\@fxparselayout\@fxlt\relax%
    \ifthenelse{\equal{\@fxltprefix}{no}}{%
      \let\@fxltname\@fxltrest}{%
      \let\@fxltname\@fxlt}%
    \@fxkeyifundefined{layout}{\@fxltname}{\fxloadlayouts{\@fxltname}}{}}%
  \@fxsetkeys{layout}{#1}}
\let\FXRequireLayouts\fxuselayouts

%    \end{macrocode}
% \end{macro}
% \begin{option}{innerlayout}
%   The alternative inner mode layout:
%    \begin{macrocode}
\@fxdefinecmdkey{layout}{innerlayout}{}
%    \end{macrocode}
% \end{option}
% \begin{option}{morelayout}
%   The \texttt{morelayout} option adds to the existing layout configuration.
%   The implementation is trivial, as it simply boils down to calling
%   \cs{setkeys} on its argument. There are several advantages in doing this.
%   \begin{enumerate}
%   \item It is possible to disable a layout by using the
%     \texttt{no}\meta{layout} form. For example,
%     |morelayout={inline,nomargin}| will work.
%   \item A wrong layout name (for instance, misspelled) will trigger an
%     \texttt{xkeyval} error.
%   \end{enumerate}
%    \begin{macrocode}
\@fxdefinekey{layout}{morelayout}{\fxuselayouts{#1}}
%    \end{macrocode}
% \end{option}
% \begin{option}{layout}
%   The \texttt{layout} option lets the user specify exactly which ones she
%   wants to use. Not very difficult to implement either: it works by first
%   deactivating all layouts, and then activating the provided ones as before.
%   Note that the use of the \texttt{no}\meta{layout} form is valid but has no
%   effect.
%    \begin{macrocode}
\@fxdefinekey{layout}{layout}{%
  \edef\@fxlayouts{\@fxearlylayouts,\@fxlatelayouts}%
  \@for\@fxlt:=\@fxlayouts\do{%
    \@nameuse{fx@layout@\@fxlt}{false}}%
  \fxuselayouts{#1}}

%    \end{macrocode}
% \end{option}
%
% \subsection{Environment Layouts}
% \subsubsection{Layout creation}
% \begin{macro}{\FXProvidesEnvLayout}
%   \marg{name}\oarg{release information}
%    \begin{macrocode}
\newcommand*\FXProvidesEnvLayout[1]{\ProvidesPackage{fxenvlayout#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FXRegisterEnvLayout}
%   \marg{name}\marg{beginfuncname}\marg{endfuncname}\\
%   Register a new environment layout with \fx. This currently only involves
%   constructing the translation macros. The translation macros in question
%   can't be \cs{let} to the real ones, because themes or users might want to
%   redefine the latter.
%    \begin{macrocode}
\newcommand*\FXRegisterEnvLayout[3]{%
  \@ifundefined{@fxenvlayout@#1@begin}{%
    \expandafter\def\csname @fxenvlayout@#1@begin\endcsname{#2}%
    \expandafter\def\csname @fxenvlayout@#1@end\endcsname{#3}}{%
    \@fxpkgerror{environment layout '#2' already registered}{%
      You have called \string\FXRegisterEnvLayout\space with a name already in
      use.\MessageBreak
      If you want to modify an existing environment layout, renew its
      commands.\MessageBreak
      Otherwise, you must choose a different name.}}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}[noindex]{\FXDefineEnvLayout...Key}
% \begin{macro}[noprint]{\FXDefineEnvLayoutKey}
% \begin{macro}[noprint]{\FXDefineEnvLayoutCmdKey}
% \begin{macro}[noprint]{\FXDefineEnvLayoutChoiceKey}
% \begin{macro}[noprint]{\FXDefineEnvLayoutVoidKey}
% \begin{macro}[noprint]{\FXDefineEnvLayoutBoolKey}
% The extension-level option creation interface:
%    \begin{macrocode}
\@fxdefineoptioninterface{envlayout}{EnvLayout}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Built-in layouts}
% \paragraph{Plain}
% \begin{envlayout}[noprint]{plain}
% \begin{face}{env}
%   \mbox{}
%    \begin{macrocode}
\@fxnewface{env}
%    \end{macrocode}
% \end{face}
% \begin{macro}{\FXEnvLayoutPlainBegin}
% \begin{macro}{\FXEnvLayoutPlainEnd}
%   \marg{type}\marg{author}
%    \begin{macrocode}
\newcommand*\FXEnvLayoutPlainBegin[2]{%
  \@fxuseface{env}\ignorespaces#2 \fxnotename{#1}: \ignorespaces}
\newcommand*\FXEnvLayoutPlainEnd[2]{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxenvlayout@plain@begin}
% \begin{macro}{\@fxenvlayout@plain@end}
%    \begin{macrocode}
\FXRegisterEnvLayout{plain}{\FXEnvLayoutPlainBegin}{\FXEnvLayoutPlainEnd}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{envlayout}
%
% \paragraph{Signature}
% \begin{envlayout}{signature}
% \begin{face}{signature}
%   \mbox{}
%    \begin{macrocode}
\@fxnewface[\itshape]{signature}
%    \end{macrocode}
% \end{face}
% \begin{macro}{\FXEnvLayoutSignatureBegin}
% \begin{macro}{\FXEnvLayoutSignatureEnd}
%   \marg{type}\marg{author}
%    \begin{macrocode}
\newcommand*\FXEnvLayoutSignatureBegin[2]{%
  \@fxuseface{env}\fxnotename{#1}: \ignorespaces}
\newcommand*\FXEnvLayoutSignatureEnd[2]{\@fxsignature{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxenvlayout@signature@begin}
% \begin{macro}{\@fxenvlayout@signature@end}
%   \mbox{}
%    \begin{macrocode}
\FXRegisterEnvLayout{signature}{%
  \FXEnvLayoutSignatureBegin}{\FXEnvLayoutSignatureEnd}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{envlayout}
%
% \subsubsection{Layout selection}
% \begin{macro}{\@fxselectenvlayout}
%   \marg{name}
% \begin{macro}{\@fxenvlayout@begin}
% \begin{macro}{\@fxenvlayout@end}
%   \marg{type}\marg{author}\\
%   This is much simpler than standard layout management because only one
%   environment layout at a time is possible. Using a specific environment
%   layout boils down to possibly loading it, and binding the beginning and
%   ending macros to the proper translation ones.
%    \begin{macrocode}
\newcommand*\@fxselectenvlayout[1]{%
  \expandafter\let\expandafter\@fxenvlayout@begin%
    \csname @fxenvlayout@#1@begin\endcsname%
  \expandafter\let\expandafter\@fxenvlayout@end%
    \csname @fxenvlayout@#1@end\endcsname}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Layout loading}
% \begin{macro}{\fxloadenvlayouts}
%   \marg{name,\ldots}
%    \begin{macrocode}
\newcommand*\fxloadenvlayouts[1]{%
  \edef\@fxlts{\zap@space#1 \@empty}%
  \@for\@fxlt:=\@fxlts\do{\usepackage{fxenvlayout#1}}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Layout control}
% \begin{macro}{\fxuseenvlayout}
% \begin{macro}{\FXRequireEnvLayout}
%   \marg{name}\\
%   \cs{FXRequireEnvLayout} is a better style for theme programming.
%    \begin{macrocode}
\newcommand*\fxuseenvlayout[1]{%
  \@ifundefined{@fxenvlayout@#1@begin}{\fxloadenvlayouts{#1}}{}%
  \@fxselectenvlayout{#1}}
\let\FXRequireEnvLayout\fxuseenvlayout
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{option}{envlayout}
%   \mbox{}
%    \begin{macrocode}
\@fxdefinekey{envlayout}{envlayout}{\fxuseenvlayout{#1}}

%    \end{macrocode}
% \end{option}
%
% \subsection{Target Layouts}
% \subsubsection{Layout creation}
% \begin{macro}{\FXProvidesTargetLayout}
%   \marg{name}\oarg{release information}
%    \begin{macrocode}
\newcommand*\FXProvidesTargetLayout[1]{\ProvidesPackage{fxtargetlayout#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FXRegisterTargetLayout}
%   \marg{name}\marg{funcname}\\
%   Register a new target layout with \fx. This currently only involves
%   constructing the translation macro. The translation macro in question
%   can't be \cs{let} to the real one, because themes or user might want to
%   redefine the latter.
%    \begin{macrocode}
\newcommand*\FXRegisterTargetLayout[2]{%
  \@ifundefined{@fxtargetlayout@#1}{%
    \expandafter\def\csname @fxtargetlayout@#1\endcsname{#2}}{%
    \@fxpkgerror{target layout '#1' already registered}{%
      You have called \string\FXRegisterTargetLayout\space with a name
      already in use.\MessageBreak
      If you want to modify an existing target layout, renew its
      command.\MessageBreak
      Otherwise, you must choose another name.}}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}[noindex]{\FXDefineTargetLayout...Key}
% \begin{macro}[noprint]{\FXDefineTargetLayoutKey}
% \begin{macro}[noprint]{\FXDefineTargetLayoutCmdKey}
% \begin{macro}[noprint]{\FXDefineTargetLayoutChoiceKey}
% \begin{macro}[noprint]{\FXDefineTargetLayoutVoidKey}
% \begin{macro}[noprint]{\FXDefineTargetLayoutBoolKey}
% The extension-level option creation interface:
%    \begin{macrocode}
\@fxdefineoptioninterface{targetlayout}{TargetLayout}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Built-in layouts}
% \paragraph{Plain}
% \begin{targetlayout}[noprint]{plain}
% \begin{face}{target}
%   \mbox{}
%    \begin{macrocode}
\@fxnewface{target}
%    \end{macrocode}
% \end{face}
% \begin{macro}{\FXTargetLayoutPlain}
%   \marg{target}
%    \begin{macrocode}
\newcommand\FXTargetLayoutPlain[2]{\@fxuseface{target}#2}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxtargetlayout@plain}
%    \begin{macrocode}
\FXRegisterTargetLayout{plain}{\FXTargetLayoutPlain}

%    \end{macrocode}
% \end{macro}
% \end{targetlayout}
%
% \subsubsection{Layout selection}
% \begin{macro}{\@fxselecttargetlayout}
%   \marg{name}
% \begin{macro}{\@@fxtargetlayout}
%   \marg{target}\\
%   This is much simpler than standard layout management because only one
%   target layout at a time is possible. Using a specific target layout boils
%   down to possibly loading it, and binding the layout macro to the proper
%   translation one.
%    \begin{macrocode}
\newcommand*\@fxselecttargetlayout[1]{%
  \expandafter\let\expandafter\@@fxtargetlayout%
    \csname @fxtargetlayout@#1\endcsname}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Target layout loading}
% \begin{macro}{\fxloadtargetlayouts}
%   \marg{name,\ldots}
%    \begin{macrocode}
\newcommand*\fxloadtargetlayouts[1]{%
  \edef\@fxlts{\zap@space#1 \@empty}%
  \@for\@fxlt:=\@fxlts\do{\usepackage{fxtargetlayout#1}}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Target layout control}
% \begin{macro}{\fxusetargetlayout}
% \begin{macro}{\FXRequireTargetLayout}
%   \marg{name}\\
%   \cs{FXRequireTargetLayout} is a better style for theme programming.
%    \begin{macrocode}
\newcommand*\fxusetargetlayout[1]{%
  \@ifundefined{@fxtargetlayout@#1}{\fxloadtargetlayouts{#1}}{}%
  \@fxselecttargetlayout{#1}}
\let\FXRequireTargetLayout\fxusetargetlayout
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{option}{targetlayout}
%   \mbox{}
%    \begin{macrocode}
\@fxdefinekey{targetlayout}{targetlayout}{\fxusetargetlayout{#1}}

%    \end{macrocode}
% \end{option}
%
% \subsubsection{Status-dependant versions}
% \begin{macro}{\@fxtargetlayout@final}
% \begin{macro}{\@fxtargetlayout@draft}
%   \marg{target}\\
%   In \texttt{final} mode, the target is typeset as-is. In \texttt{draft}
%   mode, we use the selected layout.
%    \begin{macrocode}
\newcommand\@fxtargetlayout@final[2]{#2}
\newcommand\@fxtargetlayout@draft[2]{%
  \begingroup\@@fxtargetlayout{#1}{#2}\endgroup}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Logging}
% \subsubsection{Logging macros}
% \begin{macro}{\FXLogNote}
% \begin{macro}{\FXLogWarning}
% \begin{macro}{\FXLogerror}
% \begin{macro}{\FXLogFatal}
%   \marg{msg}
%    \begin{macrocode}
\newcommand*\FXLogNote[1]{%
  \GenericInfo{%
    (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
    FiXme Note: '#1'}}
\newcommand*\FXLogWarning[1]{%
  \GenericWarning{%
    (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
    FiXme Warning: '#1'}}
\newcommand*\FXLogError[1]{%
  \GenericWarning{%
    (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
    FiXme Error: '#1'}}
\newcommand*\FXLogFatal[1]{%
  \GenericWarning{%
    (FiXme)\@spaces\@spaces\@spaces\@spaces}{%
    FiXme Fatal Error: '#1'}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxlog@note}
% \begin{macro}{\@fxlog@warning}
% \begin{macro}{\@fxlog@error}
% \begin{macro}{\@fxlog@fatal}
%   In order for the generic note dispatcher to be able to call the logging
%   macros (see section \sectionref{sec:code:lowlevelcmd}), we need an easier
%   translation mechanism from the annotation type to the actual macro
%   name. The translation macros in question can't be \cs{let} to the real
%   one, because users might want to redefine the actual log macros later.
%    \begin{macrocode}
\def\@fxlog@note{\FXLogNote}
\def\@fxlog@warning{\FXLogWarning}
\def\@fxlog@error{\FXLogError}
\def\@fxlog@fatal{\FXLogFatal}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Logging control}
% \begin{booleanoption}{silent}
%   Whether to log the annotations:
%    \begin{macrocode}
\@fxdefineboolkey{log}{silent}

%    \end{macrocode}
% \end{booleanoption}
%
% \subsection{\fx notes}
% \subsubsection{Note parameters}
% \begin{counter}{fixmecount}
% \begin{counter}{fxnotecount}
% \begin{counter}{fxwarningcount}
% \begin{counter}{fxerrorcount}
% \begin{counter}{fxfatalcount}
%   \texttt{fixmecount} maintains the total of all annotations, regardless of
%   their level. Each note type also gets its own counter:
%    \begin{macrocode}
\newcounter{fixmecount}
\newcounter{fxnotecount}
\newcounter{fxwarningcount}
\newcounter{fxerrorcount}
\newcounter{fxfatalcount}

%    \end{macrocode}
% \end{counter}
% \end{counter}
% \end{counter}
% \end{counter}
% \end{counter}
% \begin{option}{author}
%   An annotation ``author'' allows to distinguish notes from different
%   persons in collaborative mode.
%    \begin{macrocode}
\@fxdefinecmdkey{note}{author}{}
%    \end{macrocode}
% \end{option}
% \begin{option}{target}
%   An annotation ``target'' may replace the page number in the list of
%   corrections or in the index (see also section
%   \sectionref{sec:code:contentslinelayout}).
%    \begin{macrocode}
\@fxdefinecmdkey{note}{target}{}
%    \end{macrocode}
% \end{option}
%
% \subsubsection{Layout dispatch\label{sec:code:layoutdispatch}}
% \begin{macro}{\@fxhandleinnermode}
%   Handle the case where \TeX{} is in inner mode. We use the alternative
%   layout provided by the \texttt{innerlayout} option, and we make sure to
%   disable both the \texttt{margin} and \texttt{marginclue} layout forms.
%   This is done by appending \texttt{nomargin} and \texttt{nomarginclue} to
%   the inner layout value (this also renders nasty user settings harmless).
%   Before that, we provide some informative message if risky layout forms
%   were active.
%    \begin{macrocode}
\newcommand\@fxhandleinnermode{%
  \ifinner%
    \ifthenelse{\boolean{fx@layout@margin}}{%
      \@fxpkginfo{%
        inner mode detected;\MessageBreak
        turning margin layout form off}}{%
      \ifthenelse{\boolean{fx@layout@marginclue}}{%
        \@fxpkginfo{%
          inner mode detected;\MessageBreak
          turning marginclue layout form off}}{}}%
    \expandafter\@fxsetlayoutkeys\expandafter{%
      \cmdfx@layout@innerlayout,nomargin,nomarginclue}%
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxissueearlydraftlayouts}
% \begin{macro}{\@fxissuelatedraftlayouts}
%   \marg{type}\marg{note}\\
%   Dispatch all active draft mode layouts. \cs{@fxissueearlydraftlayouts}
%   takes care of dispatching early layouts, but before that, handles the
%   inner mode case. \cs{@fxissuelatedraftlayouts} just dispatches late
%   layouts.
%    \begin{macrocode}
\newcommand*\@fxissueearlydraftlayouts[2]{%
  \@fxhandleinnermode%
  \@for\@fxlt:=\@fxearlylayouts\do{%
    \@nameuse{iffx@layout@\@fxlt}%
      \@nameuse{@fxlayout@\@fxlt}{#1}{#2}{\cmdfx@note@author}%
    \fi}}
\newcommand*\@fxissuelatedraftlayouts[2]{%
  \@for\@fxlt:=\@fxlatelayouts\do{%
    \@nameuse{iffx@layout@\@fxlt}%
      \@nameuse{@fxlayout@\@fxlt}{#1}{#2}{\cmdfx@note@author}%
    \fi}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxissuecommonlayouts}
%   \marg{type}\marg{note}\\
%   Dispatch all mode-independent layouts (actually, ``layout'' is to be taken
%   in a slightly broader sense here). This macro executes all operations that
%   need to be performed regardless of the document status. This currently
%   means logging the annotations. Previously, this code also updated the
%   \texttt{lox} file, but this could lead to typesetting artifacts even in
%   final mode (because of the whatsit introduced by \cs{write}), which is
%   highly undesirable, and besides, there's no point in keeping that
%   information up to date, since it won't be typeset. So from now on, the
%   contents lines are only generated in \texttt{draft} mode by
%   \cs{@@@fxnote@late@draft}.
%    \begin{macrocode}
\newcommand*\@fxissuecommonlayouts[2]{%
  \iffx@log@silent\else\@nameuse{@fxlog@#1}{#2}\fi}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Status-dependent implementation\label{sec:code:lowlevelcmd}}
% \begin{macro}{\@@@fxnote@early@final}
% \begin{macro}{\@@@fxnote@late@final}
% \begin{macro}{\@@@fxnote@early@draft}
% \begin{macro}{\@@@fxnote@late@draft}
%   \marg{type}\marg{note}\\
%   The lower-level macros that perform the real job. In \texttt{final} mode,
%   early work is only to check for remaining fatal annotations and late work
%   is to dispatch common layouts.
%    \begin{macrocode}
\newcommand*\@@@fxnote@early@final[2]{%
  \ifthenelse{\equal{#1}{fatal}}{%
    \@fxpkgerror{'#2' fatal error left in final version}{%
      You are currently processing in final mode,\MessageBreak
      but you still have some FiXme fatal errors left behind.\MessageBreak
      Type X to quit, fix your document (or switch back to draft
      mode),\MessageBreak
      and rerun LaTeX.}}{}}
\newcommand*\@@@fxnote@late@final[2]{\@fxissuecommonlayouts{#1}{#2}}
%    \end{macrocode}
% In \texttt{draft} mode, early work is to dispatch early layouts, while late
% work is to dispatch both late \emph{and} common layouts, and update the
% \texttt{lox} file.
%    \begin{macrocode}
\newcommand*\@@@fxnote@early@draft[2]{%
  \@fxissueearlydraftlayouts{#1}{#2}}
\newcommand*\@@@fxnote@late@draft[2]{%
  \@fxissuelatedraftlayouts{#1}{#2}%
  \FXLayoutContentsLine{#1}{#2}{\cmdfx@note@author}%
  \@fxissuecommonlayouts{#1}{#2}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Standard version}
% \begin{macro}{\@fxpostconfigure}
%   This macro is used in \cs{@@fxnote@early} below, after processing user
%   options (even when there is none), to postconfigure some aspects of the
%   annotations. Currently, this involves two things: setting the author to
%   \cs{fixmelogo} if it still is \texttt{fixme}, and automatically tracking
%   the current language if required (note that all other language options
%   turn tracking off, meaning that one can override language tracking locally
%   by providing a language explicitely). Since environments need the
%   post-configuration done sooner, they perform it themselves and rebind this
%   macro to \cs{relax}.
%    \begin{macrocode}
\newcommand*\@fxpostconfigure{%
  \ifthenelse{\equal{\cmdfx@note@author}{fixme}}{%
    \@fxsetkeys{note}{author=\fixmelogo}}{}%
  \iffx@lang@langtrack%
    \@fxkeyifundefined{lang}{\languagename}{%
      \@fxpkgwarning{unknown language '\languagename';\MessageBreak
        falling back to \@fxdefaultlang}%
      \@fxsetkeys{lang}{\@fxdefaultlang}}{%
      \@fxsetkeys{lang}{\languagename}}
  \fi}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxendgroup}
%   This macro is used in \cs{@@fxnote@late} below to close the group opened
%   at the user level. Since environments need the group opened for a longer
%   time, they rebind it to \cs{relax} and close the group themselves later
%   on.
%    \begin{macrocode}
\let\@fxendgroup\endgroup
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@fxnote@early}
%   \marg{type}\marg{note}\\
%   Counters need to be updated regardless of the mode.
%    \begin{macrocode}
\def\@@fxnote@early#1#2{%
    \@fxpostconfigure%
    \stepcounter{fixmecount}%
    \stepcounter{fx#1count}%
    \@@@fxnote@early{#1}{#2}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@fxnote@late}
%    \begin{macrocode}
\def\@@fxnote@late#1#2{%
    \@@@fxnote@late{#1}{#2}%
  \@fxendgroup}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@fxnote}
%   \marg{type}\marg{note}\\
%   This macro is used everywhere outside a starred context, because in that
%   case, we do early and late work in a row.
%    \begin{macrocode}
\def\@@fxnote#1#2{%
  \@@fxnote@early{#1}{#2}%
  \@@fxnote@late{#1}{#2}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxnote}
%   \marg{type}\oarg{options}\marg{note}
%    \begin{macrocode}
\def\@fxnote#1[#2]#3{%
  \@fxsetkeys{mode,status,lang,log,note,face,layout}{#2}%
  \@@fxnote{#1}{#3}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Starred version}
% \begin{macro}{\@@fxsnote}
%   \marg{type}\marg{note}\marg{text}\\
%   Post-configuration is done here because it's the code path confluent for
%   all starred commands. Relaxing post-configuration afterwards is to prevent
%   \cs{@@fxnote@early} from doing it again. Note that this is the only place
%   where we actually do early and late work not in a row.
%    \begin{macrocode}
\long\def\@@fxsnote#1#2#3{%
  \@fxpostconfigure\let\@fxpostconfigure\relax%
  \@@fxnote@early{#1}{#2}\@fxtargetlayout{#1}{#3}\@@fxnote@late{#1}{#2}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxsnote}
%   \marg{type}\oarg{options}\marg{note}\marg{text}\\
%   Note the \texttt{targetlayout} family here.
%    \begin{macrocode}
\long\def\@fxsnote#1[#2]#3#4{%
  \@fxsetkeys{mode,status,lang,log,note,face,layout,targetlayout}{#2}%
  \@@fxsnote{#1}{#3}{#4}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{User-level interface generation}
% \begin{macro}{\@fxpreconfigure}
%   \marg{author}\\
%   This macro is used at the beginning of every user-level entry point (here
%   for notes, and also in the environments section), to preconfigure some
%   aspects of the annotations, before possibly processing options. Currently,
%   this only involves presetting the note's author to the one specified in
%   the call to \cs{FXRegisterAuthor}. This however is not done for the
%   built-in \texttt{fixme} author, because this one should honor a global
%   setting.
%    \begin{macrocode}
\newcommand*\@fxpreconfigure[1]{%
  \ifthenelse{\equal{#1}{fixme}}{}{\@fxsetkeys{note}{author=#1}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxnewnotemacro}
%   \marg{prefix}\marg{type}\marg{author}\\
%   This macro defines the user-level interface:
%    \begin{macrocode}
\newcommand*\@fxnewnotemacro[3]{%
  \expandafter\DeclareRobustCommand\csname #1#2\endcsname{%
    \begingroup%
      \@fxpreconfigure{#3}%
      \@ifstar{%
        \@ifnextchar[%]
        {\@fxsnote{#2}}{\@@fxsnote{#2}}}{%
        \@ifnextchar[%]
        {\@fxnote{#2}}{\@@fxnote{#2}}}}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{\fx environments}
% A \fx environment's summary is laid out by the corresponding macro, but
% the \texttt{inline} layout is disabled. This is as easy as appending
% \texttt{noinline} to the end of the options list.
% \subsubsection{Status-dependent implementation}
% \begin{macro}{\@@@@fxbeginenv@final}
% \begin{macro}{\@@@@fxbeginenv@draft}
% \begin{macro}{\@fxendenv@final}
% \begin{macro}{\@fxendenv@draft}
%   \marg{type}\\
%   In final mode, \texttt{verbatim}'s \texttt{comment} environment is used to
%   suppress output.
%    \begin{macrocode}
\def\@@@@fxbeginenv@final#1{\comment}
\def\@@@@fxbeginenv@draft#1{\@fxenvlayout@begin{#1}{\cmdfx@note@author}}
\def\@fxendenv@final#1{\endcomment}
\def\@fxendenv@draft#1{\unskip\@fxenvlayout@end{#1}{\cmdfx@note@author}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Standard versions}
% \begin{macro}{\@@@fxbeginenv}
% \begin{macro}{\@@fxbeginenv}
%   \marg{type}\marg{summary}\\
%   Post-configuration is done here (it's the code path confluent for all
%   non-starred environments). Relaxing post-configuration afterwards is to
%   prevent \cs{@@fxnote} from doing it again.
%    \begin{macrocode}
\def\@@@fxbeginenv#1#2{%
  \@fxpostconfigure\let\@fxpostconfigure\relax%
  \@@fxnote{#1}{#2}%
  \@@@@fxbeginenv{#1}}
\def\@@fxbeginenv#1#2{%
  \@fxsetkeys{layout}{noinline}%
  \@@@fxbeginenv{#1}{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxbeginenv}
%   \marg{type}\oarg{options}\marg{summary}
%    \begin{macrocode}
\def\@fxbeginenv#1[#2]#3{%
  \@fxsetkeys{mode,status,lang,log,note,face,layout,envlayout}{#2,noinline}%
  \@@@fxbeginenv{#1}{#3}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Starred versions}
% \begin{macro}{\@@@fxbeginsenv}
% \begin{macro}{\@@fxbeginsenv}
%   \marg{type}\marg{summary}\marg{text}\\
%   Post-configuration is done here (it's the code path confluent for all
%   starred environments). Relaxing post-configuration afterwards is to
%   prevent \cs{@@fxsnote} from doing it again.
%    \begin{macrocode}
\long\def\@@@fxbeginsenv#1#2#3{%
  \@fxpostconfigure\let\@fxpostconfigure\relax%
  \@@fxsnote{#1}{#2}{#3}%
  \@@@@fxbeginenv{#1}}
\long\def\@@fxbeginsenv#1#2#3{%
  \@fxsetkeys{layout}{noinline}%
  \@@@fxbeginsenv{#1}{#2}{#3}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxbeginenv}
%   \marg{type}\oarg{options}\marg{summary}\marg{text}\\
%   Note the \texttt{targetlayout} family here.
%    \begin{macrocode}
\long\def\@fxbeginsenv#1[#2]#3#4{%
  \@fxsetkeys{mode,status,lang,log,note,face,layout,envlayout,targetlayout}{%
    #2,noinline}%
  \@@@fxbeginsenv{#1}{#3}{#4}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{User-level interface generation}
% \begin{macro}{\@fxnewnoteenvs}
%   \marg{prefix}\marg{type}\marg{author}\\
%   This macro defines the user-level interface. The ending macros are
%   identical. Also, the environments close their own group, so we prevent
%   \cs{@@fxnote} from doing so by temporarily rebinding \cs{@fxendgroup} to
%   \cs{relax}.
%    \begin{macrocode}
\newcommand*\@fxnewnoteenvs[3]{%
  \expandafter\def\csname #1#2\endcsname{%
    \begingroup%
      \let\@fxendgroup\relax%
      \@fxpreconfigure{#3}%
      \@ifnextchar[%]
        {\@fxbeginenv{#2}}{\@@fxbeginenv{#2}}}
  \expandafter\def\csname end#1#2\endcsname{%
      \@fxendenv{#2}%
    \endgroup}%
  \expandafter\long\expandafter\def\csname #1#2*\endcsname{%
    \begingroup%
      \let\@fxendgroup\relax%
      \@fxpreconfigure{#3}%
      \@ifnextchar[%]
        {\@fxbeginsenv{#2}}{\@@fxbeginsenv{#2}}}
  \expandafter\def\csname end#1#2*\endcsname{%
      \@fxendenv{#2}%
    \endgroup}}

%    \end{macrocode}
% \end{macro}
%
% \subsection{\fx authors}
% \begin{macro}{\FXRegisterAuthor}
%   \marg{cmdprefix}\marg{envprefix}\marg{name}\\
%   This macro creates the whole user-level interface for a particular author:
%    \begin{macrocode}
\newcommand*\FXRegisterAuthor[3]{%
  \@ifundefined{#1note}{}{%
    \@fxpkgerror{command prefix '#1' already in use}{%
      You have called \string\FXRegisterAuthor\space with a command prefix
      already in use.\MessageBreak
      Please choose another one.}}%
  \@ifundefined{#2note}{}{%
    \@fxpkgerror{environment prefix '#2' already in use}{%
      You have called \string\FXRegisterAuthor\space with an environment
      prefix already in use.\MessageBreak
      Please choose another one.}}%
  \@fxnewnotemacro{#1}{note}{#3}%
  \@fxnewnotemacro{#1}{warning}{#3}%
  \@fxnewnotemacro{#1}{error}{#3}%
  \@fxnewnotemacro{#1}{fatal}{#3}%
  \@fxnewnoteenvs{#2}{note}{#3}%
  \@fxnewnoteenvs{#2}{warning}{#3}%
  \@fxnewnoteenvs{#2}{error}{#3}%
  \@fxnewnoteenvs{#2}{fatal}{#3}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}[noindex]{\fx...[*]}
% \begin{environment}[noindex]{anfx...[*]}
% \begin{macro}[noprint]{\fxnote}
% \begin{macro}[noprint]{\fxwarning}
% \begin{macro}[noprint]{\fxerror}
% \begin{macro}[noprint]{\fxfatal}
% \begin{macro}[noprint]{\fxnote*}
% \begin{macro}[noprint]{\fxwarning*}
% \begin{macro}[noprint]{\fxerror*}
% \begin{macro}[noprint]{\fxfatal*}
% \begin{environment}[noprint]{anfxnote}
% \begin{environment}[noprint]{anfxwarning}
% \begin{environment}[noprint]{anfxerror}
% \begin{environment}[noprint]{anfxfatal}
% \begin{environment}[noprint]{anfxnote*}
% \begin{environment}[noprint]{anfxwarning*}
% \begin{environment}[noprint]{anfxerror*}
% \begin{environment}[noprint]{anfxfatal*}
%   And we use it to create the \fx default user:
%    \begin{macrocode}
\FXRegisterAuthor{fx}{anfx}{fixme}
%    \end{macrocode}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{environment}
% \end{macro}
% \begin{macro}{\fixme}
%   \oarg{options}\marg{note}\\
%   Deprecate \cs{fixme}:
%    \begin{macrocode}
\DeclareRobustCommand\fixme{%
  \@fxpkgwarning{\string\fixme\space is deprecated;\MessageBreak
    please use \string\fxfatal\space instead}%
  \fxfatal}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{afixme}
%   Deprecate the \texttt{afixme} environment:
%    \begin{macrocode}
\def\afixme{%
  \@fxpkgwarning{The 'afixme' environment is deprecated;\MessageBreak
    please use 'anfxfatal' instead}%
  \anfxfatal}
\let\endafixme\endanfxfatal
%    \end{macrocode}
% \end{environment}
%
% \subsection{Internationalization\label{sec:code:i18n}}
% \begin{macro}{\@fxlanguages}
%   This macro lists all the supported languages, including aliases:
%    \begin{macrocode}
\newcommand*\@fxlanguages{%
  english,french,francais,spanish,italian,german,ngerman,danish,croatian}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Language definitions}
% \paragraph{English}
% \begin{lang}{english}
% \begin{macro}[noindex]{\fxenglish...[s]name}
% \begin{macro}[noprint]{\fxenglishnotename}
% \begin{macro}[noprint]{\fxenglishnotesname}
% \begin{macro}[noprint]{\fxenglishwarningname}
% \begin{macro}[noprint]{\fxenglishwarningsname}
% \begin{macro}[noprint]{\fxenglisherrorname}
% \begin{macro}[noprint]{\fxenglisherrorsname}
% \begin{macro}[noprint]{\fxenglishfatalname}
% \begin{macro}[noprint]{\fxenglishfatalsname}
% \begin{macro}{\englishlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxenglishnotename{Note}
\newcommand\fxenglishnotesname{Notes}
\newcommand\fxenglishwarningname{Warning}
\newcommand\fxenglishwarningsname{Warnings}
\newcommand\fxenglisherrorname{Error}
\newcommand\fxenglisherrorsname{Errors}
\newcommand\fxenglishfatalname{Fatal}
\newcommand\fxenglishfatalsname{Fatal errors}
\newcommand\englishlistfixmename{List of Corrections}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
%
% \paragraph{French}
% \begin{lang}{french}
% \begin{lang}{francais}
% \begin{macro}[noindex]{\fxfrench...[s]name}
% \begin{macro}[noprint]{\fxfrenchnotename}
% \begin{macro}[noprint]{\fxfrenchnotesname}
% \begin{macro}[noprint]{\fxfrenchwarningname}
% \begin{macro}[noprint]{\fxfrenchwarningsname}
% \begin{macro}[noprint]{\fxfrencherrorname}
% \begin{macro}[noprint]{\fxfrencherrorsname}
% \begin{macro}[noprint]{\fxfrenchfatalname}
% \begin{macro}[noprint]{\fxfrenchfatalsname}
% \begin{macro}{\frenchlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxfrenchnotename{Note}
\newcommand\fxfrenchnotesname{Notes}
\newcommand\fxfrenchwarningname{Attention}
\newcommand\fxfrenchwarningsname{Avertissements}
\newcommand\fxfrencherrorname{Erreur}
\newcommand\fxfrencherrorsname{Erreurs}
\newcommand\fxfrenchfatalname{Fatal}
\newcommand\fxfrenchfatalsname{Erreurs fatales}
\newcommand\frenchlistfixmename{Liste des Corrections}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
% \end{lang}
%
% \paragraph{Spanish}
% \begin{lang}{spanish}
% \begin{macro}[noindex]{\fxspanish...[s]name}
% \begin{macro}[noprint]{\fxspanishnotename}
% \begin{macro}[noprint]{\fxspanishnotesname}
% \begin{macro}[noprint]{\fxspanishwarningname}
% \begin{macro}[noprint]{\fxspanishwarningsname}
% \begin{macro}[noprint]{\fxspanisherrorname}
% \begin{macro}[noprint]{\fxspanisherrorsname}
% \begin{macro}[noprint]{\fxspanishfatalname}
% \begin{macro}[noprint]{\fxspanishfatalsname}
% \begin{macro}{\spanishlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxspanishnotename{Nota}
\newcommand\fxspanishnotesname{Notas}
\newcommand\fxspanishwarningname{Aviso}
\newcommand\fxspanishwarningsname{Avisos}
\newcommand\fxspanisherrorname{Error}
\newcommand\fxspanisherrorsname{Errores}
\newcommand\fxspanishfatalname{Fatal}
\newcommand\fxspanishfatalsname{Errores fatales}
\newcommand\spanishlistfixmename{Lista de Correcciones}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
%
% \paragraph{Italian}
% \begin{lang}{italian}
% \begin{macro}[noindex]{\fxitalian...[s]name}
% \begin{macro}[noprint]{\fxitaliannotename}
% \begin{macro}[noprint]{\fxitaliannotesname}
% \begin{macro}[noprint]{\fxitalianwarningname}
% \begin{macro}[noprint]{\fxitalianwarningsname}
% \begin{macro}[noprint]{\fxitalianerrorname}
% \begin{macro}[noprint]{\fxitalianerrorsname}
% \begin{macro}[noprint]{\fxitalianfatalname}
% \begin{macro}[noprint]{\fxitalianfatalsname}
% \begin{macro}{\italianlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxitaliannotename{Nota}
\newcommand\fxitaliannotesname{Note}
\newcommand\fxitalianwarningname{Avviso}
\newcommand\fxitalianwarningsname{Avvisi}
\newcommand\fxitalianerrorname{Errore}
\newcommand\fxitalianerrorsname{Errori}
\newcommand\fxitalianfatalname{Fatale}
\newcommand\fxitalianfatalsname{Errori fatali}
\newcommand\italianlistfixmename{Corrigenda}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
%
% \paragraph{German}
% \begin{lang}{german}
% \begin{lang}{ngerman}
% \begin{macro}[noindex]{\fxgerman...[s]name}
% \begin{macro}[noprint]{\fxgermannotename}
% \begin{macro}[noprint]{\fxgermannotesname}
% \begin{macro}[noprint]{\fxgermanwarningname}
% \begin{macro}[noprint]{\fxgermanwarningsname}
% \begin{macro}[noprint]{\fxgermanerrorname}
% \begin{macro}[noprint]{\fxgermanerrorsname}
% \begin{macro}[noprint]{\fxgermanfatalname}
% \begin{macro}[noprint]{\fxgermanfatalsname}
% \begin{macro}{\germanlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxgermannotename{Anm}
\newcommand\fxgermannotesname{Anmerkungen}
\newcommand\fxgermanwarningname{Warnung}
\newcommand\fxgermanwarningsname{Warnungen}
\newcommand\fxgermanerrorname{Fehler}
\newcommand\fxgermanerrorsname{Fehler}
\newcommand\fxgermanfatalname{Verh\"angnisvoll}
\newcommand\fxgermanfatalsname{Verh\"angnisvolle fehler}
\newcommand\germanlistfixmename{Verzeichnis der Korrekturen}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
% \end{lang}
%
% \paragraph{Danish}
% \begin{lang}{danish}
% \begin{macro}[noindex]{\fxdanish...[s]name}
% \begin{macro}[noprint]{\fxdanishnotename}
% \begin{macro}[noprint]{\fxdanishnotesname}
% \begin{macro}[noprint]{\fxdanishwarningname}
% \begin{macro}[noprint]{\fxdanishwarningsname}
% \begin{macro}[noprint]{\fxdanisherrorname}
% \begin{macro}[noprint]{\fxdanisherrorsname}
% \begin{macro}[noprint]{\fxdanishfatalname}
% \begin{macro}[noprint]{\fxdanishfatalsname}
% \begin{macro}{\danishlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxdanishnotename{Note}
\newcommand\fxdanishnotesname{Noter}
\newcommand\fxdanishwarningname{Advarsel}
\newcommand\fxdanishwarningsname{Advarsler}
\newcommand\fxdanisherrorname{Fejl}
\newcommand\fxdanisherrorsname{Fejl}
\newcommand\fxdanishfatalname{Fatal}
\newcommand\fxdanishfatalsname{Fatale fejl}
\newcommand\danishlistfixmename{Rettelser}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
%
% \paragraph{Croatian}
% \begin{lang}{croatian}
% \begin{macro}[noindex]{\fxcroatian...[s]name}
% \begin{macro}[noprint]{\fxcroatiannotename}
% \begin{macro}[noprint]{\fxcroatiannotesname}
% \begin{macro}[noprint]{\fxcroatianwarningname}
% \begin{macro}[noprint]{\fxcroatianwarningsname}
% \begin{macro}[noprint]{\fxcroatianerrorname}
% \begin{macro}[noprint]{\fxcroatianerrorsname}
% \begin{macro}[noprint]{\fxcroatianfatalname}
% \begin{macro}[noprint]{\fxcroatianfatalsname}
% \begin{macro}{\croatianlistfixmename}
%   \mbox{}
%    \begin{macrocode}
\newcommand\fxcroatiannotename{Poruka}
\newcommand\fxcroatiannotesname{Poruke}
\newcommand\fxcroatianwarningname{Upozorenja}
\newcommand\fxcroatianwarningsname{Upozorenje}
\newcommand\fxcroatianerrorname{Gre\v ska}
\newcommand\fxcroatianerrorsname{Greske}
\newcommand\fxcroatianfatalname{Fatalan}
\newcommand\fxcroatianfatalsname{Kobne gre\v ske}
\newcommand\croatianlistfixmename{Popis korekcija}

%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{lang}
%
% \subsubsection{Language tracking}
% \begin{option}{langtrack}
%   Whether to track the value of \cs{languagename} automatically:
%    \begin{macrocode}
\@fxdefineboolkey{lang}{langtrack}
%    \end{macrocode}
% \end{option}
% \begin{option}{defaultlang}
%   Which language to use when tracking leads to an unsuported language:
%    \begin{macrocode}
\def\@fxexpr{\@fxdefinechoicekey{lang}{defaultlang}[\@fxdefaultlang]}
\expandafter\@fxexpr\expandafter{\@fxlanguages}{}

%    \end{macrocode}
% \end{option}
%
% \subsubsection{Language options}
% \begin{option}{lang}
% \begin{macro}{\@fxlang}
%   Store the current language in \cs{@fxlang} after having handled language
%   aliases, and disable language tracking:
%    \begin{macrocode}
\def\@fxexpr{\@fxdefinechoicekey{lang}{lang}[\@fxlang]}
\expandafter\@fxexpr\expandafter{\@fxlanguages}{%
  \ifthenelse{\equal{#1}{francais}}{\def\@fxlang{french}}{%
    \ifthenelse{\equal{#1}{ngerman}}{\def\@fxlang{german}}{}}%
  \@fxsetkeys{lang}{langtrack=false}}

%    \end{macrocode}
% \end{macro}
% \end{option}
% \begin{option}{english}
% \begin{option}{french}
% \begin{option}{francais}
% \begin{option}{spanish}
% \begin{option}{italian}
% \begin{option}{german}
% \begin{option}{ngerman}
% \begin{option}{danish}
% \begin{option}{croatian}
%   Create individual language options:
%    \begin{macrocode}
\@for\@fxlg:=\@fxlanguages\do{
  \def\@fxexprone{\@fxdefinevoidkey{lang}}
  \edef\@fxexprtwo{{\@fxlg}{\noexpand\@fxsetkeys{lang}{lang=\@fxlg}}}
  \expandafter\@fxexprone\@fxexprtwo}

%    \end{macrocode}
% \end{option}
% \end{option}
% \end{option}
% \end{option}
% \end{option}
% \end{option}
% \end{option}
% \end{option}
% \end{option}
%
% \subsubsection{Language abstraction layer}
% \begin{macro}{\@fxlistfixmename}
%   Construct the ``list of fixmes'' title in a language dependent fashion:
%    \begin{macrocode}
\newcommand*\@fxlistfixmename{\@nameuse{\@fxlang listfixmename}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fxnotename}
% \begin{macro}{\fxnotesname}
%   \marg{type}\\
%   Construct the notes names in a language dependent fashion:
%    \begin{macrocode}
\newcommand*\fxnotename[1]{\@nameuse{fx\@fxlang#1name}}
\newcommand*\fxnotesname[1]{\@nameuse{fx\@fxlang#1sname}}

%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Document status processing}
% \begin{macro}{\@@@fxnote@early}
% \begin{macro}{\@@@fxnote@late}
% \begin{macro}{\@@@@fxbeginenv}
% \begin{macro}{\@fxendenv}
% \begin{macro}{\@fxtargetlayout}
% \begin{macro}{\listoffixmes}
% \begin{option}{final}
% \begin{option}{draft}
% \begin{option}{status}
%   Select draft or final versions of internal macros (some of
%   them also depending on the document class):
%    \begin{macrocode}
\@fxdefinevoidkey{status}{final}{%
  \let\@@@fxnote@early\@@@fxnote@early@final%
  \let\@@@fxnote@late\@@@fxnote@late@final%
  \let\@@@@fxbeginenv\@@@@fxbeginenv@final
  \let\@fxendenv\@fxendenv@final%
  \let\@fxtargetlayout\@fxtargetlayout@final%
  \let\listoffixmes\lox@final}
\@fxdefinevoidkey{status}{draft}{%
  \let\@@@fxnote@early\@@@fxnote@early@draft%
  \let\@@@fxnote@late\@@@fxnote@late@draft%
  \let\@@@@fxbeginenv\@@@@fxbeginenv@draft
  \let\@fxendenv\@fxendenv@draft%
  \let\@fxtargetlayout\@fxtargetlayout@draft%
  \let\listoffixmes\lox@draft}
\@fxdefinechoicekey{status}{status}{final,draft}{\@fxsetkeys{status}{#1}}

%    \end{macrocode}
% \end{option}
% \end{option}
% \end{option}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Theme support}
% \begin{macro}{\FXProvidesTheme}
%   \marg{name}\oarg{release information}
%    \begin{macrocode}
\newcommand*\FXProvidesTheme[1]{\ProvidesPackage{fxtheme#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fxusetheme}
%   \marg{name}
%    \begin{macrocode}
\newcommand*\fxusetheme[1]{\usepackage{fxtheme#1}}
%    \end{macrocode}
% \end{macro}
% \begin{option}{theme}
%   \mbox{}
%    \begin{macrocode}
\@fxdefinekey{theme}{theme}{\fxusetheme{#1}}
%    \end{macrocode}
% \end{option}
%
% \subsection{Finale}
% \subsubsection{Class-dependent settings}
% Currently, our class dependencies only matter in draft mode, so one could
% argue that it is not optimal to handle this here. However, it would be
% incorrect to do it in the \texttt{draft} option code because this option can
% be switched at any point in the document (remember that it is understood
% even by the annotation macros and environments) and the stuff below
% should only be executed once. Besides, \cs{@ifclassloaded} is an
% \cs{@onlypreamble} macro\ldots
%
% As documented, marginal notes are incompatible with the ACM SIG classes.
% Initially, I thought I would detect these classes and issue an error if
% marginal layout (or clue) is active. However, I changed my mind, because
% nothing prevents somebody to write a new class on top of these ones and
% authorize \cs{marginpar} back again. Normally these classes issue an error
% if \cs{marginpar} is used. However, the 2.3 / June 2007 versions are buggy
% and the error actually triggers a stack overflow in \LaTeX\ldots (patch
% submitted). Oh boy, these classes are a mess.
% \begin{macro}{\@lox@prtc}
% \begin{macro}{\@lox@psttc}
% \begin{macro}{\@lox@draft}
%    \begin{macrocode}
\@ifclassloaded{article}{%
  \let\@lox@prtc\@lox@prtc@article%
  \let\@lox@psttc\@lox@psttc@article}{%
  \@ifclassloaded{report}{%
    \let\@lox@prtc\@lox@prtc@report%
    \let\@lox@psttc\@lox@psttc@report}{%
    \@ifclassloaded{book}{%
      \let\@lox@prtc\@lox@prtc@book%
      \let\@lox@psttc\@lox@psttc@book}{%
      \@ifclassloaded{amsbook}{%
        \let\lox@draft\lox@draft@ams}{%
        \@ifclassloaded{amsart}{%
          \let\lox@draft\lox@draft@ams}{%
          %% Use the article layout by default.
          \let\@lox@prtc\@lox@prtc@article%
          \let\@lox@psttc\@lox@psttc@article}}}}}

%    \end{macrocode}
% This overrides any previous class-based settings but makes the list of
% corrections compliant with the \komascript classes and any document using
% the \texttt{tocbasic} package.
%    \begin{macrocode}
\@ifpackageloaded{tocbasic}{%
  \addtotoclist[fixme]{lox}%
  \renewcommand\lox@draft{\listoftoc[\@fxlistfixmename]{lox}}}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Options Processing}
% First, we execute some options to initialize \fx to something sensible,
% and then we process the user ones. Note the abscence of the \texttt{theme}
% family here.
%    \begin{macrocode}
\ExecuteOptionsX[fx]<%
  mode,status,lang,log,note,face,layout,envlayout,targetlayout>{%
  mode=singleuser,%
  status=final,%
  lang=english,%
  langtrack=false,%
  defaultlang=english,%
  nosilent,%
  author=fixme,%
  target=thepage,%
  layout=margin,%
  innerlayout={layout=inline},%
  envlayout=plain,%
  targetlayout=plain,%
  inlineface=\bfseries,%
  marginface=\footnotesize,%
  envface=\bfseries,%
  targetface=\itshape}
\ProcessOptionsX*[fx]<%
  mode,status,lang,log,note,face,layout,envlayout,targetlayout>

%    \end{macrocode}
%
% \subsubsection{The \cs{fxsetup} macro}
% \begin{macro}{\fxsetup}
%   \marg{options}\\
%   The inevitable setup macro, extremely impressive yet as trivial as can be
%   with the \texttt{xkeyval} package\ldots \cs{fxsetup} is the only place
%   where the \texttt{theme} family is processed.
%    \begin{macrocode}
\newcommand*\fxsetup[1]{%
  \@fxsetkeys{%
    mode,status,lang,log,note,face,layout,envlayout,targetlayout,theme}{%
    #1}}

%    \end{macrocode}
% \end{macro}
%
% \subsubsection{\fx summary}
% Finally, output a summary giving the number of fixme notes at the end of the
% compilation:
%    \begin{macrocode}
\AtEndDocument{%
  \iffx@log@silent\else
    \GenericWarning{%
      (FiXme)\@spaces\@spaces}{%
      FiXme Summary: Number of notes: \thefxnotecount,\MessageBreak%
      Number of warnings: \thefxwarningcount,\MessageBreak%
      Number of errors: \thefxerrorcount,\MessageBreak%
      Number of fatal errors: \thefxfatalcount,\MessageBreak%
      Total: \thefixmecount\@gobble}%
  \fi}
%</fixme>
%    \end{macrocode}
%
% \appendix
% \section{External Layouts}
% \subsection{Annotation layouts}
% \subsubsection{The \texttt{marginnote} layout}
% \begin{layout}{marginnote}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutmarginnote>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{marginnote}

\RequirePackage{marginnote}

%    \end{macrocode}
% \begin{macro}{\FXLayoutMarginNote}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutMarginNote[3]{%
  \marginnote[\raggedleft\@fxuseface{margin}\@fxtextstd{#1}{#2}{#3}]{%
    \raggedright\@fxuseface{margin}\@fxtextstd{#1}{#2}{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@marginnote}
%   \begin{booleanoption}{marginnote}
%    \begin{macrocode}
\FXRegisterLayout*[margin,marginclue]{marginnote}{\FXLayoutMarginNote}
%</fxlayoutmarginnote>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfnote} layout}
% \begin{layout}{pdfnote}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfnote>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfnote}

\RequirePackage{pdfcomment}

%    \end{macrocode}
% \begin{macro}{\FXLayoutPDFNote}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutPDFNote[3]{%
  \pdfcomment[author={#3}]{\@fxtextstd{#1}{#2}{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfnote}
%   \begin{booleanoption}{pdfnote}
%    \begin{macrocode}
\FXRegisterLayout{pdfnote}{\FXLayoutPDFNote}
%</fxlayoutpdfnote>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfmargin} layout}
% \begin{layout}{pdfmargin}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfmargin>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfmargin}

\RequirePackage{pdfcomment}

%    \end{macrocode}
% \begin{macro}{\FXLayoutPDFMargin}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutPDFMargin[3]{%
  \pdfmargincomment[author={#3}]{\@fxtextstd{#1}{#2}{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfmargin}
%   \begin{booleanoption}{pdfmargin}
%    \begin{macrocode}
\FXRegisterLayout*[margin,marginclue,marginnote]{pdfmargin}{%
  \FXLayoutPDFMargin}
%</fxlayoutpdfmargin>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfsignote} layout}
% \begin{layout}{pdfsignote}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfsignote>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfsignote}

\RequirePackage{pdfcomment}

%    \end{macrocode}
% \begin{macro}{\FXLayoutPDFSigNote}
% \marg{type}\marg{note}\marg{author}\\
% Warning: this layout cannot use \cs{@fxsignature} properly, because of the
% presence of an \cs{ifthenelse} inside, and that, eventough it was declared
% robust. This problem seems to affect PDF layouts only. The workaround I use
% below is to externalize the conditional and temporarily redefine
% \cs{@fxsignature} accordingly. This is a bit clumsy but it works\ldots
%    \begin{macrocode}
\newcommand*\FXLayoutPDFSigNote[3]{%
  \begingroup%
    \ifthenelse{\equal{#3}{}}{%
      \def\@fxsignature##1{}}{%
      \def\@fxsignature##1{ -- {\@fxuseface{signature}#1}}}%
    \pdfcomment[author={#3}]{\@fxsigstd{#1}{#2}{#3}}%
  \endgroup}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfsignote}
%   \begin{booleanoption}{pdfsignote}
%    \begin{macrocode}
\FXRegisterLayout[pdfnote]{pdfsignote}{\FXLayoutPDFSigNote}
%</fxlayoutpdfsignote>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfsigmargin} layout}
% \begin{layout}{pdfsigmargin}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfsigmargin>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfsigmargin}

\RequirePackage{pdfcomment}

%    \end{macrocode}
% \begin{macro}{\FXLayoutPDFSigMargin}
%   \marg{type}\marg{note}\marg{author}\\
% Warning: this layout cannot use \cs{@fxsignature} properly, because of the
% presence of an \cs{ifthenelse} inside, and that, eventough it was declared
% robust. This problem seems to affect PDF layouts only. The workaround I use
% below is to externalize the conditional and temporarily redefine
% \cs{@fxsignature} accordingly. This is a bit clumsy but it works\ldots
%    \begin{macrocode}
\newcommand*\FXLayoutPDFSigMargin[3]{%
  \begingroup%
    \ifthenelse{\equal{#3}{}}{%
      \def\@fxsignature##1{}}{%
      \def\@fxsignature##1{ -- {\@fxuseface{signature}#1}}}%
    \pdfmargincomment[author={#3}]{\@fxsigstd{#1}{#2}{#3}}%
  \endgroup}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfsigmargin}
%   \begin{booleanoption}{pdfsigmargin}
%    \begin{macrocode}
\FXRegisterLayout*[margin,marginclue,marginnote,pdfmargin]{pdfsigmargin}{%
  \FXLayoutPDFSigMargin}
%</fxlayoutpdfsigmargin>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfcnote} layout}
% \begin{layout}{pdfcnote}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfcnote>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfcnote}

\RequirePackage{pdfcomment}
\RequirePackage{xcolor}

%    \end{macrocode}
% \begin{color}{fxnote}
% \begin{color}{fxwarning}
% \begin{color}{fxerror}
% \begin{color}{fxfatal}
%   Environments use the same colors as the notes themselves because
%   their contents really is a longer note.
%    \begin{macrocode}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

%    \end{macrocode}
% \end{color}
% \end{color}
% \end{color}
% \end{color}
% \begin{macro}{\@fxdocolon}
%   \marg{author}\\
%   Add a colon after the author tag, unless empty.
%    \begin{macrocode}
\providecommand*\@fxdocolon[1]{%
  \ifthenelse{\equal{#1}{}}{\def\@fxcolon{}}{\def\@fxcolon{: }}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FXLayoutPDFCNote}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutPDFCNote[3]{%
  \@fxdocolon{#3}%
  \pdfcomment[author={#3},color={fx#1}]{\ignorespaces#3\@fxcolon#2}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfcnote}
%   \begin{booleanoption}{pdfcnote}
%    \begin{macrocode}
\FXRegisterLayout[pdfnote]{pdfcnote}{\FXLayoutPDFCNote}
%</fxlayoutpdfcnote>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfcmargin} layout}
% \begin{layout}{pdfcmargin}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfcmargin>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfcmargin}

\RequirePackage{pdfcomment}
\RequirePackage{xcolor}

%    \end{macrocode}
% \begin{color}{fxnote}
% \begin{color}{fxwarning}
% \begin{color}{fxerror}
% \begin{color}{fxfatal}
%   Environments use the same colors as the notes themselves because their
%   contents really is a longer note.
%    \begin{macrocode}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

%    \end{macrocode}
% \end{color}
% \end{color}
% \end{color}
% \end{color}
% \begin{macro}{\@fxdocolon}
%   \marg{author}\\
%   Add a colon after the author tag, unless empty.
%    \begin{macrocode}
\providecommand*\@fxdocolon[1]{%
  \ifthenelse{\equal{#1}{}}{\def\@fxcolon{}}{\def\@fxcolon{: }}}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FXLayoutPDFCMargin}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutPDFCMargin[3]{%
  \@fxdocolon{#3}%
  \pdfmargincomment[author={#3},color={fx#1}]{\ignorespaces#3\@fxcolon#2}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfcmargin}
%   \begin{booleanoption}{pdfcmargin}
%    \begin{macrocode}
\FXRegisterLayout*[margin,marginclue,marginnote,pdfmargin]{pdfcmargin}{%
  \FXLayoutPDFCMargin}
%</fxlayoutpdfcmargin>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfcsignote} layout}
% \begin{layout}{pdfcsignote}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfcsignote>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfcsignote}

\RequirePackage{pdfcomment}
\RequirePackage{xcolor}

%    \end{macrocode}
% \begin{color}{fxnote}
% \begin{color}{fxwarning}
% \begin{color}{fxerror}
% \begin{color}{fxfatal}
%   Environments use the same colors as the notes themselves because their
%   contents really is a longer note.
%    \begin{macrocode}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

%    \end{macrocode}
% \end{color}
% \end{color}
% \end{color}
% \end{color}
% \begin{macro}{\FXLayoutPDFCSigNote}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutPDFCSigNote[3]{%
  \pdfcomment[author={#3},color={fx#1}]{#2\@fxsignature{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfcsignote}
%   \begin{booleanoption}{pdfcsignote}
%    \begin{macrocode}
\FXRegisterLayout[pdfnote,pdfcnote]{pdfcsignote}{\FXLayoutPDFCSigNote}
%</fxlayoutpdfcsignote>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsubsection{The \texttt{pdfcsigmargin} layout}
% \begin{layout}{pdfcsigmargin}
%   \mbox{}
%    \begin{macrocode}
%<*fxlayoutpdfcsigmargin>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesLayout{pdfcsigmargin}

\RequirePackage{pdfcomment}
\RequirePackage{xcolor}

%    \end{macrocode}
% \begin{color}{fxnote}
% \begin{color}{fxwarning}
% \begin{color}{fxerror}
% \begin{color}{fxfatal}
%   Environments use the same colors as the notes themselves because their
%   contents really is a longer note.
%    \begin{macrocode}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

%    \end{macrocode}
% \end{color}
% \end{color}
% \end{color}
% \end{color}
% \begin{macro}{\FXLayoutPDFCSigMargin}
%   \marg{type}\marg{note}\marg{author}
%    \begin{macrocode}
\newcommand*\FXLayoutPDFCSigMargin[3]{%
  \pdfmargincomment[author={#3},color={fx#1}]{#2\@fxsignature{#3}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxlayout@pdfcsigmargin}
%   \begin{booleanoption}{pdfcsigmargin}
%    \begin{macrocode}
\FXRegisterLayout*[margin,marginclue,marginnote,pdfmargin,pdfsigmargin]{%
  pdfcsigmargin}{%
  \FXLayoutPDFCSigMargin}
%</fxlayoutpdfcsigmargin>
%    \end{macrocode}
% \end{booleanoption}
% \end{macro}
% \end{layout}
%
% \subsection{Environment layouts}
% \subsubsection{The \texttt{color} layout}
% \begin{envlayout}{color}
%   \mbox{}
%    \begin{macrocode}
%<*fxenvlayoutcolor>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesEnvLayout{color}

\RequirePackage{color}

%    \end{macrocode}
% \begin{macro}{\@fxdocolon}
%   \marg{author}\\
%   Add a colon after the author tag, unless empty.
%    \begin{macrocode}
\providecommand*\@fxdocolon[1]{%
  \ifthenelse{\equal{#1}{}}{\def\@fxcolon{}}{\def\@fxcolon{: }}}

%    \end{macrocode}
% \end{macro}
% \begin{color}{fxnote}
% \begin{color}{fxwarning}
% \begin{color}{fxerror}
% \begin{color}{fxfatal}
%   Environments use the same colors as the notes themselves because their
%   contents really is a longer note.
%    \begin{macrocode}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

\fxsetface{env}{}

%    \end{macrocode}
% \end{color}
% \end{color}
% \end{color}
% \end{color}
% \begin{macro}{\FXEnvLayoutColorBegin}
% \begin{macro}{\FXEnvLayoutColorEnd}
%   \marg{type}\marg{author}
%    \begin{macrocode}
\newcommand*\FXEnvLayoutColorBegin[2]{%
  \@fxdocolon{#2}%
  \@fxuseface{env}\color{fx#1}\ignorespaces#2\@fxcolon\ignorespaces}
\newcommand*\FXEnvLayoutColorEnd[2]{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxenvlayout@color@begin}
% \begin{macro}{\@fxenvlayout@color@end}
%    \begin{macrocode}
\FXRegisterEnvLayout{color}{\FXEnvLayoutColorBegin}{\FXEnvLayoutColorEnd}
%</fxenvlayoutcolor>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{envlayout}
%
% \subsubsection{The \texttt{colorsig} layout}
% \begin{envlayout}{colorsig}
%   \mbox{}
%    \begin{macrocode}
%<*fxenvlayoutcolorsig>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesEnvLayout{colorsig}

\RequirePackage{color}

%    \end{macrocode}
% \begin{face}{signature}
%   \mbox{}
%    \begin{macrocode}
\@fxnewface[\itshape]{signature}
%    \end{macrocode}
% \end{face}
% \begin{color}{fxnote}
% \begin{color}{fxwarning}
% \begin{color}{fxerror}
% \begin{color}{fxfatal}
%   Environments use the same colors as the notes themselves because their
%   contents really is a longer note.
%    \begin{macrocode}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

\fxsetface{env}{}

%    \end{macrocode}
% \end{color}
% \end{color}
% \end{color}
% \end{color}
% \begin{macro}{\FXEnvLayoutColorSigBegin}
% \begin{macro}{\FXEnvLayoutColorSigEnd}
%   \marg{type}\marg{author}
%    \begin{macrocode}
\newcommand*\FXEnvLayoutColorSigBegin[2]{\@fxuseface{env}\color{fx#1}}
\newcommand*\FXEnvLayoutColorSigEnd[2]{\@fxsignature{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\@fxenvlayout@colorsig@begin}
% \begin{macro}{\@fxenvlayout@colorsig@end}
%    \begin{macrocode}
\FXRegisterEnvLayout{colorsig}{%
  \FXEnvLayoutColorSigBegin}{\FXEnvLayoutColorSigEnd}
%</fxenvlayoutcolorsig>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{envlayout}
%
% \subsection{Target Layouts}
% Since target layouts don't include author information, they're orthogonal to
% (and hence usable in) prefix/signature display.
%
% \subsubsection{The \texttt{changebar} layout}
% \begin{targetlayout}{changebar}
%   \mbox{}
%    \begin{macrocode}
%<*fxtargetlayoutchangebar>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesTargetLayout{changebar}

\RequirePackage{changebar}
\setlength{\changebarsep}{5pt}

\fxsetface{target}{}
%    \end{macrocode}
% \begin{macro}{\FXTargetLayoutChangeBar}
%   \marg{target}
%    \begin{macrocode}
\newcommand\FXTargetLayoutChangeBar[2]{\cbstart\@fxuseface{target}#2\cbend}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxtargetlayout@changebar}
%    \begin{macrocode}
\FXRegisterTargetLayout{changebar}{\FXTargetLayoutChangeBar}
%</fxtargetlayoutchangebar>
%    \end{macrocode}
% \end{macro}
% \end{targetlayout}
%
% \subsubsection{The \texttt{color} layout}
% \begin{targetlayout}{color}
%   \mbox{}
%    \begin{macrocode}
%<*fxtargetlayoutcolor>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesTargetLayout{color}

\RequirePackage{color}
\definecolor{fxnote}{rgb}{0.0000,0.6000,0.0000}
\definecolor{fxwarning}{rgb}{1.0000,0.5490,0.0000}
\definecolor{fxerror}{rgb}{1.0000,0.2706,0.0000}
\definecolor{fxfatal}{rgb}{1.0000,0.0000,0.0000}

%    \end{macrocode}
% \begin{color}{fxtarget}
%   \mbox{}
%    \begin{macrocode}
\definecolor{fxtarget}{rgb}{0.3725,0.6196,0.6275}

\fxsetface{target}{}

%    \end{macrocode}
% \end{color}
% \begin{macro}{\FXTargetLayoutColor}
%   \marg{target}
%    \begin{macrocode}
\newcommand\FXTargetLayoutColor[2]{\@fxuseface{target}\color{fxtarget}#2}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxtargetlayout@color}
%    \begin{macrocode}
\FXRegisterTargetLayout{color}{\FXTargetLayoutColor}
%</fxtargetlayoutcolor>
%    \end{macrocode}
% \end{macro}
% \end{targetlayout}
%
% \subsubsection{The \texttt{colorcb} layout}
% \begin{targetlayout}{colorcb}
%   \mbox{}
%    \begin{macrocode}
%<*fxtargetlayoutcolorcb>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesTargetLayout{colorcb}

\RequirePackage{color}

\RequirePackage[color]{changebar}
\setlength{\changebarsep}{5pt}

\fxsetface{target}{}
%    \end{macrocode}
% \begin{macro}{\FXTargetLayoutColorCB}
%   \marg{target}
%    \begin{macrocode}
\newcommand\FXTargetLayoutColorCB[2]{%
  \cbstart\cbcolor{fx#1}\@fxuseface{target}#2\cbend}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@fxtargetlayout@colorcb}
%    \begin{macrocode}
\FXRegisterTargetLayout{colorcb}{\FXTargetLayoutColorCB}
%</fxtargetlayoutcolorcb>
%    \end{macrocode}
% \end{macro}
% \end{targetlayout}
%
% \section{Themes}
% \subsection{The \texttt{signature} theme}
% \begin{theme}{signature}
%   \mbox{}
%    \begin{macrocode}
%<*fxthemesignature>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesTheme{signature}

\fxuseenvlayout{signature}

\renewcommand*\FXLayoutFootnote[3]{\footnote{\@fxsigstd{#1}{#2}{#3}}}
\renewcommand*\FXLayoutMargin[3]{%
  \marginpar[{\raggedleft\@fxuseface{margin}\@fxsigstd{#1}{#2}{#3}}]{%
    \raggedright\@fxuseface{margin}\@fxsigstd{#1}{#2}{#3}}}
\renewcommand*\FXLayoutMarginClue[3]{%
  \marginpar[{\raggedleft\@fxuseface{margin}\fxnotename{#1}!\@fxsignature{#3}}]{%
    \raggedright\@fxuseface{margin}\fxnotename{#1}!\@fxsignature{#3}}}
\renewcommand*\FXLayoutInline[3]{{ \@fxuseface{inline}\@fxsigstd{#1}{#2}{#3}}}
\renewcommand*\FXLayoutIndex[3]{%
  \iffx@mode@multiuser%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !\@nameuse{thefx#1count}: #2\@fxsignature{#3}}%
    \index{***#3@\fixmeindexname{} (#3):%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !\@nameuse{thefx#1count}: #2}%
  \else%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !\@nameuse{thefx#1count}: #2}%
  \fi}
\renewcommand*\FXLayoutContentsLine[3]{%
  \iffx@mode@multiuser%
    \fxaddcontentsline{\@fxsigstd{#1}{#2}{#3}}%
  \else%
    \fxaddcontentsline{\fxnotename{#1}: #2}%
  \fi}
%</fxthemesignature>
%    \end{macrocode}
% \end{theme}
%
% \subsection{The \texttt{color} theme}
% \begin{theme}{color}
%   \mbox{}
%    \begin{macrocode}
%<*fxthemecolor>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesTheme{color}

\RequirePackage{color}

\FXRequireEnvLayout{color}
\FXRequireTargetLayout{color}

\fxsetface{inline}{}

\renewcommand*\FXLayoutFootnote[3]{%
  \@fxdocolon{#3}%
  \footnote{\color{fx#1}\ignorespaces#3\@fxcolon#2}}
\renewcommand*\FXLayoutMargin[3]{%
  \@fxdocolon{#3}%
  \marginpar[%
  {\raggedleft\@fxuseface{margin}\color{fx#1}\ignorespaces#3\@fxcolon#2}]{%
    \raggedright\@fxuseface{margin}\color{fx#1}\ignorespaces#3\@fxcolon#2}}
\renewcommand*\FXLayoutMarginClue[3]{%
  \marginpar[{\raggedleft\@fxuseface{margin}\color{fx#1}\ignorespaces#3!}]{%
    \raggedright\@fxuseface{margin}\color{fx#1}\ignorespaces#3!}}
\renewcommand*\FXLayoutInline[3]{%
  \@fxdocolon{#3}%
  { \textcolor{fx#1}{\@fxuseface{inline}\ignorespaces#3\@fxcolon#2}}}
\renewcommand*\FXLayoutIndex[3]{%
  \iffx@mode@multiuser%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !{\color{fx#1}\@nameuse{thefx#1count}: #3: #2}}%
    \index{***#3@\fixmeindexname{} (#3):%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !{\color{fx#1}\@nameuse{thefx#1count}: #2}}%
  \else%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !{\color{fx#1}\@nameuse{thefx#1count}: #2}}%
  \fi}

\renewcommand*\FXLayoutContentsLine[3]{%
  \@fxdocolon{#3}%
  \iffx@mode@multiuser%
    \fxaddcontentsline{\color{fx#1}\ignorespaces#3\@fxcolon#2}%
  \else%
    \fxaddcontentsline{\color{fx#1}#2}%
  \fi}
%</fxthemecolor>
%    \end{macrocode}
% \end{theme}
%
% \subsection{The \texttt{colorsig} theme}
% \begin{theme}{colorsig}
%    \begin{macrocode}
%<*fxthemecolorsig>
\NeedsTeXFormat{LaTeX2e}
\FXProvidesTheme{colorsig}

\RequirePackage{color}

\FXRequireEnvLayout{colorsig}
\FXRequireTargetLayout{color}

\fxsetface{inline}{}

\renewcommand*\FXLayoutFootnote[3]{\footnote{\color{fx#1}#2\@fxsignature{#3}}}
\renewcommand*\FXLayoutMargin[3]{%
  \marginpar[{\raggedleft\@fxuseface{margin}\color{fx#1}#2\@fxsignature{#3}}]{%
    \raggedright\@fxuseface{margin}\color{fx#1}#2\@fxsignature{#3}}}
\renewcommand*\FXLayoutMarginClue[3]{%
  \marginpar[{\raggedleft\@fxuseface{margin}\color{fx#1}!\@fxsignature{#3}}]{%
    \raggedright\@fxuseface{margin}\color{fx#1}!\@fxsignature{#3}}}
\renewcommand*\FXLayoutInline[3]{%
  { \textcolor{fx#1}{\@fxuseface{inline}#2\@fxsignature{#3}}}}
\renewcommand*\FXLayoutIndex[3]{%
  \iffx@mode@multiuser%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !{\color{fx#1}\@nameuse{thefx#1count}: #2\@fxsignature{#3}}}%
    \index{***#3@\fixmeindexname{} (#3):%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !{\color{fx#1}\@nameuse{thefx#1count}: #2}}%
  \else%
    \index{***@\fixmeindexname:%
      !\@nameuse{@fx#1key}@\fxnotesname{#1}:%
      !{\color{fx#1}\@nameuse{thefx#1count}: #2}}%
  \fi}
\renewcommand*\FXLayoutContentsLine[3]{%
  \iffx@mode@multiuser%
    \fxaddcontentsline{\color{fx#1}#2\@fxsignature{#3}}%
  \else%
    \fxaddcontentsline{\color{fx#1}#2}%
  \fi}
%</fxthemecolorsig>
%    \end{macrocode}
% \end{theme}
%
% ^^A \PrintChanges
% ^^A Nobody messes up with the marks in this document, but \index@prologue.
% ^^A That sucks.
% \makeatletter{\let\markboth\@gobbletwo\PrintIndex}\makeatother
% \Finale
%
% ^^A Local variables:
% ^^A eval : (add-hook 'TeX-update-style-hook (lambda () (doxitems "option" "counter" "lang" "cond" "face" "color" "theme")) nil t)
% ^^A eval: (add-hook 'TeX-update-style-hook (lambda () (doxitem "\\(env\\|target\\)?layout")) nil t)
% ^^A End:
% ^^A fixme.dtx ends here.