summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/enumext/enumext.dtx
blob: ea8cc0f159f4df5a0570acadccda81a62cbe1d07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
% \iffalse meta-comment
% arara: lualatex: { branch: developer, draft: true }
% arara: clean: { files: [ enumext-01.pdf, enumext-02.pdf, enumext-03.pdf, enumext-04.pdf, enumext-05.pdf ] }
% arara: lualatex: { branch: developer, shell: true }
% arara: clean: { extensions: [ aux, log, out, glo, gls, hd, ind, ilg, idx, toc, atfi ] }
% arara: clean: { files: [ userdoc.idx, userdoc.ilg, userdoc.ind ] }
% arara: halt
%
% File: enumext.dtx
%
% Copyright (C) 2024 by Pablo González L <pablgonz@educarchile.cl>
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3c of this license or (at
% your option) any later version. The latest version of this license is in
%
%    https://www.latex-project.org/lppl.txt
%
% and version 1.3c or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
%
% This work is "maintained" (as per the LPPL maintenance status)
% by Pablo González Luengo.
%
% This work consists of the files enumext.dtx and enumext.sty.
%
% \fi
%
% \iffalse
%<*driver>
\documentclass[full]{l3doc}
% Remove `"` and `|` for short verbatim defined in l3doc, then set short |...|
\AtBeginDocument
  {
    \DeleteShortVerb \"
    \DeleteShortVerb \|
    \lstMakeShortInline[language=enumext-doc,basicstyle=\ttfamily]\|
  }
% imakeidx also opens a write stream for the .idx file, and that conflicts
% with the one opened by l3doc. Here we close that write stream:
\makeatletter
\immediate\closeout\@indexfile
\makeatother
% and later we will copy the write stream opened by imakeidx into \@indexfile
% so that entries written to both streams end up in the same file.
\usepackage[english]{babel}
\usepackage[top=0.5in,bottom=0.3in,left=1.70in,right=0.7in,footskip=0.2in,headheight=1cm,headsep=0.27cm]{geometry}
\usepackage[osf,nomath,mono=false,ScaleSF=0.95,ScaleRM=0.95]{libertinus-otf}
% Set Monospace font, fix 'quotes' in verbatim
\usepackage{sourcecodepro}
\defaultfontfeatures[\ttfamily]
  {
    Numbers   = OldStyle,
    Scale     = 0.84249,
    Extension = .otf,
  }
\setmonofont[
    UprightFont    = *-Regular,
    ItalicFont     = *-RegularIt,
    BoldFont       = *-Semibold,
    BoldItalicFont = *-SemiboldIt,
    RawFeature     = {+zero,+ss01}]{SourceCodePro}
\newfontfamily\mysourcecodeprolight{SourceCodePro-Regular.otf}[
    Scale = 0.80,FakeStretch =0.75,
    FontFace = {m}{it}{Font =SourceCodePro-RegularIt.otf,Color=FF0000}]
\RenewDocumentCommand{\MacroLongFont}{}
  {
    \mysourcecodeprolight\small
  }
% The character of visible space is now taken from Latin Modern Mono
% to prevent fonts in T1. The original definition for xetex/luatex is
% \def\verbvisiblespace{\usefont{OT1}{cmtt}{m}{n}\asciispace}
\def\verbvisiblespace{{\fontfamily{lmtt}\selectfont\char"2423}}

\usepackage{unicode-math}
\setmathfont[Scale = 0.95]{latinmodern-math.otf}
\usepackage{fontawesome5}
\newfontfamily\fetamontotf{ffmw10.otf}[
   Scale             = 0.95,%
   RawFeature        = {+latn,+rand,+kern,+size},%
   FontFace          = {b}{n}{ffmw10.otf},% fix replace font
   ]
\usepackage[svgnames]{xcolor}
\usepackage[sf,bf,compact,medium,pagestyles]{titlesec}
\usepackage{lastpage,microtype,attachfile2}
\usepackage{adjustbox,multicol,listings,accsupp,titletoc}
\usepackage{imakeidx,tikz,enumext} % main
\usepackage{scontents}
\usepackage{shellesc}
\usepackage[contents]{colordoc}
% \show\docCodelineNo
\def\textnew#1{\color{color-def}#1\/}
\def\AltMacroFont{\fontencoding\encodingdefault
                  \fontfamily\ttdefault
                  \fontseries\mddefault
                  \fontshape\updefault
                  \small
                  }%
% Patching colordoc.sty to work with l3doc.cls
\ExplSyntaxOn
\cs_new_eq:cN { liii@xmacro@code } \__codedoc_xmacro_code:n
\ExplSyntaxOff
\begingroup
\makeatletter
\catcode`\[\@ne\catcode`\]\tw@
\@makebracesactive
\gdef{[\@openingbrace[\char'173]]
\gdef}[\@closingbrace[\char'175]]
\catcode`\|\z@\catcode`\%12
\catcode`\ \active\catcode`\\\active
|gdef|xmacro@code#1%    \end{macrocode}[|liii@xmacro@code[#1]|end[macrocode]]
|catcode`| 12|gdef|sxmacro@code#1%    \end{macrocode*}[|liii@xmacro@code[#1]|end[macrocode*]]
|endgroup
% Patching colordoc.sty to work with doc v3 (TeX Live 2023 & lualatex-dev)
\usepackage{etoolbox}
\makeatletter
\@ifpackagelater{doc}{2022-06-01}%
  {\patchcmd\macro@finish
    {\ifnot@excluded % \if
      \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
      \@tempa \fi}%
    {\maybe@index@macro \macro@namepart}
    {}{\FAILED}%
   \let\default@color\current@color
  }%
  {}
\makeatother

\EnableCrossrefs
% \PageIndex, \CodelineIndex undoes what \PageIndex does
% \CodelineIndex tries to open another write stream for the index file. We don't
% want that, so we temporarily make \makeindex a no-op:
\let\ORGmakeindex\makeindex
\def\makeindex{}
\CodelineIndex
\let\makeindex\ORGmakeindex
\DoNotIndex{\ , \1,\^}
\expandafter\DoNotIndex\expandafter{\string\{}
\expandafter\DoNotIndex\expandafter{\string\}}
\expandafter\DoNotIndex\expandafter{\string\begin}
\newcommand{\HP}[1]{\emph{\hyperpage{#1}}\normalsize}
\ExplSyntaxOn
\cs_new_protected:Npn \StartImplementation
  { \bool_set_true:N \l__codedoc_in_implementation_bool }
\bool_set_false:N \l__codedoc_in_implementation_bool
\cs_new_protected:Npn \MYSortIndex #1 #2
  {
    \bool_if:NTF \l__codedoc_in_implementation_bool
      { \index{#1\actualchar#2|HP} }
      { \index[userdoc]{#1\actualchar#2|HP} }
  }
\ExplSyntaxOff
% imakeidx config
\indexsetup{level=\section,firstpagestyle=myheader,othercode=\pagestyle{myheader}}
\makeindex[name=userdoc,options={-q -s gind.ist},columnsep=15pt,title={Index of Documentation}]
\makeindex[options={-q -s gind.ist},columnsep=15pt,title={Index of Implementation}]
% Now, after imakeidx opens the write stream for the index file, we copy
% the reference to \@indexfile:
\makeatletter
\expandafter\let\expandafter\@indexfile\csname \jobname @idxfile\endcsname
\makeatother
% Set \parindent
\setlength{\parindent}{0pt}
% Colors
\definecolor{optcolor}{rgb}{0.281,0.275,0.485}
\definecolor{pkgcolor}{rgb}{0,0.5,0.5}
\definecolor{araracolor}{rgb}{0, 0.72, 0.28}
\definecolor{linkcolor}{rgb}{0.04,0.38,0.04}
\definecolor{rulecolor}{rgb}{0.96,0.96,0.96}
% Only for arara... I like arara :)
\usepackage[scale=0.85]{comfortaa}
\newcommand{\araratext}[1]{{\small\normalfont\comfortaa\color{araracolor}\bfseries#1}}
\newcommand*\arara{\araratext{ar\kern-.03emar\kern-.03ema}}
% User level commands
\ExplSyntaxOn
% Logo
\NewDocumentCommand{\pkglogo}{}
  {
    \group_begin:
      \LibertinusSansOsF{\textcolor{pkgcolor}{enum}\textcolor{OrangeRed}{ext}}
    \group_end:
  }
% Custom \meta[...]{...}, \marg[...]{...} and \oarg[...]{...} with color
\NewDocumentCommand{\mymeta}{O{}m}
  {
    \userdoc_meta_generic:Nnn \userdoc_meta:n { #1 } { #2 }
  }
\NewDocumentCommand{\mymarg}{O{}m}
  {
    \userdoc_meta_generic:Nnn \userdoc_marg:n { #1 } { #2 }
  }
\NewDocumentCommand{\myoarg}{O{}m}
  {
    \userdoc_meta_generic:Nnn \userdoc_oarg:n { #1 } { #2 }
  }
\NewDocumentCommand{\myparg}{O{}m}
  {
    \userdoc_meta_generic:Nnn \userdoc_parg:n { #1 } { #2 }
  }
% Variables and keys
\tl_new:N \l_userdoc_meta_font_tl
\keys_define:nn { userdoc / mymeta }
  {
    type .choice:,
    type / tt .code:n = \tl_set:Nn \l_userdoc_meta_font_tl { \ttfamily },
    type / rm .code:n = \tl_set:Nn \l_userdoc_meta_font_tl { \rmfamily },
    type .initial:n   = tt,
    cf .tl_set:N      = \l_userdoc_meta_color_tl,
    cf .initial:n     = optcolor,
    ac .tl_set:N      = \l_userdoc_meta_anglecolor_tl,
    ac .initial:n     = lightgray,
    sbc .tl_set:N     = \l_userdoc_meta_brackcolor_tl,
    sbc .initial:n    = gray,
    cbc .tl_set:N     = \l_userdoc_meta_bracecolor_tl,
    cbc .initial:n    = gray,
    pbc .tl_set:N     = \l_userdoc_meta_parencolor_tl,
    pbc .initial:n    = gray,
  }
% Internal commands
\cs_new_protected:Npn \userdoc_meta_generic:Nnn #1 #2 #3
  {
    \group_begin:
    \keys_set:nn { userdoc / mymeta } { #2 }
    \color{ \l_userdoc_meta_color_tl }
    \l_userdoc_meta_font_tl
    #1 { #3 } % #1 is \userdoc_meta:n, \userdoc_marg:n or \userdoc_oarg:n
    \group_end:
  }
\cs_new_protected:Npn \userdoc_meta:n #1
  {
    \userdoc_meta_angle:n { \textlangle }
    \userdoc_meta_meta:n { #1 }
    \userdoc_meta_angle:n { \textrangle }
  }
\cs_new_protected:Npn \userdoc_marg:n #1
  {
    \userdoc_meta_brace:n { \textbraceleft }
    \userdoc_meta:n { #1 }
    \userdoc_meta_brace:n { \textbraceright }
  }
\cs_new_protected:Npn \userdoc_oarg:n #1
  {
    \userdoc_meta_brack:n { [ }
    \userdoc_meta:n { #1 }
    \userdoc_meta_brack:n { ] }
  }
\cs_new_protected:Npn \userdoc_parg:n #1
  {
    \userdoc_meta_brace:n { ( }
    \userdoc_meta:n { #1 }
    \userdoc_meta_brace:n { ) }
  }
\cs_new_protected:Npn \userdoc_meta_meta:n #1
  {
    \textnormal{\textit{#1}}
  }
\cs_new_protected:Npn \userdoc_meta_angle:n #1
  {
    \group_begin:
    \fontfamily{lmr}\selectfont
    \textcolor{\l_userdoc_meta_anglecolor_tl}{#1}
    \group_end:
  }
\cs_new_protected:Npn \userdoc_meta_brace:n #1
  {
    \group_begin:
    \color{\l_userdoc_meta_bracecolor_tl}
    #1
    \group_end:
  }
\cs_new_protected:Npn \userdoc_meta_brack:n #1
  {
    \textcolor{\l_userdoc_meta_brackcolor_tl}{#1}
  }
% Rewrite \textborn | textasteriskcentered
\DeclareTextSymbol{\textbornstd}{TS1}{98}
\UndeclareTextCommand{\textborn}{TS1}
\makeatletter
\DeclareTextCommandDefault{\textbornstd}{\tc@check@symbol2\textbornstd}
\makeatother
\DeclareRobustCommand{\textborn}{{\fontfamily{lmr}\selectfont\textbornstd}}
\newcommand{\oldtextasteriskcentered}{{\fontfamily{lmr}\selectfont\textasteriskcentered}}
% \envexamp{m}
\newsavebox{\boxexaenv}
\tl_new:N \l_tempc_tl
\NewDocumentCommand \envexamp { m }
  {
    \tl_set:Nn \l_tempc_tl { #1 }
    \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tempc_tl
    \begin{lrbox}{\boxexaenv}%
      \begin{minipage}[t]{3\marginparwidth}%
        \raggedright\ttfamily\small
        \textcolor{gray}{\textbackslash begin\{\textcolor{pkgcolor}{{\tl_use:N \l_tempc_tl}}\}\myoarg
        [type=tt,sbc=gray,ac=lightgray,cf=optcolor]{keyval ~ list}}\par%
        \hspace{0.25cm}\ics*{item}\space\mymeta[ac=lightgray,cf=gray]{item ~ content}\par%
        \hspace{0.25cm}\ics*{item}\space\myoarg[sbc=gray,ac=lightgray,cf=optcolor]{custom}\space\mymeta[ac=lightgray,cf=gray]{item ~ content}\par
        \hspace{0.25cm}\ics*{item*}\myoarg[sbc=gray,ac=lightgray,cf=optcolor]{symbol}\myoarg[sbc=gray,ac=lightgray,cf=optcolor]{offset}\space\mymeta[ac=lightgray,cf=gray]{item ~ content}\par
        \textcolor{gray}{\textbackslash end\{{\textcolor{pkgcolor}{{\tl_use:N \l_tempc_tl}}}\}}\par
      \end{minipage}%
    \end{lrbox}%
    \usebox{\boxexaenv}
  }
% \cmdexamp{o m o m o}
\tl_new:N \l_tempd_tl
\NewDocumentCommand \cmdexamp { o m o m o }
  {
    \group_begin:
    \small\ttfamily
    \textcolor{pkgcolor}{\textbackslash#2}
    \IfValueT{#1}{ \textcolor{MediumOrchid}{#1} }
    \IfValueT{#3}
      {
        % \textnormal{\ttfamily } or \c{texttt}\cB\{  \cE\}
        \tl_set:Nn \l_tempd_tl { #3 }
        % \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tempd_tl
        \regex_replace_once:nnN { (\*) } { \c{texttt}\cB\{\c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} \cE\} } \l_tempd_tl
        \myoarg[type=tt,sbc=gray,ac=lightgray,cf=optcolor]{\tl_use:N \l_tempd_tl}
      }
    \IfValueTF{#5}
      {
        \mymeta[ac=gray,type=tt,cf=MediumOrchid]{#5}%
        \mymeta[type=tt,ac=gray,cf=optcolor]{#4}
        \mymeta[ac=gray,type=tt,cf=MediumOrchid]{#5}%
      }
      { \mymarg[type=tt,cbc=gray,ac=lightgray,cf=optcolor]{#4} }
    \par
    \group_end:
  }
% \keyexamp{s m m m}
\NewDocumentCommand \keyexamp{s m m m }
  {
    \adjustbox{outer=-\marginparsep}{\textcolor{optcolor}{\small\ttfamily{#2}}}
    \IfBooleanTF{#1}
      {
        \hphantom{\textcolor{white}{\,\bfseries\texttt{=}}\,{}}
        \mymeta[type=tt,cbc=gray,ac=lightgray,cf=lightgray]{\small{#3}}
      }
      {
        \textcolor{gray}{\,\bfseries\texttt{=}}\,{}
        \mymarg[type=tt,cbc=gray,ac=lightgray,cf=optcolor]{\small{#3}}
      }
    \hfill\textcolor{gray}{\small\textsf{default}:~\emph{#4}}\par%
    \MYSortIndex{Keys}{Keys ~ for ~ environments ~ provide ~ by ~ \pkglogo :>\texttt{#2}}
  }
% \keyexampcmd{s m m m o}
\NewDocumentCommand \keyexampcmd{s m m m o}
  {
    \adjustbox{outer=-\marginparsep}{\textcolor{optcolor}{\small\ttfamily{#2}}}
    \IfBooleanTF{#1}
      {
        \hphantom{\textcolor{white}{\,\bfseries\texttt{=}}\,{}}
        \mymeta[type=tt,cbc=gray,ac=lightgray,cf=lightgray]{\small{#3}}
      }
      {
        \textcolor{gray}{\,\bfseries\texttt{=}}\,{}
        \mymarg[type=tt,cbc=gray,ac=lightgray,cf=optcolor]{\small{#3}}
      }
    \hfill\textcolor{gray}{\small\textsf{default}:~\emph{#4}}\par%
    \IfValueTF{#5}
      {
        \MYSortIndex{Keys}{Keys ~ for ~ \texttt{\textbackslash{}#5} ~ provide ~ by ~ \pkglogo :>\texttt{#2}}
      }
      {
        \MYSortIndex{Keys}{Keys ~ for ~ \texttt{\textbackslash{}anskey} ~ provide ~ by ~ \pkglogo :>\texttt{#2}}
        \MYSortIndex{Keys}{Keys ~ for ~ \texttt{anskey\textcolor{MediumOrchid}{*}} ~ provide ~ by ~ \pkglogo :>\texttt{#2}}
      }
  }
% \keyexampenv{s m m m}
\NewDocumentCommand \keyexampenv{s m m m }
  {
    \adjustbox{outer=-\marginparsep}{\textcolor{optcolor}{\small\ttfamily{#2}}}
    \IfBooleanTF{#1}
      {
        \hphantom{\textcolor{white}{\,\bfseries\texttt{=}}\,{}}
        \mymeta[type=tt,cbc=gray,ac=lightgray,cf=lightgray]{\small{#3}}
      }
      {
        \textcolor{gray}{\,\bfseries\texttt{=}}\,{}
        \mymarg[type=tt,cbc=gray,ac=lightgray,cf=optcolor]{\small{#3}}
      }
    \hfill\textcolor{gray}{\small\textsf{default}:~\emph{#4}}\par%
    \MYSortIndex{Keys}{Keys ~ for ~ \texttt{anskey\textcolor{MediumOrchid}{*}} ~ provide ~ by ~ \pkglogo :>\texttt{#2}}
  }
% \mykey{m}
\NewDocumentCommand \mykey{ m }
  {
    \tl_set:Nn \l_tmpa_tl { #1 }
    \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \textcolor{optcolor}{\ttfamily \tl_use:N \l_tmpa_tl }
    %\textcolor{optcolor}{\texttt{#1}}
    \MYSortIndex{Keys}{Keys ~ for ~ environments ~ provide ~ by ~ \pkglogo :>\texttt{\tl_use:N \l_tmpa_tl}}
  }
% \mykeycmd{o s m}
\NewDocumentCommand \mykeycmd{ o s m }
  {
    \tl_set:Nn \l_tmpa_tl { #3 }
    \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \textcolor{optcolor}{\ttfamily \tl_use:N \l_tmpa_tl }
    %\textcolor{optcolor}{\texttt{#1}}
    \IfBooleanTF{#2}
      {
        \MYSortIndex{Keys}{Keys ~ for ~ \texttt{anskey\textcolor{MediumOrchid}{*}} ~ provide ~ by ~ \pkglogo :>\texttt{\tl_use:N \l_tmpa_tl}}
      }
      {
        \IfValueTF{#1}
          {
            \MYSortIndex{Keys}{Keys ~ for ~ \texttt{\textbackslash{}#1} ~ provide ~ by ~ \pkglogo :>\texttt{\tl_use:N \l_tmpa_tl}}
          }
          {
            \MYSortIndex{Keys}{Keys ~ for ~ \texttt{\textbackslash{}anskey} ~ provide ~ by ~ \pkglogo :>\texttt{\tl_use:N \l_tmpa_tl}}
            \MYSortIndex{Keys}{Keys ~ for ~ \texttt{anskey\textcolor{MediumOrchid}{*}} ~ provide ~ by ~ \pkglogo :>\texttt{\tl_use:N \l_tmpa_tl}}
          }
      }
  }
% \mypkg{sm}
\NewDocumentCommand \mypkg { s m }
  {
    \group_begin:
    \IfBooleanTF{#1}
      {
        \pkglogo
        \MYSortIndex{packages}{Packages :>\texttt{#2}}
      }
      {
        \textcolor{OrangeRed}{\texttt{#2}}%
        \MYSortIndex{packages}{Packages :>\texttt{#2}}%
      }
     \group_end:
  }
% \myclass{m}
\NewDocumentCommand \myclass { m }
  {
    \mbox{\texttt{\textcolor{OrangeRed}{#1}}}
    \MYSortIndex{class}{Document ~ class :>\texttt{#1}}
  }
% \myenv{sm}
\NewDocumentCommand \myenv { s m O{}}
  {
    \IfBooleanTF{#1}
      {
        \tl_set:Nn \l_tmpa_tl { #2 }
        \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
        \textcolor{pkgcolor}{\ttfamily{\tl_use:N \l_tmpa_tl}}%
        \MYSortIndex{environment}{Environments ~ provide ~ by ~\pkglogo :>\texttt{\tl_use:N \l_tmpa_tl}}
      }
      {
        \textcolor{SlateBlue}{\ttfamily{#2}}%
        \MYSortIndex{environment}{Environments :>\texttt{#2}}
      }
  }
% \ics{sm}
\NewDocumentCommand \ics {s m}
  {
    \IfBooleanTF{#1}
      {
        \tl_set:Nn \l_tmpa_tl { #2 }
        \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
        \regex_replace_once:nnN { (!) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
        \textcolor{pkgcolor}{\ttfamily\textbackslash{\tl_use:N \l_tmpa_tl}}
        \MYSortIndex{Commands}{Commands ~ provide  ~ by ~ \pkglogo :>\texttt{\textbackslash#2}}
      }
      {
        \textcolor{blue!75}{\ttfamily\textbackslash{#2}}
        \MYSortIndex{#2}{\texttt{\textbackslash#2}}
      }
  }
% \icounter{m}
\NewDocumentCommand \icounter { m }
  {
    \textcolor{optcolor}{\ttfamily #1}
    \MYSortIndex{Counters}{Counters ~ defined ~ by ~ \pkglogo :>\texttt{#1}}
  }
% \ilabel{sm}
\NewDocumentCommand \ilabel {s m }
  {
    \tl_set:Nn \l_tmpb_tl { #2 }
    \tl_remove_once:Nn \l_tmpb_tl { . }
    \tl_remove_once:Nn \l_tmpb_tl { ) }
    \tl_remove_once:Nn \l_tmpb_tl { ( }
    \MYSortIndex{Labels}{ Labels ~ provide ~ by ~ \pkglogo :>\texttt{\textbackslash \tl_use:N \l_tmpb_tl }}
    \tl_set:Nn \l_tmpa_tl { #2 }
    \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \regex_replace_once:nnN { (\.) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \regex_replace_once:nnN { (\() } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \regex_replace_once:nnN { (\)) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \tl_put_left:Nn \l_tmpa_tl { \textbackslash }
    \IfBooleanT{#1}
      {
        \tl_put_left:Nn \l_tmpa_tl { \textcolor{MediumOrchid}{ ( } }
      }%
    \textcolor{optcolor}{ \ttfamily \tl_use:N \l_tmpa_tl }
  }
% \mydim{m}
\NewDocumentCommand \mydim { m }
  {
    \tl_set:Nn \l_tmpa_tl { #1 }
    \regex_replace_all:nnN { (\d) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \regex_replace_all:nnN  { (\.) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
    \textcolor{gray}{ \ttfamily \tl_use:N \l_tmpa_tl }
  }
% \myfile{m}
\NewDocumentCommand \myfile { m }
  {
    \group_begin:
      \tl_clear:N \l_tmpa_tl
      \tl_set:Nn \l_tmpa_tl { #1 }
      \regex_replace_all:nnN { (\d) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
      \regex_replace_all:nnN  { (\.) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
      \textcolor{gray}{ \ttfamily \tl_use:N \l_tmpa_tl }
    \group_end:
  }
% \myvarenv{m}
\NewDocumentCommand \myvarenv { s m }
  {
    \group_begin:
      \tl_set:Nn \l_tmpa_tl { #2 }
      \regex_replace_once:nnN { @{2} }{ enumext } \l_tmpa_tl
      \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
      \regex_replace_once:nnN { (\:) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
      \IfBooleanTF{#1}
        {
           \textcolor{pkgcolor}{ \ttfamily \tl_use:N \l_tmpa_tl }
        }
        {
           \tl_put_left:Nn \l_tmpa_tl { \textbackslash }
           \textcolor{gray}{ \ttfamily \tl_use:N \l_tmpa_tl }
        }
    \group_end:
  }
% \aviso
\NewDocumentCommand \aviso { }
  {
    \par\hspace*{-0.5\marginparsep}%
    \makebox[0pt][r]
      {
        \makebox[\marginparsep][r]
          {
            \scriptsize\textcolor{pkgcolor}{\reflectbox{\faIcon{tag}}}% tagged PDF
          }
      }
    \hskip 0.5\marginparsep
  }
% \bomba
\NewDocumentCommand \bomba { }
  {
    \par\hspace*{-0.5\marginparsep}%
    \makebox[0pt][r]
      {
        \makebox[\marginparsep][r]
          {
            \footnotesize\textcolor{pkgcolor}{\faIcon{bomb}}
          }
      }
    \hskip 0.5\marginparsep
  }
\NewDocumentEnvironment{important}{ s }
  {
    \small\sffamily
    \IfBooleanTF{#1}
      {
        \bomba%
      }
      { \aviso }
  }{}

\ExplSyntaxOff
% email https://tex.stackexchange.com/a/663
\catcode`\_=11\relax%
\newcommand\email[1]{\_email #1\q_nil}%
\def\_email#1@#2\q_nil{%
  \href{mailto:#1@#2}{{\emailfont #1\emailampersat #2}}%
}%
\newcommand\emailfont{\sffamily}%
\newcommand\emailampersat{{\color{optcolor}\footnotesize @}}%
\catcode`\_=8\relax%
% Don't copy numbers in code example
\newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}
% Create a language for documentation
\lstdefinelanguage{enumext-doc}{
    texcsstyle    = *,%
    escapechar    =`,%
    extendedchars = true,%
    keepspaces    = true,%
    stringstyle   = {\color{red}},%
    basicstyle    = \ttfamily,% \small
    alsoletter    = {-,.},% @,
% comments
    morecomment   = [l]{\%},%
    commentstyle  = \ttfamily\small\color{lightgray},%
% Important words 1
    keywordstyle  = [1]{\color{gray}},%
    keywords      = [1]{begin,end,Verbatim,env,myseq,false,NewDocumentCommand,newlength, the, red, blue, gray,%
                        settowidth, dimeval, dimexpr, IfBooleanTF,footnotehyper, DocumentMetadata, %
                        IfDocumentMetadataTF, RenewDocumentCommand, pt, em, SuspendTagging, ResumeTagging,%
                    },%
% Other words 2
    keywordstyle  = [2]{\color{blue!75}},%
    keywords      = [2]{usepackage,section,documentclass,input,listparindent,linewidth, emph, textbf,makesavenoteenv, makelabel,%
                    columnseprule, footnote, footnotemark, footnotetext, raggedcolumns, hspace, parindent, removelastskip, %
                    subsection, list,endlist,leftmargin, itemindent,bfseries,endminipage, minipage, parskip, raisebox, strut,smash, % ,
                    labelwidth,labelsep,labelindent,label,ref,topsep,parsep,includegraphics, itemize, description, NewCommandCopy, %
                    multicolsep,leftmargini,leftmarginii, hfill, small, vspace, par, parbox, value, noindent, makebox, textcolor, %
                    itemindent, labelwidth, leftmarginiii,leftmarginiv,itemindent, itemsep, strutbox, raggedright, cs_new_eq, N, NN,%
                    labelwidth, fbox, addvspace, Alph, alph, arabic, Roman, roman, partopsep, baselineskip, mode_leave_vertical,%
                    textborn, textbullet, textendash, textasteriskcentered, textperiodcentered, raggedleft, peek_remove_spaces, skip_horizontal, %
                    triangleright, diamond, circ, parleft, star, centering, ast, hyperlink,hypertarget,IfHyperBoolean,newtheorem, %
                    aux_i, aux_ii, aux_iii, w, n, N, if@noitemarg, if, if@hyper@item, hyper, noitemarg, skip_vertical, },%
% Other words 3
    keywordstyle  = [3]{\color{optcolor!85}},%
    keywords      = [3]{document,article,setlength,pagestyle,definecolor, chapter,},%,
% Reserved words 4 (enumext pkg)
    keywordstyle  = [4]{\color{pkgcolor}},%
    keywords      = [4]{enumext,keyans,keyanspic, getkeyans, anskey, anspic, item, anskey*, itemwidth, enumextmeta, %
                    setenumext,printkeyans,miniright,labelbx, mywrap, descitemwd,theenumXi,theenumXii,theenumXiii,%
                    setenumextmeta, foreachkeyans, theenumXiv,theenumXv, theenumXvii, theenumXviii},%
% Reserved words 5 (plain TeX or internal)
    keywordstyle  = [5]{\color{red}},%
    keywords      = [5]{makeatletter,makeatother,let,verb,def,prevdepth,glue, if@minipage,% if@noitemarg
                    splittopskip,showboxdepth,topskip,showoutput,nointerlineskip, ignorespaces, unskip, unkern, lastnodetype,%
                    rightskip, @rightskip, @flushglue, hbadness, hss},%
% Reserved words 6 (optcolor) KEYS
    keywordstyle  = [6]{\color{optcolor}},%
    keywords      = [6]{save-ans,wrap-ans,save-ref,show-pos,show-ans,columns,list-offset, eunumXi,%
                    nosep,before,after,start, right, item-sym, item-sep, hyperfootnotes, item-star, %
                    scale,wrap-label,font,first,widest,mini-env,list-indent, no-store, save-key,%
                    store-env, print-env, write-out, force-eol, write-env, overwrite, unknown, base-fix,%
                    midsep, wrapper,label-pos,label-sep, layout-sty, layout-sep, layout-top, lang,%
                    pdfversion, pdfstandard, testphase, alt, mark-sep, wrap-ans*, mark-ans, mark-sep},%
% Reserved words 7 (label values)
    keywordstyle  = [7]{\color{MediumOrchid}},%
    keywords      = [7]{m,s,M,VIII,viii,v,E,t,l,A,XXIII,true, false,test,sample,above,below,ua-2,phase-III,%
                    en-US, math, title, table, firstaid  },%
% literate
    literate      =*{\{}{{{\color{gray}{\char`\{}}}}{1}
                    {\}}{{{\color{gray}{\char`\}}}}}{1}
                    {\|}{{{\color{gray}{\char`\|}}}}{1}
                    {\$}{{{\color{gray}{\char`\$}}}}{1}
                    {\#}{{{\color{optcolor}{\char`\#}}}}{1}
                    {[}{{\textcolor{gray}{[}}}{1}
                    {]}{{\textcolor{gray}{]}}}{1}
                    {,}{{\textcolor{gray}{,}}}{1}
                    {;}{{\textcolor{gray}{;}}}{1}
                    {:}{{\textcolor{red}{:}}}{1}
                    {`}{{\textcolor{gray}{\textasciigrave}}}{1}
                    {\&}{{\textcolor{gray}{\&}}}{1}
                    {>}{{\textcolor{OrangeRed}{\guillemotright}}}{1}
                    {<}{{\textcolor{OrangeRed}{\guillemotleft}}}{1}
                    {*}{{\textcolor{MediumOrchid}{*}}}{1}
                    {!}{{\textcolor{MediumOrchid}{!}}}{1}
                    {@}{{\textcolor{MediumOrchid}{@}}}{1}%
                    {\^}{{\textcolor{optcolor}{\textasciicircum}}}{1}
                    {0}{{\textcolor{MediumOrchid}{0}}}{1}
                    {1}{{\textcolor{MediumOrchid}{1}}}{1}
                    {2}{{\textcolor{MediumOrchid}{2}}}{1}
                    {3}{{\textcolor{MediumOrchid}{3}}}{1}
                    {4}{{\textcolor{MediumOrchid}{4}}}{1}
                    {5}{{\textcolor{MediumOrchid}{5}}}{1}
                    {6}{{\textcolor{MediumOrchid}{6}}}{1}
                    {7}{{\textcolor{MediumOrchid}{7}}}{1}
                    {8}{{\textcolor{MediumOrchid}{8}}}{1}
                    {9}{{\textcolor{MediumOrchid}{9}}}{1}
                    {.0}{{\textcolor{MediumOrchid}{.0}}}{2}% Following is to ensure that only periods
                    {.1}{{\textcolor{MediumOrchid}{.1}}}{2}% followed by a digit are changed.
                    {.2}{{\textcolor{MediumOrchid}{.2}}}{2}
                    {.3}{{\textcolor{MediumOrchid}{.3}}}{2}
                    {.4}{{\textcolor{MediumOrchid}{.4}}}{2}
                    {.5}{{\textcolor{MediumOrchid}{.5}}}{2}
                    {.6}{{\textcolor{MediumOrchid}{.6}}}{2}
                    {.7}{{\textcolor{MediumOrchid}{.7}}}{2}
                    {.8}{{\textcolor{MediumOrchid}{.8}}}{2}
                    {.9}{{\textcolor{MediumOrchid}{.9}}}{2}
                    {=}{{\textcolor{gray}{=}}}{1},%
}[keywords,tex,comments,strings]% end language

% \begin{examplecode}[key=val]...\end{examplecode}
\lstnewenvironment{examplecode}[1][]{%
\lstset{
    language    = enumext-doc,%
    stringstyle = {\color{red}},%
    basicstyle  = \ttfamily\small,%
    columns     = fullflexible,%
    fontadjust  = true,%
    aboveskip   = 8pt,%
    belowskip   = 5pt,%
    rulecolor   = \color{gray!50},%
    framesep    = \fboxsep,%
    framerule   = \fboxrule,%
    xleftmargin = \dimexpr\fboxsep+\fboxrule\relax,%
    xrightmargin= \dimexpr\fboxsep+\fboxrule\relax,%
           #1,%
    }% close lstset
}{\vspace{-\parskip}}% close examplecode
% \lstinline[style=inline]|...|
\lstdefinestyle{inline}
  {
    language    = enumext-doc,%
    upquote     = true,%
    numbersep   = 1em,%
    escapechar  =`,%
    basicstyle  =\ttfamily,%\small
    numberstyle = \tiny\color{lightgray}\noaccsupp,%
    literate    =*{\%}{{\textcolor{gray}{\%}}}{1}
                  {i}{{\textcolor{optcolor}{i}}}{1}
                  {ii}{{\textcolor{optcolor}{ii}}}{2}
                  {iii}{{\textcolor{optcolor}{iii}}}{3}
                  {iv}{{\textcolor{optcolor}{iv}}}{2}
                  {v}{{\textcolor{optcolor}{v}}}{1}
                  {vi}{{\textcolor{optcolor}{vi}}}{1}
  }
% Set default \lstinline style
\lstset{style=inline}
% Get file info
\GetFileInfo{enumext.sty}
% Config hyperref
\hypersetup
  {
    allcolors          = linkcolor,
    colorlinks         = true,
    linktoc            = all,
    pdftitle           = {.:: The enumext package --- \fileinfo{} ::.},
    pdfauthor          = {Pablo González L},
    pdfsubject         = {Documentation for \fileversion{} [\filedate] },
    pdfkeywords        = {worksheets, multiple choice, expl3, l3prop, l3seq, list, enumerate, store answers, tagged},
    bookmarksopenlevel = 2,
  }
% Configuration titleps and titlesec
\settitlemarks{section}
\renewpagestyle{plain}[\color{optcolor}\small\sffamily]{%
\setfoot{\rlap{\hskip\dimexpr-\oddsidemargin-1in\relax%
         \parbox{1.93\paperwidth}{\hfil\thepage\,/\,\pageref{LastPage}}}}%
        {}%
        {}%
}
\newpagestyle{myheader}[\color{optcolor}\small\sffamily]{%
\renewcommand\makeheadrule{%
\rlap{\hskip\dimexpr-\oddsidemargin-1in\relax
      \color{rulecolor}\rule[0.3cm]{\paperwidth}{0.7cm}}\hss
}
\setfoot{\rlap{\hskip\dimexpr-\oddsidemargin-1in\relax%
         \parbox{1.93\paperwidth}{\hfil\thepage\,/\,\pageref{LastPage}}}}%
        {\parbox{\textwidth}{\raggedright \textcolor{gray}{\raisebox{-1pt}{\textcopyright}{}2024 by Pablo González L}}}%
        {}%
\sethead{\llap{\raisebox{0.55cm}{\parbox{\dimexpr\oddsidemargin+1in\relax}{\makebox[0pt][l]{\hspace{15pt}\pkglogo\space\fileversion}}}}}
        {\raisebox{0.55cm}{\parbox{\textwidth}{\hspace*{-\oddsidemargin}\centering\small\S.\thesection\space\sectiontitle}}}%
        {}%
}
\titlecontents{section}[0mm]{}%
    {\bfseries\contentspush{\makebox[5mm][l]{\thecontentslabel\hfill}}}%
    {\hspace*{-5mm}}% numberless
    {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
\titlecontents{subsection}[5mm]{}%
    {\contentspush{\makebox[6mm][l]{\thecontentslabel\hfill}}}
    {\hspace*{-11mm}}% numberless
    {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
\titlecontents{subsubsection}[11mm]{}%
    {\contentspush{\makebox[8mm][l]{\thecontentslabel\hfill}}}
    {\hspace*{-19mm}}% numberless
    {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
% Table of contents
\makeatletter
\renewcommand\tableofcontents{%
\begingroup%
\section*{\contentsname\quad{\color{gray}\leaders\hrule height 5pt depth -4.4pt\hfill}%
  \@mkboth{%
    \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\vspace*{-14pt}
\setlength{\columnsep}{10pt}%
 \begin{multicols}{2}%
    \@starttoc{toc}%
\end{multicols}%
\vspace*{-3pt}{\color{gray}\hrule height 0.6pt}%
\vspace*{5pt}
\endgroup
}
\makeatother
% \thanks
\makeatletter
\renewcommand*{\@fnsymbol}[1]{\ensuremath{\ifcase#1\or \textcolor{pkgcolor}{*}
\or \textcolor{pkgcolor}{\dagger} \or \ddagger\or \mathsection
\or \mathparagraph\or \|\or **\or \dagger\dagger
\or \ddagger\ddagger \else\@ctrerr\fi}}
\makeatother
% \usepackage{lua-visual-debug}
\usepackage[font=small,skip=2pt]{caption}
% For input samples
\usepackage{tikzducks,siunitx,amssymb}
\sisetup{output-decimal-marker={,}}
\newcommand*{\myCircled}[1]{%
  \begin{tikzpicture}[baseline=(number.base)]
    \node[circle, draw=green!10!gray, inner sep=1pt, fill=blue!30!green!10] (number) {#1};
  \end{tikzpicture}%
}
\usetikzlibrary{shapes.geometric}
\newcommand*{\mySquared}[1]{%
  \begin{tikzpicture}[baseline=(number.base),square/.style={regular polygon,regular polygon sides=4}]
    \node[square, rounded corners=1pt, inner sep=1pt, draw=none, fill=gray!40] (number) {\makebox[\height]{#1}};
  \end{tikzpicture}%
}
% For SAT sample
\newsavebox{\satbox}
\sbox\satbox{\small\textbf{67}}%
\NewDocumentCommand \stylesat { m }
  {%
    \setlength{\fboxsep}{2pt}%
    \raisebox{2\fboxsep}{%
    \noindent\colorbox{black}{\textcolor{white}{\makebox[\dimeval{\labelwidth-2\fboxsep}][c]{\small\textbf{\vphantom{67}#1}}}}%
    \colorbox{lightgray}{\phantom{\rule[-\dp\satbox]{\dimeval{\linewidth-2\fboxsep}}{\dimeval{\dp\satbox+\ht\satbox}}}}}%
  }
% For non-numbered list samples, need ´%´ at end (prevent wrong unwanted spaces)
\NewDocumentCommand \labelbx { s +m }
  {%
    \IfBooleanTF{#1}
      {\strut\smash{\parbox[t]{\labelwidth}{\raggedright{#2}}}}%
      {\strut\smash{\parbox[t]{\labelwidth}{\raggedleft{#2}}}}%
  }
% For azetina sample
\newlength{\itemwd}
\settowidth{\itemwd}{\bfseries 10.} % max width
\NewDocumentCommand \rating { }{8.5a, KSC}
\ExplSyntaxOn
\bool_new:N \l_azetina_rating_bool
\NewDocumentCommand \showrating { m }
  {
    \str_case:nn {#1}
      {
        { true  }
                {
                  \bool_set_true:N \l_azetina_rating_bool
                  \setenumext{show-ans=true,save-sep={ }}
                }
        { false }
                {
                  \bool_set_false:N \l_azetina_rating_bool
                  \setenumext{show-ans=false,save-sep={ }}
                }
      }
  }
\NewDocumentCommand \myans { m +m }
  {
    \bool_if:NTF \l_azetina_rating_bool
      {
        \item*[(#1)] \textcolor{red}{#2}
      }
      {
        \item*[(#1)] \textcolor{black}{#2}
      }
  }
\NewDocumentCommand \azwrapp { m }
  {
    \bool_if:NTF \l_azetina_rating_bool
      {
        \makebox[\dim_eval:n{\marginparwidth}][r]
          {
            \textcolor{red}{\bfseries\footnotesize\rating}
          }
        \hspace{\marginparsep}\textbf{#1}
      }
      {
        \makebox[\dim_eval:n{\marginparwidth+\marginparsep}][l]{ }\textbf{#1}
      }
  }
\ExplSyntaxOff
\setenumextmeta[enumext,1]{azetinasty}{label={\arabic*.},labelwidth={\marginparwidth+\marginparsep+\itemwd},list-offset={-\marginparwidth-\marginparsep},}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \title{
%    \scalebox{2.67}{\pkglogo}\\[-10pt]
%    {\large\textcolor{gray}{\fetamontotf{enumerate exercise sheets}}}\\[0pt]
%    \fileversion \quad \filedate\thanks{
%    This file describes a documentation for \fileversion, last revised
%    \filedate.}\\[25pt]
%    \author{
%    \large
%    \raisebox{-1pt}{\textcopyright}{}2024 by Pablo González\thanks{
%    E-mail: \textcolor{OrangeRed}{\textsf{\guillemotleft}}\email{pablgonz@educarchile.cl}\textcolor{OrangeRed}{\textsf{\guillemotright}}.
%       }%
%    }
% \small
% \textsc{ctan}: \url{https://www.ctan.org/pkg/enumext}\\
% \textcolor{gray}{\scriptsize\faIcon[regular]{github}}\,\,\,\url{https://github.com/pablgonz/enumext}
% \vspace*{-2cm}
% }
% \date{}
% \maketitle
%
% \begin{abstract}
% This package provides enumerated list environments compatible
% with \emph{tagging} \texttt{PDF} for creating \emph{\enquote{simple
% exercise sheets}} along with \emph{\enquote{multiple choice questions}},
% storing the \emph{\enquote{answers}} to these in memory using \mypkg{multicol}
% and \mypkg{scontents} packages.
% \end{abstract}
%
% \tableofcontents
%
% \section*{Motivation and acknowledgments}
%
% Usually it is enough to use the classic \myenv{enumerate} environment to
% generate \emph{\enquote{simple exercise sheets}} or
% \emph{\enquote{multiple choice questions}}, the basic idea behind
% \mypkg*{enumext} is to cover three points:
%
% \begin{enumerate}[left=0pt, nosep,labelsep=5pt, label=\small\arabic*.,topsep=2pt]
%   \item To have a simple interface to be able to write \emph{\enquote{lists of
%         exercises}} with \emph{\enquote{answers}}.
%   \item To have a simple interface for writing \emph{\enquote{multiple choice
%         questions}}.
%   \item To have a simple interface for placing \emph{\enquote{columns}}
%         and \emph{\enquote{drawings}} or \emph{\enquote{tables}}.
% \end{enumerate}
%
% This package would not be possible without Phelype Oleinik who has
% collaborated and adapted a large part of the code and all
% \hologo{LaTeX} team for their great work and to the different members
% of the \href{https://tex.stackexchange.com}{TeX-SX} community who have
% provided great answers and ideas. Here a note of the main ones:
%
% \begin{enumerate}[left=0pt, labelsep=5pt, nosep, label=\small\arabic*.,topsep=2pt]
% \item Answer given by Alan Munn in \href{https://tex.stackexchange.com/a/300418}{\textbackslash topsep,  \textbackslash itemsep, \textbackslash partopsep, \textbackslash parsep - what do they each mean (and what about the bottom)?}
%
% \item Answer given by Enrico Gregorio in \href{https://tex.stackexchange.com/a/34172}{Understanding minipages - aligning at top}
%
% \item Answer given by Ulrich Diez in \href{https://tex.stackexchange.com/a/553839/7832}{Different mechanics of hyperlink vs. hyperref}
%
% \item Answer given by Enrico Gregorio in \href{https://tex.stackexchange.com/a/294460/7832}{Minipage and multicols, vertical alignment}
%
% \end{enumerate}
%
% \thispagestyle{plain}
%
% \section*{License and Requirements}
% \label{sec:licence}
%
% Permission is granted to copy, distribute and/or modify this software under
% the terms of the LaTeX Project Public License (lppl), version 1.3 or later
% (\url{https://www.latex-project.org/lppl.txt}).
% The software has the status \enquote{maintained}.
%
% The \mypkg*{enumext} package loads and requires \mypkg{multicol}\cite{multicol}
% and \mypkg{scontents}\cite{scontents} packages, need to have a modern \hologo{TeX} distribution such as
% \hologo{TeX} Live or \hologo{MiKTeX}. It has been tested with the standard
% classes provided by \hologo{LaTeX}: \myclass{book}, \myclass{report},
% \myclass{article} and \myclass{letter} on \mydim{10pt}, \mydim{11pt} and \mydim{12pt}.
%
% \smallskip
%
% \begin{important}*
%  The minimum requirement is \hologo{LaTeX} release 2024-11-01.
% \end{important}
%
% \pagestyle{myheader}
%
% \section{Introduction}
%
% In the \hologo{LaTeX} world there are many useful packages and
% classes for creating \emph{\enquote{lists of exercises}}, \emph{\enquote{worksheets}}  or
% \emph{\enquote{multiple choice questions}}, classes like \myclass{exam}\cite{exam}
% and packages like \mypkg{xsim}\cite{xsim} do the job perfectly, but
% they don't always fit the basic day to day needs.
%
% \smallskip
%
% In my work (and in the work of many teachers) it is common to use
% \emph{\enquote{simple exercise sheets}} also known as
% \emph{\enquote{informal lists of exercises}}, as an example:
%
% \smallskip
%
% \begin{enumext}[save-ans=temp2,columns=2,nosep,save-ref=true]%
%  \item Factor $x^{2}-2x+1$  \anskey{$\left(x-1\right)^{2}$}
%  \item Factor $3x+3y+3z$    \anskey{$3(x+y+z)$}
%  \item True False
%    \begin{enumext}[nosep]
%      \item $\alpha > \delta$ \anskey{False}
%      \item \LaTeX2e\ is cool? \anskey{Very True!}
%    \end{enumext}
%  \item Related to Linux
%    \begin{enumext}[nosep]
%      \item You use linux? \anskey{Yes}
%      \item Usually uses the package manager? \anskey{Yes, \texttt{dnf}}
%      \item Rate the following package and class
%        \begin{enumext}[nosep]
%          \item \texttt{xsim-exam} \anskey{doesn't exist for now :(}
%          \item \texttt{xsim} \anskey{very good}
%          \item \texttt{exsheets} \anskey{obsolete}
%        \end{enumext}
%    \end{enumext}
% \end{enumext}
%
% \smallskip
%
% Sometimes we are also interested in showing the \emph{\enquote{answers}}
% along with the questions:
%
% \smallskip
%
% \begin{enumext}[save-ans=worksheet,mark-ans={\oldtextasteriskcentered},columns=2,show-ans=true,nosep,save-ref=true]
%  \item Factor $x^{2}-2x+1$ \anskey{$\left(x-1\right)^{2}$}
%  \item Factor $3x+3y+3z$ \anskey{$3(x+y+z)$}
%  \item True False
%    \begin{enumext}[nosep]
%      \item $\alpha > \delta$ \anskey{False}
%      \item \LaTeX2e\ is cool? \anskey{Very True!}
%    \end{enumext}
%  \item Related to Linux
%    \begin{enumext}[nosep]
%      \item You use linux? \anskey{Yes}
%      \item Usually uses the package manager? \anskey{Yes, \texttt{dnf}}
%      \item Rate the following package and class
%        \begin{enumext}[nosep]
%          \item \texttt{xsim-exam} \anskey{doesn't exist for now :(}
%          \item \texttt{xsim} \anskey{very good}
%          \item \texttt{exsheets} \anskey{obsolete}
%        \end{enumext}
%    \end{enumext}
% \end{enumext}
%
% \smallskip
%
% Or we are interested in referring to a specific question and its
% \emph{\enquote{answer}}, for example:
%
% \smallskip
%
% The answer to \ref{worksheet:4} is \enquote{\getkeyans{worksheet:4}}
% and the answer to \ref{worksheet:8} is \enquote{\getkeyans{worksheet:8}}.
%
% \smallskip
%
% Or we are interested in printing all the \emph{\enquote{answers}}:
%
% \smallskip
%
% \printkeyans{worksheet}
%
% \smallskip
%
% Another very common thing to use in my work is \emph{\enquote{multiple choice
% questions}}, for example:
%
% \smallskip
%
% \begin{enumext}[save-ans=mytest,columns=2,nosep,save-ref=true,save-sep={ }]
%   \item First type of questions
%      \begin{keyans}[columns=2,noitemsep]
%        \item value
%        \item*[$x=5$] correct
%        \item value
%        \item value
%      \end{keyans}
%   \item Second type of questions
%      \begin{enumext}[no-store,label=\Roman*.,noitemsep]
%        \item $2\alpha+2\delta=90^{\circ}$
%        \item $\alpha=\delta$
%        \item $\angle EDF=45^{\circ}$
%      \end{enumext}
%      \begin{keyans}[columns=2,noitemsep]
%        \item I only
%        \item II only
%        \item I and II only
%        \item* I and III only
%        \item I, II, and III
%      \end{keyans}
% \item* Third type of questions
%        \begin{enumext}[no-store,list-offset=0.5cm,label=(\arabic*),noitemsep]
%            \item $2\alpha+2\delta=90^{\circ}$
%            \item $\angle EDF=45^{\circ}$
%        \end{enumext}
%    \begin{keyans}[columns=2,noitemsep]
%        \item value
%        \item value
%        \item*[some note] value
%        \item value
%        \item value
%    \end{keyans}
%
% \item Question with image and label below:
%
%  \begin{keyanspic}[label-pos=below, layout-sty={3,2}]
%    \anspic{\includegraphics[scale=0.15]{example-image-a}}
%    \anspic{\includegraphics[scale=0.15]{example-image-b}}
%    \anspic{\includegraphics[scale=0.15]{example-image-a}}
%    \anspic{\includegraphics[scale=0.15]{example-image-a}}
%    \anspic*[A duck]{\includegraphics[scale=0.30]{example-image-duck}}
%  \end{keyanspic}
%
% \item Question with image on right side:
%
%    \begin{keyans}[mini-env=0.5\linewidth, columns=1,noitemsep]
%        \item value
%        \item value
%        \item value
%        \item*[\enquote{other note}] correct
%        \item value
%        \miniright
%        \includegraphics[scale=0.15]{example-image-b}
%    \end{keyans}
% \end{enumext}
%
% \smallskip
%
% Where what we are interested in the \mymeta{label} and a
% \emph{\enquote{short note}} that we leave as an explanation, and then
% print them:
%
% \smallskip
%
% \printkeyans{mytest}
%
% \smallskip
%
% The \mypkg*{enumext} package was created and designed to meet these
% small requirements in the creation of \emph{\enquote{simple
% worksheets}} and \emph{\enquote{multiple choice questions}}.
%
% \smallskip
%
% \begin{important}*
% These \emph{\enquote{simple worksheets}} or \emph{\enquote{multiple
% choice questions}} appear to be easy to obtain using a combination of
% the \myenv{enumerate}, \myenv{minipage} and \myenv{multicols}
% environments, but like many things, what \emph{\enquote{looks
% simple}} is not so simple.
% \end{important}
%
% \subsection{Description and usage}
%
% The \mypkg*{enumext} package defines enumerated environments using the
% \myenv{list} environment provided by \hologo{LaTeX}, but
% \emph{\enquote{does not redefine}} any internal commands associated with
% it such as |\list|, |\endlist| or |\item| outside of the
% \emph{\enquote{scope}} in which they are defined.
%
% \smallskip
%
% \begin{important}*
% This package is NOT intend to replace the \myenv{enumerate} environment
% nor replace the powerful \mypkg{enumitem}\cite{enumitem}, the approach
% is intended to work without hindering either of them.
% \end{important}
%
% \smallskip
%
% This package can be used with |xelatex|, |lualatex|, |pdflatex| and
% the classical |latex>dvips>ps2pdf| and is present in \hologo{TeX} Live and \hologo{MiKTeX},
% use the package manager to install. For manual installation, download
% \href{http://mirrors.ctan.org/macros/latex/contrib/enumext.zip}{enumext.zip}
% and unzip it, run \lstinline[language=enumext-doc,basicstyle=\ttfamily]+luatex enumext.ins+
% and move all files to appropriate locations, then run |mktexlsr|. To produce the documentation run
% \lstinline[language=enumext-doc,basicstyle=\ttfamily]+arara enumext.dtx+.
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single,language={}]
  enumext.sty  >  TDS:tex/latex/enumext/
  enumext.pdf  >  TDS:doc/latex/enumext/
  README.md    >  TDS:doc/latex/enumext/
  enumext.dtx  >  TDS:source/latex/enumext/
  enumext.ins  >  TDS:source/latex/enumext/
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% The package is loaded in the usual way:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\usepackage{enumext}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \subsection{The concept of left margin}
%
% There is a direct relationship between the parameters |\leftmargin|,
% |\itemindent|, \ics{labelwidth} and \ics{labelsep} plus an
% \emph{\enquote{extra space}} that makes it difficult to obtain the
% desired \emph{horizontal spaces} in a \myenv{list} environment.
% Usually we don't want the \myenv{list} to go beyond the left margin of the
% page, but since these four values are related, that causes a problem.
%
% The \mypkg{enumitem}\cite{enumitem} package adds the |\labelindent| parameter to
% solve some of these problems. A simplified representation of this in
% the figure \ref{fig:one}.
% \setlength\intextsep{3pt}
% \begin{figure}[ht]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (-0.5,6.175) --node[below,,text=lightgray,font=\footnotesize\ttfamily]{margin page} (2,6.175);
%     \draw[line width=0.5pt,dash pattern=on 2pt off 2pt,color=gray] (2,4.85) -- (2,7.5);
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=blue!75]{\texttt{\textbackslash{}labelindent}} (4.5,7.0);
%     \draw[<->,color=gray] (4.5,7.0) --node[above,text=blue!75]{\texttt{\textbackslash{}labelwidth}} (7.5,7.0);
%     \draw[<->,color=gray] (7.5,7.0) --node[above,text=blue!75]{\texttt{\textbackslash{}labelsep}} (9.5,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (4.5,6.5) rectangle (7.5,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.5,6.5) rectangle (9.5,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.5) rectangle (15,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.0) rectangle (15,6.35);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,5.5) rectangle (15,5.85);
%     \draw[<->,color=gray] (2.0,5.35) --node[below,text=blue!75]{\texttt{\textbackslash{}leftmargin}} (7.5,5.35);
%     \draw[<->,color=gray] (7.5,5.35) --node[below,text=blue!75]{\texttt{\textbackslash{}itemindent}} (9.5,5.35);
%   \end{tikzpicture}
%   \caption{Representation of horizontal lengths in \mypkg{enumitem}.}
%   \label{fig:one}
% \end{figure}
%
% The \mypkg*{enumext} package does NOT provide a user interface to set the values for
% |\leftmargin| and |\itemindent|, instead it provides the keys
% \mykey{list-offset} and \mykey{list-indent} which internally set the
% values for |\leftmargin| and |\itemindent|. The concepts of |\leftmargin| and |\itemindent|
% are different in \mypkg*{enumext}. The figure \ref{fig:two} shows the visual representation of idea.
%
% \begin{figure}[ht]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (-0.5,6.175) --node[below,text=lightgray,font=\footnotesize\ttfamily]{margin page} (2,6.175);
%     \draw[line width=0.5pt,dash pattern=on 2pt off 2pt,color=gray] (2,4.85) -- (2,7.5);
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{list-offset}} (4.5,7.0);
%     \draw[<->,color=gray] (4.5,7.0) --node[above,text=blue!75]{\vphantom{p}\texttt{\textbackslash{}labelwidth}} (7.5,7.0);
%     \draw[<->,color=gray] (7.5,7.0) --node[above,text=blue!75]{\texttt{\textbackslash{}labelsep}} (9.5,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (4.5,6.5) rectangle (7.5,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.5,6.5) rectangle (9.5,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.5) rectangle (15,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.0) rectangle (15,6.35);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,5.5) rectangle (15,5.85);
%     \draw[<->,color=gray] (4.5,5.35) --node[below,text=optcolor]{\texttt{list-indent}} (9.5,5.35);
%   \end{tikzpicture}
%   \caption{Representation of horizontal lengths concept in \mypkg*{enumext}.}
%   \label{fig:two}
% \end{figure}
%
% In this way we reduce a \emph{little} the amount of parameters we have to
% pass. With the default values of keys \mykey{list-offset},
% \mykey{list-indent}, \mykey{labelwidth} and \mykey{labelsep} the lists
% will have the (usually) expected output for \emph{\enquote{simple
% worksheets}}. The figure \ref{fig:three} shows the visual representation.
%
% \begin{figure}[ht]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (-0.5,6.175) --node[below,text=lightgray,font=\footnotesize\ttfamily]{margin page} (2,6.175);
%     \draw [line width=0.5pt,dash pattern=on 2pt off 2pt,color=gray] (2,4.85) -- (2,7.5);
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (15,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.0) rectangle (15,6.35);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.5) rectangle (15,5.85);
%     \draw[<->,color=gray] (2.0,5.35) --node[below,text=optcolor]{\texttt{list-indent}} (7.0,5.35);
%   \end{tikzpicture}
%   \caption{Default horizontal lengths \mykey{list-offset}=\mydim{0pt}, \mykey{list-indent}=\ics{labelwidth}+\ics{labelsep} in \mypkg*{enumext}.}
%   \label{fig:three}
% \end{figure}
%
% \subsection{User interface}
% \label{sec:interface}
%
% The user interface consists of two main list environments |enumext|
% (vertical) and |enumext*| (horizontal), the environment |anskey*| and
% the command |\anskey| to \emph{\enquote{store content}} and the
% environments |keyans|, |keyans*| and |keyanspic| for multiple choice.
% It also provides the commands |\getkeyans| to print individual
% \emph{stored content}, |\printkeyans| and |\foreachkeyans| to print
% all \emph{stored content}, |\miniright| for \myenv{minipage}, |\setenumext|
% and |\setenumextmeta| to config \myoarg{key \textnormal{\textcolor{gray}{=}} val} options.
%
% \subsubsection{Internal counters}
%
% The package \mypkg*{enumext} uses internally the \icounter{enumXi},
% \icounter{enumXii}, \icounter{enumXiii}, \icounter{enumXiv} counters
% for the four nesting levels of the \myenv*{enumext} environment, the
% \icounter{enumXv} counter for the \myenv*{keyans} environment, the
% \icounter{enumXvi} counter for the \myenv*{keyanspic} environment,
% the counter \icounter{enumXvii} for \myenv*{enumext*} environment and the counter
% \icounter{enumXviii} for \myenv*{keyans*} environment.
%
% \smallskip
%
% \begin{important}*
% If any package defines these counters or they are user-defined
% in the document, the package will return a fatal error and abort the
% load.
% \end{important}
%
% \subsubsection{Public dimension}
%
% The package \mypkg*{enumext} only provides a single public dimension
% |\itemwidth| and is intended for user convenience only and is not
% for internal use as such. The dimension |\itemwidth| is \emph{rigid length}
% and contains the \emph{\enquote{width of the content}} of each |\item|
% regardless of \mykey{labelwidth} and \mykey{labelsep}.
%
% \smallskip
%
% \begin{important}*
% If any package defines |\itemwidth| or they are user-defined |\itemwidth|
% in the document, the package will overwrite it without warning.
% \end{important}
%
% \subsubsection{Support for \pkg{multicol}}
%
% The package provides direct support for using the \mypkg{multicol}\cite{multicol}
% package. This allows to obtain directly a two-column output as shown
% in the figure \ref{fig:fourth}.
%
% \begin{figure}[ht]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (17.5,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.5) rectangle (11.5,6.35) node[pos=.5,text=black]%
%        {\begin{tabular}{c}
%          \texttt{column one} \\
%          \textcolor{blue}{\emph{nested items}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (13.5,5.5) rectangle (17.5,6.35) node[pos=.5,text=black]%
%        {\begin{tabular}{c}
%          \texttt{column two} \\
%          \textcolor{blue}{\emph{nested items}}
%        \end{tabular}};
%     \draw[<->,color=gray] (2.0,5.35) --node[below,text=optcolor]{\texttt{list-indent}} (7.0,5.35);
%     \draw[<->,color=gray] (11.5,5.35) --node[below,text=optcolor]%
%       {\begin{tabular}{c}
%         \texttt{column-sep} \\
%           \textcolor{blue}{\texttt{\textbackslash{}columnbreak}}
%         \end{tabular}}
%       (13.5,5.35);
%   \end{tikzpicture}
%   \caption{Representation of the two column output for a nested level in \myenv*{enumext} environment.}
%   \label{fig:fourth}
% \end{figure}
%
% The \emph{\enquote{non starred}} version of the \myenv{multicols}
% environment is always used together with the \ics{raggedcolumns}
% command and is controlled by \mykey{columns} and \mykey{columns-sep}
% keys. It can be used in all nesting levels of the
% environment |enumext| and the environment |keyans| and can
% together with the \mykey{mini-env} key. If you need to force a
% start a new column \ics{columnbreak} must be used (see \S\ref{key:multi}).
%
% \smallskip
%
% \begin{important}*
% The |\columnseprule| command is not available as a key and is set to
% \emph{\enquote{zero}} for the inner levels and the \myenv*{keyans} environment. If the value of
% this is set inside the document, it will affect \emph{\enquote{all environments}} that
% use the \mykey{columns} key.
% \end{important}
%
% \subsubsection{Support for \env{minipage}}
%
% The package provides direct support for \myenv{minipage}
% environment, this allows you to obtain an output like the
% one shown in figure \ref{fig:five}.
%
% \begin{figure}[!htbp]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (17.5,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.5) rectangle (12.5,6.35) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \texttt{minipage left} \\
%          \textcolor{blue}{\emph{nested list}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (14.5,5.5) rectangle (17.5,6.35) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \texttt{minipage right} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     \draw[<->,color=gray] (2.0,5.35) --node[below,text=optcolor]{\texttt{list-indent}} (7.0,5.35);
%     \draw[<->,color=gray] (7.0,5.35) --node[below,text=optcolor]{\texttt{mini-env}} (12.5,5.35);
%     \draw[<->,color=gray] (12.5,5.35) --node[below,text=optcolor]%
%       {\begin{tabular}{c}
%         \texttt{mini-sep} \\
%           \textcolor{pkgcolor}{\texttt{\textbackslash{}miniright}}
%         \end{tabular}} (14.5,5.35);
%   \end{tikzpicture}
%   \caption{Representation of the \mykey{mini-env} output for a nested level \myenv*{enumext} environment.}
%   \label{fig:five}
% \end{figure}
%
% The \myenv{minipage} environments on \emph{\enquote{left side}} and
% \emph{\enquote{right side}} is always used with \emph{\enquote{aligned
% on top}} |[t]|. It can be used in all nesting levels of the
% environment |enumext| and the environment |keyans| and is controlled
% by \mykey{mini-env} and \mykey{mini-sep} keys. In order to switch from
% the \emph{\enquote{left}} side \myenv{minipage} environment to the
% \emph{\enquote{right}} side one must use the command |\miniright|
% (see~\S\ref{key:mini}).
%
% \subsubsection{The \cs[no-index]{label} and \cs[no-index]{ref} system}
%
% This package provides a user interface like the
% \mypkg{enumitem}\cite{enumitem} package to customize the references
% which is activated by the \mykey{ref} key (\S\ref{subsec:label-and-ref}), the standard \hologo{LaTeX}
% \ics{label} and \ics{ref} commands work as usual.
% It also provides an \emph{\enquote{internal reference}} system for the
% \emph{\enquote{stored content}} by means of the key \mykey{save-ref}
% (\S\ref{subsec:label-ref}) when the key \mykey{save-ans} (\S\ref{subsec:storage-keys}) is active.
%
% \subsubsection{Support for \cs[no-index]{footnote}}\label{doc:footnote}
%
% The \myenv*{enumext*} and \myenv*{keyans*} environments and the
% \mykey{mini-env} key use the \myenv{minipage} environment in their
% implementation but in a transparent way for the user, i.e. it is only
% used for typesetting and not directly. The \mypkg*{enumext} package provides an \emph{internal implementation} for the
% command |\footnote| compatible with the \mypkg{hyperref} package to
% work in the same way as if it were used anywhere in the document.
%
% \newpage
%
% Unfortunately, if \emph{tagging} \texttt{PDF}  is not enabled, it will
% not produce the expected \emph{\enquote{links}} because the internal
% implementation uses |\footnotetext|\myoarg{number} and |\footnotemark|\myoarg{number}\mymarg{text}
% and support for these is limited by the \mypkg{hyperref} package.
%
% \smallskip
%
% The best way to solve this if \emph{tagged} \texttt{PDF} is NOT active
% is to use Jean-François Burnol \mypkg{footnotehyper}\cite{footnotehyper}
% package, it will support keeping the \emph{\enquote{links}} if
% \mypkg{hyperref} is loaded with the |hyperfootnotes=true| option (default).
% Load it is as follows:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\IfDocumentMetadataTF{ }
  {
    \usepackage{footnotehyper}
    \makesavenoteenv{enumext}
    \makesavenoteenv{enumext*}
  }
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \begin{important}
%  At the moment the \mypkg{footnotehyper} package is not compatible
%  with \emph{tagged} \texttt{PDF}.
% \end{important}
%
% \section{The environments provided}
%
% The package \mypkg*{enumext} provides two main list environments, the
% \emph{vertical} environment \myenv*{enumext} and the \emph{horizontal}
% environment \myenv*{enumext*}.
%
% \vspace*{-\baselineskip}
%
% \begin{function}{enumext,enumext*}
%   \begin{minipage}[t]{0.45\linewidth}
%       \envexamp{enumext}
%   \end{minipage}\hfill
%   \begin{minipage}[t]{0.45\linewidth}
%       \envexamp{enumext*}
%   \end{minipage}
% \end{function}
%
% \medskip
%
% \subsection{The environment \texttt{enumext}}\label{sec:envenumext}
%
% The \myenv*{enumext} is an environment that works in the same way as
% the standard \myenv{enumerate} environment provided by \hologo{LaTeX},
% \ics*{item} and \ics*{item}\myoarg{custom} commands work in
% the usual way. The environment can be nested with at most \emph{\enquote{four levels}}
% and the options can be configured globally using \ics*{setenumext}
% command and locally using \myoarg{key \textnormal{\textcolor{gray}{=}} val}
% in the environment.
%
% \subsubsection*{Example with \texttt{columns=2}}
%
% \begin{enumext}[columns=2, topsep=0pt]
%   \item This text is in the first level.
%     \begin{enumext}
%        \item This text is in the second level.
%           \begin{enumext}
%              \item This text is in the third level.
%                \begin{enumext}
%                   \item This text is in the fourth level.
%                \end{enumext}
%            \end{enumext}
%     \end{enumext}
%   \item[X] This text is in the first level.
%   \item* This text is in the first level.
% \end{enumext}
%
% \subsection{The environment \texttt{enumext*}}
%
% The \myenv*{enumext*} is a \emph{horizontal list environment}
% similar to the \myenv{shortenumerate} or \myenv{tasks} environments
% provided by the \mypkg{shortlst}\cite{shortlst} and \mypkg{tasks}\cite{tasks}
% packages, \ics*{item} and \ics*{item}\myoarg{custom} work as usual.
% The options can be configured globally using \ics*{setenumext} command
% and locally using \myoarg{key \textnormal{\textcolor{gray}{=}} val}
% in the environment.
%
% \smallskip
%
% Some considerations to take into account for this environment:
%
% \begin{itemize}[nosep,parsep=1pt,topsep=2pt]
% \item The environment cannot be nested within itself or in the
%   environment \myenv*{keyans*}, but it can be nested within
%   \myenv*{enumext} and vice versa.
%
% \item Each \emph{\enquote{item content}} in the environment is placed
%   within a \myenv{minipage} environment whose \emph{width} is stored
%   in the dimension |\itemwidth| that NOT includes \mykey{labelwith},
%   \mykey{labelsep}, only the \emph{width of the content}.
%
% \item You cannot have floating environments like \myenv{figure} or
%   \myenv{table} but \ics{footnote} with \mypkg{hyperref} support is
%   supported if the \mypkg{footnotehyper} package is loaded (see \S\ref{doc:footnote} for full support).
%
% \item You cannot have any standard list environments like \myenv{itemize},
%   \myenv{enumerate}, \myenv{description}, \myenv{quote}, \myenv{quotation},
%   \myenv{verse}, \myenv{center}, \myenv{flushleft}, \myenv{flushright},
%   \myenv{verbatim}, \myenv{tabbing}, \myenv{trivlist}, \myenv{list}
%   and all environments created with |\newtheorem|.
% \end{itemize}
%
% \subsubsection*{Example with \texttt{columns=2}}
%
% \begin{enumext*}[columns=2]
%   \item This text is in the first level.
%   \item This text is in the first level.
%   \item[X] This text is in the first level.
%   \item* This text is in the first level.
% \end{enumext*}
%
% \subsection{The command \cs[no-index]{item*}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{\item*}
%   \begin{syntax}
%     \ics*{item*}\myoarg{symbol}\myoarg{offset}
%   \end{syntax}
%    The \ics*{item*}, \ics*{item*}\myoarg{symbol} and \ics*{item*}\myoarg{symbol}\myoarg{offset}
%    works like the numbered |\item|, but placing a \mymeta{symbol} to
%    the \emph{\enquote{left}} of the \mymeta{label} separated from it by
%    the \mymeta{offset} set by the the \emph{second optional argument}.
%
%    \smallskip
%
%    The \emph{starred argument} ‘|*|’ cannot be separated by spaces
%    ‘\verb*| |’ from the command, i.e. \ics*{item*} and the
%    \emph{first optional argument} does \enquote{NOT} support
%    \emph{verbatim content}. Can be configure with the keys
%    \mykey{item-sym*} and \mykey{item-pos*} locally in the environment
%    or globally using \ics*{setenumext} command (\S\ref{sec:setenumext}).
% \end{function}
%
% \smallskip
%
% \begin{important}*
% The behavior of \ics*{item*} in the \myenv*{enumext} and \myenv*{enumext*} environments is NOT
% the same as in the \myenv*{keyans} and \myenv*{keyans*} environments.
% \end{important}
%
% \subsubsection{Keys for \cs[no-index]{item*}}
%
% \keyexamp{item-sym\textcolor{MediumOrchid}{*}}{symbol}{\textbackslash{}textborn}
% Sets the \emph{symbol} to be displayed in the \emph{\enquote{left}} of the
% box containing the current \mymeta{label} set by \mykey{labelwidth} key for \ics*{item*} in
% \myenv*{enumext} and \myenv*{enumext*}. The \emph{symbol} can be in
% \emph{text} or \emph{math} mode, for example \mykey{item-sym*}|={$\star$}|.
%
% \smallskip
%
% \keyexamp{item-pos\textcolor{MediumOrchid}{*}}{rigid length}{by levels}
% Sets the \emph{offset} between the box containing the
% current \mymeta{label} defined by \mykey{labelwidth} key and the
% \mymeta{symbol} set by \mykey{item-sym*} key. The default values are
% set by \mykey{labelsep} key at each level. If positive values are
% passed it will \emph{offset to the left} and if negative values are
% passed it will \emph{offset to the right}.
%
% \subsection{The command \cs[no-index]{item} in \texttt{enumext*}}
%
% The \ics*{item} command for the \myenv*{enumext*} environment provides
% an \emph{\enquote{first optional argument}} \ics*{item}\myparg{columns} which \emph{\enquote{joins items}}
% between columns. Let's consider the following examples adapted directly from
% the \mypkg{task} package:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\begin{enumext*}[widest=10,columns=4]
  \item The first
  \item* The second
  \item The third
  \item The fourth
  \item(3)* The fifth item is way too long for this and needs three columns
  \item The sixth
  \item The seventh
  \item(2)[X] The eighth item is way too long for this and needs two columns
    (\the\itemwidth)
  \item The ninth
  \item[Z] The tenth (\the\itemwidth)
\end{enumext*}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \begin{enumext*}[widest=10,columns=4]
%  \item The first
%  \item* The second
%  \item The third
%  \item The fourth
%  \item(3)* The fifth item is way too long for this and needs three columns
%  \item The sixth
%  \item The seventh
%  \item(2)[X] The eighth item is way too long for this and needs two columns (\the\itemwidth)
%  \item The ninth
%  \item[Z] The tenth (\the\itemwidth)
% \end{enumext*}
%
% \section{The command \cs{setenumext}}
% \label{sec:setenumext}
%
% \vspace*{-10pt}
%
% \begin{function}{\setenumext}
%   \begin{minipage}[t]{0.45\linewidth}
%     \cmdexamp{setenumext}{key \textnormal{\textcolor{gray}{=}} val}
%     \cmdexamp{setenumext}[enumext\textnormal{\textcolor{gray}{,}} level]{key \textnormal{\textcolor{gray}{=}} val}
%     \cmdexamp{setenumext}[enumext*]{key \textnormal{\textcolor{gray}{=}} val}
%     \cmdexamp{setenumext}[keyans]{key \textnormal{\textcolor{gray}{=}} val}
%   \end{minipage}\hfill
%   \begin{minipage}[t]{0.45\linewidth}
%     \cmdexamp{setenumext}[keyans*]{key \textnormal{\textcolor{gray}{=}} val}
%     \cmdexamp{setenumext}[print\textnormal{\textcolor{gray}{,}} level]{key \textnormal{\textcolor{gray}{=}} val}
%     \cmdexamp{setenumext}[print\textnormal{\textcolor{gray}{,}} \textnormal{\textcolor{red}{*}}]{key \textnormal{\textcolor{gray}{=}} val}
%     \cmdexamp{setenumext}[print*]{key \textnormal{\textcolor{gray}{=}} val}
%   \end{minipage}
%
% \smallskip
%
% The command \ics*{setenumext} sets the \mymeta{keys} on a global basis
% for environments \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans},
% \myenv*{keyans*} and the \ics*{printkeyans} command.
% It can be used both in the preamble and in the body of the document
% as many times as desired.
% \end{function}
%
% \smallskip
%
% The \mymeta{keys} set in the \emph{optional argument} of environments and
% commands have the \emph{highest precedence}, overriding both
% options passed by \ics*{setenumext}. If the \emph{optional argument} is not
% passed, the first level of the environment \myenv*{enumext} will be
% taken by default.
%
% \smallskip
%
% \begin{important}*
% The key \mykey{save-ans} that activate the \emph{\enquote{storage
% system}} must NOT be passed through this command and must be passed
% directly in the \emph{optional argument} of the \emph{\enquote{first level}}
% of the environment in which they are executed.
% \end{important}
%
% \smallskip
%
% \section{The command \cs[no-index]{setenumextmeta}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{\setenumextmeta}
%   \begin{syntax}
%     \ics*{setenumextmeta} \mymarg{key name}\mymarg{key-one \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} key-two \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} \dots}
%     \ics*{setenumextmeta}|*|\mymarg{key name}\mymarg{key-one \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} key-two \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} \dots}
%     \ics*{setenumextmeta} \myoarg{enumext\textnormal{\textcolor{MediumOrchid}{\texttt{*}}}}\mymarg{key name}\mymarg{key-one \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} key-two \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} \dots}
%     \ics*{setenumextmeta} \myoarg{enumext\textnormal{\textcolor{gray}{,}} level}\mymarg{key name}\mymarg{key-one \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} key-two \textnormal{\textcolor{gray}{=}} val\textnormal{\textcolor{gray}{,}} \dots}
%   \end{syntax}
%   The command \ics*{setenumextmeta} adds a new \emph{\enquote{meta-key}}
%   for the environments \myenv*{enumext} and \myenv*{enumext*}, the
%   \mymarg{key name} must be different from those defined by the package.
%   If the \emph{optional argument} is not passed, the new \emph{\enquote{meta-key}}
%   will be created for the \emph{\enquote{first level}} of the environment
%   \myenv*{enumext}.
% \end{function}
%
% \smallskip
%
% The \emph{starred argument} ‘|*|’ will create the new \emph{\enquote{meta-key}}
% for the environment \myenv*{enumext*} and for all levels of the
% environment \myenv*{enumext}. For example: |\setenumextmeta*{midsep}{topsep=3pt, partopsep=0pt}|
% will create a new key |midsep| available for all levels of the
% \myenv*{enumext} environment and the \myenv*{enumext*} environment
% and we can use it like any other key so |\begin{enumext}[midsep]|
% and |\begin{enumext*}[midsep]| will be valid.
%
% \section{The \texttt{keyval} system}
%
% The \mymeta{key = val} system used by the \mypkg*{enumext} package is implemented
% using \mypkg{l3keys} so it must be taken into consideration that those
% keys marked as \emph{\enquote{value forbidden}}, that is \mymeta{key} is
% different from \mymeta{key=}.
%
% \smallskip
%
% All \mymeta{keys} described in this section are available for the
% \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and \myenv*{keyans*}
% environments with the exception of the keys \mykey{series}, \mykey{resume},
% \mykey{resume*} which are only available for the \emph{\enquote{first level}}
% of the environments \myenv*{enumext} and \myenv*{enumext*}; and the keys
% \mykey{mini-right}, \mykey{mini-right*} which are only available for
% the \myenv*{enumext*} and \myenv*{keyans*} environments.
%
% \smallskip
%
% All \mymeta{keys} related to vertical or horizontal spacing accept a
% \emph{\enquote{skip}} or \emph{\enquote{dim}} expression if passed
% between braces, i.e. you do not need to use |\dimeval| or |\dimexpr|
% to perform calculations.
%
% \smallskip
%
% \begin{important}*
%  It should be kept in mind that using any \mymeta{key} that sets
%  a \emph{rubber lengths} or \emph{rigid lengths} for vertical or
%  horizontal space on a level will influence the vertical and horizontal
%  space for \emph{inners levels} and \myenv*{keyans}, \myenv*{keyans*} and
%  \myenv*{keyanspic} environments.
% \end{important}
%
% \smallskip
%
% \subsection{Keys for \texttt{label} and \texttt{ref}}\label{subsec:label-and-ref}
%
% \keyexamp*{mode-box}{value forbidden}{not used}
% This is a \emph{\enquote{switch-key}} that does not receive an
% argument and is \enquote{only} available for the \emph{\enquote{first level}}
% of the \myenv*{enumext} environment and the \myenv*{enumext*} environment.
% When this is set the \mykey{label}, \mykey{font}, \mykey{wrap-label}
% and \mykey{wrap-label*} keys are executed within |\makebox| for the
% \myenv*{enumext} and \myenv*{keyans} environments.
%
% \smallskip
%
% \begin{important}
%   This key is intended for compatibility with \emph{tagged} \texttt{PDF}
%   and is forcibly \emph{\enquote{enabled}} when |\DocumentMetadata| is
%   present. If you want to get the same document output whether |\DocumentMetadata|
%   is active or not, you must enable this key.
% \end{important}
%
% \smallskip
%
% \begin{important}*
% In the \myenv*{enumext*} and \myenv*{keyans*} environments |\makelabel|
% are redefined using |\makebox| by default. If \myenv*{enumext} or
% \myenv*{keyans} is used in the \myenv*{enumext*} environment the key
% must be activated manually.
% \end{important}
%
% \smallskip
%
% \keyexamp{label}
%   {\textnormal
%       {\ilabel{alph*} \textcolor{lightgray}{\textbar} \ilabel{Alph*}
%         \textcolor{lightgray}{\textbar} \ilabel{arabic*}
%         \textcolor{lightgray}{\textbar} \ilabel{roman*}
%         \textcolor{lightgray}{\textbar} \ilabel{Roman*}}
%   }{by levels}
%
% \smallskip
%
% Sets the \mymeta{label} that will be printed at the \emph{current level}
% and default value for \mykey{labelwidth} key.
% The default value for the first level of the environments
% \myenv*{enumext} and \myenv*{enumext*} are \ilabel{arabic*.}, for
% second level are \ilabel*{alph*)}, for third level are \ilabel{roman*.}
% and for fourth level are \ilabel{Alph*.}. For \myenv*{keyans}
% and \myenv*{keyans*} environments the default value is \ilabel{Alph*)}.
%
% \smallskip
%
% \begin{important}*
% This key is intended to give the basic structure with which the
% \mymeta{label} will be displayed, and the form in which it is
% used by standard \emph{\enquote{label and ref}} and the
% \emph{\enquote{internal label and ref}} system with the
% \mykey{save-ref} key. You cannot use commands with \mymeta{label} as an
% argument, for example |\emph|\mymarg{\textnormal{\ilabel{alph*}}} will return an
% error. For full customization of how \mymeta{label} is displayed use
% the \mykey{font}, \mykey{wrap-label} and/or \mykey{wrap-label*} keys.
% \end{important}
%
% \smallskip
%
% \keyexamp{labelsep}{rigid length}{\mydim{0.3333}em}
% Sets the \emph{horizontal space} between the box containing the
% current \mymeta{label} defined by \mykey{label} key and the text of an
% item on the first line. Internally sets the value of \ics{labelsep} for
% the current level.
%
% \smallskip
%
% \keyexamp{labelwidth}{rigid length}{by label}
% Sets the \emph{width} of the box containing the current \mymeta{label}
% set by the \mykey{label} key.
% Internally sets the value of \ics{labelwidth} for the current level.
% The default values are calculated by means of the \emph{width} of a box
% by setting a \emph{value} to the current counter set by \mykey{label}
% key using ‘\mydim{0}’ for \ilabel{arabic*}, ‘|M|’ for \ilabel{Alph*},
% ‘|m|’ for \ilabel{alph*}, ‘|VIII|’ for  \ilabel{Roman*} and ‘|viii|’
% for \ilabel{roman*}.
%
% \smallskip
%
% \keyexamp{widest}{integer \textnormal{\textcolor{lightgray}{\textbar}} string}{empty}
% Sets the \mykey{labelwidth} key pass the \mymeta{integer} or converting
% the \mymeta{string} of the form |\Alph|, |\alph|, |\Roman| or |\roman|
% to a \emph{value} for the current counter defined by \mykey{label} key,
% then calculating the \emph{width} by means of a box. For example |widest={XXIII}|
% or |widest={23}| are equivalent. This key is useful when the default
% values of the \mykey{labelwidth} key are smaller than those actually used.
%
% \smallskip
%
% \keyexamp{font}{font commands}{empty}
% Sets the \emph{font style} for the current \mymeta{label} defined by \mykey{label} key.
% For example |font={\bfseries\small}|.
%
% \smallskip
%
% \keyexamp{align}{left \textnormal{\textcolor{lightgray}{\textbar}} right \textnormal{\textcolor{lightgray}{\textbar}} center}{left}
% Sets the \emph{aligned} of \mymeta{label} defined by \mykey{label}
% key on the current level in the label box.
%
% \smallskip
%
% \newsavebox{\hashbox}
% \begin{lrbox}{\hashbox}
% \lstinline[language=enumext-doc,basicstyle=\ttfamily]+{#1}+
% \end{lrbox}
%
% \keyexamp{wrap-label}{code{} \space\usebox{\hashbox} more code}{empty}
%
% \smallskip
%
% Wraps the \emph{current} \mymeta{label} defined by \mykey{label} key
% referenced by |{#1}| after executing the \mykey{align} and \mykey{font}
% keys. The \mymarg{code} must be passed between braces and this does not
% modify the value set by the \mykey{labelwidth} key and is applied \emph{only}
% on \ics*{item} and \ics*{item*}.
% When using it in the \ics*{setenumext} command it is necessary to use the
% \emph{double} ‘|{##1}|’. For example |wrap-label={\fbox{#1}}|
% or you can create a command:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=none]
\NewDocumentCommand \mywrap { s m }
  {
    \IfBooleanTF{#1}
      {\textcolor{red}{\textbf{Q}}\textcolor{blue}{\textbf{.}}\textcolor{gray}{#2}}
      {\textcolor{blue}{\textbf{Q}}\textcolor{red}{\textbf{.}}\textcolor{gray}{#2}}
  }
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% and then pass it through the key |wrap-label={\mywrap{#1}}| or |wrap-label={\mywrap*{#1}}|.
%
% \smallskip
%
% \keyexamp{wrap-label\textcolor{MediumOrchid}{*}}{code{} \space\usebox{\hashbox} more code}{empty}
%
% \smallskip
%
% The same as the \mykey{wrap-label} key but also applies on \ics*{item}\myoarg{custom}.
%
% \newpage
%
% \newsavebox{\refboxsample}
% \begin{lrbox}{\refboxsample}
% \small\textcolor{gray}{\ttfamily\{}\textnormal{\small\ilabel{alph*}\textcolor{lightgray}{\textbar} \ilabel{Alph*}\textcolor{lightgray}{\textbar} \ilabel{arabic*}\textcolor{lightgray}{\textbar} \ilabel{roman*}\textcolor{lightgray}{\textbar} \ilabel{Roman*}}\textcolor{gray}{\ttfamily\}}
% \end{lrbox}
% \keyexamp{ref}{code{} \space\usebox{\refboxsample} more code}{empty}
%
% Modifies the way \emph{cross references} are displayed. The
% \mykey{label} key sets the default form of the \emph{cross references},
% by using this key you can define a different format, for example:
% \mykey{ref}|=\emph|\mymarg{\textnormal{\ilabel{alph*}}} is valid.
%
% \smallskip
%
% Internally it renews the command associated with each counter when it
% is executed, i.e., in the environment \myenv*{enumext} the command |\theenumXi|
% is modified when the key is executed at the first level, |\theenumXii|
% when it is executed at the second level and |\theenumXiii| together
% with |\theenumXiv| when it is executed at the
% third and fourth levels.
%
% \smallskip
%
% \begin{important}*
% This must be kept in mind, since the values set by the \mykey{label} and
% \mykey{ref} keys are not cumulative by levels, so if you have used the \mykey{ref}
% key in the first level and then want to associate the counter with
% \mykey{label} or \mykey{ref} in the second level you must use the direct commands,
% i.e. |\arabic{eunumXi}| to indicate the count of the first level
% instead of using |\theenumXi|.
% \end{important}
%
% \subsection{Keys for spaces}
%
% \keyexamp{show-length}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
% Displays on the terminal the values for \emph{all list parameters} at the current level.
% For \emph{vertical spaces} show the values of |\topsep|, |\itemsep|, |\parsep| and |\partopsep|.
% For \emph{horizontal spaces} show the values of |\labelwidth|, |\labelsep|, |\itemindent|, |\listparindent| and |\leftmargin|.
%
% \subsubsection{Vertical spaces}
%
% \keyexamp{topsep}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{by levels}
%
% \smallskip
%
% Set the \emph{vertical space} added to both the top and bottom of the list.
% Internally sets the value of \ics{topsep} for the current level.
% The default value for the first level of the environments
% \myenv*{enumext} and \myenv*{enumext*} are \mydim{8.0pt plus 2.0pt minus 4.0pt},
% for second level are \mydim{4.0pt plus 2.0pt minus 1.0pt}, for third and
% fourth level are \mydim{2.0pt plus 1.0pt minus 1.0pt}. For \myenv*{keyans}
% and \myenv*{keyans*} environments the default value is \mydim{4.0pt plus 2.0pt minus 1.0pt}.
%
% \smallskip
%
% \keyexamp{parsep}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{by levels}
%
% \smallskip
%
% Set the \emph{vertical space} between paragraphs within an item.
% Internally sets the value of \ics{parsep} for the current level.
% The default value for the first level of the environments \myenv*{enumext}
% and \myenv*{enumext*} are \mydim{4.0pt plus 2.0pt minus 1.0pt},
% for second level are \mydim{2.0pt plus 1.0pt minus 1.0pt}, for third and
% fourth level are \mydim{0pt}. For \myenv*{keyans} and \myenv*{keyans*}
% environments the default value is \mydim{2.0pt plus 1.0pt minus 1.0pt}.
%
% \smallskip
%
% \begin{important}*
%  In the \myenv*{enumext*} and \myenv*{keyans*} environments this value
%  is passed to |\parskip| within the \myenv{minipage} environment where
%  \emph{\enquote{item content}} is placed.
% \end{important}
%
% \smallskip
%
% \keyexamp{partopsep}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{by levels}
%
% \smallskip
%
% Set the \emph{vertical space} added, beyond \mykey{topsep}, to the \enquote{top} and \enquote{bottom}
% of the entire environment if the environment instance is preceded by a \emph{\enquote{blank
% line}} or |\par| command. Internally sets the value of \ics{partopsep} for the current level.
% The default values for first and second level in environment
% \myenv*{enumext} are \mydim{2.0pt plus 1.0pt minus 1.0pt},
% for third and fourth level are \mydim{1.0pt minus 1.0pt}.
% For the \myenv*{keyans} environment the default value is \mydim{2.0pt
% plus 1.0pt minus 1.0pt}, and for the \myenv*{keyans*} and
% \myenv*{enumext*} environments it is available but \emph{without}
% effect.
%
% \smallskip
%
% \begin{important}*
% The value of this parameter also affects the \emph{inner levels} and the
% environments \myenv*{keyans}, \myenv*{keyanspic} and \myenv*{keyans*}.
% Caution should be taken with \emph{\enquote{blank lines}} or |\par|
% command \emph{\enquote{before}} each environment or nested level when
% formatting the source code of document. \hologo{TeX} will enter \mymeta{vertical mode}
% and apply this value to the \enquote{top} and \enquote{bottom} the
% environment or nested level.
% \end{important}
%
% \smallskip
%
% \keyexamp{itemsep}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{by levels}
% Set the \emph{vertical space} between items, beyond the \mykey{parsep}.
% Internally sets the value of \ics{itemsep} for the current level.
% The default value for the first level of the environments \myenv*{enumext}
% and \myenv*{enumext*} are \mydim{4.0pt plus 2.0pt minus 1.0pt},
% for the rest of the levels are \mydim{2.0pt plus 1.0pt minus 1.0pt}.
% For \myenv*{keyans} and \myenv*{keyans*} environments the default
% value is \mydim{4.0pt plus 2.0pt minus 1.0pt}.
%
% \smallskip
%
% \begin{important}*
%   In the \myenv*{enumext*} and \myenv*{keyans*} environments this value
%   corresponds to the separation between rows.
% \end{important}
%
% \smallskip
%
% \keyexamp*{noitemsep}{value forbidden}{not used}
% This is a \emph{\enquote{meta-key}} that does not receive an argument. Set
% \mykey{itemsep} and \mykey{parsep} equal to \mydim{0pt} the entire level of environment.
%
% \smallskip
%
% \keyexamp*{nosep}{value forbidden}{not used}
% This is a \emph{\enquote{meta-key}} that does not receive an argument. Sets all keys
% for vertical spacing equal to \mydim{0pt} the entire level of environment.
%
% \smallskip
%
% \keyexamp*{base-fix}{value forbidden}{not used}
%
% \smallskip
%
% This is a \emph{\enquote{switch-key}} that does not receive an
% argument available \emph{only} for the \emph{\enquote{first level}} of environment
% \myenv*{enumext}. Fix the \emph{baseline} when an environment \myenv*{enumext}
% is nested  in \myenv*{enumext*} and there is no material between the
% |\item| and the start of the environment for example |\item \begin{enumext}|
% within the environment \myenv*{enumext*}. Internally sets the keys \mykey{topsep},
% \mykey{above} and \mykey{above}|*| at \mydim{0pt}.
%
% \smallskip
%
% \begin{important}*
%  This key is provided as a way to work around this minor issue, but you
%  should be aware that if for some reason you have the \mykey{itemindent}
%  key set in the \myenv*{enumext*} environment it will be lost and you
%  will need to adjust it using the \mykey{list-offset} key in the
%  \myenv*{enumext} environment.
% \end{important}
%
% \newpage
%
% \begin{important}*
%  The following \mymeta{keys} should be used with \emph{\enquote{caution}}, they
%  are intended to be used at the \enquote{top} and \enquote{bottom} of
%  the environment when the \mykey{columns} or \mykey{mini-env} keys do
%  not provide adequate \emph{vertical spaces}.
%  The values ​​passed can be \emph{rubber} or \emph{rigid} lengths, the
%  way they are applied is the way you differ, using the \emph{star} ‘|*|’
%  \mymeta{keys} applies |\vspace*| so that \hologo{LaTeX} does
%  \emph{not discard} this space at page break.
% \end{important}
%
% \smallskip
%
% \keyexamp{above}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{not used}
%
% \smallskip
%
% Set the \emph{extra vertical space} added, beyond \mykey{topsep}, to
% the top of the entire level of environment. This key is intended to
% give a \emph{\enquote{fine adjustment}} of the vertical space
% \emph{\enquote{above}} the environment without hindering the value of
% the \mykey{topsep} key. The space is added with |\vspace| so is
% \emph{\enquote{discardable}}.
%
% \keyexamp{above\textcolor{MediumOrchid}{*}}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{not used}
%
% \smallskip
%
% Set the \emph{extra vertical space} added, beyond \mykey{topsep}, to
% the top of the entire level of environment. This key is intended to
% give a \emph{\enquote{fine adjustment}} of the vertical space
% \emph{\enquote{above}} the environment without hindering the value of
% the \mykey{topsep} key. The space is added with |\vspace*| so is
% \emph{\enquote{not discardable}}.
%
% \smallskip
%
% \keyexamp{below}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{not used}
%
% \smallskip
%
% Set the \emph{extra vertical space} space added, beyond \mykey{topsep}, to
% the bottom of the entire level of environment. This key is intended to
% give a \emph{\enquote{fine adjustment}} of the vertical space on the
% \emph{\enquote{below}} the environment without hindering the value of
% the \mykey{topsep} key. The space is added with |\vspace| so is
% \emph{\enquote{discardable}}.
%
% \smallskip
%
% \keyexamp{below\textcolor{MediumOrchid}{*}}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{not used}
%
% \smallskip
%
% Set the \emph{extra vertical space} space added, beyond \mykey{topsep}, to
% the bottom of the entire level of environment. This key is intended to
% give a \emph{\enquote{fine adjustment}} of the vertical space on the
% \emph{\enquote{below}} the environment without hindering the value of
% the \mykey{topsep} key. The space is added with |\vspace*| so is
% \emph{\enquote{not discardable}}.
%
% \subsubsection{Horizontal spaces}
%
% \keyexamp{list-offset}{rigid length}{\mydim{0}pt}
% Sets the \emph{horizontal translation} of the entire environment level from the left edge
% of the box defined by the \mykey{labelwidth} key. Internally sets the values of
% |\leftmargin| and |\itemindent| for the current level.
%
% \smallskip
%
% \keyexamp{list-indent}{rigid length}{labelwidth + labelsep}
% Sets the \emph{indentation} of the whole environment under the box defined by
% \mykey{labelwidth} and \mykey{labelsep} keys. Internally sets the value of
% |\leftmargin| and |\itemindent| for the current level.
% If |list-indent=|\mydim{0pt} is set in the environments \myenv*{enumext}
% and \myenv*{keyans} the \mymeta{label} will be part of the text, separated
% by the value of the \mykey{labelsep} key and the \emph{first word}, in
% simple terms it will look like a \emph{\enquote{common paragraph}}.
%
% \smallskip
%
% \begin{important}*
%  The \myenv*{enumext*} and \myenv*{keyans*} environments are
%  implemented using |\makebox| and \myenv{minipage} which causes
%  \emph{\enquote{list indent}} to always be equal to the value passed to
%  \mykey{labewdith} plus \mykey{labelsep}. Passing a value to this key is
%  equivalent to setting the value for the \mykey{list-offset} key.
% \end{important}
%
% \smallskip
%
% \keyexamp{itemindent}{rigid length}{\mydim{0}pt}
%
% \smallskip
%
% Sets the extra \emph{horizontal indentation}, beyond \mykey{labelsep},
% of the \emph{\enquote{first line}} off each |\item| that is not followed
% by a \emph{\enquote{blank line}} or the |\par| command . This value must
% be greater than or equal to \mydim{0pt} and is applied internally using
% |\hspace| \emph{without} modifying the value of |\itemindent|.
%
% \smallskip
%
% \begin{important}*
%  This key is intended for the \myenv*{enumext*} and \myenv*{keyans*}
%  environments where, by their implementation, it is not possible to
%  adjust \mykey{labelwidth} and \mykey{list-indent} \emph{without}
%  modifying the output. If you use \myenv*{enumext} or \myenv*{keyans}
%  and want to get around the \emph{blank line} limitation or the |\par|
%  command followed by |\item| you can modify \mykey{labelwidth} and
%  \mykey{list-indent} and get the same effect.
% \end{important}
%
% \smallskip
%
% \keyexamp{rightmargin}{rigid length}{\mydim{0}pt}
%
% \smallskip
%
% Set the \emph{horizontal space} between the right margin of the environment and the
% right margin of the enclosing environment, the value it takes must be
% greater than or equal to \mydim{0pt}. Internally sets the value of
% \ics{rightmargin} for the current level.
%
% \smallskip
%
% \keyexamp{listparindent}{rigid length}{\mydim{0}pt}
% Sets the \emph{horizontal space} indentation, beyond \mykey{list-indent},
% for second and subsequent paragraphs within a list item. Internally
% sets the value of \ics{listparindent} for the current level.
%
% \smallskip
%
% \begin{important}*
%  In the \myenv*{enumext*} and \myenv*{keyans*} environments this value
%  is passed to |\parindent| within the \myenv{minipage} environment where
%  \emph{\enquote{item content}} is placed.
% \end{important}
%
% \smallskip
%
% \subsection{Keys for add \texttt{code}}
%
% The following \mymeta{keys} should be used with \emph{\enquote{caution}},
% they are intended to inject \mymarg{code} into different parts of the
% defined environments. We must keep in mind that the defined
% environments are based on the \myenv{list} base environment provided by
% \hologo{LaTeX} which is defined (simplified) as plain form |\list|\mymarg{arg one}\mymarg{arg two}.
% Using the \mykey{before*} key does not allow access to the \myenv{list}
% parameters defined by \myoarg{key
% \textnormal{\textcolor{gray}{=}} val}.
%
% \smallskip
%
% \keyexamp{before}{code}{not used}
% Execute \mymarg{code} \emph{\enquote{before}} the
% environment starts. The \mymarg{code} must be passed between braces, is executed
% \emph{\enquote{after}} performing all calculations related to the
% \emph{list parameters} in the environment and the parameters sets by
% \myoarg{key \textnormal{\textcolor{gray}{=}} val} that is, in the second argument of the list after setting all the parameters
% |\begin{list}|\mymarg{arg one}|{|\mymeta{arg two}\mymarg[cbc=pkgcolor,ac=araracolor]{code}|}|.
%
% \smallskip
%
% \keyexamp{before\textcolor{MediumOrchid}{*}}{code}{not used}
% Execute \mymarg{code} \emph{\enquote{before}} the
% environment starts. The \mymarg{code} must be passed between braces, is executed
% \emph{\enquote{before}} performing all calculations related to the \emph{list
% parameters} and \myoarg{key \textnormal{\textcolor{gray}{=}}
% val} sets in the environment that is,
% before the arguments defining the environment are executed:
% \mymarg[type=tt,cbc=pkgcolor,ac=araracolor]{code}|\begin{list}|\mymarg{arg
% one}\mymarg{arg two}.
%
% \smallskip
%
% \keyexamp{first}{code}{not used}
% Executes \mymarg{code} when \emph{\enquote{starting}} the
% environment. The \mymarg{code} must be passed between
% braces, is executed right \emph{\enquote{after}} all \emph{list
% parameters} are done, after the second argument of list, just before the first occurrence of \ics*{item}:
% |\begin{list}|\mymarg{arg one}\mymarg{arg two}\mymarg[cbc=pkgcolor,ac=araracolor]{code}|\item|.
%
% \smallskip
%
% \begin{important}*
% Keep in mind that the code set in this key will affect the entire
% \emph{\enquote{body}} of the environment and therefore the inner levels
% of the list and the \myenv*{keyans} environment. It is recommended to
% set this key per level.
% \end{important}
%
% \smallskip
%
% \begin{important}*
%  In the \myenv*{enumext*} and \myenv*{keyans*} environments this key
%  is executed after the \mykey{listparindent}, \mykey{parsep} and
%  \mykey{itemindent} keys within the \myenv{minipage} environment in
%  which the \emph{\enquote{item content}} is placed.
% \end{important}
%
% \smallskip
%
% \keyexamp{after}{code}{not used}
% Execute \mymarg{code} \emph{\enquote{after}} finishing the
% environment. The \mymarg{code} must be passed between braces.
%
% \subsection{Keys for \texttt{start}, \texttt{series} and \texttt{resume}}
%
% \smallskip
%
% \keyexamp{start}{integer \textnormal{\textcolor{lightgray}{\textbar}} integer expression}{\mydim{1}}
% Sets the \emph{start value} of the numbering on the current level.
% The \mymarg{integer expression} must be passed between braces, internally is evaluated and pass
% to the counter defined by \mykey{label} key on the current level, i.e. it is equivalent to enter
% |start={\dimeval{100*\value{chapter}}| or |start={100*\value{chapter}}|.
%
% \smallskip
%
% \keyexamp{start\textcolor{MediumOrchid}{*}}{integer \textnormal{\textcolor{lightgray}{\textbar}} string}{not used}
% Sets the \emph{start value} of the numbering on the current level.
% Internally \mymeta{string} is converted and passed as value to the counter defined by
% \mykey{label} key on the current level, i.e. it is equivalent to enter
% |start=5|, |start=E| or |start=v|.
%
% \smallskip
%
% The following \mymeta{keys} are \emph{\enquote{only}} available for the
% \myenv*{enumext*} environment and the \emph{\enquote{first level}} of
% the \myenv*{enumext} environment and are ignored if set when nested
% within each other.
%
% \keyexamp{series}{series name}{not used}
%
% \smallskip
%
% Stores the \emph{keys} of the \emph{optional argument} of the \emph{\enquote{first level}}
% of the environment in which it is executed in \mymarg{series
% name} which is used as an argument in the key \mykey{resume}. The \mymeta{keys}
% stored in \mymarg{series name} are not cumulative and are overwritten
% if the same \mymarg{series name} is used again.
%
% \smallskip
%
% \keyexamp{resume}{series name}{not used}
% Sets the \emph{start value} and \emph{options} for the \emph{\enquote{first
% level}} continuing the numbering of the environment in which the
% \mykey{series}|=|\mymarg{series name} key was executed. If passed
% \emph{without value} this will only set \emph{start value} continue the
% numbering from the last environment in which \mykey{series}|=|\mymarg{series name}
% or \mykey{resume}|=|\mymarg{series name} is not present and if the
% \mykey{save-ans} key is active it will continue the numbering from the
% last environment in which it was executed. The \emph{start value} can be
% overwritten using \mykey{start} or \mykey{start*} keys.
%
% \smallskip
%
% \keyexamp*{resume\textcolor{MediumOrchid}{*}}{value forbidden}{not used}
% Sets the \emph{start value} and \emph{options} for the
% \emph{\enquote{first level}} continuing the numbering of the
% environment in which the \mykey{series}|=|\mymarg{series name} or
% \mykey{resume}|=|\mymarg{series name} keys are NOT present, if the
% \mykey{save-ans} key is active it will continue the numbering from the
% last environment in which it was executed. The \emph{start value}
% can be overwritten using \mykey{start} or \mykey{start*} keys.
%
% \smallskip
%
% \begin{important}*
% For security reasons the \mykey{series} key will never save in
% \mymarg{series name} the keys \mykey{series}, \mykey{resume},
% \mykey{resume*}, \mykey{save-ans}, \mykey{save-key}, \mykey{start*} and \mykey{start}.
% When using the key \mykey{resume}|=|\mymarg{series name} it will
% have hierarchy in the \mymeta{keys} that are saved in \mymarg{series
% name}, in order to establish the value of a \mymeta{key} already saved
% in \mymarg{series name} it must be placed to the \emph{\enquote{right}}
% of \mykey{resume}|=|\mymarg{series name}, the same thing happens with
% the \mykey{resume*} key, the exception is the \mykey{save-ans} key
% that must be placed on the \emph{\enquote{left}} if you want to start
% the numbering with its value.
% The \mykey{resume} key passed \emph{\enquote{without value}} must be
% exactly \emph{\enquote{without value}}, i.e. \mykey{resume}|=| cannot
% be used and if executed before \mykey{resume*} it will affect the
% \emph{start value}.
% \end{important}
%
% \subsection{Keys for \env{multicols}}\label{key:multi}
%
% \keyexamp{columns}{integer}{\mydim{1}}
%
% \smallskip
%
% Set the \emph{number of columns} to be used by the \myenv{multicols}
% environment within the environments \myenv*{enumext} and \myenv*{keyans}. The value must be a positive
% integer less than or equal to \mydim{10}.
% In the \myenv*{enumext*} and \myenv*{keyans*} environments they
% correspond to the default number of columns (without joining) and
% internally adjust the value of |\itemwidth|.
%
% \smallskip
%
% \keyexamp{columns-sep}{rigid length}{by level}
%
% \smallskip
%
% Set the \emph{space between} columns used by the \myenv{multicols}
% environment within the environments \myenv*{enumext} and \myenv*{keyans}. Internally sets the value of
% \ics{columnsep}, by default its value is equal to the sum of the
% values set in the keys \mykey{labelwidth} and \mykey{labelsep} of the
% current level.
% In the \myenv*{enumext*} and \myenv*{keyans*} environments they
% correspond to the \emph{space between} columns (without joining) and
% internally adjust the value of |\itemwidth|.
%
% \subsection{Keys for \env{minipage}}\label{key:mini}
%
% \keyexamp{mini-env}{rigid length}{not used}
%
% \smallskip
%
% Sets the \emph{width} of the \myenv{minipage} environment on
% the \emph{\enquote{right side}}. This value added to the value set by
% the \mykey{mini-sep} key to determines the \emph{width} of the
% \myenv{minipage} environment on the \emph{\enquote{left side}}, taking
% \ics{linewidth} as the maximum reference value.
%
% \smallskip
%
% \keyexamp{mini-sep}{rigid length}{\mydim{0.3333}em}
%
% \smallskip
%
% Sets the \emph{space between} the \myenv{minipage} environment on the
% \emph{\enquote{left side}} and the \myenv{minipage} environment on
% the \emph{\enquote{right side}}. This separation is applied together
% with |\hfill|.
%
% \subsubsection{The command \cs[no-index]{miniright}}
%
% \vspace*{-1.0\baselineskip}
% \begin{function}{\miniright}
%   \begin{syntax}
%     |\begin{enumext}[mini-env=|\mymarg{rigid length}|]| \mymeta[cf=gray]{item's before} |\item \miniright| \mymeta[cf=gray]{content} |\end{enumext}|\par
%     |\begin{enumext}[mini-env=|\mymarg{rigid length}|]| \mymeta[cf=gray]{item's before} |\item \miniright*|\mymeta[cf=gray]{content} |\end{enumext}|
%   \end{syntax}
% \end{function}
%
% The \ics*{miniright} command close the \myenv{minipage} environment on
% the \emph{\enquote{left side}} and opens the \myenv{minipage} environment
% on the \emph{\enquote{right side}} by starting it with the |\centering|
% command. It must be placed \emph{\enquote{after}} the last \ics*{item}
% of the current environment and \emph{\enquote{before}} starting the
% material to be placed on the \emph{\enquote{right side}}.
%
% \smallskip
%
% The \emph{starred argument} ‘|*|’ inhibits the use of |\centering|
% command i.e. the usual \hologo{LaTeX} justification is maintained in
% the \myenv{minipage} on the \emph{\enquote{right side}}.
%
% \smallskip
%
% \subsubsection{The key \texttt{mini-right}}
%
% In the \emph{horizontal list environments} \myenv*{enumext*} and \myenv*{keyans*}
% it is not possible to use the \ics*{miniright} command and the \mykey{mini-right}
% key must be used instead.
%
% \smallskip
%
% \keyexamp{mini-right}{content}{not used}
%
% \smallskip
%
% Set the \emph{content} for the drawing or tabular to be placed in the
% \myenv{minipage} environment on the \emph{\enquote{right side}} by
% starting it with |\centering|. The \mymarg{content} must be passed between braces.
%
% \smallskip
%
% \keyexamp{mini-right\textcolor{MediumOrchid}{*}}{content}{not used}
%
% \smallskip
%
% Same as above, but \emph{without} starting with |\centering|.
%
% \smallskip
%
% \section{The storage system}\label{sec:storage system}
%
% The entire mechanism for \emph{\enquote{storing content}} it is
% activated according to \mykey{save-ans} key on the
% \emph{\enquote{first level}} of \myenv*{enumext} or \myenv*{enumext*}
% environments and it is ignored if they are established when they are
% nested inside each other. Only when this \mymeta{key} is \emph{\enquote{active}}
% the \ics*{anskey} command and the environments \myenv*{anskey*},
% \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} are available.
%
% \iffalse
%<*example>
% \fi
\vspace*{-1\baselineskip}
\begin{minipage}[t]{0.45\linewidth}
\centering
\begin{examplecode}[frame=none,mathescape=true]
\begin{enumext}[save-ans=`\mymarg{store name}`]
  \item Text \anskey{answer}
  \item Text
    \begin{keyans}
          $\cdots$
    \end{keyans}
\end{enumext}
\end{examplecode}
\end{minipage}\hfill
\begin{minipage}[t]{0.45\linewidth}
\vspace{0pt}\centering
\begin{examplecode}[frame=none,mathescape=true]
\begin{enumext}[save-ans=`\mymarg{store name}`]
  \item Text \anskey{answer}
  \item Text
    \begin{keyanspic}
          $\cdots$
    \end{keyanspic}
\end{enumext}
\end{examplecode}
\end{minipage}
% \iffalse
%</example>
% \fi
%
% By executing the key \mykey{save-ans}|=|\mymarg{store name} the entire
% \emph{\enquote{structure}} of the environment (excluding the \emph{first level})
% including the \emph{optional argument} passed to the inner levels or
% the environment nested in it, along with the \mymeta{content} passed
% to \ics*{anskey} or \myenv*{anskey*}, the current \mymeta{labels} for
% \ics*{item*} and \ics*{anspic}|*| in the environments \myenv*{keyans},
% \myenv*{keyans*} and \myenv*{keyanspic} will be \emph{\enquote{stored}}
% in a \emph{sequence} \mymarg{store name} and at the same time will be
% \emph{\enquote{stored}} (without the \emph{\enquote{structure}} or
% \emph{optional argument}) in a \emph{prop list} \mymarg{store name}.
%
% \smallskip
%
% For security reasons the \emph{optional argument} of the inner levels
% or the nested environment are \emph{filtered} by excluding all \mymeta{keys}
% related to the \emph{\enquote{storage system}} (\S\ref{subsec:storage-keys})
% along with the keys \mykey{mini-env}, \mykey{mini-sep}, \mykey{mini-right},
% \mykey{mini-right*}, \mykey{series}, \mykey{resume} and \mykey{resume*}
% when storing in \emph{sequence} \mymarg{store name} set by \mykey{save-ans} key.
%
% \subsection{Keys for storage system}\label{subsec:storage-keys}
%
% The only \mymeta{keys} available for all levels of the \myenv*{enumext}
% environment and the \myenv*{enumext*} environment are \mykey{no-store}
% and \mykey{save-key}, the rest of the \mymeta{keys} described in this
% section must be passed directly in the \emph{optional argument} of the
% \emph{\enquote{first level}} of the environment in which the key
% \mykey{save-ans} is executed. The key \mykey{save-ans} should NOT be passed
% with the command \ics*{setenumext}.
%
% \smallskip
%
% \keyexamp{save-ans}{store name}{not set}
% Sets the \emph{name} of the \emph{sequence} and \emph{prop list} in
% which the \mymarg{contents} will be \emph{\enquote{stored}} by \ics*{anskey}
% and \myenv*{anskey*} in \myenv*{enumext} and \myenv*{enumext*}
% environments and the current \mymeta{labels} for \ics*{item*} and
% \ics*{anspic}|*| in the environments \myenv*{keyans}, \myenv*{keyans*}
% and \myenv*{keyanspic}. If the \emph{sequence} or \emph{prop list}
% \mymarg{store name} does not exist, it will be created globally and
% will not be \emph{overwritten} if the key is used again.
%
% \smallskip
%
% \keyexamp{save-key}{key list}{not set}
% This key \emph{overrides} the default \emph{\enquote{stored keys}} of the
% \emph{optional argument} of the inner levels or nested environment that will
% be passed to the \emph{sequence}. The \mymeta{key list} passed to
% this key ignores any \mymeta{keys} in the \emph{\enquote{stored
% structure}} and must be passed between braces. For example, if we
% execute at a second level:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=none,mathescape=true]
\begin{enumext}[save-ans=`\mymarg{store name}`]
  \item Text \anskey{answer}
  \item Text
    \begin{enumext}[nosep, columns=2, save-key={columns=3}]
          $\cdots$
    \end{enumext}
\end{enumext}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% The \emph{\enquote{stored keys}} by default in the \emph{sequence}
% \mymarg{store name} would be |nosep, columns=2|, but using the key
% \mykey{save-key}|={columns=3}| will overwrite and the
% \emph{\enquote{stored key}} in the \emph{sequence} \mymarg{store name}
% are only |columns=3| ignoring all the others.
%
% \smallskip
%
% \keyexamp{save-sep}{text symbol}{\{, \}}
% Sets the \emph{text symbol} that will separate the current \mymeta{label}
% to the \emph{optional argument} passed to the \ics*{item*} and \ics*{anspic}|*|
% in the environments \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic}
% and storing them in the \emph{sequence} and \emph{prop list} \mymarg{store name}
% set by \mykey{save-ans} key.
% The \mymarg{text symbol} must always be passed between
% braces, whitespace ‘\verb*+ +’ is preserved within the braces and only
% affects the \emph{\enquote{stored content}} and not what is displayed
% when using the \mykey{show-ans} or \mykey{show-pos} keys.
%
% \smallskip
%
% \keyexamp*{no-store}{value forbidden}{not used}
%
% \smallskip
%
% This is a \emph{\enquote{switch-key}} that does not receive an argument
% and disables the \emph{\enquote{storing content}} in the \emph{sequence}
% and \emph{prop list} \mymarg{store name} set by \mykey{save-ans} key at
% the entire level or a nested environment in which it runs. This key
% is intended for use in internal levels or nested \myenv*{enumext} or
% \myenv*{enumext*} environments in which you want to use \myenv*{enumext}
% or \myenv*{enumext*} but \emph{\enquote{without}} using the \ics*{anskey}
% command or use \myenv*{anskey*} environment and \emph{\enquote{without}}
% interfering with the \mykey{check-ans} key.
%
% \subsubsection{Keys for \texttt{label} and \texttt{ref}}\label{subsec:label-ref}
%
% \keyexamp{save-ref}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
% Activates the \emph{\enquote{internal label and ref}} mechanism for
% referencing \emph{\enquote{stored content}} in \emph{prop list}
% \mymarg{store name} set by \mykey{save-ans} key. To reference the
% location of the \emph{\enquote{stored content}} within the environment
% you must use |\ref|\mymarg{store name \textnormal{\textcolor{red}{:}} position},
% where \mymeta{position} corresponds to the position occupied by the
% \emph{\enquote{stored content}} in the \emph{prop list} \mymarg{store name}
% returned by the \mykey{show-pos} key. For example |\ref{test:4}| will
% return |3.(b)| which corresponds to the location of the \emph{\enquote{stored content}}
% at position |4| in \emph{prop list} |test| within the environment in
% which the key \mykey{save-ans}|=test| was set.
%
% \smallskip
%
% \keyexamp{mark-ref}{symbol}{\textbackslash{}textreferencemark}
% Sets the \emph{symbol} that will be displayed by the \ics*{printkeyans}
% command only if the \mypkg{hyperref} package is detected and the
% \mykey{save-ref} key are active.
% This \emph{\enquote{symbol}} is used as a \emph{\enquote{link}} between the environment
% in which the \mykey{save-ans} key was used and the place where the
% command is executed.
%
% \subsubsection{Keys for \texttt{wrap} and \texttt{marks}}\label{subsec:wrap-display}
%
% The \mypkg*{enumext} package provides a set of \mymeta{keys} to set and
% manipulate \emph{\enquote{symbol marks}} associated with
% \emph{\enquote{answers}} ​​and how they are displayed and stored in the
% \emph{sequence} and \emph{prop list}.
%
% \smallskip
%
% The \mymeta{keys} available for the |\anskey| command and the
% \myenv*{anskey*} environment can be passed \emph{\enquote{only}} in the
% \emph{optional argument} in the \emph{\enquote{first level}} of the
% \myenv*{enumext} or \myenv*{enumext*} environment.
%
% \smallskip
%
% The \mymeta{keys} available for the \myenv*{keyans} and
% \myenv*{keyans*} environments can be passed locally in the
% \emph{optional argument}, at the \emph{\enquote{first level}} of the
% \myenv*{enumext} or \myenv*{enumext*} environment or via the
% |\setenumext| command with one minor difference, when \mymeta{keys} are passed
% through the \emph{\enquote{first level}} of the \myenv*{enumext} or
% \myenv*{enumext*} environment they are set in \emph{\enquote{both}}
% environments, but when they are passed using the |\setenumext| command
% they are set \emph{\enquote{individually}} in each environment.
%
% \smallskip
%
% \keyexamp{show-ans}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
%
% Display the \emph{symbol} set by the \mykey{mark-ans} key to the left of
% the \emph{mandatory argument} \mymeta{content} passed to the |\anskey|
% command and \mymeta{body} for the \myenv*{anskey*} environment using
% the \mykey{wrap-ans} key if set.
%
% For \ics*{item*} and \ics*{anspic}|*| the \myenv*{keyans},
% \myenv*{keyans*} and \myenv*{keyanspic} environments it will display
% the \emph{symbol} set by the \mykey{mark-ans*} key to the left of the
% current \mymeta{label} and \emph{optional argument}. If the
% \emph{optional argument} is present in \ics*{item*} or \ics*{anspic}|*|
% it will be shown using \mykey{wrap-opt} key.
%
% \subsubsection*{Keys for \texttt{\textbackslash{}anskey} and \texttt{anskey*}}
%
% \keyexamp{mark-ans}{symbol}{\textbackslash{}textasteriskcentered}
% Sets the \emph{symbol} to be displayed in the left margin for
% \ics*{anskey} command and \myenv*{anskey*} environment when using the
% key \mykey{show-ans}. The \emph{\enquote{symbol}} is placed in a box
% of width equal to the value of \mykey{labelwidth} at the current level,
% separated by the value of the key \mykey{mark-sep} and aligned by
% the value of the key \mykey{mark-pos}. This key is not affected by the
% keys \mykey{font} or \mykey{wrap-label} so if you want to apply
% \emph{styling} you have to do it directly, for example: |mark-ans={\textcolor{red}{\textbf{\textasteriskcentered}}|
%
% \smallskip
%
% \keyexamp{mark-pos}{left \textnormal{\textcolor{lightgray}{\textbar}} right \textnormal{\textcolor{lightgray}{\textbar}} center}{left}
% Sets the \emph{aligned} of the \emph{\enquote{symbol}} defined by
% \mykey{mark-ans} key for \ics*{anskey} command and \myenv*{anskey*}
% environment. The \emph{\enquote{symbol}} is aligned in a box with the
% same dimensions of the label box defined by \mykey{labelwidth} key
% on the current level and separated by the value of the \mykey{mark-sep}
% key.
%
% \smallskip
%
% \keyexamp{mark-sep}{rigid length}{labelsep}
% Sets the \emph{horizontal space} between the box containing the
% \emph{\enquote{symbol}} defined by \mykey{mark-ans} key and the
% \emph{mandatory argument} \mymeta{content} passed to the \ics*{anskey}
% command and the \emph{body} in \myenv*{anskey*} environment.
%
% \smallskip
%
% \keyexamp{wrap-ans}{code{} \space\usebox{\hashbox} more code}{\textbackslash{}fbox+\textbackslash{}parbox\{\#1\}}
% Wraps the \emph{mandatory argument} \mymeta{content} passed to the \ics*{anskey}
% and the \mymeta{body} in \myenv*{anskey*} environment referenced by |{#1}|
% when using the \mykey{show-ans} or \mykey{show-pos} keys.
% The \mymarg{code} must be passed between  braces and only affects how the
% \emph{argument} or \emph{body} is displayed and NOT the \emph{\enquote{stored
% content}} in the \emph{sequence} and \emph{prop list} \mymarg{store
% name} set by \mykey{save-ans} key. If this key is passed using
% \ics*{setenumext} it is necessary to use double ‘|{##1}|’.
%
% \subsubsection*{Keys for \texttt{keyans}, \texttt{keyans*} and \texttt{keyanspic}}
%
% \keyexamp{mark-ans\textcolor{MediumOrchid}{*}}{symbol}{\textbackslash{}textasteriskcentered}
% Sets the \emph{symbol} to be displayed in the left margin for
% \ics*{item*} and \ics*{anspic}|*| for the \myenv*{keyans}, \myenv*{keyans*}
% and \myenv*{keyanspic} environments when using the key \mykey{show-ans}.
% The \emph{\enquote{symbol}} is placed in a box of width equal to the value of
% \mykey{labelwidth} of the environment in which it is executed, separated by the value of the
% key \mykey{mark-sep*} and aligned by the value of the key
% \mykey{mark-pos*}. This key is not affected by the keys \mykey{font} or
% \mykey{wrap-label} so if you want to apply \emph{styling} you have to do it
% directly, for example: |mark-ans*={\textcolor{red}{\textbf{\textasteriskcentered}}|.
%
% \smallskip
%
% \keyexamp{mark-pos\textcolor{MediumOrchid}{*}}{left \textnormal{\textcolor{lightgray}{\textbar}} right \textnormal{\textcolor{lightgray}{\textbar}} center}{left}
% Sets the \emph{aligned} of the \emph{\enquote{symbol}} defined by
% \mykey{mark-ans*} key for the \myenv*{keyans}, \myenv*{keyans*}
% and \myenv*{keyanspic} environments. The \emph{\enquote{symbol}} is
% aligned in a box with the same dimensions of the label box defined by
% \mykey{labelwidth} key of the environment in which it is executed and
% separated by the value of the \mykey{mark-sep*} key.
%
% \smallskip
%
% \keyexamp{mark-sep\textcolor{MediumOrchid}{*}}{rigid length}{labelsep}
% Sets the \emph{horizontal space} between the box containing the
% \emph{\enquote{symbol}} defined by \mykey{mark-ans*} key and the current \mymeta{label} for
% \ics*{item*} and \ics*{anspic}|*| in the \myenv*{keyans}, \myenv*{keyans*}
% and \myenv*{keyanspic} environments.
%
% \smallskip
%
% \keyexamp{wrap-ans\textcolor{MediumOrchid}{*}}{code{} \space\usebox{\hashbox} more code}{not used}
% Wraps the \emph{current} \mymeta{label} when using the \mykey{show-ans}
% key for \ics*{item*} and \ics*{anspic}|*| referenced by |{#1}| in the
% \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} environments
% after executing the \mykey{align} and \mykey{font} keys.
% The \mymarg{code} must be passed between braces and \emph{only} affects
% how the \mymeta{label} is displayed and NOT the \emph{\enquote{stored label}}
% in the \emph{sequence} and \emph{prop list} \mymarg{store name} set by
% \mykey{save-ans} key. This key overwrites the key \mykey{wrap-label}
% and if is passed using \ics*{setenumext} it is necessary to use double ‘|{##1}|’.
% For example, if you want the \mymeta{label} to be displayed in red when
% using \mykey{show-ans} you just set |wrap-ans*={\textcolor{red}{#1}}|.
%
% \smallskip
%
% \keyexamp{wrap-opt}{code{} \space\usebox{\hashbox} more code}{[\{\#1\}]}
% Wraps the \emph{optional argument} passed to the
% \ics*{item*} and \ics*{anspic}|*| referenced by |{#1}|
% in the \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic}
% environments when using the \mykey{show-ans} or \mykey{show-pos} keys.
% The \mymarg{code} must be passed between braces
% and only affects the current \emph{optional argument} and NOT the
% \emph{\enquote{stored content}} in the \emph{sequence} and \emph{prop list}
% \mymarg{store name} set by \mykey{save-ans} key.
% If this key is passed using \ics*{setenumext} it is necessary to use double ‘|{##1}|’.
%
% \subsubsection{Keys for debug and checking}
%
% \keyexamp{show-pos}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
%
% \smallskip
%
% Displays the \emph{position} occupied by the \emph{\enquote{stored content}} by
% \ics*{anskey}, \myenv*{anskey*}, \ics*{item*} and \ics*{anspic}|*| in the
% \emph{prop list} \mymarg{store name} set by \mykey{save-ans} key.
% This position is used by the \ics*{getkeyans} command and by the |\ref|
% command if the \mykey{save-ref} key is active.
%
% \smallskip
%
% \keyexamp{check-ans}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
%
% \smallskip
%
% Enables the \emph{checking answer} mechanism displaying an
% appropriate message on the terminal. This key works under the logic
% that each \ics*{item} or \ics*{item*} that does not open an
% inner level or nested environment contains \emph{\enquote{only one
% answer}} or \emph{\enquote{only one execution}} of the \ics*{anskey}
% or \myenv*{anskey*}. It is intended to be used in conjunction with the
% \mykey{no-store} key.
%
% \subsection{The command \cs[no-index]{anskey}}
% \label{sec:anskey}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{\anskey}
%   \begin{syntax}
%    \cmdexamp{anskey}[keys]{content}
%   \end{syntax}
%  The command \ics*{anskey} takes a mandatory non empty argument \mymarg{content}
%  and \emph{\enquote{stores}} it in the \emph{sequence} and \emph{prop
%  list} \mymarg{store name} set by \mykey{save-ans} key.
%  By design the command cannot be nested or passed \emph{verbatim material} in the
%  argument and it is assumed that each \emph{numbered} |\item| or |\item*| within the
%  environment in which it is active it has a \emph{\enquote{single
%  execution}} of |\anskey| unless |\item| or |\item*| open a nested level
%  or use the \mykey{no-store} key.
%
%  \smallskip
%
%  If \mykey{save-ref} key are active and the
%  \mypkg{hyperref}\cite{hyperref} package is detected, |\hyperlink| and
%  |\hypertarget| will be used, otherwise the usual \emph{\enquote{label
%  and ref}} system provided by \hologo{LaTeX} will be used.
% \end{function}
%
% \smallskip
%
% The \ics*{anskey} command is available for all levels of the
% \myenv*{enumext} environment and the \myenv*{enumext*} environment, but
% is disabled for the \myenv*{keyans}, \myenv*{keyans*} and
% \myenv*{keyanspic} environments.
%
% \subsubsection{Keys for \cs[no-index]{anskey}}
%
% By default the \emph{mandatory argument} \mymeta{content} passed to |\anskey|
% when \emph{\enquote{storing}} in the \emph{sequence} \mymarg{store name}
% has the form |\item| \mymeta{content}, the following \mymeta{keys} allow
% modifying the way in which it is \emph{\enquote{stored}} in the \emph{sequence}.
%
% \smallskip
%
% \keyexampcmd*{break-col}{value forbidden}{not used}
%
% \smallskip
%
% Stores \mymarg{content} in the \emph{sequence} \mymarg{store name} of
% the form \ics{columnbreak} |\item| \mymeta{content}.
%
% \smallskip
%
% \keyexampcmd{item-join}{columns}{not set}
%
% \smallskip
%
% Set the \emph{number of columns} to be used for |\item|\myparg{columns} and stores \mymarg{content} in the \emph{sequence}
% \mymarg{store name} of the form |\item|\myparg{columns} \mymeta{content}.
%
% \smallskip
%
% \keyexampcmd*{item-star}{value forbidden}{not used}
%
% \smallskip
%
% Stores \mymarg{content} in the \emph{sequence} \mymarg{store name} of
% the form |\item*| \mymeta{content}.
%
% \keyexampcmd{item-sym\textcolor{MediumOrchid}{*}}{symbol}{not set}
%
% \smallskip
%
% Sets the \emph{symbol} for |\item*| when using the key
% \mykeycmd{item-star} and stores \mymarg{content} in the \emph{sequence}
% \mymarg{store name} of the form |\item*|\myoarg{symbol} \mymeta{content}.
% The \emph{symbol} can be in text or math mode, for example
% \mykeycmd{item-sym*}|={$\ast$}| stores |\item*||[$\ast$]| \mymeta{content}.
%
% \smallskip
%
% \keyexampcmd{item-pos\textcolor{MediumOrchid}{*}}{rigid length}{not set}
% Sets the \emph{offset} for |\item*| when using the keys
% \mykeycmd{item-star} and \mykeycmd{item-sym*} and stores \mymarg{content} in the \emph{sequence}
% \mymarg{store name} of the form |\item*|\myoarg{symbol}\myoarg{offset} \mymeta{content}.
%
% \subsubsection*{Example}
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\begin{enumext}[save-ans=test,show-ans=true]
  \item* Text containing our instructions or questions. `\ics*{anskey}\mymarg{first answer}`
  \item Text containing our instructions or questions.
    \begin{enumext}
      \item Question.`\ics*{anskey}\mymarg{second answer}`
    \end{enumext}
  \item Text containing our instructions or questions. `\ics*{anskey}\mymarg{third answer}`
  \item Text containing our instructions or questions. `\ics*{anskey}\mymarg{fourth answer}`
\end{enumext}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \begin{enumext}[save-ans=test,mark-ans={\oldtextasteriskcentered},show-ans=true,columns=2,nosep]
%   \item* Text containing our instructions or questions.\anskey{first answer}
%   \item Text containing our instructions or questions.
%     \begin{enumext}
%       \item Question.\anskey{second answer}
%     \end{enumext}
%   \item Text containing our instructions or questions. \anskey{third answer}
%   \item Text containing our instructions or questions. \anskey{fourth answer}
% \end{enumext}
%
% \subsection{The environment \env{anskey*}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{anskey*}
%   \begin{syntax}
%     |\begin{anskey*}|\myoarg{key \textnormal{\textcolor{gray}{=}} val} \mymeta{body content} |\end{anskey*}|
%   \end{syntax}
%   The environment \myenv*{anskey*} takes a mandatory \mymarg{body content}
%   and \emph{\enquote{stores it}} in the \emph{sequence} and \emph{prop
%   list} \mymarg{store name} set by \mykey{save-ans} key. If \mykey{save-ref}
%   key are active and the \mypkg{hyperref}\cite{hyperref} package is
%   detected |\hyperlink| and |\hypertarget| will be used, otherwise the
%   usual \emph{\enquote{label and ref}} system provided by \hologo{LaTeX} will be used.
% \end{function}
%
% \smallskip
%
% By design the environment cannot be nested but full supports
% \emph{\enquote{verbatim material}} in the \mymeta{body} and it is assumed
% that \emph{\enquote{each numbered}} |\item| or |\item*| within the
% environment in which it is active it has a \emph{\enquote{single
% execution}} unless |\item| or |\item*| open a nested level
% or use the \mykey{no-store} key.
%
% \smallskip
%
% The \myenv*{anskey*} environment is implemented using the \mypkg{scontents}
% package, |\begin{anskey*}| and |\end{anskey*}| must be in different lines,
% all \mymeta{keys} must be passed separated by commas and \enquote{without separation}
% of the start of the environment.
%
% \smallskip
%
% Comments \enquote{\textcolor{gray}{\%}} or \enquote{any character}
% after |\begin{anskey*}| or \myoarg{key \textnormal{\textcolor{gray}{=}} val}
% on the same line are NOT supported, the package \mypkg{scontents} will return an
% \enquote{error} message if this happens. In a similar way comments
% \enquote{\textcolor{gray}{\%}} or \enquote{any character} after %
% |\end{anskey*}| on the same line the package \mypkg{scontents} will
% return a \enquote{warning} message.
%
% \subsubsection{Keys for \texttt{anskey*}}
%
% The \myenv*{anskey*} environment uses the same \mymeta{keys} as the
% \ics*{anskey} command  next to the \mymeta{keys} inherited from package
% \mypkg{scontents}. The environment is available for all levels of the
% \myenv*{enumext} environment and the \myenv*{enumext*} environment, but
% it is disabled for the \myenv*{keyans}, \myenv*{keyans*} and
% \myenv*{keyanspic} environments.
%
% \smallskip
%
% \keyexampenv{write-env}{file.ext}{not used}
%
% \smallskip
%
% Sets the name of the \mymeta{external file} in which the \mymeta{contents} of
% the environment will be written. The \mymeta{file.ext} will be created
% in the working directory, relative or absolute paths are not supported. If \mymeta{file.ext}
% does not exist, it will be created or overwritten if the \mykey{overwrite} key is used.
%
% \smallskip
%
% \keyexampenv{overwrite}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
% Sets whether the \mymeta{file.ext} generated by \mykey{write-env}
% from the \myenv*{anskey*} environment will be rewritten.
%
% \newpage
%
% \keyexampenv{force-eol}{true \textnormal{\textcolor{lightgray}{\textbar}} false}{false}
%
% \smallskip
%
% Sets if the \emph{end of line} for the \mymeta{stored content} is hidden or not.
% This key is necessary only if the last line is the closing of some
% environment defined by the \mypkg{fancyvrb} package as |\end{|\myenv{Verbatim}|}|
% or another environment that does not support a comments \enquote{\ttfamily\textcolor{gray}{\%}}
% after closing |\end{|\myenv{Verbatim}|}%|.
%
% \smallskip
%
% \begin{important}*
%  For security reasons the keys |store-env|, |print-env| and |write-out|
%  they have been left disabled. It is recommended that you review the
%  \mypkg{scontents}\cite{scontents} documentation to understand how
%  the keys described here work.
% \end{important}
%
% \subsubsection*{Example}
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\begin{enumext}[save-ans=test,show-pos=true,start=5]
  \item* Text containing our instructions or questions.

    \begin{anskey*}[item-star]
      `\mymeta{first answer}`
    \end{anskey*}

  \item Text containing our instructions or questions.

    \begin{enumext}
      \item Question.
        \begin{anskey*}
          `\mymeta{second answer}`
        \end{anskey*}
    \end{enumext}

  \item Text containing our instructions or questions.

    \begin{anskey*}
      `\mymeta{third answer}`
    \end{anskey*}

  \item Text containing our instructions or questions.

    \begin{anskey*}
      `\mymeta{fourth answer}`
    \end{anskey*}
\end{enumext}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \begin{enumext}[save-ans=test,show-pos=true,columns=2,nosep,start=5]
%   \item* Text containing our instructions or questions.
%      \begin{anskey*}
%        First answer with \verb+verbatim+
%      \end{anskey*}
%   \item Text containing our instructions or questions.
%     \begin{enumext}
%       \item Question.\anskey{second answer}
%     \end{enumext}
%   \item Text containing our instructions or questions. \anskey{third answer}
%   \item Text containing our instructions or questions. \anskey{fourth answer}
% \end{enumext}
%
% \subsection[The environment \texttt{keyans}]{The environments \env{keyans} and \env{keyans*}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{keyans,keyans*}
%   \begin{syntax}
%     |\begin{keyans}|\myoarg{key \textnormal{\textcolor{gray}{=}} val} \ics*{item} \ics*{item}\myoarg{custom} \ics*{item*} \ics*{item*}\myoarg{content} |\end{keyans}|\par
%     |\begin{keyans*}|\myoarg{key \textnormal{\textcolor{gray}{=}} val} \ics*{item} \ics*{item}\myoarg{custom} \ics*{item*} \ics*{item*}\myoarg{content} |\end{keyans*}|
%   \end{syntax}
%  The \myenv*{keyans} and \myenv*{keyans*} environments are
%  \emph{\enquote{enumerated list}} environments designed for
%  \emph{\enquote{multiple choice}} questions activated by the \mykey{save-ans} key.
%  This environments can NOT be nested and must always be at the
%  \emph{\enquote{first level}} of the \myenv*{enumext} environment, the
%  commands \ics*{item} and \ics*{item}\myoarg{custom} work in the usual
%  and the command |\item|\myparg{columns} is available for the \myenv*{keyans*} environment.
%
%  \smallskip
%
%   \begin{important}*
%     The behavior of |\item*| in \myenv*{keyans} and \myenv*{keyans*} environments
%     is NOT the same as in the \myenv*{enumext} or \myenv*{enumext*} environments.
%   \end{important}
% \end{function}
%
% \iffalse
%<*example>
% \fi
\vspace*{-1\baselineskip}
\begin{minipage}[t]{0.45\linewidth}
\begin{examplecode}[frame=none]
\begin{enumext}[save-ans=test]
  \item `\mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
    \begin{keyans}`\myoarg{key \textnormal{\textcolor{gray}{=}} val}`
      \item `\mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
      \item `\myoarg{custom} \mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
      \item* `\mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
      `\ics*{item*}\myoarg{content} \mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
    \end{keyans}
\end{enumext}
\end{examplecode}
\end{minipage}
\hfill
\begin{minipage}[t]{0.45\linewidth}
\begin{examplecode}[frame=none]
\begin{enumext}[save-ans=test]
  \item `\mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
    \begin{keyans*}`\myoarg{key \textnormal{\textcolor{gray}{=}} val}`
      \item `\mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
      \item `\myoarg{custom} \mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
      \item* `\mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
      `\ics*{item*}\myoarg{content} \mymeta[type=tt,ac=lightgray,cf=gray]{item content}`
    \end{keyans*}
\end{enumext}
\end{examplecode}
\end{minipage}
% \iffalse
%</example>
% \fi
%
% The \mymeta{keys} set in the \emph{optional argument} of the environment are the same
% (almost) as those of the \myenv*{enumext} and \myenv*{enumext*}
% environments and have \emph{higher precedence} than those set by
% \ics*{setenumext}\myoarg{keyans}\mymarg{key \textnormal{\textcolor{gray}{=}} val} or
% \ics*{setenumext}\myoarg{keyans\textnormal{\textcolor{MediumOrchid}{\texttt{*}}}}\mymarg{key \textnormal{\textcolor{gray}{=}} val}.
% If the \emph{optional argument} is not passed or the \mymeta{keys}
% are not set by \ics*{setenumext}, the default values will be the same
% as the \emph{\enquote{second level}} of the \myenv*{enumext} environment
% with the difference in the \mymeta{label} which will be set to \mykey{label}=\ilabel{Alph*)}.
%
% \smallskip
%
% The keys \mykey{mark-ans*}, \mykey{mark-pos*}, \mykey{mark-sep*}, \mykey{save-sep},
% \mykey{wrap-opt}, \mykey{wrap-ans*}, \mykey{show-ans} and \mykey{show-pos}
% are available for both environments.
%
% \subsubsection[The \texttt{\textbackslash item*} in \texttt{keyans}]{The \cs[no-index]{item*} in \texttt{keyans} and \texttt{keyans*}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{\item*}
%   \begin{syntax}
%     \ics*{item*}
%     \ics*{item*}\myoarg{content}
%   \end{syntax}
%    The \ics*{item*} and \ics*{item*}\myoarg{content} command \emph{\enquote{store}}
%    the current \mymeta{label} set by \mykey{label} key next to the \emph{optional argument} \mymeta{content}
%    in \emph{sequence} and \emph{prop list} \mymarg{store name} set by
%    \mykey{save-ans} key in the \emph{\enquote{first level}} of the
%    \myenv*{enumext} or \myenv*{enumext*} environments.
% \end{function}
%
% The \emph{starred argument} ‘|*|’ cannot be separated by spaces ‘\verb*| |’
% from the command, i.e. \ics*{item*} and the \emph{optional argument}
% does \enquote{NOT} support \emph{verbatim content}. By design it is
% assumed that the |\item*| will only appear \emph{\enquote{once}}
% within the environment.
%
% \subsubsection*{Example}
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\begin{enumext}[save-ans=test,columns=2,show-ans=true]
  \item Text containing a question.

    \begin{keyans*}[nosep,columns=2]
      \item Choice
      \item* Correct choice
      \item Choice
      \item Choice
      \item Choice
    \end{keyans*}

  \item Text containing a question and image.

    \begin{keyans}[nosep,mini-env={0.4\linewidth}]
      \item Choice
      \item Choice
      \item Choice
      \item Choice
      `\ics*{item*}\myoarg{note}` Correct choice
      \miniright
      \includegraphics[scale=0.25]{example-image-a}
      Some text
    \end{keyans}
\end{enumext}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \begin{enumext}[save-ans=test,mark-ans*={\oldtextasteriskcentered},show-ans=true,columns=2,nosep]
%  \item Text containing a question.
%
%    \begin{keyans*}[nosep,columns=2]
%      \item Choice
%      \item* Correct choice
%      \item Choice
%      \item Choice
%      \item Choice
%    \end{keyans*}
%
%   \item Text containing a question and image.
%
%     \begin{keyans}[nosep,mini-env={0.4\linewidth}]
%       \item Choice
%       \item Choice
%       \item Choice
%       \item Choice
%       \item*[note] Correct choice
%       \miniright
%       \includegraphics[scale=0.15]{example-image-a}
%
%       Some text
%     \end{keyans}
% \end{enumext}
%
% \subsection{The environment \texttt{keyanspic}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{keyanspic}
%   \begin{syntax}
%     |\begin{keyanspic}|\myoarg{key \textnormal{\textcolor{gray}{=}} val} \ics*{anspic}|*|\myoarg{content}\mymarg{drawing or tabular} |\end{keyanspic}|
%   \end{syntax}
%  The \myenv*{keyanspic} environment is an \emph{\enquote{enumerated
%  list}} environment activated by the \mykey{save-ans} key that has the
%  same configuration for \emph{\enquote{spacing}} and \mymeta{label}
%  as the \myenv*{keyans} environment that uses the |\anspic| command
%  instead of |\item|. It is intended for placing \emph{drawings or tabular}
%  with \mymeta{label} centered \emph{above} or \emph{below} in a \emph{single line}
%  or \emph{upper and lower} layout style.
%
%  \smallskip
%
%  When the \myenv*{keyanspic} environment is used \emph{without keys}
%  the \mymeta{labels} are centered \emph{below} the \emph{drawings
%  or tabular} in a \emph{single line} layout style.
% \end{function}
%
% A representation of the output can be seen in the figure \ref{fig:keyanspicdoc}.
%
% \begin{figure}[ht]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     % space above
%     \draw[color=white] (7.0,6.10) rectangle (17.5,6.5) node[pos=.5,text=black]%
%       { \textcolor{lightgray}{\texttt{number of drawings or tabular upper}} };
%     \draw[color=white] (7.0,4.5) rectangle (17.5,4.9) node[pos=.5,text=black]%
%       { \textcolor{optcolor}{\texttt{layout-sep}} }; %%%[+itemsep]
%     \draw[color=white] (7.0,2.9) rectangle (17.5,3.3) node[pos=.5,text=black]%
%       { \textcolor{lightgray}{\texttt{number of drawings or tabular lower}} };
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (17.5,6.85) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \textcolor{blue}{\emph{item text above the keyanspic environment}}
%        \end{tabular}};% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.25) rectangle (10.5,6.10) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \texttt{above one} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,4.9) rectangle (10.5,5.25) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (10.5,5.25) rectangle (14,6.10) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \texttt{above two} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (10.5,4.9) rectangle (14,5.25) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (14,5.25) rectangle (17.5,6.10) node[pos=.5,text=black]%
%      {\begin{tabular}{c}
%          \texttt{above three} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (14,4.9) rectangle (17.5,5.25) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,3.65) rectangle (12.25,4.5) node[pos=.5,text=black]%
%      {\begin{tabular}{c}
%          \texttt{below one} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,3.3) rectangle (12.25,3.65) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (12.25,3.65) rectangle (17.5,4.5) node[pos=.5,text=black]%
%      {\begin{tabular}{c}
%          \texttt{below two} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (12.25,3.3) rectangle (17.5,3.65) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,2.55) rectangle (5.0,2.9);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,2.55) rectangle (7.0,2.9);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,2.55) rectangle (17.5,2.9) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \textcolor{blue}{\emph{item text below the keyanspic environment}}
%        \end{tabular}};% item width
%   \end{tikzpicture}
%   \caption{Representation of the \myenv*{keyanspic} environment with \mykey{layout-sty}=\mymarg{3, 2} in \mypkg*{enumext}.}
%   \label{fig:keyanspicdoc}
% \end{figure}
%
% \smallskip
%
% This environment cannot be nested and must \emph{always} be at the
% \emph{\enquote{first level}} of the \myenv*{enumext} environment, the
% \ics*{item} command is disabled and \mymeta{keys} cannot be set using
% |\setenumext|.
%
% \subsubsection{Keys for \texttt{keyanspic}}
%
% \keyexamp{label-pos}{above \textnormal{\textcolor{lightgray}{\textbar}} below}{below}
%
% \smallskip
%
% Set the \emph{position} of \mymeta{label} to be centered
% \enquote{above} or \enquote{below} \emph{drawings} or \emph{tabular}
% when the |\anspic| command is executed.
%
% \smallskip
%
% \keyexamp{label-sep}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{internal adjustment}
%
% \smallskip
%
% Set the \emph{vertical spacing} between the \mymeta{label} centered
% \enquote{above} or \enquote{below} and \emph{drawings} or \emph{tabular}
% when running the |\anspic| command.
%
% \keyexamp{layout-sty}{n° upper \textnormal{\textcolor{gray}{,}} n° lower}{not set}
%
% \smallskip
%
% Set the \emph{number} of \emph{drawings} or \emph{tabular} that will be
% distributed \enquote{upper} and \enquote{lower} within the environment
% when executing the |\anspic| command. The value must be passed in braces
% and if not set or the \mymeta{nº lower} is omitted the \emph{drawings}
% or \emph{tabular} will be put on a \emph{single line}.
%
% \smallskip
%
% \keyexamp{layout-sep}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{adjusted parsep from keyans}
%
% \smallskip
%
% Set the \emph{vertical separation} between the number of
% \emph{drawings} or \emph{tabular} placed at the \enquote{upper} and
% \enquote{lower} within the environment when executing the |\anspic|
% command. Internally adjusts the \mykey{parsep} value taken from the
% \myenv*{keyans} environment.
%
% \smallskip
%
% \keyexamp{layout-top}{rubber length \textnormal{\textcolor{lightgray}{\textbar}} rigid length}{adjusted topsep from keyans}
%
% \smallskip
%
% Set the \emph{vertical space} added to both the top and bottom of the environment.
% Internally adjust the value of \mykey{topsep} taken from \myenv*{keyans} environment.
%
% \smallskip
%
% The keys \mykey{mark-ans*}, \mykey{mark-pos*}, \mykey{mark-sep*}, \mykey{save-sep},
% \mykey{wrap-opt}, \mykey{wrap-ans*}, \mykey{show-ans} and \mykey{show-pos}
% are available for this environment.
%
% \subsubsection{The command \cs[no-index]{anspic}}
%
% \vspace*{-\baselineskip}
%
% \begin{function}{\anspic}
%   \begin{syntax}
%      \cmdexamp{anspic}{drawing or tabular}
%      \cmdexamp[*]{anspic}[content]{drawing or tabular}
%   \end{syntax}
%  The \ics*{anspic} command take three arguments, the \emph{starred
%  argument} ‘|*|’ store the current \mymeta{label} next to the
%  \emph{optional argument} \mymeta{content} in \emph{sequence} and
%  \emph{prop list} \mymarg{store name} set by \mykey{save-ans} key.
% \end{function}
%
% \smallskip
%
% The \emph{starred argument} ‘|*|’ cannot be separated by spaces ‘\verb*| |’
% from the command, i.e. \ics*{anspic}|*| and the \emph{optional argument}
% does \enquote{NOT} support \emph{verbatim content}. By design it
% is assumed that the \emph{starred argument} ‘|*|’ will only
% appear \emph{\enquote{once}} within the environment.
%
% \subsubsection*{Example}
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\begin{enumext}[save-ans=test,show-ans=true,nosep]
  \item Question with images and labels below.

    \begin{keyanspic}[layout-sty={3,2}]
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic{\includegraphics[scale=0.15]{example-image-b}}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic*[note]{\includegraphics[scale=0.15]{example-image-a}}
    \end{keyanspic}

  \item Question with images and labels above.

    \begin{keyanspic}[label-pos=above, layout-sty={3,2},layout-sep=0.25cm]
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic{\includegraphics[scale=0.15]{example-image-b}}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic*[note]{\includegraphics[scale=0.15]{example-image-a}}
    \end{keyanspic}

  \item Question with images and labels below on a single line.

    \begin{keyanspic}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic{\includegraphics[scale=0.15]{example-image-b}}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic{\includegraphics[scale=0.15]{example-image-a}}
      \anspic*[note]{\includegraphics[scale=0.15]{example-image-a}}
    \end{keyanspic}

\end{enumext}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \newpage
%
% \begin{enumext}[save-ans=test, mark-ans*={\oldtextasteriskcentered},show-ans=true,nosep, before={\setenumext[keyans]{nosep,parsep=5mm}}]
% \item Question with images and labels below.
%    \begin{keyanspic}[layout-sty={3,2}]
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic{\includegraphics[scale=0.15]{example-image-b}}
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic*[note]{\includegraphics[scale=0.15]{example-image-a}}
%    \end{keyanspic}
% \item Question with images and labels above.
%    \begin{keyanspic}[label-pos=above, layout-sty={3,2},layout-sep=0.25cm,layout-top=10pt]
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic{\includegraphics[scale=0.15]{example-image-b}}
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic*[note]{\includegraphics[scale=0.15]{example-image-a}}
%    \end{keyanspic}
% \item Question with images and labels below on a single line.
%    \begin{keyanspic}[layout-top=10pt]
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic{\includegraphics[scale=0.15]{example-image-b}}
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic{\includegraphics[scale=0.15]{example-image-a}}
%      \anspic*[note]{\includegraphics[scale=0.15]{example-image-a}}
%    \end{keyanspic}
% \end{enumext}
%
% \smallskip
%
% \begin{important}
%  Remember to pass the |alt=|\mymarg{description} key to the |\includegraphics|
%  command when creating a \emph{tagged} PDF.
% \end{important}
%
% \subsection{Printing stored content}
%
% \subsubsection{The command \cs[no-index]{getkeyans}}
% \label{sec:getkeyans}
%
% \vspace*{-10pt}
%
% \begin{function}{\getkeyans}
%   \begin{syntax}
%      \cmdexamp{getkeyans}{store name \textnormal{\textcolor{red}{:}} position}
%   \end{syntax}
%   The command \ics*{getkeyans} prints the \emph{\enquote{stored content}}
%   in \emph{prop list} \mymarg{store name} defined by
%   \mykey{save-ans} key in the \mymeta{position} returned by the
%   \mykey{show-pos} key.
%
%  \smallskip
%
%   The \emph{\enquote{stored content}} can only be accessed \emph{after}
%   it is stored, if \mymarg{store name} does not exist the command
%   will return an error.
% \end{function}
%
%  \smallskip
%
% The form taken by the argument \mymarg{store name \textnormal{\textcolor{red}{:}} position}
% is the same as that used to generate the \emph{\enquote{internal
% label and ref}} system when \mykey{save-ref} key are active, so to
% refer to a \emph{\enquote{stored content}}. For example
% |\getkeyans{test:4}| will return the \emph{\enquote{stored content}}
% at position |4| of the environment in which the key |save-ans=test|
% was set.
%
% \subsubsection{The command \cs{foreachkeyans}}\label{sec:foreachkeyans}
%
% \vspace*{-10pt}
%
% \begin{function}{\foreachkeyans}
%   \begin{syntax}
%     \cmdexamp{foreachkeyans}[key \textnormal{\textcolor{gray}{=}} val]{store name}
%   \end{syntax}
% \end{function}
%
% The command \ics*{foreachkeyans} goes through and executes the command |\getkeyans|
% on the contents in \emph{prop list} \mymarg{store name}. If you pass without options run
% |\getkeyans| on all contents in \emph{prop list} \mymarg{store name}.
%
% \subsubsection*{Options for command}
% \label{sec:optcmdforeach}
%
% \keyexampcmd{sep}{code}{\{; \}}[foreachkeyans]
%
% \smallskip
%
% Establishes the \emph{separation} between \emph{\enquote{each}} \mymarg{content} stored in \emph{prop list} \mymarg{store name}.
% For example, you can use \mykeycmd[foreachkeyans]{sep}|={\\[10pt]}| for vertical separation of stored
% contents.
%
% \smallskip
%
% \keyexampcmd{step}{integer}{\mydim{1}}[foreachkeyans]
%
% \smallskip
%
% Sets the \emph{step} (increment) applied to the value set by key \mykeycmd[foreachkeyans]{start}
% for \emph{\enquote{each}} \mymarg{content} stored in \emph{prop list} \mymarg{store name}. The value must be a
% \mymeta{positive integer}.
%
% \keyexampcmd{start}{integer}{\mydim{1}}[foreachkeyans]
%
% \smallskip
%
% Sets the \emph{position} of the \emph{prop list} \mymarg{store name} from which execution
% will start. The value must be a \mymeta{positive integer}.
%
% \keyexampcmd{stop}{integer}{\mydim{0}}[foreachkeyans]
%
% \smallskip
%
% Sets the \emph{position} of the \emph{prop list} \mymarg{store name} from which execution
% will finish. The value must be a \mymeta{positive integer}.
%
% \keyexampcmd{before}{code}{empty}[foreachkeyans]
%
% \smallskip
%
% Sets the \mymarg{code} that will be executed \mymeta{before} each \mymarg{content} stored
% in \emph{prop list} \mymarg{store name}. The \mymarg[type=tt]{code} must be passed between braces.
%
% \keyexampcmd{after}{code}{empty}[foreachkeyans]
%
% \smallskip
%
% Sets the \mymarg{code} that will be executed \mymeta{after} each \mymarg{content} stored
% in \emph{prop list} \mymarg{store name}. The \mymarg{code} must be passed between braces.
%
% \keyexampcmd{wrapper}{code{} \space\usebox{\hashbox} more code}{empty}[foreachkeyans]
%
% \smallskip
%
% Wraps the \mymarg{content} stored in \emph{prop list} \mymarg{store name} referenced by |{#1}|.
% The \mymarg{code} must be passed between braces. For example
% |\foreachkeyans[wrapper={\makebox[1em][l]{#1}}]|\mymarg{store name}.
%
% \subsubsection{The command \cs[no-index]{printkeyans}}\label{sec:printkeyans}
%
% \vspace*{-10pt}
%
% \begin{function}{\printkeyans}
%   \begin{syntax}
%      \cmdexamp{printkeyans}{store name}
%      \cmdexamp{printkeyans}[keys]{store name}
%      \cmdexamp[*]{printkeyans}[keys]{store name}
%   \end{syntax}
%   The command \ics*{printkeyans} prints \emph{\enquote{all stored content}}
%   in \emph{sequence} \mymarg{store name} defined by \mykey{save-ans}
%   key placing this inside the \myenv*{enumext} or \myenv*{enumext*}
%   environment if the \emph{starred argument} ‘|*|’ is used.
%
%   \smallskip
%
%   The \emph{\enquote{stored content}} can only be accessed \emph{after} it is
%   stored in the \emph{sequence}, if \mymarg{store name} does not exist the
%   command will return an error.
% \end{function}
%
% \smallskip
%
% The \emph{optional argument} allows managing the \mymeta{keys} in the
% \emph{\enquote{first level}} of the environment in which the
% \emph{\enquote{stored content}} of the \emph{sequence} \mymarg{store
% name} will be printed, if the \emph{starred argument} ‘|*|’ is used it will be
% \myenv*{enumext*} otherwise \myenv*{enumext}.
%
% \smallskip
%
% The default values ​​for the \emph{\enquote{first level}} are the
% same as the default values for the \myenv*{enumext} and \myenv*{enumext*}
% environments along with the keys |nosep,first=\small,font=\small| and |columns=2|.
% For the inner levels of the environment \myenv*{enumext} saved in the
% \emph{sequence} \mymarg{store name} the default values ​​are the same
% as those established for the second, third and fourth levels plus the
% keys |nosep,first=\small,font=\small|. If the environment \myenv*{enumext*}
% is saved within the \emph{sequence} \mymarg{store name} it will have
% the same default values plus the keys |nosep,first=\small, font=\small|.
%
% \smallskip
%
% Since the command encapsulates by default the \myenv*{enumext}
% environment or the \myenv*{enumext*} environment, we must take some
% considerations:
%
%\begin{itemize}[topsep=0pt]
% \item If we execute |\printkeyans*|\mymarg{store name} and the \emph{sequence}
%   \mymarg{store name} already contains any \myenv*{enumext*} environment
%   an error will be returned as we cannot nest.
%
% \item If we execute |\printkeyans*|\mymarg{store name} and the \emph{sequence}
%   \mymarg{store name} contains any \myenv*{enumext} environments, they
%   will start with the \mymeta{keys} set for the first level unless they
%   are set in the \emph{optional argument} or \mykey{save-key} is used to modify it.
%
% \item If we execute |\printkeyans|\mymarg{store name} and the \emph{sequence}
%   \mymarg{store name} contains any environment \myenv*{enumext*}, they
%   will start with the \mymeta{keys} set by default unless they are set
%   in the \emph{optional argument} or \mykey{save-key} is used to modify it.
%\end{itemize}
%
% The default values ​​for the \emph{\enquote{first level}} of |\printkeyans| commands and
% |\printkeyans*| are established using \ics*{setenumext}\myoarg{print \textnormal{\textcolor{gray}{,}} \textcolor{MediumOrchid}{1}}\mymarg{keys} and
% \ics*{setenumext}\myoarg{print\textnormal{\textcolor{MediumOrchid}{\texttt{*}}}}\mymarg{keys}.
%
% \smallskip
%
% If we need to set the \mymeta{keys} for the environment
% \myenv*{enumext} \enquote{saved} in the \emph{sequence} \mymarg{store
% name} we will use \ics*{setenumext}\myoarg{print
% \textnormal{\textcolor{gray}{,}} level}\mymarg{keys} and if we need to
% set the \mymeta{keys} for the environment \myenv*{enumext*}
% \enquote{saved} in the \emph{sequence} \mymarg{store name} we will use
% \ics*{setenumext}\myoarg{print \textnormal{\textcolor{gray}{,}}
% \textnormal{\textcolor{MediumOrchid}{\texttt{*}}}}\mymarg{keys}.
%
% \subsubsection*{Example}
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\begin{enumext}[save-ans=sample,columns=1,show-pos=true,nosep,save-ref=true]
  \item Factor $3x+3y+3z$. \anskey{$3(x+y+z)$}
  \item True False

    \begin{enumext}[nosep]
      \item \LaTeX2e\ is cool? \anskey{Very True!}
    \end{enumext}

  \item Related to Linux

    \begin{enumext}[nosep]
      \item You use linux? \anskey{Yes}
      \item Rate the following package and class
        \begin{enumext}[nosep]
          \item \texttt{xsim} \anskey{very good}
          \item \texttt{exsheets} \anskey{obsolete}
        \end{enumext}
    \end{enumext}
\end{enumext}

The answer to \ref{sample:4} is \getkeyans{sample:4} and the answers to
all the worksheets are as follows:

\printkeyans{sample}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \begin{enumext}[save-ans=sampleXX,columns=1,show-pos=true,save-ref=true]
%  \item Factor $3x+3y+3z$. \anskey{$3(x+y+z)$}
%  \item True False
%    \begin{enumext}[nosep]
%      \item \LaTeX2e\ is cool? \anskey{Very True!}
%    \end{enumext}
%  \item Related to Linux
%    \begin{enumext}[nosep]
%      \item You use linux? \anskey{Yes}
%      \item Rate the following package and class
%        \begin{enumext}[nosep]
%          \item \texttt{xsim} \anskey{very good}
%          \item \texttt{exsheets} \anskey{obsolete}
%        \end{enumext}
%    \end{enumext}
% \end{enumext}
%
% \medskip
%
% The answer to \ref{sampleXX:4} is \getkeyans{sampleXX:4} and the answers to
% all the worksheets are as follows:
%
% \medskip
%
% \printkeyans[columns=1]{sampleXX}
%
% \section{Full examples}
%
% Here I will leave as an example some adaptations questions taken from \href{https://tex.stackexchange.com}{TeX-SX}.
% The examples are attached to this documentation and can be extracted
% from your PDF viewer or from the command line by running:
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
$ pdfdetach -saveall enumext.pdf
\end{examplecode}
% \iffalse
%</example>
% \fi
% and then you can use the excellent \arara\footnote{The cool \TeX\ automation tool:
% \url{https://www.ctan.org/pkg/arara}} tool to compile them.
%
% \subsubsection*{Example 1}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-exa-1.tex}
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log] }
\documentclass{article}
\usepackage{siunitx,amssymb,enumext}
\sisetup{output-decimal-marker={,}}
\DeclareSIUnit{\angstrom}{\textup{\AA}}
\pagestyle{empty}
\begin{document}
\setenumext[keyans]{label=\Alph*,labelsep=10pt,font=\small,nosep,itemsep=2pt,wrap-label={\fbox{\makebox[\height]{##1}}}}
\begin{enumext}[mode-box,columns=2,columns-sep=1cm,save-ans=sabastiano]
 \item La velocità di \qty{1,00e2}{m/s} espressa in \unit{km/h} è:
   \begin{keyans}
     \item \qty{36}{km/h}.
     \item* \qty{360}{km/h}.
     \item \qty{27,8}{km/h}.
     \item \qty{3,60e8}{km/h}.
   \end{keyans}

 \item In fisica nucleare si usa l'angstrom (simbolo:
 $\qty{1}{\angstrom} = \qty{1e-10}{m}$) e il fermi o femtometro
 ($\qty{1}{fm} = \qty{1e-15}{m}$). Qual è la relazione tra queste due
 unità di misura?
   \begin{keyans}
     \item* $\qty{1}{\angstrom}=\qty{1e5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-15}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e3}{fm}$.
   \end{keyans}

 \item La velocità di \qty{1,00e2}{m/s} espressa in \unit{km/h} è:
   \begin{keyans}
     \item \qty{36}{km/h}.
     \item* \qty{360}{km/h}.
     \item \qty{27,8}{km/h}.
     \item \qty{3,60e8}{km/h}.
   \end{keyans}

 \item In fisica nucleare si usa l'angstrom (simbolo:
 $\qty{1}{\angstrom} = \qty{1e-10}{m}$) e il fermi o femtometro
 ($\qty{1}{fm} = \qty{1e-15}{m}$). Qual è la relazione tra queste due
 unità di misura?
   \begin{keyans}
     \item* $\qty{1}{\angstrom}=\qty{1e5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-15}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e3}{fm}$.
   \end{keyans}
\end{enumext}

\printkeyans[columns=4]{sabastiano}
\end{document}
\end{filecontents*}
% \iffalse
%</example>
% \fi
%
% Adapted from the response given by Enrico Gregorio in \href{https://tex.stackexchange.com/q/461730/7832}{Squares for answer choice options and perfect alignment to mathematical answers}
% \textattachfile[color=red,print=false]{enumext-exa-1.tex}{\faFile*[regular]}.
%
% \setenumext[keyans]{label=\Alph*,font=\small,nosep,wrap-label={\fbox{\makebox[\height]{##1}}}}
% \begin{enumext}[columns=2,save-ans=sabastiano,itemsep=2pt, topsep=5pt,below*={8pt}]
% \item La velocità di \SI{1,00e2}{m/s} espressa in \si{km/h} è:
%
%   \begin{keyans}
%     \item \SI{36}{km/h}.
%     \item* \SI{360}{km/h}.
%     \item \SI{27,8}{km/h}.
%     \item \SI{3,60e8}{km/h}.
%   \end{keyans}
%
% \item  In fisica nucleare si usa l'angstrom (simbolo:
% $\SI{1}{\angstrom} = \SI{1e-10}{m}$) e il fermi o femtometro
% ($\SI{1}{fm} = \SI{1e-15}{m}$). Qual è la relazione tra queste due
% unità di misura?
%   \begin{keyans}
%     \item* $\SI{1}{\angstrom}=\SI{1e5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-15}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e3}{fm}$.
%   \end{keyans}
%
% \item La velocità di \SI{1,00e2}{m/s} espressa in \si{km/h} è:
%
%   \begin{keyans}
%     \item \SI{36}{km/h}.
%     \item* \SI{360}{km/h}.
%     \item \SI{27,8}{km/h}.
%     \item \SI{3,60e8}{km/h}.
%   \end{keyans}
%
% \item  In fisica nucleare si usa l'angstrom (simbolo:
% $\SI{1}{\angstrom} = \SI{1e-10}{m}$) e il fermi o femtometro
% ($\SI{1}{fm} = \SI{1e-15}{m}$). Qual è la relazione tra queste due
% unità di misura?
%   \begin{keyans}
%     \item* $\SI{1}{\angstrom}=\SI{1e5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-15}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e3}{fm}$.
%   \end{keyans}
% \end{enumext}
%
% \printkeyans[columns=1]{sabastiano}
%
% \subsubsection*{Example 2}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-exa-2.tex}
% arara: lualatex: { branch: developer }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
\documentclass{article}
\usepackage[colorlinks]{hyperref}
\usepackage{siunitx,amssymb,tikz,enumext,libertinus}
\usetikzlibrary{shapes.geometric}
\sisetup{output-decimal-marker={,}}
\DeclareSIUnit{\angstrom}{\textup{\AA}}
\newcommand*{\mySquared}[1]{%
  \begin{tikzpicture}[baseline=(number.base),square/.style={regular polygon,regular polygon sides=4}]
    \node[square, rounded corners=1pt, inner sep=1pt, draw=none, fill=gray!40] (number) {\makebox[\height]{#1}};
  \end{tikzpicture}%
}
\pagestyle{empty}
\begin{document}
\setenumext[keyans]{label=\Alph*,font=\small,nosep,wrap-label={\mySquared{##1}}}
\begin{enumext}[columns=1,save-ans=sabastiano2,mark-sep*=2pt,mark-ans*={\textcolor{gray}{✔}},save-ref=true,show-ans=true,itemsep=0pt]
 \item La velocità di \qty{1,00e2}{m/s} espressa in \unit{km/h} è:
   \begin{keyans}
     \item \qty{36}{km/h}.
     \item* \qty{360}{km/h}.
     \item \qty{27,8}{km/h}.
     \item \qty{3,60e8}{km/h}.
   \end{keyans}

 \item In fisica nucleare si usa l'angstrom (simbolo:
 $\qty{1}{\angstrom} = \qty{1e-10}{m}$) e il fermi o femtometro
 ($\qty{1}{fm} = \qty{1e-15}{m}$). Qual è la relazione tra queste due
 unità di misura?
   \begin{keyans}
     \item* $\qty{1}{\angstrom}=\qty{1e5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-15}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e3}{fm}$.
   \end{keyans}

 \item La velocità di \qty{1,00e2}{m/s} espressa in \unit{km/h} è:
   \begin{keyans}
     \item \qty{36}{km/h}.
     \item* \qty{360}{km/h}.
     \item \qty{27,8}{km/h}.
     \item \qty{3,60e8}{km/h}.
   \end{keyans}

 \item In fisica nucleare si usa l'angstrom (simbolo:
 $\qty{1}{\angstrom} = \qty{1e-10}{m}$) e il fermi o femtometro
 ($\qty{1}{fm} = \qty{1e-15}{m}$). Qual è la relazione tra queste due
 unità di misura?
   \begin{keyans}
     \item* $\qty{1}{\angstrom}=\qty{1e5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-5}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e-15}{fm}$.
     \item $\qty{1}{\angstrom}=\qty{1e3}{fm}$.
   \end{keyans}
\end{enumext}

\printkeyans[columns=4]{sabastiano2}
\end{document}
\end{filecontents*}
% \iffalse
%</example>
% \fi
%
% Adapted from the response given by Florent Rougon in \href{https://tex.stackexchange.com/q/529034/7832}{Multiple choice questions with proposed answers in random order — addition of automatic correction (cross mark)}
% \textattachfile[color=red,print=false]{enumext-exa-2.tex}{\faFile*[regular]}.
% \setenumext[keyans]{label=\Alph*,font=\small,nosep,wrap-label={\mySquared{##1}}}
% \begin{enumext}[columns=2,save-ans=sabastiano2,mark-sep*=2pt,mark-ans*={\textcolor{gray}{✔}},save-ref=true,show-ans=true,itemsep=0pt]
% \item La velocità di \SI{1,00e2}{m/s} espressa in \si{km/h} è:
%   \begin{keyans}
%     \item \SI{36}{km/h}.
%     \item* \SI{360}{km/h}.
%     \item \SI{27,8}{km/h}.
%     \item \SI{3,60e8}{km/h}.
%   \end{keyans}
%
% \item In fisica nucleare si usa l'angstrom (simbolo:
% $\SI{1}{\angstrom} = \SI{1e-10}{m}$) e il fermi o femtometro
% ($\SI{1}{fm} = \SI{1e-15}{m}$). Qual è la relazione tra queste due
% unità di misura?
%   \begin{keyans}
%     \item* $\SI{1}{\angstrom}=\SI{1e5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-15}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e3}{fm}$.
%   \end{keyans}
%
% \item La velocità di \SI{1,00e2}{m/s} espressa in \si{km/h} è:
%   \begin{keyans}
%     \item \SI{36}{km/h}.
%     \item* \SI{360}{km/h}.
%     \item \SI{27,8}{km/h}.
%     \item \SI{3,60e8}{km/h}.
%   \end{keyans}
%
% \item In fisica nucleare si usa l'angstrom (simbolo:
% $\SI{1}{\angstrom} = \SI{1e-10}{m}$) e il fermi o femtometro
% ($\SI{1}{fm} = \SI{1e-15}{m}$). Qual è la relazione tra queste due
% unità di misura?
%   \begin{keyans}
%     \item* $\SI{1}{\angstrom}=\SI{1e5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-5}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e-15}{fm}$.
%     \item $\SI{1}{\angstrom}=\SI{1e3}{fm}$.
%   \end{keyans}
% \end{enumext}
%
% \printkeyans*[columns=2]{sabastiano2}
%
% \subsubsection*{Example 3}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-exa-3.tex}
% arara: lualatex: { branch: developer }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{tikz}
\newcommand*{\myCircled}[1]{%
  \begin{tikzpicture}[baseline=(number.base)]
    \node[circle, draw=green!10!gray, inner sep=1pt, fill=blue!30!green!10] (number) {#1};
  \end{tikzpicture}%
}
\usepackage[colorlinks]{hyperref}
\usepackage{enumext}
\pagestyle{empty}
\begin{document}
\setenumext[keyans]{labelsep=8pt,label=\Alph*,font=\small,nosep,wrap-label={\myCircled{##1}}}
\setenumext[keyans*]{labelsep=8pt,label=\Alph*,font=\small,nosep,wrap-label={\myCircled{##1}}}
\setenumextmeta[enumext,2]{myroman}{no-store, label=\Roman*., noitemsep}
\setenumextmeta[enumext,2]{myarabic}{no-store,list-offset=0.5cm,label=(\arabic*),noitemsep}
\begin{enumext}[mode-box,save-ans=simplemc,columns=1,nosep,save-ref=true]
\item First type of questions
  \begin{keyans*}[columns=2,noitemsep]
    \item value
    \item*[$x=5$] correct
    \item value
    \item value
  \end{keyans*}
\item Second type of questions
  \begin{enumext}[myroman]
    \item $2\alpha+2\delta=90^{\circ}$
    \item $\alpha=\delta$
    \item $\angle EDF=45^{\circ}$
  \end{enumext}
  \begin{keyans}[columns=2,noitemsep]
    \item I only
    \item II only
    \item I and II only
    \item* I and III only
    \item I, II, and III
  \end{keyans}
\item Third type of questions
    \begin{enumext}[myarabic]
        \item $2\alpha+2\delta=90^{\circ}$
        \item $\angle EDF=45^{\circ}$
    \end{enumext}
\begin{keyans}[columns=2,noitemsep]
    \item value
    \item value
    \item*[some note] value
    \item value
    \item value
\end{keyans}

\item Question with image and label below:
\begin{keyanspic}[layout-sty={3,2},label-sep=3pt]
\anspic{\includegraphics[scale=0.15]{example-image-a}}
\anspic{\includegraphics[scale=0.15]{example-image-b}}
\anspic{\includegraphics[scale=0.15]{example-image-a}}
\anspic{\includegraphics[scale=0.15]{example-image-a}}
\anspic*[A duck]{\includegraphics[scale=0.32]{example-image-duck}}
\end{keyanspic}

\item Question with image on right side:
\begin{keyans}[mini-env=0.5\linewidth, columns=1,noitemsep]
    \item value
    \item value
    \item value
    \item*[other note] correct
    \item value
    \miniright
    \includegraphics[scale=0.15]{example-image-b}
\end{keyans}
\end{enumext}

\medskip

Test keys

\printkeyans{simplemc}
\end{document}
\end{filecontents*}
% \iffalse
%</example>
% \fi
%
% A \emph{\enquote{simple multiple choice}} test \textattachfile[color=red,print=false]{enumext-exa-3.tex}{\faFile*[regular]}.
% \setenumext[keyans]{labelsep=8pt,label=\Alph*,font=\small,nosep,wrap-label={\myCircled{##1}}}
% \begin{enumext}[mode-box,save-ans=simplemc,columns=1,nosep,save-ref=true]
%   \item First type of questions
%      \begin{keyans*}[labelsep=8pt,label=\Alph*,font=\small,nosep,wrap-label={\myCircled{#1}},columns=2]
%        \item value
%        \item*[$x=5$] correct
%        \item value
%        \item value
%      \end{keyans*}
%   \item Second type of questions
%      \begin{enumext}[no-store,label=\Roman*.,nosep]
%        \item $2\alpha+2\delta=90^{\circ}$
%        \item $\alpha=\delta$
%        \item $\angle EDF=45^{\circ}$
%      \end{enumext}
%      \begin{keyans}[columns=2,noitemsep]
%        \item I only
%        \item II only
%        \item I and II only
%        \item* I and III only
%        \item I, II, and III
%      \end{keyans}
%   \item Third type of questions
%        \begin{enumext}[no-store,list-offset=0.5cm,label=(\arabic*),nosep]
%            \item $2\alpha+2\delta=90^{\circ}$
%            \item $\angle EDF=45^{\circ}$
%        \end{enumext}
%    \begin{keyans}[columns=2,noitemsep]
%        \item value
%        \item value
%        \item*[some note] value
%        \item value
%        \item value
%    \end{keyans}
%
% \item Question with image and label below:
%  \begin{keyanspic}[label-sep=3pt]
%    \anspic{\includegraphics[scale=0.15]{example-image-a}}
%    \anspic{\includegraphics[scale=0.15]{example-image-b}}
%    \anspic{\includegraphics[scale=0.15]{example-image-a}}
%    \anspic{\includegraphics[scale=0.15]{example-image-a}}
%    \anspic*[A duck]{\includegraphics[scale=0.32]{example-image-duck}}
%  \end{keyanspic}
%
% \item Question with image on right side:
%    \begin{keyans}[mini-env=0.5\linewidth, columns=1,noitemsep]
%        \item value
%        \item value
%        \item value
%        \item*[other note] correct
%        \item value
%        \miniright
%        \includegraphics[scale=0.15]{example-image-b}
%    \end{keyans}
% \end{enumext}
%
% \smallskip
%
% Test keys
%
% \printkeyans[columns=2]{simplemc}
%
% \subsubsection*{Example 4}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-exa-4.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=2cm,right=2cm]{geometry}%
\usepackage[osf]{libertinus}
\usepackage{unicode-math,tikzducks,graphicx,hyperref,enumext}
\begin{document}
\begin{enumext}[mode-box,save-ans=simplews,labelsep=10pt,columns=2,check-ans=true,show-ans=true,nosep,save-ref=true,wrap-label={\tikz[scale=0.25]\duck[signpost=\scalebox{0.6}{#1}];}]
  \item Factor $x^{2}-2x+1$ \anskey{$\left(x-1\right)^{2}$}
  \item Factor $3x+3y+3z$ \anskey{$3(x+y+z)$}
  \item True False
    \begin{enumext}[nosep]
      \item $\alpha > \delta$ \anskey{False}
      \item \LaTeX2e\ is cool? \anskey{Very True!}
    \end{enumext}
  \item Related to Linux
    \begin{enumext}[nosep]
      \item You use linux? \anskey{Yes}
      \item Usually uses the package manager? \anskey{Yes, \texttt{dnf}}
      \item Rate the following package and class
        \begin{enumext}[nosep]
          \item \texttt{xsim-exam} \anskey{doesn't exist for now :(}
          \item \texttt{xsim} \anskey{very good}
          \item \texttt{exsheets} \anskey{obsolete}
        \end{enumext}
    \end{enumext}
\end{enumext}

The answer to \ref{simplews:1} is \getkeyans{simplews:1} and the answer
to \ref{simplews:3} is \getkeyans{simplews:3}.

\printkeyans[columns=2]{simplews}
\end{document}
\end{filecontents*}
% \iffalse
%</example>
% \fi
%
% A \emph{\enquote{simple worksheet}} using ducks :) \textattachfile[color=red,print=false]{enumext-exa-4.tex}{\faFile*[regular]}.
%
% \begin{enumext}[save-ans=simplews,columns=1,check-ans=true,nosep,save-ref=true,wrap-label={\tikz[scale=0.25]\duck[signpost=\scalebox{0.6}{#1}];}]
%  \item Factor $x^{2}-2x+1$ \anskey{$\left(x-1\right)^{2}$}
%  \item Factor $3x+3y+3z$ \anskey{$3(x+y+z)$}
%  \item[] The following questions need to be cuaqtified :)
%  \item True False
%    \begin{enumext}[nosep]
%      \item $\alpha > \delta$ \anskey{False}
%      \item \LaTeX2e\ is cool? \anskey{Very True!}
%    \end{enumext}
%  \item Related to Linux
%    \begin{enumext}[nosep]
%      \item You use linux? \anskey{Yes}
%      \item Usually uses the package manager? \anskey{Yes, \texttt{dnf}}
%      \item Rate the following package and class
%        \begin{enumext}[nosep]
%          \item \texttt{xsim-exam} \anskey{doesn't exist for now :(}
%          \item \texttt{xsim} \anskey{very good}
%          \item \texttt{exsheets} \anskey{obsolete}
%        \end{enumext}
%    \end{enumext}
% \end{enumext}
%
% The answer to \ref{simplews:1} is \getkeyans{simplews:1} and the answer
% to \ref{simplews:3} is \getkeyans{simplews:3}.
%
% \printkeyans[columns=2]{simplews}
%
% \subsubsection*{Example 5}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-exa-5.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-exa-5-luamml-mathml.html ], target: 'enumext-exa-5-mathml.html' }
\DocumentMetadata{
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=2cm,right=2cm]{geometry}%
\usepackage[osf]{libertinus}
\usepackage{unicode-math,xcolor,graphicx,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for SAT style enumext package},
  }
\newsavebox{\satbox}
\sbox\satbox{\small\textbf{67}}%
\NewDocumentCommand \stylesat { m }
  {%
    \setlength{\fboxsep}{2pt}%
    \raisebox{7\fboxsep}{%
    \noindent\colorbox{black}{\textcolor{white}{\makebox[\dimeval{\labelwidth-2\fboxsep}][c]{\small\textbf{\vphantom{67}#1}}}}%
    \colorbox{lightgray}{\phantom{\rule[-\dp\satbox]{\dimeval{\linewidth-2\fboxsep}}{\dimeval{\dp\satbox+\ht\satbox}}}}}%
  }
\begin{document}
\setenumext[keyans]{label=\Alph*),nosep,below*={0.3cm}}
\begin{enumext}[mode-box,label=\arabic*,labelwidth=20pt,labelsep=0pt,columns=2,columns-sep=30pt,save-ans=stylesat, wrap-label={\stylesat{#1}}]
 \item Which choice best describes what happens in the passage?
   \begin{keyans}
    \item* One character argues with another character who intrudes on her home.
    \item One character receives a surprising request from another character.
    \item One character reminisces about choices she has made over the years.
    \item One character criticizes another character for pursuing an unexpected course of action.
   \end{keyans}

 \item Which choice best describes what happens in the passage?
   \begin{keyans}
    \item One character argues with another character who intrudes on her home.
    \item One character receives a surprising request from another character.
    \item* One character reminisces about choices she has made over the years.
    \item One character criticizes another character for pursuing an unexpected course of action.
   \end{keyans}

 \item Which choice best describes what happens in the passage?
   \begin{keyans}
    \item One character argues with another character who intrudes on her home.
    \item* One character receives a surprising request from another character.
    \item One character reminisces about choices she has made over the years.
    \item One character criticizes another character for pursuing an unexpected course of action.
   \end{keyans}

 \item Which choice best describes what happens in the passage?
   \begin{keyans}
    \item One character argues with another character who intrudes on her home.
    \item One character receives a surprising request from another character.
    \item One character reminisces about choices she has made over the years.
    \item* One character criticizes another character for pursuing an unexpected course of action.
   \end{keyans}
\end{enumext}

\printkeyans[columns=4]{stylesat}
\end{document}
\end{filecontents*}
% \iffalse
%</example>
% \fi
%
% Adapted from the response given by Stephen in \href{https://tex.stackexchange.com/a/691544}{SAT like question format}
% \textattachfile[color=red,print=false]{enumext-exa-5.tex}{\faFile*[regular]}.
% \setenumext[keyans]{label=\Alph*),font=\small,nosep,wrap-label={##1}}
% \begin{enumext}[label=\arabic*,labelwidth=20pt,labelsep=0pt,columns=2,save-ans=stylesat, wrap-label={\stylesat{#1}}]
%  \item Which choice best describes what happens in the passage?
%   \begin{keyans}
%     \item* One character argues with another character who intrudes on her home.
%     \item One character receives a surprising request from another character.
%     \item One character reminisces about choices she has made over the years.
%     \item One character criticizes another character for pursuing an unexpected course of action.
%   \end{keyans}
%
%  \item Which choice best describes what happens in the passage?
%   \begin{keyans}
%    \item One character argues with another character who intrudes on her home.
%    \item One character receives a surprising request from another character.
%    \item* One character reminisces about choices she has made over the years.
%    \item One character criticizes another character for pursuing an unexpected course of action.
%   \end{keyans}
%
%  \item Which choice best describes what happens in the passage?
%   \begin{keyans}
%    \item One character argues with another character who intrudes on her home.
%    \item* One character receives a surprising request from another character.
%    \item One character reminisces about choices she has made over the years.
%    \item One character criticizes another character for pursuing an unexpected course of action.
%   \end{keyans}
%
%  \item Which choice best describes what happens in the passage?
%   \begin{keyans}
%    \item One character argues with another character who intrudes on her home.
%    \item One character receives a surprising request from another character.
%    \item One character reminisces about choices she has made over the years.
%    \item* One character criticizes another character for pursuing an unexpected course of action.
%   \end{keyans}
% \end{enumext}
%
% \printkeyans[columns=4]{stylesat}
%
% \subsubsection*{Example 6}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-exa-6.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
\documentclass[letterpaper,twoside]{article}
\usepackage{xcolor,enumext,libertinus}
\newlength{\itemwd}
\settowidth{\itemwd}{\bfseries 10.} % max width
\NewDocumentCommand \rating { }{8.5a, KSC}
\ExplSyntaxOn
\bool_new:N \l_azetina_rating_bool
\NewDocumentCommand \showrating { m }
  {
    \str_case:nn {#1}
      {
        { true  }
                {
                  \bool_set_true:N \l_azetina_rating_bool
                  \setenumext{show-ans=true,save-sep={ }}
                }
        { false }
                {
                  \bool_set_false:N \l_azetina_rating_bool
                  \setenumext{show-ans=false,save-sep={ }}
                }
      }
  }
\NewDocumentCommand \myans { m +m }
  {
    \bool_if:NTF \l_azetina_rating_bool
      {
        \item*[(#1)] \textcolor{red}{#2}
      }
      {
        \item*[(#1)] \textcolor{black}{#2}
      }
  }
\NewDocumentCommand \azwrapp { m }
  {
    \bool_if:NTF \l_azetina_rating_bool
      {
        \makebox[\dim_eval:n{\marginparwidth}][r]
          {
            \textcolor{red}{\bfseries\footnotesize\rating}
          }
        \hspace{\marginparsep}\textbf{#1}
      }
      {
        \makebox[\dim_eval:n{\marginparwidth+\marginparsep}][l]{ }\textbf{#1}
      }
  }
\ExplSyntaxOff
\setenumextmeta[enumext,1]{azetinasty}{label={\arabic*.},labelwidth={\marginparwidth+\marginparsep+\itemwd},list-offset={-\marginparwidth-\marginparsep},}
\setenumext[keyans]{
    label={\Alph*},
    font={\bfseries},
    wrap-ans*={\textcolor{red}{\bfseries##1}},
    mark-ans*={\textcolor{red}{✔}},
    wrap-opt={ },
    }
\begin{document}

\showrating{true}
\begin{enumext}[azetinasty,start=10,wrap-label={\azwrapp{#1}},save-ans=test2024]
  \item sample
    \begin{keyans}
      \item sample
      %\item*[(8.5a, KSC)] answer
      \myans{8.5a, KSC}{answer}
      \item sample
      \item sample
    \end{keyans}
  % Renew \rating here
  \RenewDocumentCommand \rating { }{9.5a, KSC}
  \item sample
      \begin{keyans}
      \item sample
      \item sample
      \item sample
      %\item*[(9.5a, KSC)] answer
      \myans{9.5a, KSC}{answer}
    \end{keyans}
\end{enumext}
\showrating{false}
\RenewDocumentCommand \rating { }{10.5a, KSC}
\begin{enumext}[resume*,save-ans=test2024]
  \item sample
    \begin{keyans}
      \item sample
      %\item*[(10.5a, KSC)] answer
      \myans{10.5a, KSC}{answer}
      \item sample
      \item sample
    \end{keyans}
  % Renew \rating here
  \RenewDocumentCommand \rating { }{11.5a, KSC}
  \item sample
      \begin{keyans}
      \item sample
      \item sample
      \item sample
      %\item*[(11.5a, KSC)] answer
      \myans{11.5a, KSC}{answer}
    \end{keyans}
\end{enumext}
\printkeyans[start=10]{test2024}
\end{document}
\end{filecontents*}
% \iffalse
%</example>
% \fi
%
% Adapted from the response to \href{https://tex.stackexchange.com/q/728584}{Environment for enumerate environment}
% \textattachfile[color=red,print=false]{enumext-exa-6.tex}{\faFile*[regular]}.
% \setenumext[keyans]{label={\Alph*},font={\bfseries},wrap-ans*={\textcolor{red}{\bfseries##1}},mark-ans*={\textcolor{red}{✔}},wrap-opt={ },}
% \showrating{true}
% \begin{enumext}[azetinasty,start=10,wrap-label={\azwrapp{#1}},save-ans=test2024,save-sep={ }]
%  \item sample
%    \begin{keyans}
%      \item sample
%      \item*[(8.5a, KSC)] answer
%      \item sample
%      \item sample
%    \end{keyans}
%  \RenewDocumentCommand \rating { }{9.5a, KSC}
%  \item sample
%      \begin{keyans}
%      \item sample
%      \item sample
%      \item sample
%      \item*[(9.5a, KSC)] answer
%    \end{keyans}
% \end{enumext}
% \showrating{false}
% \RenewDocumentCommand \rating { }{10.5a, KSC}
% \begin{enumext}[resume*,save-ans=test2024]
%  \item sample
%    \begin{keyans}
%      \item sample
%      \item*[(10.5a, KSC)] answer
%      \item sample
%      \item sample
%    \end{keyans}
%  \RenewDocumentCommand \rating { }{11.5a, KSC}
%  \item sample
%      \begin{keyans}
%      \item sample
%      \item sample
%      \item sample
%      \item*[(11.5a, KSC)] answer
%    \end{keyans}
% \end{enumext}
% \printkeyans[start=10]{test2024}
%
% \section{Tagged PDF examples}
%
% This section is just to show the compatibility of \mypkg*{enumext} with
% \emph{tagged} \texttt{PDF} using |lualatex|. The attached files here
% are just for testing and are intended as examples and, in a way, to
% simplify the time of Matthew Bertucci (\texttt{@mbertucci}) when he sees this
% excellent package and adds it to \href{https://github.com/latex3/tagging-project}{The LaTeX Tagged PDF repository}.
%
% \smallskip
%
% To compile the tests with |lualatex-dev| the packages \mypkg{multicol},
% \mypkg{scontents}, \mypkg{unicode-math}, \mypkg{geometry}, \mypkg{graphicx}, \mypkg{luamml}
% and \mypkg{hyperref} are required along with the line:
%
% \smallskip
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=single]
\DocumentMetadata
  {
    lang = en-US, pdfversion = 2.0, pdfstandard = `\mydim{ua-2}`,
    testphase = {phase-III, math, title, table, firstaid},
  }
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% \smallskip
%
% \begin{important}
%  All examples have been checked using \href{https://dev.verapdf-rest.duallab.com}{\texttt{veraPDF}}
%  together with \href{https://ngpdf.com}{\texttt{ngpdf}}.
% \end{important}
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-01.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-01-luamml-mathml.html ], target: 'enumext-01-mathml.html' }
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    %uncompress,
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for enumext package},
  }
\begin{document}
\section{only enumext}
Some text here

\begin{enumext}[labelwidth=1cm,labelsep=0.25cm,align=left, wrap-label=\textbf{(#1}, label=\arabic*.)]
  \item This text is in the first level.\label{A}
    \begin{enumext}
      \item This text is in the second level.\footnote{foot note in enumext}
        \begin{enumext}
          \item This text is in the third level.
            \begin{enumext}
              \item This text is in the fourth level.\footnotemark[20]
            \end{enumext}
        \end{enumext}
    \end{enumext}
  \item[X] This text is in the first level.
  \item* This text is in the first level.
\end{enumext}

Some ref here \ref{A}\footnotetext[20]{foot note in enumext [20]}

\section{only enumext*}

Some text here

\begin{enumext*}[columns=2,labelwidth=1cm,labelsep=0.25cm,align=left, wrap-label=\textbf{#1)}, label=(\arabic*.]
  \item This text is in the first level.\label{B}
  \item[X] This text is in the first level.\footnotemark[30]
  \item* This text is in the first level.\footnote{foot note in enumext*}
  \item This text is in the first level.
\end{enumext*}

Some ref here \ref{B}\footnotetext[30]{foot note in enumext* [30]}

\section{enumext nested in enumext*}

Some text here

\begin{enumext*}
  \item This text is in the first level.\label{C}
  \item \begin{enumext}[base-fix]
              \item This text is in nested enumext.\label{D}\footnote{foot note in neseted enumext}
              \item This text is in nested enumext.\footnotemark[40]
         \end{enumext}
  \item This text is in the first level.
\end{enumext*}

Some refs here \ref{C} and \ref{D} \footnotetext[40]{foot note in neseted enumext [40]}

\section{enumext* nested in enumext}

\begin{enumext}
  \item This text is in the first level. \label{E}
  \item \begin{enumext*}[label=\roman*.]
              \item This text is in nested enumext*.\label{F}\footnotemark[50]
              \item This text is in nested enumext*.\footnote{foot note in neseted enumext*}
         \end{enumext*}
  \item This text is in the first level.
\end{enumext}

Some refs here \ref{E} and \ref{F} \footnotetext[50]{foot note in neseted enumext* [50]}

\section{Custom ref}

\begin{enumext}[ref={enumext-level-\arabic*}]
  \item This text is in the first level. \label{G}
  \item \begin{enumext*}[label=\roman*., ref={nested-\arabic{enumXi}.\roman*}]
              \item This text is in nested enumext*.\label{H}
              \item This text is in nested enumext*.
         \end{enumext*}
  \item This text is in the first level.
\end{enumext}

Some refs here \ref{G} and \ref{H}
\end{document}
\end{filecontents*}
\IfFileExists{enumext-01.pdf}{}{\ShellEscape{arara enumext-01.tex}}
% \iffalse
%</example>
% \fi
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-02.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-02-luamml-mathml.html ], target: 'enumext-02-mathml.html' }
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    %uncompress,
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for enumext package},
  }
\begin{document}
\section{enumext + multicols}
Some text here

\begin{enumext}[columns=2, labelwidth=1cm,labelsep=0.25cm,align=left, wrap-label=\textbf{(#1}, label=\arabic*.),partopsep=0.5cm]
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \item[X] This text is in the first level.
  \item* This text is in the first level.
\end{enumext}

Some text here

\section{enumext + minipage}

Some text here

\begin{enumext}[labelwidth=1cm,labelsep=0.25cm,align=left,partopsep=0.5cm,mini-env=0.4\linewidth]
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \miniright
    This text is in minipage.
\end{enumext}

\section{enumext + minipage + multicols}

Some text here

\begin{enumext}[columns=2,labelwidth=1cm,labelsep=0.25cm,align=left,partopsep=0.5cm,mini-env=0.4\linewidth]
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \miniright
    This text is in minipage.
\end{enumext}

Some text here

\section{enumext* + minipage}

Some text here

\begin{enumext*}[columns=2,labelwidth=1cm,labelsep=0.25cm,align=left,partopsep=0.5cm,mini-env=0.4\linewidth, mini-right = {This text is in minipage.}]
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
  \item This text is in the first level.
\end{enumext*}
\end{document}
\end{filecontents*}
\IfFileExists{enumext-02.pdf}{}{\ShellEscape{arara enumext-02.tex}}
% \iffalse
%</example>
% \fi
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-03.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-03-luamml-mathml.html ], target: 'enumext-03-mathml.html' }
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    %uncompress,
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,graphicx,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for enumext package},
  }
\begin{document}
\section{enumext+keyanspic}

Some text here

\begin{enumext}[save-ans=test,save-sep={ },save-ref = true]
  \item Question with images.
    \begin{keyanspic}[layout-sty={3,2}]
      \anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
      \anspic*{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
      \anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
    \end{keyanspic}
   \item Question with images.\label{dos}
    \begin{keyanspic}[label-pos=above, layout-sty={3,2}]
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
      \anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
      \anspic*[A duck]{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
    \end{keyanspic}
   \item Question with images.
    \begin{keyanspic}
      \anspic*[La letra A]{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
      \anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
      \anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
    \end{keyanspic}
   \item Question with images.
    \begin{keyanspic}[label-pos=above]
      \anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
      \anspic*{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
      \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
      \anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
    \end{keyanspic}
\end{enumext}

The answer to question \ref{dos} is \getkeyans{test:2}

\printkeyans*{test}
\end{document}
\end{filecontents*}
\IfFileExists{enumext-03.pdf}{}{\ShellEscape{arara enumext-03.tex}}
% \iffalse
%</example>
% \fi
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-04.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-04-luamml-mathml.html ], target: 'enumext-04-mathml.html' }
\listfiles
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    %uncompress,
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,graphicx,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for enumext package},
  }
\begin{document}
\section{enumext + anskey + anskey*}

Some text here

\begin{enumext}[save-ans=test,save-sep={ },save-ref = true]
  \item Question A. \anskey{Answer A}
  \item Question B. \anskey{Answer B}
  \item Question C.
    \begin{anskey*}
    Answer with \verb+code+ and more
      \begin{verbatim}
        Some code here
      \end{verbatim}
    And text
    \end{anskey*}
\end{enumext}

The answer to question \ref{test:2} is \getkeyans{test:2}

\printkeyans*{test}

\section{enumext* + anskey + anskey*}

Some text here

\begin{enumext*}[save-ans=test-2,save-sep={ },save-ref = true]
  \item Question A. \anskey{Answer A}
  \item Question B. \anskey{Answer B}
  \item Question C.
    \begin{anskey*}
    Answer with \verb+code+ and more
      \begin{verbatim}
        Some code here
      \end{verbatim}
    And text
    \end{anskey*}
\end{enumext*}

\printkeyans{test-2}
\end{document}
\end{filecontents*}
\IfFileExists{enumext-04.pdf}{}{\ShellEscape{arara enumext-04.tex}}
% \iffalse
%</example>
% \fi
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-05.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-05-luamml-mathml.html ], target: 'enumext-05-mathml.html' }
\DocumentMetadata{
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    %uncompress,
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,graphicx,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for enumext package},
  }
\setenumext[print,1]{columns=2, columns-sep=1cm, font=\bfseries}
\setenumext[print*]{columns=2, columns-sep=1cm,first=\bfseries}
\setenumext[enumext,1]{columns=2,nosep,save-ref=true,save-sep={ },wrap-opt=\fbox{##1}, show-ans=true}
\setenumext[keyans]{columns=2,noitemsep}
\setenumext[keyans*]{columns=2,noitemsep}
\setenumextmeta[enumext,2]{myroman}{no-store, label=\Roman*., noitemsep}
\setenumextmeta[enumext,2]{myarabic}{no-store,list-offset=0.5cm,label=(\arabic*),noitemsep}
\begin{document}
\section{The enumext package in action}

\begin{enumext}[save-ans=mytest]
\item First type of questions
  \begin{keyans*}
    \item value
    \item*[$x=5$] correct
    \item value
    \item value
  \end{keyans*}
\item Second type of questions
  \begin{enumext}[myroman]
    \item $2\alpha+2\delta=90^{\circ}$
    \item $\alpha=\delta$
    \item $\angle EDF=45^{\circ}$
  \end{enumext}
  \begin{keyans}
    \item I only
    \item II only
    \item I and II only
    \item* I and III only
    \item I, II, and III
  \end{keyans}
\item* Third type of questions
  \begin{enumext}[myarabic]
    \item $2\alpha+2\delta=90^{\circ}$
    \item $\angle EDF=45^{\circ}$
  \end{enumext}
  \begin{keyans}
    \item value
    \item value
    \item*[some note $y$] value
    \item value
    \item value
  \end{keyans}
\item Question with image and label above:
  \begin{keyanspic}[label-pos=above, layout-sty={3,2}]
    \anspic*[La letra A]{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
    \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
    \anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
    \anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
    \anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
  \end{keyanspic}
\item A question
  \begin{keyans}[mini-env=0.5\linewidth, columns=1]
    \item value
    \item value
    \item value
    \item*[other note] correct
    \item value
    \miniright
    \includegraphics[scale=0.15,alt={Una letra mayuscula B}]{example-image-b}
  \end{keyans}
\item Question with image on left side: \anskey[item-star]{Mucak}
\end{enumext}

Some text here
\section{printkeyans}
Some text here

\printkeyans{mytest}

\section{printkeyans*}
Some text here

\printkeyans*{mytest}

\section{foreachkeyans}
Some text here

\foreachkeyans[sep={\par}]{mytest}

Some text here
\end{document}
\end{filecontents*}
\IfFileExists{enumext-05.pdf}{}{\ShellEscape{arara enumext-05.tex}}
% \iffalse
%</example>
% \fi
%
%
% \iffalse
%<*example>
% \fi
\begin{filecontents*}[overwrite]{enumext-06.tex}
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer, draft: true }
% arara: lualatex: { branch: developer }
% arara: clean: { extensions: [ aux, log, out] }
% arara: move: { files: [ enumext-06-luamml-mathml.html ], target: 'enumext-06-mathml.html' }
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    %uncompress,
  }
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=3cm,right=3cm]{geometry}
\usepackage{unicode-math,graphicx,hyperref,enumext}
\hypersetup
  {
    colorlinks = true,
    pdftitle   = {Test tagged PDF for enumext package},
  }
\newlength{\descitemwd}
\NewDocumentCommand \labelbx { s +m }
  {%
    \SuspendTagging{\parbox}%
    \IfBooleanTF{#1}%
      {\strut\smash{\parbox[t]{\labelwidth}{\raggedright{#2}}}}%
      {\strut\smash{\parbox[t]{\labelwidth}{\raggedleft{#2}}}}%
    \ResumeTagging{\parbox}
  }
\begin{document}

\section{Fake \texttt{itemize} environment}

\noindent\begin{minipage}[t]{0.45\linewidth}
\begin{enumext}[nosep, label=\textbullet]
  \item First level item
    \begin{enumext}[nosep,label=\normalfont\bfseries\textendash]
      \item Second level item
        \begin{enumext}[nosep,label=\textasteriskcentered]
          \item Third level item
            \begin{enumext}[nosep,label=\textperiodcentered]
               \item Fourth level item
            \end{enumext}
        \end{enumext}
    \end{enumext}
  \item First level item
\end{enumext}
\end{minipage}\hfill
\begin{minipage}[t]{0.45\linewidth}
\begin{enumext}[nosep, label=$\ast$]
  \item First level item
    \begin{enumext}[nosep,label=$\diamond$]
      \item Second level item
        \begin{enumext}[nosep,label=$\circ$]
          \item Third level item
            \begin{enumext}[nosep,label=$\star$]
               \item Fourth level item
            \end{enumext}
        \end{enumext}
    \end{enumext}
  \item First level item
\end{enumext}
\end{minipage}

\section{Fake \texttt{description} environment}

\settowidth{\descitemwd}{\textbf{Something long}}
\begin{enumext}[label={},labelwidth=\descitemwd,font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item[] This is an entry \emph{without} a label.
  \item[Something] A short \emph{one-line} description text.
  \item[Something long] A much \emph{longer} description text may take
    more than one line or more than one paragraph.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua.
\end{enumext}

\begin{enumext*}[label={},labelwidth=\descitemwd,font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item[] This is an entry \emph{without} a label.
  \item[Something] A short \emph{one-line} description text.
  \item[Something long] A much \emph{longer} description text may take
    more than one line or more than one paragraph.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua.
\end{enumext*}

\begin{enumext}[label={},labelwidth=\descitemwd,list-indent=0pt,font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item[] This is an entry \emph{without} a label.
  \item[Something] A short \emph{one-line} description text.
  \item[Something long] A much \emph{longer} description text may take
    more than one line or more than one paragraph.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua.
\end{enumext}

\begin{enumext*}[label={},labelwidth=\descitemwd,list-indent=0pt,font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item[] This is an entry \emph{without} a label.
  \item[Something] A short \emph{one-line} description text.
  \item[Something long] A much \emph{longer} description text may take
    more than one line or more than one paragraph.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua.
\end{enumext*}

\section{Fake \texttt{description} environment in margin}

\begin{enumext}[align=right, label={},labelsep=4pt,labelwidth=\descitemwd,list-offset={-\descitemwd-4pt}, font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item This is an entry \textit{without} a label.
  \item[Something] A short one-line description.
  \item[Something long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
    Curabitur dictum gravida mauris.
\end{enumext}

\begin{enumext*}[align=right, label={},labelsep=4pt,labelwidth=\descitemwd,list-offset={-\descitemwd-4pt}, font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item This is an entry \textit{without} a label.
  \item[Something] A short one-line description.
  \item[Something long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
    Curabitur dictum gravida mauris.
\end{enumext*}

\section{Fake \texttt{description} with multi-line labels}

\begin{enumext}[label={},labelsep=4pt,labelwidth=\descitemwd,list-offset=-\dimeval{\descitemwd+4pt}, wrap-label*={\labelbx{#1}}, font=\bfseries,noitemsep,topsep=3pt]
  \item[SomeThing] A short one-line description.
  \item This is an entry \textit{without} a label.
  \item[Something] A short one-line description.
  \item[Something \\ long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
    Curabitur dictum gravida mauris.

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
    Curabitur dictum gravida mauris.

  \item[SoMeThInG \\ LoNg] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
    Curabitur dictum gravida mauris.

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
    Curabitur dictum gravida mauris.
\end{enumext}
\end{document}
\end{filecontents*}
\IfFileExists{enumext-06.pdf}{}{\ShellEscape{arara enumext-06.tex}}
% \iffalse
%</example>
% \fi
%
% \begin{itemize}[topsep=1pt,partopsep=0pt,parsep=1pt,itemsep=1pt]
% \item The file \myfile{enumext-01.tex} contains the basic tests for the
%   \myenv*{enumext} and \myenv*{enumext*} environments and the nesting
%   between them plus the use of the \mykey{label}, \mykey{labelwidth},
%   \mykey{labelsep}, \mykey{ref}, \mykey{align} and \mykey{wrap-label} keys.
%   \IfFileExists{enumext-01.pdf}{Source file \textattachfile[color=red,print=false]{enumext-01.tex}{\faFile*[regular]}
%   and \emph{tagged} \texttt{PDF} \textattachfile[color=red,print=false]{enumext-01.pdf}{\faFilePdf[regular]}}{}.%
%
% \item The file \myfile{enumext-02.tex} contains the tests for the \myenv*{enumext}
%   and \myenv*{enumext*} environments and the support for \myenv{minipage}
%   and \myenv{multicols} environments using the keys \mykey{columns},
%   \mykey{columns-sep}, \mykey{mini-env}, \mykey{mini-right} and
%   |\miniright| command. \IfFileExists{enumext-02.pdf}{Source file \textattachfile[color=red,print=false]{enumext-02.tex}{\faFile*[regular]}
%   and \emph{tagged} \texttt{PDF} \textattachfile[color=red,print=false]{enumext-02.pdf}{\faFilePdf[regular]}}{}.%
%
% \item The file \myfile{enumext-03.tex} contains the tests for the \myenv*{enumext}
%   and \myenv*{keyanspic} environments activated by the \mykey{save-ans}
%   key together with the \mykey{save-sep} and \mykey{save-ref} keys and
%   the |\printkeyans| command.
%   \IfFileExists{enumext-03.pdf}{Source file \textattachfile[color=red,print=false]{enumext-03.tex}{\faFile*[regular]}
%   and \emph{tagged} \texttt{PDF} \textattachfile[color=red,print=false]{enumext-03.pdf}{\faFilePdf[regular]}}{}.%
%
% \item The file \myfile{enumext-04.tex} contains the tests for the |\anskey|
%   command and the \myenv*{anskey*} environment activated by the
%   \mykey{save-ans} key along with the |\getkeyans| and |\printkeyans| commands.
%   \IfFileExists{enumext-04.pdf}{Source file \textattachfile[color=red,print=false]{enumext-04.tex}{\faFile*[regular]}
%   and \emph{tagged} \texttt{PDF} \textattachfile[color=red,print=false]{enumext-04.pdf}{\faFilePdf[regular]}}{}.%
%
% \item The file \myfile{enumext-05.tex} contains the tests for the environments
%   \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} activated by the key
%   \mykey{save-ans} together with the keys \mykey{no-store} and \mykey{show-ans}
%   and the commands |\setenumext|, |\setenumextmeta|, |\printkeyans| and |\foreachkeyans|.
%   \IfFileExists{enumext-05.pdf}{Source file \textattachfile[color=red,print=false]{enumext-05.tex}{\faFile*[regular]}
%   and \emph{tagged} \texttt{PDF} \textattachfile[color=red,print=false]{enumext-05.pdf}{\faFilePdf[regular]}}{}.%
%
% \item The file \myfile{enumext-06.tex} contains the tests for the environments
%   \myenv*{enumext} and \myenv*{enumext*} for \emph{fake} \myenv{itemize} and \myenv{description}.
%   \IfFileExists{enumext-06.pdf}{Source file \textattachfile[color=red,print=false]{enumext-06.tex}{\faFile*[regular]}
%   and \emph{tagged} \texttt{PDF} \textattachfile[color=red,print=false]{enumext-06.pdf}{\faFilePdf[regular]}}{}.%
% \end{itemize}
%
% \section{The way of non-enumerated lists}
%
% It is possible to use (or abuse) the \myenv*{enumext} and \myenv*{enumext*} environments to
% mimic \emph{non-enumerated} list environments such as \myenv{itemize} and
% \myenv{description}, clearly the \mymeta{keys} to \emph{\enquote{store answers}},
% the \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} environments lose their
% sense and it is not the focus of \mypkg*{enumext} package, but, why not
% to do it?.
%
% \smallskip
%
% Here I leave as an example other uses of the \myenv*{enumext}
% environment that can be helpful for specific purposes. The \emph{trick}
% to generate these \emph{\enquote{fake environments}} is set \mykey{label}|={}|
% or \mykey{label}|=|\mymarg{some} and play with the |list-indent|, |list-offset|,
% |font| and |wrap-label| keys.
%
% \subsection*{Fake \texttt{itemize} environment}
%
% Here we set the \mykey{label} key using the default settings in
% \hologo{LaTeX} for the four levels |\textbullet|, |\textendash|, |\textasteriskcentered|
% and |\textperiodcentered| together with the
% \mykey{nosep} key to reduce the vertical spaces in the left side example and set the
% \mykey{label} key in \emph{mathematical mode} for the right side as
% |\ast|, |\diamond|, |\circ| and |\star| for the four levels
% together with the \mykey{nosep} key
%
% \noindent\begin{minipage}[t]{0.45\linewidth}
% \begin{enumext}[nosep, label=\textbullet]
%  \item First level item
%    \begin{enumext}[nosep,label=\normalfont\bfseries\textendash]
%      \item Second level item
%        \begin{enumext}[nosep,label=\textasteriskcentered]
%          \item Third level item
%            \begin{enumext}[nosep,label=\textperiodcentered]
%                \item Fourth level item
%            \end{enumext}
%        \end{enumext}
%    \end{enumext}
%  \item First level item
% \end{enumext}
% \end{minipage}\hfill
% \begin{minipage}[t]{0.45\linewidth}
% \begin{enumext}[nosep, label=$\ast$]
%  \item First level item
%    \begin{enumext}[nosep,label=$\diamond$]
%      \item Second level item
%        \begin{enumext}[nosep,label=$\circ$]
%          \item Third level item
%            \begin{enumext}[nosep,label=$\star$]
%                \item Fourth level item
%            \end{enumext}
%        \end{enumext}
%    \end{enumext}
%  \item First level item
% \end{enumext}
% \end{minipage}
%
% \subsection*{Fake \texttt{description} environment}
%
% Here we set \mykey{label}|={}| and |list-indent=2.5em,font=\bfseries|.
%
% \begin{enumext}[label={},list-indent=2.5em,font=\bfseries,noitemsep,topsep=3pt]
%  \item[SomeThing] A short one-line description.
%  \item[] This is an entry \emph{without} a label.
%  \item[Something] A short \emph{one-line} description text.
%  \item[Something long] A much \emph{longer} description text may take
%    more than one line or more than one paragraph.
%
%    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
%    tempor incididunt ut labore et dolore magna aliqua.
% \end{enumext}
%
% If we add |list-indent=0pt| you get \emph{widest style}:
%
% \begin{enumext}[label={},list-indent=0pt,font=\bfseries,noitemsep,topsep=3pt]
%  \item[SomeThing] A short one-line description.
%  \item[] This is an entry \emph{without} a label.
%  \item[Something] A short \emph{one-line} description text.
%  \item[Something long] A much \emph{longer} description text may take
%    more than one line or more than one paragraph.
%
%    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
%    tempor incididunt ut labore et dolore magna aliqua.
% \end{enumext}
%
% \begin{important}*
% The small space at the beginning of the \emph{\enquote{unlabeled entry}} corresponds to
% |\labelsep| and can be removed using |\hspace{-\labelsep}| at the
% beginning of the line.
% \end{important}
%
% \smallskip
%
% \begin{important}
%  When \emph{tagged} PDF is active the default \myenv{description} style
%  is NOT available due to the redefinition of |\makelabel| for the
%  \mykey{align} key which uses |\makebox| in this case, meaning that
%  |\item|\myoarg{content} will not extend beyond |\labelwidth| which
%  causes overlaps,
% \end{important}
%
% \subsection*{Description indented by label}
%
% Here we set \mykey{label}|={}| and we will give a convenient value to
% \mykey{labelsep} and \mykey{labelwidth}, for example we can take as reference our
% \emph{longest label} and pass it as value using:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=none]
\newlength{\descitemwd}
\settowidth{\descitemwd}{\textbf{Something long}}
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% and then use \mykey{labelsep}|=4pt,|\mykey{labelwidth}|=\descitemwd,font=\bfseries|.
%
% \newlength{\descitemwd}
% \settowidth{\descitemwd}{\textbf{Something long}}
% \begin{enumext}[label={},labelsep=4pt,labelwidth=\descitemwd,font=\bfseries,noitemsep,topsep=3pt]
%  \item[SomeThing] A short one-line description.
%  \item[] This is an entry \textit{without} a label.
%  \item[Something] A short one-line description.
%  \item[Something long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
%    Curabitur dictum gravida mauris.
% \end{enumext}
%
% The environment can be translated so that the \mymeta{labels} are on
% the left margin calculating the value passed to the \mykey{list-offset}
% key, in this case it will be equal to the sum of the values set by the
% \mykey{labelwidth} and \mykey{labelsep} keys finally resulting as
% \mykey{list-offset}|={-\descitemwd - 4pt}|.
%
% \begin{enumext}[label={},labelsep=4pt,labelwidth=\descitemwd,list-offset={-\descitemwd-4pt}, font=\bfseries,noitemsep,topsep=3pt]
%  \item[SomeThing] A short one-line description.
%  \item This is an entry \textit{without} a label.
%  \item[Something] A short one-line description.
%  \item[Something long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
%    Curabitur dictum gravida mauris.
% \end{enumext}
%
% If we add \mykey{align}|=right| it will look like this:
%
% \begin{enumext}[label={},align=right,labelsep=4pt,labelwidth=\descitemwd,list-offset={-\descitemwd - 4pt}, font=\bfseries,noitemsep,topsep=3pt]
%  \item[SomeThing] A short one-line description.
%  \item This is an entry \textit{without} a label.
%  \item[Something] A short one-line description.
%  \item[Something long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
%    Curabitur dictum gravida mauris.
% \end{enumext}
%
% \begin{important}*
% At this point we have used \mykey{list-offset}|={-\descitemwd - 4pt}| instead of
% |list-offset={-\labelwidth - \labelsep}|,
% this is because the parameters |\labelwidth| and |\labelsep| take the
% default values, as if we had not set \mykey{label}.
% \end{important}
%
% \subsection*{Description with multi-line labels}
%
% The \mykey{label} key does not accept \emph{multiline material}, this
% is where the \mykey{wrap-label} and \mykey{wrap-label*} keys comes into
% play. Unlike the \mypkg{enumitem} package, the \mykey{align} key only
% supports three options, so what we will do is create a command in the
% style |\parleft| of \mypkg{enumitem} that allows us to place \emph{multiline labels}
% using |\parbox|.
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=none]
\NewDocumentCommand \labelbx { s +m }
  {%
    \SuspendTagging{\parbox}%
    \IfBooleanTF{#1}
      {\strut\smash{\parbox[t]{\labelwidth}{\raggedright{#2}}}}%
      {\strut\smash{\parbox[t]{\labelwidth}{\raggedleft{#2}}}}%
    \ResumeTagging{\parbox}%
  }
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% Now we just need to set |wrap-label*={\labelbx{#1}}|.%^^A |mode-box| and
%
% \begin{enumext}[mode-box,label={},labelsep=4pt,labelwidth=\descitemwd,list-offset=-\dimeval{\descitemwd+4pt}, wrap-label*={\labelbx{#1}}, font=\bfseries,noitemsep,topsep=3pt]
%  \item[SomeThing] A short one-line description.
%  \item This is an entry \textit{without} a label.
%  \item[Something] A short one-line description.
%  \item[Something \\ long] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
%    Curabitur dictum gravida mauris.
%
%    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
%    Curabitur dictum gravida mauris.
%
%  \item[SoMeThInG \\ LoNg] A much longer description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
%    Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
%    Curabitur dictum gravida mauris.
% \end{enumext}
%
% \section*{Final notes}
%
% The original implementation (if you can call it that) of the ideas that
% led to the creation of \mypkg*{enumext} were some macros using the \mypkg{enumerate}\cite{enumerate}
% package for personal use created in early 2003, the code was quite
% questionable, but functional for these simple requirements.
%
% \medskip
%
% With the great answers given by Christian Hupfer in
% \href{https://tex.stackexchange.com/a/364763/7832}{Create a fake label ref
% using list} and the answer given by David Carlisle in
% \href{https://tex.stackexchange.com/a/363963/7832}{Change the use of label
% ref by data save in an array (list)} I managed to create a more solid
% code than the original version, now using the \mypkg{l3prop}\cite{inter3} and \mypkg{l3seq}\cite{inter3}
% modules together with the \mypkg{hyperref}\cite{hyperref} and \mypkg{enumitem}\cite{enumitem} packages, which did
% the job, but with some limitations.
%
% \smallskip
%
% As time went by I took these limitations as a personal challenge which
% I called \emph{\enquote{reinventing the wheel}}, since there were packages and classes
% that did more or less what I was looking for, but did not fit my simple
% requirements. This \emph{\enquote{reinventing the wheel}} finally ended up becoming
% \mypkg*{enumext}.
%
% \subsubsection*{Why list environments?}
%
% The answer is simple, first I love the beauty of its syntax and many of
% what I had already written used the \myenv{enumerate} environment or
% lists created using the \mypkg{enumitem} package. In my mind I thought:
% how complicated could it be to write a package that looked like
% \mypkg{enumitem}? It seemed simple enough, of course I didn't have in
% mind the mess I was getting into working with \myenv{list}
% environments, \myenv{minipage} and adding support for the
% \mypkg{multicol} and \mypkg{hyperref} packages.
%
% Of course, seeing the final result of the experiment
% \emph{\enquote{reinventing the wheel}} I am quite satisfied.
%
% \subsubsection*{Why not random questions and other utilities}
%
% The \emph{\enquote{random}} type questions I love and hate them at the
% same time, although they simplify a lot the work when creating a
% multiple choice test, but you lose the beauty of typessetting a
% document with \hologo{LaTeX}, that is to say the output does not always
% look as nice as it should, even if they are only alternatives these
% must follow a certain order when presented either numerical or
% presentation, that said handling that using \emph{nested lists} is quite
% complicated so I do not classify to be implemented.
%
% \subsubsection*{Why has it taken so long?}
%
% One of the setbacks, beyond my laziness, was including compatibility
% with \emph{tagged} \texttt{PDF}. To be honest, it's something I never
% considered at any point, but I firmly believe that being able to create
% \emph{accessible documents} provides a great opportunity in the world of
% mathematics education. From my perspective as a \emph{high school} teacher,
% beyond theorems and deep mathematics, the use of exercise lists is one
% of the most common things. Being able to open the way to work in
% parallel with those who have different abilities is really important
% and I regret not having looked into this in the past. I hope that
% \mypkg*{enumext} serves this purpose and inspires more users and
% authors to follow this path.
%
% \let\stdsection\section
% \def\section*#1{\stdsection{#1}}
%
% \begin{thebibliography}{10}
%
% \bibitem{exam} \textsc{Hirschhorn, Philip}. \enquote{Using the
% \textsf{exam} document class}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/exam}, 2023.
%
% \bibitem{xsim} \textsc{Niederberger, Clemens}. \enquote{\textsf{xsim} – eXercise
% Sheets IMproved}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/xsim}, 2023.
%
% \bibitem{multicol} \textsc{Mittelbach, Frank}. \enquote{An
% environment for \textsf{multicolumn} output}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/multicol}, 2024.
%
% \bibitem{scontents} \textsc{González, Pablo}. \enquote{\textsf{scontents} - Stores
% \hologo{LaTeX} contents in memory or files}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/scontents}, 2024.
%
% \bibitem{enumerate} The \hologo{LaTeX} Project. \enquote{\textsf{enumerate} – Enumerate
% with redefinable labels}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/enumerate}, 2024.
%
% \bibitem{enumitem} \textsc{Bezos, Javier}. \enquote{Customizing lists
% with the \textsf{enumitem} package}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/enumitem}, 2019
%
% \bibitem{latexref} \textsc{Berry, Karl}. \enquote{\hologo{LaTeX2e}: An
% Unofficial Reference Manual}. Available from \textsc{ctan},
% \url{https://ctan.org/pkg/latex2e-help-texinfo}, 2024.
%
% \bibitem{hyperref} The \hologo{LaTeX} Project. \enquote{Extensive support
% for hypertext in \hologo{LaTeX}}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/hyperref}, 2024.
%
% \bibitem{footnotehyper} \textsc{Burnol, Jean-François}. \enquote{The \textsf{footnotehyper}
% package}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/footnotehyper}, 2021.
%
% \bibitem{expl3} The \hologo{LaTeX} Project. \enquote{The \textsf{expl3}
% package}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/l3kernel}, 2024.
%
% \bibitem{inter3} The \hologo{LaTeX} Project. \enquote{The \hologo{LaTeX}3
% Interfaces}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/l3kernel}, 2024.
%
% \bibitem{latex2e} The \hologo{LaTeX} Project. \enquote{The \hologo{LaTeX2e}
% sources}. Available from
% \textsc{ctan}, \url{https://ctan.org/tex-archive/macros/latex/base}, 2024.
%
% \bibitem{userguide} The \hologo{LaTeX} Project. \enquote{\hologo{LaTeX} for authors
% current version}. Available from
% \textsc{ctan}, \url{https://ctan.org/pkg/latex-base}, 2024.
%
% \bibitem{luavisual} \textsc{Gundlach, Patrick}. \enquote{The \textsf{lua-visual-debug}
% package}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/lua-visual-debug}, 2023.
%
% \bibitem{shortlst} \textsc{Lemvig, Mogens}. \enquote{The \textsf{shortlst}
% package}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/shortlst}, 1998.
%
% \bibitem{tasks} \textsc{Niederberger, Clemens}. \enquote{\textsf{tasks} – Horizontally
% columned lists}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/tasks}, 2022.
%
% \bibitem{tagpdf} \textsc{Fischer, Ulrike}. \enquote{\textsf{tagpdf} – \hologo{LaTeX}
% kernel code for PDF tagging}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/tagpdf}, 2024.
%
% \bibitem{latexlab} The \hologo{LaTeX} Project. \enquote{\textsf{latex-lab} – \hologo{LaTeX}
% laboratory}. Available from
% \textsc{ctan}, \url{https://www.ctan.org/pkg/latex-lab}, 2024.
%
% \bibitem{ltsockets} \textsc{Mittelbach, Frank}. \enquote{\hologo{LaTeX}’s
% socket management}. Available from
% \textsc{ctan}, \url{https://ctan.org/tex-archive/macros/latex/base}, 2024.
%
% \end{thebibliography}
%
% \let\section\stdsection
%
% \section{Change history}
% \label{sec:changes}
%
% \setlist[itemize,1]{label=\textendash,wide=0.5em,nosep,noitemsep,leftmargin=10pt}
% \newlength\descrwidth
% \settowidth{\descrwidth}{\textsf{v1.0, (ctan), 2024-11-01} }
%
% \begin{description}[font=\small\sffamily,wide=0pt,style=multiline,leftmargin=1.1\descrwidth,nosep,noitemsep]
%  \item [\fileversion{} (ctan), \filedate]
%    \begin{itemize}
%      \item Fixed implementation for |font| and |base-fix| keys.
%      \item Added new keys for symbol marks.
%      \item Update and improvements in the internal code.
%      \item Adjustments in the documentation.
%    \end{itemize}
%  \item [v1.0 (ctan), 2024-11-01]
%    \begin{itemize}
%    \item First public release.
%    \end{itemize}
% \end{description}
%
% \newpage
%
% \indexprologue{
% The italic numbers denote the pages where the corresponding entry is
% described.}
%
% \printindex[userdoc]
%
% \newpage
%
% \StartImplementation
%
% \StopEventually{^^A
% \newgeometry{top=0.5in,bottom=0.3in,left=1.0in,right=0.5in,footskip=0.2in,headheight=1cm,headsep=0.27cm}
% \addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
% \cleardoublepage
% \phantomsection
% \indexprologue{
% The italic numbers denote the pages where the corresponding entry is
% described, the numbers underlined and all others indicate the line on
% which they are implemented in the package code.
% }
% \printindex
% }
%
% \newgeometry{top=0.5in,bottom=0.3in,left=1.95in,right=0.5in,footskip=0.2in,headheight=1cm,headsep=0.27cm}
%
% \section{Implementation}
% \label{sec:Implementation}
% \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
%
% The most recent publicly released version of \mypkg*{enumext} is
% available at \textsc{ctan}: \url{https://www.ctan.org/pkg/enumext}.
% While general feedback via email is welcomed, specific bugs or
% feature requests should be reported through the issue
% tracker: \textcolor{gray}{\scriptsize\faIcon[regular]{github}} \url{https://github.com/pablgonz/enumext/issues}.
%
% \smallskip
%
% \begin{important}*
% The documentation presented here is far from professional, it contains
% a lot of obvious information that to the eye of a \hologo{TeX}pert are
% superfluous, but, after so many years developing this project is the
% only way to remember what does what.
% \end{important}
%
% \subsection{General conventions}
%
% Variables containing \lstinline+i+, \lstinline+ii+, \lstinline+iii+ and
% \lstinline+iv+ are associated by level with the \myenv*{enumext}
% environment, variables containing \lstinline+v+ are associated with the
% \myenv*{keyans} environment, variables containing \lstinline+vi+ are
% associated with the \myenv*{keyanspic} environment, variables
% containing \lstinline+vii+ are associated with the \myenv*{enumext*}
% environment and variables containing \lstinline+viii+ are associated
% with the \myenv*{keyans*} environment.
%
% \medskip
%
% To simplify writing and documentation some variables and functions that
% are common to the different levels of the environments are described
% using a capital \enquote{\texttt{\textcolor{optcolor}{X}}}.
%
% \medskip
%
% The temporary function \myvarenv{__@@_tmp:n} is used in
% different parts of the package code for variable creation or execution
% of other functions that are grouped into this one.
%
% \medskip
%
% All variables and functions defined in this package are private and
% are NOT intended to work or be used by another package or module.
%
% \subsection{Initial set up}
%
% Start the \pkg{DocStrip} guards.
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
% Identify the internal prefix (\LaTeX3 \pkg{DocStrip} convention) for
% \pkg{l3doc} class.
%    \begin{macrocode}
%<@@=enumext>
%    \end{macrocode}
%
% \subsection{Declaration of the package}
%
% First we will make sure we have a minimum (super updated) version of
% \hologo{LaTeX} to work correctly.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2024-11-01]
%    \end{macrocode}
% Now declare the \mypkg*{enumext} package.
%    \begin{macrocode}
\ProvidesExplPackage {enumext} {2024-11-14} {1.1} {Enumerate exercise sheets}
%    \end{macrocode}
% Finally check if the \mypkg{multicol} and \mypkg{scontents} packages
% are loaded, if not we load it.
%    \begin{macrocode}
\hook_gput_code:nnn {begindocument} {enumext}
  {
    \IfPackageLoadedTF { multicol }
      {
        \msg_info:nnn { enumext } { package-load } { multicol }
      }
      {
        \msg_info:nnn { enumext } { package-not-load } { multicol }
        \RequirePackage{multicol}[2024-05-23]
      }
    \IfPackageLoadedTF { scontents }
      {
        \msg_info:nnn { enumext } { package-load } { scontents }
      }
      {
        \msg_info:nnn { enumext } { package-not-load } { scontents }
        \RequirePackage{scontents}
      }
  }
%    \end{macrocode}
%
% \subsection{Definition of variables}
%
% Variables that do not appear in this section are created by means of
% \cs[no-index]{keys_define:nn} or some function described below.
%
% \begin{variable}[int]{\l_@@_level_int, \l_@@_level_h_int, \l_@@_anskey_level_int,
%                       \l_@@_keyans_level_int, \l_@@_keyans_level_h_int,
%                       \l_@@_keyans_pic_level_int,}
%   Integer variables will control the nesting levels of the environments
%   and |\anskey| command.
% \iffalse
%% Variable for levels and nesting off all environments and \anskey.
% \fi
%    \begin{macrocode}
\int_new:N  \l_@@_level_int
\int_new:N  \l_@@_level_h_int
\int_new:N  \l_@@_anskey_level_int
\int_new:N  \l_@@_keyans_level_int
\int_new:N  \l_@@_keyans_level_h_int
\int_new:N  \l_@@_keyans_pic_level_int
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_starred_bool, \g_@@_starred_bool, \l_@@_starred_first_bool,
%                       \l_@@_standar_bool, \g_@@_standar_bool, \l_@@_standar_first_bool,
%                       \l_@@_anskey_env_bool, \l_@@_keyans_env_bool,\g_@@_start_line_tl,
%                       \g_@@_envir_name_tl, \l_@@_envir_name_tl}
%   Internal variables used by functions \cs{@@_is_not_nested:},
%   \cs{@@_is_on_first_level:} and \cs{@@_keyans_name_and_start:} (\S\ref{fun:utilities}).
% \iffalse
%% Internal vars for levels and nesting off all environments.
% \fi
%    \begin{macrocode}
\bool_new:N \l_@@_starred_bool
\bool_new:N \g_@@_starred_bool
\bool_new:N \l_@@_starred_first_bool
\bool_new:N \l_@@_standar_bool
\bool_new:N \g_@@_standar_bool
\bool_new:N \l_@@_standar_first_bool
\bool_new:N \l_@@_anskey_env_bool
\bool_new:N \l_@@_keyans_env_bool
\tl_new:N   \g_@@_start_line_tl
\tl_new:N   \g_@@_envir_name_tl
\tl_new:N   \l_@@_envir_name_tl
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_counter_i_tl, \l_@@_counter_ii_tl,
%                       \l_@@_counter_iii_tl, \l_@@_counter_iv_tl,
%                       \l_@@_counter_v_tl,\l_@@_counter_vi_tl,
%                       \l_@@_counter_vii_tl,\l_@@_counter_viii_tl}
%
%   Variables to store the \emph{\enquote{name of the counters}}
%   \icounter{enumXi}, \icounter{enumXii}, \icounter{enumXiii} and
%   \icounter{enumXiv} for \myenv*{enumext}  environment,
%   \icounter{enumXv} for \myenv*{keyans} environment and
%   \icounter{enumXvi} for the \myenv*{keyanspic} environment.
%   The counters \icounter{enumXvii} and \icounter{enumXviii} are used
%   by \myenv*{enumext*} and \myenv*{keyans*} environments.
%
% \smallskip
%
%   The initial values of these variables are set by the function
%   \cs{@@_define_counters:Nn} (\S\ref{int:counters}) and then modified by the function
%   \cs{@@_label_style:Nnn} used by \mykey{label} key (\S\ref{key:label-ref}).
% \iffalse
%% Variable for counters
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \tl_new:c { l_@@_counter_#1_tl }
  }
\clist_map_inline:nn { i, ii, iii, iv, v, vi, vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\c_@@_counter_style_tl, \l_@@_ref_key_arg_tl,
%                       \l_@@_ref_the_count_tl, \l_@@_the_counter_X_tl,
%                       \l_@@_renew_the_count_X_tl, }
%   Internal variables used by \mykey{ref} key (\S\ref{key:label-ref}).
% \iffalse
%% Variables used by |ref| key.
% \fi
%    \begin{macrocode}
\tl_const:Nn \c_@@_counter_style_tl
  { { arabic } { roman } { Roman } { alph } { Alph } }
\tl_new:N \l_@@_ref_key_arg_tl
\tl_new:N \l_@@_ref_the_count_tl
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \tl_new:c  { l_@@_renew_the_count_#1_tl }
    \tl_new:c  { l_@@_the_counter_#1_tl }
    \tl_set:ce { l_@@_the_counter_#1_tl } { \exp_not:c { theenumX#1 } }
  }
\clist_map_inline:nn { i, ii, iii, iv, v, vi, vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_resume_int, \g_@@_resume_vii_int, \l_@@_resume_name_tl,
%                  \l_@@_resume_active_bool, \g_@@_starred_series_tl,
%                  \g_@@_standar_series_tl,}
%
%   Internal variables used by \mykey{resume}, \mykey{resume*} and
%   \mykey{series} keys (\S\ref{key:series}).
% \iffalse
%% Variables used by |series|, |resume| and |resume*| keys implementation.
% \fi
%    \begin{macrocode}
\int_new:N  \g_@@_resume_int
\int_new:N  \g_@@_resume_vii_int
\tl_new:N   \l_@@_resume_name_tl
\bool_new:N \l_@@_resume_active_bool
\tl_new:N   \g_@@_standar_series_tl
\tl_new:N   \g_@@_starred_series_tl
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_current_widest_dim, \g_@@_counter_styles_tl,
%                       \g_@@_widest_label_tl, \l_@@_label_width_by_box}
%   The variable \cs{l_@@_current_widest_dim} stores the current
%   label width, the variable \cs{g_@@_counter_styles_tl} stores
%   the default \mymeta{label style} and the variable
%   \cs{g_@@_widest_label_tl} the label width. These variables are
%   used by \mykey{widest} (\S\ref{key:start-widest}) and \mykey{label} (\S\ref{key:label}) keys.
% \iffalse
%% Variables used by |label|, |ref| and |widest| keys.
% \fi
%    \begin{macrocode}
\dim_new:N \l_@@_current_widest_dim
\tl_new:N  \g_@@_counter_styles_tl
\tl_new:N  \g_@@_widest_label_tl
\box_new:N \l_@@_label_width_by_box
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_leftmargin_tmp_X_bool, \l_@@_leftmargin_tmp_X_dim,
%                       \l_@@_leftmargin_X_dim, \l_@@_itemindent_X_dim,}
%   The boolean variable \myvarenv{l__@@_leftmargin_tmp_X_bool} and the
%   dimensional variable \myvarenv{l__@@_leftmargin_tmp_X_dim}
%   are used by the \mykey{list-indent} key (\S\ref{key:list-indent}).
%   The variables \myvarenv{l__@@_leftmargin_X_dim} and
%   \myvarenv{l__@@_itemindent_X_dim} are used and set by the function
%   \myvarenv{__@@_calc_hspace:NNNNNNNNNNNN} (\S\ref{int:leftmargin}).
% \iffalse
%% Add \l__enumext_leftmargin_tmp_X_bool, \l__enumext_leftmargin_tmp_X_dim,
%% \l__enumext_leftmargin_X_dim, \l__enumext_itemindent_X_dim used by the
%% function \enumext_calc_hspace:NNNNNNNNNNNN and |list-indent| key.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \bool_new:c { l_@@_leftmargin_tmp_#1_bool }
    \dim_new:c  { l_@@_leftmargin_tmp_#1_dim  }
    \dim_new:c  { l_@@_leftmargin_#1_dim      }
    \dim_new:c  { l_@@_itemindent_#1_dim      }
  }
\clist_map_inline:nn { i, ii, iii, iv, v, vi, vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{ \l_@@_multicols_above_X_skip, \l_@@_multicols_below_X_skip,
%                        \g_@@_multicols_right_X_skip, \l_@@_align_label_pos_X_str,}
%   Internal variables used by \mykey{columns} key (\S\ref{vspace:multi})
%   and \mykey{align} key (\S\ref{key:label}).
% \iffalse
%% Variables used by |columns| and |align| keys in |enumext| and |keyans| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \skip_new:c  { l_@@_multicols_above_#1_skip }
    \skip_new:c  { l_@@_multicols_below_#1_skip }
    \skip_new:c  { g_@@_multicols_right_#1_skip }
    \str_new:c   { l_@@_align_label_pos_#1_str  }
  }
\clist_map_inline:nn { i, ii, iii, iv, v } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\g_@@_minipage_stat_int, \l_@@_minipage_temp_skip,
%                       \l_@@_minipage_left_skip, \l_@@_minipage_right_skip,
%                       \l_@@_minipage_after_skip, \g_@@_minipage_right_skip,
%                       \g_@@_minipage_after_skip, \l_@@_minipage_left_X_dim,
%                       \l_@@_minipage_active_X_bool,}
%   Internal variables used by \ics*{miniright} command (\S\ref{cmd:miniright})
%   and the keys \mykey{mini-right}, \mykey{mini-right*}, \mykey{mini-env}
%   and \mykey{mini-sep} (\S\ref{key:mini-multi}, \S\ref{vspace:minipage}).
% \iffalse
%% Variables used by |miniright|, |mini-env|, |mini-sep| and |\miniright|.
% \fi
%    \begin{macrocode}
\int_new:N  \g_@@_minipage_stat_int
\skip_new:N \l_@@_minipage_temp_skip
\skip_new:N \l_@@_minipage_left_skip
\skip_new:N \l_@@_minipage_right_skip
\skip_new:N \l_@@_minipage_after_skip
\skip_new:N \g_@@_minipage_right_skip
\skip_new:N \g_@@_minipage_after_skip
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \dim_new:c  { l_@@_minipage_left_#1_dim    }
    \bool_new:c { l_@@_minipage_active_#1_bool }
  }
\clist_map_inline:nn { i, ii, iii, iv, v, vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_wrap_label_X_bool, \l_@@_wrap_label_opt_X_bool,
%                       \l_@@_start_X_int, \l_@@_fake_item_indent_X_tl, \l_@@_label_fill_left_X_tl,
%                       \l_@@_label_fill_right_X_tl, \l_@@_vspace_a_star_X_bool,
%                       \l_@@_vspace_b_star_X_bool,}
%   The bool vars \myvarenv{l__@@_wrap_label_X_bool} and
%   \myvarenv{l__@@_wrap_label_opt_X_bool} are used by \mykey{wrap-label}
%   and \mykey{wrap-label*} keys (\S\ref{key:label}), the integer
%   \myvarenv{l__@@_start_X_int} are used by the \mykey{start} and \mykey{start*} keys (\S\ref{key:start-widest}),
%   the token list \myvarenv{l__@@_fake_item_indent_X_tl } is used by \mykey{itemindent} key (\S\ref{key:fake-indent}),
%   the variables \myvarenv{l__@@_label_fill_left_X_tl} and \myvarenv{l__@@_label_fill_left_X_tl} are used by the
%   \mykey{align} key (\S\ref{key:label}). The boolean vars \myvarenv{l__@@_vspace_a_star_X_bool},
%   \myvarenv{l__@@_vspace_b_star_X_bool} are used by \mykey{above},
%   \mykey{above*}, \mykey{below} and \mykey{below*} keys (\S\ref{key:before}).
% \iffalse
%% Internal variables used by |wrap-label|, |start*|, |start|, |align|, |above| and |below| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \bool_new:c { l_@@_wrap_label_#1_bool     }
    \bool_new:c { l_@@_wrap_label_opt_#1_bool }
    \int_new:c  { l_@@_start_#1_int           }
    \tl_new:c   { l_@@_fake_item_indent_#1_tl }
    \tl_new:c   { l_@@_label_fill_left_#1_tl  }
    \tl_new:c   { l_@@_label_fill_right_#1_tl }
    \bool_new:c { l_@@_vspace_a_star_#1_bool  }
    \bool_new:c { l_@@_vspace_b_star_#1_bool  }
  }
\clist_map_inline:nn { i, ii, iii, iv, v, vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_store_active_bool, \l_@@_store_name_tl,
%                       \g_@@_store_name_tl, \l_@@_store_anskey_arg_tl,
%                       \l_@@_store_anskey_env_tl, \l_@@_store_anskey_opt_tl,
%                       \l_@@_store_current_label_tl, \l_@@_store_current_opt_arg_tl,
%                       \l_@@_store_current_label_tmp_tl,}
%
%   The variable \cs{l_@@_store_active_bool} setting by
%   \mykey{save-ans} key (\S\ref{key:save-ans}) activates all the
%   mechanism related to \ics*{anskey}, \myenv*{anskey*}, \myenv*{keyans},
%   \myenv*{keyans*} and \myenv*{keyanspic} environments.
%
%   \smallskip
%
%   The variable \cs{l_@@_store_name_tl} saves the \mymarg{store name}
%   set by the \mykey{save-ans} key of the \emph{sequence} and \emph{prop
%   list} in which we will store, the variable \cs{g_@@_store_name_tl}
%   it's just a global copy of \mymarg{store name} used by different functions.
%
%   \smallskip
%
%   The variable \cs{l_@@_store_anskey_arg_tl} save the
%   \emph{argument} of \ics*{anskey} (\S\ref{cmd:anskey}) and the variables
%   \cs{l_@@_store_anskey_env_tl} and \cs{l_@@_store_anskey_opt_tl} save the
%   \mymeta{body} and the \mymeta{keys} of the environment \myenv*{anskey*} (\S\ref{env:anskey}).
%
%   \smallskip
%
%   The variables \cs{l_@@_store_current_label_tl} and
%   \cs{l_@@_store_current_opt_arg_tl} save the \emph{current label} and
%   \emph{optional argument} of \ics*{item*} (\S\ref{cmd:item-starred}) and \ics*{anspic*}
%   (\S\ref{cmd:anspic}) for the \myenv*{keyans}, \myenv*{keyans*} and
%   \myenv*{keyanspic} environments.
%
%   \smallskip
%
%   The variable \cs{l_@@_store_current_label_tmp_tl} is a temporary variable used
%   by \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} at various points.
% \iffalse
%% Variables used by |save-ans| key.
% \fi
%    \begin{macrocode}
\bool_new:N \l_@@_store_active_bool
\tl_new:N   \l_@@_store_name_tl
\tl_new:N   \g_@@_store_name_tl
\tl_new:N   \l_@@_store_anskey_arg_tl
\tl_new:N   \l_@@_store_anskey_env_tl
\tl_new:N   \l_@@_store_anskey_opt_tl
\tl_new:N   \l_@@_store_current_label_tl
\tl_new:N   \l_@@_store_current_opt_arg_tl
\tl_new:N   \l_@@_store_current_label_tmp_tl
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_setkey_tmpa_tl, \l_@@_setkey_tmpb_tl,
%                       \l_@@_setkey_tmpa_int, \l_@@_setkey_tmpa_seq,
%                       \l_@@_setkey_tmpb_seq,}
%   Internal variables used by the command \ics*{setenumext} (\S\ref{cmd:setenumext}).
% \iffalse
%% Variables used by |\setenumext|.
% \fi
%    \begin{macrocode}
\tl_new:N  \l_@@_setkey_tmpa_tl
\tl_new:N  \l_@@_setkey_tmpb_tl
\int_new:N \l_@@_setkey_tmpa_int
\seq_new:N \l_@@_setkey_tmpa_seq
\seq_new:N \l_@@_setkey_tmpb_seq
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_meta_path_tl, \l_@@_foreach_print_seq,
%                       \l_@@_foreach_name_prop_tl, \g_@@_foreach_default_keys_tl,}
%   Internal variables used by the |\printkeyans| command (\S\ref{cmd:printkeyans})
%   and |\foreachkeyans| command (\S\ref{cmd:foreachkeyans}).
%    \begin{macrocode}
\tl_new:N  \l_@@_meta_path_tl
\seq_new:N \l_@@_foreach_print_seq
\tl_new:N  \l_@@_foreach_name_prop_tl
\tl_new:N  \g_@@_foreach_default_keys_tl
%    \end{macrocode}
% \end{variable}
%
%
% \begin{variable}[int]{\l_@@_print_keyans_starred_tl, \l_@@_print_keyans_star_bool,
%                       \l_@@_mark_position_str, \l_@@_mark_position_v_str,
%                       \l_@@_mark_position_viii_str, \l_@@_mark_sep_tmpa_dim,
%                       \l_@@_mark_sep_tmpb_dim, \l_@@_show_pos_tmp_int,
%                       \g_@@_item_symbol_aux_tl, \l_@@_print_keyans_X_tl,
%                       \l_@@_store_save_key_X_tl, \l_@@_store_save_key_X_bool,
%                       \l_@@_store_upper_level_X_bool,}
%   Internal variables used by command \ics*{printkeyans}
%   (\S\ref{cmd:printkeyans}), \mykey{show-pos}, \mykey{show-ans}, \mykey{mark-pos}, \mykey{mark-sep} keys (\S\ref{int:storage-system}),
%   \mykey{item-sym*} key (\S\ref{key:item-starred}), \mykey{save-key} key
%   (\S\ref{key:save-key}) and \emph{\enquote{storing structure}}.
% \iffalse
%% Variables used by |\printkeyans|, |mark-pos|, |item-sym*|, |save-key| and  storing structure in |enumext| and |enumext*|.
% \fi
%    \begin{macrocode}
\tl_new:N   \l_@@_print_keyans_starred_tl
\bool_new:N \l_@@_print_keyans_star_bool
\str_new:N  \l_@@_mark_position_str
\str_new:N  \l_@@_mark_position_v_str
\str_new:N  \l_@@_mark_position_viii_str
\dim_new:N  \l_@@_mark_sep_tmpa_dim
\dim_new:N  \l_@@_mark_sep_tmpb_dim
\int_new:N  \l_@@_show_pos_tmp_int
\tl_new:N   \g_@@_item_symbol_aux_tl
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \tl_new:c   { l_@@_print_keyans_#1_tl        }
    \tl_new:c   { l_@@_store_save_key_#1_tl      }
    \bool_new:c { l_@@_store_save_key_#1_bool    }
    \bool_new:c { l_@@_store_upper_level_#1_bool }
  }
\clist_map_inline:nn { i, ii, iii, iv, vii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_anspic_args_seq, \l_@@_anspic_mini_width_dim,
%                  \l_@@_anspic_above_int,\l_@@_anspic_below_int,
%                  \l_@@_anspic_label_above_bool, \l_@@_anspic_mini_pos_str,
%                  \l_@@_anspic_label_box, \l_@@_anspic_body_box,
%                  \l_@@_anspic_label_htdp_dim, \l_@@_anspic_body_htdp_dim,}
%    Internal variables used by \myenv*{keyanspic} environment and
%   \ics*{anspic} command (\S\ref{env:keyanspic}).
% \iffalse
%% Variables used by |\anspic| and |keyanspic|.
% \fi
%    \begin{macrocode}
\seq_new:N  \l_@@_anspic_args_seq
\dim_new:N  \l_@@_anspic_mini_width_dim
\int_new:N  \l_@@_anspic_above_int
\int_new:N  \l_@@_anspic_below_int
\bool_new:N \l_@@_anspic_label_above_bool
\str_new:N  \l_@@_anspic_mini_pos_str
\box_new:N  \l_@@_anspic_label_box
\box_new:N  \l_@@_anspic_body_box
\dim_new:N  \l_@@_anspic_label_htdp_dim
\dim_new:N  \l_@@_anspic_body_htdp_dim
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_check_answers_bool,\g_@@_check_ans_key_bool,
%                  \l_@@_check_start_line_env_tl, \l_@@_item_wrap_key_bool,
%                  \g_@@_check_starred_cmd_int, \g_@@_item_anskey_int,
%                  \g_@@_item_number_int, \g_@@_item_number_bool,
%                  \g_@@_item_answer_diff_int,}
%   Internal variables used by \emph{\enquote{internal check answer}} mechanism
%   (\S\ref{int:check-answer}) used by the \mykey{check-ans}, \mykey{no-store}, \mykey{wrap-ans*}
%   keys and check for starred commands \ics*{item*} in \myenv*{keyans} and
%   \myenv*{keyans*} environments and \ics*{anspic*}
%   in \myenv*{keyanspic} environment.
% \iffalse
%% Variables used by check-answer mechanism, |check-ans|, |wrap-ans*| and |no-store| keys.
% \fi
%    \begin{macrocode}
\bool_new:N \l_@@_check_answers_bool
\bool_new:N \g_@@_check_ans_key_bool
\tl_new:N   \l_@@_check_start_line_env_tl
\bool_new:N \l_@@_item_wrap_key_bool
\int_new:N  \g_@@_check_starred_cmd_int
\int_new:N  \g_@@_item_anskey_int
\int_new:N  \g_@@_item_number_int
\bool_new:N \l_@@_item_number_bool
\int_new:N  \g_@@_item_answer_diff_int
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_hyperref_bool, \l_@@_footnotes_key_bool,}
%   The boolean variable \cs{l_@@_hyperref_bool} will determine if the
%   \mypkg{hyperref} package is present or load in memory
%   (\S\ref{pkg:hyperref}). The boolean variable \cs{l_@@_footnotes_key_bool}
%   determine if \mypkg{hyperref} is load with key |hyperfootnotes=true|.
% \iffalse
%% Variables used for hyperref detection.
% \fi
%    \begin{macrocode}
\bool_new:N \l_@@_hyperref_bool
\bool_new:N \l_@@_footnotes_key_bool
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{ \l_@@_newlabel_arg_one_tl, \l_@@_newlabel_arg_two_tl,
%                        \l_@@_write_aux_file_tl, \l_@@_label_copy_X_tl, }
%   Internal variables used by \mykey{save-ref} key (\S\ref{int:storage-system}).
%   The variables \myvarenv{l__@@_label_copy_X_tl} correspond to temporary
%   copies of the \mymeta{labels} defined by level on which operations will be performed.
%
%   \smallskip
%
%   The variables \cs{l_@@_newlabel_arg_one_tl} and \cs{l_@@_newlabel_arg_two_tl}
%   will be used to form the arguments passed to the function
%   \cs{@@_newlabel:nn} (\S\ref{fun:newlabel}) and the variable \cs{l_@@_write_aux_file_tl}
%   will be in charge of executing the writing code in the |.aux| file.
% \iffalse
%% Variables used by |save-ref| key (internal label and ref).
% \fi
%    \begin{macrocode}
\tl_new:N \l_@@_newlabel_arg_one_tl
\tl_new:N \l_@@_newlabel_arg_two_tl
\tl_new:N \l_@@_write_aux_file_tl
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \tl_new:c { l_@@_label_copy_#1_tl }
  }
\clist_map_inline:nn { i, ii, iii, iv, v, vi, vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{ \g_@@_footnote_standar_int, \g_@@_footnote_starred_int,
%                   \g_@@_footnote_standar_arg_seq, \g_@@_footnote_starred_arg_seq,
%                   \g_@@_footnote_standar_int_seq, \g_@@_footnote_starred_int_seq}
%   Internal variables used for redefinition of |\footnote| (\S\ref{ltx:footnote}).
% \iffalse
%% Variables used by |footnote| redefinition.
% \fi
%    \begin{macrocode}
\int_new:N \g_@@_footnote_standar_int
\int_new:N \g_@@_footnote_starred_int
\seq_new:N \g_@@_footnote_standar_arg_seq
\seq_new:N \g_@@_footnote_starred_arg_seq
\seq_new:N \g_@@_footnote_standar_int_seq
\seq_new:N \g_@@_footnote_starred_int_seq
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}[int]{\l_@@_item_starred_X_bool, l_@@_item_column_pos_X_int,
%                       \g_@@_item_count_all_X_int, \l_@@_joined_item_X_int,
%                       \l_@@_joined_item_aux_X_int, \l_@@_tmpa_X_int, \l_@@_tmpa_X_dim,
%                       \l_@@_item_text_X_box, \l_@@_joined_width_X_dim,
%                       \l_@@_item_width_X_dim, \g_@@_item_symbol_aux_X_tl,
%                       \l_@@_align_label_X_str, \g_@@_minipage_active_X_bool,
%                       \l_@@_miniright_code_X_box , \g_@@_minipage_center_X_bool,
%                       \g_@@_minipage_right_X_dim, \g_@@_minipage_right_X_skip,}
%    Internal variables used by \myenv*{enumext*} and \myenv*{keyans*} environments.
% \iffalse
%% Variables used by |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \bool_new:c { l_@@_item_starred_#1_bool    }
    \int_new:c  { l_@@_item_column_pos_#1_int  }
    \int_new:c  { g_@@_item_count_all_#1_int   }
    \int_new:c  { l_@@_joined_item_#1_int      }
    \int_new:c  { l_@@_joined_item_aux_#1_int  }
    \int_new:c  { l_@@_tmpa_#1_int             }
    \dim_new:c  { l_@@_tmpa_#1_dim             }
    \box_new:c  { l_@@_item_text_#1_box        }
    \dim_new:c  { l_@@_joined_width_#1_dim     }
    \dim_new:c  { l_@@_item_width_#1_dim       }
    \tl_new:c   { g_@@_item_symbol_aux_#1_tl   }
    \str_new:c  { l_@@_align_label_#1_str      }
    \bool_new:c { g_@@_minipage_active_#1_bool }
    \box_new:c  { l_@@_miniright_code_#1_box   }
    \bool_new:c { g_@@_minipage_center_#1_bool }
    \dim_new:c  { g_@@_minipage_right_#1_dim   }
    \skip_new:c { g_@@_minipage_right_#1_skip  }
  }
\clist_map_inline:nn { vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_all_envs_clist,}
%    An internal |clist-var| variable to run with \myvarenv{__@@_tmp:n}.
%    \begin{macrocode}
\clist_const:Nn \c_@@_all_envs_clist
  {
    {level-1}{i}, {level-2}{ii}, {level-3}{iii}, {level-4}{iv},
    {keyans}{v}, {enumext*}{vii}, {keyans*}{viii}
  }
%    \end{macrocode}
% \end{variable}
%
% \subsection{Some utility functions}
%
% \begin{macro}[int]{\keys_precompile:neN, \seq_use:NV,}
%    Non-standard kernel variants used by the |\printkeyans| command
%    (\S\ref{cmd:printkeyans}) and |\foreachkeyans| command (\S\ref{cmd:foreachkeyans}).
%    \begin{macrocode}
\cs_generate_variant:Nn \keys_precompile:nnN { neN }
\cs_generate_variant:Nn \seq_use:Nn { NV }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_at_begin_document:n}
%    A internal \emph{\enquote{hook}} function used for copying plain
%    \myenv{list} and \myenv{minipage} environments definition and
%    \mypkg{hyperref} detection.
% \iffalse
%% A internal "hooks" functions used for copying and execute code.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_at_begin_document:n #1
  {
    \hook_gput_code:nnn {begindocument} {enumext} { #1 }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_after_env:nn, \@@_before_env:nn}
%    A internal \emph{\enquote{hook}} functions for execute code \mykey{mini-right}
%    and \mykey{mini-right*} keys outside the \myenv*{enumext*} and
%    \myenv*{keyans*} environments and print \mykey{check-ans} outside the
%    \myenv*{enumext} and \myenv*{enumext*} environments.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_after_env:nn #1 #2
  {
    \hook_gput_code:nnn {env/#1/after} {enumext} {#2}
  }
\cs_new_protected:Npn \@@_before_env:nn #1 #2
  {
    \hook_gput_code:nnn {env/#1/before} {enumext} {#2}
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_level:}
%    Function for check current level in \myenv*{enumext}.
% \iffalse
%% Function to check current level.
% \fi
%    \begin{macrocode}
\cs_new:Nn \@@_level:
  {
    \int_to_roman:n { \l_@@_level_int }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_if_is_int:nT, \@@_if_is_int:nF, \@@_if_is_int:nTF}
%    A conditional function to know if the variable we are passing is
%    an integer used by \mykey{start} and \mykey{widest} keys.
%    This function is taken directly from the answer given by Henri Menke
%    in \href{https://tex.stackexchange.com/a/427559}{How to test if an expl3 function argument is an integer expression?}.
% \iffalse
%% Function to check integer variables used by |start| and |widest| keys.
% \fi
%    \begin{macrocode}
\prg_new_protected_conditional:Npnn \@@_if_is_int:n #1 { T, F, TF }
  {
    \regex_match:nnTF { ^[\+\-]?[\d]+$ } {#1} % $
      { \prg_return_true: }
      { \prg_return_false: }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_regex_counter_style:}
%    The internal function \cs{@@_regex_counter_style:} replace the ‘|*|’
%    with the actual counter of the running level and is used by
%    the \mykey{ref} key.
%    It loops through the defined counter styles in \cs{c_@@_counter_style_tl}
%    and replace ‘|*|’ by real command, for example, looking for \ilabel{arabic*}
%    and replacing that by \ics{arabic}\mymarg{counter} defined
%    on the current level.
% \iffalse
%% Regex for replace '*' for |ref| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_regex_counter_style:
  {
    \tl_map_inline:Nn \c_@@_counter_style_tl
      {
        \regex_replace_once:nnN { \c{##1}\* }
          { \c{##1}\cB{\u{l_@@_ref_the_count_tl}\cE} } \l_@@_ref_key_arg_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_show_length:nnn}
%    Internal function used by \mykey{show-length} key to show
%    \emph{\enquote{all lengths}} calculated and use in
%    \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and
%    \myenv*{keyans*} environments.
% \iffalse
%% Function to show list lengths used by |show-length| key.
% \fi
%    \begin{macrocode}
\cs_new:Npn \@@_show_length:nnn #1 #2 #3
  {
    * ~ #2
    \prg_replicate:nn { 14 - \str_count:n {#2} } { ~ }
      = ~ \use:c { #1_use:c } { l_@@_#2_#3_#1 } \\
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_unskip_unkern:}
%   The function \cs{@@_unskip_unkern:} will remove the last \mymeta{skip}
%   or \mymeta{kern} at execution time using the values ​​\mydim{11} and
%   \mydim{12} of |\lastnodetype| to apply |\unskip| or |\unkern| according
%   to the case.
% \iffalse
%% Remove last skip or kern.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_unskip_unkern:
  {
    \int_case:nnT { \lastnodetype }
      {
        { 11 }{ \unskip }
        { 12 }{ \unkern }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Utilities for environments and levels}\label{fun:utilities}
%
% \begin{macro}{\@@_is_not_nested:, \@@_is_on_first_level:}
%   The function \cs{@@_is_not_nested:} set the variables \cs{g_@@_standar_bool}
%   and \cs{g_@@_starred_bool} to \emph{\enquote{true}} only if the
%   environments \myenv*{enumext} and \myenv*{enumext*} are NOT nested
%   in each other and save the environment name in \cs{l_@@_envir_name_tl}.
% \iffalse
%% Function to check/set current environment for |enumext| and |enumext*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_is_not_nested:
  {
    \str_case:en { \@currenvir }
      {
        {enumext}
          {
            \tl_set:Nn \l_@@_envir_name_tl { enumext }
            \bool_lazy_and:nnT
              { \bool_not_p:n { \g_@@_standar_bool } }
              { \int_compare_p:nNn { \l_@@_level_h_int } = { 0 } }
              {
                \bool_gset_true:N \g_@@_standar_bool
              }
          }
        {enumext*}
          {
            \tl_set:Nn \l_@@_envir_name_tl { enumext* }
            \bool_lazy_and:nnT
              { \bool_not_p:n { \g_@@_starred_bool } }
              { \int_compare_p:nNn { \l_@@_level_int } = { 0 } }
              {
                \bool_gset_true:N \g_@@_starred_bool
              }
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_is_on_first_level:} will set the variables
%   \cs{l_@@_standar_first_bool} (\S\ref{key:save-ans}),
%   \cs{l_@@_starred_first_bool} (\S\ref{key:save-ans}) and
%   \cs{l_@@_anskey_env_bool} (\S\ref{env:anskey}) to \emph{\enquote{true}}
%   only if the environment is not nested and we are in the \emph{\enquote{first level}}
%   of it . We will also save the \emph{start line number} of each environment
%   in the variable \cs{g_@@_start_line_tl} and the \emph{name} of each
%   environment in the variable \cs{g_@@_envir_name_tl} to use in messages
%   related to the \mykey{check-ans} key and |.log| file.
% \iffalse
%% Function to check/set first level vars for |enumext| and |enumext*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_is_on_first_level:
  {
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \g_@@_standar_bool }
        { \int_compare_p:nNn { \l_@@_level_int } = { 1 } }
        { \int_compare_p:nNn { \l_@@_level_h_int } = { 0 } }
      }
      {
        \bool_set_true:N \l_@@_standar_first_bool
        \bool_set_true:N \l_@@_anskey_env_bool
        \tl_gset:Nn \g_@@_envir_name_tl { enumext }
        \tl_gset:Ne \g_@@_start_line_tl
          {
            on ~ line ~ \exp_not:V \inputlineno
          }
      }
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \g_@@_starred_bool }
        { \int_compare_p:nNn { \l_@@_level_h_int } = { 1 } }
        { \int_compare_p:nNn { \l_@@_level_int } = { 0 } }
      }
      {
        \bool_set_true:N \l_@@_starred_first_bool
        \bool_set_true:N \l_@@_anskey_env_bool
        \tl_gset:Nn \g_@@_envir_name_tl { enumext* }
        \tl_gset:Ne \g_@@_start_line_tl
          {
            on ~ line ~ \exp_not:V \inputlineno
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_name_and_start:}
%   The function \cs{@@_keyans_name_and_start:} will save the start line
%   number and name of the environments \myenv*{keyans}, \myenv*{keyans*} and
%   \myenv*{keyanspic} in the variables \cs{l_@@_check_start_line_env_tl}
%   and \cs{l_@@_envir_name_tl} to use in the \cs{@@_check_starred_cmd:n} function.
% \iffalse
%% Function to save the current name and start line for |keyans|, |keyans*| and |keyanspic|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_name_and_start:
  {
    \str_case:en { \@currenvir }
      {
        {keyans}
          {
            \tl_set:Nn \l_@@_envir_name_tl { keyans }
            \tl_set:Ne \l_@@_check_start_line_env_tl
              {
                in ~ 'keyans' ~ start ~ on ~ line ~ \exp_not:V \inputlineno
              }
          }
        {keyans*}
          {
            \tl_set:Nn \l_@@_envir_name_tl { keyans* }
            \tl_set:Ne \l_@@_check_start_line_env_tl
              {
                in ~ 'keyans*' ~ start ~ on ~ line ~ \exp_not:V \inputlineno
              }
          }
        {keyanspic}
          {
            \tl_set:Nn \l_@@_envir_name_tl { keyanspic }
            \tl_set:Ne \l_@@_check_start_line_env_tl
              {
                in ~ 'keyanspic' ~ start ~ on ~ line ~ \exp_not:V \inputlineno
              }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Utilities for log and terminal}
%
% \begin{macro}{\@@_reset_global_vars:, \@@_reset_global_int:,
%               \@@_reset_global_bool:, \@@_reset_global_tl:,}
%   The function \cs{@@_reset_global_vars:} will be passed to the function
%   \cs{@@_execute_after_env:} and will return the global variables to
%   their default values after being used.
% \iffalse
%% Reset all global vars after use in hook function.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_reset_global_vars:
  {
    \@@_reset_global_int:
    \@@_reset_global_bool:
    \@@_reset_global_tl:
  }
\cs_new_protected:Nn \@@_reset_global_int:
  {
    \int_gzero:N \g_@@_item_number_int
    \int_gzero:N \g_@@_item_anskey_int
    \int_gzero:N \g_@@_item_answer_diff_int
  }
\cs_new_protected:Nn \@@_reset_global_bool:
  {
    \bool_gset_false:N \g_@@_check_ans_key_bool
    \bool_gset_false:N \g_@@_standar_bool
    \bool_gset_false:N \g_@@_starred_bool
  }
\cs_new_protected:Nn \@@_reset_global_tl:
  {
    \tl_gclear:N \g_@@_store_name_tl
    \tl_gclear:N \g_@@_start_line_tl
    \tl_gclear:N \g_@@_envir_name_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_log_global_vars:, \@@_log_answer_vars:}
%   The function \cs{@@_log_global_vars:} will be passed to the function
%   \cs{@@_execute_after_env:} and write to the |.log| file the number of
%   elements saved in the \emph{prop list} and \emph{sequence} created by the
%   \mykey{save-ans} key along with the value of the integer variable
%   created for the \mykey{resume} key.
% \iffalse
%% Write all global vars after use in hook function.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_log_global_vars:
  {
    \msg_log:nneeee { enumext } { prop-seq-int-hook }
      { \g_@@_store_name_tl }
      { \prop_count:c { g_@@_ \g_@@_store_name_tl _prop } }
      { \seq_count:c { g_@@_ \g_@@_store_name_tl _seq } }
      { \int_use:c { g_@@_resume_ \g_@@_store_name_tl _int } }
  }
%    \end{macrocode}
%   The function \cs{@@_log_answer_vars:} will be passed to the function
%   \cs{@@_execute_after_env:} and write to the |.log| file the number
%   of items and answers along with the difference between them.
% \iffalse
%% Write all global vars for check-answer after use in hook function.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_log_answer_vars:
  {
    \msg_log:nneee { enumext } { item-answer-hook }
      { \int_use:N \g_@@_item_number_int }
      { \int_use:N \g_@@_item_anskey_int }
      { \int_eval:n { \g_@@_item_number_int - \g_@@_item_anskey_int} }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Copying \env{list} and \env{minipage} environments}
%
% The \myenv{list} environment provided by \hologo{LaTeX} has the
% following plain form:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=none]
\list`\mymarg{arg one}\mymarg{arg two}`
  \item`\myoarg{opt}`
\endlist
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% And \myenv{minipage} environment provided by \hologo{LaTeX} has the
% following (simplified) plain form:
%
% \iffalse
%<*example>
% \fi
\begin{examplecode}[frame=none]
\minipage`\myoarg{pos}\myoarg{height}\myoarg{inner-pos}\mymarg{width}`
  `\mymeta{internal implement}`
\endminipage
\end{examplecode}
% \iffalse
%</example>
% \fi
%
% As a precaution we copy them using \cs{@@_at_begin_document:n} in
% case any package redefines the \myenv{list} environment or a related
% command.
%
% \smallskip
%
% \begin{important}
%  For compatibility with \emph{tagged} \texttt{PDF} we should use
%  |\NewCommandCopy| and not |\cs_new_eq:NN| for |\item|. When
%  \emph{tagged} \texttt{PDF} is active |\item| is redefined using
%  \mypkg{ltcmd} (see \mypkg{latex-lab-block}\cite{latexlab}).
% \end{important}
%
% \smallskip
%
% \begin{macro}{\@@_start_list:nn, \@@_stop_list:, \@@_item_std:w,
%              \@@_minipage:w, \@@_endminipage:,}
%   The functions \cs{@@_start_list:nn} and \cs{@@_stop_list:} correspond
%   to copies of |\list| and |\endlist| from plain definition of \myenv{list}
%   environment, the function \cs{@@_item_std:w} is a copy of the |\item| command.
% \iffalse
%% Copy |list| environment and |\item| command.
% \fi
%    \begin{macrocode}
\@@_at_begin_document:n
  {
    \cs_new_eq:NN   \@@_start_list:nn \list
    \cs_new_eq:NN   \@@_stop_list: \endlist
    \NewCommandCopy \@@_item_std:w \item
  }
%    \end{macrocode}
%   The functions \cs{@@_minipage:w} and \cs{@@_endminipage:} correspond
%   to copies of |\minipage| and |\endminipage| from plain definition of
%   \myenv{minipage} environment.
% \iffalse
%% Copy |minipage| environment.
% \fi
%    \begin{macrocode}
\@@_at_begin_document:n
  {
    \cs_new_eq:NN \@@_minipage:w \minipage
    \cs_new_eq:NN \@@_endminipage: \endminipage
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Compatibility with hyperref and footnotehyper}\label{pkg:hyperref}
%
% \begin{macro}{\@@_after_hyperref:, \@@_hypertarget:nn, \@@_phantomsection:}
%    First we define the necessary rules using \emph{\enquote{hooks}} to
%    determine if the \mypkg{hyperref} package is loaded.
% \iffalse
%% Detection off |hyperref| package with |hyperfootnotes=true|.
% \fi
%    \begin{macrocode}
\hook_gput_code:nnn { begindocument } { enumext } { \@@_after_hyperref: }
\hook_gset_rule:nnnn { begindocument } { enumext } { after } { hyperref }
%    \end{macrocode}
%   The function \cs{@@_after_hyperref:} sets the state of the boolean
%   variable \cs{l_@@_hyperref_bool} to \enquote{true} if the package is
%   loaded. At this point we will use the public macro |\IfHyperBoolean|
%   to determine if the |hyperfootnotes=true| key is present, if so, we
%   set the state of the boolean variable \cs{@@_footnotes_key_bool} to
%   \enquote{true}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_after_hyperref:
  {
    \IfPackageLoadedTF { hyperref }
      {
        \msg_info:nnn { enumext } { package-load } { hyperref }
        \bool_set_true:N \l_@@_hyperref_bool
        \IfHyperBoolean{hyperfootnotes}
          {
            \bool_set_true:N \l_@@_footnotes_key_bool
          }
          {  }
      }
      {  }
%    \end{macrocode}
%   If the state of the variable \cs{l_@@_footnotes_key_bool} is true we
%   will check if the package \mypkg{footnotehyper} is loaded, in case it
%   is not present, we will set the value of \cs{l_@@_footnotes_key_bool}
%   to false and we will redefine |\footnote|.
% \iffalse
%% Detection off |footnotehyper| package.
% \fi
%    \begin{macrocode}
   \bool_if:NT \l_@@_footnotes_key_bool
     {
       \IfPackageLoadedTF { footnotehyper }
         {
           \msg_info:nnn { enumext } { package-load } { footnotehyper }
         }
         {
           \bool_set_false:N \l_@@_footnotes_key_bool
         }
     }
%    \end{macrocode}
%   The functions \cs{@@_hypertarget:nn} and \cs{@@_phantomsection:}
%   correspond to the internal copies of \ics{hypertarget} and
%   \ics{phantomsection}. If the boolean variable \cs{l_@@_hyperref_bool}
%   is false the functions \cs{@@_hypertarget:nn} and \cs{@@_phantomsection:}
%   will be disabled.
%    \begin{macrocode}
    \bool_if:NTF \l_@@_hyperref_bool
      {
        \cs_new_eq:NN \@@_hypertarget:nn \hypertarget
        \cs_new_eq:NN \@@_phantomsection: \phantomsection
      }
      {
        \cs_new_eq:NN \@@_hypertarget:nn \use_none:nn
        \cs_new_eq:NN \@@_phantomsection: \prg_do_nothing:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_newlabel:nn,}\label{fun:newlabel}
%   The function \cs{@@_newlabel:nn} write the information to the |.aux|
%   file when using the \mykey{save-ref} key. The arguments taken by the
%   function are:
%
% \begin{arguments}
%    \item \cs{l_@@_newlabel_arg_one_tl}
%    \item \cs{l_@@_newlabel_arg_two_tl}
% \end{arguments}
%
% \smallskip
%
% \begin{important}*
%   The trick here is to manage the number of arguments passed to
%   \ics{newlabel}|{#1}{#2}| according to the presence of the \mypkg{hyperref}
%   package.
% \end{important}
%
% \smallskip
%
% \iffalse
%% Write internal |label| in |.aux| file for |save-ref| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_newlabel:nn #1 #2
  {
    \protected@write \@auxout { }
      {
        \token_to_str:N \newlabel {#1}
          {
            {#2}
            \bool_if:NT \l_@@_hyperref_bool
              { { \thepage } {#2} {#1} }
            { }
          }
      }
    \@@_hypertarget:nn {#1} { }
    \@@_phantomsection:
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Internal redefining \cs{footnote} command}\label{ltx:footnote}
%
% To keep the correct numbering of \ics{footnote} and to make it work
% correctly in the \myenv*{enumext*} and \myenv*{keyans*} environments
% and \mykey{mini-env} key it is necessary to redefine the |\footnote| command.
% This implementation is adapted from the answer given by Clea F. Rees (\texttt{@cfr})
% in \href{https://tex.stackexchange.com/a/700092}{footnotes in boxes compatible with hyperref}.
%
% \begin{macro}[int]{\@@_footnotetext:nn, \@@_renew_footnote:,
%                    \@@_print_footnote:, \@@_renew_footnote_mini:,
%                    \@@_print_footnote_mini:,}
%   Redefinition of the |\footnote| command using |\footnotetext| and
%   |\footnotemark| for the \mykey{mini-env} key in the \myenv*{enumext} and
%   \myenv*{keyans} environments.
% \iffalse
%% Redefining |\footnote| for key |mini-env| in |enumext| and |keyans| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_footnotetext:nn
  {
    \footnotetext[#1]{#2}
  }
\cs_new_protected:Nn \@@_renew_footnote:
  {
    \RenewDocumentCommand \footnote { o +m }
      {
        \tl_if_novalue:nTF {##1}
          {
            \stepcounter{footnote}
            \int_gset_eq:Nc \g_@@_footnote_standar_int { c@footnote }
          }
          {
            \int_gset:Nn \g_@@_footnote_standar_int { ##1 }
          }
        \footnotemark [ \g_@@_footnote_standar_int ]
        \seq_gput_right:Nn \g_@@_footnote_standar_arg_seq { ##2 }
        \seq_gput_right:NV
          \g_@@_footnote_standar_int_seq \g_@@_footnote_standar_int
      }
  }
\cs_new_protected:Nn \@@_print_footnote:
  {
    \seq_if_empty:NF \g_@@_footnote_standar_int_seq
      {
        \seq_map_pairwise_function:NNN
          \g_@@_footnote_standar_int_seq
          \g_@@_footnote_standar_arg_seq
          \@@_footnotetext:nn
      }
    \seq_gclear:N \g_@@_footnote_standar_arg_seq
    \seq_gclear:N \g_@@_footnote_standar_int_seq
  }
%    \end{macrocode}
%   The \myenv*{enumext*} and \myenv*{keyans*} environments are implemented
%   using \myenv{minipage} so we must also redefine |\footnote| to keep
%   these numbering as if it were part of the document.
% \iffalse
%% Redefining |\footnote| for |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_renew_footnote_mini:
  {
    \RenewDocumentCommand \footnote { o +m }
      {
        \tl_if_novalue:nTF {##1}
          {
            \stepcounter{footnote}
            \int_gset_eq:Nc \g_@@_footnote_starred_int { c@footnote }
          }
          {
            \int_gset:Nn \g_@@_footnote_starred_int { ##1 }
          }
        \footnotemark [ \g_@@_footnote_starred_int ]
        \seq_gput_right:Nn \g_@@_footnote_starred_arg_seq { ##2 }
        \seq_gput_right:NV
          \g_@@_footnote_starred_int_seq \g_@@_footnote_starred_int
      }
  }
\cs_new_protected:Nn \@@_print_footnote_mini:
  {
    \seq_if_empty:NF \g_@@_footnote_starred_int_seq
      {
        \seq_map_pairwise_function:NNN
          \g_@@_footnote_starred_int_seq
          \g_@@_footnote_starred_arg_seq
          \@@_footnotetext:nn
      }
    \seq_gclear:N \g_@@_footnote_starred_arg_seq
    \seq_gclear:N \g_@@_footnote_starred_int_seq
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_renew_footnote_standar:,\@@_print_footnote_standar:,
%                    \@@_renew_footnote_starred:,\@@_print_footnote_starred:,}
%   We encapsulate the redefinition of |\footnote| to pass it to internal
%   \myvarenv*{__@@_mini_page} environment used by the \mykey{mini-env}
%   key in the \myenv*{enumext} and \myenv*{keyans} environments. We will
%   run the redefinition when \emph{tagged} \texttt{PDF} is active or when
%   the \mypkg{footnotehyper} package is not loaded.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_renew_footnote_standar:
  {
    \bool_if:NT \g_@@_standar_bool
      {
        \IfDocumentMetadataTF
          {
            \@@_renew_footnote:
          }
          {
            \bool_if:NF \l_@@_footnotes_key_bool
              {
                \@@_renew_footnote:
              }
          }
      }
  }
\cs_new_protected:Nn \@@_print_footnote_standar:
  {
    \bool_if:NT \g_@@_standar_bool
      {
        \IfDocumentMetadataTF
          {
            \@@_print_footnote:
          }
          {
            \bool_if:NF \l_@@_footnotes_key_bool
              {
                \@@_print_footnote:
              }
          }
      }
  }
%    \end{macrocode}
%   We encapsulate the redefinition of |\footnote| to pass it to the
%   \myenv*{enumext*} and \myenv*{keyans*} environments. We will run the
%   redefinition when \emph{tagged} \texttt{PDF} is active or when the
%   \mypkg{footnotehyper} package is not loaded.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_renew_footnote_starred:
  {
    \IfDocumentMetadataTF
      {
        \@@_renew_footnote_mini:
      }
      {
        \bool_if:NF \l_@@_footnotes_key_bool
          {
            \@@_renew_footnote_mini:
          }
      }
  }
\cs_new_protected:Nn \@@_print_footnote_starred:
  {
    \IfDocumentMetadataTF
      {
        \@@_print_footnote_mini:
      }
      {
        \bool_if:NF \l_@@_footnotes_key_bool
          {
            \@@_print_footnote_mini:
          }
      }
  }
%    \end{macrocode}
%   In \myenv*{enumext*} and \myenv*{keyans*} environments we need to use
%   \emph{\enquote{hooks}} to print |\footnote| with support for
%   \emph{tagged} \texttt{PDF}.
%    \begin{macrocode}
\@@_after_env:nn { enumext* }
  {
    \@@_print_footnote_starred:
  }
\@@_after_env:nn { keyans* }
  {
    \@@_print_footnote_starred:
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The internal \env{minipage} environment}
%
% \begin{macro}[int]{\@@_internal_mini_page:, @@_mini_env*}
%   The function \cs{@@_internal_mini_page:} creates a internal
%   \myvarenv*{__@@_mini_page} environment (\emph{custom version} of
%   \myenv{minipage}) setting the |\if@minipage| switch to \emph{\enquote{false}}
%   to allow spaces at the \emph{\enquote{above}} of the environment,
%   plus we will add |\skip_vertical:N \c_zero_skip| to maintain alignment
%   on \emph{\enquote{top}} in the first part and  |\skip_vertical:N \c_zero_skip|
%   in the second part to allow spaces \emph{\enquote{below}}. This environment
%   will be used internally by the \mykey{mini-env} key, it is NOT documented
%   in the user interface and is for internal use only. Within this environment
%   we redefine |\footnote| to make them look the same as if they were
%   elsewhere in the document. This function is passed to the function
%   \cs{@@_safe_exec:} in the \myenv*{enumext} environment definition (\S\ref{env:enumext})
%   and \cs{@@_safe_exec_vii:} in the \myenv*{enumext*} environment
%   definition (\S\ref{env:starred})
% \iffalse
%% Function for define a internal |minipage| environment with |\footnote| support.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_internal_mini_page:
  {
    \int_compare:nNnT { \l_@@_level_int } = { 0 }
      {
        \DeclareDocumentEnvironment{@@_mini_page}{ m }
          {
            \@@_renew_footnote_standar:
            \@@_minipage:w [ t ] { ##1 }
              \legacy_if_gset_false:n { @minipage }
              \skip_vertical:N \c_zero_skip
          }
          {
              \skip_vertical:N \c_zero_skip
            \@@_endminipage:
            \@@_print_footnote_standar:
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Definition of public dimension}\label{dim:public}
%
% The package \mypkg*{enumext} only provides a single public dimension
% |\itemwidth| and is intended for user convenience only and is not
% for internal use as such. This dimension is set in all environments
% and is only used by the \mykey{wrap-ans} key at its default value.
% \iffalse
%% Public dimension |\itemwidth|
% \fi
%    \begin{macrocode}
\dim_zero_new:N \itemwidth
%    \end{macrocode}
%
% \subsection{Definition of counters}\label{int:counters}
%
% \begin{macro}[int]{\@@_define_counters:Nn,enumXi, enumXii, enumXiii,
%                    enumXiv, enumXv, enumXvi, enumXvii, enumXviii}
%   To create the necessary \emph{\enquote{counters}} we must first
%   make sure that they are not already defined by the user or a
%   package such as \mypkg{enumitem}, otherwise a error will be
%   returned and the package loading will be aborted. The arguments
%   taken by the function are:
%
% \begin{arguments}
%    \item A token list \myvarenv{l__@@_counter_X_tl} for \emph{\enquote{store}} the counter's name.
%    \item The counter's name.
% \end{arguments}
%
% \iffalse
%% Definition of counters.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_define_counters:Nn #1 #2
  {
    \cs_if_exist:cTF { c@ #2 }
      { \msg_fatal:nnn { enumext } { counters }{ #2 } }
      {
        \tl_set:Nn #1 { #2 }
        \newcounter { #2 }
      }
  }
%    \end{macrocode}
%   The counters created here are \icounter{enumXi}, \icounter{enumXii},
%   \icounter{enumXiii} and \icounter{enumXiv} for \myenv*{enumext}
%   environment, \icounter{enumXv} for \myenv*{keyans} environment,
%   \icounter{enumXvi} for \myenv*{keyanspic} environment, \icounter{enumXvii} for
%   \myenv*{enumext*} and \icounter{enumXviii} for the \myenv*{keyans*}
%   environments.
%    \begin{macrocode}
\@@_define_counters:Nn \l_@@_counter_i_tl    { enumXi    }
\@@_define_counters:Nn \l_@@_counter_ii_tl   { enumXii   }
\@@_define_counters:Nn \l_@@_counter_iii_tl  { enumXiii  }
\@@_define_counters:Nn \l_@@_counter_iv_tl   { enumXiv   }
\@@_define_counters:Nn \l_@@_counter_v_tl    { enumXv    }
\@@_define_counters:Nn \l_@@_counter_vi_tl   { enumXvi   }
\@@_define_counters:Nn \l_@@_counter_vii_tl  { enumXvii  }
\@@_define_counters:Nn \l_@@_counter_viii_tl { enumXviii }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Definition of labels}
%
% This part of the code is inspired by the \mypkg{enumitem} package. The
% idea is to be able to access the counters using \ilabel{arabic*},
% \ilabel{Alph*}, \ilabel{alph*}, \ilabel{Roman*} and \ilabel{roman*}
% to use them in the \mykey{label} key.
%
% \begin{macro}{\@@_register_counter_style:Nn}
%   These \mymeta{counters} will be used as default \mymeta{labels} if
%   the \mykey{label} key is not used for the different levels of the
%   \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and \myenv*{keyans*}
%   environments, so it is necessary to get a default value for \mykey{labelwidth}
%   from these \mymeta{labels} at the same time.
% \iffalse
%% Register of counters style.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_register_counter_style:Nn #1 #2
  {
    \tl_const:cn { c_@@_widest_ \cs_to_str:N #1 _tl } {#2}
    \tl_gput_right:Nn \g_@@_counter_styles_tl {#1}
  }
\@@_register_counter_style:Nn \arabic { 0 }
\@@_register_counter_style:Nn \Alph   { M }
\@@_register_counter_style:Nn \alph   { m }
\@@_register_counter_style:Nn \Roman  { VIII }
\@@_register_counter_style:Nn \roman  { viii }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_label_width_by_box:Nn, \@@_label_width_by_box:cv}
%    The function \cs{@@_label_width_by_box:Nn} set the default \ics{labelwidth}
%    using a box width if no \mykey{labelwidth} key is passed.
% \iffalse
%% Set default label width using a box width.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_label_width_by_box:Nn #1 #2
  {
    \hbox_set:Nn \l_@@_label_width_by_box {#2}
    \dim_set:Nn #1 { \box_wd:N \l_@@_label_width_by_box }
  }
\cs_generate_variant:Nn \@@_label_width_by_box:Nn { cv }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_label_style:Nnn, \@@_label_style:cvn}
%   The function \cs{@@_label_style:Nnn} is used by the \mykey{label}
%   key to creates the variables containing the \mymeta{label style}
%   and will allow to use \ilabel{arabic*}, \ilabel{Alph*}, \ilabel{alph*},
%   \ilabel{Roman*} and \ilabel{roman*} as arguments.
%
%   It loops through the defined counter styles in \cs{g_@@_counter_styles_tl}
%   (\ics{arabic}, \ics{alph}, \ics{Alph}, \ics{roman}, and \ics{Roman}) for example,
%   looking for \ilabel{roman*} and replacing that by \ics{roman}\mymarg{counter},
%   and doing the same for the \cs{g_@@_widest_label_tl} to keep both in sync.
% \iffalse
%% Function to support |*| in |label| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_label_style:Nnn #1 #2 #3
  {
    \tl_clear_new:N #1
    \tl_put_right:Ne #1 { \tl_trim_spaces:n {#3} }
    \tl_gset_eq:NN \g_@@_widest_label_tl #1
    \tl_map_inline:Nn \g_@@_counter_styles_tl
      {
        \tl_replace_all:Nne #1 { ##1* } { \exp_not:N ##1 {#2} }
        \tl_greplace_all:Nne \g_@@_widest_label_tl { ##1* }
          { \tl_use:c { c_@@_widest_ \cs_to_str:N ##1 _tl } }
      }
    \@@_label_width_by_box:Nn \l_@@_current_widest_dim
      { \tl_use:N \g_@@_widest_label_tl }
    \tl_set_eq:cN { the #2 } #1
  }
\cs_generate_variant:Nn \@@_label_style:Nnn { cvn }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting keys associated with label}\label{key:label}
%
% When \emph{tagged} \texttt{PDF} is active |\makelabel| is redefined using
% |\makebox| to work correctly (\S\ref{env:item-starred-enumext}). From
% the user side it is convenient to have a key that allows using this
% redefinition with |\makebox| without having |\IfDocumentMetadataTF| active.
%
% \begin{macro}[int]{mode-box}
%   We define the key \mykey{mode-box} only for the \emph{\enquote{first level}}
%   of \myenv*{enumext} and \myenv*{enumext*} environments.
% \iffalse
%% Add |mode-box| key only on first level off |enumext| and |enumext*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext /  #1 }
      {
        mode-box .bool_set:N = \l_@@_mode_box_bool,
        mode-box .initial:n  = false,
        mode-box .value_forbidden:n = true,
      }
  }
\clist_map_inline:nn { level-1, enumext* } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{font, labelsep, labelwidth, wrap-label,wrap-label*}
%   Definition of keys \mykey{font}, \mykey{labelsep}, \mykey{labelwidth},
%   \mykey{wrap-label} and \mykey{wrap-label*} keys for \myenv*{enumext}
%   and \myenv*{keyans} environments.
% \iffalse
%% Add |font|, |labelsep|, |labelwidth|, |wrap-label| and |wrap-label*| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        font        .tl_set:c   = { l_@@_label_font_style_#2_tl },
        font        .value_required:n = true,
        labelsep    .dim_set:c  = { l_@@_labelsep_#2_dim },
        labelsep    .initial:n  = {0.3333em},
        labelsep    .value_required:n = true,
        labelwidth  .dim_set:c  = { l_@@_labelwidth_#2_dim },
        labelwidth  .value_required:n = true,
        wrap-label  .cs_set_protected:cp = { @@_wrapper_label_#2:n } ##1,
        wrap-label  .initial:n  = {##1},
        wrap-label  .value_required:n = true,
        wrap-label* .code:n = {
                                \bool_set_true:c { l_@@_wrap_label_opt_#2_bool }
                                \keys_set:nn { enumext / #1 } { wrap-label = {##1} }
                              },
        wrap-label* .value_required:n = true,
      }
  }
\clist_map_inline:Nn \c_@@_all_envs_clist { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{align}
%   The \mykey{align} key is implemented differently for \emph{\enquote{starred}}
%   and \emph{\enquote{non starred}} environments. For compatibility with
%   \emph{tagged} \texttt{PDF} we must set \myvarenv{l__@@_align_label_pos_X_str}.
% \iffalse
%% Add |align| key for |enumext| and |keyans| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        align .choice:,
        align / left    .code:n =
                          {
                            \tl_clear:c { l_@@_label_fill_left_#2_tl  }
                            \tl_set:cn  { l_@@_label_fill_right_#2_tl } { \hfill }
                            \str_set:cn { l_@@_align_label_pos_#2_str } { l }
                          },
        align / right   .code:n =
                          {
                            \tl_set:cn  { l_@@_label_fill_left_#2_tl  } { \hfill }
                            \tl_clear:c { l_@@_label_fill_right_#2_tl }
                            \str_set:cn { l_@@_align_label_pos_#2_str } { r }
                          },
        align / center  .code:n =
                          {
                            \tl_set:cn { l_@@_label_fill_left_#2_tl  } { \hfill }
                            \tl_set:cn { l_@@_label_fill_right_#2_tl } { \hfill }
                            \str_set:cn { l_@@_align_label_pos_#2_str } { c }
                          },
        align / unknown .code:n =
                          \msg_error:nneee { enumext } { unknown-choice }
                            { align } { left, ~ right, ~  center } { \exp_not:n {##1} },
        align .initial:n  = left,
        align .value_required:n  = true,
      }
  }
\clist_map_inline:nn
  {
    {level-1}{i}, {level-2}{ii}, {level-3}{iii}, {level-4}{iv}, {keyans}{v}
  }
  { \@@_tmp:nn #1 }
%    \end{macrocode}
% \iffalse
%% Add |align| key for |enummext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        align .choice:,
        align / left    .code:n = \str_set:cn { l_@@_align_label_#2_str } { l },
        align / right   .code:n = \str_set:cn { l_@@_align_label_#2_str } { r },
        align / center  .code:n = \str_set:cn { l_@@_align_label_#2_str } { c },
        align / unknown .code:n =
                          \msg_error:nneee { enumext } { unknown-choice }
                            { align } { left, ~ right, ~  center } { \exp_not:n {##1} },
        align .initial:n = left,
        align .value_required:n = true,
      }
  }
\clist_map_inline:nn { {enumext*}{vii}, {keyans*}{viii} } { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{label} and \texttt{ref} keys}\label{key:label-ref}
%
% The implementation of the keys \mykey{label} and \mykey{ref} are part
% of the core of the package \mypkg*{enumext}, here the default values
% for \mymeta{label}, the value of the variables \myvarenv{l__@@_label_X_tl},
% the default values for |\labelwidth| and the \emph{\enquote{label and ref}} system.
%
% \subsubsection{Define and set \texttt{label} and \texttt{ref} keys for \env{enumext} environment}
%
% \begin{macro}[int]{label,ref,\l_@@_label_i_tl,\l_@@_label_ii_tl, \l_@@_label_iii_tl, \l_@@_label_iv_tl}
%   Here we set the default \mymeta{labels} of the \emph{four levels} of
%   \myenv*{enumext} environment, along with the default value for
%   \mykey{labelwidth} key and \mykey{ref} key.
% \iffalse
%% Define and set |label| and |ref| keys for |enumext|.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nnn #1 #2 #3
  {
    \keys_define:nn { enumext / #1 }
      {
        label .code:n    = {
                             \@@_label_style:cvn { l_@@_label_#2_tl }
                               { l_@@_counter_#2_tl } {##1}
                             \dim_set_eq:cN  { l_@@_labelwidth_#2_dim }
                               \l_@@_current_widest_dim
                           },
        label .initial:n = #3,
        label .value_required:n = true,
        ref   .code:n    = \@@_standar_ref:n {##1},
        ref   .value_required:n = true,
      }
  }
\@@_tmp:nnn { level-1 } {   i } { \arabic*.}
\@@_tmp:nnn { level-2 } {  ii } { (\alph*) }
\@@_tmp:nnn { level-3 } { iii } { \roman*. }
\@@_tmp:nnn { level-4 } {  iv } { \Alph*.  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_standar_ref:n, \@@_standar_ref:,}
%   The \cs{@@_standar_ref:n} first we will pass the key argument to
%   \cs{l_@@_ref_key_arg_tl} and we will analyze its state, if it is not
%   \emph{empty} we will make a copy of the current counter in \cs{l_@@_ref_the_count_tl}
%   and we will execute the function \cs{@@_regex_counter_style:} which
%   will return the modified \cs{l_@@_ref_key_arg_tl} and we make the
%   value of \cs{l_@@_ref_the_count_tl} the same as that \myvarenv{l__@@_the_counter_X_tl}
%   which contains |\theenumX| and finally we set \myvarenv{l__@@_renew_the_count_X_tl}
%   with the renewed command.
% \iffalse
%% Internal function used by |ref| key in enumext environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_standar_ref:n #1
  {
    \tl_set:Nn \l_@@_ref_key_arg_tl {#1}
    \tl_if_empty:NTF \l_@@_ref_key_arg_tl
      {
        \msg_error:nnn { enumext } { key-ref-empty } { enumext }
      }
      {
        \tl_set_eq:Nc
          \l_@@_ref_the_count_tl { l_@@_counter_ \@@_level: _tl }
        \@@_regex_counter_style:
        \tl_set_eq:Nc
          \l_@@_ref_the_count_tl { l_@@_the_counter_ \@@_level: _tl }
        \tl_put_right:ce { l_@@_renew_the_count_ \@@_level: _tl }
          {
            \exp_not:N \renewcommand { \exp_not:V \l_@@_ref_the_count_tl } { \exp_not:V \l_@@_ref_key_arg_tl }
          }
      }
  }
%    \end{macrocode}
%    Finally the function \cs{@@_standar_ref:} will execute the
%    modification for the reference system in the second argument of the
%    environment definition \myenv*{enumext}.
% \iffalse
%% Activate |ref| key in second arg of list for |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_standar_ref:
  {
    \tl_if_empty:cF { l_@@_renew_the_count_ \@@_level: _tl }
      {
        \tl_use:c { l_@@_renew_the_count_ \@@_level: _tl }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Define and set \texttt{label} and \texttt{ref} keys for \env{enumext*} and \env{keyans*} environments}
%
% \begin{macro}[int]{label,ref, \l_@@_label_vii_tl, \l_@@_label_viii_tl}
%    Here we set the default \mymeta{labels} for \myenv*{enumext*} and
%    \myenv*{keyans*} environments, along with the default value for
%    \mykey{labelwidth} key and \mykey{ref} key.
% \iffalse
%% Define and set |label| and |ref| keys for starred environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nnn #1 #2 #3
  {
    \keys_define:nn { enumext / #1 }
      {
        label .code:n    = {
                             \@@_label_style:cvn { l_@@_label_#2_tl }
                               { l_@@_counter_#2_tl } {##1}
                             \dim_set_eq:cN  { l_@@_labelwidth_#2_dim }
                                 \l_@@_current_widest_dim
                           },
        label .initial:n = #3,
        label .value_required:n = true,
        ref   .code:n    = \@@_starred_ref:n {##1},
        ref   .value_required:n = true,
      }
  }
\@@_tmp:nnn { enumext* } {  vii } { \arabic*.}
\@@_tmp:nnn { keyans*  } { viii } { \Alph*) }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_starred_ref:n, \@@_starred_ref:}
%   The implementation of \cs{@@_starred_ref:n} is the same as that
%   used for the environment \myenv*{enumext}.
% \iffalse
%% Internal function used by |ref| key in |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_ref:n #1
  {
    \tl_set:Nn \l_@@_ref_key_arg_tl {#1}
    \int_compare:nNnT { \l_@@_level_h_int } = { 1 }
      {
        \tl_if_empty:NTF \l_@@_ref_key_arg_tl
          {
            \msg_error:nnn { enumext } { key-ref-empty } { enumext* }
          }
          {
            \tl_set_eq:NN \l_@@_ref_the_count_tl \l_@@_counter_vii_tl
            \@@_regex_counter_style:
            \tl_set_eq:NN \l_@@_ref_the_count_tl \l_@@_the_counter_vii_tl
            \tl_put_right:Ne \l_@@_renew_the_count_vii_tl
              {
                \exp_not:N \renewcommand { \exp_not:V \l_@@_ref_the_count_tl } { \exp_not:V \l_@@_ref_key_arg_tl }
              }
          }
      }
    \int_compare:nNnT { \l_@@_keyans_level_h_int } = { 1 }
      {
        \tl_if_empty:NTF \l_@@_ref_key_arg_tl
          {
            \msg_error:nnn { enumext } { key-ref-empty } { keyans* }
          }
          {
            \tl_set_eq:NN \l_@@_ref_the_count_tl \l_@@_counter_viii_tl
            \@@_regex_counter_style:
            \tl_set_eq:NN \l_@@_ref_the_count_tl \l_@@_the_counter_viii_tl
            \tl_put_right:Ne \l_@@_renew_the_count_viii_tl
              {
                \exp_not:N \renewcommand  { \exp_not:V \l_@@_ref_the_count_tl } { \exp_not:V \l_@@_ref_key_arg_tl }
              }
          }
      }
  }
%    \end{macrocode}
%    Finally the function \cs{@@_starred_ref:} will execute the
%    modification for the reference system in the second argument of the
%    \myenv*{enumext*} and \myenv*{keyans*} environment definition.
% \iffalse
%% Activate |ref| key in second arg of list for |enumext*| and  |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_starred_ref:
  {
    \int_compare:nNnT { \l_@@_level_h_int } = { 1 }
      {
        \tl_if_empty:NF \l_@@_renew_the_count_vii_tl
          {
            \tl_use:N \l_@@_renew_the_count_vii_tl
          }
      }
    \int_compare:nNnT { \l_@@_keyans_level_h_int } = { 1 }
      {
        \tl_if_empty:NF \l_@@_renew_the_count_viii_tl
          {
            \tl_use:N \l_@@_renew_the_count_viii_tl
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Define and set \texttt{label} and \texttt{ref} keys for \env{keyans} and \env{keyanspic} environments}
%
% \begin{macro}[int]{label, ref}
% \begin{macro}{\l_@@_label_v_tl,\l_@@_label_vi_tl,}
%   Here we set the default \mymeta{label} for \myenv*{keyans}
%   and \myenv*{keyanspic} environment, along with the default value for
%   \mykey{labelwidth} if it has not been established and \mykey{ref} key.
%   The \myenv*{keyanspic} environment use the same \mymeta{label} as
%   the \myenv*{keyans} environment.
% \iffalse
%% Define and set |label| and |ref| keys for |keyans| and |keyanspic|.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext / keyans }
  {
    label .code:n    = {
                         \@@_label_style:cvn { l_@@_label_v_tl }
                           { l_@@_counter_v_tl } {#1}
                         \@@_label_style:cvn { l_@@_label_vi_tl }
                           { l_@@_counter_vi_tl } {#1}
                         \dim_set_eq:NN
                           \l_@@_labelwidth_v_dim \l_@@_current_widest_dim
                       },
    label .initial:n = \Alph*),
    label .value_required:n = true,
    ref   .code:n    = \@@_keyans_ref:n {#1},
    ref   .value_required:n = true,
  }
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}[int]{\@@_keyans_ref:n, \@@_keyans_ref:}
%   The implementation of \cs{@@_keyans_ref:n} is the same as that
%   used for the environment \myenv*{enumext}.
% \iffalse
%% Internal function used by |ref| key in |keyans| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_ref:n #1
  {
    \tl_set:Nn \l_@@_ref_key_arg_tl {#1}
    \tl_if_empty:NTF \l_@@_ref_key_arg_tl
      {
        \msg_error:nnn { enumext } { key-ref-empty } { keyans }
      }
      {
        \tl_set_eq:NN \l_@@_ref_the_count_tl \l_@@_counter_v_tl
        \@@_regex_counter_style:
        \tl_set_eq:NN \l_@@_ref_the_count_tl \l_@@_the_counter_v_tl
        \tl_put_right:Ne \l_@@_renew_the_count_v_tl
          {
            \exp_not:N \renewcommand { \exp_not:V \l_@@_ref_the_count_tl } { \exp_not:V \l_@@_ref_key_arg_tl }
          }
      }
  }
%    \end{macrocode}
%    Finally the function \cs{@@_keyans_ref:} will execute the
%    modification for the reference system in the second argument of the
%    \myenv*{keyans*} environment definition.
% \iffalse
%% Activate |ref| key in second arg of list for |keyans| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_ref:
  {
    \tl_if_empty:NF \l_@@_renew_the_count_v_tl
      {
        \tl_use:N \l_@@_renew_the_count_v_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{start}, \texttt{start*} and \texttt{widest} keys}\label{key:start-widest}
%
% \begin{macro}{\@@_start_from:NNn, \@@_start_from:ccn, \@@_start_from:cce,}
%    The function \cs{@@_start_from:NNn} used by \mykey{start} and \mykey{start*}
%    keys take three arguments:
%
% \begin{arguments}
%    \item \myvarenv{l__@@_label_X_tl}
%    \item \myvarenv{l__@@_start_X_int}
%    \item \meta{integer or string}
% \end{arguments}
%
%    The first argument of this function are the \emph{\enquote{counter style}} set by
%    \mykey{label} key, the second argument is returned by the function,
%    the third argument can be an \mymeta{integer} or \mymeta{string} of the
%    form \ics{Alph}, \ics{alph}, \ics{Roman} or \ics{roman}.
%    This effectively allows \mykey{start}|=A| or \mykey{start}|=1| to
%    be used.
% \iffalse
%% Internal function for |start| key.
%% #1 \l_enumext_label_X_tl
%% #2 \l_enumext_start_X_int
%% #3 integer or string
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_start_from:NNn #1 #2 #3
  {
    \@@_if_is_int:nTF { #3 }
       {
         \int_set:Nn #2 {#3}
       }
       {
         \regex_match:nVT { \c{Alph} | \c{alph} } {#1}
           { \int_set:Nn #2 { \int_from_alph:n {#3} } }
         \regex_match:nVT { \c{Roman} | \c{roman} } {#1}
           { \int_set:Nn #2  { \int_from_roman:n {#3} } }
       }
  }
\cs_generate_variant:Nn \@@_start_from:NNn { ccn, cce }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_widest_from:nNNn, \@@_widest_from:nccn}
%    The function \cs{@@_widest_from:nNNn} used by the \mykey{widest}
%    key take four arguments:
%
% \begin{arguments}
%    \item The counter associated with the environment level
%    \item \myvarenv{l__@@_label_X_tl}
%    \item \myvarenv{l__@@_labelwidth_X_dim}
%    \item \meta{integer or string}
% \end{arguments}
%
%    The second and third arguments of this function are the values set by
%    \mykey{label} and \mykey{labelwidth} keys, the four argument can
%    be an \mymeta{integer} or \mymeta{string} of the
%    form \ics{Alph}, \ics{alph}, \ics{Roman} or \ics{roman}.
%    The value of the four argument is set temporarily for the
%    identified counter in this point (level), then the value is expanded
%    into a \emph{\enquote{box}} and the \emph{\enquote{width}} of the
%    \emph{\enquote{box}} is returned.
% \iffalse
%% Internal function for |widest| key.
%% #1 The counter associated with the environment level
%% #2 \l_enumext_label_X_tl
%% #3 \l_enumext_labelwidth_X_tl
%% #4 integer or string
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_widest_from:nNNn #1 #2 #3 #4
  {
    \@@_if_is_int:nTF {#4}
      {
        \setcounter{enumX#1} { #4 }
      }
      {
        \regex_match:nVT { \c{Alph} | \c{alph} } {#2}
          { \setcounter{enumX#1} { \int_from_alph:n {#4} } }
        \regex_match:nVT { \c{Roman} | \c{roman} } {#2}
          { \setcounter{enumX#1} { \int_from_roman:n {#4} } }
      }
     \@@_label_width_by_box:cv
       { l_@@_labelwidth_#1_dim } { l_@@_label_#1_tl }
  }
\cs_generate_variant:Nn \@@_widest_from:nNNn { nccn }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{start, start*, widest,}
%    Now define and set \mykey{start*}, \mykey{start} and \mykey{widest}
%    keys for \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and
%    \myenv*{keyans*} environments.
%
% \iffalse
%% Add |start*|, |start| and |widest| key.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        start* .code:n    = {
                              \@@_start_from:ccn
                                { l_@@_label_#2_tl }
                                { l_@@_start_#2_int } {##1}
                            },
        start* .value_required:n = true,
        start  .code:n    = {
                              \@@_start_from:cce
                                { l_@@_label_#2_tl }
                                { l_@@_start_#2_int } { \int_eval:n {##1} }
                            },
        start  .initial:n = 1,
        start  .value_required:n = true,
        widest .code:n    = {
                              \@@_widest_from:nccn {#2}
                                { l_@@_label_#2_tl }
                                { l_@@_labelwidth_#2_dim } {##1}
                            },
        widest .value_required:n = true,
      }
  }
\clist_map_inline:Nn \c_@@_all_envs_clist { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting keys for vertical spaces}
%
% \begin{macro}[int]{topsep, partopsep, parsep, noitemsep, nosep}
%   Define and set \mykey{topsep}, \mykey{partopsep}, \mykey{parsep},
%   \mykey{itemsep}, \mykey{noitemsep} and \mykey{nosep} keys for
%   \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and
%   \myenv*{keyans*} environments.
%
% \iffalse
%% Add |topsep|, |partopsep|, |parsep|, |noitemsep| and |nosep| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nnnnnn #1 #2 #3 #4 #5 #6
  {
    \keys_define:nn { enumext / #1 }
      {
        topsep    .skip_set:c = { l_@@_topsep_#2_skip },
        topsep    .initial:n  = {#3},
        topsep    .value_required:n = true,
        partopsep .skip_set:c = { l_@@_partopsep_#2_skip },
        partopsep .initial:n  = {#4},
        partopsep .value_required:n = true,
        parsep    .skip_set:c = { l_@@_parsep_#2_skip },
        parsep    .initial:n  = {#5},
        parsep    .value_required:n = true,
        itemsep   .skip_set:c = { l_@@_itemsep_#2_skip },
        itemsep   .initial:n  = {#6},
        itemsep   .value_required:n = true,
        noitemsep .meta:n     = { itemsep = 0pt, parsep = 0pt },
        noitemsep .value_forbidden:n = true,
        nosep     .meta:n     = {
                                  itemsep = 0pt, parsep= 0pt,
                                  topsep = 0pt, partopsep = 0pt,
                                },
        nosep     .value_forbidden:n = true,
      }
  }
%    \end{macrocode}
%    Now we set the values based on standard \myclass{article} class in
%    \mydim{10pt}.
%    \begin{macrocode}
\@@_tmp:nnnnnn { level-1 } { i } { 8.0pt plus 2.0pt minus 4.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt } { 4.0pt plus 2.0pt minus 1.0pt }
  { 4.0pt plus 2.0pt minus 1.0pt }
\@@_tmp:nnnnnn { level-2 } { ii } { 4.0pt plus 2.0pt minus 1.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt } { 2.0pt plus 1.0pt minus 1.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt }
\@@_tmp:nnnnnn { level-3 } { iii } { 2.0pt plus 1.0pt minus 1.0pt }
  { 1.0pt minus 1.0pt }{ 0pt }{ 2.0pt plus 1.0pt minus 1.0pt }
\@@_tmp:nnnnnn { level-4 } { iv } { 2.0pt plus 1.0pt minus 1.0pt }
  { 1.0pt minus 1.0pt }{ 0pt }{ 2.0pt plus 1.0pt minus 1.0pt }
\@@_tmp:nnnnnn { keyans  } { v }{ 4.0pt plus 2.0pt minus 1.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt }{ 2.0pt plus 1.0pt minus 1.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt }
\@@_tmp:nnnnnn { enumext* } { vii } { 8.0pt plus 2.0pt minus 4.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt } { 4.0pt plus 2.0pt minus 1.0pt }
  { 4.0pt plus 2.0pt minus 1.0pt }
\@@_tmp:nnnnnn { keyans* } { viii } { 4.0pt plus 2.0pt minus 1.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt } { 2.0pt plus 1.0pt minus 1.0pt }
  { 2.0pt plus 1.0pt minus 1.0pt }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{base-fix} key}\label{key:base-fix}
%
% When nesting starting right after |\item| (without material between them) there
% is a problem with the alignment of the \emph{baseline} between the two environments.
% One way to get around this problem is to place |\mode_leave_vertical:|
% apply |\vspace{-\baselineskip}| and set |\topsep=|\mydim{0pt} for
% the \emph{\enquote{first level}} of the nested \myenv*{enumext} environment.
%
% \begin{macro}[int]{base-fix, \@@_nested_base_line_fix:}
%   We define the key \mykey{base-fix} only for the \emph{\enquote{first level}}
%   of \myenv*{enumext} environment.
% \iffalse
%% Add |base-fix| key only on first level off |enumext| environment.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext /  level-1 }
  {
    base-fix .bool_set:N = \l_@@_base_line_fix_bool,
    base-fix .initial:n  = false,
    base-fix .value_forbidden:n = true,
  }
%    \end{macrocode}
%   The function \cs{@@_nested_base_line_fix:} passed to the \cs{@@_parse_keys:n}
%   function in the definition of the \myenv*{enumext} environment (\S\ref{env:enumext})
%   will be responsible for applying the \emph{baseline correction} and
%   adjusting the \mymeta{keys} for the \myenv*{enumext} environment and
%   the |\printkeyans| with \emph{starred argument} ‘|*|’ (\S\ref{cmd:printkeyans}).
%
%   We will first implement the function code from the user side of the
%   \mykey{base-fix} key, that is, only the user knows when it is necessary
%   to apply it within the document in which case the variable
%   \cs{l_@@_print_keyans_star_bool} set by the |\printkeyans| command is
%   false and the variable \cs{l_@@_base_line_fix_bool} is true.
%
%  \smallskip
%
%   We set the values ​​of the keys \mykey{topsep}, \mykey{above}
%   and \mykey{above*} for the \emph{\enquote{first level}} of \myenv*{enumext}
%   environment equal to \mydim{0pt} and finally  set the variable \cs{l_@@_base_line_fix_bool}
%   to false.
% \iffalse
%% Internal function for |base-fix| key in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_nested_base_line_fix:
  {
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_starred_first_bool }
        { \bool_if_p:N \l_@@_base_line_fix_bool }
        { \bool_not_p:n { \l_@@_print_keyans_star_bool } }
      }
      {
        \mode_leave_vertical:
        \vspace { -\dim_eval:n { \baselineskip + \parsep } }
        \keys_set:nn { enumext / level-1 }
          {
            topsep = 0pt, above = 0pt, above* = 0pt,
          }
      }
%    \end{macrocode}
%   When we are running the |\printkeyans| command with the \emph{starred
%   argument} ‘|*|’ the variable \cs{l_@@_print_keyans_star_bool} is true
%   and we can run a simplified version of |\vspace| using |\skip_vertical:n|.
%    \begin{macrocode}
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_starred_first_bool }
      { \bool_if_p:N \l_@@_print_keyans_star_bool }
      {
        \mode_leave_vertical:
        \skip_vertical:n { -\baselineskip }
        \skip_vertical:N \c_zero_skip
        \keys_set:nn { enumext / level-1 }
          {
            topsep = 0pt, above = 0pt, above* = 0pt,
          }
      }
    \bool_set_false:N \l_@@_base_line_fix_bool
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting keys for horizontal spaces}\label{key:list-indent}
%
% \begin{macro}[int]{itemindent, rightmargin, listparindent, list-offset, list-indent}
%    Define and set \mykey{itemindent}, \mykey{rightmargin}, \mykey{listparindent}, \mykey{list-offset}
%    and \mykey{list-indent} keys for \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and
%    \myenv*{keyans*} environments.
% \iffalse
%% Add |itemindent|, |rightmargin|, |listparindent|, |list-offset| and |list-indent| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        itemindent    .dim_set:c = { l_@@_fake_item_indent_#2_dim },
        itemindent    .value_required:n = true,
        rightmargin   .dim_set:c = { l_@@_rightmargin_#2_dim },
        rightmargin   .value_required:n = true,
        listparindent .dim_set:c = { l_@@_listparindent_#2_dim },
        listparindent .value_required:n = true,
        list-offset   .dim_set:c = { l_@@_listoffset_#2_dim },
        list-offset   .value_required:n = true,
        list-indent   .code:n    =
                        \bool_set_true:c { l_@@_leftmargin_tmp_#2_bool }
                        \dim_set:cn { l_@@_leftmargin_tmp_#2_dim } {##1},
        list-indent   .value_required:n = true,
      }
  }
\clist_map_inline:nn
  {
    {level-1}{i}, {level-2}{ii}, {level-3}{iii}, {level-4}{iv}, {keyans}{v}
  }
  { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% For \myenv*{enumext*} and \myenv*{keyans*} environments the situation
% is a bit different, the \mykey{list-indent} key behaves like the \mykey{list-offset} key.
% \iffalse
%% Set |list-offset| and |list-indent| keys for |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        itemindent    .dim_set:c = { l_@@_fake_item_indent_#2_dim },
        itemindent    .value_required:n = true,
        rightmargin   .dim_set:c = { l_@@_rightmargin_#2_dim },
        rightmargin   .value_required:n = true,
        listparindent .dim_set:c = { l_@@_listparindent_#2_dim },
        listparindent .value_required:n = true,
        list-offset   .dim_set:c = { l_@@_listoffset_#2_dim },
        list-offset   .value_required:n = true,
        list-indent   .meta:n    = { list-offset = ##1 },
        list-indent   .value_required:n = true,
      }
  }
\clist_map_inline:nn
  {
    {enumext*}{vii}, {keyans*}{viii}
  }
  { \@@_tmp:nn #1 }
%    \end{macrocode}
%
% \subsubsection{Functions for setting the fake \texttt{itemindent}}\label{key:fake-indent}
%
% \begin{macro}[int]{\@@_fake_item_indent:,\@@_keyans_fake_item_indent:,
%                    \@@_fake_item_indent_vii:, \@@_fake_item_indent_viii:,}
%
%    The \mykey{itemindent} key does not set the value of |\itemindent|, it only
%    sets the value of the \emph{horizontal space} applied using |\skip_horizontal:N|. We will
%    store this value in the variable and only apply it when it is greater
%    than \mydim{0pt}. Here I will need to place
%    |\mode_leave_vertical:| and the plain \hologo{TeX} macro
%    |\ignorespaces| to avoid unwanted extra space when using the
%    \mykey{itemindent} key.
% \iffalse
%% Internal functions for |itemindent| key. |\mode_leave_vertical:| nor
% \fi
%    \begin{macrocode}
\cs_set_protected:Nn \@@_fake_item_indent:
  {
    \dim_compare:nNnT
      { \dim_use:c { l_@@_fake_item_indent_ \@@_level: _dim } }
      >
      { \c_zero_dim }
      {
        \tl_set:ce { l_@@_fake_item_indent_ \@@_level: _tl }
          {
            \exp_not:N \mode_leave_vertical:
            \exp_not:n { \skip_horizontal:n }
              { \dim_use:c { l_@@_fake_item_indent_ \@@_level: _dim } }
            \exp_not:N \ignorespaces
          }
      }
   }
\cs_set_protected:Nn \@@_keyans_fake_item_indent:
  {
    \dim_compare:nNnT
      { \l_@@_fake_item_indent_v_dim } > { \c_zero_dim }
      {
        \tl_set:Ne \l_@@_fake_item_indent_v_tl
          {
            \exp_not:N \mode_leave_vertical:
            \exp_not:N \skip_horizontal:N \l_@@_fake_item_indent_v_dim
            \exp_not:N \ignorespaces
          }
      }
   }
\cs_set_protected:Nn \@@_fake_item_indent_vii:
  {
    \dim_compare:nNnT
      { \l_@@_fake_item_indent_vii_dim } > { \c_zero_dim }
      {
        \tl_set:Ne \l_@@_fake_item_indent_vii_tl
          {
            \exp_not:N \skip_horizontal:N \l_@@_fake_item_indent_vii_dim
            \exp_not:N \ignorespaces
          }
      }
   }
\cs_set_protected:Nn \@@_fake_item_indent_viii:
  {
    \dim_compare:nNnT
      { \l_@@_fake_item_indent_viii_dim } > { \c_zero_dim }
      {
        \tl_set:Ne \l_@@_fake_item_indent_viii_tl
          {
            \exp_not:N \skip_horizontal:N \l_@@_fake_item_indent_viii_dim
            \exp_not:N \ignorespaces
          }
      }
   }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{show-length} key}
%
% \begin{macro}[int]{show-length}
%    Define and set \mykey{show-length} key for \myenv*{enumext},
%    \myenv*{enumext*}, \myenv*{keyans} and \myenv*{keyans*} environments.
%    The function sets the boolean variable \myvarenv{l__@@_show_length_X_bool}
%    used in the definition of all environments to \emph{\enquote{true}}
%    and calls the function \cs{@@_show_length:nnn} which prints all the
%    values of the \emph{\enquote{vertical}} and \emph{\enquote{horizontal}}
%    parameters calculated and used.
% \iffalse
%% Add |show-length| key for all environments..
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        show-length .bool_set:c = { l_@@_show_length_#2_bool },
        show-length .initial:n  = false,
      }
  }
\clist_map_inline:Nn \c_@@_all_envs_clist { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{before}, \texttt{after} and \texttt{first} keys}\label{key:before}
%
% \begin{macro}[int]{before, before*, after, first}
%    Define and set \mykey{before}, \mykey{before*}, \mykey{after} and \mykey{first} keys
%    for \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and  \myenv*{keyans*} environments.
% \iffalse
%% Add |before|, |before*|, |after| and |first| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        before  .tl_set:c   = { l_@@_before_no_starred_key_#2_tl },
        before  .value_required:n = true,
        before* .tl_set:c   = { l_@@_before_starred_key_#2_tl },
        before* .value_required:n = true,
        after   .tl_set:c   = { l_@@_after_stop_list_#2_tl },
        after   .value_required:n = true,
        first   .tl_set:c   = { l_@@_after_list_args_#2_tl },
        first   .value_required:n = true,
      }
  }
\clist_map_inline:Nn \c_@@_all_envs_clist { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{before}, \texttt{after} and \texttt{first} keys in \env{enumext}}
%
% \begin{macro}{\@@_before_args_exec:,\@@_before_keys_exec:,
%               \@@_after_stop_list:,\@@_after_args_exec:,}
%    The function \cs{@@_before_args_exec:} executes the \mymarg{code} set by the
%    \mykey{before*} key \emph{\enquote{before}} the \myenv*{enumext}
%    environment is started. The \mymarg{code} is executed \emph{\enquote{without}}
%    knowing any definition of the \mymarg{arg two} of the list:
%    \mymarg[cbc=pkgcolor,ac=araracolor]{code}|\list|\mymarg{arg one}\mymarg{arg two}.
% \iffalse
%% Function for |before|, |before*|, |after| and |first| keys in |enumext|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_args_exec:
  {
    \tl_use:c { l_@@_before_starred_key_ \@@_level: _tl }
  }
%    \end{macrocode}
%    The function \cs{@@_before_keys_exec:} executes the \mymarg{code} set by the
%    \mykey{before} key \emph{\enquote{before}} the \myenv*{enumext}
%    environment is started in \emph{second argument} of the list. The
%    \mymarg{code} is executed \emph{\enquote{knowing}}
%    all definition and values provides by \mymeta{keys}:
%    |\list|\mymarg{arg one}|{|\mymeta{arg two}\mymarg[cbc=pkgcolor,ac=araracolor]{code}|}|
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_keys_exec:
  {
    \tl_use:c { l_@@_before_no_starred_key_ \@@_level: _tl }
  }
%    \end{macrocode}
%    The function \cs{@@_after_stop_list:} executes the \mymarg{code} set by the
%    \mykey{after} key \emph{\enquote{after}} the \myenv*{enumext}
%    environment has finished: |\endlist|\mymarg[cbc=pkgcolor,ac=araracolor]{code}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_after_stop_list:
  {
    \tl_use:c { l_@@_after_stop_list_ \@@_level: _tl }
  }
%    \end{macrocode}
%    The function \cs{@@_after_args_exec:} executes the \mymarg{code} set by the
%    \mykey{first} key after the end of the second argument of the list
%    defining the \myenv*{enumext} environment, just before the first
%    occurrence of |\item|: |\list|\mymarg{arg one}\mymarg{arg two}\mymarg[cbc=pkgcolor,ac=araracolor]{code}|\item|.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_after_args_exec:
  {
    \tl_use:c { l_@@_after_list_args_ \@@_level: _tl }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{before}, \texttt{after} and \texttt{first} keys in \env{keyans}}
%
% \begin{macro}{\@@_before_args_exec_v:,\@@_before_keys_exec_v:,
%               \@@_after_stop_list_v:, \@@_after_args_exec_v:}
% Same implementation as the one used in the \myenv*{enumext} environment.
% \iffalse
%% Function for |before|, |before*|, |after| and |first| keys in |keyans|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_args_exec_v:
  {
    \tl_use:N \l_@@_before_starred_key_v_tl
  }
\cs_new_protected:Nn \@@_before_keys_exec_v:
  {
    \tl_use:N \l_@@_before_no_starred_key_v_tl
  }
\cs_new_protected:Nn \@@_after_stop_list_v:
  {
    \tl_use:N \l_@@_after_stop_list_v_tl
  }
\cs_new_protected:Nn \@@_after_args_exec_v:
  {
    \tl_use:N \l_@@_after_list_args_v_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{before}, \texttt{after} and \texttt{first} keys in \env{enumext*} and \env{keyans*}}
%
% \begin{macro}{\@@_before_args_exec_vii:,\@@_before_keys_exec_vii,
%               \@@_after_stop_list_vii:, \@@_after_args_exec_vii:,}
% Same implementation as the one used in the \myenv*{enumext} environment.
% \iffalse
%% Function for |before|, |before*|, |after| and |first| keys in |enumext*| and |keyans*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_args_exec_vii:
  {
    \tl_use:N \l_@@_before_starred_key_vii_tl
  }
\cs_new_protected:Nn \@@_before_args_exec_viii:
  {
    \tl_use:N \l_@@_before_starred_key_viii_tl
  }
\cs_new_protected:Nn \@@_before_keys_exec_vii:
  {
    \tl_use:N \l_@@_before_no_starred_key_vii_tl
  }
\cs_new_protected:Nn \@@_before_keys_exec_viii:
  {
    \tl_use:N \l_@@_before_no_starred_key_viii_tl
  }
\cs_new_protected:Nn \@@_after_stop_list_vii:
  {
    \tl_use:N \l_@@_after_stop_list_vii_tl
  }
\cs_new_protected:Nn \@@_after_stop_list_viii:
  {
    \tl_use:N \l_@@_after_stop_list_viii_tl
  }
\cs_new_protected:Nn \@@_after_args_exec_vii:
  {
    \tl_use:N \l_@@_after_list_args_vii_tl
  }
\cs_new_protected:Nn \@@_after_args_exec_viii:
  {
    \tl_use:N \l_@@_after_list_args_viii_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting keys for \env{multicols} and \env{minipage}}\label{key:mini-multi}
%
% \begin{macro}[int]{mini-env, mini-sep, columns-sep, columns}
%    The default value of the \mykey{columns-sep} key is handled by
%    the state of the boolean variable \myvarenv{l__@@_columns_sep_X_bool}
%    which is handled in the internal definition of the \myenv*{enumext}
%    and \myenv*{keyans} environments.
%    Define and set \mykey{mini-env}, \mykey{mini-sep}, \mykey{columns-sep}
%    and \mykey{columns} keys for \myenv*{enumext}, \myenv*{enumext*}, \myenv*{keyans} and
%    \myenv*{keyans*} environments.
% \iffalse
%% Add |mini-env|, |mini-sep|, |columns-sep| and |columns| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        mini-env    .dim_set:c  = { l_@@_minipage_right_#2_dim },
        mini-env    .value_required:n = true,
        mini-sep    .dim_set:c  = { l_@@_minipage_hsep_#2_dim },
        mini-sep    .initial:n  = 0.3333em,
        mini-sep    .value_required:n = true,
        columns-sep .dim_set:c  = { l_@@_columns_sep_#2_dim },
        columns-sep .value_required:n = true,
        columns     .int_set:c  = { l_@@_columns_#2_int },
        columns     .initial:n  = 1,
        columns     .value_required:n = true,
      }
  }
\clist_map_inline:Nn \c_@@_all_envs_clist { \@@_tmp:nn #1 }
%    \end{macrocode}
%
% For \myenv*{enumext*} and \myenv*{keyans*} environments the situation
% is a bit different, the command \ics*{miniright} is not available, so we will add
% the keys \mykey{mini-right} and \mykey{mini-right*} to implement support for
% \myenv{minipage} environment.
% \iffalse
%% Add |mini-right| and |mini-right*| keys for starred environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        mini-right  .tl_gset:c = { g_@@_miniright_code_#2_tl },
        mini-right  .value_required:n = true,
        mini-right* .code:n    = {
                                  \bool_gset_true:c { g_@@_minipage_center_#2_bool }
                                  \keys_set:nn { enumext / #1 } { mini-right = {##1} }
                                },
        mini-right* .value_required:n = true,
      }
  }
\clist_map_inline:nn { {enumext*}{vii}, {keyans*}{viii} } { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Adjustment of vertical spaces for \env{multicols}} \label{vspace:multi}
%
% When nesting a \emph{\enquote{list environment}} inside the \myenv{multicols} environment,
% the values of the \emph{\enquote{vertical spaces}} are lost, basically the
% \myenv{multicols} environment takes control over them. Graphically it can
% be seen like in the figure \ref{fig:six}.
%
% \begin{figure}[!htbp]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[color=white] (7.0,6.10) rectangle (17.5,6.50) node[pos=.5,text=black] { \textcolor{blue}{\texttt{\textbackslash{}multicolsep [±\textbackslash{}topskip]}} };% space above
%     \draw[color=white] (7.0,4.85) rectangle (17.5,5.25) node[pos=.5,text=black] { \textcolor{blue}{\texttt{\textbackslash{}multicolsep [±\textbackslash{}prevdepth?]}} };% space below
%     \draw[color=white] (2.0,6.10) rectangle (5,6.50) node[pos=.5,text=optcolor,font=\footnotesize\ttfamily] { topsep };% topsep above
%     \draw[color=white] (2.0,4.85) rectangle (5,5.25) node[pos=.5,text=optcolor,font=\footnotesize\ttfamily] { topsep };% topsep below
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[->,color=lightgray,shorten >=3pt] (4.5,6.3) -- (7.0,6.3); % glue space = topsep (above)
%     \draw[->,color=lightgray,shorten >=3pt] (4.5,5.05) -- (7.0,5.05); % glue space = topsep (above)
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (17.5,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.25) rectangle (11.5,6.10) node[pos=.5,text=black]
%        {\begin{tabular}{c}
%          \texttt{column one} \\
%          \textcolor{blue}{\emph{nested list or items}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (13.5,5.25) rectangle (17.5,6.10) node[pos=.5,text=black]
%        {\begin{tabular}{c}
%          \texttt{column two} \\
%          \textcolor{blue}{\emph{nested list or items}}
%        \end{tabular}};
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,4.5) rectangle (5.0,4.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,4.5) rectangle (7.0,4.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,4.5) rectangle (17.5,4.85);% item width
%   \end{tikzpicture}
%   \caption{Representation of the vertical space in \myenv{multicols} for a nested level.}
%   \label{fig:six}
% \end{figure}
%
% To keep the desired spaces \emph{above} and \emph{below} in the \emph{\enquote{list environment}}
% (|\topsep + [\partopsep]|) it is necessary to \emph{\enquote{adjust}} the spaces added
% by the \myenv{multicols} environment.
% The most appropriate option in this case is to use a \emph{\enquote{context sensitive}}
% vertical space with |\addvspace|.
%
% \smallskip
%
% \begin{important}*
% I should make it clear that the implementation here is a \emph{\enquote{bit
% questionable}}. At first glance doing |\multicolsep=\topsep| seemed right, but the results
% were not always as expected. An almost \emph{imperceptible} detail is that in some cases the
% |\itemsep| values of are \emph{\enquote{stretched}}, possibly due to
% the use of |\raggedcolumns| and this affects the lower space when
% closing the environment, which is \emph{\enquote{smaller}} than
% expected. My attempts to find the correct values using |\showoutput| and
% |\showboxdepth| absolutely failed.
% \end{important}
%
% \subsubsection{Adjustment of vertical spaces for \env{multicols} in \env{enumext}}
%
%
% \begin{macro}{\@@_multi_set_vskip:}
%    The function \cs{@@_multi_set_vskip:} will take care of determining the
%    \emph{\enquote{adjusted spaces}} that we will apply \emph{\enquote{above}} and
%    \emph{\enquote{below}} the \myenv{multicols} environment in
%    \myenv*{enumext}.
%
%    \smallskip
%
%    We will set the default values taking into account that \hologo{TeX} is
%    in \mymeta{horizontal mode}, then we will make the settings for the
%    \mymeta{vertical mode} in which |\partopsep| comes into play.
%
%    \smallskip
%
%    Set the values of \myvarenv{l__@@_multicols_above_X_skip} and \myvarenv{l__@@_multicols_below_X_skip}
%    equal to the value of |\topsep| in the \emph{current level}.
% \iffalse
%% Adjustment of vertical spacing for |multicols| in |enumext|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_multi_set_vskip:
  {
    \skip_set:cn { l_@@_multicols_above_ \@@_level: _skip }
      {
        \skip_use:c { l_@@_topsep_ \@@_level: _skip }
      }
    \skip_set:cn { l_@@_multicols_below_ \@@_level: _skip }
      {
        \skip_use:c { l_@@_topsep_ \@@_level: _skip }
      }
    \@@_add_pre_parsep:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_add_pre_parsep:}
%    The function \cs{@@_add_pre_parsep:} \emph{\enquote{adjusted}} the value
%    of \myvarenv{l__@@_multicols_above_X_skip} detecting the value of
%    \ics{parsep} from the previous level. This is necessary since
%    \ics{parsep} from the previous level affects the \emph{vertical spaces}.
% \iffalse
%% Detect |\parsep| from previous level and adjust |\l_@@_multicols_above_X_skip| for |multicols| in |enumext|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_add_pre_parsep:
  {
    \int_case:nn { \l_@@_level_int }
      {
        { 2 }{
               \skip_if_eq:nnF { \l_@@_parsep_i_skip } { \c_zero_skip }
                 {
                   \skip_add:Nn \l_@@_multicols_above_ii_skip
                     {
                       \l_@@_parsep_i_skip
                     }
                 }
             }
        { 3 }{
               \skip_if_eq:nnF { \l_@@_parsep_ii_skip } { \c_zero_skip }
                 {
                   \skip_add:Nn \l_@@_multicols_above_iii_skip
                     {
                       \l_@@_parsep_ii_skip
                     }
                 }
             }
        { 4 }{
               \skip_if_eq:nnF { \l_@@_parsep_iii_skip } { \c_zero_skip }
                 {
                   \skip_add:Nn \l_@@_multicols_above_iv_skip
                     {
                       \l_@@_parsep_iii_skip
                     }
                 }
             }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_multi_addvspace:}
%   The function \cs{@@_multi_addvspace:} will apply the spaces set using
%   |\addvspace| \emph{\enquote{above}} the \myenv{multicols} environment
%   in \myenv*{enumext}, taking into account whether  \hologo{TeX} is in
%   \mymeta{horizontal mode} or \mymeta{vertical mode}.
% \iffalse
%% Add vertical spacing for |multicols| in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_multi_addvspace:
  {
    \@@_multi_set_vskip:
    \mode_if_vertical:T
      {
        \skip_add:cn { l_@@_multicols_above_ \@@_level: _skip }
          {
            \skip_use:c { l_@@_partopsep_ \@@_level: _skip }
          }
        \skip_add:cn { l_@@_multicols_below_ \@@_level: _skip }
          {
            \skip_use:c { l_@@_partopsep_ \@@_level: _skip }
          }
      }
    \par\nopagebreak
    \addvspace{ \skip_use:c { l_@@_multicols_above_ \@@_level: _skip } }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Adjustment of vertical spaces for \env{multicols} in \env{keyans}}
%
% \begin{macro}{\@@_keyans_multi_set_vskip:, \@@_keyans_multi_addvspace:}
%    The function \cs{@@_keyans_multi_set_vskip:} will take care of determining the
%    \emph{\enquote{adjusted spaces}} that we will apply \emph{\enquote{above}} and
%    \emph{\enquote{below}} the \myenv{multicols} environment in
%    \myenv*{keyans}. The implementation of this function is the same
%    as the one used in \myenv*{enumext}.
% \iffalse
%% Adjustment of vertical spacing for |multicols| in |keyans| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_multi_set_vskip:
  {
    \skip_set:Nn \l_@@_multicols_above_v_skip
      {
        \l_@@_topsep_v_skip
      }
    \skip_set:Nn \l_@@_multicols_below_v_skip
      {
        \l_@@_topsep_v_skip
      }
  }
\cs_new_protected:Nn \@@_keyans_multi_addvspace:
  {
    \@@_keyans_multi_set_vskip:
    \mode_if_vertical:T
      {
        \skip_add:Nn \l_@@_multicols_above_v_skip
          {
            \skip_use:N \l_@@_partopsep_v_skip
          }
        \skip_add:Nn \l_@@_multicols_below_v_skip
          {
            \skip_use:N \l_@@_partopsep_v_skip
          }
      }
    \par\nopagebreak
    \addvspace{ \l_@@_multicols_above_v_skip }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Adjustment of vertical spaces for \env{minipage}}\label{vspace:minipage}
%
% When nesting a \emph{\enquote{list environment}} within the \myenv{minipage} environment,
% the values of the \emph{\enquote{vertical spaces}} are lost. Graphically it can
% be seen like in the figure \ref{fig:seven}.
%
% \begin{figure}[!htbp]
% \centering
% \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%  \draw[color=white] (7.0,6.10) rectangle (12.5,6.5) node[pos=.5,text=black]%
%   { \textcolor{blue}{\texttt{space above left}} };% space above left
% \draw[color=white] (13.5,6.10) rectangle (17.5,6.5) node[pos=.5,text=black]%
%   { \textcolor{blue}{\texttt{space above right}} };% space above right
% \draw[color=white] (7.0,4.85) rectangle (17.5,5.25) node[pos=.5,text=black]%
%   { \textcolor{blue}{\texttt{space below minipage's}} };% space below after second
% \draw[color=white] (2.0,6.10) rectangle (5,6.50) node[pos=.5,text=optcolor,font=\footnotesize\ttfamily] { topsep };% topsep above
% \draw[color=white] (2.0,4.85) rectangle (5,5.25) node[pos=.5,text=optcolor,font=\footnotesize\ttfamily] { topsep };% topsep below
% \draw[->,color=lightgray,shorten >=3pt] (4.5,6.3) -- (7.0,6.3); % glue space = topsep (above)
% \draw[->,color=lightgray,shorten >=3pt] (4.5,5.05) -- (7.0,5.05); % glue space = topsep (above)
% \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
% \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (17.5,6.85);% item width
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.25) rectangle (12.5,6.10) node[pos=.5,text=black]%
%   {\begin{tabular}{c}
%      \texttt{minipage left [t]} \\
%      \textcolor{blue}{\emph{nested list}}
%    \end{tabular}};
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (13.5,5.25) rectangle (17.5,6.10) node[pos=.5,text=black]%
%  {\begin{tabular}{c}
%      \texttt{minipage right [t]} \\
%      \textcolor{blue}{\emph{drawing or tabular}}
%    \end{tabular}};
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,4.5) rectangle (5.0,4.85);% labelwidth
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,4.5) rectangle (7.0,4.85);% labelsep
% \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,4.5) rectangle (17.5,4.85);% item width
% \end{tikzpicture}
% \caption{Representation of the \myenv{minipage} spacing adjustment for a nested level.}
% \label{fig:seven}
% \end{figure}
%
% Since we want to keep the \emph{\enquote{left}} and \emph{\enquote{right}}
% environments \emph{\enquote{aligned on top}}, preserving the \ics{baselineskip}
% and keep the desired \emph{\enquote{spaces}} (|\topsep + [\partopsep]|) it is necessary
% to \emph{\enquote{adjust}} the \emph{\enquote{vertical spaces}}
% for \myenv{minipage} environments.
%
% \smallskip
%
% Here there are several complications that we must circumvent, the
% \myenv{minipage} environment eliminates the \enquote{top} spaces, the \myenv{multicols}
% environment can be nested in the \myenv{minipage} environment, the \enquote{top} and
% \enquote{bottom} spaces are affected when |topsep=|\mydim{0pt} and to this is added the
% |\partopsep| parameter that comes into action according to whether \hologo{TeX}
% is in \mymeta{horizontal mode} or \mymeta{vertical mode}. Depending on these cases, small
% adjustments must be made using |\vspace| and |\addvspace| to
% obtain the \emph{\enquote{desired vertical spacing}}.
%
% \smallskip
%
% \begin{important}*
% Again I must make clear that the implementation here is a \emph{\enquote{bit
% questionable}}, but hunting the spaces (|glue|) produced by the \myenv{minipage}
% environment is quite complicated, even more if \myenv{multicols} it is nested.
% The setting of the values was more \emph{\enquote{trial and error}}
% (aprox to |\strutbox|), using the help of the \mypkg{lua-visual-debug}\cite{luavisual}
% package, again my attempts to find the correct values using |\showoutput| and
% |\showboxdepth| absolutely failed.
% \end{important}
%
% \subsubsection{Adjustment of vertical spaces for \env{minipage} in \env{enumext}}
%
% \begin{macro}{\@@_minipage_set_skip:, \@@_minipage_add_space:}
%    The function \cs{@@_minipage_set_skip:} will take care of determining the
%    \emph{\enquote{adjust}} spaces that we will apply \emph{\enquote{above}} and
%    \emph{\enquote{below}} the \myvarenv*{__@@_mini_page} environment in
%    \myenv*{enumext}.
%
%    \smallskip
%
%    First we will set the value of \cs{l_@@_minipage_right_skip} equal to
%    |\topsep|, then we will see if \hologo{TeX} is in \mymeta{vertical mode} and we
%    will add |\partopsep|, followed by that we set the value of \cs{l_@@_minipage_after_skip}.
% \iffalse
%% Adjustment of vertical spacing for |minipage| in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_minipage_set_skip:
  {
    \skip_set:Nn \l_@@_minipage_right_skip
      {
        \skip_use:c { l_@@_topsep_ \@@_level: _skip }
      }
    \mode_if_vertical:T
      {
        \skip_add:Nn \l_@@_minipage_right_skip
          {
            \skip_use:c { l_@@_partopsep_ \@@_level: _skip }
          }
      }
    \skip_set_eq:NN \l_@@_minipage_after_skip \l_@@_minipage_right_skip
%    \end{macrocode}
%   We will adjust the values ​​\cs[no-index]{l_@@_multicols_above_X_skip}
%   and \cs[no-index]{l_@@_multicols_below_X_skip} and call the function
%   \cs{@@_pre_itemsep_skip:}.
%    \begin{macrocode}
    \skip_set_eq:cN
      { l_@@_multicols_above_ \@@_level: _skip } \l_@@_minipage_right_skip
    \skip_set_eq:cN
      { l_@@_multicols_below_ \@@_level: _skip } \l_@@_minipage_right_skip
    \@@_pre_itemsep_skip:
%    \end{macrocode}
%   If the environment \myenv{multicols} is active, we set |\topskip=|\mydim{0pt}
%   and then we make |\multicolsep| have the same value as ​​\cs[no-index]{l_@@_multicols_above_X_skip}.
%    \begin{macrocode}
    \int_compare:nNnT
      { \int_use:c { l_@@_columns_ \@@_level: _int } } > { 1 }
      {
        \skip_zero:N \topskip
        \skip_set_eq:Nc \multicolsep { l_@@_multicols_above_ \@@_level: _skip }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_minipage_add_space:} will apply the spaces on the \emph{\enquote{left side}} using
%   |\addvspace| \emph{\enquote{above}} the \myvarenv*{__@@_mini_page}
%   environment, taking into account whether \hologo{TeX} is in
%   \mymeta{horizontal mode} or \mymeta{vertical mode}. Here we use the plain \hologo{TeX} macro
%   |\nointerlineskip| to prevent baseline \emph{\enquote{glue}} being
%   added between the next pair of boxes in a \emph{vertical list}. For the latter we
%   will make some adjustments since the |\partopsep| parameter comes into
%   play and this affects the \emph{vertical spacing}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_minipage_add_space:
  {
    \@@_minipage_set_skip:
    \@@_unskip_unkern:
    \mode_if_vertical:TF
      {
        \nopagebreak\nointerlineskip
      }
      {
        \par\nopagebreak\nointerlineskip
        \skip_zero:c { l_@@_partopsep_ \@@_level: _skip }
      }
    \int_compare:nNnTF
      { \int_use:c { l_@@_columns_ \@@_level: _int } } > { 1 }
      {
        \addvspace{ 0.445\box_ht:N \strutbox }
      }
      {
        \addvspace{ 0.250\box_ht:N \strutbox }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_pre_itemsep_skip:}
%   The function \cs{@@_pre_itemsep_skip:} will adjust the spaces below the
%   environment \myenv{minipage} and the environment \myenv{multicols} if
%   it is nested in it, taking into account the value of |\itemsep| from
%   the previous level.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_pre_itemsep_skip:
  {
    \int_case:nn { \l_@@_level_int }
      {
        { 2 }{
               \skip_if_eq:nnTF
                 { \l_@@_itemsep_i_skip } { \l_@@_minipage_after_skip }
                 {
                   \skip_set:Nn \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
                   \skip_set:Nn \l_@@_multicols_below_ii_skip { 0.350\box_ht:N \strutbox }
                 }
                 {
                   \dim_compare:nNnT
                     { \l_@@_itemsep_i_skip } < { \l_@@_minipage_after_skip }
                     {
                       \skip_sub:Nn
                         \l_@@_minipage_after_skip { \l_@@_itemsep_i_skip }
                       \skip_sub:Nn
                         \l_@@_multicols_below_ii_skip { \l_@@_itemsep_i_skip }
                       \skip_add:Nn
                         \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
                       \skip_add:Nn
                         \l_@@_multicols_below_ii_skip { 0.350\box_ht:N \strutbox }
                     }
                   \dim_compare:nNnT
                     { \l_@@_itemsep_i_skip } > { \l_@@_minipage_after_skip }
                     {
                       \skip_set:Nn \l_@@_minipage_temp_skip
                         {
                           \l_@@_itemsep_i_skip - \l_@@_minipage_after_skip
                         }
                       \skip_sub:Nn
                         \l_@@_minipage_after_skip { \l_@@_itemsep_i_skip }
                       \skip_sub:Nn
                         \l_@@_multicols_below_ii_skip { \l_@@_itemsep_i_skip }
                       \skip_add:Nn
                         \l_@@_minipage_after_skip
                         { 0.150\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
                       \skip_add:Nn
                         \l_@@_multicols_below_ii_skip
                         { 0.350\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
                     }
                 }
             }
        { 3 }{
               \skip_if_eq:nnTF
                 { \l_@@_itemsep_ii_skip } { \c_zero_skip }
                 {
                   \skip_set:Nn \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
                   \skip_set:Nn \l_@@_multicols_below_iii_skip { 0.350\box_ht:N \strutbox }
                 }
                 {
                   \dim_compare:nNnT
                     { \l_@@_itemsep_ii_skip } < { \l_@@_minipage_after_skip }
                     {
                       \skip_sub:Nn
                         \l_@@_minipage_after_skip { \l_@@_itemsep_ii_skip }
                       \skip_sub:Nn
                         \l_@@_multicols_below_iii_skip { \l_@@_itemsep_ii_skip }
                       \skip_add:Nn
                         \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
                       \skip_add:Nn
                         \l_@@_multicols_below_iii_skip { 0.350\box_ht:N \strutbox }
                     }
                   \dim_compare:nNnT
                     { \l_@@_itemsep_ii_skip } > { \l_@@_minipage_after_skip }
                     {
                       \skip_set:Nn \l_@@_minipage_temp_skip
                         {
                           \l_@@_itemsep_ii_skip - \l_@@_minipage_after_skip
                         }
                       \skip_sub:Nn
                         \l_@@_minipage_after_skip { \l_@@_itemsep_ii_skip }
                       \skip_sub:Nn
                         \l_@@_multicols_below_iii_skip { \l_@@_itemsep_ii_skip }
                       \skip_add:Nn
                         \l_@@_minipage_after_skip
                         { 0.150\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
                       \skip_add:Nn
                         \l_@@_multicols_below_iii_skip
                         { 0.350\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
                     }
                 }
             }
        { 4 }{
               \skip_if_eq:nnTF { \l_@@_itemsep_iii_skip } { \c_zero_skip }
                 {
                   \skip_set:Nn \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
                   \skip_set:Nn \l_@@_multicols_below_iv_skip { 0.350\box_ht:N \strutbox }
                 }
                 {
                   \dim_compare:nNnT
                     { \l_@@_itemsep_iii_skip } < { \l_@@_minipage_after_skip }
                     {
                       \skip_sub:Nn
                         \l_@@_minipage_after_skip { \l_@@_itemsep_iii_skip }
                       \skip_sub:Nn
                         \l_@@_multicols_below_iv_skip { \l_@@_itemsep_iii_skip }
                       \skip_add:Nn
                         \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
                       \skip_add:Nn
                         \l_@@_multicols_below_iv_skip { 0.350\box_ht:N \strutbox }
                     }
                   \dim_compare:nNnT
                     { \l_@@_itemsep_iii_skip } > { \l_@@_minipage_after_skip }
                     {
                       \skip_set:Nn \l_@@_minipage_temp_skip
                         {
                           \l_@@_itemsep_iii_skip - \l_@@_minipage_after_skip
                         }
                       \skip_sub:Nn
                         \l_@@_minipage_after_skip { \l_@@_itemsep_iii_skip }
                       \skip_sub:Nn
                         \l_@@_multicols_below_iv_skip { \l_@@_itemsep_iii_skip }
                       \skip_add:Nn
                         \l_@@_minipage_after_skip
                         { 0.150\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
                       \skip_add:Nn
                         \l_@@_multicols_below_iv_skip
                         { 0.350\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
                     }
                 }
             }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Adjustment of vertical spaces for \env{minipage} in \env{keyans}}
%
% \begin{macro}{\@@_keyans_minipage_set_skip:, \@@_keyans_minipage_add_space:, \@@_keyans_pre_itemsep_skip:}
%    The function \cs{@@_keyans_mini_set_vskip:} will take care of determining the
%    \enquote{adjusted} spaces that we will apply \emph{\enquote{above}} and
%    \emph{\enquote{below}} the \myvarenv*{__@@_mini_page} environment in
%    \myenv*{keyans}. The implementation of this function is the same
%    as the one used in \myenv*{enumext}.
% \iffalse
%% Adjustment of vertical spacing for |minipage| in |keyans| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_minipage_set_skip:
  {
    \skip_zero:N \l_@@_minipage_after_skip
    \skip_zero:N \l_@@_minipage_left_skip
    \skip_zero:N \l_@@_minipage_right_skip
    \skip_set:Nn \l_@@_minipage_right_skip
      {
        \l_@@_topsep_v_skip
      }
    \mode_if_vertical:T
      {
        \skip_add:Nn \l_@@_minipage_right_skip
          {
            \l_@@_partopsep_v_skip
          }
      }
    \skip_set_eq:NN \l_@@_minipage_after_skip \l_@@_minipage_right_skip
    \skip_set_eq:NN \l_@@_multicols_above_v_skip \l_@@_minipage_right_skip
    \skip_set_eq:NN \l_@@_multicols_below_v_skip \l_@@_minipage_right_skip
    \@@_keyans_pre_itemsep_skip:
    \int_compare:nNnT { \l_@@_columns_v_int } > { 1 }
      {
        \skip_zero:N \topskip
        \skip_set_eq:NN \multicolsep \l_@@_minipage_right_skip
      }
  }
\cs_new_protected:Nn \@@_keyans_minipage_add_space:
  {
    \@@_keyans_minipage_set_skip:
    \@@_unskip_unkern:
    \mode_if_vertical:TF
      {
        \nopagebreak\nointerlineskip
      }
      {
        \par\nopagebreak\nointerlineskip
        \skip_zero:N \l_@@_partopsep_v_skip
      }
    \int_compare:nNnTF { \l_@@_columns_v_int } > { 1 }
      {
        \addvspace{ 0.445\box_ht:N \strutbox }
      }
      {
        \addvspace{ 0.250\box_ht:N \strutbox }
      }
  }
\cs_new_protected:Nn \@@_keyans_pre_itemsep_skip:
  {
    \skip_if_eq:nnTF
      { \l_@@_itemsep_i_skip } { \l_@@_minipage_after_skip }
      {
        \skip_set:Nn \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
        \skip_set:Nn \l_@@_multicols_below_v_skip { 0.350\box_ht:N \strutbox }
      }
      {
        \dim_compare:nNnT
          { \l_@@_itemsep_i_skip } < { \l_@@_minipage_after_skip }
          {
            \skip_sub:Nn \l_@@_minipage_after_skip { \l_@@_itemsep_i_skip }
            \skip_sub:Nn \l_@@_multicols_below_v_skip { \l_@@_itemsep_i_skip }
            \skip_add:Nn \l_@@_minipage_after_skip { 0.150\box_ht:N \strutbox }
            \skip_add:Nn \l_@@_multicols_below_v_skip { 0.350\box_ht:N \strutbox }
          }
        \dim_compare:nNnT
          { \l_@@_itemsep_i_skip } > { \l_@@_minipage_after_skip }
          {
            \skip_set:Nn \l_@@_minipage_temp_skip
              {
                \l_@@_itemsep_i_skip - \l_@@_minipage_after_skip
              }
            \skip_sub:Nn \l_@@_minipage_after_skip { \l_@@_itemsep_i_skip }
            \skip_sub:Nn \l_@@_multicols_below_v_skip { \l_@@_itemsep_i_skip }
            \skip_add:Nn \l_@@_minipage_after_skip
              { 0.150\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
            \skip_add:Nn \l_@@_multicols_below_v_skip
              { 0.350\box_ht:N \strutbox + \l_@@_minipage_temp_skip }
          }
     }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Adjustment of vertical spaces for \env{minipage} in \env{enumext*} and \env{keyans*}}
%
% \begin{macro}{\@@_mini_set_vskip_vii:,\@@_mini_set_vskip_viii:}
%    The functions \cs{@@_mini_set_vskip_vii:} and \cs{@@_mini_set_vskip_viii:} will take care of determining the
%    \enquote{adjusted} spaces that we will apply \emph{\enquote{above}} and
%    \emph{\enquote{below}} the \myvarenv*{__@@_mini_page} environment in
%    \myenv*{enumext*} and \myenv*{keyans*}.
% \iffalse
%% Adjustment of vertical spacing for |minipage| in |enumext*| and |keyans*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_mini_set_vskip_vii:
  {
    \skip_zero_new:N \l_@@_minipage_left_skip
    \skip_gzero_new:N \g_@@_minipage_right_skip
    \skip_gzero_new:N \g_@@_minipage_after_skip
    \skip_if_eq:nnTF { \l_@@_topsep_vii_skip } { \c_zero_skip }
      {
        \skip_set:Nn \l_@@_minipage_left_skip { 0.5\box_dp:N \strutbox }
        \skip_gset:Nn \g_@@_minipage_right_skip { 0.325\box_dp:N \strutbox }
      }
      {
        \skip_set:Nn \l_@@_minipage_left_skip { 0.5875\box_dp:N \strutbox }
        \skip_gset:Nn \g_@@_minipage_right_skip
          {
            \l_@@_topsep_vii_skip
          }
        \skip_gset:Nn \g_@@_minipage_after_skip
          {
            0.325\box_dp:N \strutbox + \l_@@_topsep_vii_skip
          }
      }
  }
\cs_new_protected:Nn \@@_mini_set_vskip_viii:
  {
    \skip_zero_new:N \l_@@_minipage_after_skip
    \skip_zero_new:N \l_@@_minipage_left_skip
    \skip_zero_new:N \l_@@_minipage_right_skip
    \skip_if_eq:nnTF { \l_@@_topsep_viii_skip } { \c_zero_skip }
      {
        \skip_set:Nn \l_@@_minipage_left_skip
          {
            0.5\box_dp:N \strutbox
          }
        \skip_set:Nn \l_@@_minipage_right_skip
          {
            \l_@@_partopsep_viii_skip
          }
        \skip_set:Nn \l_@@_minipage_after_skip
          {
            1.6\box_dp:N \strutbox
          }
      }
      {
        \skip_set:Nn \l_@@_minipage_left_skip
          {
            0.5875\box_dp:N \strutbox
          }
        \skip_set:Nn \l_@@_minipage_right_skip
          {
            \l_@@_topsep_viii_skip
          }
        \skip_set:Nn \l_@@_minipage_after_skip
          {
            0.325\box_dp:N \strutbox + \l_@@_topsep_viii_skip
          }
       }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_mini_addvspace_vii:,\@@_mini_addvspace_viii:}
%   The functions \cs{@@_mini_addvspace_vii:} and
%   \cs{@@_mini_addvspace_viii:} will apply the vertical space
%   \emph{\enquote{only above}} the \myvarenv*{__@@_mini_page} environment on
%   the \emph{left side} when the \mykey{mini-right} key is active in the
%   \myenv*{enumext*} and \myenv*{keyans*} environments.
%
%   Here we will NOT take into account whether \hologo{TeX} is in
%   \mymeta{horizontal mode} or \mymeta{vertical mode}, since |\partopsep|
%   is equal to \mydim{0pt} in both environments.
% \iffalse
%% Apply \addvspace above minipage for |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_mini_addvspace_vii:
  {
    \@@_mini_set_vskip_vii:
    \par\nopagebreak
    \addvspace { \l_@@_minipage_left_skip }
  }
\cs_new_protected:Nn \@@_mini_addvspace_viii:
  {
    \@@_mini_set_vskip_viii:
    \par\nopagebreak
    \addvspace { \l_@@_minipage_left_skip }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The command \cs{miniright}}\label{cmd:miniright}
%
% The command \ics*{miniright} will close the \myvarenv*{__@@_mini_page}
% environment on the \emph{\enquote{left side}}, open the \myvarenv*{__@@_mini_page}
% environment on the \emph{\enquote{right side}} adding the \emph{adjusted vertical space}.
% By default we will add |\centering| when starting the \emph{\enquote{right side}}
% environment. The \emph{starred argument} ‘|*|’ inhibits the use of |\centering|
% command i.e. the usual \hologo{LaTeX} justification is maintained in
% the \myvarenv*{__@@_mini_page} on the \emph{\enquote{right side}}.
%
% \begin{macro}{\miniright}
%   First we will perform some checks to prevent the command from being
%   executed outside the \myenv*{enumext} environment or somewhere
%   inappropriate then we will call the internal functions to execute it in
%   the \myenv*{enumext} and \myenv*{keyans} environments.
% \iffalse
%% Definition of |\miniright| command.
% \fi
%    \begin{macrocode}
\NewDocumentCommand \miniright { s }
  {
    \int_compare:nNnT { \l_@@_keyans_pic_level_int } = { 1 }
      {
        \msg_error:nnn { enumext } { wrong-miniright-place }
      }
    % outside
    \bool_lazy_and:nnT
      { \int_compare_p:nNn { \l_@@_level_int } = { 0 } }
      { \int_compare_p:nNn { \l_@@_level_h_int } = { 0 } }
      {
        \msg_error:nnn { enumext } { wrong-miniright-place }
      }
    % starred env
    \bool_lazy_and:nnT
      { \bool_if_p:N \g_@@_starred_bool }
      { \bool_not_p:n { \l_@@_standar_bool } }
      {
        \msg_error:nnn { enumext } { wrong-miniright-starred }
      }
    % exec
    \int_compare:nNnTF { \l_@@_keyans_level_int } = { 1 }
      {
        \@@_keyans_mini_right_cmd:n {#1}
      }
      { \@@_mini_right_cmd:n {#1} }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_mini_right_cmd:n}
%    The function \cs{@@_mini_right_cmd:n} takes as argument the \emph{starred} ‘|*|’
%    of the \ics*{miniright} command in the \myenv*{enumext} environment.
%    We check if the \mykey{mini-env} key is active via the variable
%    \myvarenv{l__@@_minipage_right_X_dim}, if so we close the
%    \myenv{multicols} environment with the \myvarenv*{__@@_mini_page}
%    environment on the \emph{\enquote{left side}}, then we open the
%    \myvarenv*{__@@_mini_page} environment on the \emph{\enquote{right
%    side}}, apply our adjusted \emph{\enquote{vertical spaces}}, followed by
%    adding the |\centering| command when the \emph{starred argument} ‘|*|’ is not
%    present and set zero \myvarenv{g__@@_minipage_stat_int}, otherwise we return an error.
% \iffalse
%% Internal function for |\miniright| command in enumext.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_mini_right_cmd:n #1
  {
    \dim_compare:nNnTF
      { \dim_use:c { l_@@_minipage_right_ \@@_level: _dim } } > { \c_zero_dim }
      {
        \@@_multicols_stop:
        \int_compare:nNnT
          { \int_use:c { l_@@_columns_ \@@_level: _int } } = { 1 }
          {
            \par\addvspace{ \l_@@_minipage_after_skip }
          }
        \end@@_mini_page
        \hfill
        \@@_mini_page{ \dim_use:c { l_@@_minipage_right_ \@@_level: _dim } }
          \par\nointerlineskip
          \addvspace { \l_@@_minipage_right_skip }
          \bool_if:nF {#1}
            {
              \centering
            }
          \int_gzero:N \g_@@_minipage_stat_int
      }
      { \msg_error:nnn { enumext } { wrong-miniright-use } }
    % paranoia
    \RenewDocumentCommand \miniright { s }
      {
        \msg_error:nn { enumext } { many-miniright-used }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_mini_right_cmd:n}
%    The function \cs{@@_keyans_mini_right_cmd:n} takes as argument the \emph{starred} ‘|*|’
%    of the \ics*{miniright} command in the \myenv*{keyans}
%    environment. The implementation of this function is the same as that of
%    the \cs{@@_mini_right_cmd:n} function of the \myenv*{enumext}
%    environment.
% \iffalse
%% Internal function for |\miniright| command in keyans.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_mini_right_cmd:n #1
  {
    \dim_compare:nNnTF { \l_@@_minipage_right_v_dim } > { \c_zero_dim }
      {
        \@@_keyans_multicols_stop:
        \int_compare:nNnT { \l_@@_columns_v_int } = { 1 }
          {
            \par\addvspace{ \l_@@_minipage_after_skip }
          }
        \end@@_mini_page
        \hfill
        \@@_mini_page{ \l_@@_minipage_right_v_dim }
          \par\nointerlineskip
          \addvspace { \l_@@_minipage_right_skip }
          \bool_if:nF {#1}
            {
              \centering
            }
          \int_gzero:N \g_@@_minipage_stat_int
      }
      { \msg_error:nnn { enumext } { wrong-miniright-use } }
    % paranoia
    \RenewDocumentCommand \miniright { s }
      {
        \msg_error:nn { enumext } { many-miniright-used }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{above} and \texttt{below} keys}
%
% While having controlled the \emph{vertical spaces} within
% the \myenv*{enumext} and \myenv*{keyans} environments when using the
% \mykey{columns} or \mykey{mini-env} keys, sometimes the
% \emph{\enquote{vertical spaces above}} or \emph{\enquote{vertical spaces below}} the environments are
% not as expected and it is necessary to be able to apply a
% \emph{\enquote{fine correction}} to these. As I have not been able to
% correct these  \emph{glitches}, the best option is to leave a couple of
% \mymeta{keys} dedicated to this purpose, in this case it is best to use
% |\vspace| or |\vspace*| when convenient.
%
% \begin{macro}[int]{above, above*, below, below*}
%     Define \mykey{above}, \mykey{above*}, \mykey{below} and \mykey{below*} keys for
%     \myenv*{enumext} and \myenv*{keyans} environments.
% \iffalse
%% Add |above| and |below| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        above  .skip_set:c = { l_@@_vspace_above_#2_skip },
        above  .value_required:n = true,
        above* .code:n     = \bool_set_true:c { l_@@_vspace_a_star_#2_bool }
                             \keys_set:nn { enumext / #1 } { above = {##1} },
        above* .value_required:n = true,
        below  .skip_set:c = { l_@@_vspace_below_#2_skip },
        below  .value_required:n = true,
        below* .code:n     = \bool_set_true:c { l_@@_vspace_b_star_#2_bool }
                             \keys_set:nn { enumext / #1 } { below = {##1} },
        below* .value_required:n = true,
      }
  }
\clist_map_inline:Nn \c_@@_all_envs_clist { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{above} and \texttt{below} keys in \env{enumext}}
%
% \iffalse
%% Function for |above|, |above*|, |below| and |below*| keys in |enumext|.
% \fi
% \begin{macro}{\@@_vspace_above:,}
%    The function \cs{@@_vspace_above:} apply the \emph{vertical space above}
%    the \myenv*{enumext} environment set by the \mykey{above*} and \mykey{above} keys.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_vspace_above:
  {
    \skip_if_eq:nnF
      { \skip_use:c { l_@@_vspace_above_ \@@_level: _skip } } { \c_zero_skip }
      {
        \bool_if:cTF { l_@@_vspace_a_star_ \@@_level: _bool }
          {
            \vspace*{ \skip_use:c { l_@@_vspace_above_ \@@_level: _skip } }
          }
          {
            \vspace { \skip_use:c { l_@@_vspace_above_ \@@_level: _skip } }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_vspace_below:}
%    The function \cs{@@_vspace_below:} apply the \emph{vertical space below}
%    the \myenv*{enumext} environment set by the \mykey{below*} and \mykey{below} keys.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_vspace_below:
  {
    \skip_if_eq:nnF
      { \skip_use:c { l_@@_vspace_below_ \@@_level: _skip } } { \c_zero_skip }
      {
        \bool_if:cTF { l_@@_vspace_b_star_ \@@_level: _bool }
          {
            \vspace*{ \skip_use:c { l_@@_vspace_below_ \@@_level: _skip } }
          }
          {
            \vspace { \skip_use:c { l_@@_vspace_below_ \@@_level: _skip } }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{above} and \texttt{below} keys in \env{keyans}}
%
% \begin{macro}{\@@_vspace_above_v:,}
%    The function \cs{@@_vspace_above_v:} apply the \emph{vertical space above}
%    the \myenv*{keyans} environment set by the \mykey{above} and \mykey{above*} keys.
% \iffalse
%% Function for |above|, |above*|, |below| and |below*| keys in |keyans|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_vspace_above_v:
  {
    \skip_if_eq:nnF { \l_@@_vspace_above_v_skip } { \c_zero_skip }
      {
        \bool_if:NTF \l_@@_vspace_a_star_v_bool
          {
            \vspace*{ \l_@@_vspace_above_v_skip }
          }
          { \vspace { \l_@@_vspace_above_v_skip } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_vspace_below_v:}
%    The function \cs{@@_vspace_below_v:} apply the \emph{vertical space below}
%    the \myenv*{keyans} environment set by the \mykey{below*} and \mykey{below} keys.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_vspace_below_v:
  {
    \skip_if_eq:nnF { \l_@@_vspace_below_v_skip } { \c_zero_skip }
      {
        \bool_if:NTF \l_@@_vspace_b_star_v_bool
          {
            \vspace*{ \l_@@_vspace_below_v_skip }
          }
          { \vspace { \l_@@_vspace_below_v_skip } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{above} and \texttt{below} keys in \env{enumext*} \env{keyans*}}
%
% \begin{macro}{\@@_vspace_above_vii:,\@@_vspace_above_viii:}
%    The functions \cs{@@_vspace_above_vii:} and \cs{@@_vspace_above_viii:} apply the \emph{vertical space above}
%    the \myenv*{enumext*} and \myenv*{keyans*} environments set by the \mykey{above} and \mykey{above*} keys.
% \iffalse
%% Function for |above|, |above*|, |below| and |below*| keys in |enumext*| and |keyans*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_vspace_above_vii:
  {
    \skip_if_eq:nnF { \l_@@_vspace_above_vii_skip } { \c_zero_skip }
      {
        \bool_if:NTF \l_@@_vspace_a_star_vii_bool
          {
            \vspace*{ \l_@@_vspace_above_vii_skip }
          }
          { \vspace { \l_@@_vspace_above_vii_skip } }
      }
  }
\cs_new_protected:Nn \@@_vspace_above_viii:
  {
    \skip_if_eq:nnF { \l_@@_vspace_above_viii_skip } { \c_zero_skip }
      {
        \bool_if:NTF \l_@@_vspace_a_star_viii_bool
          {
            \vspace*{ \l_@@_vspace_above_viii_skip }
          }
          { \vspace { \l_@@_vspace_above_viii_skip } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_vspace_below_vii:, \@@_vspace_below_viii:}
%    The functions \cs{@@_vspace_below_vii:} and  \cs{@@_vspace_below_viii:}
%    apply the \emph{vertical space below} the \myenv*{enumext*} and
%    \myenv*{keyans*} environments set by the \mykey{below*} and \mykey{below} keys.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_vspace_below_vii:
  {
    \skip_if_eq:nnF { \l_@@_vspace_below_vii_skip } { \c_zero_skip }
      {
        \bool_if:NTF \l_@@_vspace_b_star_vii_bool
          {
            \vspace*{ \l_@@_vspace_below_vii_skip }
          }
          { \vspace { \l_@@_vspace_below_vii_skip } }
      }
  }
\cs_new_protected:Nn \@@_vspace_below_viii:
  {
    \skip_if_eq:nnF { \l_@@_vspace_below_viii_skip } { \c_zero_skip }
      {
        \bool_if:NTF \l_@@_vspace_b_star_viii_bool
          {
            \vspace*{ \l_@@_vspace_below_viii_skip }
          }
          { \vspace { \l_@@_vspace_below_viii_skip } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{series}, \texttt{resume} and \texttt{resume*} keys}\label{key:series}
%
% The \mykey{series} key is responsible for the whole process of the
% \mykey{resume} and \mykey{resume*} keys. The idea behind this is to be
% able to absorb the \mymeta{keys} passed to the \emph{optional argument} of the
% \emph{\enquote{first level}} of the environments \myenv*{enumext} and \myenv*{enumext*}, but, discarding some specific
% \mymeta{keys}. This implementation is adapted directly from the code
% provided by Jonathan P. Spratte \texttt(@Skillmon) in \href{https://chat.stackexchange.com/transcript/41?m=65647962#65647962}{chat-TeX-SX}
%
% \begin{macro}[int]{series, resume, resume*, }
%     We define the keys \mykey{series}, \mykey{resume}
%     and \mykey{resume*} only for the \emph{\enquote{first level}}
%     of \myenv*{enumext} and \myenv*{enumext*}.
% \iffalse
%% Add |series|, |resume| and |resume*| keys only on first level off |enumext| and |enumext*|.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / #1 }
      {
        series  .str_set:N = \l_@@_series_str,
        series  .value_required:n = true,
        resume  .code:n = \@@_resume_series:n {##1},
        resume* .code:n = \@@_resume_starred:,
        resume* .value_forbidden:n = true,
      }
  }
\clist_map_inline:nn { level-1, enumext* } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal functions for \texttt{series} key}
%
% \begin{macro}{\@@_filter_series:n, \@@_filter_series_key:n, \@@_filter_series_pair:nn}
%   The function \cs{@@_filter_series:n} will be in charge of filtering the
%   \mymeta{keys} we want to store where |{#1}| represents the \emph{optional argument} passed to the environment.
% \iffalse
%% Internal function for filter keys.
% \fi
%    \begin{macrocode}
\cs_new:Npn \@@_filter_series:n #1
  {
    \use:e
      {
        \keyval_parse:NNn
          \@@_filter_series_key:n
          \@@_filter_series_pair:nn {#1}
      }
  }
%    \end{macrocode}
%   The function \cs{@@_filter_series_key:n} will be responsible for
%   filtering the \mymeta{keys} that are passed \emph{\enquote{without value}} by
%   excluding the \mykey{resume}, \mykey{resume*} and \mykey{base-fix} keys.
%    \begin{macrocode}
\cs_new:Npn \@@_filter_series_key:n #1
  {
    \str_case:nnF {#1}
      {
        { resume } {} { resume* } {} { base-fix } {}
      }
      { , { \exp_not:n {#1} } }
  }
%    \end{macrocode}
%   The function \cs{@@_filter_series_pair:nn} will be responsible for
%   filtering the \mymeta{keys} that are passed \emph{\enquote{with value}} by
%   excluding the \mykey{series}, \mykey{resume}, \mykey{start}, \mykey{start*}, \mykey{save-ans} and
%   \mykey{save-key} keys.
%    \begin{macrocode}
\cs_new:Npn \@@_filter_series_pair:nn #1#2
  {
    \str_case:nnF {#1}
      {
        { series } {} { resume } {} { start } {}
        { start* } {}  { save-ans } {} { save-key } {}
      }
      { , { \exp_not:n {#1} } = { \exp_not:n {#2} } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_parse_series:n, \@@_resume_last:n}
%   The function \cs{@@_parse_series:n} will be responsible for
%   storing the filtered \mymeta{keys} in the global variable
%   \myvarenv{g__@@_series_\mymeta[cf=gray]{series name}_tl} along with the
%   creation of the integer variable
%   \myvarenv{g__@@_series_\mymeta[cf=gray]{series name}_int} when the key
%   is passed as an argument; otherwise, it will check the state of the
%   boolean variable \cs{l_@@_resume_active_bool} set by the keys
%   \mykey{resume} and  \mykey{resume*} and will call the function
%   \cs{@@_resume_last:n}.
% \begin{important}*
%   The value of boolean variable \cs{l_@@_resume_active_bool} is set to
%   true by the function \cs{@@_resume_counter:n} which is used by the keys
%   \mykey{resume} and \mykey{resume*}, in this case we must Make sure it
%   is set to false so that it does not overwrite the default filtered
%   \mymeta{keys}.
%   This function is passed to the function \cs{@@_parse_keys:n}
%   in the \myenv*{enumext} environment definition (\S\ref{env:enumext})
%   and to the function \cs{@@_parse_keys_vii:n} in the \myenv*{enumext*}
%   environment definition (\S\ref{env:starred}).
% \end{important}
% \iffalse
%% Internal function for parse filter keys used by |series|, |resume| and |resume*| keys.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_parse_series:n #1
  {
    \str_if_empty:NTF \l_@@_series_str
      {
        \bool_if:NF \l_@@_resume_active_bool
          {
            \@@_resume_last:n {#1}
          }
      }
      {
        \tl_gclear_new:c { g_@@_series_ \l_@@_series_str _tl }
        \tl_gset:ce { g_@@_series_ \l_@@_series_str _tl }
          { \@@_filter_series:n {#1} }
        \int_if_exist:cF { g_@@_series_ \l_@@_series_str _int }
          {
            \int_new:c { g_@@_series_ \l_@@_series_str _int }
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_resume_last:n} will be in charge
%   of saving the filtering \mymeta{keys} when the \mykey{series} key is
%   \emph{not used} and will save them in the variable \myvarenv{g__@@_standar_series_tl} for the
%   \myenv*{enumext} environment and in the variable \myvarenv{g__@@_starred_series_tl}
%   for the \myenv*{enumext*} environment.
% \iffalse
%% Save keys for last environment without |series|, |resume| and |resume*| keys active.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_resume_last:n #1
  {
    \bool_if:NT \l_@@_standar_first_bool
      {
        \tl_gclear:N \g_@@_standar_series_tl
        \tl_gset:Ne \g_@@_standar_series_tl { \@@_filter_series:n {#1} }
      }
    \bool_if:NT \l_@@_starred_first_bool
      {
        \tl_gclear:N \g_@@_starred_series_tl
        \tl_gset:Ne \g_@@_starred_series_tl { \@@_filter_series:n {#1} }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal function to save counter value}
%
% \begin{macro}{\@@_resume_save_counter:}
%
%   The \cs{@@_resume_save_counter:} function will save the last counter
%   value to \myvarenv{g__@@_series_\mymeta[cf=gray]{series name}_int} if
%   the \mykey{series}|=|\mymarg{series name} key has been passed, to
%   \myvarenv{g__@@_resume_int} if it has passed the key \mykey{resume}
%   \emph{without value} and the key \mykey{series} is not active, in
%   \myvarenv{g__@@_series_\mymeta[cf=gray]{series name}_int} if the key
%   \mykey{resume}|=|\mymarg{series name} has been passed and in
%   \myvarenv{g__@@_series_\mymeta[cf=gray]{store name}_int} if the key has
%   been passed \mykey{save-ans}|=|\mymarg{store name}.
%
%   \smallskip
%
% \begin{important}*
%   The variables \cs{l_@@_series_str} and \cs{l_@@__resume_name_tl}
%   contain the same \mymarg{series name} but are executed at different
%   moments, the integer variable with \cs{l_@@_series_str} sets the value
%   when execute \mykey{series}|=|\mymarg{series name} and the
%   integer variable with \cs{l_@@__resume_name_tl} sets the subsequent
%   values when use \mykey{resume}|=|\mymarg{series name}.
%   This function is passed to the \myenv*{enumext} environment definition (\S\ref{env:enumext})
%   and the \myenv*{enumext*} environment definition (\S\ref{env:starred}).
% \end{important}
% \iffalse
%% Internal function to save counter value and set int vars for |series|, |resume| and |resume*| keys.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_resume_save_counter:
  {
    \bool_if:NT \g_@@_standar_bool
      {
        \tl_if_empty:NF \l_@@_series_str
          {
            \int_gset_eq:cN
              { g_@@_series_ \l_@@_series_str _int } \value{enumXi}
          }
        \tl_if_empty:NTF \l_@@_resume_name_tl
          {
            \str_if_empty:NT \l_@@_series_str
              {
                \int_gset_eq:NN \g_@@_resume_int \value{enumXi}
              }
          }
          {
            \int_if_exist:cT { g_@@_series_ \l_@@_resume_name_tl _int }
              {
                \int_gset_eq:cN
                  { g_@@_series_ \l_@@_resume_name_tl _int } \value{enumXi}
              }
          }
        \int_if_exist:cT { g_@@_resume_ \l_@@_store_name_tl _int }
          {
            \int_gset_eq:cN
              { g_@@_resume_ \l_@@_store_name_tl _int } \value{enumXi}
          }
      }
    \bool_if:NT \g_@@_starred_bool
      {
        \tl_if_empty:NF \l_@@_series_str
          {
            \int_gset_eq:cN
              { g_@@_series_ \l_@@_series_str _int } \value{enumXvii}
          }
        \tl_if_empty:NTF \l_@@_resume_name_tl
          {
            \str_if_empty:NT \l_@@_series_str
              {
                \int_gset_eq:NN \g_@@_resume_vii_int \value{enumXvii}
              }
          }
          {
            \int_if_exist:cT { g_@@_series_ \l_@@_resume_name_tl _int }
              {
                \int_gset_eq:cN
                  { g_@@_series_ \l_@@_resume_name_tl _int } \value{enumXvii}
              }
          }
        \int_if_exist:cT { g_@@_resume_ \l_@@_store_name_tl _int }
          {
            \int_gset_eq:cN
              { g_@@_resume_ \l_@@_store_name_tl _int } \value{enumXvii}
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal functions for \texttt{resume} key}
%
% \begin{macro}{\@@_resume_series:n}
%   The function \cs{@@_resume_series:n} will handle the argument
%   passed to the \mykey{resume} key in \myenv*{enumext} and \myenv*{enumext*} environments.
%   If the key is passed \emph{without value} the function
%   \cs{@@_resume_counter:} is executed which will set the counter
%   according to the numbering of the last \myenv*{enumext} or \myenv*{enumext*} environments in
%   which \mykey{series}|=|\mymarg{series name} key is not present, if
%   the \mykey{save-ans} key is active it will set the counter according to
%   the value of the integer variable created by that key, otherwise it
%   will verify that the \myvarenv{g__@@_series_\mymeta[cf=gray]{series name}_tl}
%   variable set by the \mykey{series} key exists, if so it will pass these
%   keys to the \emph{first level} of the environment, otherwise it will
%   return an error.
% \iffalse
%% Internal function for |resume| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_resume_series:n #1
  {
    \tl_if_empty:nTF {#1}
      {
        \@@_resume_counter:n { }
      }
      {
        \tl_if_exist:cTF { g_@@_series_ \tl_to_str:n {#1} _tl }
          {
            \@@_resume_counter:n {#1}
            \bool_if:NT \g_@@_standar_bool
              {
                \keys_set:nv { enumext / level-1 }
                  { g_@@_series_ \tl_to_str:n {#1} _tl }
              }
            \bool_if:NT \g_@@_starred_bool
              {
                \keys_set:nv { enumext / enumext* }
                  { g_@@_series_ \tl_to_str:n {#1} _tl }
              }
          }
          {
            \bool_if:NT \g_@@_standar_bool
              {
                \msg_error:nnn { enumext } { unknown-series } {#1}
              }
            \bool_if:NT \g_@@_starred_bool
              {
                \msg_error:nnn { enumext } { unknown-series } {#1}
              }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_resume_counter:n, \@@_resume_counter:, \@@_resume_counter_series:, \@@_resume_counter_save_ans:}
%   The function \cs{@@_resume_counter:n} will set the variable
%   \cs{l_@@_resume_active_bool} to true and pass the value of the key
%   \mykey{resume} to the variable \cs{l_@@_series_name_tl} which will
%   contain the \mymarg{series name}. If the variable \cs{l_@@_series_name_tl} is
%   empty, that is, we are passing the key \mykey{resume} \emph{without value}, we
%   will execute the function \cs{@@_resume_counter:} otherwise, when we
%   pass \mykey{resume}|=|\mymarg{series name} we will execute the function
%   \cs{@@_resume_counter_series:}, finally we will execute the function
%   \cs{@@_resume_counter_save_ans:} which is associated with the key
%   \mykey{save-ans}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_resume_counter:n #1
  {
    \bool_set_true:N \l_@@_resume_active_bool
    \tl_set:Nn \l_@@_resume_name_tl {#1}
    \tl_if_empty:NTF \l_@@_resume_name_tl
      {
        \@@_resume_counter:
      }
      {
        \@@_resume_counter_series:
      }
    \@@_resume_counter_save_ans:
  }
%    \end{macrocode}
%   The \cs{@@_resume_counter:} function is executed when the
%   \mykey{resume} key is used \emph{without value}, only the counters for
%   the \emph{\enquote{first level}} of the environments will be set.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_resume_counter:
  {
    \bool_if:NT \g_@@_standar_bool
      {
        \int_gincr:N \g_@@_resume_int
        \int_set_eq:NN \l_@@_start_i_int \g_@@_resume_int
      }
    \bool_if:NT \g_@@_starred_bool
      {
        \int_gincr:N \g_@@_resume_vii_int
        \int_set_eq:NN \l_@@_start_vii_int \g_@@_resume_vii_int
      }
  }
%    \end{macrocode}
%   The function \cs{@@_resume_counter_series:} will be executed when the
%   \mykey{resume}|=|\mymarg{series name} key is active, setting the
%   counters for the \emph{\enquote{first level}} of the environments
%   according to the value of the integer variables created by the
%   \mykey{series} key.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_resume_counter_series:
  {
    \bool_if:NT \g_@@_standar_bool
      {
        \int_set:Nn \l_@@_start_i_int
          {
            \int_use:c { g_@@_series_ \l_@@_resume_name_tl _int } + 1
          }
      }
    \bool_if:NT \g_@@_starred_bool
      {
        \int_set:Nn \l_@@_start_vii_int
          {
            \int_use:c { g_@@_series_ \l_@@_resume_name_tl _int } + 1
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_resume_counter_save_ans:} will be executed when the
%   \mykey{save-ans} key is active along with the \mykey{resume} key,
%   setting the counters for the \emph{\enquote{first level}} of the
%   environments according to the value of the integer variables created by
%   the \mykey{save-ans} key.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_resume_counter_save_ans:
  {
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_standar_first_bool }
      { \bool_if_p:N \l_@@_store_active_bool }
      {
        \int_set:Nn \l_@@_start_i_int
          {
            \int_use:c { g_@@_resume_ \l_@@_store_name_tl _int } + 1
          }
      }
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_starred_first_bool }
      { \bool_if_p:N \l_@@_store_active_bool }
      {
        \int_set:Nn \l_@@_start_vii_int
          {
            \int_use:c { g_@@_resume_ \l_@@_store_name_tl _int } + 1
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal function for \texttt{resume*} key}
%
% \begin{macro}{\@@_resume_starred:}
%   The function \cs{@@_resume_starred:} will handle the \mykey{resume*}
%   key in the \myenv*{enumext} and \myenv*{enumext*} environments. This
%   function will execute the filtered \mymeta{keys} in the last one and will
%   continue with the numbering according to the last execution of the
%   environment \myenv*{enumext} or \myenv*{enumext*} in which the keys
%   \mykey{resume}|=|\mymarg{series name} or \mykey{series}|=|\mymarg{series name} were not active.
% \iffalse
%% Internal function for |resume*| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_resume_starred:
  {
    \bool_if:NT \g_@@_standar_bool
      {
        \tl_if_empty:NF \g_@@_standar_series_tl
          {
            \@@_resume_counter:n { }
            \keys_set:nV { enumext / level-1 } \g_@@_standar_series_tl
          }
      }
    \bool_if:NT \g_@@_starred_bool
      {
        \tl_if_empty:NF \g_@@_starred_series_tl
          {
            \@@_resume_counter:n { }
            \keys_set:nV { enumext / enumext* } \g_@@_starred_series_tl
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{save-ans}, \texttt{check-ans} and  \texttt{no-store} keys}
%
% The key \mykey{save-ans} is directly associated with the keys
% \mykey{check-ans}, \mykey{no-store}, \mykey{resume} and
% \mykey{resume*}, this will activate the entire \emph{\enquote{storage
% system}} in the \mypkg*{enumext} package.
%
% \subsubsection{Setting \texttt{save-ans} key}\label{key:save-ans}
%
% \begin{macro}[int]{save-ans}
%     We define the keys \mykey{save-ans} only for the \emph{\enquote{first level}}
%     of \myenv*{enumext} and \myenv*{enumext*}.
% \iffalse
%% Add |save-ans| key only on first level off |enumext| and |enumext*|.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / #1 }
      {
        save-ans .code:n = \@@_storing_set:n {##1},
        save-ans .value_required:n = true,
      }
  }
\clist_map_inline:nn { level-1, enumext* } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal functions for \texttt{save-ans} key}
%
% \begin{macro}{\@@_start_save_ans_msg:, \@@_stop_save_ans_msg:,}
%   The functions \cs{@@_start_save_ans_msg:} and \cs{@@_stop_save_ans_msg:}
%   will display in the terminal and |.log| file the environment in which
%   the \mykey{save-ans} key was executed along with the line at the
%   beginning and end of it. The function \cs{@@_start_save_ans_msg:} will
%   be passed to \cs{@@_storing_set:n} and the function
%   \cs{@@_stop_save_ans_msg:} will be passed to the function
%   \cs{@@_execute_after_env:}.
% \iffalse
%% Print/write start and stop environment with |save-ans| key active.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_start_save_ans_msg:
  {
    \msg_term:nnVV { enumext } { save-ans-log }
      \g_@@_envir_name_tl \l_@@_store_name_tl
  }
\cs_new_protected:Nn \@@_stop_save_ans_msg:
  {
    \msg_term:nnVV { enumext } { save-ans-log-hook }
      \g_@@_envir_name_tl \g_@@_store_name_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_storing_set:n, \@@_storing_exec:,}
%    The function \cs{@@_storing_set:n} first pass the value of the
%    \mykey{save-ans} key to the variable \cs{l_@@_store_name_tl}
%    which will contain the \mymarg{store name} of the \emph{sequence}
%    and \emph{prop list} we will use. If \cs{l_@@_store_name_tl} is
%    \emph{empty} we return an error message, otherwise will return the
%    appropriate message \cs{@@_start_save_ans_msg:} and proceed to execute
%    the function \cs{@@_storing_exec:} for \myenv*{enumext} and
%    \myenv*{enumext*} environments.
% \iffalse
%% Function to activate ALL "storing" (and |check-ans|, |no-store|, |resume|, |anskey*|) used by |save-ans| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_storing_set:n #1
  {
    \tl_set:Ne \l_@@_store_name_tl {#1}
    \tl_if_empty:NTF \l_@@_store_name_tl
      {
        \bool_lazy_or:nnT
          { \l_@@_standar_first_bool } { \l_@@_starred_first_bool }
          {
            \msg_error:nnV { enumext } { save-ans-empty } \g_@@_envir_name_tl
          }
      }
      {
        \bool_lazy_or:nnT
          { \l_@@_standar_first_bool } { \l_@@_starred_first_bool }
          {
            \@@_start_save_ans_msg:
            \@@_storing_exec:
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_storing_exec:} will set to true the variable
%   \cs{l_@@_store_active_bool} which activates the use of the
%   \ics*{anskey} command and the \myenv*{anskey*}, \myenv*{keyans},
%   \myenv*{keyans*} and \myenv*{keyanspic} environments and will set
%   to \enquote{true} the variable \cs{l_@@_check_answers_bool} used for
%   internal checking answers mechanism set by the \mykey{check-ans} and \mykey{no-store}
%   keys, copy \mymarg{store name} into the variable \cs{g_@@_store_name_tl}
%   and execute the function \cs{@@_anskey_env_make:V} creating the environment
%   \myenv*{anskey*} (\S\ref{env:anskey}).
%    \begin{macrocode}
\cs_new_protected:Nn \@@_storing_exec:
  {
    \bool_set_true:N \l_@@_store_active_bool
    \bool_set_true:N \l_@@_check_answers_bool
    \tl_gset:NV \g_@@_store_name_tl \l_@@_store_name_tl
    \@@_anskey_env_make:V \l_@@_store_name_tl
%    \end{macrocode}
%   The \emph{prop list} \myvarenv{g__@@_series_\mymeta[cf=gray]{store
%   name}_prop} and the \emph{sequence} \myvarenv{g__@@_series_\mymeta[cf=gray]{store name}_seq}
%   will be created globally to \emph{\enquote{store content}} in case
%   they do not exist together with the integer variable
%   \myvarenv{g__@@_series_\mymeta[cf=gray]{store name}_int} used by the keys
%   \mykey{resume} and \mykey{resume*}.
%    \begin{macrocode}
    \prop_if_exist:cF { g_@@_ \l_@@_store_name_tl _prop }
      {
        \msg_log:nnV { enumext } { store-prop } \l_@@_store_name_tl
        \prop_new:c { g_@@_ \l_@@_store_name_tl _prop }
      }
    \seq_if_exist:cF { g_@@_ \l_@@_store_name_tl _seq }
      {
        \msg_log:nnV { enumext } { store-seq } \l_@@_store_name_tl
        \seq_new:c { g_@@_ \l_@@_store_name_tl _seq }
      }
    \int_if_exist:cF { g_@@_resume_ \l_@@_store_name_tl _int }
      {
        \msg_log:nnV { enumext } { store-int } \l_@@_store_name_tl
        \int_new:c { g_@@_resume_ \l_@@_store_name_tl _int }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The check answer mechanism}\label{int:check-answer}
%
% The internal mechanism for \emph{\enquote{checking answers}} follows this
% logic:
%
% \begin{quote}
%  If the line begins with |\item| or |\item*| and does NOT
%  \emph{open a nested environment}, each |\item| or |\item*| must contain a
%  \emph{single} execution of the |\anskey| command, i.e. the counter of the
%  executions of the |\anskey| command must be equal to the counter
%  associated with the sum of executions of |\item| and |\item*|.
%
%  If the line begins with |\item| or |\item*| and \emph{opens a nested
%  environment} each |\item| or |\item*| in the nested environment must
%  have a \emph{single} execution of the |\anskey| command and the counter
%  associated to the sum of |\item| and |\item*| executions must decrementing
%  by \emph{\enquote{one}} to maintain equality.
%
% \end{quote}
%
% In order for the mechanism for the check-answer to work (not counting
% \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic}) we need:
%
% \begin{enumerate}[left=0pt,noitemsep, partopsep=0pt, topsep=5pt]
%   \item We must keep track of the total number of |\item| and |\item*| (enumerated) that appear within
%         the environment including the nested levels.
%   \item We must keep track of the total number of |\item| and |\item*| (enumerated) that appear per
%         level of nesting.
%   \item Keeping track of the number of times the environment nests.
% \end{enumerate}
%
%
% The integer variable associated to the sum of each |\item| and |\item*|
% in the environment \myvarenv{g__@@_item_number_int} must match the
% integer variable \myvarenv{g__@@_item_anskey_int} associated
% to the execution of the command |\anskey|. We analyze the cases:
%
% \begin{enumerate}[label=\alph*),left=0pt,noitemsep, partopsep=0pt, topsep=5pt]
%   \item If the list only has one level the number of |\item + \item*| = \ics*{anskey}
%
%   \item If the list has \emph{nested levels}, for each level of nesting we need to
%    decrementing by one (for the |\item| or |\item*| that opens the nest) so that the account
%    remains the same.
%^^A   \item If there is the option \mykey{no-store} we must add the items within this
%^^A    level plus one to maintain the equality.
% \end{enumerate}
%
% With \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} it is
% enough to increase in one the integer of \ics*{anskey}. The integers
% created must be global if they are not lost in the interior levels of
% nesting and to execute the test we will use a \emph{\enquote{hook}}
% function after closing the \emph{first level} of the environment.
%
% \subsubsection{Setting \texttt{check-ans} and \texttt{no-store} keys}\label{key:check-ans}
%
% \begin{macro}[int]{check-ans, no-store}
%    Now we define the keys \mykey{check-ans} and \mykey{no-store} for all
%    levels of \myenv*{enumext} and \myenv*{enumext*} environments.
% \iffalse
%% Add |check-ans| and |no-store| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / #1 }
      {
        check-ans .bool_set:N = \l_@@_check_ans_key_bool,
        check-ans .initial:n  = false,
        check-ans .value_required:n = true,
        no-store  .code:n = {
                              \bool_set_false:N \l_@@_check_answers_bool
                              \bool_set_false:N \l_@@_check_ans_key_bool
                            },
        no-store  .value_forbidden:n = true,
      }
  }
\clist_map_inline:nn
  {
    level-1, level-2, level-3, level-4, enumext*
  }
  { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Set-up check answer mechanism}\label{int:set-check-answer}
%
% \begin{macro}{\@@_check_ans_active:, \@@_check_ans_level:,}
%   The function \cs{@@_check_ans_active:} will first check the state of
%   the variable \cs{l_@@_store_name_tl}, that is, the \mykey{save-ans} key
%   is active, if so it will check the state of the variable
%   \cs{l_@@_check_answers_bool} handled by the key \mykey{no-store} and
%   will execute the function \cs{@@_check_ans_level:} only if
%   \emph{\enquote{true}}, i.e. the key \mykey{no-store} is not active.
% \iffalse
%% Internal function for checking answer mechanism in |enumext| and |enumext*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_check_ans_active:
  {
    \tl_if_empty:NF \l_@@_store_name_tl
      {
        \bool_if:NT \l_@@_check_answers_bool
          {
            \@@_check_ans_level:
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_check_ans_level:} will decrement by \emph{\enquote{one}}
%   the value of the variable \cs{g_@@_item_number_int} which keeps track
%   of the executions of |\item| and |\item*| for each level of nesting
%   of the environment \myenv*{enumext}, taking into account whether it
%   is nested within \myenv*{enumext*} or the opposite and set \cs{l_@@_item_number_bool}
%   to \emph{\enquote{false}} .
% \iffalse
%% Decrementing \g_@@_item_number_int for nested level.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_check_ans_level:
  {
    \int_case:nn { \l_@@_level_int }
      {
        { 1 }{
               \bool_lazy_all:nT
                 {
                   { \bool_if_p:N \g_@@_starred_bool }
                   { \int_compare_p:nNn { \l_@@_level_h_int } = { 1 } }
                 }
                 {
                   \int_gdecr:N \g_@@_item_number_int
                   \bool_set_false:N \l_@@_item_number_bool
                 }
             }
        { 2 }{
               \int_gdecr:N \g_@@_item_number_int
               \bool_set_false:N \l_@@_item_number_bool
             }
        { 3 }{
               \int_gdecr:N \g_@@_item_number_int
               \bool_set_false:N \l_@@_item_number_bool
             }
        { 4 }{
               \int_gdecr:N \g_@@_item_number_int
               \bool_set_false:N \l_@@_item_number_bool
             }
      }
%    \end{macrocode}
%   We should only execute this if \myenv*{enumext*} is nested in the
%   \emph{\enquote{first level}} of \myenv*{enumext}, for the rest of the
%   cases the value of \cs{g_@@_item_number_int} is already decreased.
%    \begin{macrocode}
    \int_case:nn { \l_@@_level_h_int }
      {
        { 1 }{
               \bool_lazy_all:nT
                 {
                   { \bool_if_p:N \g_@@_standar_bool }
                   { \int_compare_p:nNn { \l_@@_level_int } = { 1 } }
                 }
                 {
                   \int_gdecr:N \g_@@_item_number_int
                   \bool_set_false:N \l_@@_item_number_bool
                 }
             }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_check_ans_key_hook:}
%   The function \cs{@@_check_ans_key_hook:} will \emph{export} the status
%   of the local variable \cs{l_@@_check_ans_key_bool} to the global variable
%   \cs{g_@@_check_ans_key_bool} only if the key \mykey{check-ans} is active.
% \iffalse
%% Function to export \l_@@_check_ans_key_bool for |check-ans| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_check_ans_key_hook:
  {
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_check_ans_key_bool }
      { \bool_if_p:N \g_@@_standar_bool }
      {
        \bool_gset_true:N \g_@@_check_ans_key_bool
      }
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_check_ans_key_bool }
      { \bool_if_p:N \g_@@_starred_bool }
      {
        \bool_gset_true:N \g_@@_check_ans_key_bool
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_item_answer_diff:}
%   The function \cs{@@_item_answer_diff:} will set the value of the
%   variable \cs{g_@@_item_answer_diff_int} which is used by the functions
%   \cs{@@_check_ans_show:} for the key \mykey{save-ans} and by the
%   function \cs{@@_check_ans_log:} by the internal \emph{\enquote{check answer}}
%   mechanism. This function will be passed to the function
%   \cs{@@_execute_after_env:}.
% \iffalse
%% Set \g_@@_item_answer_diff_int for |check-ans| key and internal.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_item_answer_diff:
  {
    \int_gset:Nn \g_@@_item_answer_diff_int
      {
        \int_sign:n { \g_@@_item_number_int - \g_@@_item_anskey_int }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_check_ans_show:, \@@_check_ans_msg_less:,
%               \@@_check_ans_msg_same_ok:, \@@_check_ans_msg_greater:}
%   The function \cs{@@_check_ans_show:} will be executed within the
%   function \cs{@@_execute_after_env:} when the key \mykey{check-ans} is
%   active, that is, when \cs{g_@@_check_ans_key_bool} is \emph{\enquote{true}}
%   and will return the appropriate message according to the value of
%   \cs{g_@@_item_answer_diff_int} set by the function \cs{@@_item_answer_diff:}.
% \iffalse
%% Function to print |check-ans| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_check_ans_show:
  {
    \int_case:nn { \g_@@_item_answer_diff_int }
      {
        { -1 }{ \@@_check_ans_msg_less:    }
        {  0 }{ \@@_check_ans_msg_same_ok: }
        {  1 }{ \@@_check_ans_msg_greater: }
      }
  }
\cs_new_protected:Nn \@@_check_ans_msg_less:
  {
    \msg_warning:nneee { enumext } { item-less-answer } { \g_@@_store_name_tl }
      { \g_@@_envir_name_tl } { \g_@@_start_line_tl }
  }
\cs_new_protected:Nn \@@_check_ans_msg_same_ok:
  {
    \msg_term:nneee { enumext } { items-same-answer } { \g_@@_store_name_tl }
      { \g_@@_envir_name_tl } { \g_@@_start_line_tl }
  }
\cs_new_protected:Nn \@@_check_ans_msg_greater:
  {
    \msg_warning:nneee { enumext } { item-greater-answer } { \g_@@_store_name_tl }
      { \g_@@_envir_name_tl } { \g_@@_start_line_tl }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_check_ans_log:, \@@_check_ans_log_msg_less:,
%               \@@_check_ans_log_msg_same_ok:, \@@_check_ans_log_msg_greater:}
%   The function \cs{@@_check_ans_log:} will be executed within the
%   function \cs{@@_execute_after_env:} when the key \mykey{check-ans} is
%   not active, that is, when \cs{g_@@_check_ans_key_bool} is \emph{\enquote{false}}
%   and write in the log the appropriate message according to the value of
%   \cs{g_@@_item_answer_diff_int} set by the function
%   \cs{@@_item_answer_diff:}.
% \iffalse
%% Function to log check-answer mechanisms.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_check_ans_log:
  {
    \int_case:nn { \g_@@_item_answer_diff_int }
      {
        { -1 }{ \@@_check_ans_log_msg_less:    }
        {  0 }{ \@@_check_ans_log_msg_same_ok: }
        {  1 }{ \@@_check_ans_log_msg_greater: }
      }
  }
\cs_new_protected:Nn \@@_check_ans_log_msg_less:
  {
    \msg_log:nneee { enumext } { item-less-answer } { \g_@@_store_name_tl }
      { \g_@@_envir_name_tl } { \g_@@_start_line_tl }
  }
\cs_new_protected:Nn \@@_check_ans_log_msg_same_ok:
  {
    \msg_log:nneee { enumext } { items-same-answer }  { \g_@@_store_name_tl }
      { \g_@@_envir_name_tl } { \g_@@_start_line_tl }
  }
\cs_new_protected:Nn \@@_check_ans_log_msg_greater:
  {
    \msg_log:nneee { enumext } { item-greater-answer } { \g_@@_store_name_tl }
      { \g_@@_envir_name_tl } { \g_@@_start_line_tl }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Check for \cs{item*} and \cs{anspic*} commands}
%
% \begin{macro}{\@@_check_starred_cmd:n,}
%    The function \cs{@@_check_starred_cmd:n} performs an \emph{extra check}
%    for the \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic} environments.
%    Unlike the \emph{check} executed by \mykey{check-ans} key this one
%    is not controlled by any key, it is intended to prevent the forgetting
%    of \ics*{item*} or \ics*{anspic*} in these environments.
% \iffalse
%% Function for check |\item*| and |\anspic*| commands.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_check_starred_cmd:n #1
  {
    \int_compare:nNnT
      { \g_@@_check_starred_cmd_int } = { 0 }
      {
        \msg_warning:nnnV
          { enumext } { missing-starred }{ #1 } \l_@@_check_start_line_env_tl
      }
    \int_compare:nNnT
      { \g_@@_check_starred_cmd_int } > { 1 }
      {
        \msg_warning:nnnV
          { enumext } { many-starred }{ #1 } \l_@@_check_start_line_env_tl
      }
    \int_gzero:N \g_@@_check_starred_cmd_int
    \tl_clear:N \l_@@_check_start_line_env_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Keys and functions associated with storage}\label{int:storage-system}
%
% \subsubsection{Keys for \texttt{marks}, \texttt{wrapp} and \texttt{show}}
%
% The \mypkg*{enumext} package provides a set of \mymeta{keys} for
% manipulating \emph{\enquote{symbol marks}} associated with \emph{\enquote{answers}}
% and how they are displayed and stored in the \emph{sequence} and \emph{prop list}
% as well as an internal \emph{\enquote{label and ref}} system.
%
% \begin{macro}[int]{mark-ans*, mark-pos*, mark-sep*, wrap-ans*, wrap-opt,
%                    save-sep, show-ans, show-pos}
%   For the \myenv*{keyans} and \myenv*{keyans*} environments we will
%   only add the keys \mykey{mark-ans*}, \mykey{mark-pos*}, \mykey{mark-sep*},
%   \mykey{wrap-ans*}, \mykey{wrap-opt}, \mykey{save-sep}, \mykey{show-ans}
%   and \mykey{show-pos}.
% \iffalse
%% Add the keys for marks style and show for |keyans| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        mark-ans*  .tl_set:c  = { l_@@_mark_answer_sym_#2_tl },
        mark-ans*  .initial:n = \textasteriskcentered,
        mark-ans*  .value_required:n = true,
        mark-pos*  .choice:,
        mark-pos* / left    .code:n = \str_set:cn { l_@@_mark_position_#2_str } { l },
        mark-pos* / right   .code:n = \str_set:cn { l_@@_mark_position_#2_str } { r },
        mark-pos* / center  .code:n = \str_set:cn { l_@@_mark_position_#2_str } { c },
        mark-pos* / unknown .code:n =
                           \msg_error:nneee { enumext } { unknown-choice }
                             { mark-pos } { left, ~ right, ~ center } { \exp_not:n {##1} },
        mark-pos*  .initial:n = right,
        mark-pos*  .value_required:n = true,
        mark-sep*  .dim_set:c = { l_@@_mark_sym_sep_#2_dim },
        mark-sep*  .value_required:n = true,
        wrap-ans*  .cs_set_protected:cp = { @@_keyans_wrapper_item_#2:n } ##1,
        wrap-ans*  .value_required:n = true,
        wrap-opt   .cs_set_protected:cp = { @@_keyans_wrapper_opt_#2:n } ##1,
        wrap-opt   .initial:n = [{##1}],
        wrap-opt   .value_required:n = true,
        save-sep   .tl_set:c = { l_@@_store_keyans_item_opt_sep_#2_tl },
        save-sep   .initial:n = {, ~ },
        save-sep   .value_required:n = true,
        show-ans   .bool_set:N = \l_@@_show_answer_bool,
        show-ans   .initial:n = false,
        show-ans   .value_required:n = true,
        show-pos   .bool_set:N = \l_@@_show_position_bool,
        show-pos   .initial:n = false,
        show-pos   .value_required:n = true,
      }
  }
\clist_map_inline:nn { {keyans}{v}, {keyans*}{viii} } { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{mark-ref, save-ref, show-ans, show-pos, mark-ans,
%                    mark-pos, mark-sep, wrap-ans, mark-ans*, mark-pos*,
%                    mark-sep*, wrap-ans*, wrap-opt, save-sep,}
%   We add the \mymeta{keys} \mykey{mark-ref} and \mykey{save-ref} related to the
%   \emph{\enquote{storage system}} and internal mechanism of
%   \emph{\enquote{label and ref}} along with the \mymeta{keys} \mykey{show-ans},
%   \mykey{show-pos} and the\mymeta{keys} \mykey{mark-ans}, \mykey{mark-pos},
%   \mykey{mark-sep} and \mykey{wrap-ans} for the command |\anskey|,
%   the environment \myenv*{anskey*} and the the \mymeta{keys} for environments
%   \myenv*{keyans} and \myenv*{keyans*} only at the \emph{first level}
%   of \myenv*{enumext} and \myenv*{enumext*}.
% \iffalse
%% Add keys associated with mark and internal label/ref on first level of |enumext| and |enumext*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / #1 }
      {
        mark-ref  .tl_set:N   = \l_@@_mark_ref_sym_tl,
        mark-ref  .initial:n  = \textreferencemark,
        mark-ref  .value_required:n = true,
        save-ref  .bool_set:N = \l_@@_store_ref_key_bool,
        save-ref  .initial:n  = false,
        save-ref  .value_required:n = true,
        show-ans  .bool_set:N = \l_@@_show_answer_bool,
        show-ans  .initial:n  = false,
        show-ans  .value_required:n = true,
        show-pos  .bool_set:N = \l_@@_show_position_bool,
        show-pos  .initial:n  = false,
        show-pos  .value_required:n = true,
        mark-ans  .tl_set:N  = \l_@@_mark_answer_sym_tl,
        mark-ans  .initial:n = \textasteriskcentered,
        mark-ans  .value_required:n = true,
        mark-sep  .dim_set:N  = \l_@@_mark_sym_sep_dim,
        mark-sep  .value_required:n = true,
        mark-pos  .choice:,
        mark-pos / left    .code:n = \str_set:Nn \l_@@_mark_position_str { l },
        mark-pos / right   .code:n = \str_set:Nn \l_@@_mark_position_str { r },
        mark-pos / center  .code:n = \str_set:Nn \l_@@_mark_position_str { c },
        mark-pos / unknown .code:n =
                           \msg_error:nneee { enumext } { unknown-choice }
                             { mark-pos } { left, ~ right, ~ center } { \exp_not:n {##1} },
        mark-pos  .initial:n = right,
        mark-pos  .value_required:n = true,

        wrap-ans  .cs_set_protected:Np = \@@_anskey_wrapper:n ##1,
        wrap-ans  .initial:n =
                    {
                      \fbox{\parbox[t]{\dimeval{\itemwidth -2\fboxsep -2\fboxrule}}{##1}}
                    },
        wrap-ans  .value_required:n = true,
        mark-ans* .code:n = {
                              \keys_set:nn { enumext / keyans  } { mark-ans* = {##1} }
                              \keys_set:nn { enumext / keyans* } { mark-ans* = {##1} }
                            },
        mark-ans* .value_required:n = true,
        mark-pos* .code:n = {
                              \keys_set:nn { enumext / keyans  } { mark-pos* = {##1} }
                              \keys_set:nn { enumext / keyans* } { mark-pos* = {##1} }
                            },
        mark-pos* .value_required:n = true,
        mark-sep* .code:n = {
                              \keys_set:nn { enumext / keyans  } { mark-sep* = {##1} }
                              \keys_set:nn { enumext / keyans* } { mark-sep* = {##1} }
                            },
        mark-sep* .value_required:n = true,
        wrap-ans* .code:n = {
                              \keys_set:nn { enumext / keyans  } { wrap-ans* = {##1} }
                              \keys_set:nn { enumext / keyans* } { wrap-ans* = {##1} }
                            },
        wrap-ans* .value_required:n = true,
        wrap-opt  .code:n = {
                              \keys_set:nn { enumext / keyans  } { wrap-opt = {##1} }
                              \keys_set:nn { enumext / keyans* } { wrap-opt = {##1} }
                            },
        wrap-opt  .value_required:n = true,
        save-sep  .code:n = {
                              \keys_set:nn { enumext / keyans  } { save-sep = {##1} }
                              \keys_set:nn { enumext / keyans* } { save-sep = {##1} }
                            },
        save-sep  .value_required:n = true,
      }
  }
\clist_map_inline:nn { level-1, enumext* } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Storing structure of the environments}
%
% The idea behind \emph{\enquote{storing structure}} in the \emph{sequence} is
% to have a copy of the \emph{structure of the environment} in which the key
% \mykey{save-ans} is being executed so we must capture the \emph{optional
% argument} passed to the levels of the environment in which it is
% executed and \emph{\enquote{storing}} this in the \emph{sequence}.
%
% \begin{macro}{\@@_store_active_keys:n, \@@_store_active_keys_vii:n,}
%   The functions \cs{@@_store_active_keys:n} and \cs{@@_store_active_keys_vii:n}
%   will be responsible for the \emph{\enquote{storing keys}} filtered
%   from the \emph{optional argument} of the environment in which the
%   key \mykey{save-ans} is executed and the levels within this for the \myenv*{enumext} and
%   \myenv*{enumext*} environments. We will execute this function only if
%   the variable \cs{l_@@_store_save_key_X_bool} is false, that is, the key
%   \mykey{store-key} is not active, establishing the variable
%   \cs{l_@@_store_save_key_X_tl} with the filtered \mymeta{keys}.
% \iffalse
%% Internal function for store optional arguments of the environments in seq.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_store_active_keys:n #1
  {
    \bool_if:cF { l_@@_store_save_key_ \@@_level: _bool }
      {
        \tl_clear:c { l_@@_save_key_ \@@_level: _tl }
        \tl_set:ce
          { l_@@_store_save_key_ \@@_level: _tl }
          { \@@_filter_save_key:n {#1} }
      }
  }
\cs_new_protected:Npn \@@_store_active_keys_vii:n #1
  {
    \bool_if:NF \l_@@_store_save_key_vii_bool
      {
        \tl_clear:N \l_@@_store_save_key_vii_tl
        \tl_set:Ne \l_@@_store_save_key_vii_tl { \@@_filter_save_key:n {#1} }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Setting \texttt{save-key} key}\label{key:save-key}
%
% Since this \emph{\enquote{storing structure}} in the \emph{sequence}
% established by the \mykey{save-ans} key when executing \ics*{anskey} or \myenv*{anskey*},
% we will not be able to modify it. The best thing here is to have a key
% that allows you to modify the \emph{optional argument} of the \emph{\enquote{storing structure}} in
% the \emph{sequence}.
%
% \begin{macro}[int]{save-key}
%   The values ​​set by this key passed in the \emph{optional argument} of the
%   \myenv*{enumext} and \myenv*{enumext*} environments will override the
%   values ​​of the \cs{l_@@_store_save_key_X_tl} variable set by the
%   functions \cs{@@_store_active_keys:n} and \cs{@@_store_active_keys_vii:n}.
%   Now define the key \mykey{save-key} for all levels of
%   \myenv*{enumext} and \myenv*{enumext*} environments.
% \iffalse
%% Add |save-key| key for |enumext| and |enumext*| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / enumext* }
      {
        save-key .code:n = \@@_parse_save_key_vii:n {##1},
        save-key .value_required:n = true,
      }
    \keys_define:nn { enumext / #1 }
      {
        save-key .code:n = \@@_parse_save_key:n {##1},
        save-key .value_required:n = true,
      }
  }
\clist_map_inline:nn { level-1, level-2, level-3, level-4 } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_parse_save_key:n, \@@_parse_save_key_vii:n,}
%   The functions \cs{@@_parse_save_key:n} and \cs{@@_parse_save_key_vii:n}
%   will be responsible for \emph{\enquote{storing keys}} in the variable
%   \myvarenv{l__@@_store_save_key_X_tl} for \myenv*{enumext} and \myenv*{enumext*}.
% \iffalse
%% Internal function for |save-key| key.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_parse_save_key:n #1
  {
    \bool_set_true:c { l_@@_store_save_key_ \@@_level: _bool }
    \tl_clear:c { l_@@_save_key_ \@@_level: _tl }
    \tl_set:ce
      { l_@@_store_save_key_ \@@_level: _tl }
      { \@@_filter_save_key:n {#1} }
  }
\cs_new_protected:Npn \@@_parse_save_key_vii:n #1
  {
    \bool_set_true:N \l_@@_store_save_key_vii_bool
    \tl_clear:N \l_@@_store_save_key_vii_tl
    \tl_set:Ne \l_@@_store_save_key_vii_tl { \@@_filter_save_key:n {#1} }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal functions to store optional arguments}
%
% \begin{macro}{\@@_filter_save_key:n, \@@_filter_save_key_key:n,
%               \@@_filter_save_key_pair:nn}
%   The function \cs{@@_filter_save_key:n} will be in charge of
%   \emph{\enquote{filtering keys}} we want to \emph{stored} in
%   \emph{sequence} where |{#1}| represents the \emph{optional argument}
%   passed to the environment.
% \iffalse
%% Internal function for "filter keys" for |save-key| key.
% \fi
%    \begin{macrocode}
\cs_new:Npn \@@_filter_save_key:n #1
  {
    \use:e
      {
        \keyval_parse:NNn
          \@@_filter_save_key_key:n
          \@@_filter_save_key_pair:nn {#1}
      }
  }
%    \end{macrocode}
%   The function \cs{@@_filter_save_key_key:n} will be responsible for
%   \emph{\enquote{filtering keys}} that are passed \emph{\enquote{without value}} by
%   excluding the \mykey{resume}, \mykey{resume*}, \mykey{no-store} and \mykey{base-fix} keys.
%    \begin{macrocode}
\cs_new:Npn \@@_filter_save_key_key:n #1
  {
    \str_case:nnF {#1}
      {
        { resume } {} { resume* } {} { no-store } {} { base-fix } {}
      }
      { , { \exp_not:n {#1} } }
  }
%    \end{macrocode}
%   The function \cs{@@_filter_save_key_pair:nn} will be responsible for
%   \emph{\enquote{filtering keys}} that are passed \emph{\enquote{with value}} by
%   excluding the \mykey{series}, \mykey{resume}, \mykey{save-ans}, \mykey{save-ref},
%   \mykey{save-key}, \mykey{check-ans}, \mykey{show-ans}, \mykey{save-pos},
%   \mykey{mark-ans}, \mykey{mark-pos}, \mykey{mark-sep}, \mykey{wrap-ans},
%   \mykey{mark-ans*}, \mykey{mark-pos*}, \mykey{mark-sep*}, \mykey{wrap-ans*},
%   \mykey{wrap-opt}, \mykey{save-sep}, \mykey{mark-ref}, \mykey{mini-env},
%   \mykey{mini-sep}, \mykey{mini-right} and \mykey{mini-right*} keys.
%    \begin{macrocode}
\cs_new:Npn \@@_filter_save_key_pair:nn #1#2
  {
    \str_case:nnF {#1}
      {
        { series    } {} { resume     } {} { save-ans    } {} { save-ref  } {}
        { save-key  } {} { check-ans  } {} { show-ans    } {} { show-pos  } {}
        { mark-ans  } {} { mark-pos   } {} { mark-sep    } {} { wrap-ans  } {}
        { mark-ans* } {} { mark-pos*  } {} { mark-sep*   } {} { wrap-ans* } {}
        { wrap-opt  } {} { save-sep   } {} { mark-ref    } {} { mini-env  } {}
        { mini-sep  } {} { mini-right } {} { mini-right* } {}
      }
      { , { \exp_not:n {#1} } = { \exp_not:n {#2} } }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Function for storing content in prop list}
%
% \begin{macro}{\@@_store_addto_prop:n, \@@_store_addto_prop:V}
%   The function \cs{@@_store_addto_prop:n} stores the \mymarg{content} in
%   \emph{prop list} defined by \mykey{save-ans} key. The \emph{\enquote{stored
%   content}} is retrieved by means of the \ics*{getkeyans} command.
%
%    \smallskip
%
%   The form in which the \mymarg{content} is \emph{\enquote{stored}} in the
%   \emph{prop list} is \mymarg{position}\mymarg{content}. This
%   function is used by \ics*{anskey} in \myenv*{enumext} and \myenv*{enumext*}
%   environments, \ics*{item*} in \myenv*{keyans} and \myenv*{keyans*}
%   environments and \ics*{anspic*} in \myenv*{keyanspic} environment.
% \iffalse
%% Function for store content to prop list.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_store_addto_prop:n #1
  {
    \prop_gput_if_not_in:cen { g_@@_ \l_@@_store_name_tl _prop }
      {
        \int_eval:n { \prop_count:c { g_@@_ \l_@@_store_name_tl _prop } + 1 }
      }
      { #1 }
  }
\cs_generate_variant:Nn \@@_store_addto_prop:n { V }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Function for storing content in sequence}
%
% \begin{macro}{\@@_store_addto_seq:n, \@@_store_addto_seq:v, \@@_store_addto_seq:V}
%   The function \cs{@@_store_addto_seq:n} stores the \mymarg{content} in
%   \emph{sequence} defined by \mykey{save-ans} key. This function
%   is used by \ics*{anskey} in \myenv*{enumext}, \ics*{item*} in
%   \myenv*{keyans} and \ics*{anspic} in \myenv*{keyanspic}.
%
%    \smallskip
%
%   The form in which the \mymarg{content} is stored in \emph{sequence} is in
%   a internal \myenv*{enumext} or \myenv*{enumext*} environments with
%   the \emph{\enquote{same structure}} in which the command was executed.
%
%   The \emph{\enquote{stored content}} is retrieved by means of the
%   \ics*{printkeyans} command.
% \iffalse
%% Function for store content to sequence.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_store_addto_seq:n #1
  {
    \seq_gput_right:cn { g_@@_ \l_@@_store_name_tl _seq } { #1 }
  }
\cs_generate_variant:Nn \@@_store_addto_seq:n { v, V }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for storing structure in the sequence}
%
% \begin{macro}{\@@_store_level_open:, \@@_store_level_close:,}
%   The \emph{\enquote{storing structure}} is handled by the functions
%   \cs{@@_store_level_open:} and \cs{@@_store_level_close:} which are
%   executed per level within the \myenv*{enumext} environment.
% \iffalse
%% Function for storing structure level execution of |\anskey| on |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_store_level_open:
  {
    \bool_if:NT \l_@@_check_answers_bool
      {
        \tl_if_empty:cTF { l_@@_store_save_key_ \@@_level: _tl }
          {
            \@@_store_addto_seq:n
              {
                \item \begin{enumext}
              }
          }
          {
            \tl_put_left:cn { l_@@_store_save_key_ \@@_level: _tl }
              {
                \item \begin{enumext} [
              }
            \tl_put_right:cn { l_@@_store_save_key_ \@@_level: _tl }
              {
                ]
              }
            \@@_store_addto_seq:v { l_@@_store_save_key_ \@@_level: _tl }
          }
      }
  }
\cs_new_protected:Nn \@@_store_level_close:
  {
    \bool_if:NT \l_@@_check_answers_bool
      {
        \@@_store_addto_seq:n { \end{enumext} }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_store_level_open_vii:, \@@_store_level_close_vii:,}
%   The \emph{\enquote{storing structure}} is handled by the functions
%   \cs{@@_store_level_open_vii:} and \cs{@@_store_level_close_vii:}
%   which are executed in the \myenv*{enumext*} environment.
%
% \iffalse
%% Function storing structure level execution of |\anskey| and |anskey*| on |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_store_level_open_vii:
  {
    \bool_if:NT \l_@@_check_answers_bool
      {
        \tl_if_empty:NTF \l_@@_store_save_key_vii_tl
          {
            \@@_store_addto_seq:n
              {
                \item \begin{enumext*}
              }
          }
          {
            \tl_put_left:Nn \l_@@_store_save_key_vii_tl
              {
                \item \begin{enumext*}[
              }
            \tl_put_right:Nn \l_@@_store_save_key_vii_tl
              {
                ]
              }
            \@@_store_addto_seq:V \l_@@_store_save_key_vii_tl
          }
      }
  }
\cs_new_protected:Nn \@@_store_level_close_vii:
  {
    \bool_if:NT \l_@@_check_answers_bool
      {
        \@@_store_addto_seq:n { \end{enumext*} }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Function for show marks and position}
%
% \begin{macro}{\@@_print_keyans_box:NN, \@@_print_keyans_box:cc }
%   The function \cs{@@_print_keyans_box:NN} print a box in the left
%   margin with \cs{l_@@_mark_answer_sym_tl} used by the \mykey{wrap-ans},
%   \mykey{show-ans} and \mykey{show-pos} keys. The function takes two
%   arguments:
%
%   \smallskip
%
% \begin{arguments}
%   \item \myvarenv{l__@@_labelwidth_X_dim}
%   \item \myvarenv{l__@@_labelsep_X_dim}
% \end{arguments}
%
% \iffalse
%% Function for put content in box on left margin.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_print_keyans_box:NN
  {
    \mode_leave_vertical:
    \skip_horizontal:n { -\dim_use:N #2 }
    \hbox_overlap_left:n
      {
        \makebox[ \dim_use:N #1 ][ \l_@@_mark_position_str ]
          {
            \tl_use:N \l_@@_mark_answer_sym_tl
          }
      }
    \skip_horizontal:n { \dim_use:N #2 }
  }
\cs_generate_variant:Nn \@@_print_keyans_box:NN { cc }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The internal label and ref}\label{fun:internal-label-ref}
%
% The function \cs{@@_store_internal_ref:} handles the
% \emph{\enquote{internal label and ref}} system used by the \mykey{save-ref}
% and \mykey{mark-ref} keys for \ics*{anskey} will allow to execute
% \ics{ref}\mymarg{store name \textnormal{\textcolor{red}{:}} position} and
% will return |1||.(a)||.i||.A|.
%
% \begin{macro}{\@@_store_internal_ref:}
%   First we will remove the dots \enquote{\textcolor{red}{.}} from
%   the current \mymeta{labels}, we do not want to get double dots in
%   our references, then we will place this in the variable
%   \cs{l_@@_newlabel_arg_two_tl}.
% \iffalse
%% Internal label and ref function for |\anskey| and |anskey*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_store_internal_ref:
  {
    \cs_set_protected:Npn \@@_tmp:n ##1
      {
        \tl_set_eq:cc { l_@@_label_copy_##1_tl } { l_@@_label_##1_tl }
        \tl_reverse:c { l_@@_label_copy_##1_tl }
        \tl_remove_once:cn { l_@@_label_copy_##1_tl } { . }
        \tl_reverse:c { l_@@_label_copy_##1_tl }
      }
    \clist_map_inline:nn { i, ii, iii, iv, vii } { \@@_tmp:n {##1} }
    \cs_set:Npn \@@_tmp:n ##1
      { . \tl_use:c { l_@@_label_copy_ \int_to_roman:n {##1} _tl } }
%    \end{macrocode}
%   Here we need to analyse the cases where the environment is started with
%   \myenv*{enumext*} and if \ics*{anskey} or \myenv*{anskey*} is running
%   alone in it or if it is running in a nested \myenv*{enumext} environment
%   within the starting environment.
%    \begin{macrocode}
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \g_@@_starred_bool }
        { \int_compare_p:nNn { \l_@@_level_int } = { 0 } }
      }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          { \tl_use:N \l_@@_label_copy_vii_tl }
      }
    \bool_lazy_all:nT
      {
        { \bool_not_p:n { \g_@@_standar_bool } }
        { \bool_if_p:N \l_@@_standar_bool }
        { \int_compare_p:nNn { \l_@@_level_int } > { 0 } }
      }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          {
            \tl_use:N \l_@@_label_copy_vii_tl
            \int_step_function:nnN { 1 } { \l_@@_level_int } \@@_tmp:n
          }
      }
%    \end{macrocode}
%   If started with \myenv*{enumext} and if \ics*{anskey} or \myenv*{anskey*}
%   is running alone in it or if it is running in a nested \myenv*{enumext*}
%   environment within the starting environment.
%    \begin{macrocode}
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \g_@@_standar_bool }
        { \int_compare_p:nNn { \l_@@_level_int } > { 0 } }
        { \int_compare_p:nNn { \l_@@_level_h_int } = { 0 } }
      }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          {
            \tl_use:N \l_@@_label_copy_i_tl
            \int_step_function:nnN { 2 } { \l_@@_level_int } \@@_tmp:n
          }
      }
    \cs_set:Npn \@@_tmp:n ##1
      { \tl_use:c { l_@@_label_copy_ \int_to_roman:n {##1} _tl } . }
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \g_@@_standar_bool }
        { \bool_if_p:N \l_@@_starred_bool }
        { \int_compare_p:nNn { \l_@@_level_int } > { 0 } }
      }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          {
            \int_step_function:nnN { 1 } { \l_@@_level_int } \@@_tmp:n
            \tl_use:N \l_@@_label_copy_vii_tl
          }
      }
%    \end{macrocode}
%   Now we set the variable \cs{l_@@_newlabel_arg_one_tl} which will
%   contain \mymarg{store name \textnormal{\textcolor{red}{:}} position}.
%    \begin{macrocode}
    \tl_put_right:Ne \l_@@_newlabel_arg_one_tl
      {
        \l_@@_store_name_tl \c_colon_str
        \int_eval:n { \prop_count:c { g_@@_ \l_@@_store_name_tl _prop } }
      }
%    \end{macrocode}
%   Now execute the function \cs{@@_newlabel:nn} and save the result in
%   the variable \cs{l_@@_write_aux_file_tl} and finally we write in the
%   |.aux| file.
%    \begin{macrocode}
    \tl_put_right:Ne \l_@@_write_aux_file_tl
      {
        \@@_newlabel:nn
          { \exp_not:V \l_@@_newlabel_arg_one_tl }
          { \l_@@_newlabel_arg_two_tl }
      }
    \l_@@_write_aux_file_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Common functions for \cs{anskey} and \texttt{anskey*} environment}
%
% \begin{macro}{\@@_store_anskey_code:n}
%   The internal function \cs{@@_store_anskey_code:n} first we pass the
%   \mymarg{argument} to the \emph{prop list}, then checks the
%   state of the variable \cs{l_@@_store_ref_key_bool} handled by the
%   \mykey{save-ref} key and will call the function \cs{@@_store_internal_ref:}
%   for the \emph{\enquote{internal label and ref}} system. Followed by
%   this if the \mykey{show-ans} or \mykey{show-pos} keys are active we
%   will show the \emph{\enquote{wrapped}} \mymarg{argument}.
% \iffalse
%% Internal function of |\anskey| for store content.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_store_anskey_code:n #1
  {
    \int_gincr:N \g_@@_item_anskey_int
    \@@_store_addto_prop:n {#1}
    \bool_if:NT \l_@@_store_ref_key_bool
      {
        \@@_store_internal_ref:
      }
    \@@_anskey_show_wrap_left:n { #1 }
%    \end{macrocode}
%   Now we start processing the \myoarg{key \textnormal{\textcolor{gray}{=}} val}
%   passed to the command to build our |\item| in the variable \cs{l_@@_store_anskey_arg_tl}
%   which we will \emph{\enquote{store}} in the \emph{sequence}.
%   First we clear the variable \cs{l_@@_store_anskey_arg_tl} and process
%   the \mymeta{keys}, if the \mykeycmd{break-col} key is present and
%   the command is running under \myenv*{enumext} (not in \myenv*{enumext*})
%   we will add \ics{columnbreak} and then |\item|.
%    \begin{macrocode}
    \tl_clear:N \l_@@_store_anskey_arg_tl
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_store_columns_break_bool }
      { \bool_not_p:n { \l_@@_starred_bool } }
      {
        \tl_put_left:Nn \l_@@_store_anskey_arg_tl { \columnbreak }
      }
    \tl_put_right:Nn \l_@@_store_anskey_arg_tl { \item }
%    \end{macrocode}
%   If the \mykeycmd{item-join} key is present and the command is running under
%   \myenv*{enumext*} we will add \myparg{number} to \cs{l_@@_store_anskey_arg_tl}.
%    \begin{macrocode}
    \bool_lazy_and:nnT
      { \bool_not_p:n { \l_@@_starred_bool } }
      { \int_compare_p:nNn { \l_@@_store_item_join_int } > { 1 } }
      {
        \tl_put_right:Ne \l_@@_store_anskey_arg_tl
          {
            ( \exp_not:V \l_@@_store_item_join_int )
          }
       }
%    \end{macrocode}
%   And now we will review the keys \mykeycmd{item-star}, \mykeycmd{item-sym*} and
%   \mykeycmd{item-pos*} and pass them to \cs{l_@@_store_anskey_arg_tl}
%   along with the \mymarg{argument} for |\anskey| or \mymeta{body} for |anskey*|.
%    \begin{macrocode}
    \bool_if:NTF \l_@@_store_item_star_bool
      {
        \tl_put_right:Nn \l_@@_store_anskey_arg_tl { * }
        \tl_if_empty:NF \l_@@_store_item_symbol_tl
          {
            \tl_put_right:Ne \l_@@_store_anskey_arg_tl
              {
                [ \exp_not:V \l_@@_store_item_symbol_tl ]
              }
          }
        \dim_compare:nT
          {
            \l_@@_store_item_symbol_sep_dim != \c_zero_dim
          }
          {
            \tl_put_right:Ne \l_@@_store_anskey_arg_tl
              {
                [ \exp_not:V \l_@@_store_item_symbol_sep_dim ]
              }
          }
        \tl_put_right:Nn \l_@@_store_anskey_arg_tl {#1}
      }
      {
        \tl_put_right:Nn \l_@@_store_anskey_arg_tl {#1}
      }
%    \end{macrocode}
%   Finally we check if the \mykey{save-ref} key are active along with the
%   \mypkg{hyperref} package load, if both conditions are met, it will
%   create the \ics{hyperlink} with \emph{\enquote{symbol}} set by \mykey{mark-ref}
%   key and then store in \emph{sequence}.
%    \begin{macrocode}
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_store_ref_key_bool }
      { \bool_if_p:N \l_@@_hyperref_bool }
      {
        \tl_put_right:Ne \l_@@_store_anskey_arg_tl
          {
            \hfill \exp_not:N \hyperlink { \exp_not:V \l_@@_newlabel_arg_one_tl }
                 { \exp_not:V \l_@@_mark_ref_sym_tl }
          }
      }
    \@@_store_addto_seq:V \l_@@_store_anskey_arg_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_anskey_show_wrap_arg:n,}
%   The function \cs{@@_anskey_show_wrap_arg:n} \emph{\enquote{wraps}}
%   the \mymarg{argument} passed to \ics*{anskey} and the \mymeta{body}
%   for \myenv*{anskey*} when using the \mykey{wrap-ans} and \mykey{wrap-sep} keys.
% \iffalse
%% Internal |wrap-ans| implementation for |\anskey| and |anskey*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anskey_show_wrap_arg:n #1
  {
    \par
    \bool_if:NTF \l_@@_starred_bool
      {
        \dim_compare:nNnT { \l_@@_mark_sym_sep_dim } = { \c_zero_dim }
          {
             \dim_set:Nn \l_@@_mark_sym_sep_dim { \l_@@_labelsep_vii_dim }
          }
        \@@_print_keyans_box:NN
          \l_@@_labelwidth_vii_dim \l_@@_mark_sym_sep_dim
      }
      {
        \dim_compare:nNnT { \l_@@_mark_sym_sep_dim } = { \c_zero_dim }
          {
            \dim_set:Nn \l_@@_mark_sym_sep_dim
              {
                \dim_use:c {l_@@_labelsep_ \@@_level: _dim }
              }
          }
        \@@_print_keyans_box:cc
          { l_@@_labelwidth_ \@@_level: _dim } { l_@@_mark_sym_sep_dim }
      }
    \@@_anskey_wrapper:n { #1 }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{ \@@_anskey_show_wrap_left:n }
%   The function \cs{@@_anskey_show_wrap_left:n} will show the
%   \emph{\enquote{mark}} defined by the \mykey{mark-ans} key or the
%   \emph{\enquote{position}} of the \mymarg{content} stored in the \emph{prop list}
%   when using the \mykey{show-pos} key on the left margin next to the
%   \emph{\enquote{wraps}} \mymarg{argument} passed to \ics*{anskey} and
%   the \mymeta{body} in \myenv*{anskey*} on the right side when using
%   the \mykey{show-ans} key.
% \iffalse
%% Internal |show-ans| and |show-pos| implementation for |\anskey| and |anskey*|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anskey_show_wrap_left:n #1
  {
    \bool_if:NT \l_@@_show_answer_bool
      {
        \@@_anskey_show_wrap_arg:n { #1 }
      }
    \bool_if:NT \l_@@_show_position_bool
      {
        \tl_set:Ne \l_@@_mark_answer_sym_tl
          {
            \group_begin:
            \exp_not:N \normalfont
            \exp_not:N \footnotesize [ \int_eval:n
              {
                \prop_count:c { g_@@_ \l_@@_store_name_tl _prop }
              }
              ]
            \group_end:
          }
        \@@_anskey_show_wrap_arg:n { #1 }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The command \cs{anskey}}\label{cmd:anskey}
%
% Since we will be \emph{\enquote{storing content}} in a \myenv{list} environment
% within \emph{sequences} and can (more or less) manage the options
% passed to each level, it is necessary that we have a little more
% control over |\item| when storing.
%
% \smallskip
%
% The \ics*{anskey} command will cover this point and give it similar
% behaviour to that of |\item| in the \myenv*{enumext} and \myenv*{enumext*}
% environments executed as follows \ics*{anskey}\myoarg{key \textnormal{\textcolor{gray}{=}} val}\mymarg{content}.
%
% \begin{macro}[int]{break-col, item-join, item-star, item-sym*, item-pos*,
%                    unknown, \@@_anskey_unknown:n, \@@_anskey_unknown:nn}
%   First we'll add the keys \mykeycmd{break-col}, \mykeycmd{item-join},
%   \mykeycmd{item-star}, \mykeycmd{item-sym*} and \mykeycmd{item-pos*}.
% \iffalse
%% Add |key=val| for |\anskey|.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext / anskey }
  {
    break-col .bool_set:N = \l_@@_store_columns_break_bool,
    break-col .default:n  = true,
    break-col .value_forbidden:n = true,
    item-join .int_set:N  = \l_@@_store_item_join_int,
    item-join .value_required:n = true,
    item-star .bool_set:N = \l_@@_store_item_star_bool,
    item-star .default:n  = true,
    item-star .value_forbidden:n = true,
    item-sym* .tl_set:N   = \l_@@_store_item_symbol_tl,
    item-sym* .value_required:n = true,
    item-pos* .dim_set:N  = \l_@@_store_item_symbol_sep_dim,
    item-pos* .value_required:n = true,
    unknown   .code:n     = { \@@_anskey_unknown:n {#1} },
  }
%    \end{macrocode}
%   The \mymeta{keys} are stored in \cs{l_keys_key_str} and the value
%   (if any) is passed as an argument to the function \cs{@@_anskey_unknown:n}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anskey_unknown:n #1
  {
    \exp_args:NV \@@_anskey_unknown:nn \l_keys_key_str {#1}
  }
\cs_new_protected:Npn \@@_anskey_unknown:nn #1 #2
  {
    \tl_if_blank:nTF {#2}
      {
        \msg_error:nnn { enumext } { anskey-cmd-key-unknown } {#1}
      }
      {
        \msg_error:nnnn { enumext } { anskey-cmd-key-value-unknown } {#1} {#2}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{important}*
%   The \ics*{anskey} command will only be present when using the
%   \mykey{save-ans} key in \myenv*{enumext} and \myenv*{enumext*}
%   environments, otherwise it will return an error.
% \end{important}
%
% \begin{macro}{\anskey}
%   We will first call the function \cs{@@_anskey_safe_outer:} to be
%   sure where we execute the command, then we will check the state of the
%   variable \cs{l_@@_check_answers_bool} set by the key \mykey{no-store},
%   if is true we will increment \cs{g_@@_item_anskey_int} for the internal
%   \emph{\enquote{check answer}} system and execute the function
%   \cs{@@_anskey_safe_inner:n} to ensure that the command is not
%   nested and that the argument is not empty, finally search the
%   \myoarg{key \textnormal{\textcolor{gray}{=}} val} and call the
%   function \cs{@@_store_anskey_code:n}.
% \iffalse
%% Define the user command |\anskey|.
% \fi
%    \begin{macrocode}
\NewDocumentCommand \anskey { o +m }
  {
    \@@_anskey_safe_outer:
    \group_begin:
      \bool_if:NT \l_@@_check_answers_bool
        {
          \tl_if_novalue:nF {#1}
            {
              \keys_set:nn { enumext / anskey } {#1}
            }
          \tl_if_blank:nTF {#2}
            {
              \msg_error:nn { enumext } { anskey-empty-arg }
            }
            {
              \@@_anskey_safe_inner:
              \@@_store_anskey_code:n {#2}
            }
        }
    \group_end:
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Internal functions for the command}
%
% \begin{macro}{\@@_anskey_safe_outer:, \@@_anskey_safe_inner:}
%   The \cs{@@_store_anskey_safe_outer:} function will return the
%   appropriate messages when the command is executed outside the
%   environment in which the \mykey{save-ans} key was activated.
% \iffalse
%% Internal function for msg when |\anskey| is outer.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_safe_outer:
  {
    \bool_if:NF \l_@@_store_active_bool
      {
        \msg_error:nnnn { enumext } { anskey-wrong-place }{ anskey }{ enumext }
      }
    \int_compare:nNnT { \l_@@_keyans_level_int } = { 1 }
      {
        \msg_error:nnnn { enumext } { command-wrong-place }{ anskey }{ keyans }
      }
    \int_compare:nNnT { \l_@@_keyans_level_h_int } = { 1 }
      {
        \msg_error:nnnn { enumext } { command-wrong-place }{ anskey }{ keyans* }
      }
    \int_compare:nNnT { \l_@@_keyans_pic_level_int } = { 1 }
      {
        \msg_error:nnnn { enumext } { command-wrong-place }{ anskey }{ keyanspic }
      }
  }
%    \end{macrocode}
%   The \cs{@@_anskey_safe_inner:} function will first check if the
%   command is nested, if preceded by a not numbered |\item| or if it is
%   in \emph{math mode} returning the appropriate messages.
% \iffalse
%% Internal function for msg when |\anskey| is inner, math-mode or arg is empty.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_safe_inner:
  {
    \int_incr:N \l_@@_anskey_level_int
    \int_compare:nNnT { \l_@@_anskey_level_int } > { 1 }
      {
        \msg_error:nn { enumext } { anskey-nested }
      }
    \bool_if:NF \l_@@_item_number_bool
      {
        \msg_error:nn { enumext } { anskey-unnumber-item }
      }
    \mode_if_math:T
      {
        \msg_error:nne { enumext } { anskey-math-mode } { \c_backslash_str anskey }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The environment \env{anskey*}}\label{env:anskey}
%
% Managing \emph{verbatim content} in an environment is quite complicated, I
% learned that when creating the \mypkg{scontents} package, so to be able
% to have support at this point it is best to play a little with the
% internal code of \mypkg{scontents} and \emph{hooks}.
% Some considerations I should have here before implementing this:
%
% \begin{itemize}[left=10pt,nosep, topsep=2pt]
% \item If some package, class or user has defined the environment with the
%  same name somewhere in the document it would be a problem, you would
%  not know what argument has been passed to |store-env|, if you are using
%  the key |print-env| or the |write-out| key, sure, I can detect and
%  modify it within the \myenv*{enumext} and \myenv*{enumext*}
%  environments, but it would look strange not to have some keys available
%  when running within these environments.
%
% \item A better (perhaps a bit paranoid) option is to define it within the
%  environment in which the |save-ans| key is executed. and have it
%  available only when that key is executed, here I would have absolute
%  control of the \mymeta{keys} and I make sure that |write-out| is not used, then
%  using \emph{hooks after} I undefine it and using \emph{hook before} I check if it has
%  been created by any package, class or user and I return a error,
%  then the user will have to see how to solve the problem.
% \end{itemize}
%
% \begin{macro}[int]{\@@_undefine_anskey_env:,}
%   The function \cs{@@_undefine_anskey_env:} will undefine the environment
%   \myenv*{anskey*} and will be passed to the function
%   \cs{@@_execute_after_env:} (\S\ref{fun:exec-after-env}) which is
%   executed after the environment in which the key \mykey{save-ans} is active.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_undefine_anskey_env:
  {
    \cs_undefine:c { anskey* }
    \cs_undefine:c { endanskey* }
    \cs_undefine:c { __scontents_anskey*_env_begin: }
    \cs_undefine:c { __scontents_anskey*_env_end: }
  }
%    \end{macrocode}
%   Detection of the \myenv*{anskey*} environment outside the
%   \myenv*{enumext} and \myenv*{enumext*} environments.
% \iffalse
%% Hooks for |anskey*| environment out off |enumext| and |enumext*| environments.
% \fi
%    \begin{macrocode}
\@@_before_env:nn { enumext }
  {
    \bool_lazy_and:nnT
      { \int_compare_p:nNn { \l_@@_level_int } = { 0 } }
      { \int_compare_p:nNn { \l_@@_level_h_int } = { 0 } }
      {
        \cs_if_free:cF { __scontents_anskey*_env_begin: }
          {
            \msg_error:nnn { enumext } { anskey-env-error } { anskey* }
          }
      }
  }
\@@_before_env:nn { enumext* }
  {
    \bool_lazy_and:nnT
      { \int_compare_p:nNn { \l_@@_level_int } = { 0 } }
      { \int_compare_p:nNn { \l_@@_level_h_int } = { 0 } }
      {
        \cs_if_free:cF { __scontents_anskey*_env_begin: }
          {
            \msg_error:nnn { enumext } { anskey-env-error } { anskey* }
          }
      }
  }
%    \end{macrocode}
%   Detection of the \myenv*{anskey*} environment inside the \myenv*{keyans},
%   \myenv*{keyans*} and \myenv*{keyanspic} environments, if preceded by
%   a not numbered |\item| or if it is in \emph{math mode} returning
%   the appropriate messages.
% \iffalse
%% Hooks for |anskey*| inside the |keyans|, |keyans*| and |keyanspic| environments, math-mode and not number |\item|.
% \fi
%    \begin{macrocode}
\@@_before_env:nn { anskey* }
  {
    \int_compare:nNnT { \l_@@_keyans_level_int } = { 1 }
      {
        \msg_error:nnn { enumext } { anskey-env-wrong }{ keyans }
      }
    \int_compare:nNnT { \l_@@_keyans_level_h_int } = { 1 }
      {
        \msg_error:nnn { enumext } { anskey-env-wrong } { keyans* }
      }
    \int_compare:nNnT { \l_@@_keyans_pic_level_int } = { 1 }
      {
        \msg_error:nnn { enumext } { anskey-env-wrong } { keyanspic }
      }
    \bool_if:NF \l_@@_item_number_bool
      {
        \msg_error:nn { enumext } { anskey-unnumber-item }
      }
    \mode_if_math:T
      {
        \msg_error:nnn { enumext } { anskey-math-mode } { anskey* }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{anskey*, \@@_anskey_env_make:n, \@@_anskey_env_make:V,
%              \@@_anskey_env_define_keys:, \@@_anskey_env_unknown:n,
%              \@@_anskey_env_unknown:nn, \@@_anskey_env_reset_keys:,
%              \@@_rescan_anskey_env:n,}
%   The function \cs{@@_anskey_env_make:n} creates the environment
%   \myenv*{anskey*} (\emph{custom version} of \myenv{scontents}
%   environment) by setting the initial keys |store-env=|\mymarg{store name}
%   and |print-env=false|.
%
%   To maintain the \emph{scope} of the environment and that it is only active
%   when the key \mykey{save-ans} is active we will pass this function to
%   the function \cs{@@_storing_exec:} (\S\ref{key:save-ans}) and we
%   will execute it only if the variable \cs{l_@@_anskey_env_bool} is true,
%   with this we prevent it from being executed again when the environment
%   is nested and the key \mykey{save-ans} is active, which returns an
%   error for part of the package \mypkg{scontents}.
% \iffalse
%% Function for define |anskey*| environment using scontents.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anskey_env_make:n #1
  {
    \bool_if:NT \l_@@_anskey_env_bool
      {
        \newenvsc{anskey*}[store-env=#1,print-env=false]
        \@@_anskey_env_exec:
      }
  }
\cs_generate_variant:Nn \@@_anskey_env_make:n { V }
%    \end{macrocode}
%   The function \cs{@@_anskey_env_define_keys:} will add the keys
%   \mykeycmd{break-col}, \mykeycmd{item-join}, \mykeycmd{item-join},
%   \mykeycmd{item-star}, \mykeycmd{item-sym*} and \mykeycmd{item-pos*}
%   and will leave the keys |print-env|, |store-env| and |write-out|
%   undefined. We will apply this function using the \emph{hook} function
%   \cs{@@_before_env:nn}.
% \iffalse
%% Define keys for |anskey*| environment using scontents PATH.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_env_define_keys:
  {
    \keys_define:nn { scontents / scontents }
      {
        break-col .bool_gset:N = \g_@@_store_columns_break_bool,
        break-col .default:n   = true,
        break-col .value_forbidden:n = true,
        item-join .int_gset:N  = \g_@@_store_item_join_int,
        item-join .value_required:n = true,
        item-star .bool_gset:N = \g_@@_store_item_star_bool,
        item-star .default:n   = true,
        item-star .value_forbidden:n = true,
        item-sym* .tl_gset:N   = \g_@@_store_item_symbol_tl,
        item-sym* .value_required:n = true,
        item-pos* .dim_gset:N  = \g_@@_store_item_symbol_sep_dim,
        item-pos* .value_required:n = true,
        print-env .undefine:,
        store-env .undefine:,
        write-out .undefine:,
        unknown   .code:n      = { \@@_anskey_env_unknown:n {##1} },
      }
  }
%    \end{macrocode}
%   The \mymeta{keys} are stored in \cs{l_keys_key_str} and the value
%   (if any) is passed as an argument to the function \cs{@@_anskey_env_unknown:n}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anskey_env_unknown:n #1
  {
    \exp_args:NV \@@_anskey_env_unknown:nn \l_keys_key_str {#1}
  }
\cs_new_protected:Npn \@@_anskey_env_unknown:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      {
        \msg_error:nnn { enumext } { anskey-env-key-unknown } {#1}
      }
      {
        \msg_error:nnnn { enumext } { anskey-env-key-value-unknown } {#1} {#2}
      }
  }
%    \end{macrocode}
%   The function \cs{@@_anskey_env_reset_keys:} will leave the keys
%   \mykeycmd{break-col}, \mykeycmd{item-join}, \mykeycmd{item-join},
%   \mykeycmd{item-star}, \mykeycmd{item-sym*} and \mykeycmd{item-pos*}
%   undefined. We will apply this function using the \emph{hook} function
%   \cs{@@_after_env:nn}.
% \iffalse
%% Restore keys for |scontents| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_env_reset_keys:
  {
    \keys_define:nn { scontents / scontents }
      {
        break-col .undefine:,
        item-join .undefine:,
        item-star .undefine:,
        item-sym* .undefine:,
        item-pos* .undefine:,
        write-out .code:n    = {
                                 \bool_set_false:N \l__scontents_storing_bool
                                 \bool_set_true:N  \l__scontents_writing_bool
                                 \tl_set:Nn \l__scontents_fname_out_tl {##1}
                               },
        write-out .value_required:n = true,
        print-env .meta:nn   = { scontents } { print-env = ##1 },
        print-env .default:n = true,
        store-env .meta:nn   = { scontents } { store-env = ##1 },
        unknown   .code:n    = { \__scontents_parse_environment_keys:n {##1} },
      }
  }
%    \end{macrocode}
%   The function \cs{@@_rescan_anskey_env:n} will be responsible for
%   bringing the \mymeta{body} of the environment saved in the sequence
%   \myvarenv{g__scontents_name_\mymeta[cf=gray]{store name}_seq} to
%   pass it to our \emph{sequence} and \emph{prop list}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_rescan_anskey_env:n #1
  {
    \group_begin:
      \int_set:Nn \tex_newlinechar:D { `\^^J }
      \__scontents_rescan_tokens:x
        {
          \endgroup % This assumes \catcode`\\=0... Things might go off otherwise.
         #1
        }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_anskey_env_exec:,}
%   The function \cs{@@_anskey_env_exec:} will be responsible for
%   processing all the code necessary for the execution of the environment.
%   The first thing will be to add our \mymeta{keys}.
% \iffalse
%% Function for exec all code for |anskey*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_env_exec:
  {
    \@@_before_env:nn { anskey* }
      {
        \@@_anskey_env_define_keys:
      }
%    \end{macrocode}
%   Now we will execute our actions after the \myenv*{anskey*}
%   environment is closed. We'll fetch the contents of the
%   \emph{environment body} that is now saved in
%   \myvarenv{g__scontents_name_\mymeta[cf=gray]{store name}_seq} and store it in
%   the variable \cs{l_@@_store_anskey_env_tl} then we execute the rest of the functions.
%    \begin{macrocode}
    \hook_if_empty:nF {env/anskey*/after}
      {
        \hook_gremove_code:nn {env/anskey*/after} { * }
      }
    \@@_after_env:nn { anskey* }
      {
        \@@_anskey_env_save_keys:
        \tl_clear:N \l_@@_store_anskey_env_tl
        \tl_clear:N \l_@@_store_anskey_opt_tl
        \bool_if:NT \l_@@_check_answers_bool
          {
            \tl_gset:Ne \l_@@_store_anskey_env_tl
              {
                \seq_item:ce { g__scontents_name_ \l_@@_store_name_tl _seq } { -1 }
              }
            \regex_match:nVTF
              { ^\s* \z | ^\s* \u{c__scontents_hidden_space_str} \z }
              \l_@@_store_anskey_env_tl
              {
                \msg_error:nn { enumext } { anskey-empty-arg }
              }
              {
                \@@_anskey_env_store:
              }
          }
        \@@_anskey_env_clean_vars:
        \@@_anskey_env_reset_keys:
      }
  }
%    \end{macrocode}
% \begin{important}*
%  The use of \cs{hook_gremove_code:nn} is necessary here, otherwise the
%  \mymarg{code} passed to \cs{@@_after_env:nn}|{anskey*}| will be accumulated
%  for each execution.
%  The last function \cs{@@_anskey_env_reset_keys:} is necessary so as
%  not to hinder any \myenv{scontents} environment running within
%  \myenv*{enumext} or \myenv*{enumext*}.
% \end{important}
% \end{macro}
%
% \begin{macro}[int]{\@@_anskey_env_save_keys:, \@@_anskey_env_store:,
%                    \@@_anskey_env_clean_vars:, }
%   The function \cs{@@_anskey_env_save_keys:} processing the \myoarg{key \textnormal{\textcolor{gray}{=}} val}
%   passed to the environment and save this in the variable \cs{l_@@_store_anskey_opt_tl}.
%   If the \mykeycmd{break-col} key is present and the environment is
%   running under \myenv*{enumext} (not in \myenv*{enumext*})
%   we will add the key \mykeycmd{break-col}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_env_save_keys:
  {
    \bool_lazy_and:nnT
      { \bool_if_p:N \g_@@_store_columns_break_bool }
      { \bool_not_p:n { \l_@@_starred_bool } }
      {
        \tl_put_left:Ne \l_@@_store_anskey_opt_tl { ,break-col, }
      }
%    \end{macrocode}
%   If the \mykeycmd{item-join} key is present and the command is running under
%   \myenv*{enumext*} we will add to \cs{l_@@_store_anskey_opt_tl}.
%    \begin{macrocode}
    \bool_lazy_and:nnT
      { \bool_not_p:n { \l_@@_starred_bool } }
      { \int_compare_p:nNn { \g_@@_store_item_join_int } > { 1 } }
      {
        \tl_put_left::Ne \l_@@_store_anskey_opt_tl
          {
            ,item-join = \exp_not:V \g_@@_store_item_join_int,
          }
       }
%    \end{macrocode}
%   And now we will review the keys \mykeycmd{item-star}, \mykeycmd{item-sym*} and
%   \mykeycmd{item-pos*} and pass them to \cs{l_@@_store_anskey_opt_tl}.
%    \begin{macrocode}
    \bool_if:NT \g_@@_store_item_star_bool
      {
        \tl_put_left:Ne \l_@@_store_anskey_opt_tl
          {
            ,item-star,
          }
        \tl_if_empty:NF \g_@@_store_item_symbol_tl
          {
            \tl_put_left:Ne \l_@@_store_anskey_opt_tl
              {
                ,item-sym* = \exp_not:V \g_@@_store_item_symbol_tl,
              }
          }
        \dim_compare:nT
          {
            \g_@@_store_item_symbol_sep_dim != \c_zero_dim
          }
          {
            \tl_put_left:Ne \l_@@_store_anskey_opt_tl
              {
                ,item-pos* = \exp_not:V \g_@@_store_item_symbol_sep_dim,
              }
          }
       }
  }
%    \end{macrocode}
%   The function \cs{@@_anskey_env_store:} will be responsible for storing
%   the content of the environment using the functions \cs{@@_store_anskey_code:n}
%   and \cs{@@_rescan_anskey_env:n}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_env_store:
  {
    \group_begin:
      \tl_if_empty:NTF \l_@@_store_anskey_opt_tl
        {
          \exp_args:Ne
            \@@_store_anskey_code:n
              {
                \@@_rescan_anskey_env:n { \l_@@_store_anskey_env_tl }
              }
        }
        {
          \keys_set_known:nV { enumext / anskey } \l_@@_store_anskey_opt_tl
          \exp_args:Ne
            \@@_store_anskey_code:n
              {
                \@@_rescan_anskey_env:n { \l_@@_store_anskey_env_tl }
              }
        }
    \group_end:
  }
%    \end{macrocode}
%   The function \cs{@@_anskey_env_clean_vars:} will return the global
%   variables used by the \mymeta{keys} to their initial state.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anskey_env_clean_vars:
  {
    \bool_gset_false:N \g_@@_store_columns_break_bool
    \int_gzero:N       \g_@@_store_item_join_int
    \bool_gset_false:N \g_@@_store_item_star_bool
    \tl_gclear:N       \g_@@_store_item_symbol_tl
    \dim_gzero:N       \g_@@_store_item_symbol_sep_dim
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Executing \texttt{anskey*}, \texttt{check-ans} and write \texttt{.log}}\label{fun:exec-after-env}
%
% \begin{macro}{\@@_execute_after_env:}
%   The \cs{@@_execute_after_env:} function will first return the
%   appropriate message for the end of the environment in which the
%   \mykey{save-ans} key is being executed, then call the
%   \cs{@@_item_answer_diff:} function and then will write the values of
%   the global variables used to the |.log| file. If the key
%   \mykey{check-ans} is active it will execute the function
%   \cs{@@_check_ans_show:} and show the result in the terminal, otherwise
%   it will execute the function \cs{@@_check_ans_log:} and write the
%   results in the |.log| file, undefine the environment \myenv*{anskey*} (\S\ref{env:anskey})
%   through the function \cs{@@_undefine_anskey_env:} and finally we execute the function
%   \cs{@@_reset_global_vars:} returning the used variables to their
%   original state.
% \iffalse
%% Function internal checking answer mechanism, clean vars and undefine |anskey*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_execute_after_env:
  {
    \int_compare:nNnT { \l_@@_level_int } = { 0 }
      {
        \tl_if_empty:NF \g_@@_store_name_tl
          {
            \@@_stop_save_ans_msg:
            \@@_item_answer_diff:
            \@@_log_global_vars:
            \@@_log_answer_vars:
            \bool_if:NTF \g_@@_check_ans_key_bool
              {
                \@@_check_ans_show:
              }
              { \@@_check_ans_log: }
            \@@_undefine_anskey_env:
          }
        \@@_reset_global_vars:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{important}*
%  This function is passed to the  function \cs{@@_after_env:nn} for the
%  environments \myenv*{enumext} (\S\ref{env:enumext}) and \myenv*{enumext*} (\S\ref{env:starred})
%  and it is executed only when the environments are not nested or at some level of these..
% \end{important}
%
% \subsection{Common functions for \env{keyans}, \env{keyans*} and \env{keyanspic}}
%
% \subsubsection{Storing content in prop list}
%
% \begin{macro}{\@@_keyans_addto_prop:n}
%   The function \cs{@@_keyans_addto_prop:n} will pass the the current \mymeta{label} for |\item*|
%   in \myenv*{keyans} environment and the current \mymeta{label} for
%   |\anspic*| in \myenv*{keyanspic} environment followed by the
%   \mymeta{contents} of the \emph{optional argument} of both commands
%   to the \cs{l_@@_store_current_label_tl} variable, which will be stored
%   to the \emph{prop list} defined by the \mykey{save-ans} key using the
%   function \cs{@@_store_addto_prop:V}.
% \iffalse
%% Function for storing in prop list for |keyans| and |keyanspic| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_addto_prop:n #1
  {
    \tl_clear:N \l_@@_store_current_label_tl
    \int_compare:nNnTF { \l_@@_keyans_pic_level_int } = { 1 }
      {
        \tl_put_right:Ne \l_@@_store_current_label_tl { \l_@@_label_vi_tl }
      }
      {
        \tl_put_right:Ne \l_@@_store_current_label_tl { \l_@@_label_v_tl }
      }
%    \end{macrocode}
%   If the \emph{optional argument} is present and the \mykey{save-sep}
%   key is not empty, we save it.
%    \begin{macrocode}
    \tl_if_novalue:nF { #1 }
      {
        \tl_if_empty:NF \l_@@_store_keyans_item_opt_sep_v_tl
          {
            \tl_put_right:Ne \l_@@_store_current_label_tl
              {
                \l_@@_store_keyans_item_opt_sep_v_tl
              }
          }
        \tl_put_right:Ne \l_@@_store_current_label_tl { #1 }
      }
    \@@_store_addto_prop:V \l_@@_store_current_label_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The \texttt{save-ref} key for \env{keyans}, \env{keyans*} and \env{keyanspic}}\label{fun:save-ref-keyans}
%
% The \emph{\enquote{internal label and ref}} system for the \myenv*{keyans},
% \myenv*{keyans*} and \myenv*{keyanspic} environments has \emph{slight differences}
% with the one implemented for \ics*{anskey} basically because in this
% environments the interest is in the current \mymeta{label} for |\item*|
% and |\anspic*| with the \mymeta{contents} of the \emph{optional argument}. The mechanism
% defined here will allow to execute \ics{ref}\mymarg{store name \textcolor{red}{:} position} and
% will return |1.(A)|.
%
% \begin{macro}{\@@_keyans_store_ref:, \@@_keyans_store_ref_aux_i:,
%               \@@_keyans_store_ref_aux_ii:,}
%   The function \cs{@@_keyans_store_ref:} handles the
%   \emph{\enquote{internal label and ref}} system used by the
%   \mykey{save-ref} key for \ics*{item*} and \ics*{anspic*} commands.
%   First we will create copies of the current \mymeta{labels} and remove
%   the dots \enquote{\textcolor{red}{\texttt{.}}} from them, we do not
%   want to get double dots in references.
% \iffalse
%% Internal label and ref function for |keyans|, |keyans*| and |keyanspic| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_store_ref:
  {
    \bool_if:NT \l_@@_store_ref_key_bool
      {
        \cs_set_protected:Npn \@@_tmp:n ##1
          {
            \tl_set_eq:cc { l_@@_label_copy_##1_tl } { l_@@_label_##1_tl }
            \tl_reverse:c { l_@@_label_copy_##1_tl }
            \tl_remove_once:cn { l_@@_label_copy_##1_tl } { . }
            \tl_reverse:c { l_@@_label_copy_##1_tl }
          }
        \clist_map_inline:nn { i, v, vi, vii, viii } { \@@_tmp:n {##1} }
        \@@_keyans_store_ref_aux_i:
      }
   }
%    \end{macrocode}
%   The auxiliary function \cs{@@_keyans_store_ref_aux_i:} set the
%   variable \cs{l_@@_newlabel_arg_one_tl} which will  contain
%   \mymarg{store name \textcolor{red}{:} position} analyzing whether
%   the environment in which they are executed is \myenv*{enumext*} or
%   \myenv*{enumext}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_store_ref_aux_i:
  {
    \bool_if:NT \g_@@_starred_bool
      {
        \tl_set_eq:NN \l_@@_label_copy_i_tl \l_@@_label_copy_vii_tl
      }
    \int_compare:nNnT { \l_@@_keyans_pic_level_int } = { 1 }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          { \l_@@_label_copy_i_tl . \l_@@_label_copy_vi_tl }
      }
    \int_compare:nNnT { \l_@@_keyans_level_int } = { 1 }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          { \l_@@_label_copy_i_tl . \l_@@_label_copy_v_tl }
      }
    \int_compare:nNnT { \l_@@_keyans_level_h_int } = { 1 }
      {
        \tl_put_right:Ne \l_@@_newlabel_arg_two_tl
          { \l_@@_label_copy_i_tl . \l_@@_label_copy_viii_tl }
      }
    \tl_put_right:Ne \l_@@_newlabel_arg_one_tl
      {
        \l_@@_store_name_tl \c_colon_str
        \int_eval:n { \prop_count:c { g_@@_ \l_@@_store_name_tl _prop } }
      }
    \@@_keyans_store_ref_aux_ii:
  }
%    \end{macrocode}
%   Now auxiliary function \cs{@@_keyans_store_ref_aux_ii:} save the
%   result in the variable \cs{l_@@_write_aux_file_tl} and finally we
%   write in the |.aux| file.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_store_ref_aux_ii:
  {
    \tl_put_right:Ne \l_@@_write_aux_file_tl
      {
        \@@_newlabel:nn
          { \exp_not:V \l_@@_newlabel_arg_one_tl }
          { \l_@@_newlabel_arg_two_tl }
      }
    \l_@@_write_aux_file_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Storing content in sequence}
%
% \begin{macro}{\@@_keyans_addto_seq:n, \@@_keyans_addto_seq_link:}
%   The function \cs{@@_keyans_addto_seq:n} will pass the
%   contents of the current \mymeta{label} \cs{l_@@_label_v_tl} for the
%   \myenv*{keyans} environment and the \cs{l_@@_label_vi_tl} for the \myenv*{keyanspic} environment when using
%   \ics*{item*} and \ics*{anspic*}, followed by the \mymeta{contents} of the
%   \emph{optional argument} of both commands to the \cs{l_@@_store_current_label_tl}
%   variable to the sequence defined by the \mykey{save-ans} key.
% \iffalse
%% Function for storing in sequence for |keyans| and |keyanspic| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_addto_seq:n #1
  {
    \tl_clear:N \l_@@_store_current_label_tl
    \int_compare:nNnTF { \l_@@_keyans_pic_level_int } = { 1 }
      {
        \tl_put_right:Ne \l_@@_store_current_label_tl { \item \l_@@_label_vi_tl }
      }
      {
        \tl_put_right:Ne \l_@@_store_current_label_tl { \item \l_@@_label_v_tl }
      }
    \tl_if_novalue:nF { #1 }
      {
        \tl_if_empty:NF \l_@@_store_keyans_item_opt_sep_v_tl
          {
            \tl_put_right:Ne \l_@@_store_current_label_tl
              {
                \l_@@_store_keyans_item_opt_sep_v_tl
              }
          }
        \tl_put_right:Ne \l_@@_store_current_label_tl { #1 }
      }
    \@@_keyans_addto_seq_link:
  }
%    \end{macrocode}
%   Checks if the \mykey{save-ref} key is active along with the
%   \mypkg{hyperref} package load, if both conditions are met, it will
%   create the \ics{hyperlink} and then store using the
%   \cs{@@_store_addto_seq:V} function.
%   Finally, copy the contents of the variable \cs{l_@@_store_current_label_tl}
%   into the global variable \cs{g_@@_check_ans_item_tl} to be used
%   by the function \cs{@@_check_starred_cmd:n} and increment
%   the value of the integer variable \cs{g_@@_item_anskey_int} handled
%   by the \mykey{check-ans} key.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_addto_seq_link:
  {
    \bool_lazy_and:nnT
      { \bool_if_p:N \l_@@_store_ref_key_bool }
      { \bool_if_p:N \l_@@_hyperref_bool }
      {
        \tl_put_right:Ne \l_@@_store_current_label_tl
          {
            \hfill \exp_not:N \hyperlink
              {
                \exp_not:V \l_@@_newlabel_arg_one_tl
              }
              { \exp_not:V \l_@@_mark_ref_sym_tl }
          }
      }
    \@@_store_addto_seq:V \l_@@_store_current_label_tl
    \bool_if:NT \l_@@_check_answers_bool
      {
        \int_gincr:N \g_@@_item_anskey_int
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The \texttt{show-ans} and \texttt{show-pos} keys for \env{keyans} and \env{keyanspic}}
%
% \begin{macro}{\@@_keyans_save_item_opt:n,\@@_keyans_show_item_opt:,
%               \@@_keyans_show_item_opt_viii:, }
%   The function \cs{@@_keyans_save_item_opt:n} will save the optional
%   argument of |\item*| and |\anspic*| in the variable
%   \cs{l_@@_store_current_opt_arg_tl}.
% \iffalse
%% Function for |wrap-opt| key for |keyans|, |keyanspic| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_save_item_opt:n #1
  {
    \tl_if_novalue:nF { #1 }
      {
        \tl_set:Ne \l_@@_store_current_opt_arg_tl { #1 }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_keyans_show_item_opt:}  will print the optional
%   arguments of |\item*| and |\anspic*| when the \mykey{show-ans} or
%   \mykey{show-pos} keys are set next to the key \mykey{wrap-opt} in
%   \myenv*{keyans} and \myenv*{keyanspic} environments.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_show_item_opt:
  {
    \tl_if_empty:NF \l_@@_store_current_opt_arg_tl
      {
        \bool_lazy_or:nnT
          { \bool_if_p:N \l_@@_show_answer_bool }
          { \bool_if_p:N \l_@@_show_position_bool }
          {
            \@@_keyans_wrapper_opt_v:n
              { \l_@@_store_current_opt_arg_tl } \c_space_tl
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_keyans_show_item_opt_viii:}  will print the optional
%   argument of |\item*| when the \mykey{show-ans} or \mykey{show-pos}
%   keys are set next to the key \mykey{wrap-opt} in \myenv*{keyans*}
%   environment.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_show_item_opt_viii:
  {
    \tl_if_empty:NF \l_@@_store_current_opt_arg_tl
      {
        \bool_lazy_or:nnT
          { \bool_if_p:N \l_@@_show_answer_bool }
          { \bool_if_p:N \l_@@_show_position_bool }
          {
            \@@_keyans_wrapper_opt_viii:n
              { \l_@@_store_current_opt_arg_tl } \c_space_tl
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_pos_mark_set:, \@@_keyans_show_ans:, \@@_keyans_show_pos:}
%   The function \cs{@@_keyans_pos_mark_set:} adjusts the horizontal
%   spaces for the \mykey{mark-sep*} key taking into account the value of
%   the \mykey{align} key and the width of \mymeta{label}.
% \iffalse
%% Function for |mark-sep*|, |show-ans| and |show-pos| keys for |keyans| and |keyanspic| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_pos_mark_set:
  {
    \@@_label_width_by_box:Nn
      \l_@@_mark_sep_tmpa_dim { \l_@@_label_v_tl }
    \str_case:Vn \l_@@_align_label_pos_v_str
      {
        { l }
            {
              \dim_set:Nn \l_@@_mark_sep_tmpb_dim { \c_zero_dim }
            }
        { r }
            {
              \dim_set:Nn \l_@@_mark_sep_tmpb_dim
                { \l_@@_labelwidth_v_dim - \l_@@_mark_sep_tmpa_dim }
            }
        { c }
            {
              \dim_set:Nn \l_@@_mark_sep_tmpb_dim
                { 0.5\l_@@_labelwidth_v_dim - 0.5\l_@@_mark_sep_tmpa_dim }
            }
       }
%    \end{macrocode}
%   Here we set the default values for the key \mykey{mark-ans*}, \mykey{mark-sep*} and \mykey{mark-pos*}.
%    \begin{macrocode}
    \dim_compare:nNnT { \l_@@_mark_sym_sep_v_dim } = { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_mark_sym_sep_v_dim { \l_@@_labelsep_v_dim }
      }
    \tl_set_eq:NN \l_@@_mark_answer_sym_tl \l_@@_mark_answer_sym_v_tl
    \dim_add:Nn \l_@@_mark_sym_sep_v_dim { \l_@@_mark_sep_tmpb_dim }
    \str_set_eq:NN \l_@@_mark_position_str \l_@@_mark_position_v_str
  }
%    \end{macrocode}
%   The function \cs{@@_keyans_show_ans:} will print the \mymeta{symbol}
%   set by the \mykey{mark-ans*} key when the \mykey{show-ans} key is active.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_show_ans:
  {
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_show_answer_bool   }
        { \bool_if_p:N \l_@@_item_wrap_key_bool }
      }
      {
        \@@_keyans_pos_mark_set:
        \@@_print_keyans_box:NN
          \l_@@_labelwidth_v_dim \l_@@_mark_sym_sep_v_dim
      }
  }
%    \end{macrocode}
%   The function \cs{@@_keyans_show_pos:} will print the \mymeta{position}
%   of the stored content in \emph{prop list}. Need add |1| to
%   \myvarenv{g__@@_\mymeta[cf=gray]{store name}_prop} for \myenv*{keyans}
%   environment.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_show_pos:
  {
    \int_compare:nNnTF { \l_@@_keyans_level_int } = { 1 }
      {
        \int_incr:N \l_@@_show_pos_tmp_int
      }
      {
        \int_zero:N \l_@@_show_pos_tmp_int
      }
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_show_position_bool }
        { \bool_if_p:N \l_@@_item_wrap_key_bool }
      }
      {
        \tl_set:Ne \l_@@_mark_answer_sym_v_tl
          {
            \group_begin:
              \exp_not:N \normalfont
              \exp_not:N \footnotesize [ \int_eval:n
                {
                  \prop_count:c { g_@@_ \l_@@_store_name_tl _prop }
                  + \l_@@_show_pos_tmp_int
                }
              ]
            \group_end:
          }
        \@@_keyans_pos_mark_set:
        \@@_print_keyans_box:NN
          \l_@@_labelwidth_v_dim \l_@@_mark_sym_sep_v_dim
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Redefining \cs{item} and \cs{makelabel} in \env{enumext}}\label{env:item-starred-enumext}
%
% Redefining the |\item| command is not as simple as I thought. This
% command works in conjunction with the \ics{makelabel} command so I have
% to redefine both of them, in addition to this, we will have to use a
% couple of \emph{global} variables to pass the values from one command
% to the other.
%
% \smallskip
%
% When \emph{labeling} \texttt{PDF} is active |\makelabel| is redefined
% as |\hss #1| and the only way to get the \mykey{align} key to work
% correctly is to redefine |\makelabel| using |\makebox|. The best way to
% implement this is to use the conditional command |\IfDocumentMetadataTF|
% to force this redefinition and the dedicated \mykey{mode-box} key to
% manually activate it by the user.
%
% \smallskip
%
% The \ics*{item} and \ics*{item}\myoarg{custom} commands work in the
% usual way on \myenv*{enumext} and we will add \ics*{item*}, \ics*{item*}\myoarg{symbol} and
% \ics*{item*}\myoarg{symbol}\myoarg{offset}.
%
% \begin{macro}[int]{\@@_default_item:n}
%   First we will see if the \emph{optional argument} is present, if it is NOT
%   present we will check the state of the variable \cs{l_@@_check_answers_bool}
%   set by the key \mykey{no-store}, set the boolean variable
%   \myvarenv{l__@@_wrap_label_X_bool} to \enquote{true} for the key \mykey{wrap-label}
%   and execute \cs{@@_item_std:w} and the key \mykey{itemindent}, otherwise we will check the state
%   of the boolean variable \myvarenv{l__@@_wrap_label_opt_X_bool} set
%   by the key \mykey{wrap-label*} and execute \cs{@@_item_std:w} with
%   the \emph{optional argument} and the key \mykey{itemindent}.
% \iffalse
%% Internal function for |\item| with check-answer mechanism in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_default_item:n #1
  {
    \tl_if_novalue:nTF {#1}
      {
        \bool_if:NT \l_@@_check_answers_bool
          {
            \int_gincr:N \g_@@_item_number_int
            \bool_set_true:N \l_@@_item_number_bool
          }
        \bool_set_true:c { l_@@_wrap_label_ \@@_level: _bool }
        \@@_item_std:w \tl_use:c { l_@@_fake_item_indent_ \@@_level: _tl }
      }
      {
        \bool_set_eq:cc
          { l_@@_wrap_label_ \@@_level: _bool }
          { l_@@_wrap_label_opt_ \@@_level: _bool }
        \@@_item_std:w [#1] \tl_use:c { l_@@_fake_item_indent_ \@@_level: _tl }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_item_starred_exec:nn, \@@_item_starred_exec:,}
%    The \ics*{item*}, \ics*{item*}\myoarg{symbol} and \ics*{item*}\myoarg{symbol}\myoarg{offset}
%    works like the \emph{numbered} |\item|, but placing a \mymeta{symbol}
%    to the \emph{\enquote{left}} of the \mymeta{label} separated from
%    it by the value the second \emph{optional argument} \mymeta{offset}.
%
% \begin{arguments}
%   \item \myvarenv{l__@@_item_symbol_X_tl}
%   \item \myvarenv{l__@@_item_symbol_sep_X_dim}
% \end{arguments}
%
%   First we will make a copy of \myvarenv{l__@@_item_symbol_X_tl} which is
%   set by the key \mykey{item-sym*} or passed as \emph{\enquote{first}} \emph{optional argument} in
%   the global variable \cs{g_@@_item_symbol_aux_tl}, followed by setting the
%   variable \myvarenv{l__@@_item_symbol_sep_X_dim} set by the key
%   \mykey{item-pos*} or by the \emph{\enquote{second}} \emph{optional argument},
%   then we will see the state of the variable \cs{l_@@_check_answers_bool}
%   set by the key \mykey{no-store}, set the boolean variable
%   \myvarenv{l__@@_wrap_label_X_bool} to \enquote{true} for the key \mykey{wrap-label}
%   and execute \cs{@@_item_std:w} and the key \mykey{itemindent}.
% \iffalse
%% Internal function for |\item*[symb][sep]| with check-answer mechanism in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_item_starred_exec:nn #1 #2
  {
    \tl_if_novalue:nTF {#1}
      {
        \tl_gset_eq:Nc
          \g_@@_item_symbol_aux_tl { l_@@_item_symbol_ \@@_level: _tl }
      }
      {
        \tl_gset:Nn \g_@@_item_symbol_aux_tl {#1}
      }
    \tl_if_novalue:nTF {#2}
      {
        \dim_set_eq:cc
          { l_@@_item_symbol_sep_ \@@_level: _dim }
          { l_@@_labelsep_ \@@_level: _dim }
      }
      {
        \dim_set:cn { l_@@_item_symbol_sep_ \@@_level: _dim } {#2}
      }
    \bool_if:NT \l_@@_check_answers_bool
      {
        \int_gincr:N \g_@@_item_number_int
        \bool_set_true:N \l_@@_item_number_bool
      }
    \bool_set_true:c { l_@@_wrap_label_ \@@_level: _bool }
    \@@_item_std:w \tl_use:c { l_@@_fake_item_indent_ \@@_level: _tl }
  }
%    \end{macrocode}
%    The function \cs{@@_item_starred_exec:} will be responsible for
%    executing |\item*| for the \myenv*{enumext} environment.
% \iffalse
%% Function for |\item*[sym][sep]| in |\makelabel| for |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_item_starred_exec:
  {
    \tl_if_empty:cF { l_@@_item_symbol_ \@@_level: _tl }
      {
        \mode_leave_vertical:
        \skip_horizontal:n { -\dim_use:c { l_@@_item_symbol_sep_ \@@_level: _dim } }
        \hbox_overlap_left:n { \g_@@_item_symbol_aux_tl }
        \skip_horizontal:n { \dim_use:c { l_@@_item_symbol_sep_ \@@_level: _dim } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_redefine_item:}
%   The function \cs{@@_redefine_item:} will redefine the |\item|
%   command in the \myenv*{enumext} environment adding |\item*|.
%   This function are passed to \myvarenv{__@@_list_arg_two_X:} used
%   in the definition of the \myenv*{enumext} environment (\S\ref{env:enumext}).
% \iffalse
%% Redefinition of |\item| for |\item*[sym][sep]| in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_redefine_item:
  {
    \RenewDocumentCommand \item { s o o }
      {
        \bool_if:nTF {##1}
          {
            \@@_item_starred_exec:nn {##2} {##3}
          }
          { \@@_default_item:n {##2} }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \medskip
%
% \begin{macro}{\@@_make_label:,\@@_make_label_std:,\@@_make_label_box:}
%   The function \cs{@@_make_label:} redefine \ics{makelabel} for the keys
%   \mykey{mode-box}, \mykey{align}, \mykey{font}, \mykey{wrap-label},
%   \mykey{wrap-label*} and |\item*| for \myenv*{enumext} environment.
%   This function are passed to \myvarenv{__@@_list_arg_two_X:} used
%   in the definition of the \myenv*{enumext} environment (\S\ref{env:enumext}).
% \iffalse
%% Redefinition of |\makelabel| for |\item| and |\item*[sym][sep]| in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_make_label:
  {
    \IfDocumentMetadataTF
      {
        \@@_make_label_box:
      }
      {
        \bool_if:NTF \l_@@_mode_box_bool
          {
             \@@_make_label_box:
          }
          {
             \@@_make_label_std:
          }
      }
  }
%    \end{macrocode}
%   Standard definition when |\DocumentMetadata| is not active.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_make_label_std:
  {
    \RenewDocumentCommand \makelabel { m }
      {
        \tl_use:c { l_@@_label_fill_left_ \@@_level: _tl }
        \@@_item_starred_exec:
        \tl_use:c { l_@@_label_font_style_ \@@_level: _tl }
        \bool_if:cTF { l_@@_wrap_label_ \@@_level: _bool }
          {
            \use:c { @@_wrapper_label_ \@@_level: :n } { ##1 }
          }
          { ##1 }
        \tl_use:c { l_@@_label_fill_right_ \@@_level: _tl }
        \tl_gclear:N \g_@@_item_symbol_aux_tl
      }
  }
%    \end{macrocode}
%   Definition using |\makebox| when |\DocumentMetadata| is active or
%   \mykey{mode-box} is active.
%
% \begin{important}
%  Here it is necessary to use |\strut\smash| to maintain text \emph{alignment}
%  in case the user wants to use |\labelbx| for example. In my experiments
%  with \emph{mimicking} the \myenv{description} environment it was the only way
%  out and it seems to have no adverse effects and may serve in the future
%  as a basis for a more generic \myenv{list} environment package than
%  \mypkg*{enumext}.
% \end{important}
%
%    \begin{macrocode}
\cs_new_protected:Nn \@@_make_label_box:
  {
    \RenewDocumentCommand \makelabel { m }
      {
        \strut\smash
          {
            \makebox
              [ \dim_use:c { l_@@_labelwidth_ \@@_level: _dim } ]
              [ \str_use:c { l_@@_align_label_pos_ \@@_level: _str } ]
              {
                \@@_item_starred_exec:
                \tl_use:c { l_@@_label_font_style_ \@@_level: _tl }
                \bool_if:cTF { l_@@_wrap_label_ \@@_level: _bool }
                  {
                    \use:c { @@_wrapper_label_ \@@_level: :n } { ##1 }
                  }
                  { ##1 }
                \tl_gclear:N \g_@@_item_symbol_aux_tl
              }
          } % close smash
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting \texttt{item-sym*} and \texttt{item-pos*} keys}\label{key:item-starred}
%
% In order to have a cleaner implementation of |\item*| for the
% \myenv*{enumext} and \myenv*{enumext*} environments it is best to
% define a couple of keys that allow us to control and set by default the
% \mymeta{symbol} and its \mymeta{offset}.
%
% \begin{macro}[int]{item-sym*, item-pos*}
%   Define and set \mykey{item-sym*} and \mykey{item-pos*} keys for
%   \myenv*{enumext} and \myenv*{enumext*}.
% \iffalse
%% Add |item-sym*| and |item-sep*| keys.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:nn #1 #2
  {
    \keys_define:nn { enumext / #1 }
      {
        item-sym* .tl_set:c  = { l_@@_item_symbol_#2_tl },
        item-sym* .value_required:n = true,
        item-sym* .initial:n  = {\textborn},
        item-pos* .dim_set:c  = { l_@@_item_symbol_sep_#2_dim },
        item-pos* .value_required:n = true,
      }
  }
\clist_map_inline:nn
  {
    {level-1}{i}, {level-2}{ii}, {level-3}{iii}, {level-4}{iv}, {enumext*}{vii}
  }
  { \@@_tmp:nn #1 }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Handling unknown keys}\label{key:unknown-keys}
%
% At this point in the code I already know that I will NOT add more
% \mymeta{keys} for and since I have already been quite \emph{paranoid and
% restrictive} with the definitions of environments and commands, the
% only thing left to do is do it with the \mymeta{keys} (you have to be
% consistent in life).
%
% \smallskip
%
% \begin{important}*
%  Well, the paragraph above is not so real, after all I had to add more
%  \mymeta{keys} than I had planned, not everything turns out the way one thinks in
%  life.
% \end{important}
%
% \subsubsection{Handling unknown keys for \env{keyans}, \env{keyans*} and \env{keyanspic}}\label{key:unknown-keys-keyans}
%
% \begin{macro}[int]{unknown, \@@_keyans_unknown_keys:n, \@@_keyans_unknown_keys:nn}
%   Define and set |unknown| key for  \myenv*{keyans}, \myenv*{keyans*}
%   and \myenv*{keyanspic} environments. Here it is necessary to set
%   \cs{l_@@_envir_name_tl} in case an |unknown| key is passed using |\setenumext|.
% \iffalse
%% Add keys |unknown| for |keyans|, |keyans*| and |keyanspic| environments.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / #1 }
      {
        unknown .code:n = {
                            \tl_set:Nn \l_@@_envir_name_tl {#1}
                            \@@_keyans_unknown_keys:n {##1}
                          },
      }
  }
\clist_map_inline:nn { keyans, keyans*, keyanspic } { \@@_tmp:n {#1} }
%    \end{macrocode}
%  Internal functions for handling |unknown| key.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_unknown_keys:n #1
  {
    \exp_args:NV \@@_keyans_unknown_keys:nn \l_keys_key_str {#1}
  }
\cs_new_protected:Npn \@@_keyans_unknown_keys:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      {
        \msg_error:nne { enumext } { keyans-unknown-key } {#1}
      }
      {
        \msg_error:nnee { enumext } { keyans-unknown-key-value } {#1} {#2}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Handling unknown keys for \env{enumext*}}\label{key:unknown-keys-starred}
%
% \begin{macro}[int]{unknown, \@@_starred_unknown_keys:n, \@@_starred_unknown_keys:nn}
%   Define and set |unknown| key for  \myenv*{enumext*} environment.
% \iffalse
%% Add keys |unknown| for |enumext*| environment.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext / enumext* }
  {
    unknown .code:n = { \@@_starred_unknown_keys:n {#1} },
  }
%    \end{macrocode}
%   Internal functions for handling |unknown| key.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_unknown_keys:n #1
  {
    \exp_args:NV \@@_starred_unknown_keys:nn \l_keys_key_str {#1}
  }
\cs_new_protected:Npn \@@_starred_unknown_keys:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      {
        \msg_error:nnn { enumext } { starred-unknown-key } {#1}
      }
      {
        \msg_error:nnnn { enumext } { starred-unknown-key-value } {#1} {#2}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Handling unknown keys for \env{enumext}}\label{key:unknown-keys-standar}
%
% \begin{macro}[int]{unknown, \@@_standar_unknown_keys:n, \@@_standar_unknown_keys:nn}
%   Defines and set the key |unknown| for \myenv*{enumext} environment.
% \iffalse
%% Add keys |unknown| for |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \keys_define:nn { enumext / #1 }
      {
        unknown .code:n = { \@@_standar_unknown_keys:n {##1} },
      }
  }
\clist_map_inline:nn { level-1,level-2,level-3,level-4 } { \@@_tmp:n {#1} }
%    \end{macrocode}
%   Internal functions for handling |unknown| key.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_standar_unknown_keys:n #1
  {
    \exp_args:NV \@@_standar_unknown_keys:nn \l_keys_key_str {#1}
  }
\cs_new_protected:Npn \@@_standar_unknown_keys:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      {
        \msg_error:nnn { enumext } { standar-unknown-key } {#1}
      }
      {
        \msg_error:nnnn { enumext } { standar-unknown-key-value } {#1} {#2}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Redefining \cs{item} and \cs{makelabel} in \env{keyans}}\label{cmd:item-starred}
%
% The \ics*{item} and \ics*{item}\myoarg{custom} commands work in the
% usual way in \myenv*{keyans}, but the \ics*{item*} and \ics*{item*}\myoarg{content}
% commands \emph{store} the current \mymeta{label} next to the \mymeta{content}
% if it is present in the \emph{sequence} and \emph{prop list} defined by
% \mykey{save-ans} key.
%
% \begin{macro}{\@@_keyans_default_item:n,}
%   The function \cs{@@_keyans_default_item:n} executes the original
%   behavior of the \ics*{item} along with the keys \mykey{wrap-label},
%   \mykey{wrap-label*} and \mykey{itemindent}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_default_item:n #1
  {
    \tl_if_novalue:nTF { #1 }
      {
        \bool_set_true:N \l_@@_wrap_label_v_bool
        \@@_item_std:w \tl_use:N \l_@@_fake_item_indent_v_tl
      }
      {
        \bool_set_eq:NN \l_@@_wrap_label_v_bool \l_@@_wrap_label_opt_v_bool
        \@@_item_std:w [#1] \tl_use:N \l_@@_fake_item_indent_v_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_starred_item:n}
%   The function \cs{@@_keyans_starred_item:n} will take as argument |#1|
%   the \emph{optional argument} \myoarg{content} passed to |\item*| and
%   save it via the \cs{@@_keyans_save_item_opt:n} function, then activate
%   the \mykey{wrap-label} key, execute |\item| using \cs{@@_item_std:w},
%   the \mykey{itemindent} key and print the \emph{optional argument} using
%   the \cs{@@_keyans_show_item_opt:} function handled by the
%   \mykey{wrap-opt} key.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_starred_item:n #1
  {
    \@@_keyans_save_item_opt:n { #1 }
    \bool_set_true:N \l_@@_wrap_label_v_bool
    \@@_item_std:w \tl_use:N \l_@@_fake_item_indent_v_tl
    \@@_keyans_show_item_opt:
%    \end{macrocode}
%   Now \emph{store} the current \mymeta{label} first in the \emph{prop list}
%   (including the \emph{optional argument}), run the internal \emph{\enquote{label and ref}}
%   system if the \mykey{save-ref} key is active, then \emph{store} in the \emph{sequence}
%   and finally increments \cs{g_@@_check_starred_cmd_int} for internal
%   check system.
%    \begin{macrocode}
    \@@_keyans_addto_prop:n { #1 }
    \@@_keyans_store_ref:
    \@@_keyans_addto_seq:n { #1 }
    \int_gincr:N \g_@@_check_starred_cmd_int
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\item*,\@@_keyans_redefine_item:}
%   The function \cs{@@_keyans_redefine_item:} is responsible for adding
%   the \emph{starred argument} and \emph{optional argument} by the
%   \cs{@@_list_arg_two_v:} function in the definition of the
%   \myenv*{keyans} environment. Here we will set to true the variable
%   \cs{l_@@_item_wrap_key_bool} used by the \mykey{wrap-ans*} key
%   only when |\item*| is executed and additionally we need to use
%   |\peek_remove_spaces:n| to avoid an unwanted space when using
%   |\item*| together with the \mykey{itemindent} key.
%   This function are passed to \myvarenv{__@@_list_arg_two_v:} used
%   in the definition of the \myenv*{keyans} environment (\S\ref{ltx:second-arg}).
% \iffalse
%% Redefine |\item| for |keyans| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_redefine_item:
  {
    \RenewDocumentCommand \item { s o }
      {
        \bool_if:nTF {##1}
          {
            \bool_set_true:N \l_@@_item_wrap_key_bool % wrap-ans*
            \peek_remove_spaces:n
              {
                \@@_keyans_starred_item:n {##2}
              }
          }
          {
            \bool_set_false:N \l_@@_item_wrap_key_bool
            \@@_keyans_default_item:n {##2}
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_make_label:,\@@_keyans_wrapper_label:n,
%               \@@_keyans_make_label_std:,\@@_keyans_make_label_box:}
%   The function \cs{@@_keyans_make_label:} redefine \ics{makelabel}
%   for the keys \mykey{mode-box}, \mykey{align}, \mykey{font},
%   \mykey{wrap-label}, \mykey{wrap-label*}, \mykey{wrap-ans*} and |\item*|
%   for \myenv*{keyans} environment.
%   This function are passed to \myvarenv{__@@_list_arg_two_v:} used
%   in the definition of the \myenv*{keyans} environment (\S\ref{ltx:second-arg}).
% \iffalse
%% Redefine |\makelabel| for |keyans| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_make_label:
  {
    \IfDocumentMetadataTF
      {
        \@@_keyans_make_label_box:
      }
      {
        \bool_if:NTF \l_@@_mode_box_bool
          {
            \@@_keyans_make_label_box:
          }
          {
            \@@_keyans_make_label_std:
          }
      }
  }
%    \end{macrocode}
%   We added conditionals to the \cs{@@_keyans_wraper_label:n} function
%   to handle the keys \mykey{wrap-ans*}, \mykey{wrap-label} and \mykey{wrap-label*}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_wrapper_label:n #1
  {
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_wrap_label_v_bool         }
        { \bool_if_p:N \l_@@_show_answer_bool          }
        { \bool_if_p:N \l_@@_item_wrap_key_bool        }
        { \cs_if_exist_p:N \@@_keyans_wrapper_item_v:n }
      }
      {
        \cs_set_eq:NN \@@_wrapper_label_v:n \@@_keyans_wrapper_item_v:n
      }
    \bool_if:NTF \l_@@_wrap_label_v_bool
      {
        \@@_wrapper_label_v:n { #1 }
      }
      { #1 }
  }
%    \end{macrocode}
%   Standard definition when |\DocumentMetadata| is not active.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_make_label_std:
  {
    \RenewDocumentCommand \makelabel { m }
      {
        \tl_use:N \l_@@_label_fill_left_v_tl
        \@@_keyans_show_ans:
        \@@_keyans_show_pos:
        \tl_use:N \l_@@_label_font_style_v_tl
        \@@_keyans_wrapper_label:n { ##1 }
        \tl_use:N \l_@@_label_fill_right_v_tl
      }
  }
%    \end{macrocode}
%   Definition using |\makebox| when |\DocumentMetadata| is active or
%   \mykey{mode-box} is active.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_make_label_box:
  {
    \RenewDocumentCommand \makelabel { m }
      {
        \strut\smash
          {
            \makebox[ \l_@@_labelwidth_v_dim ][ \l_@@_align_label_pos_v_str ]
              {
                \@@_keyans_show_ans:
                \@@_keyans_show_pos:
                \tl_use:N \l_@@_label_font_style_v_tl
                \@@_keyans_wrapper_label:n { ##1 }
              }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Second argument of the lists}\label{ltx:second-arg}
%
% At this point of the code we have already programmed most the necessary
% tools to create a custom \myenv{list} environment, remember that the function
% \cs{@@_start_list:nn} takes two arguments, the first one we have
% ready, the second one we will define for all the levels of the
% environment \myenv*{enumext} and the environment \myenv*{keyans}.
%
% \subsubsection{Calculation of \cs{leftmargin} and \cs{itemindent}}\label{int:leftmargin}
%
% Consider the figure \ref{fig:eight} where the default margins (on the
% left) of a list are represented.
%
% \begin{figure}[!htbp]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (-0.5,6.175) --node[below,text=lightgray,font=\footnotesize\ttfamily]{margin page} (2,6.175);
%     \draw[line width=0.5pt,dash pattern=on 2pt off 2pt,color=gray] (2,4.85) -- (2,7.5);
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{list-offset}} (4.5,7.0);
%     \draw[<->,color=gray] (4.5,7.0) --node[above,text=blue!75]{\vphantom{p}\texttt{\textbackslash{}labelwidth}} (7.5,7.0);
%     \draw[<->,color=gray] (7.5,7.0) --node[above,text=blue!75]{\texttt{\textbackslash{}labelsep}} (9.5,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (4.5,6.5) rectangle (7.5,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.5,6.5) rectangle (9.5,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.5) rectangle (15,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.0) rectangle (15,6.35);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,5.5) rectangle (15,5.85);
%     \draw[<->,color=gray] (1.25,5.35) --node[below,text=blue!75]%
%       {\begin{tabular}{c}
%          \texttt{\textbackslash{}leftmargin + \textbackslash{}itemindent} \\
%          \textcolor{optcolor}{\texttt{list-indent}}
%        \end{tabular}} (9.5,5.35);
%   \end{tikzpicture}
%   \caption{Representation of standard horizontal lengths in \myenv{list} environment.}
%   \label{fig:eight}
% \end{figure}
%
% The idea is to have control over these margins so that our list does
% not overlap the left margin of the page. The \emph{key} relationship is that
% the right edge of the |\labelsep| equals the right edge of the |\itemindent|,
% so that the left edge of the \emph{label box} is at |\leftmargin+\itemindent| minus |\labelwidth+\labelsep|.
% Thus, the handling of the margins by the package will be as shown in
% the figure \ref{fig:nine}.
%
% \begin{figure}[!htbp]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (-0.5,6.175) --node[below,text=lightgray,font=\footnotesize\ttfamily]{margin page} (2,6.175);
%     \draw[line width=0.5pt,dash pattern=on 2pt off 2pt,color=gray] (2,4.85) -- (2,7.5);
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{list-offset}} (4.5,7.0);
%     \draw[<->,color=gray] (4.5,7.0) --node[above,text=blue!75]{\vphantom{p}\texttt{\textbackslash{}labelwidth}} (7.5,7.0);
%     \draw[<->,color=gray] (7.5,7.0) --node[above,text=blue!75]{\texttt{\textbackslash{}labelsep}} (9.5,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (4.5,6.5) rectangle (7.5,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.5,6.5) rectangle (9.5,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.5) rectangle (15,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,6.0) rectangle (15,6.35);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (9.5,5.5) rectangle (15,5.85);
%     \draw[<->,color=gray] (4.5,5.35) --node[below,text=blue!75]%
%       {\begin{tabular}{c}
%          \texttt{\textbackslash{}leftmargin + \textbackslash{}itemindent} \\
%          \textcolor{optcolor}{\texttt{list-indent}}
%        \end{tabular}} (9.5,5.35);
%   \end{tikzpicture}
%   \caption{Representation of horizontal lengths concept in list in \mypkg*{enumext}.}
%   \label{fig:nine}
% \end{figure}
%
% Where the default values will look like in the figure \ref{fig:last}.
%
% \begin{figure}[htbp]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     \draw[<->,color=gray] (-0.5,6.175) --node[below,text=lightgray,font=\footnotesize\ttfamily]{margin page} (2,6.175);
%     \draw [line width=0.5pt,dash pattern=on 2pt off 2pt,color=gray] (2,4.85) -- (2,7.5);
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=blue!75]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=blue!75]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (15,6.85);% item width
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.0) rectangle (15,6.35);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.5) rectangle (15,5.85);
%     \draw[<->,color=gray] (2.0,5.35) --node[below,text=blue!75]%
%       {\begin{tabular}{c}
%          \texttt{\textbackslash{}leftmargin + \textbackslash{}itemindent} \\
%          \textcolor{optcolor}{\texttt{list-indent}}
%        \end{tabular}}
%     (7.0,5.35);
%   \end{tikzpicture}
%   \caption{Default horizontal lengths in \mypkg*{enumext}.}
%   \label{fig:last}
% \end{figure}
%
% \begin{macro}{\@@_calc_hspace:NNNNNNN, \@@_calc_hspace:ccccccc}
%  The function \cs{@@_calc_hspace:NNNNNNN} takes seven arguments to be
%  able to determine horizontal spaces for all list environment:
%
%  \begin{verbatim}
%     #1: \l__enumext_labelwidth_X_dim       #2: \l__enumext_labelsep_X_dim
%     #3: \l__enumext_listoffset_X_dim       #4: \l__enumext_leftmargin_tmp_X_dim
%     #5: \l__enumext_leftmargin_X_dim       #6: \l__enumext_itemindent_X_dim
%     #7: \l__enumext_leftmargin_tmp_X_bool
%  \end{verbatim}
%
%  And returns the \emph{\enquote{adjusted}} values of |\leftmargin|
%  and |\itemindent|.
%
%  \smallskip
%
%  This function is passed to \myvarenv{__@@_list_arg_two_X:} which
%  is used in the definition of the \myenv*{enumext} and \myenv*{keyans}
%  environments (\S\ref{ltx:second-arg}).
% \iffalse
%% Function to calc of horizontal length for all list environment.
%% #1: \l__enumext_labelwidth_X_dim     #2: \l__enumext_labelsep_X_dim
%% #3: \l__enumext_listoffset_X_dim     #4: \l__enumext_leftmargin_tmp_X_dim
%% #5: \l__enumext_leftmargin_X_dim     #6: \l__enumext_itemindent_X_dim
%% #7: \l__enumext_leftmargin_tmp_X_bool
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_calc_hspace:NNNNNNN #1 #2 #3 #4 #5 #6 #7
  {
    \dim_compare:nNnT { #1 } < { \c_zero_dim }
      {
        \msg_warning:nnnV { enumext } { width-non-positive }{ labelwidth }{ #1 }
        \dim_set:Nn #1 { \dim_abs:n { #1 } }
      }
    \dim_compare:nNnT { #2 } < { \c_zero_dim }
      {
        \msg_warning:nnnV { enumext } { width-negative }{ labelsep }{ #2 }
        \dim_set:Nn #2 { \dim_abs:n { #2 } }
      }
%    \end{macrocode}
%   If no value has been passed to the \mykey{labelwidth} and \mykey{labelsep} keys we
%   set the default values for \myvarenv{l__@@_leftmargin_tmp_X_dim}.
%    \begin{macrocode}
    \bool_if:nF #7 { \dim_set:Nn #4 { #1 + #2} }
%    \end{macrocode}
%   We now analyze the cases and set the values for \ics{leftmargin} and
%   \ics{itemindent}.
%    \begin{macrocode}
    \dim_compare:nNnTF { #4 } < { \c_zero_dim }
      {
        \dim_set:Nn #6 { #1 + #2 - #4}
        \dim_set:Nn #5 { #1 + #2 + #3 - #6 }
      }
      {
        \dim_compare:nNnT { #4 } = { #1 + #2 }
          { \dim_set:Nn #6 { \c_zero_dim } }
        \dim_compare:nNnT { #4 } < { #1 + #2 }
          { \dim_set:Nn #6 { #1 + #2 - #4} }
        \dim_compare:nNnT { #4 } > { #1 + #2 }
          {
            \dim_set:Nn #6 { -#1 - #2 + #4}
            \dim_set:Nn #6 { #6*-1}
          }
        \dim_set:Nn #5 { #1 + #2 + #3 - #6 }
      }
  }
\cs_generate_variant:Nn \@@_calc_hspace:NNNNNNN { ccccccc }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Setting second argument of the lists}
%
% \begin{macro}{\@@_list_arg_two_i:,\@@_list_arg_two_ii:,\@@_list_arg_two_iii:,
%               \@@_list_arg_two_iv:,\@@_list_arg_two_v:,}
%   We will \enquote{not set} |\leftmargini|, |\leftmarginii|, |\leftmarginiii| or
%   |\leftmarginiv|, in this case, we will directly set the parameters
%   for vertical and horizontal list spacing per level.
% \iffalse
%% Define "second arg" of list for |enumext| and |keyans|.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \cs_new_protected:cpn { @@_list_arg_two_#1: }
      {
        \@@_calc_hspace:ccccccc
          { l_@@_labelwidth_#1_dim } { l_@@_labelsep_#1_dim }
          { l_@@_listoffset_#1_dim } { l_@@_leftmargin_tmp_#1_dim }
          { l_@@_leftmargin_#1_dim } { l_@@_itemindent_#1_dim }
          { l_@@_leftmargin_tmp_#1_bool }
        \clist_map_inline:nn
          { labelsep, labelwidth, itemindent, leftmargin, rightmargin, listparindent }
          { \dim_set_eq:cc {####1} { l_@@_####1_#1_dim } }
        \clist_map_inline:nn { topsep, parsep, partopsep, itemsep }
          { \skip_set_eq:cc {####1} { l_@@_####1_#1_skip } }
        \usecounter { enumX#1 }
        \setcounter { enumX#1 } { \int_eval:n { \int_use:c { l_@@_start_#1_int } - 1 } }
        \str_if_eq:nnTF {#1} { v }
          {
            \@@_keyans_redefine_item:
            \@@_keyans_make_label:
            \@@_keyans_ref:
            \@@_keyans_fake_item_indent:
            \bool_if:cT { l_@@_show_length_#1_bool }
              {
                \msg_term:nnnn { enumext } { list-lengths-not-nested } { v } { keyans }
              }
          }
          {
            \@@_redefine_item:
            \@@_make_label:
            \@@_standar_ref:
            \@@_fake_item_indent:
            \bool_if:cT { l_@@_show_length_#1_bool }
              {
                \msg_term:nnne { enumext } { list-lengths } {#1}
                  { \int_use:N \l_@@_level_int }
              }
          }
      }
  }
\clist_map_inline:nn { i, ii, iii, iv, v } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_list_arg_two_vii:,\@@_list_arg_two_viii:,}
%   For the horizontal environments \myenv*{enumext*} and \myenv*{keyans*}
%   the implementation is similar, but, the value of |\partopsep| is always
%   \mydim{0pt}. At this point we will modify the \mykey{parsep} key to
%   make it take the value of the \mykey{itemsep} key and later, in the
%   environment definition, we will modify \mykey{parindent} to make it set
%   the value of \mykey{lisparindent} and \mykey{parsep} to set the value
%   of |\parskip| locally.
% \iffalse
%% Define "second arg" of list for |enumext*| and |keyans*|.
% \fi
%    \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:n #1
  {
    \cs_new_protected:cpn { @@_list_arg_two_#1: }
      {
        \bool_set_true:c { l_@@_leftmargin_tmp_#1_bool }
        \dim_zero:c { l_@@_leftmargin_tmp_#1_dim }
        \@@_calc_hspace:ccccccc
          { l_@@_labelwidth_#1_dim } { l_@@_labelsep_#1_dim }
          { l_@@_listoffset_#1_dim } { l_@@_leftmargin_tmp_#1_dim }
          { l_@@_leftmargin_#1_dim } { l_@@_itemindent_#1_dim }
          { l_@@_leftmargin_tmp_#1_bool }
        \clist_map_inline:nn
          { labelsep, labelwidth, itemindent, leftmargin, rightmargin, listparindent }
          { \dim_set_eq:cc {####1} { l_@@_####1_#1_dim } }
        \clist_map_inline:nn { topsep, parsep, partopsep, itemsep }
          { \skip_set_eq:cc {####1} { l_@@_####1_#1_skip } }
        \skip_set_eq:Nc \parsep  { l_@@_itemsep_#1_skip }
        \skip_zero:N \partopsep
        \usecounter { enumX#1 }
        \setcounter { enumX#1 } { \int_eval:n { \int_use:c { l_@@_start_#1_int } - 1 } }
        \@@_starred_ref:
        \str_if_eq:nnTF {#1} { vii }
          {
            \@@_fake_item_indent_vii:
            \bool_if:cT { l_@@_show_length_vii_bool }
              { \msg_term:nnnn { enumext } { list-lengths-not-nested } { vii } { enumext* } }
          }
          {
            \@@_fake_item_indent_viii:
            \bool_if:cT { l_@@_show_length_#1_bool }
              { \msg_term:nnnn { enumext } { list-lengths-not-nested } { #1 } { keyans* } }
          }
      }
  }
\clist_map_inline:nn { vii, viii } { \@@_tmp:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The environment \env{enumext}}\label{env:enumext}
%
% \begin{macro}{\@@_safe_exec:}\label{fun:enumext:safe-exe}
%   The \cs{@@_safe_exec:} function first call the function \cs{@@_is_not_nested:}
%   which sets \cs{g_@@_standar_bool} to \emph{\enquote{true}} if we
%   are NOT nested within \myenv*{enumext*}, then call the function
%   \cs{@@_internal_mini_page:} to create the environment \myvarenv*{__@@_mini_page},
%   we will increment \cs{l_@@_level_int} to restrict nesting of the
%   environment, set \cs{l_@@_standar_bool} to \emph{\enquote{true}} and
%   finally call the function \cs{@@_is_on_first_level:} which sets
%   \cs{l_@@_standar_first_bool} to \emph{\enquote{true}} only if the
%   environment is NOT nested and we are at the \emph{\enquote{first level}}.
% \iffalse
%% Safe exec for |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_safe_exec:
  {
    \@@_is_not_nested:
    \@@_internal_mini_page:
    \int_incr:N \l_@@_level_int
    \int_compare:nNnT { \l_@@_level_int } > { 4 }
      { \msg_fatal:nn { enumext } { list-too-deep } }
    \bool_set_true:N \l_@@_standar_bool
    \bool_set_false:N \l_@@_starred_bool
    \@@_is_on_first_level:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_parse_keys:n}
%  The \cs{@@_parse_store_keys:n} function first we will clear the
%  variable \cs{l_@@_series_str} used by the key \mykey{series} and then
%  we check if we are at the \emph{\enquote{first level}}, if so we
%  process the \mymeta{keys} and then execute the function
%  \cs{@@_parse_series:n} used by the key \mykey{series} and call the
%  function \cs{@@_nested_base_line_fix:} used by the key
%  \mykey{base-fix}, otherwise we will pass the \mymeta{keys} to the inner
%  levels of the environment then we execute the function \cs{@@_store_active_keys:n}
%  and reprocess the \mymeta{keys} to pass them to the \emph{sequence}
%  if the key \mykey{save-key} is not active.
% \iffalse
%% Parse |key=val| and set default series and store keys in seq-name for \printkeyans for |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_parse_keys:n #1
  {
    \tl_if_novalue:nF {#1}
      {
        \str_clear:N \l_@@_series_str
        \int_compare:nNnTF { \l_@@_level_int } = { 1 }
          {
            \keys_set:nn { enumext / level-1 } {#1}
            \@@_parse_series:n {#1}
            \@@_nested_base_line_fix:
          }
          {
            \exp_args:Ne \keys_set:nn
              { enumext / level-\int_use:N \l_@@_level_int } {#1}
          }
        \@@_store_active_keys:n {#1}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_start_store_level:}
%   The \cs{@@_start_store_level:} function activate the \emph{\enquote{storing structure}}
%   mechanism in the \emph{sequence} for the command
%   \ics*{anskey} and the environment \myenv*{anskey*}.
% \iffalse
%% Start storing structure in sequence for |save-ans| key in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_start_store_level:
  {
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_store_active_bool }
        { \bool_not_p:n { \l_@@_keyans_env_bool } }
        { \bool_if_p:N \g_@@_standar_bool }
      }
      {
        \int_compare:nNnT { \l_@@_level_int } > { 1 }
          {
            \bool_set_true:c { l_@@_store_upper_level_ \@@_level: _bool }
            \@@_store_level_open:
          }
      }
%    \end{macrocode}
%   If \myenv*{enumext} are nested in \myenv*{enumext*} add \cs{@@_store_level_open:}
%   to preserve the \emph{\enquote{storing structure}}.
%    \begin{macrocode}
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_store_active_bool }
        { \bool_not_p:n { \l_@@_keyans_env_bool } }
        { \int_compare_p:nNn { \l_@@_level_h_int } = { 1 } }
      }
      {
        \int_compare:nNnT { \l_@@_level_int } > { 0 }
          {
            \bool_set_true:c { l_@@_store_upper_level_ \@@_level: _bool }
            \@@_store_level_open:
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_stop_store_level:}
%   The \cs{@@_stop_store_level:} function stop the \emph{\enquote{storing structure}}
%   mechanism in the \emph{sequence} for the command
%   \ics*{anskey} and the environment \myenv*{anskey*}.
% \iffalse
%% Stop storing structure in sequence for |save-ans| key in |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_stop_store_level:
  {
    \bool_if:cT { l_@@_store_upper_level_ \@@_level: _bool }
      {
        \@@_store_level_close:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_multicols_start:}
%   The function \cs{@@_multicols_start:} will start the
%   \myenv{multicols} environment according to the value passed by the
%   \mykey{columns} key, then set the default value for
%   \ics{columnsep} when \mykey{columns-sep}=\mydim{0pt} and set the
%   value of \ics{multicolsep} equal to zero and leave \ics{columnseprule}
%   equal to zero for inner levels.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_multicols_start:
  {
    \int_compare:nNnT
      { \int_use:c { l_@@_columns_ \@@_level: _int } } > { 1 }
      {
        \dim_compare:nNnT
          { \dim_use:c { l_@@_columns_sep_ \@@_level: _dim } } = { \c_zero_dim }
          {
            \dim_set:cn { l_@@_columns_sep_ \@@_level: _dim }
              {
                ( \dim_use:c { l_@@_labelwidth_ \@@_level: _dim }
                  + \dim_use:c { l_@@_labelsep_ \@@_level: _dim }
                ) / \int_use:c { l_@@_columns_ \@@_level: _int }
                - \dim_use:c { l_@@_listoffset_ \@@_level: _dim }
              }
          }
        \dim_set_eq:Nc \columnsep { l_@@_columns_sep_ \@@_level: _dim  }
        \int_compare:nNnT { \l_@@_level_int } > { 1 }
          {
            \dim_zero:N \columnseprule
          }
%    \end{macrocode}
%   We will calculate the \emph{vertical spacing} settings for the
%   \myenv{multicols} environment using the function \cs{@@_multi_addvspace:},
%   apply our \emph{\enquote{vertical adjust spacing}}, then start the
%   \myenv{multicols} environment.
%    \begin{macrocode}
        \bool_if:cF { l_@@_minipage_active_ \@@_level: _bool }
          {
            \skip_zero:N \multicolsep
            \@@_multi_addvspace:
          }
        \raggedcolumns
        \begin{multicols}{ \int_use:c { l_@@_columns_ \@@_level: _int } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_multicols_stop:}
%   The function \cs{@@_multicols_stop:} will stop the \myenv{multicols}
%   environment and apply our \emph{\enquote{vertical adjust}} spacing.
%   For compatibility with \emph{tagged} \texttt{PDF}, the closing of the
%   \myenv{list} environment is executed here along with \cs{@@_stop_store_level:}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_multicols_stop:
  {
    \int_compare:nNnTF
      { \int_use:c { l_@@_columns_ \@@_level: _int } } > { 1 }
      {
        \@@_stop_list:
        \@@_stop_store_level:
        \end{multicols}
        \@@_unskip_unkern:
        \@@_unskip_unkern:
        \par\addvspace{ \skip_use:c { l_@@_multicols_below_ \@@_level: _skip } }
      }
      {
        \@@_stop_list:
        \@@_stop_store_level:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_before_list:}
%   The function \cs{@@_before_list:} first calls the function
%   \cs{@@_vspace_above:} used by the keys \mykey{above} and
%   \mykey{above*}, then calls the function \cs{@@_before_args_exec:}
%   used by the key \mykey{before*} and finally execute the function
%   \cs{@@_check_ans_active:} for the check answer mechanism.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_list:
  {
    \@@_vspace_above:
    \@@_before_args_exec:
    \@@_check_ans_active:
%    \end{macrocode}
%   When the \mykey{mini-env} key is active it will set the value of the
%   \myvarenv{l__@@_minipage_right_X_dim} to be the \emph{width} of the \myvarenv*{__@@_mini_page}
%   environment on the \emph{\enquote{right side}}, using this value together with the value
%   of the \myvarenv{l__@@_minipage_hsep_X_dim} set by the \mykey{mini-sep} key,
%   the value of \myvarenv{l__@@_minipage_left_X_dim} will be set, which will be
%   the \emph{width} of \myvarenv*{__@@_mini_page} environment on the
%   \emph{\enquote{left side}}, always having a current \ics{linewidth}
%   as \emph{maximum width} between them.
% \iffalse
%% Set |mini-env| width value.
% \fi
%    \begin{macrocode}
    \dim_compare:nNnT
      { \dim_use:c { l_@@_minipage_right_ \@@_level: _dim } } > { \c_zero_dim }
      {
        \dim_set:cn { l_@@_minipage_left_ \@@_level: _dim }
          {
            \linewidth
            - \dim_use:c { l_@@_minipage_right_ \@@_level: _dim }
            - \dim_use:c { l_@@_minipage_hsep_ \@@_level: _dim }
          }
%    \end{macrocode}
%    The boolean variable \myvarenv{l__@@_minipage_active_X_bool} will be
%    activated and the integer variable \cs{g_@@_minipage_stat_int}
%    used by the \ics*{miniright} command will be incremented, then
%    the function \cs{@@_minipage_add_space:} is called and the
%    \myvarenv*{__@@_mini_page} environment on the \emph{\enquote{left
%    side}} will be initialized followed by the \emph{\enquote{vertical spacing}}
%    applied to preserve the \emph{\enquote{baseline}} between the \emph{left}
%    and \emph{right} side environments.
%    After these actions, the function \cs{@@_multicols_start:} is
%    called to handle the \myenv{multicols} environment.
% \iffalse
%% Use internal minipage with |\nointerlineskip| and |\addvspace| here
% \fi
%    \begin{macrocode}
        \bool_set_true:c { l_@@_minipage_active_ \@@_level: _bool }
        \int_gincr:N \g_@@_minipage_stat_int
        \@@_minipage_add_space:
        \noindent
        \@@_mini_page{ \dim_use:c { l_@@_minipage_left_ \@@_level: _dim } }
      }
    \@@_multicols_start:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_second_part:}
%   The function \cs{@@_second_part:} first check the state of
%   the boolean variable \myvarenv{l__@@_minipage_active_X_bool}, if it is
%   \enquote{true} a small test will be executed to check if we have
%   omitted the use of \ics*{miniright} (the \myvarenv*{__@@_mini_page}
%   environment has not been closed), then close \myvarenv*{__@@_mini_page}
%   and add the \emph{adjusted vertical space} \cs{l_@@_minipage_after_skip},
%   otherwise we will close the \myenv{multicols} environment.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_second_part:
  {
    \bool_if:cTF { l_@@_minipage_active_ \@@_level: _bool }
      {
        \int_compare:nNnT { \g_@@_minipage_stat_int } = { 1 }
          {
            \msg_warning:nn { enumext } { missing-miniright }
            \miniright
          }
        \int_gzero:N \g_@@_minipage_stat_int
        \@@_unskip_unkern: % remove topsep + [partopsep]
        \end@@_mini_page
      }
      {
        \@@_multicols_stop:
      }
%    \end{macrocode}
%   Now we will execute the functions \cs{@@_after_stop_list:} used by
%   the key \mykey{after}, \cs{@@_check_ans_key_hook:} used by the key
%   \mykey{check-ans}, \cs{@@_vspace_below:} used by the keys \mykey{below}
%   and \mykey{below*}. Finally set \cs{l_@@_standar_bool} to false and call
%   the function \cs{@@_resume_save_counter:} used by the \mykey{series},
%   \mykey{resume} and \mykey{resume*} keys.
%    \begin{macrocode}
    \@@_after_stop_list:
    \@@_check_ans_key_hook:
    \@@_vspace_below:
    \bool_set_false:N \l_@@_standar_bool
    \@@_resume_save_counter:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_item_width:}\label{dim:item-width-enumext}
%   The function \cs{@@_set_item_width:} will set the value of |\itemwidth|
%   taking into account the value established by the \mykey{list-offset}
%   key for each level of the environment.
% \iffalse
%% Set |\itemwidth| for |enumext| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_set_item_width:
  {
    \dim_set:Nn \itemwidth { \linewidth }
    \dim_compare:nT
      {
        \dim_use:c { l_@@_listoffset_ \_@@_level: _dim } != \c_zero_dim
      }
      {
        \dim_sub:Nn \itemwidth
          {
            \dim_use:c { l_@@_listoffset_ \_@@_level: _dim }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{enumext}
%   Now create the \myenv*{enumext} environment based on \myenv{list}
%   environment by levels.
% \iffalse
%% Definition of |enumext| environment.
% \fi
%    \begin{macrocode}
\NewDocumentEnvironment{enumext}{ O{} }
  {
    \@@_safe_exec:
    \@@_parse_keys:n {#1}
    \@@_before_list:
    \@@_start_store_level:
    \@@_start_list:nn
      { \tl_use:c { l_@@_label_ \@@_level: _tl } }
      {
        \use:c { @@_list_arg_two_ \@@_level: : }
        \@@_before_keys_exec:
      }
    \@@_set_item_width:
    \@@_after_args_exec:
  }
  {
    \@@_second_part:
  }
%    \end{macrocode}
% \end{macro}
%
% As we don't want our check to be executed \mykey{check-ans} by levels
% but on the complete list, we will take it out of the \myenv*{enumext}
% environment using the \emph{\enquote{hook}} function \cs{@@_after_env:nn}.
% \iffalse
%% Execute |check-ans| key out of |enumext| environment.
% \fi
%    \begin{macrocode}
\@@_after_env:nn {enumext}
  {
    \@@_execute_after_env:
  }
%    \end{macrocode}
%
% \subsection{The environment \env{keyans}}\label{env:keyans}
%
% The environment \myenv*{keyans} also based on lists.
% The main differences with the \myenv*{enumext} environment are the
% \emph{nesting} and the way the \emph{answers} (choice) will be stored and checked, this
% environment is intended exclusively for \emph{\enquote{multiple choice questions}}.
%
% \begin{macro}{\@@_keyans_safe_exec:}
%   The \myenv*{keyans} environment will only be available if the
%   \mykey{save-ans} key is active and can only be used at the
%   \emph{\enquote{first level}} within the \myenv*{enumext} environment.
%   We do not want the environment to be nested, so we will set a maximum at this point.
%   If the conditions are not met, an error message will be returned.
% \iffalse
%% Function for check nested level in |keyans| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_safe_exec:
  {
    \bool_if:NF \l_@@_store_active_bool
      {
        \msg_error:nnnn { enumext } { wrong-place }{ keyans }{ save-ans }
      }
    \int_incr:N \l_@@_keyans_level_int
    \bool_set_true:N \l_@@_keyans_env_bool
    \@@_keyans_name_and_start:
    % Set false for interfering with enumext nested in keyans (yes, its possible and crayze)
    \bool_set_false:N \l_@@_store_active_bool
    \int_compare:nNnT { \l_@@_keyans_level_int } > { 1 }
      {
        \msg_error:nn { enumext } { keyans-nested }
      }
    \int_compare:nNnT { \l_@@_level_int } > { 1 }
      {
        \msg_error:nn { enumext } { keyans-wrong-level }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_parse_keys:n}
%    Parse \myoarg{key \textnormal{\textcolor{gray}{=}} val} for
%    \myenv*{keyans} environment.
% \iffalse
%% Function for parse |key=val| in |keyans|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_parse_keys:n #1
  {
    \keys_set:nn { enumext / keyans } {#1}
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_before_list_v:, \@@_keyans_multicols_start:,
%               \@@_keyans_multicols_stop:, \@@_second_part_v:}
%    Same implementation as the one used in the \myenv*{enumext} environment.
% \iffalse
%% Internal functions for |keyans| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_list_v:
  {
    \@@_vspace_above_v:
    \@@_before_args_exec_v:
    \dim_compare:nNnT { \l_@@_minipage_right_v_dim } > { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_minipage_left_v_dim
          {
            \linewidth - \l_@@_minipage_right_v_dim - \l_@@_minipage_hsep_v_dim
          }
        \bool_set_true:N \l_@@_minipage_active_v_bool
        \int_gincr:N \g_@@_minipage_stat_int
        \@@_keyans_minipage_add_space:
        \@@_mini_page{ \l_@@_minipage_left_v_dim }
      }
    \@@_keyans_multicols_start:
  }
\cs_new_protected:Nn \@@_keyans_multicols_start:
  {
    \int_compare:nNnT { \l_@@_columns_v_int } > { 1 }
      {
        \dim_compare:nNnT { \l_@@_columns_sep_v_dim } = { \c_zero_dim }
          {
            \dim_set:Nn \l_@@_columns_sep_v_dim
              {
                (
                  \l_@@_labelwidth_v_dim + \l_@@_labelsep_v_dim
                ) / \l_@@_columns_v_int
               - \l_@@_listoffset_v_dim
              }
          }
        \dim_set_eq:NN \columnsep \l_@@_columns_sep_v_dim
        \dim_zero:N \columnseprule % no rule here
        \bool_if:NF \l_@@_minipage_active_v_bool
          {
            \skip_zero:N \multicolsep
            \@@_keyans_multi_addvspace:
          }
        \raggedcolumns
        \begin{multicols}{ \l_@@_columns_v_int }
      }
  }
\cs_new_protected:Nn \@@_keyans_multicols_stop:
  {
    \int_compare:nNnTF { \l_@@_columns_v_int } > { 1 }
      {
        \@@_stop_list:
        \end{multicols}
        \@@_unskip_unkern:
        \@@_unskip_unkern:
        \par\addvspace{ \l_@@_multicols_below_v_skip }
      }
      {
        \@@_stop_list:
      }
  }
\cs_new_protected:Nn \@@_second_part_v:
  {
    \bool_if:NTF \l_@@_minipage_active_v_bool
      {
        \int_compare:nNnT { \g_@@_minipage_stat_int } = { 1 }
          {
            \msg_warning:nn { enumext } { missing-miniright }
            \miniright
          }
        \int_gzero:N \g_@@_minipage_stat_int
        \@@_unskip_unkern: % remove \topsep + [\partopsep]
        \end@@_mini_page
        \par\addvspace{ \l_@@_minipage_after_skip }
      }
      {
        \@@_keyans_multicols_stop:
      }
    \bool_set_false:N \l_@@_keyans_env_bool
    \@@_after_stop_list_v:
    \@@_vspace_below_v:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_set_item_width:}\label{dim:item-width-keyans}
%   The function \cs{@@_keyans_set_item_width:} will set the value of |\itemwidth|
%   taking into account the value established by the \mykey{list-offset}
%   key.
% \iffalse
%% Set |\itemwidth| for |keyans| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_set_item_width:
  {
    \dim_set:Nn \itemwidth { \linewidth }
    \dim_compare:nT
      {
        \l_@@_listoffset_v_dim != \c_zero_dim
      }
      {
        \dim_sub:Nn \itemwidth { \l_@@_listoffset_v_dim }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{keyans}
%   Now we define the environment \myenv*{keyans} also based on lists.
% \iffalse
%% Definition of |keyans| environment.
% \fi
%    \begin{macrocode}
\NewDocumentEnvironment{keyans}{ O{} }
  {
    \@@_keyans_safe_exec:
    \@@_keyans_parse_keys:n {#1}
    \@@_before_list_v:
    \@@_start_list:nn
      { \tl_use:N \l_@@_label_v_tl }
      {
        \@@_list_arg_two_v:
        \@@_before_keys_exec_v:
      }
    \@@_keyans_set_item_width:
    \@@_after_args_exec_v:
  }
  {
    \@@_check_starred_cmd:n { item }
    \@@_second_part_v:
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Tagging PDF support for non-standart list environments}\label{ltx:tag-nonestandarlist}
%
% The \hologo{LaTeX} release 2022-06-01 brings automatic support for
% \emph{tagged} \texttt{PDF} in several aspects, including the standard \emph{list environments}
% and the \myenv{list} environment. Unfortunately non-standard \emph{list environments}
% like \myenv*{keyanspic} or the horizontal list environments
% \myenv*{enumext*} and \myenv*{keyans*} are not structured in a nice
% way, i.e. the expected result in the \texttt{PDF} file is the expected
% one, but the underlying structure is not correct. In simple terms, for
% \emph{tagged} \texttt{PDF} a \myenv{list} environment is a \myenv{list} environment, no matter
% what it looks like in the \texttt{PDF} file.
%
% \smallskip
%
% To maintain a correct \myenv{list} structure when |\DocumentMetadata| is
% active, it is necessary to do some things manually using
% \mypkg{tagpdf}\cite{tagpdf} and \mypkg{ltsockets}\cite{ltsockets}.
% This implementation is an adaptation of my answer thanks to Ulrike Fischer's
% comments in \href{https://tex.stackexchange.com/a/725902}{How can I modify my \texttt{\textbackslash item} redefinition to be compatible with \texttt{tagging-pdf}}.
%
% \subsubsection{Socket for tagging support in \env{enumext*} and \env{keyans*}}
%
% \begin{macro}[int]{start-list-tags, stop-start-tags, stop-list-tags,
%                    \@@_start_list_tag:n,\@@_stop_start_list_tag:,
%                    \@@_stop_list_tag:n}
%   We will first define the necessary \texttt{sockets} and their
%   behavior for \myenv*{enumext*} and \myenv*{keyans*}.
% \iffalse
%% Implement socket for tagging support in |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\socket_new:nn {tagsupport/@@/starred}{ 1 }
\socket_new_plug:nnn {tagsupport/@@/starred} {start-list-tags}
  {
    \tag_resume:n {#1}
    \tag_mc_end_push:
      \tag_struct_begin:n {tag=LI}
        \tag_struct_begin:n {tag=Lbl}
           \tag_mc_begin:n {tag=Lbl}
  }
\socket_new_plug:nnn {tagsupport/@@/starred} {stop-start-tags}
  {
           \tag_mc_end:
        \tag_struct_end:n {tag=Lbl}
        \tag_struct_begin:n {tag=LBody}
          \tag_struct_begin:n {tag=text-unit}
            \tag_struct_begin:n {tag=text}
  }
\socket_new_plug:nnn {tagsupport/@@/starred} {stop-list-tags}
  {
            \tag_struct_end:n {tag=text}
          \tag_struct_end:n {tag=text-unit}
        \tag_struct_end:n {tag=LBody}
      \tag_struct_end:n {tag=LI}
    \tag_mc_begin_pop:n {}
    \tag_suspend:n {#1}
  }
%    \end{macrocode}
%
% And now we'll wrap them so that they're only active when |\DocumentMetadata| is present.
% \iffalse
%% Wrap socket in conditional functions for tagging |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_start_list_tag:n #1
  {
    \IfDocumentMetadataTF
      {
        \socket_assign_plug:nn {tagsupport/@@/starred} {start-list-tags}
        \socket_use:nn {tagsupport/@@/starred} {#1}
      } {}
   }
\cs_new_protected_nopar:Nn \@@_stop_start_list_tag:
  {
    \IfDocumentMetadataTF
      {
        \socket_assign_plug:nn {tagsupport/@@/starred} {stop-start-tags}
        \socket_use:nn {tagsupport/@@/starred} { }
      } {}
   }
\cs_new_protected_nopar:Npn \@@_stop_list_tag:n #1
  {
    \IfDocumentMetadataTF
      {
        \socket_assign_plug:nn {tagsupport/@@/starred} {stop-list-tags}
        \socket_use:nn {tagsupport/@@/starred} {#1}
      } {}
   }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Socket for tagging support in \env{keyanspic}}
%
% \begin{macro}[int]{start-list-tags, stop-start-tags, stop-list-tags,
%                    \@@_anspic_start_list_tag:,\@@_anspic_stop_start_list_tag:,
%                    \@@_anspic_stop_list_tag:}
%   We will first define the necessary \texttt{sockets} and their
%   behavior for \myenv*{keyanspic} environment.
% \iffalse
%% Implement socket for tagging support in |keyanspic| environment.
% \fi
%    \begin{macrocode}
\socket_new:nn {tagsupport/@@/keyanspic}{ 0 }
\socket_new_plug:nnn {tagsupport/@@/keyanspic} {start-list-tags}
  {
    \tag_resume:n {keyanspic}
    \tag_mc_end_push:
      \tag_struct_begin:n {tag=LI}
        \tag_struct_begin:n {tag=Lbl}
          \tag_mc_begin:n {tag=Lbl}
  }
\socket_new_plug:nnn {tagsupport/@@/keyanspic} {stop-start-tags}
  {
          \tag_mc_end:
        \tag_struct_end:n {tag=Lbl}
        \tag_struct_begin:n {tag=LBody}
          \tag_struct_begin:n {tag=text-unit}
            \tag_struct_begin:n {tag=text}
              \tag_mc_begin:n {tag=text}
  }
\socket_new_plug:nnn {tagsupport/@@/keyanspic} {stop-list-tags}
  {
              \tag_mc_end:
            \tag_struct_end:n {tag=text}
          \tag_struct_end:n {tag=text-unit}
        \tag_struct_end:n {tag=LBody}
      \tag_struct_end:n {tag=LI}
    \tag_mc_begin_pop:n {}
    \tag_suspend:n {keyanspic}
  }
%    \end{macrocode}
%   And now we'll wrap them so that they're only active when
%   |\DocumentMetadata| is present.
% \iffalse
%% Wrap socket in conditional functions for tagging |keyanspic| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_anspic_start_list_tag:
  {
    \IfDocumentMetadataTF
      {
        \socket_assign_plug:nn {tagsupport/@@/keyanspic} {start-list-tags}
        \socket_use:n {tagsupport/@@/keyanspic}
      } {}
   }
\cs_new_protected_nopar:Nn \@@_anspic_stop_start_list_tag:
  {
    \IfDocumentMetadataTF
      {
        \socket_assign_plug:nn {tagsupport/@@/keyanspic} {stop-start-tags}
        \socket_use:n {tagsupport/@@/keyanspic}
      } {}
   }
\cs_new_protected_nopar:Nn \@@_anspic_stop_list_tag:
  {
    \IfDocumentMetadataTF
      {
        \socket_assign_plug:nn {tagsupport/@@/keyanspic} {stop-list-tags}
        \socket_use:n {tagsupport/@@/keyanspic}
      } {}
   }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The environment \env{keyanspic} and \cs{anspic}}
%
% The \myenv*{keyanspic} environment is a \myenv{list} based environment that
% uses the same configuration for \emph{\enquote{spacing}} and \mymeta{label}
% as the \myenv*{keyans} environment, but it does not use |\item|.
% The \mymeta{contents} are passed to the environment by means of the
% \ics*{anspic} command as replacement for |\item| command and placed
% inside \myenv{minipage} environments, with the \mymeta{label}
% centered \emph{\enquote{above}} or \emph{\enquote{below}}, adjusting
% \emph{widths} and \emph{position} according to the options passed to
% the environment.
%
% \begin{figure}[ht]
%   \centering
%   \begin{tikzpicture}[line cap=round,line join=round,x=0.8cm,y=0.8cm,every node/.style={font=\footnotesize}]
%     % space above
%     \draw[color=white] (7.0,6.10) rectangle (17.5,6.5) node[pos=.5,text=black]%
%       { \textcolor{optcolor}{\texttt{layout-top}} };
%     % space between
%     \draw[color=white] (7.0,4.5) rectangle (17.5,4.9) node[pos=.5,text=black]%
%       { \textcolor{optcolor}{\texttt{layout-sep}} };
%     % space below
%     \draw[color=white] (7.0,2.9) rectangle (17.5,3.3) node[pos=.5,text=black]%
%       { \textcolor{optcolor}{\texttt{layout-top}} };
%     % labelwidth
%     \draw[<->,color=gray] (2.0,7.0) --node[above,text=optcolor]{\vphantom{p}\texttt{labelwidth}} (5.0,7.0);
%     \draw[<->,color=gray] (5.0,7.0) --node[above,text=optcolor]{\texttt{labelsep}} (7.0,7.0);
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,6.5) rectangle (5.0,6.85);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,6.5) rectangle (7.0,6.85);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,6.5) rectangle (17.5,6.85);% item width
%     % minipage one
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,5.25) rectangle (10.5,6.10) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \texttt{minipage one} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     % label one
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,4.9) rectangle (10.5,5.25) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     % minipage two
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (10.5,5.25) rectangle (14,6.10) node[pos=.5,text=black]%
%       {\begin{tabular}{c}
%          \texttt{minipage two} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     % label two
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (10.5,4.9) rectangle (14,5.25) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     % minipage three
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (14,5.25) rectangle (17.5,6.10) node[pos=.5,text=black]%
%      {\begin{tabular}{c}
%          \texttt{minipage three} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     % label three
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (14,4.9) rectangle (17.5,5.25) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     % minipage four
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,3.65) rectangle (12.25,4.5) node[pos=.5,text=black]%
%      {\begin{tabular}{c}
%          \texttt{minipage four} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     % label four
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,3.3) rectangle (12.25,3.65) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     % minipage five
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (12.25,3.65) rectangle (17.5,4.5) node[pos=.5,text=black]%
%      {\begin{tabular}{c}
%          \texttt{minipage five} \\
%          \textcolor{blue}{\emph{drawing or tabular}}
%        \end{tabular}};
%     % label five
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (12.25,3.3) rectangle (17.5,3.65) node[pos=.5,text=black]%
%       { \textcolor{blue}{\texttt{label}} };
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (2.0,2.55) rectangle (5.0,2.9);% labelwidth
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (5.0,2.55) rectangle (7.0,2.9);% labelsep
%     \draw[color=lightgray,fill=lightgray,fill opacity=0.15] (7.0,2.55) rectangle (17.5,2.9);% item width
%   \end{tikzpicture}
%   \caption{Representation of the \myenv*{keyanspic} spacing in \mypkg*{enumext}.}
%   \label{fig:keyanspic}
% \end{figure}
%
% \smallskip
%
% In order for the \myenv*{keyanspic} environment and the |\anspic|
% command to work correctly, we need to set and export some variables in
% the first part of the environment definition and pass them to |\anspic|
% which is executed in the second part of the environment. This
% implementation is adapted from the answer given by Enrico Gregorio
% (\texttt{@egreg}) in \href{https://tex.stackexchange.com/a/577705/7832}{How to process the body of an environment and divide it by a \textbackslash macro?}.
%
% \subsubsection{The environment \env{keyanspic}}\label{env:keyanspic}
%
% \begin{macro}[int]{label-pos, label-sep, layout-sty, layout-sep,
%                   layout-top, mark-ans, mark-pos, mark-sep, save-sep,
%                   wrap-opt, wrap-ans*, show-ans, show-pos}
%   First we define the key that allows us to process the position of the
%   \mymeta{label} centered \enquote{above} or \enquote{below} which will be \mykey{label-pos},
%   the vertical separation of these from \emph{drawing or tabular} will be
%   handled with the key \mykey{label-sep}.
%   The \emph{\enquote{layout style}} will be handled with the key
%   \mykey{layout-sty} will take two values ​​separated by comma \mymarg{n°
%   upper, n° lower} and will determine the number of \myenv{minipage}
%   environments in which all arguments of |\anspic| will be printed at the
%   \enquote{upper} and \enquote{lower} within the environments separated
%   by the value of the key \mykey{layout-sep}. The vertical space
%   \enquote{top} and \enquote{bottom} of the environment will be handled
%   with the key \mykey{layout-top}.
% \iffalse
%% Add keys for |keyanspic| environment.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext / keyanspic }
  {
    label-pos .choice:,
    label-pos / above   .code:n =
                              \bool_set_true:N \l_@@_anspic_label_above_bool
                              \str_set:Nn \l_@@_anspic_mini_pos_str { t },
    label-pos / below   .code:n =
                              \bool_set_false:N \l_@@_anspic_label_above_bool
                              \str_set:Nn \l_@@_anspic_mini_pos_str { b },
    label-pos / unknown .code:n =
                              \msg_error:nneee { enumext } { unknown-choice }
                                { label-pos } { above,~ below } { \exp_not:n {#1} },
    label-pos  .initial:n        = below,
    label-pos  .value_required:n = true,
    label-sep  .skip_set:N       = \l_@@_anspic_label_sep_skip,
    label-sep  .value_required:n = true,
    layout-sty .tl_set:N         = \l_@@_anspic_layout_style_tl,
    layout-sty .value_required:n = true,
    layout-sep .code:n           = \keys_set:nn { enumext / keyans } { parsep = #1 },
    layout-sep .value_required:n = true,
    layout-top .code:n           = \keys_set:nn { enumext / keyans } { topsep = #1 },
    layout-top .value_required:n = true,
    mark-ans   .code:n           = \keys_set:nn { enumext / keyans } { mark-ans = #1 },
    mark-ans   .value_required:n = true,
    mark-pos   .code:n           = \keys_set:nn { enumext / keyans } { mark-pos = #1 },
    mark-pos   .value_required:n = true,
    mark-sep   .code:n           = \keys_set:nn { enumext / keyans } { mark-sep = #1 },
    mark-sep   .value_required:n = true,
    save-sep   .code:n           = \keys_set:nn { enumext / keyans } { save-sep = #1 },
    save-sep   .value_required:n = true,
    wrap-opt   .code:n           = \keys_set:nn { enumext / keyans } { wrap-opt = #1 },
    wrap-opt   .value_required:n = true,
    wrap-ans*   .code:n           = \keys_set:nn { enumext / keyans } { wrap-ans* = #1 },
    wrap-ans*   .value_required:n = true,
    show-ans   .code:n           = \keys_set:nn { enumext / keyans } { show-ans = #1 },
    show-ans   .value_required:n = true,
    show-pos   .code:n           = \keys_set:nn { enumext / keyans } { show-pos = #1 },
    show-pos   .value_required:n = true,
    unknown    .code:n           = {
                                     \tl_set:Nn \l_@@_envir_name_tl { keyanspic }
                                     \@@_keyans_unknown_keys:n {#1}
                                   },
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_pic_safe_exec:, \@@_keyans_pic_parse_keys:n,
%               \@@_keyans_pic_skip_abs:N, \@@_keyans_pic_arg_two:,}
%   The function \cs{@@_keyans_pic_safe_exec:} check the nested level
%   position inside the \myenv*{enumext} environment.
% \iffalse
%% Internal check code for |keyanspic| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_pic_safe_exec:
  {
    \int_incr:N \l_@@_keyans_pic_level_int
    \int_compare:nNnT { \l_@@_keyans_pic_level_int } > { 1 }
      {
        \msg_error:nn { enumext } { keyanspic-nested }
      }
    \@@_keyans_name_and_start:
  }
%    \end{macrocode}
%   Parse \myoarg{key \textnormal{\textcolor{gray}{=}} val} for
%   \myenv*{keyanspic} environment.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_pic_parse_keys:n #1
  {
    \tl_if_novalue:nF {#1}
      {
        \keys_set:nn { enumext / keyanspic } {#1}
      }
  }
%    \end{macrocode}
%   The function \cs{@@_keyans_pic_skip_abs:N} will return a positive
%   value \ics{parsep} from \myenv*{keyans} environment.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_pic_skip_abs:N #1
  {
    \dim_compare:nNnT { #1 } < { \c_zero_dim }
      {
        \skip_set:Nn #1 { -#1 }
      }
  }
%    \end{macrocode}
%   The \cs{@@_keyans_pic_arg_two:} function will be used in the
%   \emph{second argument} of the \myenv{list} environment that defines
%   the \myenv*{keyanspic} environment, with this we will take the
%   configuration of the \emph{\enquote{spaces}} and the keys
%   \mykey{label}, \mykey{wrap-label}, \mykey{parsep} and \mykey{topsep}
%   from the \myenv*{keyans} environment.
%   The first thing we need to do is set the boolean variable
%   \cs{l_@@_leftmargin_tmp_v_bool} handled by the \mykey{list-indent} key
%   to \enquote{false}, then copy the definition of the second list argument
%   from the \myenv*{keyans} environment definition and make sure that
%   |\parsep| does not have a negative value.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_pic_arg_two:
  {
    \bool_set_false:N \l_@@_leftmargin_tmp_v_bool
    \@@_list_arg_two_v:
    \@@_keyans_pic_skip_abs:N \parsep
%    \end{macrocode}
%   Now we increment the counter |enumXv| of the \myenv*{keyans} environment
%   and save the \emph{total height} of the \mymeta{label} in
%   \cs{l_@@_anspic_label_htdp_dim} used by |\anspic| and we will adjust
%   the values ​​of |\parsep| only if the key \mykey{label-pos} is set to \emph{below}.
%    \begin{macrocode}
    \bool_if:NF \l_@@_anspic_label_above_bool
      {
        \stepcounter { enumXv }
        \hbox_set:Nn \l_@@_anspic_label_box { \l_@@_label_v_tl }
        \dim_set:Nn \l_@@_anspic_label_htdp_dim
          {
            \box_ht_plus_dp:N \l_@@_anspic_label_box
          }
        \skip_add:Nn \parsep
          {
            \l_@@_anspic_label_htdp_dim
            + \box_dp:N \strutbox
            + \l_@@_anspic_label_sep_skip
          }
      }
%    \end{macrocode}
%   Finally we \emph{adjust} the value of |\leftmargin| and |\topsep|
%   then set |\listparindent|, |\partopsep| and |\itemsep| to zero so that
%   the \emph{horizontal} and \emph{vertical} space is not affected.
%    \begin{macrocode}
    \dim_add:Nn \leftmargin { -\l_@@_labelwidth_v_dim - \l_@@_labelsep_v_dim }
    \ignorespaces
    \skip_add:Nn \topsep { 0.5\box_dp:N \strutbox }
    \dim_zero:N  \listparindent
    \skip_zero:N \partopsep
    \skip_zero:N \itemsep
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{keyanspic}
%   Now we define the environment \myenv*{keyanspic}. For compatibility
%   with \emph{tagged} \texttt{PDF} we must use the |\begin{|\myenv{list}|}|
%   form and a lot of conditional code using |\IfDocumentMetadataTF|.
%   We will first stop the code for automatic \emph{tagged} \texttt{PDF}
%   for \myenv{list} environments, redefine |\item| so that it cannot be
%   used, and stop the code for automatic \emph{tagged} \texttt{PDF} for
%   the \myenv*{keyanspic} environment.
% \iffalse
%% Define |keyanspic| environment.
% \fi
%    \begin{macrocode}
\NewDocumentEnvironment{keyanspic}{ o }
  {
    \@@_keyans_pic_safe_exec:
    \@@_keyans_pic_parse_keys:n {#1}
    \begin{list} { } { \@@_keyans_pic_arg_two: }
    \IfDocumentMetadataTF
      {
        \tag_suspend:n {list}
      }{}
    \item[] \scan_stop:
    \RenewDocumentCommand \item {}
      {
        \msg_error:nn { enumext } { keyanspic-item-cmd }
      }
    \IfDocumentMetadataTF
      {
        \tag_resume:n {keyanspic}
        \tag_tool:n {para/tagging=false}
        \tag_suspend:n {keyanspic}
      } { }
  }
%    \end{macrocode}
%   In the second part of the environment definition we will manually place
%   our code for \emph{tagged} \texttt{PDF} and execute the command
%   |\anspic| using the \cs{@@_anspic_exec:} function.
%    \begin{macrocode}
  {
    \IfDocumentMetadataTF
      {
        \tag_resume:n {keyanspic}
        \tag_mc_end_push:
        \tag_struct_begin:n {tag=L,attribute=enumerate}
      } { }
    \@@_anspic_exec:
    \IfDocumentMetadataTF
      {
        \tag_suspend:n {keyanspic}
      } { }
    \end{list}
    \IfDocumentMetadataTF
      {
        \tag_struct_end:n {tag=L}
        \tag_mc_begin_pop:n {}
        \tag_struct_end:n {tag=L}
        \tag_mc_begin_pop:n {}
      } { }
%    \end{macrocode}
%   Finally we check if \ics*{anspic*} has been used, set the counter |enumXvi|
%   to zero and apply our \enquote{adjusted} vertical space bottom.
%    \begin{macrocode}
    \@@_check_starred_cmd:n { anspic }
    \setcounter { enumXvi } { 0 }
    \bool_if:NTF \l_@@_anspic_label_above_bool
      {
        \par\addvspace{ 0.5\box_dp:N \strutbox }
      }
      {
        \par
        \addvspace
          {
            \dim_eval:n
              {
                \l_@@_anspic_label_htdp_dim + \box_ht_plus_dp:N \strutbox
                + \l_@@_anspic_label_sep_skip + \l_@@_topsep_v_skip
              }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The command \cs{anspic}}\label{cmd:anspic}
% The \ics*{anspic} command take three arguments, the \emph{starred versions} \ics*{anspic*}\myoarg{content}
% \emph{store} the current \mymeta{label} next to the \emph{optional argument}
% \myoarg{content} in the \emph{sequence} and \emph{prop list}
% defined by \mykey{save-ans} key. The third \emph{mandatory argument}
% \mymarg{drawing or tabular} is NOT \emph{stored} in the \emph{sequence} or
% \emph{prop list}.
%
% \begin{important}
% One of the complications here to make the \myenv*{keyanspic}
% environment compatible with \emph{tagged} PDF is the position of
% \mymeta{label}, the \ics*{anspic} command processes the arguments in
% order, where |#1| and |#2| correspond to \mymeta{label} and |#3| to the
% mandatory argument and puts all this inside a \myenv{minipage}
% environment. If |#1| and |#2|, that is \mymeta{label}, is above |#3|
% there are no problems with \emph{tagged} PDF, but if |#3| comes first
% the list created with \emph{tagged} PDF will not be correct.
% \end{important}
%
% \begin{macro}{\anspic, \@@_anspic_body_dim:n, \@@_anspic_label:nn,
%               \@@_anspic_label_pos:nnn, \@@_anspic_args:nnn,
%               \@@_anspic_print:n, \@@_anspic_print:e, \@@_anspic_print:V,
%               \@@_anspic_row:n, @@_anspic_exec:,}
%   We check that the command is active in the \myenv*{keyanspic}
%   environment only if the \mykey{save-ans} key is present, otherwise
%   we return an error.
%   The three arguments are handled by the function \cs{@@_anspic_args:nnn}
%   and stored in the sequence \cs{l_@@_anspic_args_seq} which is processed
%   by the \myenv*{keyanspic} environment.
% \iffalse
%% Define |\anspic| for |keyanspic| environment.
% \fi
%    \begin{macrocode}
\NewDocumentCommand \anspic { s o +m }
  {
    \bool_if:NF \l_@@_store_active_bool
      {
        \msg_error:nnnn { enumext } { wrong-place }{ keyanspic }{ save-ans }
      }
    \int_compare:nNnT { \l_@@_level_int } > { 1 }
      {
        \msg_error:nn { enumext } { keyanspic-wrong-level }
      }
    \int_compare:nNnT { \l_@@_keyans_level_int } = { 1 }
      {
        \msg_error:nnnn { enumext } { command-wrong-place }{ anspic }{ keyans }
      }
    \seq_put_right:Nn \l_@@_anspic_args_seq
      {
        \@@_anspic_args:nnn { #1 } { #2 } { #3 }
      }
  }
%    \end{macrocode}
%   The \cs{@@_anspic_body_dim:n} function will set the value of
%   \cs{l_@@_anspic_body_htdp_dim} equal to the \enquote{height plus depth}
%   of the \emph{mandatory argument} if the key \mykey{label-pos} is set
%   \enquote{below}.
% \iffalse
%% Set the height plus depth off body arg in dim var for |\anspic|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anspic_body_dim:n #1
  {
    \bool_if:NF \l_@@_anspic_label_above_bool
      {
        \IfDocumentMetadataTF
          {
            \tag_suspend:n {keyanspic}
          } { }
        \vbox_set:Nn \l_@@_anspic_body_box { #1 }
        \dim_set:Nn \l_@@_anspic_body_htdp_dim
          {
            \box_ht_plus_dp:N \l_@@_anspic_body_box
          }
        \IfDocumentMetadataTF
          {
            \tag_resume:n {keyanspic}
          } { }
      }
  }
%    \end{macrocode}
%   The \cs{@@_anspic_label:nn} function will process inside |\makebox| the
%   \emph{starred argument} ‘|*|’ and \emph{optional argument} passed
%   to the command. Here we will store the \mymeta{label} and
%   \emph{optional argument} in \emph{prop list} and \emph{sequence}
%   and execute the \mykey{show-ans}, \mykey{show-pos}, \mykey{font},
%   \mykey{wrap-label}, \mykey{wrap-ans*} and \mykey{wrap-opt} keys.
% \iffalse
%% Process and store label and [opt] for |\anspic|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anspic_label:nn #1 #2
  {
    \makebox[ \l_@@_anspic_mini_width_dim ][ c ]
      {
        \bool_if:nTF { #1 }
          {
            \bool_set_true:N \l_@@_item_wrap_key_bool
            \bool_set_true:N \l_@@_wrap_label_v_bool
            \@@_keyans_save_item_opt:n { #2 }
            \@@_keyans_addto_prop:n { #2 }
            \@@_keyans_store_ref:
            \@@_keyans_addto_seq:n { #2 }
            \int_gincr:N \g_@@_check_starred_cmd_int
            \@@_keyans_show_ans:
            \@@_keyans_show_pos:
            \makebox[ \l_@@_labelwidth_v_dim ][c]
              {
                \tl_use:N \l_@@_label_font_style_v_tl
                \@@_keyans_wrapper_label:n { \l_@@_label_vi_tl }
              }
            \skip_horizontal:n { \l_@@_labelsep_v_dim }
            \@@_keyans_show_item_opt:
          }
          {
            \bool_set_false:N \l_@@_item_wrap_key_bool
            \tl_use:N \l_@@_label_font_style_v_tl
            \@@_wrapper_label_v:n { \l_@@_label_vi_tl }
          }
      }
  }
%    \end{macrocode}
%   The function \cs{@@_anspic_label_pos:nnn} will be in charge of
%   handling the \emph{\enquote{counter}} and the position of the \mymeta{label},
%   set by \mykey{label-pos} key which will have the same configuration
%   as the \myenv*{keyans} environment.
% \iffalse
%% Set position of labels for |\anspic|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_anspic_label_pos:nnn #1 #2 #3
  {
    \stepcounter { enumXvi }
    \@@_anspic_body_dim:n { #3 }
    \bool_if:NTF \l_@@_anspic_label_above_bool
      {
        \@@_anspic_label:nn { #1 } { #2 }
      }
      {
        \raisebox
          {
            -\dim_eval:n
              {
                \l_@@_anspic_label_htdp_dim
                + \l_@@_anspic_body_htdp_dim
                + \box_dp:N \strutbox
                + \l_@@_anspic_label_sep_skip
              }
          }
          [ 0pt ] [ 0pt ]
          {
            \@@_anspic_label:nn { #1 } { #2 }
          }
      }
  }
%
%    \end{macrocode}
%   The \cs{@@_anspic_args:nnn} function will be responsible for placing
%   the code compatible with \emph{tagged} \texttt{PDF} and the arguments
%   within the \cs{l_@@_anspic_args_seq} sequence which will be processed
%   by the \cs{@@_anspic_print:n} function in the second part of the
%   definition of the \myenv*{keyanspic} environment.
% \iffalse
%% Process all code for |\anspic| with tagging PDF support.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anspic_args:nnn
  {
    \@@_anspic_start_list_tag:
    \@@_anspic_label_pos:nnn { #1 } { #2 } { #3 }
    \@@_anspic_stop_start_list_tag:
    \bool_if:NTF \l_@@_anspic_label_above_bool
      {
        \\[\l_@@_anspic_label_sep_skip] #3
      }
      {
        \\ #3
      }
    \@@_anspic_stop_list_tag:
  }
%    \end{macrocode}
%   The value \mymarg{n° upper, n° lower} passed to the \mykey{layout-sty}
%   key is split by comma and is handled directly by the function
%   \cs{@@_anspic_print:n} and passed to the function \cs{@@_anspic_row:n}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anspic_print:n
  {
    \clist_map_function:nN { #1 } \@@_anspic_row:n
  }
\cs_generate_variant:Nn \@@_anspic_print:n { e, V }
%    \end{macrocode}
%   The function \cs{@@_anspic_row:n} will set the \emph{widths} for the
%   \myenv{minipage} environments and place \emph{all arguments} passed
%   to |\anspic| \emph{saved} in the \cs{l_@@_anspic_args_seq} sequence
%   inside them.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anspic_row:n
  {
    \dim_set:Nn \l_@@_anspic_mini_width_dim { \linewidth / #1 }
    \int_set:Nn \l_@@_anspic_above_int { \l_@@_anspic_below_int }
    \int_set:Nn \l_@@_anspic_below_int { \l_@@_anspic_above_int + #1 }
    \int_step_inline:nnn
      { \l_@@_anspic_above_int + 1 }
      { \l_@@_anspic_below_int }
      {
        \IfDocumentMetadataTF
          {
            \tag_suspend:n {minipage}
          } { }
        \begin{minipage}[ \l_@@_anspic_mini_pos_str ]{ \l_@@_anspic_mini_width_dim }
          \centering
          \seq_item:Nn \l_@@_anspic_args_seq { ##1 }
        \end{minipage}
        \IfDocumentMetadataTF
          {
            \tag_resume:n {minipage}
          } { }
      }
    \par
  }
%    \end{macrocode}
%   The \cs{@@_anspic_exec:} function will execute all the code in the
%   |\anspic| command in the second argument of the |keyanspic| environment
%   definition. If the key \mykey{layout-sty} is not set, everything will
%   be printed on a \emph{single line}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_anspic_exec:
  {
    \tl_if_empty:NTF \l_@@_anspic_layout_style_tl
      {
        \@@_anspic_print:e { \seq_count:N \l_@@_anspic_args_seq }
      }
      {
        \@@_anspic_print:V \l_@@_anspic_layout_style_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The horizontal environments}\label{env:horizontal}
%
% Generating \emph{horizontal list environments} is NOT as simple as standard
% \hologo{LaTeX} list environments. The fundamental part of the code is adapted
% from the \mypkg{shortlst} package to a more modern version using \mypkg{expl3}.
% It is not possible to redefine |\item| and \ics{makelabel} using |\RenewDocumentCommand| as in
% the vertical \emph{non starred} versions.
%
% \smallskip
%
% To achieve the \emph{horizontal list environments} we will capture the |\item|
% command and the \mymeta{content} of this in \emph{horizontal box} using \ics{makebox} for
% the \mykey{label} and a \myenv{minipage} environment for the \mymeta{content} passed to
% |\item|, we will also add the \emph{optional argument} \myparg{number} to |\item|
% to be able to \emph{join columns} horizontally, in simple terms, we want
% |\item| to behave in the same way as in the \myenv*{enumext} environment but
% adding an \emph{first optional argument} \myparg{number}.
%
% \smallskip
%
% A side effect is the limitation of using |\item| in this way \emph{without}
% using |\RenewDocumentCommand|, which loses the original definition and
% affects the \emph{standard list environments} provided by \hologo{LaTeX}
% and any environment defined using base \myenv{list} environment, including:
% \myenv{itemize}, \myenv{enumerate}, \myenv{description}, \myenv{quote},
% \myenv{quotation}, \myenv{verse}, \myenv{center}, \myenv{flushleft},
% \myenv{flushright}, \myenv{verbatim}, \myenv{tabbing}, \myenv{trivlist},
% \myenv{list}  and all environments created with |\newtheorem|.
%
% \smallskip
%
% \begin{important}*
% One way to get around this is to use something like:
%
% \begin{Verbatim}
%      \AddToHook{env/enumerate/before}{recover original \item definition}
% \end{Verbatim}
%
% inside \myenv{minipage}, but in my partial tests this does not have the
% desired effect and the vertical and horizontal spacing is distorted.
% For now this will remain as a limitation and I will see if it is
% feasible to implement it in the future.
% \end{important}
%
% \smallskip
%
% \begin{important}
%   For compatibility with the \emph{tagged} \texttt{PDF} we close
%   the environments according to the presence or not of the \mykey{mini-env} key.
% \end{important}
%
% \subsubsection{Functions for item box width}
%
% \begin{macro}{\@@_starred_columns_set_vii:, \@@_starred_columns_set_viii:,}
%   We set the default value for the \emph{width of the box} containing the
%   \mymeta{content} of the items for \myenv*{enumext*} environment.
% \iffalse
%% Define default item width (columns width) for |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_starred_columns_set_vii:
  {
    \dim_compare:nNnT { \l_@@_columns_sep_vii_dim } = { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_columns_sep_vii_dim
          {
            ( \l_@@_labelwidth_vii_dim + \l_@@_labelsep_vii_dim )
            / \l_@@_columns_vii_int
          }
      }
    \int_set:Nn \l_@@_tmpa_vii_int { \l_@@_columns_vii_int - 1 }
    \dim_set:Nn \l_@@_item_width_vii_dim
      {
        ( \linewidth - \l_@@_columns_sep_vii_dim * \l_@@_tmpa_vii_int )
        / \l_@@_columns_vii_int
        - \l_@@_labelwidth_vii_dim
        - \l_@@_labelsep_vii_dim
      }
%    \end{macrocode}
%  When the key \mykey{rightmargin} is active we must adjust the values.
%    \begin{macrocode}
    \dim_compare:nNnT { \l_@@_rightmargin_vii_dim } > { \c_zero_dim }
      {
        \dim_sub:Nn \l_@@_item_width_vii_dim
          {
            ( \l_@@_rightmargin_vii_dim * \l_@@_tmpa_vii_int )
            / \l_@@_columns_vii_int
          }
        \dim_add:Nn \l_@@_columns_sep_vii_dim
          {
            \l_@@_rightmargin_vii_dim
          }
      }
  }
%    \end{macrocode}
%  Same implementation for the \myenv*{keyans*} environment.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_starred_columns_set_viii:
  {
    \dim_compare:nNnT { \l_@@_columns_sep_viii_dim } = { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_columns_sep_viii_dim
          {
            ( \l_@@_labelwidth_viii_dim + \l_@@_labelsep_viii_dim )
            / \l_@@_columns_viii_int
          }
      }
    \int_set:Nn \l_@@_tmpa_viii_int { \l_@@_columns_viii_int - 1 }
    \dim_set:Nn \l_@@_item_width_viii_dim
      {
        ( \linewidth - \l_@@_columns_sep_viii_dim * \l_@@_tmpa_viii_int )
        / \l_@@_columns_viii_int
        - \l_@@_labelwidth_viii_dim
        - \l_@@_labelsep_viii_dim
      }
    \dim_compare:nNnT { \l_@@_rightmargin_viii_dim } > { \c_zero_dim }
      {
        \dim_sub:Nn \l_@@_item_width_viii_dim
          {
            ( \l_@@_rightmargin_viii_dim * \l_@@_tmpa_vii_int )
            / \l_@@_columns_viii_int
          }
        \dim_add:Nn \l_@@_columns_sep_viii_dim
          {
            \l_@@_rightmargin_viii_dim
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for join item columns}
%
% \begin{macro}{\@@_starred_joined_item_vii:n, \@@_starred_joined_item_viii:n,}
%   The functions \cs{@@_starred_joined_item_vii:n} and \cs{@@_starred_joined_item_viii:n}
%   will set the \emph{width} of the box in which the \mymeta{content}
%   passed to \ics*{item}\myparg{columns} will be stored together with
%   the value of |\itemwidth| for the \myenv*{enumext*} environment.
% \iffalse
%% Set width for joined item's for |enumext*| and |keyans*| environments.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_joined_item_vii:n #1
  {
    \int_set:Nn \l_@@_joined_item_vii_int {#1}
    \int_compare:nNnT { \l_@@_joined_item_vii_int } > { \l_@@_columns_vii_int }
      {
        \msg_warning:nnee { enumext } { item-joined }
          { \int_use:N \l_@@_joined_item_vii_int }
          { \int_use:N \l_@@_columns_vii_int }
        \int_set:Nn \l_@@_joined_item_vii_int
          {
            \l_@@_columns_vii_int - \l_@@_item_column_pos_vii_int + 1
          }
      }
    \int_compare:nNnT
      { \l_@@_joined_item_vii_int }
        >
      { \l_@@_columns_vii_int - \l_@@_item_column_pos_vii_int + 1 }
      {
        \msg_warning:nnee { enumext } { item-joined-columns }
          { \int_use:N \l_@@_joined_item_vii_int }
          {
            \int_eval:n
              { \l_@@_columns_vii_int - \l_@@_item_column_pos_vii_int + 1 }
          }
        \int_set:Nn \l_@@_joined_item_vii_int
          {
            \l_@@_columns_vii_int - \l_@@_item_column_pos_vii_int + 1
          }
      }
    \int_compare:nNnTF { \l_@@_joined_item_vii_int } > { 1 }
      {
        \int_set_eq:NN \l_@@_joined_item_aux_vii_int \l_@@_joined_item_vii_int
        \int_decr:N \l_@@_joined_item_aux_vii_int
        \int_add:Nn \l_@@_item_column_pos_vii_int { \l_@@_joined_item_aux_vii_int }
        \int_gadd:Nn \g_@@_item_count_all_vii_int { \l_@@_joined_item_aux_vii_int }
        \dim_set:Nn \l_@@_joined_width_vii_dim
          {
            \l_@@_item_width_vii_dim * \l_@@_joined_item_vii_int
            + (  \l_@@_labelwidth_vii_dim + \l_@@_labelsep_vii_dim
               + \l_@@_columns_sep_vii_dim
              )*\l_@@_joined_item_aux_vii_int
          }
        \dim_set_eq:NN \itemwidth \l_@@_joined_width_vii_dim
      }
      {
        \dim_set_eq:NN \l_@@_joined_width_vii_dim \l_@@_item_width_vii_dim
        \dim_set_eq:NN \itemwidth \l_@@_item_width_vii_dim
      }
  }
%    \end{macrocode}
%   Same implementation for the \myenv*{keyans*} environment.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_joined_item_viii:n #1
  {
    \int_set:Nn \l_@@_joined_item_viii_int {#1}
    \int_compare:nNnT { \l_@@_joined_item_viii_int } > { \l_@@_columns_viii_int }
      {
        \msg_warning:nnee { enumext } { item-joined }
          { \int_use:N \l_@@_joined_item_viii_int }
          { \int_use:N \l_@@_columns_viii_int }
        \int_set:Nn \l_@@_joined_item_viii_int
          {
            \l_@@_columns_viii_int - \l_@@_item_column_pos_viii_int + 1
          }
      }
    \int_compare:nNnT
      { \l_@@_joined_item_viii_int }
        >
      { \l_@@_columns_viii_int - \l_@@_item_column_pos_viii_int + 1 }
      {
        \msg_warning:nnee { enumext } { item-joined-columns }
          { \int_use:N \l_@@_joined_item_viii_int }
          {
            \int_eval:n
              { \l_@@_columns_viii_int - \l_@@_item_column_pos_viii_int + 1 }
          }
        \int_set:Nn \l_@@_joined_item_viii_int
          {
            \l_@@_columns_viii_int - \l_@@_item_column_pos_viii_int + 1
          }
      }
    \int_compare:nNnTF { \l_@@_joined_item_viii_int } > { 1 }
      {
        \int_set_eq:NN \l_@@_joined_item_aux_viii_int \l_@@_joined_item_viii_int
        \int_decr:N \l_@@_joined_item_aux_viii_int
        \int_add:Nn \l_@@_item_column_pos_viii_int { \l_@@_joined_item_aux_viii_int }
        \int_gadd:Nn \g_@@_item_count_all_viii_int { \l_@@_joined_item_aux_viii_int }
        \dim_set:Nn \l_@@_joined_width_viii_dim
          {
            \l_@@_item_width_viii_dim * \l_@@_joined_item_viii_int
            + ( \l_@@_labelwidth_viii_dim + \l_@@_labelsep_viii_dim
                + \l_@@_columns_sep_viii_dim
              )*\l_@@_joined_item_aux_viii_int
          }
        \dim_set_eq:NN \itemwidth \l_@@_joined_width_viii_dim
      }
      {
        \dim_set_eq:NN \l_@@_joined_width_viii_dim \l_@@_item_width_viii_dim
        \dim_set_eq:NN \itemwidth \l_@@_item_width_viii_dim
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Functions for \texttt{mini-env}, \texttt{mini-right} and \texttt{mini-right*} keys}\label{env:starred:key:mini-env}
%
% \begin{macro}{\@@_start_mini_vii:, \@@_stop_mini_vii:}
%   The implementation of the \mykey{mini-env} key support is almost
%   identical to the one used in the \myenv*{enumext} and \myenv*{keyans}
%   environments, the difference is that the \myvarenv*{__@@_mini_page}
%   environment on the \emph{\enquote{right side}} is executed
%   \emph{\enquote{after}} closing the environment, so it is necessary to
%   make a global copy of the variable \cs{l_@@_minipage_right_vii_dim} in
%   the variable \cs{g_@@_minipage_right_vii_dim}.%
% \iffalse
%% Start support for |mini-env| key in |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_start_mini_vii:
  {
    \dim_compare:nNnT { \l_@@_minipage_right_vii_dim } > { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_minipage_left_vii_dim
          {
            \linewidth
            - \l_@@_minipage_right_vii_dim
            - \l_@@_minipage_hsep_vii_dim
          }
        \bool_set_true:N \l_@@_minipage_active_vii_bool
        \dim_gset_eq:NN
          \g_@@_minipage_right_vii_dim
          \l_@@_minipage_right_vii_dim
        \@@_mini_addvspace_vii:
        \nointerlineskip\noindent
        \@@_mini_page{ \l_@@_minipage_left_vii_dim }
      }
   }
%    \end{macrocode}
%   The function \cs{@@_stop_mini_vii:} closes the \myvarenv*{__@@_mini_page}
%   environment on the \emph{\enquote{left side}}, applies |\hfill| and
%   set the variable \cs{g_@@_minipage_active_vii_bool} to \emph{\enquote{true}}
%   which will be used in the function \cs{@@_after_env:nn} to execute
%   the \myenv{minipage} on the \emph{\enquote{right side}}. At this point
%   we will execute the \cs{@@_stop_list:} and \cs{@@_stop_store_level_vii:}
%   functions stopping the \myenv{list} environment and the level saving
%   mechanism for storage in \emph{sequence} of the |\anskey| command
%   and |anskey*| environment. This function is passed to the
%   \cs{@@_after_list_vii:} function in the second part of the \myenv*{enumext*}
%   environment definition (\S\ref{env:starred}).
% \iffalse
%% Stop support for |mini-env| key and stop |list| in |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_stop_mini_vii:
  {
    \bool_if:NTF \l_@@_minipage_active_vii_bool
      {
        \@@_stop_list:
        \@@_stop_store_level_vii:
        \IfDocumentMetadataTF { \tag_resume:n {enumext*} } { }
        \end@@_mini_page
        \hfill
        \bool_gset_true:N \g_@@_minipage_active_vii_bool
      }
      {
        \@@_stop_list:
        \@@_stop_store_level_vii:
      }
   }
%    \end{macrocode}
% \end{macro}
%
%  Finally we execute the \mymarg{code} passed to the \mykey{mini-right}
%  or \mykey{mini-right*} keys stored in the variable \cs{g_@@_miniright_code_vii_tl}
%  in the \myenv{minipage} environment on the \emph{\enquote{right
%  side}}. For compatibility with the \mypkg{caption} package and possibly
%  other \mymarg{code} passed to this key, we will pass it to a box and
%  then print it.
% \iffalse
%% Exec |mini-right|, |mini-right*| keys in |enumext*| environment.
% \fi
%    \begin{macrocode}
\@@_after_env:nn {enumext*}
  {
    \bool_if:NT \g_@@_minipage_active_vii_bool
      {
        \@@_minipage:w [ t ] { \g_@@_minipage_right_vii_dim }
          \legacy_if_gset_false:n { @minipage }
          \skip_vertical:N \c_zero_skip
          \par\addvspace { \g_@@_minipage_right_skip }
          \bool_if:NF \g_@@_minipage_center_vii_bool
            {
              \tl_put_left:Nn \g_@@_miniright_code_vii_tl
                {
                  \centering
                }
            }
          \vbox_set_top:Nn \l_@@_miniright_code_vii_box
            {
              \tl_use:N \g_@@_miniright_code_vii_tl
            }
          \box_use_drop:N \l_@@_miniright_code_vii_box
          \skip_vertical:N \c_zero_skip
        \@@_endminipage:
        \par\addvspace{ \g_@@_minipage_after_skip }
      }
    \bool_gset_false:N \g_@@_minipage_active_vii_bool
    \bool_gset_true:N \g_@@_minipage_center_vii_bool
    \tl_gclear:N \g_@@_miniright_code_vii_tl
    \dim_gzero:N \g_@@_minipage_right_vii_dim
    \bool_gset_false:N \g_@@_starred_bool
  }
%    \end{macrocode}
%
% \begin{macro}{\@@_start_mini_viii:,\@@_stop_mini_viii:}
%   The implementation of the \mykey{mini-env}, \mykey{mini-right} and
%   \mykey{mini-right*} keys is identical to the one used in the
%   \myenv*{enumext*} environment.
% \iffalse
%% Support for |mini-env|, |mini-right| and |mini-right*| key in |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_start_mini_viii:
  {
    \dim_compare:nNnT { \l_@@_minipage_right_viii_dim } > { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_minipage_left_viii_dim
          {
            \linewidth
            - \l_@@_minipage_right_viii_dim
            - \l_@@_minipage_hsep_viii_dim
          }
        \bool_set_true:N \l_@@_minipage_active_viii_bool
        \dim_gset_eq:NN
          \g_@@_minipage_right_viii_dim
          \l_@@_minipage_right_viii_dim
        \@@_mini_addvspace_viii:
        \nointerlineskip\noindent
        \@@_mini_page{ \l_@@_minipage_left_viii_dim }
      }
   }
\cs_new_protected:Nn \@@_stop_mini_viii:
  {
    \bool_if:NTF \l_@@_minipage_active_viii_bool
      {
        \@@_stop_list:
        \IfDocumentMetadataTF { \tag_resume:n {keyans*} } { }
        \end@@_mini_page
        \hfill
        \bool_gset_true:N \g_@@_minipage_active_viii_bool
      }
      {
        \@@_stop_list:
      }
   }
\@@_after_env:nn {keyans*}
  {
    \bool_if:NT \g_@@_minipage_active_viii_bool
      {
        \@@_mini_page{ \g_@@_minipage_right_viii_dim }
          \par\addvspace { \g_@@_minipage_right_skip }
          \bool_if:NF \g_@@_minipage_center_viii_bool
            {
              \tl_put_left:Nn \g_@@_miniright_code_viii_tl
                {
                  \centering
                }
            }
          \vbox_set_top:Nn \l_@@_miniright_code_viii_box
            {
              \tl_use:N \g_@@_miniright_code_viii_tl
            }
          \box_use_drop:N \l_@@_miniright_code_viii_box
        \end@@_mini_page
        \par\addvspace{ \g_@@_minipage_after_skip }
      }
    \bool_gset_false:N \g_@@_minipage_active_viii_bool
    \bool_gset_true:N \g_@@_minipage_center_viii_bool
    \tl_gclear:N \g_@@_miniright_code_viii_tl
    \dim_gzero:N \g_@@_minipage_right_viii_dim
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The environment \env{enumext*}}\label{env:starred}
%
% \begin{macro}{enumext*}
%    First we will generate the environment and we will give a
%    temporary definition to \cs{@@_stop_item_tmp_vii:} equal to
%    \cs{@@_first_item_tmp_vii:} and next to |\item| equal to \cs{@@_start_item_tmp_vii:}
%    which we will redefine later. Unlike the implementation used by
%    the \mypkg{shortlst} package, we will not set the values ​​of
%    |\rightskip| and |\@rightskip| equal to |\@flushglue| whose value is
%    \mydim{0.0pt plus 1.0 fil}, in the tests I have performed this fails in
%    some circumstances and different results are obtained when using
%    \hologo{pdfTeX} and \hologo{LuaTeX}.
% \iffalse
%% Define |enumext*|
% \fi
%    \begin{macrocode}
\NewDocumentEnvironment{enumext*}{ o }
  {
    \@@_safe_exec_vii:
    \@@_parse_keys_vii:n {#1}
    \@@_before_list_vii:
    \@@_start_store_level_vii:
    \@@_start_list:nn { }
      {
        \@@_list_arg_two_vii:
        \@@_before_keys_exec_vii:
      }
    \IfDocumentMetadataTF { \tag_suspend:n {enumext*} } { }
    \@@_starred_columns_set_vii:
    \item[] \scan_stop:
    \cs_set_eq:NN \@@_stop_item_tmp_vii: \@@_first_item_tmp_vii:
    \cs_set_eq:NN \item \@@_start_item_tmp_vii:
    \ignorespaces
  }
  {
    \IfDocumentMetadataTF { \tag_struct_end:n {tag=text-unit} } { }
    \@@_stop_item_tmp_vii:
    \@@_remove_extra_parsep_vii:
    \@@_after_list_vii:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_safe_exec_vii:}\label{fun:starred:safe-exe}
%   We will first call the function \cs{@@_is_not_nested:} which sets
%   \cs{g_@@_starred_bool} to true if we are NOT nested within \myenv*{enumext},
%   then call the function \cs{@@_internal_mini_page:} to create the
%   environment \myvarenv*{__@@_mini_page}, we will increment
%   \cs{l_@@_level_h_int} to restrict nesting of the environment, set
%   \cs{l_@@_starred_bool} to true and finally call the function
%   \cs{@@_is_on_first_level:} which sets \cs{l_@@_starred_first_bool} to
%   true if we are not nested, allowing the \emph{\enquote{storage system}}
%   to be used.
% \iffalse
%% Safe exec for |enumext*| environment (set vars for storage system).
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_safe_exec_vii:
  {
    \@@_is_not_nested:
    \@@_internal_mini_page:
    \int_incr:N \l_@@_level_h_int
    \int_compare:nNnT { \l_@@_level_h_int } > { 1 }
      {
        \msg_error:nn { enumext } { nested }
      }
    \int_compare:nNnT { \l_@@_keyans_level_h_int } = { 1 }
      {
        \msg_error:nnn { enumext } { nested-horizontal } { keyans*}
      }
    \bool_set_true:N \l_@@_starred_bool
    \bool_set_false:N \l_@@_standar_bool
    \@@_is_on_first_level:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_parse_keys_vii:n}
%  First we will clear the variable \cs{l_@@_series_str} used by the key
%  \mykey{series}, process the environment \myoarg{key \textnormal{\textcolor{gray}{=}} val}
%  and execute the function \cs{@@_parse_series:n} and used by the key
%  \mykey{series}, then we execute the function \cs{@@_store_active_keys_vii:n}
%  and reprocess the \mymeta{keys} to pass them to the storage \emph{sequence}
%  if the key \mykey{save-key} is not active.
%^^A  and finally we call the function
%^^A  \cs{@@_nested_base_line_fix:} used by the key \mykey{base-fix}.
% \iffalse
%% Parse |key=val| and store keys for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_parse_keys_vii:n #1
  {
    \tl_if_novalue:nF {#1}
      {
        \str_clear:N \l_@@_series_str
        \keys_set:nn { enumext / enumext* } {#1}
        \@@_parse_series:n {#1}
        \@@_store_active_keys_vii:n {#1}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_before_list_vii:}
%   The function \cs{@@_before_list_vii:} first calls the function
%   \cs{@@_vspace_above_vii:} used by the keys \mykey{above} and
%   \mykey{above*}, then calls the function \cs{@@_check_ans_active:} for
%   the check answer mechanism and finally calls the functions
%   \cs{@@_before_args_exec:} and \cs{@@_start_mini_vii:} used by the
%   keys \mykey{before*}, \mykey{mini-env}, \mykey{mini-right} and
%   \mykey{mini-right*}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_list_vii:
  {
    \@@_vspace_above_vii:
    \@@_check_ans_active:
    \@@_before_args_exec_vii:
    \@@_start_mini_vii:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_after_list_vii:}
%   The function \cs{@@_after_list_vii:} first calls the function
%   \cs{@@_stop_mini_vii:} which internally calls \cs{@@_stop_list:} and
%   \cs{@@_stop_store_level_vii:} (\S\ref{env:starred:key:mini-env}) used
%   by the keys \mykey{mini-env}, \mykey{mini-right} and \mykey{mini-right*},
%   then to the functions \cs{@@_after_stop_list_vii:} used by the key
%   \mykey{after}, \cs{@@_check_ans_key_hook:} used by the key \mykey{check-ans},
%   \cs{@@_vspace_below_vii:} used by the keys \mykey{below} and
%   \mykey{below*}. Finally set \cs{l_@@_starred_bool} to false and call
%   the \cs{@@_resume_save_counter:} function used by the \mykey{series},
%   \mykey{resume} and \mykey{resume*} keys.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_after_list_vii:
  {
    \@@_stop_mini_vii:
    \@@_after_stop_list_vii:
    \@@_check_ans_key_hook:
    \@@_vspace_below_vii:
    \bool_set_false:N \l_@@_starred_bool
    \@@_resume_save_counter:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_start_store_level_vii:, \@@_stop_store_level_vii:}
%   The \cs{@@_start_store_level_vii:} and \cs{@@_stop_store_level_vii:}
%   functions activate the \emph{\enquote{storing structure}} mechanism
%   in \emph{sequence} for \ics*{anskey} command and \myenv*{anskey*}
%   environment if \myenv*{enumext*} are nested in \myenv*{enumext}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_start_store_level_vii:
  {
    \bool_if:NT \l_@@_store_active_bool
      {
        \int_compare:nNnT { \l_@@_level_int } > { 0 }
          {
            \@@_store_level_open_vii:
          }
      }
  }
\cs_new_protected:Nn \@@_stop_store_level_vii:
  {
    \bool_if:NT \l_@@_store_active_bool
      {
        \int_compare:nNnT { \l_@@_level_int } > { 0 }
          {
            \@@_store_level_close_vii:
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The command \cs{item} in \env{enumext*}}\label{cmd:item-boxed-vii}
%
% \begin{macro}{\@@_first_item_tmp_vii:}
%
% The \cs{@@_first_item_tmp_vii:} function will remove horizontal space
% equal to |\labelwidth| plus |\labelsep| to the left of the \emph{\enquote{first}}
% |\item| in the environment at the point of execution of this function,
% where it is equal to the \cs{@@_stop_item_tmp_vii:} function inside the
% environment body definition.
% \iffalse
%% Remove |\labelwidth+\labelsep| on left in first |\item| for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_first_item_tmp_vii:
  {
    \skip_horizontal:n
      {
        -\l_@@_labelwidth_vii_dim - \l_@@_labelsep_vii_dim
      }
    \ignorespaces
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_start_item_tmp_vii:, \@@_item_peek_args_vii:,
%               \@@_joined_item_vii:w, \@@_standar_item_vii:w,
%               \@@_starred_item_vii:w, \@@_starred_item_vii_aux_i:w,
%               \@@_starred_item_vii_aux_ii:w, \@@_starred_item_vii_aux_iii:w,}
%   First we will call the function \cs{@@_stop_item_tmp_vii:} that we
%   will redefine later, we will increment the value of
%   \cs{l_@@_item_column_pos_vii_int} that will count the item's by rows and
%   the value of \cs{g_@@_item_count_all_vii_int} that will count the
%   total of item's in the environment. After that we will call the
%   function \cs{@@_item_peek_args_vii:} that will handle the
%   arguments passed to \ics*{item}.
% \iffalse
%% Start boxed item's for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_start_item_tmp_vii:
  {
    \@@_stop_item_tmp_vii:
    \int_incr:N \l_@@_item_column_pos_vii_int
    \int_gincr:N \g_@@_item_count_all_vii_int
    \@@_item_peek_args_vii:
  }
%    \end{macrocode}
%   The function \cs{@@_item_peek_args_vii:} will handle the \ics*{item}\myparg{number}.
%   Look for the argument \enquote{\textcolor{MediumOrchid}{\ttfamily (}},
%   if it is present we will call the function \cs{@@_joined_item_vii:w} \myparg{number},
%   which is in charge of joining the item's in the same row, in case they
%   are not present we will set the default value \textcolor{gray}{\ttfamily(\mydim{1})}.
% \iffalse
%% Peek argument for \item()*[][] for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_item_peek_args_vii:
  {
    \peek_meaning:NTF (
      { \@@_joined_item_vii:w }
      { \@@_joined_item_vii:w (1) }
  }
%    \end{macrocode}
%    The function \cs{@@_joined_item_vii:w} will first call the
%    function \cs{@@_starred_joined_item_vii:n} in charge of setting the
%    \emph{width} of the box that will store the content passed to \ics*{item}. Then we
%    will look for the argument \enquote{\textcolor{MediumOrchid}{\ttfamily *}}, if it is present we will call the
%    function \cs{@@_starred_item_vii:w} otherwise we will call the
%    function \cs{@@_standar_item_vii:w}.
% \iffalse
%% Joined item's for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_joined_item_vii:w (#1)
  {
    \@@_starred_joined_item_vii:n {#1}
    \peek_meaning_remove:NTF *
      { \@@_starred_item_vii:w  }
      { \@@_standar_item_vii:w }
  }
%    \end{macrocode}
%   The function \cs{@@_standar_item_vii:w} will first look for the
%   argument “|[|”, if present it will set the state of the variable
%   \cs{l_@@_wrap_label_opt_vii_bool} equal to the state of the variable
%   \cs{l_@@_wrap_label_opt_vii_bool} handled by the key
%   \mykey{wrap-label*} and finally execute the \emph{non-enumerated}
%   version \ics*{item}\myoarg{custom} by means of the function
%   \cs{@@_start_item_vii:w}, otherwise we will set the value of the
%   variable \cs{l_@@_wrap_label_vii_bool} handled by the
%   \mykey{wrap-label} key to true and set the switch |\if@noitemarg| to
%   true to execute the enumerated version of \ics*{item} by means of the
%   function \cs{@@_start_item_vii:w} |[| \myvarenv{l__@@_label_vii_tl} |]|.
% \iffalse
%% Set \item[opt] for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_standar_item_vii:w
  {
    \bool_set_false:N \l_@@_item_starred_vii_bool
    \peek_meaning:NTF [
      {
        \bool_set_eq:NN \l_@@_wrap_label_vii_bool \l_@@_wrap_label_opt_vii_bool
        \@@_start_item_vii:w
      }
      {
        \bool_set_true:N \l_@@_wrap_label_vii_bool
        \legacy_if_set_true:n { @noitemarg }
        \@@_start_item_vii:w [ \l_@@_label_vii_tl ] \ignorespaces
      }
  }
%    \end{macrocode}
%   The function \cs{@@_starred_item_vii:w} together with the specified
%   auxiliary functions |aux_i:w|, |aux_ii:w|, and |aux_iii:w| execute \ics*{item*},
%   \ics*{item*}\myoarg{symbol} and \ics*{item*}\myoarg{symbol}\myoarg{offset}.
% \iffalse
%% Set \item*[sym][sep] for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_item_vii:w
  {
    \bool_set_true:N \l_@@_item_starred_vii_bool
    \bool_set_true:N \l_@@_wrap_label_vii_bool
    \peek_meaning:NTF [
      { \@@_starred_item_vii_aux_i:w }
      { \@@_starred_item_vii_aux_ii:w }
  }
\cs_new_protected:Npn \@@_starred_item_vii_aux_i:w [#1]
  {
    \tl_gset:Nn \g_@@_item_symbol_aux_vii_tl {#1}
    \@@_starred_item_vii_aux_ii:w
  }
\cs_new_protected:Npn \@@_starred_item_vii_aux_ii:w
  {
    \peek_meaning:NTF [
      { \@@_starred_item_vii_aux_iii:w }
      {
        \dim_set_eq:NN \l_@@_item_symbol_sep_vii_dim \l_@@_labelsep_vii_dim
        \legacy_if_set_true:n { @noitemarg }
        \@@_start_item_vii:w [ \l_@@_label_vii_tl ] \ignorespaces
      }
  }
\cs_new_protected:Npn \@@_starred_item_vii_aux_iii:w [#1]
  {
    \dim_set:Nn \l_@@_item_symbol_sep_vii_dim {#1}
    \legacy_if_set_true:n { @noitemarg }
    \@@_start_item_vii:w [ \l_@@_label_vii_tl ] \ignorespaces
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fake_make_label_vii:n}
%   The \cs{@@_fake_make_label_vii:n} function will be in charge of
%   handling our definition of |\item|. First we increment the counter
%   \icounter{enumXvii} for the enumerated items and activate support for
%   the \emph{check answers} mechanism, followed by support for
%   \ics*{item*}\myoarg{symbol}\myoarg{offset} if present, then the
%   \mykey{wrap-label} and \mykey{wrap-label*} keys which we execute using
%   |\makebox| whose width will be given by the \mykey{labelwidth} key and
%   position by the \mykey{align} key, inside the argument of this we will
%   execute the \mykey{font} key together with the function defined by the
%   \mykey{wrap-label} or \mykey{wrap-label*} keys. Finally we execute the
%   \mykey{labelsep} key applying a |\skip_horizontal:N| and |\ignorespaces|.
%
%   \smallskip
%
% \begin{important}
%   For compatibility with \emph{tagged} \texttt{PDF} and \mypkg{hyperref}
%   when an environment \myenv*{enumext} is nested in \myenv*{enumext*}
%   and the key \mykey{save-ans} is not active need setting the |\if@hyper@item|
%   switch to \emph{\enquote{true}}. The explanation for this is given
%   by the master Heiko Oberdiek on \href{https://tex.stackexchange.com/a/404911}{\textbackslash
%   refstepcounter\{enumi\} twice (or more) creates destination with the
%   same identifier}.
%   This patch is only needed if you are running |pdflatex| and not if
%   you are running |lualatex|
% \end{important}
%
% \iffalse
%% Fake \makelabel definition for |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_fake_make_label_vii:n #1
  {
    \legacy_if:nT { @noitemarg }
      {
        \legacy_if_set_false:n { @noitemarg }
        \legacy_if:nT { @nmbrlist }
          {
            \IfDocumentMetadataTF
              {
                \bool_if:NT \l_@@_hyperref_bool
                  {
                    \legacy_if_set_true:n { @hyper@item }
                  }
              } { }
            \refstepcounter{enumXvii}
            \bool_if:NT \l_@@_check_answers_bool
              {
                \int_gincr:N \g_@@_item_number_int
                \bool_set_true:N \l_@@_item_number_bool
              }
          }
      }
    \bool_if:NT \l_@@_item_starred_vii_bool
      {
        \tl_if_blank:VT \g_@@_item_symbol_aux_vii_tl
          {
            \tl_gset_eq:NN
              \g_@@_item_symbol_aux_vii_tl \l_@@_item_symbol_vii_tl
          }
        \mode_leave_vertical:
        \skip_horizontal:n { -\l_@@_item_symbol_sep_vii_dim }
        \hbox_overlap_left:n { \g_@@_item_symbol_aux_vii_tl }
        \skip_horizontal:N \l_@@_item_symbol_sep_vii_dim
        \tl_gclear:N \g_@@_item_symbol_aux_vii_tl
      }
    \makebox[ \l_@@_labelwidth_vii_dim ][ \l_@@_align_label_vii_str ]
      {
        \tl_use:N \l_@@_label_font_style_vii_tl
        \bool_if:NTF \l_@@_wrap_label_vii_bool
          {
            \@@_wrapper_label_vii:n {#1}
          }
          { #1 }
      }
    \skip_horizontal:N \l_@@_labelsep_vii_dim \ignorespaces
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Real definition of \cs{item} in \env{enumext*}}
%
% The functions \cs{@@_start_item_vii:w} and \cs{@@_stop_item_vii:} executing
% the true definition of \ics*{item} inside the \myenv*{enumext*} environment, unlike
% the implementation in \mypkg{shortlst} we will NOT use an extra group
% and the plain form of the \myenv{lrbox} environment.
%
% \begin{macro}{\@@_start_item_vii:w, \@@_stop_item_vii:}
%   The first thing we will do is set the value of \cs{@@_stop_item_tmp_vii:} equal to
%   \cs{@@_stop_item_vii:} which we will define later, after that we will
%   start capturing |\item| and \emph{\enquote{item content}} in a \emph{horizontal box}
%   where the width will be |\itemwidth| plus |\labelwidth| plus |\labelsep|.
%    \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_start_item_vii:w [#1]
  {
    \cs_set_eq:NN \@@_stop_item_tmp_vii: \@@_stop_item_vii:
    \hbox_set_to_wd:Nnw \l_@@_item_text_vii_box
      {
        \l_@@_joined_width_vii_dim
        + \l_@@_labelwidth_vii_dim
        + \l_@@_labelsep_vii_dim
      }
%    \end{macrocode}
%   Redefine the |\footnote| command.
%    \begin{macrocode}
      \@@_renew_footnote_starred:
%    \end{macrocode}
%   Now we insert our \emph{sockets} for \emph{tagging} \texttt{PDF}
%   support and run |\item|.
%    \begin{macrocode}
      \@@_start_list_tag:n {enumext*}
      \@@_fake_make_label_vii:n {#1}
      \@@_stop_start_list_tag:
%    \end{macrocode}
%   Finally we open the \myenv{minipage} environment, capture the
%   \emph{\enquote{item content}}, make |\parindent| take the value of the
%   key \mykey{listparindent} and |\parskip| take the value of the key
%   \mykey{parsep}, then execute the keys \mykey{itemindent} and
%   \mykey{first}.
%
%   \smallskip
%
% \begin{important}*
%  Here the use of |\unskip| and |\skip_horizontal:n| with the value of
%  \mykey{listparindent} is necessary, otherwise an unwanted space is
%  created when using |\item|\myoarg{opt} and the value passed to the key
%  \mykey{itemindent} is incremented.
% \end{important}
%
%   \smallskip
%
%    \begin{macrocode}
      \@@_minipage:w [ t ]{ \l_@@_joined_width_vii_dim }
        \dim_set_eq:NN \parindent \l_@@_listparindent_vii_dim
        \skip_set_eq:NN \parskip \l_@@_parsep_vii_skip
        \@@_unskip_unkern:
        \@@_unskip_unkern:
        \skip_horizontal:n { -\l_@@_listparindent_vii_dim } \ignorespaces
        \tl_use:N \l_@@_fake_item_indent_vii_tl
        \tl_use:N \l_@@_after_list_args_vii_tl
   }
%    \end{macrocode}
%   The \cs{@@_stop_item_vii:} function will finish the fetching |\item|
%   and \emph{\enquote{item content}} by closing the \myenv{minipage}
%   environment, the \emph{sockets} for \emph{tagging} \texttt{PDF} and the
%   \emph{horizontal box}.
%    \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_stop_item_vii:
  {
      \@@_endminipage:
    \@@_stop_list_tag:n {enumext*}
    \hbox_set_end:
%    \end{macrocode}
%   Here we will reduce the \emph{warnings} a bit by setting the value
%   of |\hbadness| to \mydim{10000}, print |\item| and \emph{\enquote{item content}}
%   from the \emph{horizontal box},.
%    \begin{macrocode}
    \int_set:Nn \hbadness { 10000 }
    \box_use_drop:N \l_@@_item_text_vii_box
%    \end{macrocode}
%   Finally apply the \emph{vertical space} between rows set by \mykey{itemsep}
%   key passed to |\parsep| using |\par\noindent| and \emph{horizontal space}
%   between columns set by \mykey{columns-sep} key using |\skip_horizontal:N|.
%    \begin{macrocode}
    \int_compare:nNnTF
      { \l_@@_item_column_pos_vii_int } = { \l_@@_columns_vii_int }
      {
        \par\noindent
        \int_zero:N \l_@@_item_column_pos_vii_int
      }
      {
        \skip_horizontal:N \l_@@_columns_sep_vii_dim
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_remove_extra_parsep_vii:}
%   Remove the extra \emph{vertical space} equal to |\parsep=\itemsep| when the
%   total number of |\item| is divisible by the number of |\item| in the last
%   row of the environment. Here the use of |\unskip| or |\removelastskip|
%   fails and does not obtain the expected result, using |\vspace| is
%   the option and in this case, we can use a simplified version since
%   we are always in \mymeta{vertical mode}.
% \iffalse
%% Remove extra \parsep in |enumext*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_remove_extra_parsep_vii:
  {
    \int_compare:nNnT
      {
        \int_mod:nn
          {  \g_@@_item_count_all_vii_int } { \l_@@_columns_vii_int }
      }
      =
      { 0 }
      {
        \para_end:
        \skip_vertical:n { -\l_@@_itemsep_vii_skip }
        \skip_vertical:N \c_zero_skip
        \int_gzero:N \g_@@_item_count_all_vii_int
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \smallskip
%
% As we don't want our check to be executed \mykey{check-ans} by levels
% but on the complete list, we will take it out of the \myenv*{enumext*}
% environment using the \emph{\enquote{hook}} function \cs{@@_after_env:nn}.
% \iffalse
%% Execute |check-ans| key out of |enumext*| environment.
% \fi
%    \begin{macrocode}
\@@_after_env:nn {enumext*}
  {
    \@@_execute_after_env:
  }
%    \end{macrocode}
%
% \subsection{The environment \env{keyans*}}\label{env:keyans-starred}
%
% \begin{macro}{keyans*}
%   The implementation of \myenv*{keyans*} environment is the
%   similar as that used by the \myenv*{enumext*} environment except for the
%   \cs{@@_check_starred_cmd:n} function added in the second part.
% \iffalse
%% Define |keyans*| environment.
% \fi
%    \begin{macrocode}
\NewDocumentEnvironment{keyans*}{ o }
  {
    \@@_safe_exec_viii:
    \@@_parse_keys_viii:n {#1}
    \@@_before_list_viii:
    \@@_start_list:nn { }
      {
        \@@_list_arg_two_viii:
        \@@_before_keys_exec_viii:
      }
    \IfDocumentMetadataTF { \tag_suspend:n {keyans*} } { }
    \@@_starred_columns_set_viii:
    \item[] \scan_stop:
    \cs_set_eq:NN \@@_stop_item_tmp_viii: \@@_first_item_tmp_viii:
    \cs_set_eq:NN \item \@@_start_item_tmp_viii:
    \ignorespaces
  }
  {
    \IfDocumentMetadataTF { \tag_struct_end:n {tag=text-unit} } { }
    \@@_stop_item_tmp_viii:
    \@@_remove_extra_parsep_viii:
    \@@_check_starred_cmd:n { item }
    \@@_after_list_viii:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_safe_exec_viii:}
%   The \cs{@@_safe_exec_viii:} function will first check if the
%   \mykey{save-ans} key is active and only when this is true the
%   environment will be available, it will increment the value of
%   \cs{l_@@_keyans_level_h_int} and return an error message when we are
%   nesting the environment, then it will call the
%   \cs{@@_keyans_name_and_start:} function in charge of saving the name of
%   the environment and the line it is running on, then it will check if we
%   are trying to nest \myenv*{keyans*} in \myenv*{enumext*} returning an
%   error and we will set \cs{l_@@_starred_bool} to true, finally we will
%   check if we are within the appropriate level within the
%   \myenv*{enumext} environment.
% \iffalse
%% Test deep-level for |keyans*| environment and set bool vars.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_safe_exec_viii:
  {
    \bool_if:NF \l_@@_store_active_bool
      {
        \msg_error:nnnn { enumext } { wrong-place }{ keyans* }{ save-ans }
      }
    \int_incr:N \l_@@_keyans_level_h_int
    \int_compare:nNnT { \l_@@_keyans_level_h_int } > { 1 }
      {
        \msg_error:nn { enumext } { nested }
      }
    \@@_keyans_name_and_start:
    \bool_if:NT \l_@@_starred_bool
      {
        \msg_error:nnn { enumext } { nested-horizontal } { enumext* }
      }
    \bool_set_true:N \l_@@_starred_bool
    % Set false for interfering with enumext nested in keyans* (yes, its possible and crayze)
    \bool_set_false:N \l_@@_store_active_bool
    \int_compare:nNnT { \l_@@_level_int } > { 1 }
      {
        \msg_error:nn { enumext } { keyans-wrong-level }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_parse_keys_viii:n}
%    Parse \myoarg{key \textnormal{\textcolor{gray}{=}} val}
%    for \myenv*{keyans*}.
% \iffalse
%% Parse |key=val| and store keys for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_parse_keys_viii:n #1
  {
    \tl_if_novalue:nF {#1}
      {
        \keys_set:nn { enumext / keyans* } {#1}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_before_list_viii:}
%    The function \cs{@@_before_list_viii:} will add the vertical
%    spacing on the environment if the \mykey{above} key is active next to
%    the \mymarg{code} defined by the \mykey{before*} key if
%    it is active, the call the function \cs{@@_start_mini_viii:} handle by
%    \mykey{mini-env}.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_before_list_viii:
  {
    \@@_vspace_above_viii:
    \@@_before_args_exec_viii:
    \@@_start_mini_viii:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_after_list_viii:}
%    The function \cs{@@_after_list_viii:} first call the function \cs{@@_stop_mini_viii:},
%    then apply the \mymarg{code} handled by the \mykey{after} key
%    together with the \emph{vertical space} handled by the \mykey{below} key if
%    they are present.
%    \begin{macrocode}
\cs_new_protected:Nn \@@_after_list_viii:
  {
    \@@_stop_mini_viii:
    \@@_after_stop_list_viii:
    \@@_vspace_below_viii:
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{The command \cs{item} in \env{keyans*}}\label{cmd:item-boxed-viii}
%
% The idea here is to make the |\item| command behave in the same way as
% in the \myenv*{keyans} environment with the difference of the \emph{optional argument}
% \myparg{number} which works in the same way as in the \myenv*{enumext*}
% environment.
%
% In simple terms we want to store the \mymeta{label} next to the \myoarg{content} if it is present
% in the \emph{sequence} and \emph{prop list} defined by \mykey{save-ans} key for
% |\item*|, |\item*|\myoarg{content}, |\item|\myparg{number}|*| and
% |\item|\myparg{number}|*|\myoarg{content} commands.
%
% \begin{macro}{\@@_first_item_tmp_viii:}
%   The \cs{@@_first_item_tmp_viii:} function will remove horizontal space
%   equal to |\labelwidth| plus |\labelsep| to the left of the \emph{\enquote{first}}
%   |\item| in the environment at the point of execution of this function,
%   where it is equal to the \cs{@@_stop_item_tmp_viii:} function inside the
%   environment body definition.
% \iffalse
%% Remove |\labelwidth+\labelsep| on left in first |\item| for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_first_item_tmp_viii:
  {
    \skip_horizontal:n
      {
        -\l_@@_labelwidth_viii_dim - \l_@@_labelsep_viii_dim
      }
    \ignorespaces
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_start_item_tmp_viii:, \@@_item_peek_args_viii:,
%               \@@_joined_item_viii:w, \@@_standar_item_viii:w}
%   First we will call the function \cs{@@_stop_item_tmp_viii:} that we
%   will redefine later, we will increment the value of
%   \cs{l_@@_item_column_pos_viii_int} that will count the item's by rows and
%   the value of \cs{g_@@_item_count_all_viii_int} that will count the
%   total of item's in the environment. After that we will call the
%   function \cs{@@_item_peek_args_viii:} that will handle the
%   arguments passed to \ics*{item}.
% \iffalse
%% Start boxed item's for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_start_item_tmp_viii:
  {
    \@@_stop_item_tmp_viii:
    \int_incr:N \l_@@_item_column_pos_viii_int
    \int_gincr:N \g_@@_item_count_all_viii_int
    \@@_item_peek_args_viii:
  }
%    \end{macrocode}
%   The function \cs{@@_item_peek_args_viii:} will handle the \ics*{item}\myparg{number}.
%   Look for the argument \enquote{\textcolor{MediumOrchid}{\ttfamily (}}, if it is
%   present we will call the function \cs{@@_joined_item_viii:w} \myparg{number},
%   which is in charge of joining the item's in the same row, in case they
%   are not present we will set the default value \textcolor{gray}{\ttfamily(\mydim{1})}.
% \iffalse
%% Peek argument for \item(number)*[opt] for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_item_peek_args_viii:
  {
    \peek_meaning:NTF (
      { \@@_joined_item_viii:w }
      { \@@_joined_item_viii:w (1) }
  }
%    \end{macrocode}
%   The function \cs{@@_joined_item_viii:w} will first call the
%   function \cs{@@_starred_joined_item_viii:n} in charge of setting the
%   \emph{width} of the box that will store the content passed to \ics*{item}. Then we
%   will look for the argument \enquote{\textcolor{MediumOrchid}{\ttfamily *}}, if it is present we will call the
%   function \cs{@@_starred_item_viii:w} otherwise we will call the
%   function \cs{@@_standar_item_viii:w}.
% \iffalse
%% Joined item's for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_joined_item_viii:w (#1)
  {
    \@@_starred_joined_item_viii:n {#1}
    \peek_meaning_remove:NTF *
      { \@@_starred_item_viii:w }
      { \@@_standar_item_viii:w }
  }
%    \end{macrocode}
%   The function \cs{@@_standar_item_viii:w} will first look for the
%   argument “|[|”, if present it will set the state of the variable
%   \cs{l_@@_wrap_label_opt_viii_bool} equal to the state of the variable
%   \cs{l_@@_wrap_label_opt_viii_bool} handled by the key
%   \mykey{wrap-label*} and finally execute the \emph{non-enumerated}
%   version \ics*{item}\myoarg{custom} by means of the function
%   \cs{@@_start_item_viii:w}, otherwise we will set the value of the
%   variable \cs{l_@@_wrap_label_viii_bool} handled by the
%   \mykey{wrap-label} key to true and set the switch |\if@noitemarg| to
%   true to execute the enumerated version of \ics*{item} by means of the
%   function \cs{@@_start_item_viii:w} |[| \myvarenv{l__@@_label_viii_tl} |]|.
% \iffalse
%% Set standard \item[opt] for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_standar_item_viii:w
  {
    \bool_set_false:N \l_@@_item_starred_viii_bool
    \bool_set_false:N \l_@@_item_wrap_key_bool
    \peek_meaning:NTF [
      {
        \bool_set_eq:NN \l_@@_wrap_label_viii_bool \l_@@_wrap_label_opt_viii_bool
        \@@_start_item_viii:w
      }
      {
        \bool_set_true:N \l_@@_wrap_label_viii_bool
        \legacy_if_set_true:n { @noitemarg }
        \@@_start_item_viii:w [ \l_@@_label_viii_tl ] \ignorespaces
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_starred_item_viii:w, \@@_starred_item_viii_aux_i:w,
%               \@@_starred_item_viii_aux_ii:w, \@@_keyans_starred_item_star:}
%   The function \cs{@@_starred_item_viii:w} together with the specified
%   auxiliary functions |aux_i:w| and |aux_ii:w| execute \ics*{item*}
%   and \ics*{item*}\myoarg{content}.
% \iffalse
%% Set \item*[content] for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_item_viii:w
  {
    \bool_set_true:N \l_@@_item_starred_viii_bool
    \bool_set_true:N \l_@@_item_wrap_key_bool
    \bool_set_true:N \l_@@_wrap_label_viii_bool
    \peek_meaning:NTF [
      { \@@_starred_item_viii_aux_i:w }
      { \@@_starred_item_viii_aux_ii:w }
  }
%    \end{macrocode}
%   The function \cs{@@_starred_item_viii_aux_i:w} will save the
%   \emph{optional argument} to |\item*| in \cs{l_@@_store_current_opt_arg_tl}
%   and will save this argument along with the spacing set by the key \mykey{save-sep} in
%   variable \cs{l_@@_store_current_label_tl} if present, then call the
%   function \cs{@@_starred_item_viii_aux_ii:w}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_starred_item_viii_aux_i:w [#1]
  {
    \tl_clear:N \l_@@_store_current_label_tl
    \tl_if_novalue:nF { #1 }
      {
        \tl_if_empty:NF \l_@@_store_keyans_item_opt_sep_viii_tl
          {
            \tl_put_right:Ne \l_@@_store_current_label_tl
              {
                \l_@@_store_keyans_item_opt_sep_viii_tl
              }
            \tl_put_right:Ne \l_@@_store_current_label_tl { #1 }
          }
        \tl_set:Ne \l_@@_store_current_opt_arg_tl { #1 }
      }
    \@@_starred_item_viii_aux_ii:w
  }
\cs_new_protected:Npn \@@_starred_item_viii_aux_ii:w
  {
    \legacy_if_set_true:n { @noitemarg }
    \@@_start_item_viii:w [ \l_@@_label_viii_tl ] \ignorespaces
  }
%    \end{macrocode}
%   The function \cs{@@_keyans_starred_item_star:} will be in charge of storing
%   the current \mymeta{label} for \ics*{item*} followed by the
%   \myoarg{content} for \ics*{item*}\myoarg{content} if
%   present in the \emph{sequence} and \emph{prop list} set by the
%   \mykey{save-ans} key. In this same function the keys \mykey{show-ans},
%   \mykey{show-pos}, \mykey{mark-sep} and \mykey{save-ref} are implemented.
% \iffalse
%% Set \item*[content] for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_keyans_starred_item_star:
  {
    \tl_put_left:Ne \l_@@_store_current_label_tl { \l_@@_label_viii_tl }
    \@@_store_addto_prop:V \l_@@_store_current_label_tl
    \@@_keyans_store_ref:
    \tl_put_left:Ne \l_@@_store_current_label_tl { \item }
    \@@_keyans_addto_seq_link:
    \int_gincr:N \g_@@_check_starred_cmd_int
    \dim_compare:nNnT { \l_@@_mark_sym_sep_viii_dim } = { \c_zero_dim }
      {
        \dim_set:Nn \l_@@_mark_sym_sep_viii_dim { \l_@@_labelsep_viii_dim }
      }
    \bool_if:NT \l_@@_show_answer_bool
      {
        \tl_set_eq:NN \l_@@_mark_answer_sym_tl \l_@@_mark_answer_sym_viii_tl
        \str_set_eq:NN \l_@@_mark_position_str \l_@@_mark_position_viii_str
        \@@_print_keyans_box:NN
          \l_@@_labelwidth_viii_dim \l_@@_mark_sym_sep_viii_dim
      }
    \bool_if:NT \l_@@_show_position_bool
      {
        \tl_set:Ne \l_@@_mark_answer_sym_tl
          {
            \group_begin:
              \exp_not:N \normalfont
              \exp_not:N \footnotesize [ \int_eval:n
                {
                  \prop_count:c { g_@@_ \l_@@_store_name_tl _prop }
                }
               ]
            \group_end:
          }
        \str_set_eq:NN \l_@@_mark_position_str \l_@@_mark_position_viii_str
        \@@_print_keyans_box:NN
          \l_@@_labelwidth_viii_dim \l_@@_mark_sym_sep_viii_dim
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keyans_wraper_label_viii:n, \@@_fake_make_label_viii:n}
%    The implementation at this is very similar to that of the
%    \myenv*{enumext*} environment.
% \iffalse
%% Define a fake |\makelabel| for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keyans_wraper_label_viii:n #1
  {
    \bool_lazy_all:nT
      {
        { \bool_if_p:N \l_@@_wrap_label_viii_bool         }
        { \bool_if_p:N \l_@@_show_answer_bool             }
        { \bool_if_p:N \l_@@_item_wrap_key_bool           }
        { \cs_if_exist_p:N \@@_keyans_wrapper_item_viii:n }
      }
      {
        \cs_set_eq:NN
          \@@_wrapper_label_viii:n \@@_keyans_wrapper_item_viii:n
      }
    \bool_if:NTF \l_@@_wrap_label_viii_bool
      {
        \@@_wrapper_label_viii:n {#1}
      }
      { #1 }
  }
\cs_new_protected_nopar:Npn \@@_fake_make_label_viii:n #1
  {
    \legacy_if:nT { @noitemarg }
      {
        \legacy_if_set_false:n { @noitemarg }
        \legacy_if:nT { @nmbrlist }
          {
            \refstepcounter{enumXviii}
          }
      }
    \bool_if:NT \l_@@_item_starred_viii_bool
      {
        \@@_keyans_starred_item_star:
      }
    \makebox[ \l_@@_labelwidth_viii_dim ][ \l_@@_align_label_viii_str ]
      {
        \tl_use:N \l_@@_label_font_style_viii_tl
        \@@_keyans_wraper_label_viii:n {#1}
      }
    \skip_horizontal:N \l_@@_labelsep_viii_dim \ignorespaces
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Real definition of \cs{item} in \env{keyans*}}
%
% \begin{macro}{\@@_start_item_viii:w, \@@_stop_item_viii:}
%    The implementation at this is very similar to that of the
%    \myenv*{enumext*} environment.
% \iffalse
%% Real |\item| definition for |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_start_item_viii:w [#1]
  {
    \cs_set_eq:NN \@@_stop_item_tmp_viii: \@@_stop_item_viii:
    \hbox_set_to_wd:Nnw \l_@@_item_text_viii_box
      {
        \l_@@_joined_width_viii_dim
        + \l_@@_labelwidth_viii_dim
        + \l_@@_labelsep_viii_dim
      }
      \@@_renew_footnote_starred:
      \@@_start_list_tag:n {keyans*}
      \@@_fake_make_label_viii:n {#1}
      \@@_stop_start_list_tag:
      \@@_minipage:w [ t ]{ \l_@@_joined_width_viii_dim  }
        \dim_set_eq:NN \parindent \l_@@_listparindent_viii_dim
        \skip_set_eq:NN \parskip \l_@@_parsep_viii_skip
        \@@_unskip_unkern:
        \@@_unskip_unkern:
        \skip_horizontal:n { -\l_@@_listparindent_viii_dim } \ignorespaces
        \tl_use:N \l_@@_fake_item_indent_viii_tl
        \bool_if:NT \l_@@_item_starred_viii_bool
          {
            \@@_keyans_show_item_opt_viii:
          }
        \tl_use:N \l_@@_after_list_args_viii_tl
   }
\cs_new_protected_nopar:Nn \@@_stop_item_viii:
  {
      \@@_endminipage:
    \@@_stop_list_tag:n {keyans*}
    \hbox_set_end:
    \int_set:Nn \hbadness { 10000 }
    \box_use_drop:N \l_@@_item_text_viii_box
    \int_compare:nNnTF
      { \l_@@_item_column_pos_viii_int } = { \l_@@_columns_viii_int }
      {
        \par\noindent
        \int_zero:N \l_@@_item_column_pos_viii_int
      }
      {
        \skip_horizontal:N \l_@@_columns_sep_viii_dim
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_remove_extra_parsep_viii:}
%    The implementation at this is very similar to that of the
%    \myenv*{enumext*} environment.
% \iffalse
%% Remove extra \parsep in |keyans*| environment.
% \fi
%    \begin{macrocode}
\cs_new_protected:Nn \@@_remove_extra_parsep_viii:
  {
    \int_compare:nNnT
      {
        \int_mod:nn
          { \g_@@_item_count_all_viii_int }
          { \l_@@_columns_viii_int }
      }
      =
      { 0 }
      {
        \para_end:
        \skip_vertical:n { -\l_@@_itemsep_viii_skip }
        \skip_vertical:N \c_zero_skip
        \int_gzero:N \g_@@_item_count_all_viii_int
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The command \cs{getkeyans}}\label{cmd:getkeyans}
%
% \begin{macro}{\getkeyans, \@@_getkeyans_aux:n, \@@_getkeyans:nn}
%   The \ics*{getkeyans} command takes a \emph{mandatory argument} of the
%   form \mymarg{store name \textcolor{red}{:} position}.
%   Retrieve a \emph{\enquote{single content}}  stored by \ics*{anskey}, \ics*{anspic*}
%   and \ics*{item*} and \myenv*{anskey*} from \emph{prop list} defined by \mykey{save-ans} key.
% \iffalse
%% Define |\getkeyans|.
% \fi
%    \begin{macrocode}
\NewDocumentCommand \getkeyans { m }
  {
    \exp_args:Ne \@@_getkeyans_aux:n
      { \tl_to_str:e { \text_expand:n {#1} } }
  }
%    \end{macrocode}
%   The internal function \cs{@@_getkeyans_aux:n} is in charge of
%   \emph{splitting} the \emph{mandatory argument} using \enquote{\textcolor{red}{:}}.
%   If \enquote{\textcolor{red}{:}} is omitted it will return an error.
% \iffalse
%% Internal functions for |\getkeyans|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_getkeyans_aux:n #1
  {
    \str_if_in:nnTF {#1} { : }
      {
        \use:e
          {
            \cs_set:Npn \exp_not:N \@@_tmp:w ##1 \c_colon_str ##2 \scan_stop:
              { {##1} {##2} }
          }
        \exp_after:wN \@@_getkeyans:nn \@@_tmp:w #1 \scan_stop:
      }
      { \msg_error:nnn { enumext } { missing-colon } {#1} }
  }
%    \end{macrocode}
%   The internal function \cs{@@_getkeyans:nn} will check for the existence
%   of the \emph{prop list}, if it does not exist it will return an error
%   message, then it will fetch the content specified by the \emph{second argument}
%   from \emph{prop list}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_getkeyans:nn #1 #2
  {
    \prop_if_exist:cTF { g_@@_#1_prop }
      {
        \prop_item:cn { g_@@_#1_prop }{#2}
      }
      {
        \msg_error:nnn { enumext } { undefined-storage-anskey } {#1}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The command \cs{printkeyans}}\label{cmd:printkeyans}
%
% The \ics*{printkeyans} command prints \emph{\enquote{all stored
% content}} in the \emph{sequence} defined by the \mykey{save-ans} key.
%
% The first thing we will do is define a set of \mymeta{filtered keys} with
% which we will control the options of the different nesting levels for
% the environment \myenv*{enumext} and \myenv*{enumext*} by storing their
% values ​​in the list of tokens \myvarenv{l__@@_print_keyans_X_tl}.
%
% \smallskip
%
% The variable \cs{l_@@_print_keyans_starred_tl} will have the default \mymeta{keys}
% for \ics*{printkeyans*} and will be set by |\setenumext|\myoarg{print\textnormal{\textcolor{MediumOrchid}{\texttt{*}}}}
% and the variable \cs{l__@@_print_keyans_vii_tl} will have the default
% keys for the environment \myenv*{enumext*} nested within the \emph{sequence}
% and will be set by |\setenumext|\myoarg{print \textnormal{\textcolor{gray}{,}}\textnormal{\textcolor{MediumOrchid}{\texttt{*}}}},
% the rest of the variables will be for the environment \myenv*{enumext} and will be set
% by |\setenumext|\myoarg{print \textnormal{\textcolor{gray}{,}} level}.
%
% \iffalse
%% Add keys for |\printkeyans|.
% \fi
%    \begin{macrocode}
\keys_define:nn  { enumext / print }
  {
    print*  .code:n     = \keys_precompile:neN { enumext / enumext* }
                            { \@@_filter_save_key:n {#1} }
                            \l_@@_print_keyans_starred_tl, % starred cmd
    print*  .initial:n  = { labelwidth=0pt, labelsep=0.3333em, itemindent=0pt, list-offset=0pt,
                            rightmargin=0pt, listparindent=0pt, nosep, label=\arabic*.,
                            columns=2, first=\small, font=\small },
    print-1 .code:n     = \keys_precompile:neN { enumext / level-1 }
                            { \@@_filter_save_key:n {#1} }
                            \l_@@_print_keyans_i_tl,
    print-1 .initial:n  = { labelwidth=0pt, labelsep=0.3333em, itemindent=0pt, list-offset=0pt,
                            rightmargin=0pt, listparindent=0pt, nosep, label=\arabic*.,
                            columns=2, first=\small, font=\small },
    print-2 .code:n     = \keys_precompile:neN { enumext / level-2 }
                            { \@@_filter_save_key:n {#1} }
                            \l_@@_print_keyans_ii_tl,
    print-2 .initial:n  = { labelwidth=0pt, labelsep=0.3333em, itemindent=0pt, list-offset=0pt,
                            rightmargin=0pt, listparindent=0pt,  nosep, label=(\alph*),
                            first=\small, font=\small },
    print-3 .code:n     = \keys_precompile:neN { enumext / level-3 }
                            { \@@_filter_save_key:n {#1} }
                            \l_@@_print_keyans_iii_tl,
    print-3 .initial:n  = { labelwidth=0pt, labelsep=0.3333em, itemindent=0pt, list-offset=0pt,
                            rightmargin=0pt, listparindent=0pt, nosep, label=\roman*.,
                            first=\small, font=\small },
    print-4 .code:n     = \keys_precompile:neN { enumext / level-4 }
                            { \@@_filter_save_key:n {#1} }
                            \l_@@_print_keyans_iv_tl,
    print-4 .initial:n  = { labelwidth=0pt, labelsep=0.3333em, itemindent=0pt, list-offset=0pt,
                            rightmargin=0pt, listparindent=0pt, nosep, label=\Alph*.,
                            first=\small, font=\small },
    print-* .code:n     = \keys_precompile:neN { enumext / enumext* }
                            { \@@_filter_save_key:n {#1} }
                            \l_@@_print_keyans_vii_tl, % starred nested
    print-* .initial:n  = { labelwidth=0pt, labelsep=0.3333em, itemindent=0pt, list-offset=0pt,
                            rightmargin=0pt, listparindent=0pt, nosep, label=\arabic*.,
                            first=\small, font=\small },
  }
%    \end{macrocode}
%
% \begin{important}*
%  The reason for storing \mymeta{keys} in token lists using
%  \cs{keys_precompile:neN} is because the keys are set via
%  \ics*{setenumext} but are later executed by running the command
%  \ics*{printkeyans} and they are not handled directly by its
%  \emph{optional argument}, except those related to the \emph{first}
%  opening level.
% \end{important}
%
% \begin{macro}{\printkeyans, \@@_printkeyans:nnn}
%   Create a user command to print \emph{\enquote{all stored content}}
%   in \emph{sequence} for \ics*{anskey}, \myenv*{anskey*}, \ics*{item*} and \ics*{anspic*}.
%   Within a group we will run our \emph{\enquote{precompiled keys}} and
%   then call the internal function \cs{@@_printkeyans:nnn}.
% \iffalse
%% Define |\printkeyans|.
% \fi
%    \begin{macrocode}
\NewDocumentCommand \printkeyans { s O{} m }
  {
    \group_begin:
      \tl_use:N \l_@@_print_keyans_i_tl
      \tl_use:N \l_@@_print_keyans_ii_tl
      \tl_use:N \l_@@_print_keyans_iii_tl
      \tl_use:N \l_@@_print_keyans_iv_tl
      \tl_use:N \l_@@_print_keyans_vii_tl
      \@@_printkeyans:nnn { #1 } { #2 } { #3 }
    \group_end:
  }
%    \end{macrocode}
%   The internal function \cs{@@_printkeyans:nnn} will check
%   for the existence of the \emph{sequence}, if it does not exist
%   it will return an error message, then it will check if not empty.
% \iffalse
%% Internal function for |\printkeyans|.
% \fi
%    \begin{macrocode}
\cs_new_protected:Npn \@@_printkeyans:nnn #1 #2 #3
  {
    \seq_if_exist:cTF { g_@@_#3_seq }
      {
        \seq_if_empty:cF { g_@@_#3_seq }
          {
%    \end{macrocode}
%   If the \emph{starred argument} ‘|*|’ is present we will check that
%   the environment \myenv*{enumext*} is not saved in the \emph{sequence},
%   then execute the variable \cs{l_@@_print_keyans_starred_tl} that
%   contains the default \mymeta{keys} for the environment \myenv*{enumext*},
%   we set \cs{l_@@_base_line_fix_bool} and \cs{l_@@_print_keyans_star_bool}
%   to true for \emph{baseline correction}, open the \myenv*{enumext*}
%   environment passing the \emph{optional argument} and map the \emph{sequence},
%   then set \cs{l_@@_base_line_fix_bool} and \cs{l_@@_print_keyans_star_bool}
%   to false.
%    \begin{macrocode}
            \bool_if:nTF {#1}
              {
                \seq_if_in:cnTF { g_@@_#3_seq } { \end{enumext*} }
                  {
                    \msg_error:nnnn { enumext } { print-starred } {#3} { enumext* }
                  }
                  {
                    \tl_use:N \l_@@_print_keyans_starred_tl
                    \bool_set_true:N \l_@@_base_line_fix_bool
                    \bool_set_true:N \l_@@_print_keyans_star_bool
                    \begin{enumext*}[#2]
                      \seq_map_inline:cn { g_@@_#3_seq } { ##1 }
                    \end{enumext*}
                    \bool_set_false:N \l_@@_base_line_fix_bool
                    \bool_set_false:N \l_@@_print_keyans_star_bool
                  }
              }
%    \end{macrocode}
%   Otherwise it will open the environment \myenv*{enumext} passing
%   the \emph{optional argument} to the \emph{\enquote{first level}}
%   then map the \emph{sequence}.
%    \begin{macrocode}
              {
                \begin{enumext}[#2]
                  \seq_map_inline:cn { g_@@_#3_seq } { ##1 }
                \end{enumext}
              }
          }
      }
      {
        \msg_error:nnn { enumext } { undefined-storage-anskey } {#3}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The command \cs{setenumext}}\label{cmd:setenumext}
%
% The command |\setenumext| will be in charge of managing the
% \mymeta{keys} passed to all environments and to the |\printkeyans|
% command. We must take precautions with the \myenv*{enumext*}
% environment and \emph{\enquote{first level}} of the \myenv*{enumext}
% environment so as not to capture \mymeta{keys} that complicate us.
%
% \begin{macro}{\@@_filter_first_level:n, \@@_filter_first_level_key:n,
%               \@@_filter_first_level_pair:nn,}
%   The function \cs{@@_filter_first_level:n} will be in charge of
%   filtering the \mymeta{keys} passed to the environment \myenv*{enumext*}
%   and \emph{\enquote{first level}} of the environment \myenv*{enumext}.
% \iffalse
%% Internal function for filter keys in |\setenumext| for first level.
% \fi
%    \begin{macrocode}
\cs_new:Npn \@@_filter_first_level:n #1
  {
    \use:e
      {
        \keyval_parse:NNn
          \@@_filter_first_level_key:n
          \@@_filter_first_level_pair:nn {#1}
      }
  }
%    \end{macrocode}
%   The function \cs{@@_filter_first_level_key:n} will be responsible for
%   filtering the \mymeta{keys} that are passed \emph{\enquote{without value}} by
%   excluding the keys \mykey{resume} and \mykey{resume*}.
%    \begin{macrocode}
\cs_new:Npn \@@_filter_first_level_key:n #1
  {
    \str_case:nnF {#1}
      {
        { resume   } {}
        { resume*  } {}
      }
      { , { \exp_not:n {#1} } }
  }
%    \end{macrocode}
%   The function \cs{@@_filter_first_level_pair:nn} will be responsible for
%   filtering the \mymeta{keys} that are passed \emph{\enquote{with value}} by
%   excluding the \mykey{series}, \mykey{resume} and \mykey{save-ans} keys.
%    \begin{macrocode}
\cs_new:Npn \@@_filter_first_level_pair:nn #1#2
  {
    \str_case:nnF {#1}
      {
        { series } {}
        { resume } {}
        { save-ans } {}
      }
      { , { \exp_not:n {#1} } = { \exp_not:n {#2} } }
  }
%    \end{macrocode}
% \end{macro}
%
% Now define a \emph{\enquote{meta families}} of \mymeta{keys}
% to access from \ics*{setenumext}.
%
% \iffalse
%% Add keys for |\setenumext|.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext / meta-families }
  {
    enumext-1 .code:n =
                {
                  \keys_set:ne { enumext / level-1 }
                    {
                      \@@_filter_first_level:n {#1}
                    }
                } ,
    enumext-2 .code:n = { \keys_set:nn { enumext / level-2 } {#1} } ,
    enumext-3 .code:n = { \keys_set:nn { enumext / level-3 } {#1} } ,
    enumext-4 .code:n = { \keys_set:nn { enumext / level-4 } {#1} } ,
    keyans    .code:n = { \keys_set:nn { enumext / keyans  } {#1} } ,
    enumext*  .code:n =
                {
                  \keys_set:ne { enumext / enumext* }
                    {
                      \@@_filter_first_level:n {#1}
                    }
                } ,
    keyans*   .code:n = { \keys_set:nn { enumext / keyans* } {#1} } ,
    print*    .code:n = { \keys_set:nn { enumext / print   } { print*  = {#1} } } ,
    print-1   .code:n = { \keys_set:nn { enumext / print   } { print-1 = {#1} } } ,
    print-2   .code:n = { \keys_set:nn { enumext / print   } { print-2 = {#1} } } ,
    print-3   .code:n = { \keys_set:nn { enumext / print   } { print-3 = {#1} } } ,
    print-4   .code:n = { \keys_set:nn { enumext / print   } { print-4 = {#1} } } ,
    print-*   .code:n = { \keys_set:nn { enumext / print   } { print-* = {#1} } } ,
    unknown   .code:n = { \msg_error:nn { enumext } { unknown-key-family } } ,
  }
%    \end{macrocode}
%    We store them in the constant sequence \cs{c_@@_all_families_seq}
%    separated by commas.
%    \begin{macrocode}
\seq_const_from_clist:Nn \c_@@_all_families_seq
  {
    enumext-1, enumext-2, enumext-3, enumext-4, keyans, enumext*,
    keyans*, print-1, print-2, print-3, print-4, print-*, print*,
  }
%    \end{macrocode}
%
% \begin{macro}{\setenumext, \@@_set_parse:n, \@@_set_error:nn,}
%    Now we define the user command \ics*{setenumext}.
% \iffalse
%% Define |\setenumext|.
% \fi
%    \begin{macrocode}
\NewDocumentCommand \setenumext { O{enumext,1} +m }
  {
    \seq_clear:N \l_@@_setkey_tmpa_seq
    \seq_set_from_clist:Nn \l_@@_setkey_tmpb_seq {#1}
    \int_set:Nn \l_@@_setkey_tmpa_int
      {
        \seq_count:N \l_@@_setkey_tmpb_seq
      }
    \int_compare:nNnTF { \l_@@_setkey_tmpa_int } > { 1 }
      {
        \seq_pop_left:NN \l_@@_setkey_tmpb_seq \l_@@_setkey_tmpa_tl
        \seq_map_function:NN \l_@@_setkey_tmpb_seq \@@_set_parse:n
        \seq_set_map_e:NNn \l_@@_setkey_tmpa_seq \l_@@_setkey_tmpa_seq
          {
            \tl_use:N \l_@@_setkey_tmpa_tl - ##1
          }
      }
      {
        \seq_put_right:Ne \l_@@_setkey_tmpa_seq { \tl_trim_spaces:n {#1} }
      }
    \seq_if_empty:NTF \l_@@_setkey_tmpa_seq
      { \seq_map_inline:Nn \c_@@_all_families_seq }
      { \seq_map_inline:Nn \l_@@_setkey_tmpa_seq }
      {
        \keys_set:nn { enumext / meta-families } { ##1 = {#2} }
      }
  }
%    \end{macrocode}
%   Internal functions used by the \ics*{setenumext} command.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_parse:n #1
  {
    \tl_set:Ne \l_@@_setkey_tmpb_tl { \tl_trim_spaces:n {#1} }
    \clist_map_inline:nn { 0, 1, 2, 3, 4, * } % <- max level
      { \tl_remove_all:Nn \l_@@_setkey_tmpb_tl {##1} }
    \tl_if_empty:NTF \l_@@_setkey_tmpb_tl
      {
        \seq_put_right:Ne \l_@@_setkey_tmpa_seq
          { \tl_trim_spaces:n {#1} }
      }
      { \@@_set_error:nn {#1} { } }
  }
\cs_new_protected:Npn \@@_set_error:nn #1 #2
  { \msg_error:nnn { enumext } { invalid-key } {#1} {#2} }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The command \cs{setenumextmeta}}\label{cmd:setenumextmeta}
%
% The command \ics*{setenumextmeta} will be responsible for adding new
% \emph{\enquote{meta-keys}} for the \myenv*{enumext} and \myenv*{enumext*} environments.
% The implementation code was given by Jonathan P. Spratte \texttt{(@Skillmon)}
% answer in \href{https://tex.stackexchange.com/a/721079}{Add \texttt{.meta} key to existing keys (l3keys)}.
%
% \begin{macro}{\setenumextmeta, \c_@@_meta_paths_prop,
%               \@@_add_meta_key:nnn, \@@_def_meta_key:nnn,
%               \@@_def_meta_key:Vnn }
%   First we will create a prop list \cs{c_@@_meta_paths_prop} to
%   handle the \emph{optional argument}.
% \iffalse
%% Define |\setenumextmeta|.
% \fi
%    \begin{macrocode}
\prop_const_from_keyval:Nn \c_@@_meta_paths_prop
  {
    {enumext,1} = level-1,
    {enumext,2} = level-2,
    {enumext,3} = level-3,
    {enumext,4} = level-4,
    {enumext*}  = enumext*
  }
%    \end{macrocode}
%   Now we create the user command taking care that \texttt{unknown}
%   cannot be passed as an argument.
%    \begin{macrocode}
\NewDocumentCommand \setenumextmeta { s O{enumext,1} m +m }
  {
    \str_if_eq:eeTF { \tl_trim_spaces:n {#3} } { unknown }
      { \msg_error:nn { enumext } { prohibited-unknown } }
      {
        \bool_if:nTF {#1}
          {
            \int_step_inline:nn { 4 }
              { \@@_add_meta_key:nnn { enumext, ##1 } {#3} {#4} }
            \@@_add_meta_key:nnn { enumext* } {#3} {#4}
          }
          { \@@_add_meta_key:nnn {#2} {#3} {#4} }
      }
  }
%    \end{macrocode}
%   The internal functions \cs{@@_add_meta_key:nnn} and \cs{@@_def_meta_key:nnn}
%   will check the \emph{optional argument} and create the \emph{\enquote{meta-key}}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_add_meta_key:nnn #1
  {
    \tl_set:Nn \l_@@_meta_path_tl {#1}
    \tl_replace_all:Nnn \l_@@_meta_path_tl { ~ } {}
    \prop_get:NVNTF
      \c_@@_meta_paths_prop \l_@@_meta_path_tl \l_@@_meta_path_tl
      { \@@_def_meta_key:Vnn \l_@@_meta_path_tl }
      {
        \msg_error:nnn { enumext } { unknown-set } {#1}
        \use_none:nn
      }
  }
\cs_new_protected:Npn \@@_def_meta_key:nnn #1#2#3
  {
    \bool_lazy_or:nnTF
      { \keys_if_exist_p:nn { enumext / #1 } {#2} }
      { \keys_if_exist_p:nn { enumext / enumext* } {#2} }
      { \msg_error:nnn { enumext } { already-defined } {#2} }
      {
        \keys_define:nn { enumext / #1 }
          {
            #2 .meta:n = {#3},
            #2 .value_forbidden:n = true
          }
      }
  }
\cs_generate_variant:Nn \@@_def_meta_key:nnn { V }
%    \end{macrocode}
% \end{macro}
%
% \subsection{The command \cs{foreachkeyans}}\label{cmd:foreachkeyans}
%
% The command \ics*{foreachkeyans} will execute a \emph{loop} over the \emph{prop list} and return its contents.
% The implementation code is adapted from the answer provided by Enrico Gregorio \texttt{(@egreg)} in
% \href{https://tex.stackexchange.com/a/721130}{Expand a \texttt{.cs} defined by key inside the function}.
%
% \begin{macro}{\foreachkeyans, \@@_parse_foreach_keys:nn,
%               \@@_parse_foreach_keys:n, \@@_foreach_keyans:nn,
%               \@@_foreach_add_body:n}
%   We define a set of \mymeta{keys} for command and we will save the
%   default values ​​of these in \cs{g_@@_foreach_default_keys_tl} to avoid
%   the use of group.
% \iffalse
%% Define |\foreachkeyans|.
% \fi
%    \begin{macrocode}
\keys_define:nn { enumext / foreach }
  {
    before  .tl_set:N  = \l_@@_foreach_before_tl,
    before  .value_required:n = true,
    after   .tl_set:N  = \l_@@_foreach_after_tl,
    after   .value_required:n = true,
    start   .int_set:N = \l_@@_foreach_start_int,
    start   .value_required:n = true,
    stop    .int_set:N = \l_@@_foreach_stop_int,
    stop    .value_required:n = true,
    step    .int_set:N = \l_@@_foreach_step_int,
    step    .value_required:n = true,
    wrapper .cs_set_protected:Np = \@@_foreach_wrapper:n #1,
    wrapper .value_required:n = true,
    sep     .tl_set:N  = \l_@@_foreach_sep_tl,
    sep     .value_required:n = true,
    unknown .code:n    = { \@@_parse_foreach_keys:n {#1} }
  }
\keys_precompile:nnN { enumext / foreach }
  {
    before={},after={},start=1,step=1,stop=0,wrapper=#1,sep={; }
  }
  \g_@@_foreach_default_keys_tl
%    \end{macrocode}
%   Functions for handling unknown \mymeta{keys}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_parse_foreach_keys:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      {
        \msg_error:nnn { enumext } { for-key-unknown } {#1}
      }
      {
        \msg_error:nnnn { enumext } { for-key-value-unknown } {#1} {#2}
      }
  }
\cs_new_protected:Npn \@@_parse_foreach_keys:n #1
  {
    \exp_args:NV \@@_parse_foreach_keys:nn \l_keys_key_str {#1}
  }
%    \end{macrocode}
%   We create the command.
%    \begin{macrocode}
\NewDocumentCommand \foreachkeyans { +O{} m }
  {
    \@@_foreach_keyans:nn {#1} {#2}
  }
%    \end{macrocode}
%   Finally the internal functions \cs{@@_foreach_keyans:nn} and
%   \cs{@@_foreach_add_body:n} will loop through the prop list and print
%   the contents.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_foreach_keyans:nn #1 #2
  {
    \tl_use:N \g_@@_foreach_default_keys_tl
    \keys_set:nn { enumext / foreach } {#1}
    \tl_set:Nn \l_@@_foreach_name_prop_tl {#2}
    \prop_if_exist:cF { g_@@_#2_prop }
      {
        \msg_error:nnn { enumext } { undefined-storage-anskey } {#2}
      }
    \int_compare:nNnT { \l_@@_foreach_stop_int } = { 0 }
      {
        \int_set:Nn \l_@@_foreach_stop_int
          { \prop_count:c { g_@@_#2_prop } }
      }
    \seq_clear:N \l_@@_foreach_print_seq
    \int_step_function:nnnN
      { \l_@@_foreach_start_int }
      { \l_@@_foreach_step_int }
      { \l_@@_foreach_stop_int }
      \@@_foreach_add_body:n
      \seq_use:NV \l_@@_foreach_print_seq \l_@@_foreach_sep_tl
  }
\cs_new_protected:Npn \@@_foreach_add_body:n #1
  {
    \seq_put_right:Ne \l_@@_foreach_print_seq
      {
        \exp_not:V \l_@@_foreach_before_tl
        \@@_foreach_wrapper:n
          {
            \prop_item:cn { g_@@_ \l_@@_foreach_name_prop_tl _prop }{#1}
          }
        \exp_not:V \l_@@_foreach_after_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Messages}
%
% \iffalse
%% Messages.
% \fi
% Message used by package-load for \mypkg{multicol} and \mypkg{hyperref}
% packages.
%    \begin{macrocode}
\msg_new:nnn { enumext } { package-load }
  {
    The ~ '#1' ~ package ~ is ~ already ~ loaded.
  }
\msg_new:nnn { enumext } { package-not-load }
  {
    The ~ '#1' ~ package ~ will ~ be ~ loaded ~ as ~ a ~ dependency.
  }
\msg_new:nnn { enumext } { package-load-foot }
  {
    The ~ '#1' ~ package ~ is ~ loaded ~ with ~ the ~ option ~ '#2'.
  }
%    \end{macrocode}
%
% Message used in the creation of counters by \mypkg*{enumext} package.
%    \begin{macrocode}
\msg_new:nnn { enumext } { counters }
  {
    The ~ counter ~ '#1' ~ is ~ already ~ defined ~ by ~ some ~ \\
    package ~ or ~ macro, ~ it ~ cannot ~ be ~ continued.
  }
%    \end{macrocode}
%
% Message used by \mykey{align} and \mykey{mark-pos} keys.
%    \begin{macrocode}
\msg_new:nnn { enumext } { unknown-choice }
  {
    The ~ value ~ '#3' ~ for ~ '#1' ~ key ~ is ~ invalid ~ use ~ ('#2').
  }
%    \end{macrocode}
%
% Message used by reserved \myenv*{anskey*} environment by \mypkg*{enumext}
% package.
%    \begin{macrocode}
\msg_new:nnnn { enumext } { anskey-env-error }
  {
    The ~ '#1' ~ environment ~is ~ reserved ~ by ~\\
    'enumext' ~ package, ~ It~ is~ already~ defined.
  }
  {
    The ~ anskey* ~ environment ~ is ~ defined ~ internally ~
    for ~ the ~ 'save-ans' ~ key.\\
  }
%    \end{macrocode}
%
% Message used in the creation of \emph{prop list} by \mypkg*{enumext}
% package.
%    \begin{macrocode}
\msg_new:nnn { enumext } { store-prop }
  {
    * ~ Package ~ enumext: ~ Creating ~
     \c_backslash_str g_@@_#1_prop ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { store-seq }
  {
    * ~ Package ~ enumext: ~ Creating ~
    \c_backslash_str g_@@_#1_seq ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { store-int }
  {
    * ~ Package ~ enumext: ~ Creating ~
    \c_backslash_str g_@@_resume_#1_int ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { prop-seq-int-hook }
  {
    * ~ Package ~ enumext: ~ Elements ~ in ~
    \c_backslash_str g_@@_#1_prop ~ = ~ #2.\\
    * ~ Package ~ enumext: ~ Elements ~ in ~
    \c_backslash_str g_@@_#1_seq ~ = ~ #3.\\
    * ~ Package ~ enumext: ~ Value ~ off ~
    \c_backslash_str g_@@_resume_#1_int ~ = ~ #4.
  }
\msg_new:nnn { enumext } { item-answer-hook }
  {
    * ~ Package ~ enumext: ~ Value ~ off ~
    \c_backslash_str g_@@_item_number_int ~ = ~ #1.\\
    * ~ Package ~ enumext: ~ Value ~ off ~
    \c_backslash_str g_@@_item_anskey_int ~ = ~ #2.\\
    * ~ Package ~ enumext: ~ Difference ~ item_number_int ~ - ~ item_anskey_int ~ = ~ #3.
  }
%    \end{macrocode}
%
% Message used by \myoarg{key \textnormal{\textcolor{gray}{=}} val}
% system and \ics*{setenumext} command.
%    \begin{macrocode}
\msg_new:nnn { enumext } { invalid-key }
  {
    The ~ key ~ '#1' ~ is ~ not ~ know ~ the ~ level ~ #2.
  }
\msg_new:nnn { enumext } { unknown-key-family }
  {
    Unknown~key~family~`\l_keys_key_str'~for~enumext.
  }
%    \end{macrocode}
% Messages used in length calculation.
%    \begin{macrocode}
\msg_new:nnn { enumext } { width-negative }
  {
    Ignoring ~ negative ~ value ~ '#1=#2' ~ \msg_line_context:.\\
    The ~ key ~ '#1'~ accepts ~ values  ~ >= ~ 0pt.
  }
\msg_new:nnn { enumext } { width-zero }
  {
    Invalid ~ '#1=#2' ~ \msg_line_context:.\\
    The ~ key ~ '#1'~ accepts ~ values  ~ > ~ 0pt.
  }
%    \end{macrocode}
% Messages used by \mykey{show-length} key in \myenv*{enumext}.
%    \begin{macrocode}
\msg_new:nnn { enumext } { list-lengths }
  {
    **** ~ Lengths ~ used ~ by ~ 'enumext' ~ level ~ '#2' ~ \msg_line_context:~\c_space_tl ****\\
    \@@_show_length:nnn { dim  } { labelsep      } {#1}
    \@@_show_length:nnn { dim  } { labelwidth    } {#1}
    \@@_show_length:nnn { dim  } { itemindent    } {#1}
    \@@_show_length:nnn { dim  } { leftmargin    } {#1}
    \@@_show_length:nnn { dim  } { rightmargin   } {#1}
    \@@_show_length:nnn { dim  } { listparindent } {#1}
    \@@_show_length:nnn { skip } { topsep    } {#1}
    \@@_show_length:nnn { skip } { parsep    } {#1}
    \@@_show_length:nnn { skip } { partopsep } {#1}
    \@@_show_length:nnn { skip } { itemsep   } {#1}
    ****************************************************
  }
%    \end{macrocode}
%
%  Messages used by \mykey{show-length} key in  \myenv*{enumext*},
%  \myenv*{keyans*} and \myenv*{keyans}.
%    \begin{macrocode}
\msg_new:nnn { enumext } { list-lengths-not-nested }
  {
    **** ~ Lengths ~ used ~ by ~ '#2' ~ environment ~ \msg_line_context:~\c_space_tl ****\\
    \@@_show_length:nnn { dim  } { labelsep      } {#1}
    \@@_show_length:nnn { dim  } { labelwidth    } {#1}
    \@@_show_length:nnn { dim  } { itemindent    } {#1}
    \@@_show_length:nnn { dim  } { leftmargin    } {#1}
    \@@_show_length:nnn { dim  } { rightmargin   } {#1}
    \@@_show_length:nnn { dim  } { listparindent } {#1}
    \@@_show_length:nnn { skip } { topsep    } {#1}
    \@@_show_length:nnn { skip } { parsep    } {#1}
    \@@_show_length:nnn { skip } { partopsep } {#1}
    \@@_show_length:nnn { skip } { itemsep   } {#1}
    ****************************************************
  }
%    \end{macrocode}
%
% Messages used by \mykey{ref} key.
%    \begin{macrocode}
\msg_new:nnn { enumext } { key-ref-empty }
  {
    Key ~ 'ref' ~ need ~ a ~ value ~ in ~ '#1'~ \msg_line_context:.
  }
%    \end{macrocode}
%
% Messages used by \mykey{save-ans} key.
%    \begin{macrocode}
\msg_new:nnn { enumext } { save-ans-empty }
  {
    Key ~ 'save-ans' ~ need ~ a ~ value ~ in ~ '#1'~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { save-ans-log }
  {
    * ~ Package ~ enumext: ~ Start ~ #1\c_space_tl with ~ save-ans=#2 ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { save-ans-log-hook }
  {
    * ~ Package ~ enumext: ~ Stop ~ #1\c_space_tl with ~ save-ans=#2 ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { save-ans-hook }
  {
    Stop ~ storing ~ for ~ 'save-ans=#1' ~ \msg_line_context:.
  }
%    \end{macrocode}
%
%  Messages used by the internal system to check answer used by
%  \mykey{check-ans} key.
%    \begin{macrocode}
\msg_new:nnn { enumext } { need-save-ans }
  {
    Key ~ '#1'~ works ~ only ~ with ~ the ~ 'save-ans' ~ key ~ in ~ '#2'~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { items-same-answer }
  {
    ****************************************\\
    * ~ Package ~ enumext: ~ Checking ~ answers ~ in ~ '#1' ~
    for ~ \c_left_brace_str #2 \c_right_brace_str\\
    * ~ started ~ #3 ~ and ~ close ~ \msg_line_context: : ~
    'OK', ~ all ~ items ~ with ~ answer.\\
    ****************************************
  }
\msg_new:nnn { enumext } { item-greater-answer }
  {
    Checking ~ answers ~ in ~ '#1' ~ for ~ \c_left_brace_str #2 \c_right_brace_str\\
    started ~ #3 ~ and ~ close ~ \msg_line_context: : ~'NOT ~ OK'\\
    Items ~ > ~ Answers.
  }
\msg_new:nnn { enumext } { item-less-answer }
  {
    Checking ~ answers ~ in ~ '#1' ~ for ~ \c_left_brace_str #2 \c_right_brace_str\\
    started ~ #3 ~ and ~ close ~ \msg_line_context: : ~'NOT ~ OK'\\
    Items ~ < ~ Answers.
  }
%    \end{macrocode}
%  Messages used by the internal system to check for
%  \emph{\enquote{starred}} |\item*| and |\anspic*| commands.
%    \begin{macrocode}
\msg_new:nnn { enumext } { missing-starred }
  {
    Missing ~ '\c_backslash_str #1*' ~ #2.
  }
\msg_new:nnn { enumext } { many-starred }
  {
    Many ~ '\c_backslash_str #1*' ~ #2.
  }
%    \end{macrocode}
%  Messages used by |\printkeyans*| command.
%    \begin{macrocode}
\msg_new:nnn { enumext } { print-starred }
  {
    \c_backslash_str printkeyans*:~ The ~ sequence ~ '#1' ~ already ~ contains ~
    #2 ~ environment ~  \msg_line_context:.
  }
%    \end{macrocode}
% Message for the nesting depth of the environment \myenv*{enumext}.
%    \begin{macrocode}
\msg_new:nnn { enumext } { list-too-deep }
  {
    Too ~ deep ~ nesting  ~ for ~ 'enumext' ~ \msg_line_context:.~ \\
    The ~ maximum  ~ level  ~ of  ~ nesting  ~ is ~ 4.
  }
%    \end{macrocode}
% Messages used by \ics*{anskey}, \myenv*{anskey*} and \ics*{anspic} commands.
%    \begin{macrocode}
\msg_new:nnn { enumext } { anskey-unnumber-item }
  {
    Can't ~ store ~ with ~ a ~ unnumbered ~ \c_backslash_str item ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { anskey-already-stored }
  {
    Content ~ already ~ stored ~ for ~ this ~ \c_backslash_str item ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { anskey-empty-arg }
  {
    Can't ~ store ~ empty ~ content ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { anskey-wrong-place }
  {
    Wrong ~ place ~ for ~ command ~ '\c_backslash_str #1' ~ \msg_line_context:.~ \\
    '\c_backslash_str #1' ~ works ~ in ~ the ~ environment ~ '#2'.
  }
\msg_new:nnn { enumext } { anskey-nested }
  {
    The ~ command ~ \c_backslash_str anskey~ can't ~ be ~ nested ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { anskey-math-mode }
  {
    #1 ~ can't ~ work ~ in ~ math ~ mode ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { anskey-env-wrong }
  {
    The ~ environment ~ anskey* ~ cannot ~ use ~ in ~ '#1' ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { anspic-wrong-place }
  {
    Wrong ~ place ~ for ~ command ~ '\c_backslash_str #1' ~ \msg_line_context:.~ \\
    '\c_backslash_str #1' ~ works ~ in ~ the ~ environment ~ '#2'.
  }
\msg_new:nnn { enumext } { command-wrong-place }
  {
    Wrong ~ place ~ for ~ command ~ '\c_backslash_str #1' ~ \msg_line_context:.~ \\
    '\c_backslash_str #1' ~ works ~ outside ~ the ~ environment ~ '#2'.
  }
\msg_new:nnnn { enumext } { anskey-env-key-unknown }
  {
    The ~ key ~ '#1' ~ is ~ unknown ~ by ~ environment~
    'anskey*' ~ and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ 'anskey*' ~ does ~ not ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
\msg_new:nnnn { enumext } { anskey-env-key-value-unknown }
  {
    The ~ key ~ '#1=#2' ~ is ~ unknown ~ by ~ environment ~
    'anskey*' ~ and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ 'anskey*' ~ does ~ not ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
\msg_new:nnnn { enumext } { anskey-cmd-key-unknown }
  { The ~ key ~'#1'~ is ~ unknown ~ by ~ '\c_backslash_str anskey' ~ and ~ is ~ being ~ ignored.}
  {
    The ~ command ~'\c_backslash_str anskey' ~ does ~ not ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
\msg_new:nnnn { enumext } { anskey-cmd-key-value-unknown }
  { The ~ key ~ '#1=#2' ~ is ~ unknown ~ by ~ '\c_backslash_str anskey' ~ and ~ is ~ being ~ ignored. }
  {
    The ~ command ~ '\c_backslash_str anskey' ~ does ~ not ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
%    \end{macrocode}
%
% Messages used by \myenv*{keyans}, \myenv*{keyans*} and \myenv*{keyanspic}
% environment.
%    \begin{macrocode}
\msg_new:nnn { enumext } { keyans-nested }
  {
    The ~ environment ~ 'keyans' ~ can't ~ be  ~ nested  ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { keyans-wrong-level }
  {
    Wrong ~ level ~ position ~ for ~ 'keyans' ~ \msg_line_context:.~ \\
    The ~ environment ~ 'keyans' ~ can ~ only ~ be ~ in ~ the ~ first ~ level.
  }
\msg_new:nnn { enumext } { wrong-place }
  {
    Wrong ~ place ~ for ~ '#1' ~ environment ~\msg_line_context:.~ \\
    '#1' ~ is ~ only ~ found ~ with ~ '#2' ~  in  ~  'enumext.
  }
\msg_new:nnn { enumext } { keyanspic-nested }
  {
    The ~ environment ~ 'keyanspic' ~ can't ~ be  ~ nested~ \msg_line_context:.~.
  }
\msg_new:nnn { enumext } { keyanspic-wrong-level }
  {
    Wrong ~ level ~ position ~ for ~ 'keyanspic' ~ \msg_line_context:.~ \\
    The ~ environment ~ 'keyans' ~ can ~ only ~ be ~ in ~ the ~ first ~ level.
  }
\msg_new:nnn { enumext } { keyanspic-item-cmd }
  {
    Can't ~ use  ~ \c_backslash_str item ~ in ~ keyanspic ~ \msg_line_context:.
  }
\msg_new:nnnn { enumext } { keyans-unknown-key }
  {
    The ~ key ~ '#1' ~ is ~ unknown ~ by ~ environment~
    '\l_@@_envir_name_tl' ~ and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ '\l_@@_envir_name_tl' ~ does ~ not
    ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
\msg_new:nnnn { enumext } { keyans-unknown-key-value }
  {
    The ~ key ~ '#1=#2' ~ is ~ unknown ~ by ~ environment ~
    '\l_@@_envir_name_tl' ~ and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ '\l_@@_envir_name_tl' ~ does ~ not
    ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
%    \end{macrocode}
%
% Message used by unknown \mymeta{keys} in \myenv*{enumext*}.
% environment.
%    \begin{macrocode}
\msg_new:nnnn { enumext } { starred-unknown-key }
  {
    The ~ key ~ '#1' ~ is ~ unknown ~ by ~ environment~
    '\l_@@_envir_name_tl' ~ and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ '\l_@@_envir_name_tl' ~ does ~ not
    ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
\msg_new:nnnn { enumext } { starred-unknown-key-value }
  {
    The ~ key ~ '#1=#2' ~ is ~ unknown ~ by ~ environment ~
    '\l_@@_envir_name_tl' ~ and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ '\l_@@_envir_name_tl' ~ does ~ not
    ~ have ~ a ~ key ~ called ~'#1'.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
%    \end{macrocode}
% Message used by unknown \mymeta{keys} in \myenv*{enumext}
% environment.
%    \begin{macrocode}
\msg_new:nnnn { enumext } { standar-unknown-key }
  {
    The ~ key ~ '#1' ~ is ~ unknown ~ by ~ environment ~ '\l_@@_envir_name_tl' \c_space_tl
    ~ on ~ level ~ \int_use:N \l_@@_level_int \c_space_tl and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ '\l_@@_envir_name_tl' ~ does ~ not
    ~ have ~ a ~ key ~ called ~'#1' ~ on ~ level ~ \int_use:N \l_@@_level_int.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
\msg_new:nnnn { enumext } { standar-unknown-key-value }
  {
    The ~ key ~ '#1=#2' ~ is ~ unknown ~ by ~ environment ~ '\l_@@_envir_name_tl' \c_space_tl
    ~ on ~ level ~ \int_use:N \l_@@_level_int \c_space_tl and ~ is ~ being ~ ignored.
  }
  {
    The ~ environment ~ '\l_@@_envir_name_tl' ~ does ~ not
    ~ have ~ a ~ key ~ called ~'#1' ~ on ~ level ~ \int_use:N \l_@@_level_int.\\
    Check ~ that ~ you ~ have ~ spelled ~ the ~ key ~ name ~ correctly.
  }
%    \end{macrocode}
% Message used by unknown \mymeta{keys} in \ics*{foreachkeyans}.
%    \begin{macrocode}
\msg_new:nnnn { enumext } { for-key-unknown }
  { The~key~'#1'~is~unknown~by~'\c_backslash_str foreachkeyans'~and~is~being~ignored.}
  {
    The~command~'\c_backslash_str foreachkeyans'~does~not~have~a~key~called~'#1'.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
\msg_new:nnnn { enumext } { for-key-value-unknown }
  { The~key~'#1=#2'~is~unknown~by~'\c_backslash_str foreachkeyans'~and~is~being~ignored. }
  {
    The~command~'\c_backslash_str foreachkeyans'~does~not~have~a~key~called~'#1'.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
%    \end{macrocode}
%
% Messages used by \ics*{getkeyans} command.
%    \begin{macrocode}
\msg_new:nnn { enumext } { undefined-storage-anskey }
  {
    Storage ~ named ~ '#1' ~ is ~ not ~ defined ~ \msg_line_context:.
  }
%    \end{macrocode}
%
% Messages used by \ics*{miniright} command.
%    \begin{macrocode}
\msg_new:nnn { enumext } { missing-miniright }
  {
    Missing ~ '\c_backslash_str miniright' ~ in ~ \msg_line_context:.\\
    The ~ key ~ 'mini-env' ~ need ~ '\c_backslash_str miniright'.
  }
\msg_new:nnn { enumext } { wrong-miniright-place }
  {
    Wrong ~ place ~ for ~ '\c_backslash_str miniright' ~ \msg_line_context:.~ \\
    Works ~ in ~ 'enumext' ~ and ~ 'keyans' ~ with ~ key ~ 'mini-env'.
  }
\msg_new:nnn { enumext } { wrong-miniright-use }
  {
    Wrong ~ use ~ for ~ '\c_backslash_str miniright' ~ \msg_line_context:.~ \\
    '\c_backslash_str miniright' ~ need ~ a ~ key ~ 'mini-env'.
  }
\msg_new:nnn { enumext } { wrong-miniright-starred }
  {
    Can't ~ use  ~ \c_backslash_str miniright ~ in ~ starred ~ environments ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { many-miniright-used }
  {
    Can't ~ use  ~ \c_backslash_str miniright ~ more ~ than ~ once ~  \msg_line_context:.
  }
%    \end{macrocode}
% Messages used by \ics*{setenumextmeta} command.
%    \begin{macrocode}
\msg_new:nnn { enumext } { unknown-set }
  {
    Argument ~ [#1] ~ is ~ unknown ~ by ~  \c_backslash_str setenumextmeta ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { already-defined }
  {
    The ~ key ~ '#1' ~ is ~ already ~ defined ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { prohibited-unknown }
  {
    The ~ name ~ 'unknown' ~ can't ~ be ~ chosen~ for ~ a ~ meta ~ key ~ \msg_line_context:.
  }
%    \end{macrocode}
% Messages used by \myenv*{enumext*} and \myenv*{keyans*} environments.
%    \begin{macrocode}
\msg_new:nnn { enumext } { nested }
  {
    The ~ environment ~ \l_@@_envir_name_tl \c_space_tl can't ~ be ~ nested ~ \msg_line_context:.
  }
\msg_new:nnn { enumext } { nested-horizontal }
  {
    The ~ environment ~ \l_@@_envir_name_tl \c_space_tl can't ~ be ~ nested ~ in ~ '#1' ~  \msg_line_context:.
  }
\msg_new:nnn { enumext } { item-joined }
  {
    Items ~ joined ~ (#1) ~ > ~ #2  ~ columns ~\msg_line_context:.
  }
\msg_new:nnn { enumext } { item-joined-columns }
  {
    Not ~ space ~ to ~ join ~ items ~ (#1) ~ > ~ #2 ~\msg_line_context:.
  }
%    \end{macrocode}
% \subsection{Finish package}
%
% Finish package implementation.
%
%    \begin{macrocode}
\file_input_stop:
%</package>
%    \end{macrocode}
% \Finale