summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/gmdoc/gmdoc.sty
blob: a5bc9763984b0763df99ae8b84daa4b98b139498 (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
%% 
%% \iffalse ^^A we skip the debug setting
\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
%% \fi
%% ^^A $Id: TheUltimateMaster.gmd,v 0.298 2011/02/02 18:35:58 natror Exp natror $
%% This is file “gmdoc.sty” generated with the DocStrip utility.
%% 
%%
%% The original source files were:
%%
%% gmdoc/gmdoc.gmd  (with options: `doc')
%%
%% 
%% Copyright ©  2006, 2007, 2008, 2009, 2010
%% by Grzegorz ‘Natror’ Murzynowski
%% natror (at) gmail (dot) com
%% 
%% This program is subject to the LaTeX Project Public License.
%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
%% for the details of that license.
%%
%% LPPL status: "author-maintained".
%%
%% 
%% 
%% For the documentation please refer to the file(s)
%% gmdoc.{gmd,pdf}.
%% 
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{gmdoc}
    [2010/09/25 v0.993 a documenting package (GM)]


%%
%% ^^A(
%% \chschange{v0.98j}{2006/10/19}{4372}
%% \chschange{v0.98j}{06/10/19}{4372}
%% \begin{macrocode}
%%\end{macrocode}
%% \skiplines we skip the driver
%%\endskiplines

\ifnum\catcode`\@=12

\errorcontextlines=100

\documentclass[countalllines, codespacesgrey, outeroff, debug, mwrep,
pagella, trebuchet, cursor, fontspec=quiet]{gmdocc}

\verbLongDashes

\DoNotIndex{\gmu@tempa \gmu@tempb \gmu@tempc \gmu@tempd \gmu@tempe \gmu@tempf}

\twocoltoc
\title{The \pk{gmdoc} Package\\ i.e., \pk{gmdoc.sty} and
  \pk{gmdocc.cls}}
\author{Grzegorz `Natror' Murzynowski}
\date{\ifcase\month\relax\or January\or February\or March\or April\or May\or
  June\or July\or August\or September\or October\or November\or
  December\fi\ \the\year}

\begin{document}

\emptify\udigits % because orig. def. raises an error `\cs{@secondoftwo} has
                 % an extra \}'
\maketitle

\setcounter{page}{2}% \pk{hyperref} cries if it sees two pages
\tableofcontents
\DoIndex\maketitle

\SelfInclude
\DocInclude{gmdocc}

\skipgmlonely[\stanza The remarks about installation and compiling
  of the documentation are analogous to those in the chapter
  \pk{gmdoc.sty} and therefore omitted.\stanza]
\DocInclude{gmutils}
\DocInclude{gmiflink}
\DocInclude{gmverb}
\DocInclude{gmoldcomm}
\typeout{%
  Produce change log with^^J%
  makeindex -r -s gmglo.ist -o \jobname.gls \jobname.glo^^J
  (gmglo.ist should be put into some texmf/makeindex directory.)^^J}
\PrintChanges
\typeout{%
  Produce index with^^J%
  makeindex -r \jobname^^J}
 \PrintIndex

\afterfi{%
\end{document}
  makeindex -r gmdoc
  makeindex -r -s gmglo.ist -o gmdocDoc.gls gmdocDoc.glo


}\fi% of |\ifnum\catcode`\@=12|, of the driver that is.

\catcode`\^^C=9\relax
\RequirePackage{gmutils}[2008/08/30]% includes redefinition of
\RequirePackage{xkeyval}% we need key-vals later, but maybe we'll make

\newif\if@linesnotnum

\DeclareOption{linesnotnum}{\@linesnotnumtrue}


\newif\if@uresetlinecount

\DeclareOption{uresetlinecount}{\@uresetlinecounttrue}


\newif\if@countalllines
\newif\if@printalllinenos

\DeclareOption{countalllines}{% to use the \incs{inputlineno}
  % primitive and print real line numbers  % in a~file.
  \@countalllinestrue
  \@printalllinenosfalse}

\DeclareOption{countalllines*}{%
  \@countalllinestrue
  \@printalllinenostrue}


\newif\if@noindex

\DeclareOption{noindex}{\@noindextrue}

\newif\if@pageindex

\DeclareOption{pageindex}{\@pageindextrue}


\newif\if@indexallmacros

\DeclareOption{indexallmacros}{\@indexallmacrostrue}


\@ifundefined{if@marginparsused}{\newif\if@marginparsused}{}

\@ifclassloaded{article}{\@marginparsusedtrue}{}

\@ifclassloaded{report}{\@marginparsusedtrue}{}

\@ifclassloaded{book}{\@marginparsusedtrue}{}
\DeclareOption{withmarginpar}{\@marginparsusedtrue}

\DeclareOption{nomarginpar}{\@marginparsusedfalse}

\DeclareOption{codespacesblank}{%
  \AtEndOfPackage{% to allow \inverb|codespacesgrey, codespacesblank|
  \AtBeginDocument{\CodeSpacesBlank}}}

\DeclareOption{codespacesgrey}{%
  % \changes{v0.99l}{2008/08/06}{added due to Will Robertson's
  %  suggestion}
  \AtEndOfPackage{% to put the declaration into the begin-document
    % hook after definition of \incs{visiblespace}.
    \AtBeginDocument{\CodeSpacesGrey}}}

\ProcessOptions

\RequirePackage{gmutils}[2008/08/08]

\RequirePackage{xcolor}
\definecolor{deepblue}{rgb}{0,0,.85}



\@ifpackageloaded{hyperref}{\hypersetup{colorlinks=true,
    linkcolor=deepblue, urlcolor=blue, filecolor=blue}}{%
  \RequirePackage[colorlinks=true, linkcolor=deepblue, urlcolor=blue,
  filecolor=blue, pdfstartview=FitH, pdfview=FitBH,
  pdfpagemode=UseNone]{hyperref}}


\RequirePackage{gmiflink}
\RequirePackage{gmverb}[2010/08/12]

\Store@Macros{\@verbatim\verb}

\if@noindex
  \AtBeginDocument{\gag@index}% for the latter macro see line
  % \ref{gag@index}.
\else
   \RequirePackage{makeidx}\makeindex
\fi

\def\CodeDelim{\@bsphack\gmu@ifstar\Code@Delim@St\Code@Delim}

\def\Code@Delim@St#1{%
  {\escapechar\m@ne
    \@xa\gdef\@xa\code@delim\@xa{\string#1}}%
  \@esphack}

\def\Code@Delim#1{\VerbHyphen{#1}\Code@Delim@St{#1}}

\CodeDelim\%

\pdef\narrationmark{{\codett\verbhyphen}{\normalfont\enspace}\ignorespaces}


\newtoks\gmd@preverypar

\newcommand*\settexcodehangi{%
  \hangindent=\verbatimhangindent \hangafter=\@ne}% we'll use
\@ifdefinable\@@settexcodehangi{\let\@@settexcodehangi=\settexcodehangi}


\newlength\TextIndent
\newlength\CodeIndent
\CodeIndent=1,5em\relax
\@ifundefined{stanzaskip}{\newlength\stanzaskip}{}
\stanzaskip=\medskipamount
 %^^A \advance\stanzaskip by-.25\medskipamount% to preserve the stretch- and
 %^^A % shrinkability.\par
\newskip\CodeTopsep
\newskip\MacroTopsep

\def\UniformSkips{%\label{UniformSkips}
  % \Define\CodeTopsep \Define\MacroTopsep
  \CodeTopsep=\stanzaskip
  \MacroTopsep=\stanzaskip
  \abovedisplayskip=\stanzaskip
  %\nostanza \leftskip0sp \gmdnoindent
  %  |%% \abovedisplayshortskip|
  % remains untouched as it is 0.0\,pt plus 3.0\,pt by default.
  % \nostanza
  \belowdisplayskip=\stanzaskip
  \belowdisplayshortskip=.5\stanzaskip% due to DEK's idea of making the
  % short below display skip half of the normal.
  \advance\belowdisplayshortskip by\smallskipamount
  \advance\belowdisplayshortskip by-1\smallskipamount% We advance
  % \incs{be\+low\+dis\+play\+short\+skip} forth and back to
  % give it the \incs{small\+skip\+am\+ount}'s shrink- and
  % stretchability components.
  \topsep=\stanzaskip
  \partopsep=\z@
}
\UniformSkips
\AtBeginDocument{\UniformSkips}

\newcommand*\NonUniformSkips{\@relaxen\UniformSkips}
\newcommand*\chunkskip{%
  \par\addvspace{%
  \glueexpr\MacroTopsep
  \if@codeskipput-\CodeTopsep\fi
  \relax
}\@codeskipputgtrue}

\pdef\stanza{%
  \par\addvspace{%
    \glueexpr\stanzaskip
    \if@codeskipput-\CodeTopsep\fi
    \relax}\@codeskipputgtrue}

\newcommand*\nostanza{% \changes{v0.99n}{2008/08/21}{added adding
  % negative skip if in vmode and \cs{par}}
  \par
  \if@codeskipput\unless\if@nostanza\vskip-\CodeTopsep\relax\fi\fi
  \@codeskipputgtrue\@nostanzagtrue
  \@afternarrgfalse\@aftercodegtrue}% In the `code
\newgif\if@newline
\newgif\if@dsdir


\begingroup\catcode`\^^M=\active%
\firstofone{\endgroup%
  \newcommand*{\DocInput}[1]{\begingroup%
    % \changes{v0.98}{06/09/05}{\cs{@makeother\protect\bslash_} added}
    % \DefIndex\gmd@inputname
    \edef\gmd@inputname{#1}% we'll use it in some notifications.
    %
    \NamedInput@prepare{#1}% to make this input “named”, as with |\NamedInput|.
    %
    % \DefIndex\gmd@currentlabel@before
    \let\gmd@currentlabel@before=\@currentlabel% we store it because
    % we'll do |\xdef|s of |\@currentlabel| to make proper references
    % to the line numbers so we want to restore current
    % |\@currentlabel| after our group.\
    % \CodeUsgIndex\clubpenalty \CodeUsgIndex\widowpenalty
    \gmd@setclubpenalty% we wrapped the assignment of |\clubpenalty|
    % in a~macro because we'll repeat it twice more.
    \@clubpenalty\clubpenalty \widowpenalty=3333 % Most paragraphs of the code will be
    % one-line most probably and many of the narration, too.\par\
    % \changes[\DocInput]{v0.95}{06/08/15}{\cs{club-}
    % and \cs{widowpenalty} set both to 3333}
    %\CodeUsgIndex\tolerance
    \tolerance=1000 % as in \docfm.
    % ^^A    \catcode`\^^M=\active% redundant with line 2304
    % \CodeUsgIndex\code@delim
    \@xa\@makeother\csname\code@delim\endcsname%
    % \CodeUsgIndex\gmd@resetlinecount
    \gmd@resetlinecount% due to the option |uresetlinecount|
    % we reset the line number counter or do nothing.
    % \Define*{^^M}
    \QueerEOL% \changes{v0.99m}{2008/08/09}{there was
    % \cs{let}\hathat{M} but \cs{QueerEOL} is better: it also
    % redefines \cs{}\hathat M} It has to be before the
    % begin-input-hook to allow change by that hook.
    % \CodeUsgIndex\@beginputhook
    \@beginputhook% my first use of it is to redefine |\maketitle|
    % just at this point not globally. \CodeUsgIndex\everypar
    \everypar=\@xa{\@xa\@codetonarrskip\the\everypar}%
    % \Define\gmd@guardedinput
    \edef\gmd@guardedinput{%
      \@nx\@@input #1\relax% |\@nx| is
      % |\noexpand|, see \pk{gmutils}.\DoNotIndex\@nx
      % \incs{@@input} is the
      % true \TeX's \incs{input}. \CodeUsgIndex\EOFMark
      \gmd@iihook% cf.\ line \ref{iihook}
      \@nx\EOFMark% to pretty finish the input, see
      % line~\ref{eofMark}.\CodeUsgIndex\code@delim
      \@nx\CodeDelim\@xanxcs{\code@delim}% to
      % ensure the code delimiter is the same as at the beginning of
      % input.
      % \changes[\DocInput]{v0.99c}{2007/03/02}{added ensuring the
      % code delimiter to be the same at the end as at the beginning}
      \@nx^^M\code@delim%
      % \label{guardians}
    }% we add guardians after
    % |\input|ing a~file; somehow an error occurred without them.
    \catcode`\%=9 % for \docfm -compatibility.\label{ignorePercent}
    \setcounter{CheckSum}{0}% we initialise the counter for the number
    % of the escape chars (the assignment is |\global|).
    \everyeof{\relax}% |\@nx| moved not to spoil input of toc e.g.
    \@xa\@xa\@xa^^M\gmd@guardedinput%\label{eeeEOL}
    \par%
    % \CodeUsgIndex\@endinputhook
    \@endinputhook% It's a~hook to let postpone
    % some stuff till the end of input. We use it e.g.\ for the
    % \docfm-(not)likeliness notifications.
    \glet\@currentlabel=\gmd@currentlabel@before% we restore
    % value from before this group. In a~very special case this could
    % cause unexpected behaviour of cross-refs, but anyway we acted
    % globally and so acts \pk{hyperref}.
    %
    \NamedInput@finish% to clean up after a “named” input, as with |\NamedInput|.
    %
    \endgroup%
  }% end of |\Doc@Input|'s definition.
}% end of |\firstofone|'s argument.


\pdef\gmd@textEOL{ % a~space just like in normal
  % \TeX. We put it first to  % cooperate with \inverb|\^^M|'s
  % |\expandafter\ignorespaces|. It's  % no  % problem since a~space
  % | |${}_{10}$ doesn't drive \TeX\ out of  % the vmode.
  \ifhmode\@afternarrgtrue\@codeskipputgfalse\fi% being in
  % the horizontal mode means we've just typeset some narration so we
  % turn the respective switches: the one bringing the message `we are
  % after narration' to True (|@afternarr|) and the `we have put the
  % code-narration glue' to False (|@codeskipput|). Since we are in
  % a~verbatim group and the information should be brought outside it,
  % we switch the switches globally (the letter |g| in both).
  \@newlinegtrue% to |\refstep| the lines' counter at the proper
  % point.
  \@dsdirgtrue% to handle the \ds\ directives.
  \@xa\@trimandstore\the\everypar\@trimandstore%we store the
  % previous value of |\everypar| register to restore it at
  % a~proper point. See line \ref{@trimandstore} for the details.
  \begingroup%^^A ##### maybe we prefer to restore the genuine |\par|
  % ^^A~before the group?
  \gmd@setclubpenalty% Most paragraphs will be
  % one-line most probably. Since some sectioning commands may change
  % \incs{clubpenalty}, we set it again here and also after this
  % group.
  \aftergroup\gmd@setclubpenalty%
  \let\par\@@par% inside the verbatim group we wish |\par| to be genuine.
  % \CodeUsgIndex\ttverbatim
  \let\verbatimfont\codett %
  \ttverbatim% it applies the code-layer font (|\tt| by default) and makes specials
  % other or |\active|-and-breakable.
  % to turn verbatim specials off in
  % \incmd\scanverb s.
  \gmd@DoTeXCodeSpace%
  \@makeother\|% because |\ttverbatim| doesn't do that.
  \MakePrivateLetters% see line \ref{MPL}.\par
  \@xa\@makeother\code@delim% we are
  % almost sure the code comment char is among the chars having
  % been \catother ed already. For `almost' see the
  % \gmiflink[IndexInput]{\cs{IndexInput}} macro's definition.\par
  % So, we've opened a~verbatim group and want to peek at the next
  % character. If it's |%|, then we just continue narration, else we
  % process the leading spaces supposed there are any and, if after
  % them is a~|%|, we just continue the commentary as in the
  % previous case or else we typeset the \TeX\ code.
  \texcode@hook% we add some special stuff, e.g.\ in \pk{gmdocc.cls} we
  % make star low.
  \@xa\@ifnextcharRS\@xa{\code@delim}{%\label{ifContNarr}
    % \CodeUsgIndex\gmd@continuenarration
    \gmd@continuenarration}{% \CodeUsgIndex\gmd@dolspaces
    \gmd@dolspaces% it will launch |\gmd@typesettexcode|.
  }% end of |\@ifnextcharRS|'s else.
}% end of |\gmd@textEOL|'s definition.

\emptify\texcode@hook

\def\gmd@setclubpenalty{\clubpenalty=3333 }

\def\AtEndInput{\g@addto@macro\@endinputhook}
\def\@endinputhook{}
\def\AtBegInput{\g@addto@macro\@beginputhook}
\def\@beginputhook{}

\emptify\gmd@iihook

\AtBegInput{\let\gmd@@toc\tableofcontents
  \def\tableofcontents{% \label{straighttoc}
    \@ifQueerEOL
    {\StraightEOL\gmd@@toc\QueerEOL}%
    {\gmd@@toc}%
  }%
}


\def\@ifEOLactive{%\
  % \begin{enumargs}
  % \item what if end of line is active,
  % \item what if not.
  % \end{enumargs}
  \ifnum\catcode`\^^M=\active \@xa\@firstoftwo\else\@xa\@secondoftwo\fi}

\foone\obeylines{%
  \def\@ifQueerEOL{%\
    % \begin{enumargs}
    % \item what if line end is ‘queer’,
    % \item what if not ‘queer’.
    % \end{enumargs}
    % \changes{v0.98a}{06/09/06}{added}
    \@ifEOLactive{%
      \ifx^^M\gmd@textEOL\@xa\@firstoftwo\else\@xa\@secondoftwo\fi}%
    {\@secondoftwo}}% of \cs{@ifQueerEOL}
}% of \cs{foone}

\pdef\qfootnote{%
  \@ifQueerEOL
  {\begingroup\StraightEOL\qfootnote@}%
  {\footnote}}

\DeclareCommand\qfootnote@{o>Lm}{%
  \endgroup % yes, we close the group: the arguments are already
  % parsed and passed to this macro.
  \edef\gmu@tempa{%
    \@nx\footnote \IfValueT{#1}{[#1]}}%
  \gmu@tempa{#2}%
}

\pdef\qemph{%
  \@ifQueerEOL
  {\begingroup\StraightEOL\qemph@}%
  {\emph}}

\pdef\qemph@#1{\endgroup\emph{#1}}

\@emptify\gmd@ABIOnce
\AtEndOfPackage{\AtBegInput\gmd@ABIOnce}

\long\def\AtBegInputOnce#1{%
  \gaddtomacro\gmd@ABIOnce{\g@emptify\gmd@ABIOnce#1}}


\def\EOFMark{\<eof>}
\begin{obeyspaces}%
\gdef\CodeSpacesVisible{%
\def\gmd@DoTeXCodeSpace{%
\obeyspaces\let =\breakablevisspace}}%
\gdef\CodeSpacesBlank{%
\let\gmd@DoTeXCodeSpace\gmobeyspaces%
\let\gmd@texcodespace=\ }% the latter |\let| is for the |\if›…|s.
\gdef\CodeSpacesSmall{%
\def\gmd@DoTeXCodeSpace{%
\obeyspaces\def {\,\hskip\z@}}%
\def\gmd@texcodespace{\,\hskip\z@}}%
\end{obeyspaces}

\def\CodeSpacesGrey{%
  % \changes{v0.99l}{2008/08/06}{added due to Will Robertson's
  %   suggestion}
  \CodeSpacesVisible
  \VisSpacesGrey% defined in \pk{gmverb}
}%


\CodeSpacesVisible

\def\gmd@continuenarration{%
  \endgroup
  \gmd@cpnarrline% see \gmiflink[countnarr]{below}.
  \@xa\@trimandstore\the\everypar\@trimandstore
  \everypar=\@xa{\@xa\@codetonarrskip\the\everypar}%
  \@xa\gmd@checkifEOL\@gobble}

\if@countalllines

  \def\gmd@countnarrline@{%
      \gmd@grefstep{codelinenum}\@newlinegfalse
      \everypar=\@xa{%
        \@xa\@codetonarrskip\the\gmd@preverypar}%^^A
      % the \cs{hy\+p\+er\+lab\+el\+@\+li\+ne} macro puts
      % a~hypertarget in a~|\raise| i.e., drives \TeX\ into the
      % horizontal mode so |\everypar| shall be issued. Therefore we
      % should restore it.
    }% of \cs{gmd@countnarrline@}

    \def\gmd@grefstep#1{% instead of diligent redefining all possible
      % commands and environments we just assign the current value of
      % the respective \TeX's primitive to the \env{codelinenum}
      % counter. Note we decrease it by $-1$ to get the proper value
      % for the next line. (Well, I~don't quite know why, but it
      % works.) %^^A~we'll step its value by 1 because it will be put
      % ^^Aat the beginning of the \emph{next} line.
      \ifnum\value{#1}<\inputlineno
        \csname c@#1\endcsname\numexpr\inputlineno-1\relax
        \ifvmode\leavevmode\fi% this line is added 2008/08/10 after an
        % ^^A(
        % all-night debuggery ;-) that showed that at one point
        % \incs{gmd@grefstep} was called in vmode which caused adding
        % \incs{penalty 10000} to the main vertical list and thus
        % forbidding page break during entire \inenv{oldmc}.
        \grefstepcounter{#1}%
      \fi}% We wrap stepping the counter in an \incs{ifnum} to avoid
    % repetition of the same ref-value (what would result in the
    % ``multiply defined labels'' warning).\par\
    % The
    % \cs{grefstepcounter} macro, defined in \pk{gmverb}, is
    % a~global
    % version of \cs{ref\-step\-count\-er}, observing the redefinition
    % made
    % to \incs{refstepcounter} by \pk{hyperref}.

    \if@printalllinenos% Note that checking this switch makes only
    % sense when |countalllines| is true.
      \def\gmd@cpnarrline{% count and print narration line
        \if@newline
          \gmd@countnarrline@
          \hyperlabel@line
          {\LineNumFont\thecodelinenum}\,\ignorespaces}%
        \fi}
      \else% not |printalllinenos|
        \emptify\gmd@cpnarrline
      \fi

\def\gmd@ctallsetup{% In the \inenv{oldmc} environments and with the
  % \incs{FileInfo} declaration (when % \inenv{countalllines} option
  % is in force) the  % code is gobbled as an argument of a~macro and
  % % then processed at one place (at the end of  % \inenv{oldmc}
  % % e.g.) so if we used  % \incs{inputlineno}, we would have got all
  % % the  % lines with the same number. But we only set the counter
  % % not \incs{refstep} it to avoid putting a~hypertarget.
  \setcounter{codelinenum}{\inputlineno}% it's global.
  \let\gmd@grefstep\hgrefstepcounter}

\else% not |countalllines| (and therefore we won't print the narration
     % lines' numbers either)
  \@emptify\gmd@cpnarrline
  \let\gmd@grefstep\hgrefstepcounter% \label{let grefstep} if we don't
  % want to count all the  lines, we only \incs{ref}-increase the
  % counter in the code layer.
  \emptify\gmd@ctallsetup
\fi% of |\if@countalllines|

\def\skiplines{\bgroup
  \let\do\@makeother \dospecials % not \incs{@sanitize} because the
  % latter doesn't recatcode braces and we want all to be quieten.\ilrr
  \gmd@skiplines}

  \edef\gmu@tempa{%
    \long\def\@nx\gmd@skiplines##1\bslash endskiplines{\egroup}}
  \gmu@tempa

\foone\obeylines{% \DefIndex\gmd@typesettexcode
  \def\gmd@typesettexcode{%
    \gmd@parfixclosingspace% it's to eat a~space closing the
    % paragraph, see \gmiflink[closingspace]{below}. It contains
    % |\par|.
    %
    % ^^A\special{color push gray 0.2645}%
    % A~verbatim group has already been opened by \cs{ttverb\+at\+im} and
    % additional \cs{cat\-code}.
    \everypar={\@@settexcodehangi}% At first attempt we thought
    % of giving the user a~|\toks| list to insert at the beginning of
    % every code line, but what for?
    % \Define*{^^M}^^A
    \def^^M{% \TeX\ code \acro{EOL}
      \@newlinegtrue% to |\refstep| the counter in proper place.
      \@dsdirgtrue% to handle the \ds\ directives.
      \global\gmd@closingspacewd=\z@% \label{noclosingspace}we
      % don't wish to eat a~closing space after a~codeline, because
      % there isn't any and a~negative rigid |\hskip| added to
      % |\parfillskip| would produce a~blank line.
      \ifhmode\par\@codeskipputgfalse\else%
        \if@codeskipput%
        \else\addvspace{\stanzaskip}\@codeskipputgtrue%
        \fi% if we've just met a~blank (code) line, we insert
        % a~|\stanzaskip| glue.
        % \label{codeskip}
      \fi%
      \prevhmodegfalse% we want to know later that now we are in the
      % vmode.
      % ^^A\special{color push gray 0.2666}%
      \@ifnextcharRS{\gmd@texcodespace}{%
        \@dsdirgfalse\gmd@dolspaces}{\gmd@charbychar}%
    }% end of |^^M|'s definition.\label{debug!2}
    % \DefIndex\gmd@texcodeEOL
    \let\gmd@texcodeEOL=^^M% for further checks inside |\gmd@charbychar|.
    \raggedright\leftskip=\CodeIndent%
    \if@aftercode%
      \gmd@nocodeskip1{iaC}%
    \else%
      \if@afternarr%
      % ^^A~\def^^C{\showthe\hyphenpenalty\showthe\rightskip}
        \if@codeskipput\else%
          \gmd@codeskip1\@aftercodegfalse%
        \fi% \label{codeskip3}
      \else\gmd@nocodeskip1{naN}%
      \fi%
    \fi% if now we are
    % switching from the narration into the code, we insert a~proper
    % vertical space.
    \@aftercodegtrue\@afternarrgfalse%
    %^^A\special{color push gray 0.2682}% before that penalty
    \ifdim\gmd@ldspaceswd>\z@% and here the leading spaces.
      \leavevmode\@dsdirgfalse%
      \if@newline\gmd@grefstep{codelinenum}\@newlinegfalse%
      \fi%
      \printlinenumber% if we don't want the lines to be numbered,
      % the respective option \incs{let}s this \CS to \incs{relax}.
      \hyperlabel@line%
      %^^A\special{color push gray 0.2689}% seems O.K.
      \mark@envir% index and/or marginize an environment if there is
      % some to be done so, see line \ref{mark@envir}.
      \hskip\gmd@ldspaceswd%
      \advance\hangindent by\gmd@ldspaceswd%
      \xdef\settexcodehangi{%
        \@nx\hangindent=\the\hangindent% and also set the
        % hanging indent setting for the same line comment case. \acro{BTW}.,
        % this |%| or rather lack of it costed me five hours of
        % debugging and rewriting. Active line ends require extreme
        % caution.
        \@nx\hangafter=1\space}%^^A~\@nx\relax
    \else%
      \glet\settexcodehangi=\@@settexcodehangi%\\
      %|%| |\printlinenumber| here produced line numbers for blank lines
      % which is what we don't want.
    \fi% of |\ifdim|
    \gmd@ldspaceswd=\z@%
    \prevhmodegfalse% we have done |\par| so we are not in the
    % hmode.
    \@aftercodegtrue% we want to know later that now we are
    % typesetting a~codeline.
    \if@ilgroup\aftergroup\egroup\@ilgroupfalse\fi% when we are in the in-line
    % comment group (for ragged right or justified), we want
    % to \label{inline.egroup.2}
    % close it. But if we did it
    % here, we would close the verbatim group for the code. But we set
    % the switch false not to repeat \inverb|\aftergroup\egroup|.
    % ^^A\special{color push gray 0.2712}% before that penalty
    \gmd@charbychar% we'll eat the code char by char to scan all the
    % macros and thus to deal properly with the case |\%| in which the
    % |%| will be scanned and won't
    % launch closing of the verbatim group.
  }% of |\gmd@typesettexcode|.
}% of |\foone\obeylines|.
\newlength\gmd@spacewd% to store the width of a~(leading)
\newlength\gmd@ldspaceswd% to store total length of gobbled leading
                          %spaces.

\let\gmd@texcodespace=\breakablevisspace

\def\gmd@dolspaces{%
  \ifx\gmd@texcodespace\@let@token
    \@dsdirgfalse
    \afterfi{\settowidth{\gmd@spacewd}{\visiblespace}%
    \gmd@ldspaceswd=\z@
    \gmd@eatlspace}%
  \else\afterfi{% about this smart macro and other of its family see
    % \pk{gmutils} sec.\,3.
    % ^^A \special{color push gray 0.2748}% debug of \penalty10000
    % ^^A~2008/08/10 was far
    % ^^A \ifnum\inputlineno>1016 \ifnum\inputlineno<1050 \show\par\fi\fi
    % ^^A~O.K.
    \if@afternarr\if@aftercode
        \ifilrr\bgroup \gmd@setilrr\fi
    \fi\fi
    \par% possibly after narration
    \if@afternarr\if@aftercode
        \ifilrr\egroup\fi
    \fi\fi
    \gmd@typesettexcode}%
  \fi}


\def\gmd@eatlspace#1{%
  \ifx\gmd@texcodespace#1%
    \advance\gmd@ldspaceswd by\gmd@spacewd% we don't
    % \incs{advance} it \incs{global}ly because the current group may be closed
    % iff we meet \inverb|%| and then we'll won't indent the line anyway.\ilrr
    \afteriffifi\gmd@eatlspace
  \else
    \if\code@delim\@nx#1%
      \gmd@ldspaceswd=\z@
      \afterfifi{\gmd@continuenarration\narrationmark}%\label{ContNarr2}
      % \changes{v0.99n}{2008/08/30}{\cs{afterfifi} added---a~bug fix}
    \else \afterfifi{\gmd@typesettexcode#1}%
    \fi
  \fi}%


\newgif\ifprevhmode


\def\gmd@charbychar#1{%
  \ifhmode\prevhmodegtrue
  \else\prevhmodegfalse
  % ^^A~\special{color push gray 0.2789}%
  \fi
  \if\code@delim\@nx#1%
    \def\next{% occurs when next a~\cs{hskip4.875pt} is to be put
      % ^^A\special{color push gray 0.2791}% O.K.
      \gmd@percenthack% to typeset |%| if a~comment
    % continues the~codeline.
    \endgroup%
    \gmd@checkifEOLmixd}% to see if next is |^^M| and then do |\par|.
  \else% i.e., we've not met the code delimiter
    \ifx\relax#1\def\next{%
      % ^^A\special{color push gray 0.2798}%
      \endgroup}% special case of end of file thanks to |\everyeof|.
    \else
      \if\code@escape@char\@nx#1%
        \@dsdirgfalse% yes, just here not before the whole |\if| because
        % then we would discard checking for \ds\ directives doable by
        % the active |%| at the `old macrocode' setting.
        \def\next{%
          \gmd@counttheline#1\scan@macro}%
      \else
        \def\next{%
          \gmd@EOLorcharbychar#1}%
      \fi
    \fi
  \fi\next}

\def\debug@special#1{%
  \ifhmode\special{color push gray 0.#1}%
  \else\special{color push gray 0.#1000}\fi}

\def\gmd@EOLorcharbychar#1{%
                             %^^A \debug@special{2829}%
  \ifx\gmd@texcodeEOL#1%
    \if@newline
    % ^^A\special{color push gray 0.281600}% no occurrence
    % ^^A      \if@countalllines\global\advance\c@codelinenum by\@ne obsolete
    % ^^A\fi
      \@newlinegfalse
    \fi
    \afterfi{#1}%\label{printhashone1}here we print |#1|.
  \else% i.e., |#1| is \emph{not} a~(very active) line end,
    \afterfi
    {%^^A \debug@special{2839}% this occurs frequently
\gmd@counttheline#1\gmd@charbychar}% \label{printhashone2}or here
    % we print |#1|. Here we would also possibly mark an environment
    % but there's no need of it because declaring an environment to
    % be marked requires a~bit of commentary and here we are after
    % a~code |^^M| with no commentary.
 \fi}

\def\gmd@counttheline{%
  \ifvmode
    \if@newline
      \leavevmode
      %^^A \debug@special{2851}%
      \gmd@grefstep{codelinenum}\@newlinegfalse
      \hyperlabel@line
    \fi
    %^^A\debug@special{2853}%
    \printlinenumber
    % ^^A\debug@special{2855}%
    \mark@envir
  \else% not vmode
    \if@newline
    % ^^A\special{color push gray 0.2842}% didn't occur
      \gmd@grefstep{codelinenum}\@newlinegfalse
      \hyperlabel@line
    \fi
  \fi}


\def\gmd@percenthack{%%
  \ifprevhmode\aftergroup\narrationmark% We add a~space after |%|,
  % because I~think it looks better. It's done |\aftergroup| to make
  % the spaces possible after the |%| not to be
  % typeset.
  % \changes{v0.99n}{2008/08/21}{\cs{space} replaced with a~tilde to
  % forbid a~line break before an in-line comment}
  \else\aftergroup\gmd@dsNarrChecker% remember that
  % \cs{gmd\-@\-pre\-cent\-hack} is only called when we've the code
  % delimiter and soon we'll close the verbatim group and right after
  % |\endgroup| there waits |\gmd@checkifEOLmixd|.
  \fi}


\newif\ifgmd@dsVerb

\foone{\obeylines}%
{%
  \def\gmd@dsVerbChecker%
  #1% stuff for checking normal directive
  #2% line contents
  ^^M{%%
\typeout{verb checker l.\the\inputlineno}%
    \ifnum\strcmp{\detokenize{#2}}{\gmd@dsVerbDelim}=\z@%
      \global\gmd@dsVerbfalse%
      \def\gmd@modulehashone{%
        \ModuleVerbClose{\gmd@dsVerbDelim}%
        \global\emptify\gmd@dsVerbDelim%
        \@afternarrgfalse\@aftercodegtrue%
        \@codeskipputgfalse %
      }%
      \@xa\@firstoftwo%
    \else \@xa\@secondoftwo %
    \fi%
    {\gmd@textEOL\gmd@modulehashone^^M}%
    {\begingroup%
      \endlinechar=\m@ne %
      \@XA{%
        \endgroup#1}\scantokens{#2}^^M% note that |\scantokens| adds
      % char |\endlinechar| which we assure to be |^^M|
    }%
  }% of |\gmd@dsVerbChecker|
}% of |\obeylines|

\def\gmd@dsChecker#1{%
  \@dsdirgfalse
  \ifgmd@dsVerb
    \@xa\@firstofone
  \else
    \@xa\@secondoftwo
  \fi
  {\gmd@dsVerbChecker}%
  {#1}%
}% of |\gmd@dsChecker|

\def\gmd@dsNarrChecker#1{%%
  \gmd@dsChecker
  {\@ifnextcharRS<{%
      \@xa\gmd@docstripdirective\@gobble}{#1}}%
}% of |\gmd@dsNarrChecker|


\def\gmd@checkifEOL{%
  \gmd@cpnarrline
  \everypar=\@xa{\@xa\@codetonarrskip% we add the
    % macro that'll insert a~vertical space if we leave the code and
    % enter the narration.
    \the\gmd@preverypar}%
  \@ifnextcharRS{\gmd@textEOL}{%
  %^^A\@ifnextMac{%^^A}
    \@dsdirgfalse
    \par\ignorespaces}{%
    \gmd@narrcheckifds}}%

\def\gmd@narrcheckifds{%^^A\typeout{narr if ds \on@line}%
  \gmd@dsNarrChecker{\ignorespaces}}


\def\gmd@checkifEOLmixd{%
  \gmd@cpnarrline
  \everypar=\@xa{\@xa\@codetonarrskip\the\gmd@preverypar}%
  %
  % \label{longlinethatshouldbebroken}
  \@afternarrgfalse\@aftercodegtrue
  \ifhmode\@codeskipputgfalse\fi
  \@ifnextcharRS{\gmd@textEOL}{%
  %^^A\@ifnextMac{%^^A}
    {\raggedright\gmd@endpe\par}% without \incs{raggedright} this
    % \incs{par}
    % would be justified which is not appropriate for a~long codeline
    % that should be broken, e.g., \ref{longlinethatshouldbebroken}.
    \prevhmodegfalse
    \gmd@endpe\ignorespaces}{%
    % If a~codeline ends with |%|
    % (|prevhmode|${}=={}$True) first |\gmd@endpe| sets the parameters
    % at the \TeX\ code values and |\par| closes a~paragraph and the
    % latter |\gmd@endpe| sets the parameters at the narration values.
    % In the other case both |\gmd@endpe|s do the same
    % and |\par| between them does nothing.
    % \DefIndex\par
    \def\par{% the narration \cs{par}.
      \ifhmode% (I~added this |\ifhmode| as a~result of a~heavy
      % debug.)
        \if@afternarr\if@aftercode
            \unless\if@ilgroup\bgroup\@ilgrouptrue\fi
            \ifilrr\gmd@setilrr\fi
        \fi\fi
        \@@par
        \if@afternarr
          \if@aftercode
          \if@ilgroup\egroup\fi% \label{inline.egroup.1}if we are both after code
            % and after narration it means we are after an in-line
            % comment. Then we probably end a~group opened in line
            % \ref{inline.bgroup}
            \if@codeskipput\else\gmd@codeskip2\@aftercodegfalse\fi
            %\label{codeskip4}
          \else\gmd@nocodeskip2{naC}%
          \fi
        \else\gmd@nocodeskip2{naN}%
        \fi
        \prevhmodegfalse\gmd@endpe% when taken out of |\ifhmode|, this
        % line caused some codeline numbers were typeset with
        % |\leftskip|${}=0$.
        \everypar=\@xa{%
          \@xa\@codetonarrskip\the\gmd@preverypar}%
        \let\par\@@par%
      \fi}% of \cs{par}.
    \gmd@endpe\ignorespaces}}


\def\gmd@endpe{%
  \ifprevhmode
    \settexcodehangi%\unskip ndent
    \leftskip=\CodeIndent
  \else
    \leftskip=\TextIndent
    \hangindent=\z@
    \everypar=\@xa{%
      \@xa\@codetonarrskip\the\gmd@preverypar}%
  \fi}

\newif\ifilrr

\def\ilrr{%\changes{v0.99n}{2008/08/21}{added}
  \if@aftercode
    \unless\if@ilgroup\bgroup\@ilgrouptrue\fi% \label{inline.bgroup} If we are
    % `aftercode', then we are in an in-line comment. Then we open
    % a~group to be able to declare e.g.\ \cs{raggedright} for that
    % comment only. This group is closed in line \ref{inline.egroup.1}
    % or \ref{inline.egroup.2}.
    \ilrrtrue
  \fi}

\newif\if@ilgroup

\def\gmd@setilrr{\rightskip0ptplus\textwidth}

\def\ilju{% when in-line comments are ragged right in general but we
  % want just this one to be justified.
  \if@aftercode
    \unless\if@ilgroup\bgroup\@ilgrouptrue\fi
    \ilrrfalse
  \fi}

\def\verbcodecorr{%\changes{v0.99n}{2008/08/21}{added}
  % a~correction of vertical spaces between a~\env{verbatim} and
  % code. We put also a~\cs{par} to allow parindent in the next
  % commentary.
  \vskip-\lastskip\vskip-4\CodeTopsep\vskip3\CodeTopsep\par}

\if@uresetlinecount% with |uresetlinecount| option\dots
  \@relaxen\gmd@resetlinecount% \dots\  we turn
  % resetting the counter by \cs{Doc\+In\+put} off\dots
  \newcommand*\resetlinecountwith[1]{%
    \newcounter{codelinenum}[#1]}% \dots\ and provide a~new
  % declaration of the counter.
\else% With the option turned off\dots
  \newcounter{DocInputsCount}%
  \newcounter{codelinenum}[DocInputsCount]% \dots\ we declare the
  % |\DocInput|s' number counter and the codeline counter
  % to be reset with stepping of it.
  % \changes[\c@DocInputsCount]{v0.98c}{06/9/8}{added for fixing
  % duplication of \pk{hyperref} labels in the case of a~multiple
  % \cs{DocInput}}
  \newcommand*\gmd@resetlinecount{\stepcounter{DocInputsCount}}% \dots
  % and let the |\DocInput| increment the |\DocInput|s number count
  % and thus reset the codeline count. It's for unique naming of the
  % \pk{hyperref} labels.
\fi

\newcommand*\printlinenumber{%
  \leavevmode\llap{\rlap{\LineNumFont$\phantom{999}$\llap{\thecodelinenum}}%
    \hskip\leftskip}}

\def\LineNumFont{\normalfont\tiny}

\if@linesnotnum\@relaxen\printlinenumber\fi

\newcommand*\hyperlabel@line{%
  \if@pageindex% It's good to be able to switch it any time not just
  % define it once according to the value of the switch set by the
  % option.
  \else
    \raisebox{2ex}[1ex][\z@]{\gmhypertarget[clnum.%
      \HLPrefix\arabic{codelinenum}]{}}%
  \fi}

\newcommand*\gmd@codeskip[1]{%
  \@@par\addvspace\CodeTopsep
  \@codeskipputgtrue\@nostanzagfalse}

\newgif\if@codeskipput

\newgif\if@nostanza

\newcommand*\gmd@nocodeskip[2]{}

\if1 1
  \renewcommand*\gmd@codeskip[1]{%
    \hbox{\rule{1cm}{3pt} #1!!!}}
  \renewcommand*\gmd@nocodeskip[2]{%
    \hbox{\rule{1cm}{0.5pt} #1: #2 }}
\fi

\newgif\if@aftercode
\newgif\if@afternarr

\def\@codetonarrskip{%
  \if@codeskipput\else
    \if@afternarr\gmd@nocodeskip4{iaN}\else
      \if@aftercode
        % We are at the beginning of |\everypar|, i.e., \TeX\ has just entered
        % the hmode and put the |\parindent| box. Let's remove it then.
        {\setbox0=\lastbox}%
        % Now we can put the vertical space and state we are not `aftercode'.
        \gmd@codeskip4%
        % \label{codeskip5}
      \else\gmd@nocodeskip4{naC}%
      \fi
    \fi
  \fi
  \leftskip\TextIndent% this line is a~patch against
  % a~bug-or-feature that in certain cases the narration |\leftskip|
  % is left equal the code leftskip. (It happens when there are
  % subsequent code lines after an in-line comment not ended with
  % an explicit |\par|.) Before v0.99n it was just after line \ref{codeskip5}.
  \@aftercodegfalse\@nostanzagtrue
  % \changes{v0.99o}{2008/09/04}{a~bug fix: added \cs{@nostanzagtrue}}
}

\long\def\@trimandstore#1\@trimandstore{%
  \def\@trimandstore@hash{#1}%
  \ifx\@trimandstore@hash\@empty% we check if |#1| is
  % nonempty. The \incs{if} \inverb*|\relax#1\relax| trick is not
  % recommended here because using it we couldn't avoid expanding |#1|
  % if it'd be expandable.
    \gmd@preverypar={}%
  \else
    \afterfi{\@xa\@trimandstore@ne\the\everypar\@trimandstore}%
  \fi}

\long\def\@trimandstore@ne#1#2\@trimandstore{%\label{@trimandstore}
  \def\trimmed@everypar{#2}%
  \ifx\@codetonarrskip#1%
    \gmd@preverypar=\@xa{\trimmed@everypar}%
  \else
    \gmd@preverypar=\@xa{\the\everypar}%
  \fi}
\catcode`\^^B=\active% note we re|\catcode| \<char2> globally, for the
\catcode`\^^V=\active % the same for |^^V|.
\catcode`\^^U=\active % and  for |^^U|.
\foone{\obeylines}%% \Define*{^^B}
{\pdef\QueerCharTwo{%
    \protected\def^^B##1^^M{%
      %^^A\@newlinegtrue\gmd@countnarrline
      \ifhmode\unskip\space\ignorespaces\fi}}% It shouldn't be \incs{ } not to
  % drive \TeX\ into hmode.
  %
  % \Define*{^^V}
  % \Define*{^^U}
  % The |^^V| char is intended to mark parts of code commented out
  % which are to be typeset verbatim. Lines are begun with narration
  % marks (\%'s by default) and the narration-verbatim-typewriter font
  % is used.
  %
  % The |^^U| char is intended for the lines commented out which are
  % to be typeset as almost-invisible (second-class). They are marked
  % with the narration mark as with |^^V| and a special font setting
  % is used, which is a gray colour by default (in addition to the narration-verbatim-typewriter).
  %
  \pdef\gmd@UVdefs {%
    \def\gmd@UV@percent{\global\let\verb@balance@group\@empty  %
      % ^^V         \hyphenchar\font=\gmv@storedhyphenchar  % it works back
      % for the current paragraph so destroys our special hyphenchar.
      \egroup\endgroup %
    }% of |\gmd@UV@percent|
    %
    \@xa\def\@xa\verb@egroup@UV\@xa{%
      \gmd@UV@percent ^^M%
    }% of |\verb@egroup@UV|.
    %
    \addtomacro\gmd@UV@percent{\narrationmark}%
    %
    \pdef\gmd@QueerUV ##1{%
      \scantokens\@xa{\code@delim %
        \fooatletter{\@ifQueerEOL\@gobble}{}%
      }% of |\scantokens|
      %
      \par%
      {\codett\verbhyphen}\narrationmark %
      \begingroup %
      \catcode`\^^M=\active %
      %
      \let\verb@egroup=\verb@egroup@UV %
      \verb^^M%
      %
      ##1% nothing in |^^V| case and a gray setting in the |^^U| case.
      %
      \begingroup %
      \@xa\lccode\@xa`\@xa~\@xa`\code@delim%
      \lowercase{\endgroup\let~\gmd@UV@percent }%
      \@xa\catcode\@xa`\code@delim\active %
    }% of |\gmd@QueerUV|
  }% of |\gmd@UVdefs|
  %
  %
  \pdef\QueerU {%
    \unless\ifdefined\gmd@QueerU%
      %
      \gmd@UVdefs %
      \pdef\gmd@QueerU {\gmd@QueerUV {\QueerUFont }}%
      \let^^U\gmd@QueerU%
      \catcode`\^^U=\active%
    \fi %
  }% of |\QueerU|
  %
  \pdef\QueerV {%
    \unless\ifdefined\gmd@QueerV %
      %
      \gmd@UVdefs %
      \pdef\gmd@QueerV {\gmd@QueerUV {}}%
      \let^^V\gmd@QueerV%
      \catcode`\^^V=\active%
    \fi %
  }% of |\QueerV|
  %
}% of |\foone|

\QueerCharTwo
\QueerV
\QueerU
\def\QueerUFont{\color{black!35}}

\AtBegInput{\@ifEOLactive{\catcode`\^^B\active}{}\QueerCharTwo}% \label{QCh2}
\catcode`\^^A=\active% note we re|\catcode| \<char1> globally, for the
\foone\obeylines{%%\DefIndex\QueerCharOne \Define*{^^A}
  \def\QueerCharOne{%
    \def^^A{%^^A no need to write \incs{gmd@countnarrline} because
      % ^^A \inverb|^^M| will contain it if \inenv{countalllines} is in force.
      \bgroup\let\do\@makeother\dospecials\gmd@gobbleuntilM}}%
  \def\gmd@gobbleuntilM#1^^M{\egroup\ignorespaces^^M}%
}

\QueerCharOne

\AtBegInput{\@ifEOLactive{\catcode`\^^A\active}\QueerCharOne}% see note

\def\StraightEOL{%\label{StraightEOL}
  \catcode`\^^M=5
  \catcode`\^^A=14
  \catcode`\^^B=14
  \def\^^M{\ }}


\foone\obeylines{%
  \def\QueerEOL{%\label{QueerEOL}
    \catcode`\^^M=\active%
    \let^^M\gmd@textEOL%
    \catcode`\^^A=\active%
    \catcode`\^^B=\active% I~only re|\catcode| \<char1> and \<char2>
    % hoping no one but me is \emph{that} perverse to make them
    % |\active| and (re)define. (Let me know if I'm wrong at this point.)
    \let\^^M=\gmd@bslashEOL}%
}


\def\gmd@parfixclosingspace{{%
    \advance\parfillskip by-\gmd@closingspacewd
    \if@aftercode\ifilrr \gmd@setilrr \fi\fi
    \par}%
  \if@ilgroup\aftergroup\egroup\@ilgroupfalse\fi% we are in the
  % verbatim group so we
  % close the in-line comment group after it if the closing is not yet set.
}
\newskip\gmd@closingspacewd
\newcommand*\gmd@setclosingspacewd{%
  \global\gmd@closingspacewd=\fontdimen2\font%
    plus\fontdimen3\font minus\fontdimen4\font\relax}

\foone\obeylines{%\DefIndex*{\^^M}
  \if 1 1%
    \protected\def\gmd@bslashEOL{\ \@xa\ignorespaces^^M}%
  }% of \cs{foone}. Note we interlace here \incs{if} with a~group.
\else%
  \protected\def\gmd@bslashEOL{%
    \ifhmode\unskip\fi\ \ignorespaces}
    %^^A~\if@countalllines\@newlinegtrue\gmd@cpnarrline\fi%
  \fi

\gaddtomacro\@verbatim{\leftskip=\CodeIndent}

\AtBegInput{\long\def\check@percent#1{%
    \gmd@cpnarrline% to count the verbatim lines and possibly print
    % their numbers. This macro is used only by the verbatim end of line.
    \@xa\ifx\code@delim#1\else\afterfi{#1}\fi}}
\def\AddtoPrivateOthers#1{%
  \@xa\def\@xa\doprivateothers\@xa{%
    \doprivateothers\do#1}}%


\begingroup
\obeylines% \DefIndex\gm@verb@eol
\AtBegInput{\def\gm@verb@eol{\obeylines%
    \def^^M{\verb@egroup\@latex@error{%
        \@nx\verb ended by end of line}%
      \@ifEOLactive{^^M}{\@ehc}}}}%
\endgroup


\def\verbatimfont{\narrativett}
\def\codett{\tt}

\pdef\texttt#1{{\narrativett#1}}


\VerbatimPitch

\def\ResultsIn{results in:}

\DeclareEnvironment{verbatim@p}{}
{\begingroup
  \verbatim
}
{\endverbatim
  \endgroup
  \ResultsIn
  \[\parbox{0,85\textwidth}{%
    \newlinechar=\endlinechar
    \StraightEOL
    \scantokens\@xa{\VerbatimContents}%
  }% of parbox
  \]%
}





\edef\actualchar{\string @}
\edef\quotechar{\string "}
\edef\encapchar{\xiiclub}
\edef\levelchar{\string !}
\def\CodeEscapeChar#1{%
  \begingroup
  \escapechar\m@ne
  \xdef\code@escape@char{\string#1}%
  \endgroup}
\CodeEscapeChar\\

\@ifundefined{MakePrivateLetters}{%\label{MPL}
  \def\MakePrivateLetters{\makeatletter\catcode`\*=11 }}{}
\def\MakePrivateOthers{\let\do=\@makeother \doprivateothers}
\def\doprivateothers{\do\ \do\^}


\foone\obeylines{%
  \def\scan@macro#1{%
    \ifx#1^^M\@xa#1\else\afterfi{\scan@macro@#1}\fi%
  }% of |\scan@macro|,
}% of |\foone|.

\def\scan@macro@#1{% we are sure to scan at least one token which is
  % not the line end and
  % therefore we define this macro as one-parameter.\par
  \step@checksum% \label{checksumUse}(see line \ref{checksum} for
  % details),\par
  % Then, unlike in \docfm , we do \emph{not} check if the scanning is
  % allowed, because here it's always allowed and required.\par
  % Of course, I~can imagine horrible perversities, but I~don't think
  % they should really be taken into account.  Giving the letter |a|
  % |\catcode| other than \catletter\ surely would be one of those
  % perversities. Therefore I~feel safe to take the character |a| as
  % a~benchmark letter.
  \ifcat a\@nx#1%
    \quote@char#1%
    \xdef\macro@iname{\gmd@maybequote#1}% global for symmetry with
    % line \ref{x474}.
    \xdef\macro@pname{\string#1}%\label{stringing0} we'll print entire
    % name of the macro later.\par
    % We |\string| it here and in the lines \ref{stringing1} and
    % \ref{stringing2} to be sure it is whole \catother\ for easy
    % testing for special index entry formats, see line
    % \ref{pnametestDef} etc. Here we are sure the result of |\string|
    % is \catother\ since its argument is \catletter.
    \afterfi{\@ifnextcat{a}{\gmd@finishifstar#1}{\finish@macroscan}}%
  \else% |#1| is not a~letter, so we have just scanned a~one-char
  % \CS.\par
  % Another reasonable |\catcode|s assumption seems to be that the
  % digits are \catother. Then we don't have to
  % type (|%|)|\expandafter\@gobble\string\a|. We do the |\uccode|
  % trick to be sure that the char we write as the macro's name is
  % \catother.
    {\uccode`9=`#1%
      \uppercase{\xdef\macro@iname{9}}%\label{x474}
    }%
    \quote@char#1%
    \xdef\macro@iname{\gmd@maybequote\macro@iname}%
    \xdef\macro@pname{\xiistring#1}%\label{stringing1}
    \afterfi \finish@macroscan
  \fi}% of |\scan@macro@|.
\def\continue@macroscan#1{%
  \quote@char#1%
  \xdef\macro@iname{\macro@iname \gmd@maybequote#1}%
  \xdef\macro@pname{\macro@pname \string#1}%\label{stringing2} we know
  % \inverb*|#1| to be \catletter, so
  % we don't need \incs{xiistring}.
  \@ifnextcat{a}{\gmd@finishifstar#1}{\finish@macroscan}%
}

\def\gmd@finishifstar#1{%
  \if*\@nx#1\afterfi\finish@macroscan% note we protect |#1| against
  % expansion. In \pk{gmdoc} verbatim scopes some chars are active
  % (e.g.\ \inverb|\|\,).
  \else\afterfi\continue@macroscan
  \fi}


\def\quote@char#1{{\uccode`9=`#1% at first I~took digit 1 for this
    % |\uccode|ing but then |#1| meant |#|\<\#1> in |\uppercase|'s
    % argument, of course.
    \uppercase{% \DefIndex\gmd@maybequote
      \@ifinmeaning 9\of \indexcontrols
      {\glet\gmd@maybequote\quotechar}%
      {\g@emptify\gmd@maybequote}%
    }%
  }}


\AtBeginDocument{\xdef\indexcontrols{%
    \bslash\levelchar\encapchar\actualchar\quotechar}}

\newif\ifgmd@glosscs% we use this switch to keep the information

\newcommand*\finish@macroscan{%\label{506}\par
  % First we check if the current \CS is not just being defined. The
  % switch may be set true in line \ref{519}
  \ifgmd@adef@cshook% if so, we throw  it into marginpar and index as
    % a~def entry\dots
    \gmu@ifundefined{gmd/iexcl/\macro@pname\space}{% \dots\ if it's not excluded
      % from indexing.
       \@xa\Code@MarginizeMacro\@xa{\macro@pname}%
      \@xa\@defentryze\@xa{\macro@pname}{1}}{}%% here we declare the kind of
    % index entry and define |\last@defmark| used by \cs{changes}
    \global\gmd@adef@cshookfalse% we falsify the hook that was set
    % true just for this \CS.
  \fi
  % We have the \CS's name for indexing in |\macro@iname| and
  % for print in |\macro@pname|. So we index it. We do it a~bit
  % counter-crank way because we wish to use more general indexing
  % macro.
  \if\verbatimchar\macro@pname% \label{3039}it's important that |\verbatimchar|
  % comes before the macro's name: when it was reverse, the |\tt| \CS
  % turned this test true and left the |\verbatimchar| what resulted
  % with `|\+tt|' typeset. Note that this test should turn true iff
  % the scanned macro name shows to be the default
  % |\verb|'s delimiter. In such a~case we give
  % |\verb| another delimiter, namely |$|: ^^A$
    \def\im@firstpar{[$%^^A$
      ]}%
  \else\def\im@firstpar{}%
  \fi
  \@xa \index@macro\im@firstpar\macro@iname\macro@pname
  % \label{3049}
  \maybe@marginpar\macro@pname
  \if\xiispace\macro@pname\relax\gmd@texcodespace
  \else
    {\noverbatimspecials\Restore@Macro\verb
      \@xa\scanverb\@xa{\macro@pname}}% we typeset scanned \CS.
  \fi
  % \changes[\finish@macroscan]{v0.99n}{2008/09/30}{the case of
  %   \cs{\vs}  taken care of}
  \let\next\gmd@charbychar
  \gmd@detectors% \label{519} for automatic detection of
  % definitions. Defined and
  % explained in the next section. It redefines
  % |\next| if detects a~definition command and thus
  % sets the switch of line \ref{506} true.
  \next
  % \label{next 3690}
}

\def\maybe@marginpar#1{%
  \gmu@ifundefined{gmd/2marpar/\@xa\detokenize\@xa{#1}}{}{%
    \edef\gmu@tempa{%
      \unexpanded{\Text@Marginize*}%
      {\bslash\@xa\unexpanded\@xa{#1}}% ^^A
    }\gmu@tempa
    % ^^A %    |\expandafter|s
    % ^^A     % \possfil because the |\Text@Marginize| command applies |\string| to its
    % ^^A     % argument.
    % \incs{macro@pname}, which will be the only possible
    % argument to
    % \incs{may\+be\+@mar\+g\+in\+par},
    % contains the macro's name
    % without the escape char so we added it here.
    \@xa\g@relaxen
    \csname gmd/2marpar/\@xa\detokenize\@xa{#1}\endcsname% we reset the switch.
  }}

\outer\def\DeclareDefining{\begingroup
  \MakePrivateLetters
  \gmu@ifstar
    {\gdef\gmd@adef@defaulttype{text}\Declare@Dfng}%
    {\gdef\gmd@adef@defaulttype{cs}\Declare@Dfng}%
}

\newcommand*\Declare@Dfng[2][]{%
  \endgroup
  \Declare@Dfng@inner{#1}{#2}%
  \ifgmd@adef@star% this switch may be set false in first
  % \incs{Declare@Dfng@inner} (it's the |star| key).
    \Declare@Dfng@inner{#1}{#2*}% The catcode of |*| doesn't matter since
    % it's in
    % \incs{csname\+…\+\bslash end\+cs\+na\+me}
    % everywhere.
  \fi}

\def\Declare@Dfng@inner#1#2{%
  \edef\gmd@resa{%
    \@nx\setkeys[gmd]{adef}{type=\gmd@adef@defaulttype}}%
  \gmd@resa
  {\escapechar\m@ne
    \xdef\gmd@adef@currdef{\string#2}%
    % ^^A~\typeout{@@@ gmd@adef@currdef:::\gmd@adef@currdef::::}%
  }%
  \gmd@adef@setkeysdefault
  \setkeys[gmd]{adef}{#1}%
  \@xa\@ifinmeaning
    \csname gmd@detect@\gmd@adef@currdef\endcsname
    % \label{550}
    \of\gmd@detectors{}{%
      \@xa\gaddtomacro\@xa\gmd@detectors\@xa{%
        \csname gmd@detect@\gmd@adef@currdef\endcsname}}% we add a~\CS\\
    % |%| |\gmd@detect@|\<def name> (a~\textbf{detector}) to the
    % meaning of the \textbf{detectors' carrier}. And we define it to
    % detect the \inverb|#2| command.
  \@xa\xdef\csname gmd@detectname@\gmd@adef@currdef\endcsname{%
    \gmd@adef@currdef}%
  \edef\gmu@tempa{% this |\edef| is to expand |\gmd@adef@TYPE|.
    \global\@nx\@namedef{gmd@detect@\gmd@adef@currdef}{%
      \@nx\ifx
        \@xanxcs{gmd@detectname@\gmd@adef@currdef}%
        \@nx\macro@pname
        \@nx\n@melet{next}{gmd@adef@\gmd@adef@TYPE}%
        \@nx\n@melet{gmd@adef@currdef}{gmd@detectname@\gmd@adef@currdef}%
      \@nx\fi}}%
  \gmu@tempa
  \SMglobal\Store@MacroSt {gmd@detect@\gmd@adef@currdef}% we store the \CS to
  % allow its temporary discarding later.
}

\def\gmd@adef@setkeysdefault{%
  \setkeys[gmd]{adef}{star,prefix,KVpref}}

\define@boolkey[gmd]{adef}{star}[true]{}

\define@key[gmd]{adef}{prefix}[]{%
  \edef\gmd@resa{%
    \def\@xanxcs{gmd@adef@prefix@\gmd@adef@currdef }{%
      #1}}%
  \gmd@resa}

\def\gmd@KVprefdefault{KV}% in a~separate macro because we'll need
                            % it in \cs{ifx}.

\define@key[gmd]{adef}{KVpref}[\gmd@KVprefdefault]{%
  \edef\gmd@resa{#1}%
  \ifx\gmd@resa\gmd@KVprefdefault
  \else
    \@namedef{gmd@adef@KVprefixset@\gmd@adef@currdef}{1}%
    \gmd@adef@setKV% whenever the |KVpref|fix is set (not default), the
    % declared command is assumed to be \pk{keyval}ish.
  \fi
  \edef\gmd@resa{#1}% because |\gmd@adef@setKV| redefined it.
  \edef\gmd@resa{%
    \def\@xanxcs{gmd@adef@KVpref@\gmd@adef@currdef}{%
      \ifx\gmd@resa\empty
      \else#1@\fi}}% as in \pk{xkeyval}, if the \acro{KV} prefix is not
  % empty, we add \inverb|@| to it.
  \gmd@resa}

\define@key[gmd]{adef}{KVfam}[]{%
  \edef\gmd@resa{#1}%
  \@namedef{gmd@adef@KVfamset@\gmd@adef@currdef}{1}%
  \edef\gmd@resa{%
    \def\@xanxcs{gmd@adef@KVfam@\gmd@adef@currdef}{%
      \ifx\gmd@resa\empty
      \else#1@\fi}}%
  \gmd@resa
  \gmd@adef@setKV}% whenever the |KVfam|ily is set, the declared command is
                  % assumed to be \pk{keyval}ish.

\define@choicekey[gmd]{adef}{type}
  [\gmd@adef@typevals\gmd@adef@typenr]
  {% the list of possible types of defining commands
    def,
    newcommand,
    cs,% equivalent to the two above, covers all the cases of defining
          % a~\CS, including the \PlainTeX\ \inverb|\new›…| and
          % \LaTeX\ |\newlength|.
    newenvironment,
    text,% equivalent to the one above, covers all the commands defining
         % its first mandatory argument that should be text,
         % \inverb|\DeclareOption| e.g.
    define@key,% special case of more arguments important; covers the
    % \pk{xkeyval} defining commands.
    dk,% a~shorthand for the one above.
    DeclareOptionX,% another case of special arguments configuration,
    % covers the \pk{xkeyval} homonym.
    dox,% a~shorthand for the one above.
    kvo% one of option defining commands of the \pk{kvoptions} package
       % by Heiko Oberdiek (a~package available o~\acro{CTAN} in the
       % \pk{oberdiek} bundle).
  }
  {% In fact we collapse all the types just to four so far:
    \ifcase\gmd@adef@typenr% if |def|
      \gmd@adef@settype{cs}{0}%
    \or% when |newcommand|
      \gmd@adef@settype{cs}{0}%
    \or% when |cs|
      \gmd@adef@settype{cs}{0}%
    \or% when |newenvironment|
      \gmd@adef@settype{text}{0}%
    \or% when |text|
      \gmd@adef@settype{text}{0}%
    \or% when |define@key|
      \gmd@adef@settype{dk}{1}%
    \or% when |dk|
      \gmd@adef@settype{dk}{1}%
    \or% when |DeclareOptionX|
      \gmd@adef@settype{dox}{1}%
    \or% when |dox|
      \gmd@adef@settype{dox}{1}%
    \or% when |kvo|
      \gmd@adef@settype{text}{1}%% The \pk{kvoptions} option
      %% definitions take first mandatory
      % argument as the option name and they define a~\pk{keyval} key
      % whose macro's name begins with the prefix/family, either default or
      % explicitly declared. The \pk{kvoptions} prefix/family is
      % supported in \pk{gmdoc} with \inverb|[KVpref=, KVfam=|\<family>|]|.
    \fi}

\def\gmd@adef@settype#1#2{%
  \def\gmd@adef@TYPE{#1}%
  \ifnum1=#2 % now we define (or not) a~quasi-switch that fires for
             % the \pk{keyval}ish definition commands.
    \gmd@adef@setKV
  \fi}

\def\gmd@adef@setKV{%
  \edef\gmd@resa{%
    \def\@xanxcs{gmd@adef@KV@\gmd@adef@currdef}{1}%
  }%
  \gmd@resa}

\emptify\gmd@detectors

\newif\ifgmd@adef@cshook

\def\gmd@adef@cs{\global\gmd@adef@cshooktrue\gmd@charbychar}


\def\gmd@adef@text{\gdef\gmd@lbracecase{1}\gmd@charbychar}

\foone{%
  \catcode`\[\active
  % ^^A>\]
  \catcode`\<\active}
{%\par
  % The detector of \pk{xkeyval} |\define@›«[…]»key|:
  \def\gmd@adef@dk{%
    \let[\gmd@adef@scanKVpref
    \catcode`\[\active
    % ^^A\]]
    \gdef\gmd@lbracecase{2}%
    \gmd@adef@dfKVpref\gmd@KVprefdefault% We set the default value of
    % the \pk{xkeyval} prefix. Each time again because an assignment
    % in \inverb|\gmd@adef@dfKVpref| is global.\ilrr
    \gmd@adef@checklbracket}

  % The detector of \pk{xkeyval} |\DeclareOptionX|:
  \def\gmd@adef@dox{%
    \let[\gmd@adef@scanKVpref
    \let<\gmd@adef@scanDOXfam
    \catcode`[\active
    % ^^A]]
    \catcode`<\active
    \gdef\gmd@lbracecase{1}%
    \gmd@adef@dfKVpref\gmd@KVprefdefault% We set the default values of
                                % the \pk{xkeyval} prefix\dots
    \edef\gmd@adef@fam{\gmd@inputname}% \dots\ and family.
    \gmd@adef@dofam
    % \label{defDOXfam}
    \gmd@adef@checkDOXopts}%
}

\def\gmd@adef@checklbracket{%
  \@ifnextchar[%^^A]
  \gmd@adef@scanKVpref\gmd@charbychar}% note that

\def\gmd@adef@checkDOXopts{%
  \@ifnextchar[\gmd@adef@scanKVpref%^^A]
  {\@ifnextchar<\gmd@adef@scanDOXfam\gmd@charbychar}}

\def\gmd@adef@scanKVpref#1#2]{%
  \gmd@adef@dfKVpref{#2}%
  [#2]\gmd@charbychar}

\def\gmd@adef@dfKVpref#1{%
  \ifnum1=0\csname gmd@adef@KVprefixset@\gmd@adef@currdef\endcsname
    \relax
  \else
    \edef\gmu@resa{%
    \gdef\@xa\@nx
    \csname gmd@adef@KVpref@\gmd@adef@currdef\endcsname{%
      \ifx\relax#1\relax
      \else#1@%
      \fi}}%
    \gmu@resa
  \fi}

\def\gmd@adef@scanDOXfam{%
  \ifnum12=\catcode`\>\relax
    \let\next\gmd@adef@scanfamoth
  \else
    \ifnum13=\catcode`\>\relax
      \let\next\gmd@adef@scanfamact
    \else
      \PackageError{gmdoc}{> neither `other' nor `active'! Make it
        `other' with \bslash AddtoPrivateOthers\bslash\>.}{}%
    \fi
  \fi
  \next}

\def\gmd@adef@scanfamoth#1>{%
    \edef\gmd@adef@fam{\@gobble#1}% there is always
    % \cs{gmd@charbychar} first.
    \gmd@adef@dofam
    <\gmd@adef@fam>%
  \gmd@charbychar}

\foone{\catcode`\>\active}
  {\def\gmd@adef@scanfamact#1>{%
      \edef\gmd@adef@fam{\@gobble#1}% there is always
      % \cs{gmd@charbychar} first.
      \gmd@adef@dofam
      <\gmd@adef@fam>%
      \gmd@charbychar}%
  }

\def\gm@lbracehook{%
  \ifcase\gmd@lbracecase\relax
  \or% when  1
    \afterfi{%
      \gdef\gmd@lbracecase{0}%
      \gmd@adef@scanname}%
  \or% when 2---the first mandatory argument of two (|\define@›«[…]»key|)
    \afterfi{%
    \gdef\gmd@lbracecase{3}%
     \gmd@adef@scanDKfam}%
  \or% when 3---the second mandatory argument of two (the key name).
    \afterfi{%
      \gdef\gmd@lbracecase{0}%
      \gmd@adef@scanname}%
  \fi}

\def\gmd@lbracecase{0}% we initialise the hook caser.


\foone{\catcode`\[1 \catcode`\]2 \catcode`\}12 }
  [% Note that till line \ref{738} the square brackets are grouping
   % and the right brace is `other'. ^^A{
  \def\gmd@adef@scanDKfam#1}[%^^A{
    \edef\gmd@adef@fam[\@gobble#1]% there is always
    % \cs{gmd@charbychar} first.
    \gmd@adef@dofam
    \gmd@adef@fam}%
  \gmd@charbychar]

  % ^^A{
  \def\gmd@adef@scanname#1}[%^^A{
    \@makeother\[%^^A\]
    \@makeother\<%
    % The scanned name begins with |\gmd@charbychar|, we have to be
    % careful.
    \gmd@adef@deftext[#1]%
    \@gobble#1}%
    \gmd@charbychar]
  ]

\def\gmd@adef@dofam{%
  \ifnum1=0\csname gmd@adef@KVfamset@\gmd@adef@currdef\endcsname
    \relax% a~family declared with |\DeclareDefining| overrides the
          % one currently scanned.
  \else
    \edef\gmu@resa{%
      \gdef\@xa\@nx
      \csname gmd@adef@KVfam@\gmd@adef@currdef\endcsname
      {\ifx\gmd@adef@fam\empty
        \else\gmd@adef@fam @%
        \fi}}%
    \gmu@resa
  \fi}

\def\gmd@adef@deftext#1{%
  \@xa\def\@xa\macro@pname\@xa{\@gobble#1}%% we gobble |\gmd@charbychar|, cf. above.
  \edef\macro@pname{\@xa\detokenize\@xa{\macro@pname} }% note the
  % space at the end.
  \edef\macro@pname{\@xa\@xiispaces\macro@pname\@nil}%
  \@xa\Text@Marginize\@xa{\macro@pname}%
  \gmd@adef@indextext
  \edef\gmd@adef@altindex{%
    \csname gmd@adef@prefix@\gmd@adef@currdef \endcsname}%
  %\hskip-\parindent and we add the \pk{xkeyval} header if we are in \pk{xkeyval}
  % definition.
  \ifnum1=0\csname gmd@adef@KV@\gmd@adef@currdef \endcsname\relax% The\\ \CS
  % \inverb|\gmd@adef@KV@|\<def. command> is defined |{1}| (so \cs{ifnum}
  % gets |1=01\relax|---\hskip0sptrue) iff \<def. command> is a~\pk{keyval}
  % definition. In that case we check for the \inverb|KVpref|ix and
  % \inverb|KVfam|ily. (Otherwise |\gmd@adef@KV@|\<def. command> is undefined
  % so \cs{ifnum} gets |1=0\relax|---false.)\ilrr
    \edef\gmd@adef@altindex{%
      \gmd@adef@altindex
      \csname gmd@adef@KVpref@\gmd@adef@currdef \endcsname}%
    \edef\gmd@adef@altindex{%
      \gmd@adef@altindex
      \csname gmd@adef@KVfam@\gmd@adef@currdef \endcsname}%
  \fi
  \ifx\gmd@adef@altindex\empty
  \else% we make another index entry of the definiendum with prefix/KVheader.
    \edef\macro@pname{\gmd@adef@altindex\macro@pname}%
    \gmd@adef@indextext
  \fi}

\def\gmd@adef@indextext{%
  \@xa\@defentryze\@xa{\macro@pname}{0}% declare the definiendum has to
  % have a~definition entry and  should appear
  % without backslash in the changes history.
  \gmd@doindexingtext% redefine |\do| to an indexing macro.
  \@xa\do\@xa{\macro@pname}}




\DeclareDefining[star=false]\def
\DeclareDefining[star=false]\pdef% it's a~\pk{gmutils}' shorthand for \inverb|\protected\def|.
\DeclareDefining[star=false]\provide% a~\pk{gmutils}' conditional \incs{def}.
\DeclareDefining[star=false]\pprovide% a~\pk{gmutils}' conditional \incs{pdef}.


\def\UnDef{{% \changes{v0.99n}{2008/08/30}{a~bug fixed:
    % \cs{gmd@charbychar} appended to \cs{next}---without it
    % a~subsequent in-line comment was typeset verbatim}
    % \UnDef
    \gmd@adef@selfrestore\def
  }}

\def\UnPdef{{\gmd@adef@selfrestore\pdef}}

\Store@Macro\UnDef% because the `hiding' commands relax it.

\def\HideDef{% \changes{v0.99n}{2008/08/30}{added the starred version
             % that calls \cs{UnDef}}
  \gmu@ifstar\UnDef{\HideDefining\def\relaxen\UnDef}}

\def\ResumeDef{%
  \ResumeDefining\def
  \Restore@Macro\UnDef}

\DeclareDefining[star=false]\newcount
\DeclareDefining[star=false]\newdimen
\DeclareDefining[star=false]\newskip
\DeclareDefining[star=false]\newif
\DeclareDefining[star=false]\newtoks
\DeclareDefining[star=false]\newbox
\DeclareDefining[star=false]\newread
\DeclareDefining[star=false]\newwrite
\DeclareDefining[star=false]\newlength
\DeclareDefining[star=false]\DeclareDocumentCommand
\DeclareDefining[star=false]\DeclareCommand

\DeclareDefining\newcommand
\DeclareDefining\renewcommand
\DeclareDefining\providecommand
\DeclareDefining\DeclareRobustCommand
\DeclareDefining\DeclareTextCommand
\DeclareDefining\DeclareTextCommandDefault

\DeclareDefining*\newenvironment
\DeclareDefining*\renewenvironment
\DeclareDefining*[star=false]\DeclareOption


\DeclareDefining*[prefix=\bslash c@]\newcounter% \label{newcounter}

\DeclareDefining[type=dk, prefix=\bslash]\define@key
\DeclareDefining[type=dk, prefix=\bslash if]\define@boolkey% the
                                % alternate index entry will be
                                % \cs{if}\<KVpref>|@|\<KVfam>|@|\<key name>
\DeclareDefining[type=dk, prefix=\bslash]\define@choicekey

\DeclareDefining[type=dox, prefix=\bslash]\DeclareOptionX% the
\newcommand*\DeclareDOXHead[2][\gmd@KVprefdefault]{%
  \csname DeclareDefining\endcsname
  [type=dox, prefix=\bslash, KVpref=#1, KVfam=#2]% \HideDefining\DeclareOptionX
  \DeclareOptionX
}

\iffalse
\DeclareOptionX[Berg]<Lulu>{EvelynLear}{}
\DeclareOptionX<AntonW>{ChneOelze}
\fi
\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareStringOption
\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareBoolOption
\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareComplementaryOption
\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareVoidOption

\def\DeclareKVOFam#1{%
  \def\do##1{%
    \csname DeclareDefining\endcsname
    [type=kvo, prefix=\bslash, KVpref=, KVfam=#1]##1}%
  \do\DeclareStringOption
  \do\DeclareBoolOption
  \do\DeclareComplementaryOption
  \do\DeclareVoidOption
}


\def\HideAllDefining{%
  \ifnum0=0\csname gmd@adef@allstored\endcsname
    \SMglobal\Store@Macro\gmd@detectors
    \global\@namedef{gmd@adef@allstored}{1}%
  \fi
  \global\emptify\gmd@detectors}% we make the carrier |\empty| not |\relax| to
                         % be able to declare new defining command in
                         % the scope of |\HideAll›…|

\def\ResumeAllDefining{%
  \ifnum1=0\csname gmd@adef@allstored\endcsname\relax
    \SMglobal\Restore@Macro\gmd@detectors
    \SMglobal\Restore@Macro\UnDef
    \global\@namedef{gmd@adef@allstored}{0}%
  \fi}

\def\HideDefining{\begingroup
  % \changes{v0.99n}{2008/08/30}{Added the starred version that hides
  % the defining command only once}
  \MakePrivateLetters
  \gmu@ifstar\Hide@DfngOnce\Hide@Dfng}

\def\Hide@Dfng#1{%%\UnDef
  \escapechar\m@ne
  \gn@melet{gmd@detect@\string#1}{relax}%
  \gn@melet{gmd@detect@\string#1*}{relax}%
  \ifx\def#1\global\relaxen\UnDef\fi
  \endgroup}

\def\Hide@DfngOnce#1{%%\UnDef
  \gmd@adef@selfrestore#1%
  \endgroup}

\def\gmd@adef@selfrestore#1{%
  \@ifundefined{gmd@detect@\strip@bslash{#1}}{%
    \SMglobal\@xa\Store@Macro
    \csname gmd@detect@\strip@bslash{#1}\endcsname}{}%
  % ^^A\typeout{:::::::::::::::gmd@detect@\string#1:::::::::::::}%
  \global\@nameedef{gmd@detect@\strip@bslash{#1}}{%
    \@nx\gmu@if x%
    {\@xanxcs{gmd@detectname@\strip@bslash{#1}}%
      \@nx\macro@pname}% we compare the detect(ed) name with
                       % |\macro@pname|.
    %
    {\def\@nx\next{% this \incs{next} will be executed in line
        % % \ref{next 3690}.
        \SMglobal\Restore@Macro % they both are \incs{protected}.
        \@xanxcs{gmd@detect@\string#1}%
        \@nx\gmd@charbychar}%^^A we define
      % ^^A \inverb|\next| not restore the macro here just in case of
      % ^^A multiple declaration of |\def| (in that case there would
      % ^^A~be
      % ^^A multiple occurrences of the macro to be restored in the
      % ^^A~carrier
      % ^^A \inverb|\gmd@detectors| and we wish
      % ^^A all of them not to fire this one time) That's probably too
      % ^^A much care since there's the test in line \ref{550}.
      \@nx}%
    {}% or do nothing if the \CS' names are unequal.
  }% of \cs{@nameedef}.
}% of \cs{gmd@adef@selfrestore}.

\def\ResumeDefining{\begingroup
  \MakePrivateLetters
  \gmd@ResumeDfng}

\def\gmd@ResumeDfng#1{%
  \escapechar\m@ne
  \SMglobal\Restore@MacroSt{gmd@detect@\string#1}%
  \SMglobal\Restore@MacroSt{gmd@detect@\string#1*}%
  \endgroup}

\newcommand*\index@macro[3][\verbatimchar]{{%
    \gmu@ifundefined{gmd/iexcl/\@xa\detokenize\@xa{#3 }}%\label{iexcltest}
    {% |#3| is not excluded from index
      % ^^A\typeout{@@@ :::\@xa\string\csname gmd/iexcl/\@xa\detokenize\@xa{#3 }\endcsname::::}%
      \gmu@ifundefined{gmd/defentry/\@xa\detokenize\@xa{#3 }}% \label{pnametestDef}
      {% |#3| is not def entry
        \gmu@ifundefined{gmd/usgentry/\@xa\detokenize\@xa{#3 }}%\label{pnametestUsg}
        {% |#3| is not usg.\ entry
          \edef\kind@fentry{\CommonEntryCmd}}%\label{CECmd}
        {% |#3| is usg.\ entry
          \def\kind@fentry{UsgEntry}%
          \un@usgentryze{#3}}%\label{usgentryrs}
      }%
      {% |#3| is def entry
        \def\kind@fentry{DefEntry}%
        \un@defentryze{#3}%\label{defentryrs}
      }% of |gmd/defentry/| test's `else'
      \if@pageindex\@pageinclindexfalse\fi% should it be here or
      % there? Definitely here because we'll wish to switch the switch
      % with a~declaration.
      \if@pageinclindex
        \edef\gmu@tempa{gmdindexpagecs{\HLPrefix}{\kind@fentry}{\EntryPrefix}}%
      \else
        \edef\gmu@tempa{gmdindexrefcs{\HLPrefix}{\kind@fentry}{\EntryPrefix}}%
      \fi
      \edef\gmu@tempa{\IndexPrefix#2\actualchar%
        \quotechar\bslash verb*#1\quoted@eschar#2#1% The last macro in
        % this line usually means the first two, but in some cases
        % it's redefined to be empty (when we use |\index@macro| to
        % index not a~\CS).
        \encapchar\gmu@tempa}%
      \@xa\special@index\@xa{\gmu@tempa}% We give the
      % indexing macro the argument expanded so that \pk{hyperref} may
      % see the explicit encap-char in order not to add its own
      % encapsulation of \verb+|hyperpage+ when the (default)
      % |hyperindex=true|\TextCommonIndex*{hyperindex} option is in
      % force. (After this setting the |\edef|s in the above may be
      % changed to |\def|s.)
      % \changes[\index@macro]{v0.98f}{06/9/30}{explicit MakeIndex
      %   controls changed to corresponding macros. Therefore
      %   \cs[]{hyperindex} option of \pk{hyperref} didn't see the
      %   encapsulation and added its own. So I~expanded the
      %   argument of the very indexing macro}
    }{}% closing of |gmd/iexcl/| test.
    }}

\def\un@defentryze#1{%
  \ifcsname gmd/defentry/\@xa\detokenize\@xa{#1 }\endcsname
  \@xa\g@relaxen\csname gmd/defentry/\@xa\detokenize\@xa{#1 }\endcsname
  \fi
  \ifx\gmd@detectors\empty
    \g@relaxen\last@defmark
  \fi}% the last macro (assuming \cs{fi} is not a~macro :-)
  % is only used by \cs{changes}. If we are in the scope of automatic
  % detection of definitions, we want to be able not to use \inverb|\Define|
  % but write |\changes| after a~definition and get proper entry. Note
  % that in case of automatic detection of definitions
  % |\last@defmark|'s value keeps until the next definition.

\def\un@usgentryze#1{%
  \ifcsname gmd/usgentry/\@xa\detokenize\@xa{#1 }\endcsname
  \@xa\g@relaxen\csname gmd/usgentry/\@xa\detokenize\@xa{#1 }\endcsname
  \fi}

\@emptify\EntryPrefix% this macro seems to be obsolete now

\newif\if@pageinclindex

\newcommand*\quoted@eschar{\quotechar\bslash}% we'll redefine it when

\def\IndexPrefix{}

\if@linesnotnum\@pageindextrue\fi
\AtBeginDocument{%
  \if@pageindex
    \def\gmdindexrefcs#1#2#3#4{\csname#2\endcsname{\hyperpage{#4}}}%^^A
    % in the page case we gobble the third argument that is supposed
    % to be the entry prefix.\ilrr
    \let\gmdindexpagecs=\gmdindexrefcs
  \else
    \def \gmdindexrefcs#1#2#3#4{\gmiflink[clnum.#4]{%
        \csname#2\endcsname{#4}}}%
    \def \gmdindexpagecs#1#2#3#4{\hyperlink{page.#4}{%
        \csname#2\endcsname{\gmd@revprefix{#3}#4}}}%
    % \stanza \DefIndex\gmd@revprefix
    \def\gmd@revprefix#1{%
      \def\gmu@tempa{#1}%
      \ifx\gmu@tempa\@empty p.\,\fi}

    \providecommand*\HLPrefix{}% it'll be the hypertargets names' prefix
    % in mul\-ti-docs. Moreover, it showed that if it was empty,
    % \pk{hyperref} saw duplicates of the hyper destinations, which
    % was perfectly understandable (|codelinenum.123| made by
    % |\refstepcounter| and |codelinenum.123| made by
    % |\gmhypertarget|). But since v0.98 it is not a~problem anymore
    % because during the automatic \inverb|\hypertarget|ing the
    % lines are labelled |clnum.|\<number>. When |\HLPrefix| was
    % defined as dot, MakeIndex rejected the entries as `illegal page
    % number'.  \changes[\HLPrefix]{v0.98a}{06/09/05}{again
    %   \cs{@empty}fied since \cs{hypertarget}ing the codelines names
    %   them \cs[]{clnum} (since v0.98).}
  \fi}

\def\DefEntry#1{\underline{#1}}
\def\UsgEntry#1{\textit{#1}}
\def\CommonEntryCmd{relax}



\outer\def\DefIndex{\begingroup
  \MakePrivateLetters
  \gmu@ifstar
  {\@sanitize\MakePrivateOthers%^^A\verbatim@specials
    \Code@DefIndexStar}%
  {\Code@DefIndex}}

\long\def\Code@DefIndex#1{\endgroup{%
    \escapechar\m@ne% because we will compare the macro's name with
    % a~string without the backslash.
    \@defentryze{#1}{1}}}

\long\def\Code@DefIndexStar#1{%
  \endgroup{%
  \addto@estoindex{#1}%
  \@defentryze{#1}{0}}%
}

\def\gmd@justadot{.}

\long\def\@defentryze#1#2{%
  \@xa\glet\csname gmd/defentry/\detokenize{#1 }\endcsname\gmd@justadot% The\\
  % \LaTeX\ \inverb|\@namedef| macro could not be used since it's not
  % `long'. The space to sound with the checker.  \ilrr
  % \Define\last@defmark
  \ifcat\relax\@xa\@nx\@firstofmany#1\@nil
  % \nostanza if we meet a~\CS, then maybe it's a~\CS to be
  % ‘defentryzed’ or maybe it's a~‘verbatim special’ \CS. The only way
  % to distinguish those cases is to assume there shouldn't be
  % a~verbatim containing only a~‘verbatim special’ \CS.
    \@xa\def\@xa\gmu@tempa\@xa{\@allbutfirstof#1\@nil}%
    \ifx\gmu@tempa\@empty
      \afterfifi\@firstoftwo% if |#1| is a~single \CS, we
      % \incmd\xiistring\ it. Otherwise we \incmd\detokenize\ it.
    \else\afterfifi\@secondoftwo
    \fi
  \else\@xa\@secondoftwo
  \fi
  {\xdef\last@defmark{\xiistring#1}}% we |\string| the argument just in case it's
  % a~control sequence. But when it can be a~\CS, we |\@defentryze| in
  % a~scope of |\escapechar=-1|, so there will never be a~backslash at
  % the beginning of |\last@defmark|'s meaning (unless we
  % |\@defentryze| |\\|).
  {\xdef\last@defmark{\detokenize{#1}}}%
  \@xa\gdef\csname gmd/isaCS/\last@defmark\endcsname{#2}% |#2| is
}% of |\@defentryze|.

\long\def\@usgentryze#1{%
  \@xa\let\csname gmd/usgentry/\detokenize{#1}\endcsname\gmd@justadot}

\@emptify\envirs@toindex

\outer\def\CodeUsgIndex{\begingroup
  \MakePrivateLetters
  \gmu@ifstar
  {\@sanitize\MakePrivateOthers%^^A\verbatim@specials
    \Code@UsgIndexStar}%
  {\Code@UsgIndex}}
\long\def\Code@UsgIndex#1{%
  \endgroup{%
    \escapechar\m@ne
    \global\@usgentryze{#1}}}

\long\def\Code@UsgIndexStar#1{%
  \endgroup
  {%^^A\verbatim@specials
  \addto@estoindex{#1}%
  \@usgentryze{#1}}%
}

\outer\def\CodeCommonIndex{\begingroup
  \MakePrivateLetters
  \gmu@ifstar
  {\MakePrivateOthers\@sanitize\Code@CommonIndexStar}%
  {\Code@CommonIndex}}

\long\def\Code@CommonIndex#1{\endgroup}

\long\def\Code@CommonIndexStar#1{%
  \endgroup\addto@estoindex{#1}}

\long\def\text@indexmacro#1{%
  {\escapechar\m@ne \xdef\macro@pname{\xiistring#1}}%
  % ^^A   \typeout{@@@@ 4803}%
  \@xa\quote@mname\macro@pname\relax% we process the \CS's
  % name char by char and quote MakeIndex controls. |\relax| is the
  % iterating macro's stopper. The scanned \CS's quoted name shall be the
  % expansion of |\macro@iname|.
  \if\verbatimchar\macro@pname
    \def\im@firstpar{[$]}%^^A$
  \else\def\im@firstpar{}%
  \fi
  {\do@properindex% see line \ref{do@properindex}.
    \@xa \index@macro\im@firstpar\macro@iname\macro@pname}}

\def\quote@mname{%
  \def\macro@iname{}%
  \quote@charbychar}

\def\quote@charbychar#1{%
  \ifx\relax#1% finish quoting when you meet |\relax| or:
  \else
    \ifnum0\ifcat\@nx#1\@nx~1\fi\ifcat\@nx#1\relax1\fi>0 % we can meet
    % active char and/or control sequences (made by) verbatim
    % specials, therefore we check whether \inhash1 is an active char
    % and if it is a~\CS.
      \afterfifi{% we can meet an active char or a~\CS iff we use
        % verbatim specials.
        \ifdefined\verbatim@specials@list
        \afterfi{%
          \begingroup
          \escapechar\@xa\@xa\@xa`\@xa\@firstofmany\verbatim@specials@list\@nil
          \@xa\endgroup
          \@xa\quote@charbychar\detokenize{#1}%% for a~\CS\
        % \incs{detokenize} adds a~space but if so, it will be ignored
        % by the argument scanner.
        }% of |\afterfi|.
        \else\PackageError{gmdoc}{Please report a\space bug in
          \bslash quote@charbychar in line 4934}{}%
        \fi% of |\ifdefined\verbatim@specials@list|.
      }% of |\afterfifi|.
    \else
      \quote@char#1%
      \xdef\macro@iname{\macro@iname \gmd@maybequote#1}%
      \afterfifi\quote@charbychar
    \fi
  \fi}

\def\TextUsgIndex{\begingroup
  \MakePrivateLetters
  \gmu@ifstar{\MakePrivateOthers\Text@UsgIndexStar}{\Text@UsgIndex}}

\long\def\Text@UsgIndex#1{%
  \endgroup\@usgentryze#1%
  \text@indexmacro#1}

\long\def\Text@UsgIndexStar#1{\endgroup\@usgentryze{#1}%
  \text@indexenvir{#1}}

\long\def\text@indexenvir#1{%
  {\verbatim@specials
  \edef\macro@pname{\xiistring#1}%
  \if\bslash\@xa\@firstofmany\macro@pname\@nil% if
  % |\string|ed |#1| begins with a~backslash, we will gobble it
  % to make MakeIndex not see it.
    \edef\gmu@tempa{\@xa\@gobble\macro@pname}%
    \@tempswatrue
  \else
    \let\gmu@tempa\macro@pname
    \@tempswafalse
  \fi
  % ^^A   \typeout{@@@@@ 4858}%
  \@xa\quote@mname\gmu@tempa\relax% \label{quote@mname comm}we
  % process |\string|ed |#1| char by char and quote MakeIndex
  % controls. |\relax| is the iterating macro's stopper. The quoted
  % |\string|ed |#1| shall be the meaning of |\macro@iname|.
  \if@tempswa
    \def\quoted@eschar{\quotechar\bslash}%
    \else\@emptify\quoted@eschar\fi% we won't print any backslash before
    % an environment's name, but we will before a~\CS's name.
    \do@properindex% see line \ref{do@properindex}.
    \index@macro\macro@iname\macro@pname}}

\def\TextCommonIndex{\begingroup
  \MakePrivateLetters
  \gmu@ifstar{\MakePrivateOthers\Text@CommonIndexStar}{\Text@CommonIndex}}

\long\def\Text@CommonIndex#1{\endgroup
  \text@indexmacro#1}

\long\def\Text@CommonIndexStar#1{\endgroup
  \text@indexenvir{#1}}


\outer\def\CodeMarginize{\begingroup
  \MakePrivateLetters
  \gmu@ifstar
    {\MakePrivateOthers\egCode@MarginizeEnvir}
    {\egCode@MarginizeMacro}}

\long\def\egCode@MarginizeMacro#1{\endgroup
  \Code@MarginizeMacro#1}

\long\def\Code@MarginizeMacro#1{{% |#1| is always a~\CS.
    % ^^A   \typeout{@@@@ :::\xiistring#1:::}%
    % ^^A   \show\detokenize
    \escapechar\m@ne
    \@xa\glet\csname gmd/2marpar/\xiistring#1\endcsname\gmd@justadot
  }}

\long\def\egCode@MarginizeEnvir#1{\endgroup
  \Code@MarginizeEnvir{#1}}

\long\def\Code@MarginizeEnvir#1{\addto@estomarginpar{#1}}

\def\mark@envir{%\label{mark@envir}
  \ifx\envirs@tomarginpar\@empty
  \else
    \def\do{\Text@Marginize*}%
    \envirs@tomarginpar%
    \g@emptify\envirs@tomarginpar%
  \fi
  \ifx\envirs@toindex\@empty
  \else
    {\verbatim@specials
      \gmd@doindexingtext
      \envirs@toindex
      \g@emptify\envirs@toindex}%
  \fi}

\def\gmd@doindexingtext{%
  \def\do##1{% the |\envirs@toindex| list contains |\string|ed
    % macros or environments' names in braces and each  preceded
    % with |\do|. We extract the definition because we use it also in
    % line \ref{gmd@doindexingtext 2nd use}.
    \if\bslash\@firstofmany##1\@nil% if
    % |##1| begins with a~backslash, we will gobble it for
    % MakeIndex not see it.
    \edef\gmd@resa{\@gobble##1}%
    \@tempswatrue
    \else
    \edef\gmd@resa{##1}\@tempswafalse
    \fi
    \@xa\quote@mname\gmd@resa\relax% see line
    % \ref{quote@mname comm} \& subs. for commentary.
    {\if@tempswa
        \def\quoted@eschar{\quotechar\bslash}%
        \else\@emptify\quoted@eschar
      \fi
      \index@macro\macro@iname{##1}}}%
}

\@emptify\envirs@tomarginpar
\@emptify\envirs@toindex

\outer\def\Define{% note that since it's |\outer|, it doesn't have to
  % be \incmd\protected.
  \begingroup
  \MakePrivateLetters
  \gmu@ifstar{\@sanitize%^^A\verbatim@specials
    \Code@DefEnvir}{\Code@DefMacro}}

\outer\def\CodeUsage{\begingroup
  \MakePrivateLetters
  \gmu@ifstar{%
    \@sanitize%^^A\verbatim@specials
    \MakePrivateOthers
    \Code@UsgEnvir}{\Code@UsgMacro}}

\DeclareCommand\Code@DefMacro\long{om}{%
  \Code@DefIndex#2% we use the internal macro; it'll close the group.
  \IfValueTF{#1}%
  {\Code@MarginizeMacro#1}%
  {\Code@MarginizeMacro#2}%
}

\DeclareCommand\Code@UsgMacro\long{om}{%
  \Code@UsgIndex#2% here also the internal macro; it'll close the
  % group
  \IfValueTF{#1}%
  {\Code@MarginizeMacro#1}%
  {\Code@MarginizeMacro#2}%
}

\def\codeline@wrindex#1{\if@filesw
  \immediate\write\@indexfile
  {\string\indexentry{#1}%
    {\HLPrefix\number\c@codelinenum}}\fi}

\def\codeline@glossary#1{% It doesn't need to establish a~group since
  % it is always called in a~group.
  \if@pageinclindex
    \edef\gmu@tempa{gmdindexpagecs{\HLPrefix}{relax}{\EntryPrefix}}%
  \else
    \edef\gmu@tempa{gmdindexrefcs{\HLPrefix}{relax}{\EntryPrefix}}% \inverb|relax| stands for the formatting command. But we don't want to do anything special with the change history entries. \ilrr
  \fi
  \protected@edef\gmu@tempa{%
    \@nx\protected@write\@nx\@glossaryfile{}%
    {\string\glossaryentry{#1\encapchar\gmu@tempa}%
    {\HLPrefix\number\c@codelinenum}}}%
  \gmu@tempa
}


\AtBeginDocument{%
  \if@pageindex
    \let\special@index=\index
    \let\gmd@glossary\glossary
  \else
  % \DefIndex\special@index
    \let\special@index=\codeline@wrindex
    \let\gmd@glossary\codeline@glossary
    % \label{codeline indexnumber declaration}
  \fi}% postponed till |\begin{document}| with respect of \docfm-like

\def\gag@index{\let\index=\@gobble
  %\label{gag@index}
  \let\codeline@wrindex=\@gobble}
\Store@Macros{\index\codeline@wrindex}

\def\ungag@index{\Restore@Macros {\index\@@codeline@wrindex}}
  %\label{ungag@index}

\DeclareCommand\Code@DefEnvir\long{om}{%
  \endgroup
  % ^^A   \typeout{@@@@@ 5069: \unexpanded{#1}}%
  {%^^A\verbatim@specials
    \IfValueTF{#1}%
    {\addto@estomarginpar{#1}}%
    {\addto@estomarginpar{#2}}%
    \addto@estoindex{#2}%
    \@defentryze{#2}{0}}}

\DeclareCommand\Code@UsgEnvir\long{om}{%
  \endgroup
  {%^^A~\verbatim@specials
    \IfValueTF{#1}%
    {\addto@estomarginpar{#1}}%
    {\addto@estomarginpar{#2}}%
    \addto@estoindex{#2}%
    \@usgentryze{#2}}}

\long\def\addto@estomarginpar#1{%
  % ^^A   \def\gmu@tempa{\do{#1}}% we |\string|ed the argument to
  % ^^A   % allow it to be a~control sequence but now (2008/12/14) it's not
  % ^^A   % necessary because |#1| is sanitised.
  % ^^A   \@xa\gaddtomacro\@xa\envirs@tomarginpar\@xa{\gmu@tempa}
\gaddtomacro\envirs@tomarginpar{\do{#1}}}

\long\def\addto@estoindex#1{%
  % ^^A \typeout{@@@@ \unexpanded{#1}}%
  % ^^A   \edef\gmu@tempa{\@nx\do{\xiistring#1}}
  % ^^A   \@xa\gaddtomacro\@xa\envirs@toindex\@xa{\gmu@tempa}
  \gaddtomacro\envirs@toindex{\do{#1}}}

\def\TextUsage{\begingroup
  % \chgs{2008/12/8 v0.99s added \cmd\@sanitize\ in the starred
  %   version}
  % \label{TextUsage}
  \MakePrivateLetters
  \gmu@ifstar{\@sanitize\MakePrivateOthers
    \Text@UsgEnvir}{\Text@UsgMacro}}

\DeclareCommand\Text@UsgMacro\long{om}{%
  \endgroup
  % \chgs[\narrativett]{2008/12/12 v0.99s introduced in \pk{gmutils}
  %   and employed in the narrative verbatims, including \cs{ampulexdef}
  %   of the \pk{gmverb} macros}
  \IfValueTF{#1}%
  {\Text@Marginize*{#1}{\scanverb*{#1}}}%
  {\Text@Marginize*{#2}{\scanverb*{#2}}}%
  \begingroup\Code@UsgIndex#2% we declare the kind of formatting of the entry.
  \text@indexmacro#2}

\DeclareCommand\Text@UsgEnvir\long{om}{%
  \endgroup
  % ^^A   \typeout{@@@@ :::\detokenize{#1}::::}%
  % ^^A   \typeout{@@@@ :::\detokenize{#2}::::}%
  \IfValueTF{#1}%
  {\Text@Marginize*{#1}{\scanverb*{#1}}}%
  {\Text@Marginize*{#2}{\scanverb*{#2}}}%
  \@usgentryze{#2}% we declare the `usage' kind of formatting of the
  % entry and index the sequence |#1|.
  \text@indexenvir{#2}}

\pdef\TextMarginize{\@bsphack\begingroup
  % \chgs{2008/12/8 v0.99s added \cmd\@sanitize\ in the starred
  %   version}
  \MakePrivateLetters
  \gmu@ifstar{%
    \MakePrivateOthers\egText@MarginizeEnv}{\egText@MarginizeCS}}

\long\def\egText@MarginizeEnv#1{\endgroup
  \Text@Marginize*{#1}% \chgs{2008/12/07 v0.99s a~bug fixed: braces
  % added around \hash1}
  \@esphack}

\long\def\egText@MarginizeCS#1{%
  \endgroup
  \Text@Marginize*{#1}%
}

\if@marginparsused
  \reversemarginpar
  \marginparpush\z@
  \marginparwidth8pc\relax
  % ^^A  \settowidth{\marginparsep}{\ \ }%
  %
  % You may wish to put not only macros and environments to
  % a~marginpar.
  \long\def\gmdmarginpar#1{%
    \marginpar{\raggedleft\strut
      \hskip0ptplus100ptminus100pt%
      #1}}%\stanza
  %
\else
  \long\def\gmdmarginpar#1{}%
\fi

\let\gmu@tempa\all@stars
\@xa\addtomacro\@xa\gmu@tempa\@xa{\all@unders}
\@xa\DeclareCommand\@xa\Text@Marginize\@xa!%
\@xa{\@xa Q\@xa{\gmu@tempa}m}{%
  \gmdmarginpar{%
    \addtomacro\verb@lasthook{\marginpartt}%
    \IfValueTF{#1}{\scanverb#1}{\scanverb}{#2}}%
}% of |\Text@Marginize|.
\let\marginpartt\narrativett

\def\do@properindex{%\label{do@properindex}
  \if@printalllinenos\else
    \@pageinclindextrue
    \let\special@index=\index
  \fi}


\newenvironment*{macrocode*}{%\label{macrocode*}
  \if@codeskipput\else\par\addvspace\CodeTopsep\@codeskipputgtrue\fi
  \QueerEOL}%^^A\docstrips
  {\par\addvspace\CodeTopsep\CodeEscapeChar\\}
  % Let's remind that the starred version makes | |

\newenvironment*{macrocode}{%\label{macrocode}
  \if@codeskipput\else\par\addvspace\CodeTopsep\@codeskipputgtrue\fi
  \QueerEOL}% \changes{v0.99l}{2008/08/06}{removed \cs{CodeSpacesBlank}}
  {\par\addvspace\CodeTopsep\CodeEscapeChar\\}
\let\oldmc\macrocode
\let\endoldmc\endmacrocode
\n@melet{oldmc*}{macrocode*}
\n@melet{endoldmc*}{endmacrocode*}

\addtomacro\oldmc{\@oldmacrocode@launch}%
\@xa\addtomacro\csname oldmc*\endcsname{%
  \@oldmacrocode@launch}

\def\@oldmacrocode@launch{%
  \emptify\gmd@textEOL% to disable it in |\gmd@docstripdirective|
  % launched within the code.
  \gmd@ctallsetup
  \glet\stored@code@delim\code@delim
  \@makeother\^^B\CodeDelim*\^^B%
  \ttverbatim \gmd@DoTeXCodeSpace
  \@makeother\|% because |\ttverbatim| doesn't do that.
  \MakePrivateLetters% see line \ref{MPL}.\par
  % ^^A  \@xa\@makeother\code@delim
  \docstrips@percent \@makeother\>%
  % sine qua non of the automatic delimiting is replacing possible
  % |*|\catother in the environment's name with |*|\catletter.
  % Not to complicate assume |*| may occur at most once and only at
  % the end. We also assume the environment's name consists only of
  % character tokens whose catcodes (except of |*|) will be the same
  % in the verbatim text.
  \@xa\gmd@currenvxistar\@currenvir*\relax
  \@oldmacrocode}

\foone{\catcode`*11 }
{\def\gmu@xistar{*}}

\def\gmd@currenvxistar#1*#2\relax{%
  \edef\@currenvir{#1\if*#2\gmu@xistar\fi}}

\foone{%
\catcode`[=1 \catcode`]=2
\catcode`\{=\active \@makeother\}
\@makeother\^^B
\catcode`/=0 \catcode`\\=\active
\catcode`&=14 \catcode`*=11
\catcode`\%=\active \obeyspaces}& % \CodeEscapeChar\/ \CDAnd
[& here the \cs{foone}'s second pseudo-argument begins
&%\stanza
/def/@oldmacrocode[&
/bgroup/let =/relax&% to avoid writing |/@nx | four times.
/xdef/oldmc@def[&
/def/@nx/oldmc@end####1/@nx%    /@nx\end&
/@nx{/@currenvir}[&
####1^^B/@nx/gmd@oldmcfinis]]&
/egroup&% now |\oldmc@edef| is defined to have one parameter delimited
&% with \incmd\end\arg{current env.'s name}
/oldmc@def&
/oldmc@end]&% \CDPerc
]

\def\gmd@oldmcfinis{%
  \def\gmu@tempa{\end{\@currenvir}}%
   \@xa\gmu@tempa\@xa\def\@xa\gmd@lastenvir\@xa{\@currenvir}%
  \@xa\CodeDelim\@xa*\stored@code@delim
  \gmd@mchook}% see line \ref{gmd@mchook}

\def\OldMacrocodes{%% \changes{v0.99m}{2008/08/10}{renamed from
  %% \cs{VerbMacrocodes}}
  \let\macrocode\oldmc
  \n@melet{macrocode*}{oldmc*}}


\foone{\catcode`\%\active}
{\def\docstrips@percent{\catcode`\%\active
    \let%\gmd@codecheckifds}}

\def\gmd@codecheckifds#1#2{% note that |#1| is just to gobble
  % \inverb|\gmd@charbychar| token.
\typeout{@@@@@ codecheckifds hash 1: »\unexpanded{#1}«, 2: »\unexpanded{#2}«}%
 \ifnum  \if@dsdir 1\else 0\fi\ifgmd@dsVerb 1\fi>\z@
    \afterfi{%
      \gmd@dsChecker{%
        \if\@nx<\@nx#2\afterfi\gmd@docstripdirective
        \else\afterfi{\xiipercent#1#2}%
        \fi}% of the checker's arg
      }% of |\afterfi|
  \else\afterfi{\xiipercent#1#2}%
  \fi}
\newenvironment{macro}{%\label{macro}
  \@tempskipa=\MacroTopsep
  \if@codeskipput\advance\@tempskipa by-\CodeTopsep\fi
  \par\addvspace{\@tempskipa}\@codeskipputgtrue
  \begingroup\MakePrivateLetters\MakePrivateOthers% we make also the
  % `private others' to cover the case of other sequence in the
  % argument. (We'll use the |\macro| macro also in the environment
  % for describing and defining environments.)
  \gmd@ifonetoken\Hybrid@DefMacro\Hybrid@DefEnvir}%
  {\par\addvspace\MacroTopsep\@codeskipputgtrue}
  % It came out that the \docfm's author(s) give the \env{macro}
  % environment also starred versions of commands as argument. It's \acro{OK}
  % since (the default version of) |\MakePrivateLetters| makes |*|
  % a~letter and therefore such a~starred version is just one \CS.
  % However, in \pk{doc.dtx} occur \env{macro}s that mark
  % \emph{implicit} definitions i.e., such that the defined \CS is not
  % scanned in the subsequent code.
\@namedef{macro*}{\let\gmd@ifonetoken\@secondoftwo\macro}
\@xa\let\csname endmacro*\endcsname\endmacro
\def\gmd@ifsingle#1#2\@nil{%
  \def\gmu@tempa{#2}%
  \ifx\gmu@tempa\@empty}
\def\gmd@ifonetoken#1#2#3{%
  \def\gmu@tempb{#3}% We hide |#3| from \TeX\ in case it's |\if›…| or
  % so. \inverb|\gmu@tempa| is used in \inverb|\gmd@ifsingle|. \ilrr
  \gmd@ifsingle#3\@nil
    \afterfi{\@xa#1\gmu@tempb}%
  \else
    \edef\gmu@tempa{\@xa\string\gmu@tempb}%
    \afterfi{\@xa#2\@xa{\gmu@tempa}}%
  \fi}
\long\def\Hybrid@DefMacro#1{%
  \Code@DefIndex{#1}% this macro closes the group opened by |\macro|.
  \Text@MarginizeNext{*{#1}}}

\long\def\Hybrid@DefEnvir#1{%
  \Code@DefIndexStar{#1}% this macro also closes the group begun by
  % |\macro|.
  \Text@MarginizeNext{*{#1}}}

\long\def\Text@MarginizeNext#1{%
  \gmd@evpaddonce{\Text@Marginize#1\ignorespaces}}

\long\def\gmd@evpaddonce#1{%
  \global\advance\gmd@oncenum\@ne
  \@xa\long\@xa\edef% \CodeUsgIndex*{NeuroOncer}
    \csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname{%
      \@nx\g@relaxen
      \csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname}% Why does it
    % work despite it shouldn't? Because when the \CS got with
    % \inverb|\csname›…\endcsname| is undefined, it's equivalent to
    % |\relax| and therefore unexpandable. That's why it passes
    % \inverb|\edef| and is able to be assigned.\ilrr
  \@xa\addtomacro\csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname{#1}%
  \@xa\addto@hook\@xa\everypar\@xa{%
    \csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname}%
}

\newcount\gmd@oncenum

\@xa\let\@xa\environment\csname macro*\endcsname
\@xa\let\@xa\endenvironment\csname endmacro*\endcsname

\def\DoNotIndex{\bgroup\MakePrivateLetters\DoNot@Index}

\long\def\DoNot@Index#1{\egroup% we close the group,
  \let\gmd@iedir\gmd@justadot% we declare the direction of the \<?>cluding
  % to be \emph{ex}cluding. We act this way to be able to reverse the
  % exclusions easily later.\ilrr
  \dont@index#1.}

\long\def\dont@index#1{%
  \def\gmu@tempa{\@nx#1}% My \TeX\ Guru's trick to deal with |\fi|
  % and such, i.e., to hide from \TeX\ when it is processing a~test's
  % branch without expanding.
  \if\gmu@tempa.% a~dot finishes expelling
  \else
    \if\gmu@tempa,% The list this macro is put before may
    % contain commas and that's O.K., we just continue the work.
      \afterfifi\dont@index
    \else% what is else shall off the Index be expelled.
      {\escapechar\m@ne
        \xdef\gmu@tempa{\string#1 }}% its to sound with
      % \incs{detokenize}s in tests.
      \@xa\let%
      \csname gmd/iexcl/\gmu@tempa\endcsname=\gmd@iedir% In the default
      % case explained e.g.\ by the macro's name, the last macro's
      % meaning is such that the test in line \ref{iexcltest} will
      % turn false and the subject \CS shall not be indexed.
      % We |\let| not |\def| to spare \TeX's memory.
      \afterfifi\dont@index
    \fi
  \fi}

\DoNotIndex\{ \DoNotIndex\}% \label{DNIbraces}the index entries of

\begin{MakePrivateLetters}% Yes, |\DoNotIndex| does
  % |\MakePrivateLetters| on its own but No, it won't have any effect
  % if it's given in another macro's |\def|.
  % \HideAllDefining
  \gdef\DefaultIndexExclusions{%
    \DoNotIndex{\@ \@@par \@beginparpenalty \@empty}%\label{DIE1}
    \DoNotIndex{\@flushglue \@gobble \@input}%
    \DoNotIndex{\@makefnmark \@makeother \@maketitle}%
    \DoNotIndex{\@namedef \@ne \@spaces \@tempa}%
    \DoNotIndex{\@tempb \@tempswafalse \@tempswatrue}%
    \DoNotIndex{\@thanks \@thefnmark \@topnum}%
    \DoNotIndex{\@@ \@elt \@forloop \@fortmp \@gtempa \@totalleftmargin}%
    \DoNotIndex{\" \/ \@ifundefined \@nil \@verbatim \@vobeyspaces}%
    \DoNotIndex{\| \~ \  \active \advance \aftergroup \begingroup \bgroup}%
    \DoNotIndex{\mathcal \csname \def \documentstyle \dospecials \edef}%
    \DoNotIndex{\egroup}%
    \DoNotIndex{\else \endcsname \endgroup ⵢendinput \endtrivlist}%
    \DoNotIndex{\expandafter \fi \fnsymbol \futurelet \gdef \global}%
    \DoNotIndex{\hbox \hss \if \if@inlabel \if@tempswa \if@twocolumn}%
    \DoNotIndex{\ifcase}%
    \DoNotIndex{\ifcat \iffalse \ifx \ignorespaces \index \input \item}%
    \DoNotIndex{\jobname \kern \leavevmode \leftskip \let \llap \lower}%
    \DoNotIndex{\m@ne \next \newpage \nobreak \noexpand \nonfrenchspacing}%
    \DoNotIndex{\obeylines \or \protect \raggedleft \rightskip \rm \sc}%
    \DoNotIndex{\setbox \setcounter \small \space \string \strut}%
    \DoNotIndex{\strutbox}%
    \DoNotIndex{\thefootnote \thispagestyle \topmargin \trivlist \tt}%
    \DoNotIndex{\twocolumn \typeout \vss \vtop \xdef \z@}%
    \DoNotIndex{\, \@bsphack \@esphack \@noligs \@vobeyspaces \@xverbatim}%
    \DoNotIndex{\` \catcode \end \escapechar \frenchspacing \glossary}%
    \DoNotIndex{\hangindent \hfil \hfill \hskip \hspace \ht \it \langle}%
    \DoNotIndex{\leaders \long \makelabel \marginpar \markboth \mathcode}%
    \DoNotIndex{\mathsurround \mbox}%\verb+% \newcount \newdimen \newskip+
    \DoNotIndex{\nopagebreak}%
    \DoNotIndex{\parfillskip \parindent \parskip \penalty \raise \rangle}%
    \DoNotIndex{\section \setlength \TeX \topsep \underline \unskip}%
    \DoNotIndex{\vskip \vspace \widetilde \\ \% \@date \@defpar}%
    \DoNotIndex{\[ \]}% see line \ref{DNIbraces}.
    \DoNotIndex{\count@ \ifnum \loop \today \uppercase \uccode}%
    \DoNotIndex{\baselineskip \begin \tw@}%
    \DoNotIndex{\a \b \c \d \e \f \g \h \i \j \k \l \m \n \o \p \q}%
    \DoNotIndex{\r \s \t \u \v \w \x \y \z \A \B \C \D \E \F \G \H}%
    \DoNotIndex{\I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z}%
    \DoNotIndex{\1 \2 \3 \4 \5 \6 \7 \8 \9 \0}%
    \DoNotIndex{\! \# \$ \& \' \( \) \. \: \; \< \= \> \? \_}% |\+|
    % seems to be so rarely used that it may be advisable to index it.
    \DoNotIndex{\discretionary \immediate \makeatletter \makeatother}%
    \DoNotIndex{\meaning \newenvironment \par \relax \renewenvironment}%
    \DoNotIndex{\repeat \scriptsize \selectfont \the \undefined}%
    \DoNotIndex{\arabic \do \makeindex \null \number \show \write \@ehc}%
    \DoNotIndex{\@author \@ehc \@ifstar \@sanitize \@title}%
    \DoNotIndex{\if@minipage \if@restonecol \ifeof \ifmmode}%
    \DoNotIndex{\lccode %|%\newtoks|
      \onecolumn \openin \p@ \SelfDocumenting}%
    \DoNotIndex{\settowidth \@resetonecoltrue \@resetonecolfalse \bf}%
    \DoNotIndex{\clearpage \closein \lowercase \@inlabelfalse}%
    \DoNotIndex{\selectfont \mathcode \newmathalphabet \rmdefault}%
    \DoNotIndex{\bfdefault}%
    % From the above list I~removed some |\new›…| declarations because
    % I~think it may be useful to see gathered the special |\new›…|s of
    % each kind. For the same reason I~would not recommend excluding
    % from the index such declarations as |\AtBeginDocument|,
    % |\AtEndDocument|, |\AtEndOfPackage|, |\DeclareOption|,
    % |\DeclareRobustCommand| etc. But the
    % common definitions, such as |\›(new⁄|provide›)command| and
    % |\›(e⁄|g⁄|x›)def|s, as the most common, in my opinion excluded should
    % be.^^A\)
    %
    % \stanza
    % And some my exclusions:
    \DoNotIndex{\@@input \@auxout \@currentlabel \@dblarg}%
    \DoNotIndex{\@ifdefinable \@ifnextchar \@ifpackageloaded}%
    \DoNotIndex{\@indexfile \@let@token \@sptoken \^}% the latter comes
    % from \CSs like |\^^M|, see sec. \ref{Tasks}.
    \DoNotIndex{\addto@hook \addvspace}%
    \DoNotIndex{\CurrentOption}%
    \DoNotIndex{\emph \empty \firstofone}%
    \DoNotIndex{\font \fontdimen \hangindent \hangafter}%
    \DoNotIndex{\hyperpage \hyperlink \hypertarget}%
    \DoNotIndex{\ifdim \ifhmode \iftrue \ifvmode \medskipamount}%
    \DoNotIndex{\message}%
    \DoNotIndex{\NeedsTeXFormat \newcommand \newif}%
    \DoNotIndex{\newlabel}%
    \DoNotIndex{\of}%
    % ^^A\PassOptionsToClass\PassOptionsToPackage
    \DoNotIndex{\phantom \ProcessOptions \protected@edef}%
    \DoNotIndex{\protected@xdef \protected@write}%
    \DoNotIndex{\ProvidesPackage \providecommand}%
    \DoNotIndex{\raggedright}%
    \DoNotIndex{\raisebox \refstepcounter \ref \rlap}% ^^A\RequirePackage
    \DoNotIndex{\reserved@a \reserved@b \reserved@c \reserved@d}%
    \DoNotIndex{\stepcounter \subsection \textit \textsf \thepage \tiny}%
    \DoNotIndex{\copyright \footnote \label \LaTeX}%
    % \changes[\DefaultIndexExclusions]{v0.98a}{06/09/06}{more
    % macros added to the `exclude list'}
    \DoNotIndex{\@eha \@endparenv \if@endpe \@endpefalse \@endpetrue}%
    \DoNotIndex{\@evenfoot \@oddfoot \@firstoftwo \@secondoftwo}%
    \DoNotIndex{\@for \@gobbletwo \@idxitem \@ifclassloaded}%
    \DoNotIndex{\@ignorefalse \@ignoretrue \if@ignore}%
    \DoNotIndex{\@input@ \@input}%
    \DoNotIndex{\@latex@error \@mainaux \@nameuse}%
    \DoNotIndex{\@nomath \@oddfoot}%|%\@onlypreamble| should be indexed
    % \acro{IMHO}.
    \DoNotIndex{\@outerparskip \@partaux \@partlist \@plus}%
    \DoNotIndex{\@sverb \@sxverbatim}%
    \DoNotIndex{\@tempcnta \@tempcntb \@tempskipa \@tempskipb}%\\
    % I~think the layout parameters  even the kernel, should not be
    % excluded: \inverb|\@topsep| \inverb|\@topsepadd|^^B
    % \ \inverb|\abovedisplayskip| \inverb|\clubpenalty| etc.
    \DoNotIndex{\@writeckpt}%
    \DoNotIndex{\bfseries \chapter \part \section \subsection}%
    \DoNotIndex{\subsubsection}%
    \DoNotIndex{\char \check@mathfonts \closeout}%
    \DoNotIndex{\fontsize \footnotemark \footnotetext \footnotesize}%
    \DoNotIndex{\g@addto@macro \hfilneg \Huge \huge}%
    \DoNotIndex{\hyphenchar \if@partsw \IfFileExists }%
    \DoNotIndex{\include \includeonly \indexspace}%
    \DoNotIndex{\itshape \language \LARGE \Large \large}%
    \DoNotIndex{\lastbox \lastskip \m@th \makeglossary}%
    \DoNotIndex{\maketitle \math@fontsfalse \math@fontstrue \mathsf}%
    \DoNotIndex{\MessageBreak \noindent \normalfont \normalsize}%
    \DoNotIndex{\on@line \openout \outer}%
    \DoNotIndex{\parbox \part \rmfamily \rule \sbox}%
    \DoNotIndex{\sf@size \sffamily \skip}%
    \DoNotIndex{\textsc \textup \toks@ \ttfamily \vbox}%
    % \changes[\DoNotIndex]{v0.97}{06/09/04}{Excluding some star-versions of
    %   commands}
    % \nostanza\noindent
    % |%% \DoNotIndex{\begin*}| maybe in the future, if the idea gets
    % popular\dots \nostanza
    \DoNotIndex{\hspace* \newcommand* \newenvironment* \providecommand*}%
    \DoNotIndex{\renewenvironment* \section* \chapter*}%\label{DIE2}
  }% of |\DefaultIndexExclusions|.\par
  % I~put all the expellings into a~macro because I~want them
  % to be optional.
\end{MakePrivateLetters}

\if@indexallmacros\else
  \DefaultIndexExclusions
\fi

\def\DoIndex{\bgroup\MakePrivateLetters\Do@Index}

\long\def\Do@Index#1{\egroup\@relaxen\gmd@iedir\dont@index#1.}% note

\def\UndoDefaultIndexExclusions{%
  \Store@Macro\DoNotIndex
  % ^^A\dont@index
  \let\DoNotIndex\DoIndex
  % ^^A  \let\dont@index=\do@index
  \DefaultIndexExclusions
  % ^^A  \RestoreMacro\dont@index
  \Restore@Macro\DoNotIndex}

\long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}

\def\indexdiv{\@ifundefined{chapter}{\section*}{\chapter*}}

\@ifundefined{index@prologue} {\def\index@prologue{\indexdiv{Index}%
    \markboth{Index}{Index}%
    Numbers written in italic refer to the \if@pageindex pages \else
    code lines \fi where the
    corresponding entry is described; numbers underlined refer to the
    \if@pageindex\else code line of the \fi definition; numbers in
    roman refer to the \if@pageindex pages\else code lines \fi where
    the entry is used.
    \if@pageindex\else
      \ifx\HLPrefix\@empty
        The numbers preceded with `p.' are page numbers.
      \else The numbers with no prefix are page numbers.
    \fi\fi
    \ifx\IndexLinksBlack\relax\else
      All the numbers are hyperlinks.
      % ^^A, they are made black just to let Adobe Reader work
      % ^^A~faster.
    \fi
    \gmd@dip@hook% this hook is intended to let a~user add
    % something without redefining the entire prologue, see below.
  }}{}

\@emptify\gmd@dip@hook
\long\def\AtDIPrologue#1{\g@addto@macro\gmd@dip@hook{#1}}

\AtDIPrologue{%\label{verb:ampulex:index}
  \ampulexdef\verb\ttverbatim\verbatim@specials
  {\ttverbatim\verbatim@specials}}

\RequirePackage{multicol}

\newdimen\IndexMin \IndexMin = 133pt\relax% originally it was set
\newcount\c@IndexColumns \c@IndexColumns = 3
\renewenvironment{theindex}
  {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
      \IndexLinksBlack
      \IndexParms \let\item\@idxitem \ignorespaces}%
    {\end{multicols}}

\def\IndexLinksBlack{\hypersetup{linkcolor=black}}% To make Adobe

\@ifundefined{IndexParms}
  {\def\IndexParms{%
      % \label{IndexParms}
      \parindent \z@
      \columnsep 15pt
      \parskip 0pt plus 1pt
      \rightskip 15pt
      \mathsurround \z@
      \parfillskip=-15pt plus 1 fil % \docfm\ defines this parameter
      % rigid but that's because of the stretchable space (more
      % precisely, a~|\dotfill|) between the item and the entries. But
      % in \pk{gmdoc} we define no such special delimiters, so we add
      % an infinite stretch.
      \small
      \def\@idxitem{\par\hangindent 30pt}%
      \def\subitem{\@idxitem\hspace*{15pt}}%
      \def\subsubitem{\@idxitem\hspace*{25pt}}%
      \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
      \ifx\EntryPrefix\@empty\else\raggedright\fi% long (actually,
      % a~quite \emph{short but nonempty} entry prefix) made space
      % stretches so terribly large in the justified paragraphs that
      % we should make |\raggedright| rather.
      \ifnum\c@IndexColumns>\tw@\raggedright\fi% the numbers in narrow
      % col\-umns look better when they are |\raggedright| in my opinion.
    }}{}

\def\PrintIndex{% we ensure the standard meaning of the line end
  % character not to cause a~disaster.
  \@ifQueerEOL{\StraightEOL\printindex\QueerEOL}%
  {\printindex}}


\foone{\@makeother\<\@makeother\>
  \glet\sgtleftxii=<}
{
  \def\gmd@docstripdirective{%
    \begingroup\let\do=\@makeother
    \do\*\do\/\do\+\do\-\do\,\do\&\do\|\do\!\do\(\do\)\do\>\do\<% ^^Ayes, we
    % ^^A make \inverb|<|\catother\ since a~directive |<<|\<any text till ^^B>>
    % ^^A~the end of line> theoretically may occur.
    \@ifnextchar{<}{%
      \let\do=\@makeother \dospecials
      \gmd@docstripverb}
    {\gmd@docstripinner}}%

  \def\gmd@docstripinner#1>{%
    \endgroup
    \def\gmd@modulehashone{%
      \Module{#1}\space
      \@afternarrgfalse\@aftercodegtrue\@codeskipputgfalse}%
    % ^^A    \gmd@docstripshook
    \gmd@textEOL\gmd@modulehashone}
  % A~word of explanation: first of all, we
  % close the group for changed |\catcode|s; the directive's text has its
  % |\catcode|s fixed. Then we put the directive's text wrapped with the
  % formatting macro into one macro in order to give just one token
  % the \gmdoc's \TeX\ code scanner.
  % ^^A But before we launch the \TeX\ code
  % ^^A  scanning with all the b\&w, we virtually restore the meaning of
  % ^^A  further |<|s to let them start further \ds\ directives,
  % ^^A  and after this possible restore (if it \emph{actually} takes place
  % ^^A  depends on the declaration used: |\docstrip| or |\docstrips|) we
  % Then launch this big \TeX\ code scanning machinery by calling
  % |\gmd@textEOL| which is an alias for the `narrative' meaning of the
  % line end. This macro opens the verbatim group and launches the
  % char-by-char scanner. That is this scanner because of what we
  % encapsulated the directive's text with the formatting into one
  % macro: to let it pass the scanner.
  %
  % That's why in the `old' macrocodes case the active |%| closes the
  % group before launching |\gmd@docstripdirective|.
  %
  % \stanza
  % The `verbatim' directive macro works very similarly.
}

\foone{\@makeother\<\@makeother\>
  \glet\sgtleftxii=<
  \catcode`\^^M=\active}%
{%
  \def\gmd@docstripverb<#1^^M{%
    \endgroup%
    \def\gmd@modulehashone{%
      \ModuleVerb{#1}\@afternarrgfalse\@aftercodegtrue%
      \@codeskipputgfalse}%
    \xdef\gmd@dsVerbDelim{\detokenize{#1}}%
    \gmd@textEOL\gmd@modulehashone^^M}%
}

\edef\gmd@dsVerbDelim{\detokenize{#@$$$$#_()(_)*981-71092519-40^^A^^B}}


\pdef\dsVerbClose{%
  \global\gmd@dsVerbtrue}

\providecommand*\Module[1]{{%
    \mod@math@codes$\langle\mathsf{#1}\rangle$}}

\providecommand*\ModuleVerb[1]{{%
    \mod@math@codes$\langle\langle\mathsf{#1}$}}

\def\ModuleVerbClose#1{{%
    \xiipercent
    \mod@math@codes$\mathsf{#1}$
    {\normalfont[\ds\ verbatim closing dir.]}}}

\def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026 }

\def\gmd@DefineChanges{%
  \outer\long\def\changes{%
    \gmd@changes@init
    \changes@}}

\def\gmd@changes@init{%
  \@bsphack\begingroup\@sanitize
  \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
\catcode`\^=7
  \MakePrivateLetters \StraightEOL
  \MakeGlossaryControls}

\newcommand\changes[4][]{\PackageWarningNoLine{gmdoc}{%
    ^^JThe \bslash changes command used \on@line
    ^^Jwith no \string\RecordChanges\space declared.
    ^^JI shall not warn you again about it}%
  %^^A\gmd@countlines{#4}%
  \renewcommand\changes[4][]{%^^A\gmd@countlines{#4}
  }}

\def\MakeGlossaryControls{%
  \edef\actualchar{\string=}\edef\quotechar{\string!}%
  \edef\levelchar{\string>}\edef\encapchar{\xiiclub}}%for the glossary the
  % `actual', the `quote' and the `level' chars are respectively |=|,
  % |!| and |>|, the `encap' char remains untouched. I~decided to
  % preserve the \docfm's settings for the compatibility.

\newcommand\changes@[4][\generalname]{%
  \if@RecentChange{#3}% if the date is later than the one stored in
  % \cs{c@Chang\+es\+Start\+Date},
    \@tempswafalse
    \ifx\generalname#1% then we check whether a~\CS-entry is given
    % in the optional first argument or is it unchanged.
      \ifx\last@defmark\relax\else% if no particular \CS is
      % specified in |#1|, we check whether |\last@defmark| contains
      % something and if so, we put it into |\gmu@tempb| scratch macro.
        \@tempswatrue
        \edef\gmu@tempb{% it's a~bug fix: while typesetting traditional
          % \file{.dtx}es, \inverb|\last@defmark| came out with \inverb|\| at the
          % beginning (which resulted with \inverb|\\|\<name> in the change
          % log) but while typesetting the `new' way, it occurred
          % without the bslash. So we gobble the bslash if it's
          % present and two lines below we handle the exception of
          % \inverb|\last@defmark|\equals|{\}| (what would happen if
          % a~definition of \inverb|\\| was marked in new way \gmdoc ing).%^^A]
          \if\bslash\last@defmark\else\last@defmark\fi}%
        \ifx\last@defmark\bslash\let\gmu@tempb\last@defmark\fi%
        \n@melet{gmd@glossCStest}{gmd/isaCS/\last@defmark}%
      \fi
    \else%the first argument isx not |\generalname| i.e.,
         %a~particular \CS is specified by it (if some day one
    % wishes to |\changes| |\generalname|, \heshe\ should type
    % |\changes[generalname]|\dots)
      \@tempswatrue
      {\escapechar\m@ne
        \xdef\gmu@tempb{\string#1}}%
      \if\bslash\@xa\@firstofmany\string#1\relax\@nil% we check
      % whether \inverb|#1| is a~\CS\dots\ilrr
        \def\gmd@glossCStest{1}%\dots\ and tell the glossary if so.
      \fi
    \fi
    \@ifundefined{gmd@glossCStest}{\def\gmd@glossCStest{0}}{}%
    \protected@edef\gmu@tempa{\@nx\gmd@glossary{%
        \if\relax\GeneralName\relax\else
          \GeneralName% it's for the |\DocInclude| case to precede
          % every |\changes| of the same file with the file name, cf.\ line
          % \ref{GeneralName}.
        \fi
        #2\levelchar%
        \if@tempswa% If the macro |\last@defmark|
        % doesn't contain any \CS name (i.e., is empty) nor |#1|
        % specifies a~\CS, the current
        % changes entry was done at top-level.  In this case we precede
        % it by |\generalname|.
          \gmu@tempb
          \actualchar\bslash verb*%
          \if\verbatimchar\gmu@tempb$\else\verbatimchar\fi
          \if1\gmd@glossCStest\quotechar\bslash\fi \gmu@tempb
          \if\verbatimchar\gmu@tempb$\else\verbatimchar\fi
        \else
          \space\actualchar\generalname
        \fi
        :\levelchar%^^A\gmd@deeolize{
        #4%^^A}
      }}%
    \gmu@tempa
    \grelaxen\gmd@glossCStest
  \fi% of |\if@recentchange|
  %^^A\gmd@countlines{#4}%
  \endgroup\@esphack}

\@relaxen\last@defmark
\@emptify\GeneralName

\def\ChangesGeneral{\grelaxen\last@defmark}% If automatic detection of

\AtBegInput{\ChangesGeneral}

\newcount\c@ChangesStartDate

\def\if@RecentChange#1{%
  \gmd@setChDate#1\@nil\@tempcnta
  \ifnum\@tempcnta>\c@ChangesStartDate}

\def\gmd@setChDate#1/#2/#3\@nil#4{% the last parameter will be a~|\count|
  % register.
  #4=\numexpr#1*\@M+#2*100+#3\relax
  %\CH{2010/06/23  changed from \TeX's arithmetic to \cmd\numexpr}
}


\def\ChangesStart#1#2{%
  \gmd@setChDate#2\@nil\c@ChangesStartDate
  \typeout{^^JPackage gmdoc info: ^^JChanges' start date #1 memorised
    as \string<\the\c@ChangesStartDate\string> \on@line.^^J}
  \advance\c@ChangesStartDate\m@ne% we shall show the changes \emph{at ^^B
  % the specified day} and later.
  \ifnum\c@ChangesStartDate>19820900 %\unskip\StraightEOL\footnote{^^A
  % DEK writes in \textit{\TeX, The Program} of September 1982 as the
  % date of \TeX\ Version 0.}\QueerEOL\label{TeXVer0}
  % see \gmiflink[personalchanges]{below}.
    \edef\gmu@tempa{%
      \@nx\g@addto@macro\@nx\glossary@prologue{%
        The changes
        \if\relax\GeneralName\relax\else of \GeneralName\space\fi
        earlier than
        #1 \if\relax#1\relax #2\else(#2)\fi\space are not shown.}}%
    \gmu@tempa
  \fi}
\def\generalname{General}

\def\RecordChanges{\makeglossary\gmd@DefineChanges
  \@relaxen\RecordChanges}

\newdimen\GlossaryMin         \GlossaryMin       = 80pt
\newcount\c@GlossaryColumns   \c@GlossaryColumns = 2
\newenvironment{theglossary}{%
  \begin{multicols}\c@GlossaryColumns
    [\glossary@prologue][\GlossaryMin]%
    \GlossaryParms \IndexLinksBlack
    \let\item\@idxitem \ignorespaces}%
  {\end{multicols}}

\long\def\GlossaryPrologue#1{\@bsphack
  \def\glossary@prologue{#1}%
  \@esphack}
\@ifundefined{glossary@prologue}
  {\def\glossary@prologue{\indexdiv{{Change History}}%
      \markboth{{Change History}}{{Change History}}%
    }}{}
\AtBeginDocument{%
  \@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms}{}}

\def\PrintChanges{% to avoid a~disaster among queer EOLs:
  \@ifQueerEOL
    {\StraightEOL\@input@{\jobname.gls}\QueerEOL}%
    {\@input@{\jobname.gls}}%
    \g@emptify\PrintChanges}

\pdef\toCTAN{%\
  % \begin{enumargs}
  % \item  \<year/month/day>\textvisiblespace\<version number>
   % \end{enumargs}
  % \changes{v0.99r}{2008/11/22}{added}
  % \chgs{2008/11/30 v0.99s made a~shorthand for \cs{chgs} not
  %   \cs{changes}}
  \gmd@changes@init
 \gmd@toCTAN@}

\def\gmd@toCTAN@#1{%
  \edef\gmu@tempa{\gmd@chgs@parse#1 \@nil}%
  \edef\gmu@tempa{%
    \unexpanded{\changes@[\generalname]}%
    {\@xa\@firstofthree\gmu@tempa}%
    {\@xa\@secondofthree\gmu@tempa}%
    {put to \acro{CTAN} on \@xa\@secondofthree\gmu@tempa}}%
  \gmu@tempa}


\outer\pdef\chgs{\gmd@changes@init\gmd@chgs}

\DeclareCommand\gmd@chgs{%
  o % the optional \CS the change refers to
  >!m % change's date, version and text
}{%
  \IfValueTF{#1}{%%
    \edef\gmu@tempa{\@nx\changes@[\unexpanded{#1}]%
      \@xa\unexpanded\@xa{\gmd@chgs@parse#2\@nil}}}%
  {\edef\gmu@tempa{\@nx\changes@
      \@xa\unexpanded\@xa{\gmd@chgs@parse#2\@nil}}}%
  \gmu@tempa}% of |\gmd@chgs|

\long\def\gmd@chgs@parse#1 #2 #3\@nil{{#2}{#1}{#3}}%

\outer\pdef\CH{%
  \gmd@changes@init\gmd@chgsplus}

\DeclareCommand\gmd@chgsplus{\SameAs\gmd@chgs}{%
  \DCUse\gmd@chgs{#1}{#2}%
  \gmd@threeway{#1}#2\@nil
}

\long\def\gmd@threeway
#1% opt. \CS that |\CH| refers to
#2 % (delimd.\ with a blank) date
#3 %  (delimd.\ with a blank) version
#4\@nil % text
{%
  \par (#2, #3\IfValueT{#1}{, \texttt{\detokenize\@xa{\string#1}}}:)
  #4\scantokens{}% to provide proper line end which'll take care of
                 % |\par| \&c.
}

\newcount\check@sum

\def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}

\newcounter{CheckSum}

\newcommand*\step@checksum{\stepcounter{CheckSum}}
\AtEndInput{\check@checksum}

\def\check@checksum{\relax
  \ifnum\check@sum=\z@
    \edef\gmu@tempa{% why \cs{edef}---see line \ref{wypis sumy}
      \@nx\typeout{**********************************^^J%
        * The input file \gmd@inputname\space has no Checksum
        stated.^^J%
        * The current checksum is \the\c@CheckSum.^^J%
        \gmd@chschangeline% a~check sum changes history entry, see below.
        * (package gmdoc info.)^^J%
        **********************************^^J}}
    \else
    \ifnum\check@sum=\c@CheckSum
      \edef\gmu@tempa{%
        \@nx\typeout{*****+*+*+*+*+*+*+*+*+*+^^J%
          * The input file \gmd@inputname: Checksum passed.^^J%
          \gmd@chschangeline
          * (package gmdoc info.)^^J%
          *****+*+*+*+*+*+*+*+*+*+^^J}}
    \else
      \edef\gmu@tempa{%
        \@nx\typeout{********\gmd@wykrzykniki^^J%
          *! The input file \gmd@inputname:^^J%
          *! The CheckSum stated: \the\check@sum\space<> my
          count: \the\c@CheckSum.^^J%
          \gmd@chschangeline
          *! (package gmdoc info.)^^J%
          ********\gmd@wykrzykniki^^J}}%
      % \chgs{2008/11/30 v0.99s
      % \env{\quotechar!*\quotechar!*\quotechar!…} sequence changed to
      %   \env{\quotechar! \quotechar! \quotechar!…} for better
      %   distinction}
    \fi
  \fi
  \gmu@tempa
  \@xa\AtEndDocument\@xa{\gmu@tempa}%\label{wypis sumy} we print
  % the checksum notification on the terminal immediately and at end
  % of \TeX ing not to have to scroll the output far nor search the log.
  \global\check@sum\z@}

\def\gmd@wykrzykniki{! ! ! ! ! ! ! ! ! ! ! !}

\def\gmd@chschangeline{%
  \xiipercent\space\string\chschange
  {\@ifundefined{fileversion}{v???}{\fileversion}}%
  {\the\year/\the\month/\the\day}%
  {\the\c@CheckSum}^^J%
  \xiipercent\space\string\chschange
  {\@ifundefined{fileversion}{v???}{\fileversion}}%
  {\@xa\@gobbletwo\the\year/\the\month/\the\day}%
  {%  with two di\-g\-it year in case you use |\ChangesStart|.
    \the\c@CheckSum}^^J}

\outer\pdef\chschange{% \
  % \begin{enumargs}
  %   \dc m file version,
  %   \dc m date,
  %   \dc checksum,
  %   \dc o the reason of check sum change, possibly short.
  % \end{enumargs}
  \@ifQueerEOL
  {\def\EOLwasQueer{11}}{\def\EOLwasQueer{10}}%
  \gmd@changes@init
  \chschange@}

\DeclareCommand\chschange@{mmmo}{%\label{chschange}
  \changes@{#1}{#2}{CheckSum #3
    \IfValueT{#4}{because of #4}%
  }% |\csname›…| because
  % \incs{cha\+n\+g\+es} is \inverb|\outer|.
  \CheckSum{#3}%
  \IfValueF{#4}{%
    \if\EOLwasQueer
    \afterfi{%
      \@ifnextchar\par{%
        \@xa\gmd@textEOL\gobble}%
      {}%
    }% of |\afterfi|,
    \fi}% of no value of |#4|,
}% of |\chschange@|.\nostanza

\newcommand*\ltxPageLayout{%
  \setlength{\textwidth}{355pt}%
 \setlength\marginparwidth{95pt}%
 \setlength\oddsidemargin{82pt}%
 \setlength\evensidemargin{82pt}}


\DeclareCommand\DocInclude{O{}mO{}}{%\
  % \begin{enumargs}
  %   \dc o path (with closing slash), will not be printed
  % \dc m file name without extension, will be printed
  % \dc o file extension (with dot) if not \file{.sty}, \file{.cls},
  % \file{.tex}, \file{.dtx} nor \file{.fdd}
  % \end{enumargs}\
  % originally it took just one
  % argument. Here we make it take two, first of which is intended to
  % be the path (with the closing \inverb |/|). This is intended not to print
  % the path in the page footers only the filename.\par
  % \CodeUsage\HLPrefix
  \gdef\HLPrefix{\filesep}%
  \gdef\EntryPrefix{\filesep}% we define two rather kernel parameters
  % to expand to the file marker. The first will bring the information
  % to one of the default \inverb|\IndexPrologue|'s
  % |\if|s. Therefore the
  % definition is global. The latter is such for symmetry.
  \def\GeneralName{#2\actualchar\pk{#2} }% \label{GeneralName} for the
    % changes' history main level entry.
    %
    % Now we check whether we try to include ourselves and if
    % so---we'll (create and) read an \file{.auxx} file instead of
    % (the main) \file{.aux} to avoid an infinite recursion of |\input|s.
    %
    \edef\gmd@jobname{\jobname}%
    \edef\gmd@difilename{% we want the filename all `other', just as
      % in \inverb|\jobname|.
      \@xa\@xa\@xa\@gobble\@xa\string\csname#2\endcsname}%
    \ifx\gmd@jobname\gmd@difilename
      \def\gmd@auxext{auxx}%
    \else
      \def\gmd@auxext{aux}%
    \fi
  \relax
  %^^A\if@ltxDocInclude
  \clearpage
  % ^^A\fi
  \gmd@docincludeaux \def\currentfile{gmdoc-IncludeFileNotFound.000}%
  \let\fullcurrentfile\currentfile
  \@ifnonempty{#3}%
  {%
    \unless\if.\@firstofmany#3\relax\@nil
      \PackageError{gmdoc}{Optional \xiihash3 of
        \string\DocInclude\space
        if present has to begin with a dot (.)}{}%
    \fi
    \edef\currentfile{#2#3}%
  \IfFileExists{#1\currentfile}{}%
  {\PackageError{gmdoc}{\string\DocInclude\space file
      \currentfile\space not found}{}}%
  }% of if extension given.
  {% if extension not given:
    \IfFileExists{#1#2.fdd}{\edef\currentfile{#2.fdd}}{% it's not \pk{.fdd},
      \IfFileExists{#1#2.dtx}{\edef\currentfile{#2.dtx}}{% it's not \pk{.dtx}
        % either,
        \IfFileExists{#1#2.sty}{\edef\currentfile{#2.sty}}{% it's not
          % \pk{.sty},
          \IfFileExists{#1#2.cls}{\edef\currentfile{#2.cls}}{% it's
            % not \pk{.cls},
            \IfFileExists{#1#2.tex}{\edef\currentfile{#2.tex}}{% it's
              % not \pk{.tex},
              \IfFileExists{#1#2.fd}{\edef\currentfile{#2.fd}}{% so it
                % must be \pk{.fd} or error.
                \PackageError{gmdoc}{\string\DocInclude\space file
                  #1#2.fdd/dtx/sty/cls/tex/fd not found.}{}%
              }}}}}}%
  }% of if no extension given
  % \changes{v0.98j}{06/10/16}{\pk{.fdd} added in \cs{DocInclude}'s
  %   search for the extension.}
  \edef\currentfile{\@xa\detokenize\@xa{\currentfile}}%
  \edef\fullcurrentfile{#1\currentfile}%
  \ifnum\@auxout=\@partaux
    \@latexerr{\string\DocInclude\space cannot be nested}\@eha
  \else \@docinclude{#1}#2#3 \fi}% Why is |#2| delimited with | | not

\def\@docinclude#1#2 {% To match the macro's parameter string, is an
  % answer. But why is |\@docinclude| defined so? Originally, in
  % \pk{ltxdoc} it takes one argument and it's delimited with a~space
  % probably in resemblance to the true |\input| \nlpercent(|\@@input| in
  % \LaTeX). ^^A\if@ltxDocInclude
  \clearpage
  %^^A\fi
  \if@filesw \gmd@writemauxinpaux{#2.\gmd@auxext}\fi% this strange macro with
  % a~long name is another spurious thing to allow |_| in the filenames (see
  % line \ref{gmd@writemauxinpaux}). which are allowed anyway unless
  % active or \cat14.
  \@tempswatrue
  \if@partsw \@tempswafalse\edef\gmu@tempb{#2}%
    \@for \gmu@tempa:=\@partlist\do{\ifx\gmu@tempa\gmu@tempb\@tempswatrue\fi}%
  \fi
  \if@tempswa% the file is on |\@partlist|
    \let\@auxout\@partaux
    \if@filesw
      \immediate\openout\@partaux #2.\gmd@auxext\relax% Yes, only |#2|. It's to
      % create and process the partial \pk{.aux(x)} files always in the main
      % document's (driver's) directory.
      % \changes[\DocInclude]{v0.97}{06/09/04}{\protect\TeX forced to
      %   process the partial \pk{.aux}es in the main document directory}
      \immediate\write\@partaux{\relax}%
    \fi
    % \begin{quotation}We need to save (and later restore) various
    %   index-related commands which might be changed by the included
    %   file.\end{quotation}
    % \changes{v0.98a}{06/09/06}{\cs{MacroStoringDo} renamed (in
    %   \pk{gmutils}) to \cs{StoringAndRelaxingDo}, and
    %   \cs{MacroRestoringDo} to \cs{RestoringDo}.}
    \StoringAndRelaxingDo\gmd@doIndexRelated
    \if@ltxDocInclude\part{\currentfile}% In the \pk{ltxdoc}-like setup
    % we make a~part title page with only the filename and the file's
    % |\maketitle| will typeset an \pk{article}-like title.
    \else\let\maketitle=\InclMaketitle
    \fi% In the default setup we
    % redefine |\maketitle| to typeset a~common chapter or part heading.
    \if@ltxDocInclude\xdef@filekey\fi
    \GetFileInfo{\currentfile}% it's my (GM) addition with the account
    % of using file info in the included files' title/\:heading etc.
    \incl@DocInput{\fullcurrentfile}% originally just |\currentfile|.
    \if@ltxDocInclude\else\xdef@filekey\fi% in the default case we add
    % new file to the file key \emph{after} the input because in this
    % case it's the files own |\maketitle| what launches the
    % sectioning command that increases the counter.
    % \par And here is the moment to restore the index-related
    % commands.
    \RestoringDo\gmd@doIndexRelated
    % ^^A\if@ltxDocInclude
    \clearpage
    % ^^A\fi
    \gmd@writeckpt{#1#2}%
    \if@filesw \immediate\closeout\@partaux \fi
  \else% the file isn't on     |\@partlist|
    \@nameuse{cp@#1#2}%
    \g@emptify\gmd@ABIOnce
  \fi
  \let\@auxout\@mainaux}% end of |\@docinclude|.
\def\xdef@filekey{{\@relaxen\narrativett% \label{LetTTFRelax}This
    % assignment is very trickily crafted: it makes \emph{all}
    % |\narrativett|s present in the |\filekey|'s expansion unexpandable
    % not only the one added in this step.
    \xdef\filekey{\filekey, \thefilediv={\narrativett\currentfile}}}}

\def\gmd@writemauxinpaux#1{% \label{gmd@writemauxinpaux}
  % this name comes from `\emph{write} out to \emph main
  % \emph{\pk{.aux}} to \emph{in}put \emph partial
  % \emph{\pk{.aux}}'.\par
  % We wrap |\@input{|\<partial \pk{.aux}>|}| in a~|_|\catother\
  % hacked scope. This hack is especially recommended here since the
  % \pk{.aux} file may contain a~non-|\global| stuff that should not
  % be localised by a~group that we would have to establish if we
  % didn't use the hack. (Hope you understand it. If not, notify me
  % and for now I'll only give a~hint: ``Look at it with the \TeX's
  % eyes''. More uses of this hack are to be seen in \pk{gmutils}
  % where they are a~bit more explained.)
  \immediate\write\@mainaux{%
    \unexpanded{%
      \bgroup
      \@makeother\_% to allow underscore
      \@makeother\~% to allow paths beginning with |~/|
      \firstofone}{\egroup
      \string\@input{#1}}}}

\def\gmd@writeckpt#1{%
  \immediate\write\@partaux{%
    \unexpanded{%
      \bgroup
      \@makeother\_%
      \@makeother\~%
      \firstofone}\@charlb\egroup}%
  \@writeckpt{#1}%
  \immediate\write\@partaux{\@charrb}}

\def\gmd@doIndexRelated{%
  \do\tableofcontents \do\makeindex \do\EnableCrossrefs
  \do\PrintIndex \do\printindex \do\RecordChanges \do\PrintChanges
  \do\theglossary \do\endtheglossary}

\@emptify\filesep
\def\aalph#1{\@aalph{\csname c@#1\endcsname}}
\def\@aalph#1{%
  \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
         j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or
         t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or
         D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or
         N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or
         X\or Y\or Z\else\@ctrerr\fi}

\def\gmd@docincludeaux{%
  % We set the things for including the files only once.
  \global\@relaxen\gmd@docincludeaux
  % By default, we will include multiple files into one document
  % as chapters in the classes that provide |\chapter| and as parts
  % elsewhere.
  \ifx\filediv\relax
    \ifx\filedivname\relax% (nor |\filediv| neither
    % |\filedivname| is defined by the user)
    % \changes[\filediv]{v0.98a}{06/09/06}{definition moved into
    % \cs{DocInclude} and let \cs{relax} by default ($\quotechar=$a~bug fix).}
      \@ifundefined{chapter}{%
        \SetFileDiv{part}}%\changes[\DocInclude]{v0.98f}{06/9/29}{\cs{filediv(name)}
      % defined as \cs[]{(\protect\bslash)part} for the classes that
      % don't know \cs{chapter}}
      {\SetFileDiv{chapter}}%
    \else% (|\filedivname| is defined by the user, |\filediv| is not)
      \SetFileDiv{\filedivname}% why not? Inside is |\edef| so it'll work.
    \fi
  \else% (|\filediv| is defined by the user
    \ifx\filedivname\relax% and |\filedivname| is not)
    %^^A~I~deleted a~six level test which one sectioning command
    %^^A~|\filedivname| isx.
      \PackageError{gmdoc}{You've redefined \string\filediv\space
        without redefining \string\filedivname.}{Please redefine the
        two macros accordingly. You may use \string\SetFileDiv{name
          without bslash}.}%
    \fi
  \fi
  % \changes[\DocInclude]{v0.99m}{2008/08/09}{
  %   resetting of codeline number with every
  % \cs{filedivname} commented out because with the
  % \env{countalllines} option it caused that reset at \cs{maketitle}
  % after some lines of file}
  % ^^A  \@addtoreset{codelinenum}{\filedivname}% remember it has
  % ^^A~a~|\global| effect in fact. For each file we'll reset
  % ^^A~\env{codelinenum}.
  \def\thefilediv{\aalph{\filedivname}}% The files will be numbered
  % with letters, lowercase first.
  \@xa\let\csname the\filedivname\endcsname=\thefilediv% This
  % li\-ne lets |\the|\<chapter> etc.\ equal |\thefilediv|.
  \def\filesep{\thefilediv-}% File separator (identifier) for the index.
  \let\filekey=\@gobble
  \g@addto@macro\index@prologue{%
    \gdef\@oddfoot{\parbox{\textwidth}{\strut\footnotesize
        \raggedright{\bfseries File Key:} \filekey}}% The footer for
    % the pages of index.
    \glet\@evenfoot\@oddfoot}% \label{oneside}anyway, it's intended to
  % be oneside.
  \g@addto@macro\glossary@prologue{%
    \gdef\@oddfoot{\strut Change History\hfill\thepage}% The footer
    % for the changes history.
    \glet\@evenfoot\@oddfoot}%
  % \changes[\DocInclude]{v0.98c}{06/9/10}{Change History footer
  % defined}
  \gdef\@oddfoot{% The footer of the file pages will be its name and,
    % if there is a~file info, also the date and version.
    \@xa\ifx\csname ver@\currentfile\endcsname\relax
      File \thefilediv: {\narrativett\currentfile} %
    \else
      \GetFileInfo{\currentfile}%
      File \thefilediv: {\narrativett\filename} %
      Date: \filedate\ %
      Version \fileversion
    \fi
    \hfill\thepage}%
  \glet\@evenfoot\@oddfoot% see line \ref{oneside}.
  % ^^A  \show\filedivname% for debug
  \@xa\def\csname\filedivname name\endcsname{File}% we
  % redefine the name of the proper division to `File'.
  \ifx\filediv\section
    \let\division=\subsection
    \let\subdivision=\subsubsection
    \let\subsubdivision=\paragraph
    % If |\filediv| is higher than
    % |\section| we don't change the three divisions (they are
    % |\section|, |\subsection| and |\subsubsection| by default).
    % |\section| seems to me the lowest reasonable sectioning command
    % for the file. If |\filediv| is lower you should rather rethink
    % the level of a~file in your documentation not redefine the two
    % divisions.
  \fi}% end of |\gmd@docincludeaux|.

\def\SetFileDiv#1{%
  \edef\filedivname{#1}%
  \@xa\let\@xa\filediv\csname#1\endcsname}

\def\SelfInclude{\DocInclude{\jobname}}

\newif\if@ltxDocInclude

\newcommand*\ltxLookSetup{%
  \SetFileDiv{part}%
  \ltxPageLayout
  \@ltxDocIncludetrue
}

\@onlypreamble\ltxLookSetup

\let\incl@DocInput=\DocInput

\@emptify\currentfile% for the pages outside the

\newcommand*\olddocIncludes{%
  \let\incl@DocInput=\OldDocInput}

\newcommand*\gmdocIncludes{%
  \let\incl@DocInput=\DocInput
  \AtBegInput{\QueerEOL}}% to move back the |\StraightEOL| declaration put
\AtBegInput{%^^A~ why provide not just \cs{def}?
  \providecommand*\maketitle{\par
    \begingroup \def \thefootnote {\fnsymbol {footnote}}%
    \setcounter {footnote}\z@
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
      \hb@xt@1.8em{%
        \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn \twocolumn [\@maketitle ]%
    \else \newpage \global \@topnum \z@ \@maketitle \fi
    \thispagestyle{titlepage}\@thanks \endgroup
    \setcounter {footnote}\z@
    \gdef\@date{\today}\g@emptify\@thanks%
    \g@relaxen\@author\g@relaxen\@title%
  }%\par
  % \begin{quotation}When a number of articles are concatenated into
  % a~journal, for example, it is not usual for the title pages of
  % such documents to be formatted differently. Therefore, a class
  % such as \pk{ltugboat} can define this macro in advance. However,
  % if no such definition exists, we use page style plain for title
  % pages.\end{quotation}
  \@ifundefined{ps@titlepage}{\let\ps@titlepage=\ps@plain}{}%
  % \par And let's provide |\@maketitle| just in case:  an error occurred
  % without it at \TeX ing with \pk{mwbk.cls} because this class with the
  % default options does not define |\@maketitle|. The below definitions
  % are taken from \pk{report.cls} and \pk{mwrep.cls}.
  \providecommand*\@maketitle{%
    \newpage\null \vskip 2em\relax%
    \begin{center}%
      \titlesetup
      \let \footnote \thanks
      {\LARGE \@title \par}%
      \vskip 1.5em%
      {\large \lineskip .5em%
        \begin{tabular}[t]{c}%
          \strut \@author
        \end{tabular}\par}%
      \vskip 1em%
      {\large \@date}%
    \end{center}%
    \par \vskip 1.5em\relax}%\par
  % We'd better restore the primary meanings of the macros making
  % a~title. (\LaTeXe\ source, File F: ltsect.dtx Date: 1996/12/20 Version
  % v1.0z, lines 3.5.7.9--12.14--17.)
  \providecommand*\title[1]{\gdef\@title{#1}}
  \providecommand*\author[1]{\gdef\@author{#1}}
  \providecommand*\date[1]{\gdef\@date{#1}}
  \providecommand*\thanks[1]{\footnotemark
    \protected@xdef\@thanks{\@thanks
      \protect\footnotetext[\the\c@footnote]{#1}}%
  }%
  \providecommand*\and{%| % \begin{tabular}|
    \end{tabular}%
    \hskip 1em \@plus.17fil%
    \begin{tabular}[t]{c}}%| % \end{tabular}|
    % And finally, let's initialise \cs{tit\+le\+set\+up} if it is not yet.
    \providecommand*\titlesetup{}%
}% end of |\AtBegInput|.
\@relaxen\filediv
\@relaxen\filedivname
\@relaxen\thefilediv


\def\InclMaketitle{%
  % \changes{v0.98a}{06/09/05}{renamed from \cs{incl@maketitle} because
  %   I~needed it in self-input hacks.}
  % \chgs{2008/12/10 v0.99s a~bug fixed: \cmd\if\cmd\relax\cmd\@date\
  %   changed to \cmd\ifx}
  %
  {\def\and{, }% we make |\and| just a~comma.
    {\let\thanks=\@gobble% for the toc version of the heading we
      % discard |\thanks|.
      \protected@xdef\incl@titletotoc{%
        \@title\@ifauthor{%
          \protect\space(\@author)}{}}% we add the author iff the `files have
      % different authors' \emph{and} author exists \nlpercent(|@variousauthors|)
    }%
    \def\thanks##1{\footnotemark
      \protected@xdef\@thanks{\@thanks% to keep the previous |\thanks|
        % if there were any.
        \protect\footnotetext[\the\c@footnote]{##1}}}% for some
    % mysterious reasons so defined |\thanks| do typeset the footnote
    % mark and text but they don't hyperlink it
    % properly. A~\pk{hyperref} bug?
    \@emptify\@thanks
    \protected@xdef\incl@filedivtitle{%
      [{\incl@titletotoc}]% braces to allow |[| and
      % |]| in the title to toc.
      {\protect\@title
        {\protect\smallerr% this macro is provided by the \pk{gmutils}
          % package after the \pk{relsize} package.
          \@ifauthor
          {\protect\\[0.15em]\@nx\@author
            \ifx\relax\@date\else, \fi}% after use, |\@date| is let to
          % \incmd\relax.
          {\ifx\relax\@date\else\protect\\[0.15em]\fi}
          % The default is that all the included files have the same
          % author(s). In this case we won't print the author(s) in
          % the headings. Otherwise we wish to print them.  The
          % information which case are we in is brought by the
          % |\if@variousauthors| switch defined in line \ref{@variousauthors}.
          \protect\@date}}% end of |\incl@filedivtitle|'s brace (2nd
      % or 3rd argument).
    }% end of |\incl@filedivtitle|'s |\protected@xdef|.\par
    % We |\protect| all the title components to avoid expanding
    % |\footnotemark| hidden in |\thanks| during  |\protected@xdef|
    % (and to let it be executed during the typesetting, of course).
    }% end of the comma-|\and|'s group.
    \@xa\filediv\incl@filedivtitle
    \@thanks
    \g@relaxen\@author \g@relaxen\@title \g@relaxen\@date
    \g@emptify\@thanks
}% end of |\InclMaketitle|.


\newif\if@variousauthors

\newcommand*\PrintFilesAuthors{\@variousauthorstrue}
\newcommand*\SkipFilesAuthors{\@variousauthorsfalse}

\def\@ifauthor{%\
  % \begin{enumargs}
  % \item what if true
  % \item what if false
  % \end{enumargs}
  \ifnum\numexpr\if@variousauthors1\else0\fi*
      \ifx\@author\relax0\else\ifx\@author\@empty0\else1\fi\fi>0
    \@xa\@firstoftwo
  \else
    \@xa\@secondoftwo
  \fi
}


\def\GetFileInfo#1{%
  \def\filename{#1}%
  \def\gmu@tempb##1 ##2 ##3\relax##4\relax{%
    \def\filedate{##1}%
    \def\fileversion{##2}%
    \def\fileinfo{##3}}%
  \edef\gmu@tempa{\csname ver@#1\endcsname}%
  \@xa\gmu@tempb\gmu@tempa\relax? ? \relax\relax}


\newcommand*\FileInfo{%
  \bgroup
  \gmd@ctallsetup
  \bgroup% yes, we open two groups because we want to rescan tokens in
  % `usual' catcodes. We cannot put \incs{gmd@ctallsetup} into the
  % inner macro because when that will be executed, the
  % \incs{inputlineno} will be too large (the last not the first line).
  \let\do\@makeother
  \do\ \do\{\do\}\do\^^M\do\\%
  \gmd@fileinfo}

\foone{%
  \catcode`!\z@
  \catcode`(\@ne
  \catcode`)\tw@
  \let\do\@makeother
  \do\ % we make space `other' to keep it for scanning the code where
  % it may be leading.
  \do\{\do\}\do\^^M\do\\}%\CodeEscapeChar\!
(%
!def!gmd@fileinfo#1Provides#2{#3}#4[#5]#6^^M%
(!egroup% we close the group of changed catcodes, the catcodes
!gmd@writeFI(#2)(#3)(#5)%
!gmd@FIrescan(#1Provides#2{#3}#4[#5]#6)% this macro will close the group.
)% \CodeEscapeChar\\
)

\def\gmd@writeFI#1#2#3{%
  % ^^A  \typeout{@@@ write FI}\show\relax
  {\newlinechar=\endlinechar% \chgs{2008/11/30 v0.99s added assignment
    % of \cmd\newlinechar}
    \immediate\write\@auxout{%
      \global\@nx\@namedef{%
        ver@#2.\if P\@firstofmany#1\@nil sty\else cls\fi}{#3}}}}

\foone\obeylines{%
  \def\gmd@FIrescan#1{%
 % \changes{v0.99l}{2008/08/06}{\cs{scantokens} used instead of
 %   \cs{write} and \cs{@@input} which simplified the macro}
 % ^^A  \newwrite\gmd@docrescanfile
 % ^^A  \immediate\openout\gmd@docrescanfile=\jobname.docrescan\relax
 {\newlinechar=\endlinechar\scantokens{#1}}\egroup^^M}}


\def\ProvideFileInfo#1{%
  \begingroup
    \catcode`\ 10 \catcode\endlinechar 10 %
    \@makeother\/\@makeother\&%
    \kernel@ifnextchar[{\gmd@providefii{#1}}{\gmd@providefii{#1}[]}%^^A]
  }

  % \DefIndex\gmd@providefii
\def\gmd@providefii#1[#2]{%\\
  % (we \emph{don't} write the file info to \pk{.log})
  \@xa\xdef\csname ver@#1\endcsname{#2}%
  \endgroup}

\def\ProvideSelfInfo{\ProvideFileInfo{\jobname.tex}}


\def\gmd@upperDIV#1{%
  \if d#1D\fi
  \if i#1I\fi
  \if v#1V\fi
}

\def\edefInfo
#1% name
#2% datum
{%
  \edef\gmd@edefInfo@resa{\gmd@upperDIV #2}%
  \@nameedef{file#2}{%
    \ifcsname #1Leaf\gmd@edefInfo@resa\endcsname % e.g.~|gmbaseLeafVersion|
      \xA\xA\xA\detokenize\xA\xA\xA{%
        \csname #1Leaf\gmd@edefInfo@resa\endcsname
      }%
    \else
      \ifcsname #1\gmd@edefInfo@resa\endcsname % e.g.~|gmbaseVersion|
        \xA\xA\xA\detokenize\xA\xA\xA{%
          \csname #1\gmd@edefInfo@resa\endcsname
        }%
      \else
        \ifcsname \gmBundleFile \gmd@edefInfo@resa\endcsname % e.g.~|gmutilsVersion|
          \xA\xA\xA\detokenize\xA\xA\xA{%
            \csname \gmBundleFile \gmd@edefInfo@resa\endcsname
          }%
        \fi
      \fi
    \fi
  }% of edefined macro
}% of |\edefInfo|

\def\FileInfoFromName#1{%
  \edefInfo{#1}{date}%
  \edefInfo{#1}{version}%
  \edefInfo{#1}{info}%
  \def\GeneralName{#1\actualchar\pk{#1} }% for the changes' history.
}

\def\BundleInfoFromName#1{%
  \def\gmBundleFile{#1}%
  \Store@MacroSt {#1LeafDate}%
  \Store@MacroSt {#1LeafVersion}%
  \Store@MacroSt {#1LeafInfo}%
  \n@melet{#1LeafDate}{@undefined}%
  \n@melet{#1LeafVersion}{@undefined}%
  \n@melet{#1LeafInfo}{@undefined}%
  \FileInfoFromName{#1}%
  \Restore@MacroSt {#1LeafDate}%
  \Restore@MacroSt {#1LeafVersion}%
  \Restore@MacroSt {#1LeafInfo}%
}

\pdef\filenote{This file has version number \fileversion{} dated \filedate{}.}
\pdef\thfileinfo{\thanks\filenote}

\pdef\fnfileinfo{%
  \gmu@ifedetokens{\@currext}{toc}%
  {}%
  {\footnote\filenote}%
}

\foone{\obeylines}%
{%
  \pdef\IndexInput#1{% \changes{v0.98b}{06/09/07}{\cs{StoreMacro}ing
    %% and \cs{RestoreMacro}ing
    % \cs{code@delim} added}
    \Store@Macro\code@delim%
    \CodeDelim*\^^Z%
    \def\gmd@iihook{% \label{iihook}this hook is |\edef|ed!
      \@nx^^M%
      \code@delim\relax\@nx\let\@nx\EOFMark\relax}%^^A\@nx^^M
    \DocInput{#1}\Restore@Macro\code@delim}%
}
\newenvironment{gmlonely}{\StraightEOL}{}

\newcommand\skipgmlonely[1][]{%
  \def\gmu@tempa{%\DefIndex\gmd@skipgmltext
    \def\gmd@skipgmltext{%
      \g@emptify\gmd@skipgmltext
      % ^^A      \gmd@deeolize{
      #1%^^A}
    }}% not to count the lines of the substituting
  % text but only of the text omitted
  \gmu@tempa
  \@xa\AtBegInput\@xa{\gmu@tempa}%
  \renewenvironment{gmlonely}{%
    \StraightEOL
    \@fileswfalse% to forbid writing to \pk{.toc}, \pk{.idx} etc.
    \setbox0=\vbox\bgroup}{\egroup\gmd@skipgmltext}}


\foone{\catcode`\_=8 }% we ensure the standard |\catcode| of |_|.
{%
  \newcommand*\catother{${}_{12}$}%\par
  % Similarly, if we need to say some char is of category 13 (`active'),
  % we'll write \catactive, got by |\catactive|
  \newcommand*\catactive{${}_{13}$}%\par
  % and a~letter, \catletter
  \newcommand*\catletter{${}_{11}$}%.
}
\newenvironment*{copyrnote}{%
  \StraightEOL\everypar{\hangindent3em\relax\hangafter1 }%
  \par\addvspace\medskipamount\parindent\z@\obeylines}{%
  \@codeskipputgfalse\stanza}
\StoreEnvironment{quotation}
\def\gmd@quotationname{quotation}
\renewenvironment{quotation}{%
  % \changes{v0.99j}{2008/08/03}{Improved behaviour of redefined
  %   \env{quotation} to be the original if used by another environment.}
  % The first non-me user complained that \env{abstract} comes out in
  % quotation marks. That is because \env{abstract} uses \env{quotation}
  % internally. So we first check whether the current environment is
  % \env{quotation} or something else.
  \ifx\@currenvir\gmd@quotationname
  \afterfi{\par``\ignorespaces}%
  \else\afterfi{\storedcsname{quotation}}%
  \fi}
{\ifx\@currenvir\gmd@quotationname
  \afterfi{\ifhmode\unskip\fi''\par}%
  \else\afterfi{\storedcsname{endquotation}}%
  \fi}

\def\gmdnoindent{%
  \ifvmode\leavevmode\hskip-\parindent\ignorespaces
  \fi}% \incs{ignorespaces} is added to eat a~space inserted% by
\pdef\inverb{%
  % \changes{v0.99g}{2007/11/12}{added}
  \gmu@ifstar{%
    \def\gmu@tempa{\verbhyphen}% the pre-break.
    \@emptify\gmu@tempb% the no-break.
    \gmd@inverb}%
  {\@emptify\gmu@tempa% the pre-break empty
    \def\gmu@tempb{\gmboxedspace}% the no-break boxed space.
    \gmd@inverb}}

\newcommand*\gmboxedspace{\hbox{\normalfont{ }}}

\pdef\gmd@nlperc{% \changes{v0.99n}{2008/08/22}{% added
  % \cs{hbox}es in \cs{discretionary} to score \cs{hyphenpenalty} not
  % \cs{exhyphenpenalty}}
  % \chgs{2008/12/06 v0.99s \cs{newcommand*} replaced with \cs{pdef}
  % and optional argument's declaration removed since nothing is done
  % to \texttt{\#1} in the body of now-macro. Wrapped in a~group for
  % setting \cmd\hyphenpenalty}
  \ifhmode\unskip\fi
  \begingroup\hyphenpenalty\inverbpenalty\relax
  \discretionary{\hbox{\gmu@tempa}}% (pre-break).  I~always put
  % a~\incs{hbox} here to make this discretionary score the
  % \incs{hyphenpenalty} not \incs{exhyphenpenalty} (\TB\ p.~96) since
  % the latter may be 10,000 in Polish typesetting.
  {\hbox{\narrationmark}}% (post-break)
  {\gmu@tempb}% (no-break).
  \endgroup
  \penalty10000\hskip0sp\relax}

\def\inverbpenalty{-1000}

\pdef\gmd@inverb{%
  \gmd@nlperc
  \ifmmode\hbox\else\leavevmode\null\fi
  \bgroup
  \ttverbatim
  \narrativett
  \def\breakablevisspace{%
    \discretionary{\visiblespace}{\narrationmark}{\visiblespace}}%
  \def\breakbslash{%
    \discretionary{}{\narrationmark\type@bslash}{\type@bslash}}%
  \def\breaklbrace{%
    \discretionary
      {\xiilbrace\verbhyphen}%
      {\narrationmark}%
      {\xiilbrace}}%
  \gm@verb@eol
  %^^A  \gmu@ifstar {\@sverb@chbsl}
  %^^A~ {\gmobeyspaces\frenchspacing\@sverb@chbsl}
  \@sverb@chbsl% It's always with visible spaces.
}

\pdef\nlperc{\newline\narrationmark\ignorespaces}

\pdef\nlpercent{%
  % ^^A   \gmu@ifstar{\def\gmu@tempa{{\tt\xiipercent}}%
  %   ^^A     \@emptify\gmu@tempb
  %   ^^A     \gmd@nlperc}%
  % ^^A  {
  % \chgs{200/12/7 v0.99s starred version discarded as never used and
  %   undocumented}
  % \UnDef
  \@emptify\gmu@tempa
  \def\gmu@tempb{\gmboxedspace}%
  \gmd@nlperc
  % ^^A}
}

\pdef\incs{% an in-line \cs{cs}
  % \changes{v0.99m}{008/08/07}{added}
  % \chgs{200/12/7 v0.99s starred version discarded as never used and
  %   undocumented}
  % ^^A   \gmu@ifstar{\def\gmu@tempa{{\tt\xiipercent}}%
  %   ^^A     \@emptify\gmu@tempb
  %   ^^A     \gmd@nlperc\cs}%
  % ^^A   {
  % \UnDef
  \@emptify\gmu@tempa
  \def\gmu@tempb{\gmboxedspace}%
  \gmd@nlperc\cs
  % ^^A}
}

\def\inenv{\incs[]}% an in-line \cs{env}

\def\incmd{% it has to be |\def| to let it expand to let \incmd\cmd\
           % convert its argument to a~safe string.
           \nlpercent\cmd}

\def\inhash{\nlpercent\hash}


\@xa\ampulexdef\csname\@dc@InnerName\cs\endcsname
[#1] [#1] {\begingroup} {\ifdefined}
{\begingroup \def\+{\discre{\gmv@hyphen}{\narrationmark}{}}%
  \ifdefined}


\providecommand*\ds{DocStrip}


\newcommand*\CDAnd{\CodeDelim\&}

\newcommand*\CDPerc{\CodeDelim\%}

\let\division=\section

\let\subdivision=\subsection

\let\subsubdivision=\subsubsection
\newcounter{gmd@mc}

\def\gmd@mchook{\stepcounter{gmd@mc}% \label{gmd@mchook}
  \gmd@mcdiag
  \ifcsname gmd@mchook\the\c@gmd@mc\endcsname
  \afterfi{\csname gmd@mchook\the\c@gmd@mc\endcsname}%
  \fi}

\long\def\AfterMacrocode#1#2{\@namedef{gmd@mchook#1}{#2}}

\@emptify\gmd@mcdiag

\def\mcdiagOn{\def\gmd@mcdiag{%
    \typeout{^^J\bslash end{\gmd@lastenvir} No.\the\c@gmd@mc
    \space\on@line, cln.\the\c@codelinenum.}}}

\def\mcdiagOff{\@emptify\gmd@mcdiag}
\DeclareEnvironment{enumargs}{o}%\
{%
  \StraightEOL
  \if@aftercode
    \edef\gmu@tempa{\the\leftskip}%
    \edef\gmu@tempb{\the\hangindent}%
  \fi
  \enumerate
  \if@aftercode
    \leftskip=\glueexpr\gmu@tempa+\gmu@tempb\relax
  \fi
  \edef\gmd@ea@hashes{%
    \#\ifcase\IfValueTF{#1}{#1}{1}\relax
    \or\or\#\or\or\#\#\#\fi}%
  %\stanza
  \@namedef{label\@enumctr}{%
    \env{\if@aftercode\narrationmark\fi
      \relax% to stop |\ignorespaces|
      \gmd@ea@bwrap
      \gmd@ea@hashes
      \csname the\@enumctr\endcsname
      \gmd@ea@ewrap}}% of |\label⁄<@enumctr>|.
  \let\mand\item
  \provide\gmd@ea@wraps{%
    \emptify\gmd@ea@ewrap
    \emptify\gmd@ea@bwrap}%
  \gmd@ea@wraps
  \def\opt{%\HideDef
    \def\gmd@ea@bwrap{[}\def\gmd@ea@ewrap{]}%
  \item
    \gmd@ea@wraps}%
  %\stanza
  \settowidth{\@tempdima}{\narrativett x\gmd@ea@hashes7x}%
  \edef\gmd@ea@xxxwd{\the\@tempdima}%
  %\stanza
  \DeclareCommand\dc !{%
    Q{*>} % (1) we check whether there's a~sergeant right of the prefix or
          % a~star to suppress parentheses,
    Q{P!lL\long iI} % (2) an optional ‘bare’ prefix for a~‘long’ argument
    % or for ignored
    b %  (3) prefix(es) in curly braces
    % ( % This way we allow the prefix(es) to be braced or not
    % at the author's option),
    >\@xa T{\@dc@argtypes} % (4)  (optional) argument type
    % specifier,
    b %  (5) (optional) default value of the specified argument or
      %  (for |K| and |G|) mandatory.
    b % (6) default of |K| and |G|.
  }{%
     \gmu@ifxany *{##1}%
    {% a~|*| suppresses bracket/brace/parentheses decoration.
      \def\gmd@ea@bwrap{\hbox to \gmd@ea@xxxwd\bgroup\hss}%
      \def\gmd@ea@ewrap{\hss\egroup}%
    }%
    {% if there's no |*| in \hash1, be wrap the item label in
     % braces/brackets/parentheses.
      \gmu@ifxany ##4{bB}{% I~decide not to print |m| type
        % arguments in braces because the braces are not mandatory for
        % this type.
        \def\gmd@ea@bwrap{\{}%
        \def\gmd@ea@ewrap{\}}%
      }{}%
      \gmu@ifxany ##4{cC}{%
        \def\gmd@ea@bwrap{(}%
        \def\gmd@ea@ewrap{)}%
      }{}%
      \gmu@ifxany ##4{oO}{%
        \def\gmd@ea@bwrap{[}%
        \def\gmd@ea@ewrap{]}%
      }{}%
      \gmu@ifxany ##4{G}{%
        \def\gmd@ea@bwrap{\detokenize\@xa{\@firstoftwo##5}}%
        \def\gmd@ea@ewrap{\detokenize\@xa{\@secondoftwo##5}}%%
      }{}%
      \gmu@ifxany ##4{A}{%
        \def\gmd@ea@bwrap{<}%
        \def\gmd@ea@ewrap{>}%
      }{}%
    }% of if no |*| in \hash1.
    \gmu@ifxany ##4{mQsSTK\afterassignment}{%
      \def\gmd@ea@bwrap{\hbox to \gmd@ea@xxxwd\bgroup\hss}%
      \def\gmd@ea@ewrap{\hss\egroup}%
    }{}%
    % we add a~normal space
    \addtomacro\gmd@ea@ewrap{{\normalfont\ }}%
    \IfValueT{##2}{%
      \addtomacro\gmd@ea@ewrap{>\{\string##2\}}}%
    \IfValueT{##3}{%
      \addtomacro\gmd@ea@ewrap{>\{##3\}}}%
    \IfValueT{##4}{%
      \ifx s##4%
        \addtomacro\gmd@ea@ewrap{%
          \llap{\metachar[}\scanverb{*}\metachar]}%
      \else\addtomacro\gmd@ea@ewrap{##4}%
      \fi}%
    \IfValueT{##5}{%
      \addtomacro\gmd@ea@ewrap{\{%
        %\nostanza|%\ttverbatim| breakable chars won't work because we are in
        % the item's label's \incmd\hbox. \nostanza
        \scanverb*{##5}%
        \}}}%
    \IfValueT{##6}{%
      \addtomacro\gmd@ea@ewrap{\{%
        %\nostanza|%\ttverbatim| breakable chars won't work because we are in
        % the item's label's \incmd\hbox. \nostanza
        \scanverb*{##6}%
        \}}}%
    \def\gmd@blubra{%
      \addtomacro\gmd@ea@bwrap{%
        \begingroup
        \relaxen\gmd@ea@hashes
        \@namedef{the\@enumctr}{\<ign.>}%
      }%
      \prependtomacro\gmd@ea@ewrap{%
        \endgroup}%
      \addtomacro\gmd@ea@ewrap{%
        \global \advance \csname c@\@enumctr\endcsname \m@ne
      }%
      \emptify\gmd@blubra
    }%
    \gmu@ifsbintersect {##2}{Ii}{\gmd@blubra}{}%
    \gmu@ifsbintersect {##3}{Ii}{\gmd@blubra}{}%
    \gmu@ifxany ##4{\afterassignment}{\gmd@blubra}{}%
  \item\relax}%
  % \stanza
    \IfNoValueT{#1}{\@ifnextac\@gobble{}}% to gobble a~possible active line end or
    % active \hathat{A} or \hathat{B} that might
    % have occurred because of \incmd\futurelet\ of the optional
    % argument checker.
  }% of begin definition \ResumeDef
{\endenumerate}

\newenvironment*{enumargs*}{%
  \def\gmd@ea@wraps{% \HideDef
    \def\gmd@ea@bwrap{ }\def\gmd@ea@ewrap{ }}% \ResumeDef
  \enumargs}{\endenumargs}


\def\CharacterTable{\begingroup
  \@makeother\{\@makeother\}%
  \Character@Table}

\foone{%
  \catcode`\[=1 \catcode`\]=2 %
  \@makeother\{\@makeother\}}%
[
  \def\Character@Table#1{#2}[\endgroup
     \message[^^J^^J gmdoc.sty package:^^J
     ==== The input file contains the \bslash CharacterTable.^^J
     ==== If you really need to check the correctness of the chars,^^J
     ==== please notify the author of gmdoc.sty at the email address^^J
     ==== given in the legal notice in gmdoc.sty.^^J^^J]%
     %^^A~\gmd@countlines[#1]\gmd@countlines[#2]
  ]]
\outer\def\DescribeMacro{%
  \@bsphack
  \begingroup\MakePrivateLetters
  \gmd@ifonetoken\Describe@Macro\Describe@Env}
\outer\def\DescribeEnv{%
  \@bsphack
  \begingroup\MakePrivateOthers\Describe@Env}

\outer\def\Describe{% It doesn't typeset its argument in the point of
  % occurrence.
  \leavevmode
  \@bsphack
  \begingroup\MakePrivateLetters
  \gmu@ifstar{\MakePrivateOthers\Describe@Env}{\Describe@Macro}}

\long\def\Describe@Macro#1{%
  \endgroup
  \strut\Text@Marginize*{#1}%
  \@usgentryze#1% we declare kind of formatting the entry
  \text@indexmacro#1%
  \@esphack}

\def\Describe@Env#1{%
  \endgroup
  \strut\Text@Marginize*{#1}%
  \@usgentryze{#1}% we declare the `usage' kind of
  % formatting the entry and index the sequence |#1|.
  \text@indexenvir{#1}%
  \@esphack}


\let\MacroFont\tt

\let\MacroIndent\CodeIndent
\let\MacrocodeTopsep\CodeTopsep
\let\SpecialEscapechar\CodeEscapeChar


\AtEndInput{\@ifundefined{theCodelineNo}{}{\PackageInfo{gmdoc}{The
      \string\theCodelineNo\space macro has no effect here, please use
      \string\LineNumFont\space for setting the font and/or
      \string\thecodelinenum\space to set the number format.}}}
\def\noeffect@info#1{\@ifundefined{#1}{}{\PackageInfo{gmdoc}{^^J%
      The \bslash#1 macro is not supported by this package^^J
      and therefore has no effect but this notification.^^J
      If you think it should have, please contact the maintainer^^J
      indicated in the package's legal note.^^J}}}

\AtEndInput{%
  \noeffect@info{PrintDescribeMacro}%
  \noeffect@info{PrintMacroName}%
  \noeffect@info{PrintDescribeEnv}%
  \noeffect@info{PrintEnvName}}

\def\CodelineNumbered{\AtBeginDocument{\gag@index}}
\@onlypreamble\CodelineNumbered
\let\CodelineIndex\@pageindexfalse
\@onlypreamble\CodelineIndex

\let\PageIndex\@pageindextrue
\@onlypreamble\PageIndex

\def\DisableCrossrefs{\@bsphack\gag@index\@esphack}

\def\EnableCrossrefs{\@bsphack\ungag@index
  \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
\newcommand*\AlsoImplementation{\@bsphack
  \long\def\StopEventually##1{\gdef\Finale{##1}}% we define
  % \incs{Fi\+n\+a\+le} just to expand to the argument of \incs{StopEventually} not
  % to to add anything to the end input hook because \incs{Finale} should
  % only be executed if entire document is typeset.\nostanza\par
  %
  % \hangindent\verbatimhangindent \hangafter1\relax
  % \gmdnoindent \leftskip\CodeIndent
  % |%\init@checksum| is obsolete in
  % \pk{gmdoc} at this point: the \env{CheckSum} counter is reset just at
  % the beginning of (each of probably numerous) input(s).
  % \nostanza\par
    \@esphack}

\AlsoImplementation


\def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
    % \begin{quotation} In this case the argument of |\StopEventually|
    %   should be set and afterwards \TeX\ should stop reading from
    %   this file. Therefore we finish this macro with\end{quotation}
    ##1ⵢendinput}\@esphack}


\@relaxen\Finale

\let\SpecialMainIndex=\DefIndex

\def\SpecialMainEnvIndex{\csname CodeDefIndex\endcsname*}% we don't

\let\SpecialIndex=\CodeCommonIndex

\let\SpecialUsageIndex=\TextUsgIndex

\def\SpecialEnvIndex{\csname TextUsgIndex\endcsname*}

\def\SortIndex#1#2{\index{#1\actualchar#2}}
\def\verbatimchar{&}



\@ifundefined{main}{}{\let\DefEntry=\main}

\@ifundefined{usage}{}{\let\UsgEntry=\usage}

\newcounter{StandardModuleDepth}

\noeffect@info{DocstyleParms}

\@emptify\DontCheckModules \noeffect@info{DontCheckModules}
\@emptify\CheckModules \noeffect@info{CheckModules}
\@emptify\AltMacroFont \noeffect@info{AltMacroFont}

\def\MakePercentIgnore{\catcode`\%9\relax}
\def\MakePercentComment{\catcode`\%14\relax}
\def\OldDocInput{% \changes{v0.99g}{2007/11/11}{obsolete redefinition
  % of the \env{macro} environment removed}
  \AtBegInputOnce{\StraightEOL
    \let\@MakeShortVerb=\old@MakeShortVerb
    % \label{oldmkshvrrb}
    \OldMacrocodes}%
  \bgroup\@makeother\_% it's to allow |_| in the filenames. The next
  % macro will close the group.
  \Doc@Input}
%% \AVerySpecialMacro % delete the first % when.\unskip|..|\CDPerc

\DeclareCommand\OCRInclude{O{}mO{}}{%
  \Store@Macro\incl@DocInput
  \def\incl@DocInput##1{%
    \begingroup
    \CodeSpacesBlank
    \@beginputhook
    \title{\currentfile}\maketitle
    \noverbatimspecials
    \relaxen\@xverbatim
    \relaxen\check@percent
    \Restore@Macro\@verbatim
    \verbatimleftskip\z@skip
    \verbatim
    \@makeother\|% because |\ttverbatim| doesn't do that.
    \texcode@hook% we add some special stuff, e.g.\ in \pk{gmdocc.cls} we
    \@input{##1}%
    \endgroup}%
  \csname\@dc@InnerName\DocInclude\endcsname{#1}{#2}{#3}%
  \Restore@Macro\incl@DocInput
}


\foone{\catcode`\^^M\active }{%
  \def\@NoEOF#1^^M{%
    \@relaxen\EOFMarkⵢendinput}%
  \def\@EOF#1^^M{ⵢendinput}}

\def\NoEOF{\QueerEOL\@NoEOF}
\def\EOF{\QueerEOL\@EOF}
\endinput
%%
%% End of file `gmdoc.sty'.