summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/enumitem-zref/enumitem-zref.dtx
blob: 992d35712d3765af016521a677a517e62fd26103 (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
% \iffalse meta-comment
% enumitem-zref : 2011/02/18 v1.8 - Extended references for enumitem pkg]
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in
%    http://www.latex-project.org/lppl.txt
%
% This work consists of the main source file enumitem-zref.dtx
% and the derived files
%    enumitem-zref.sty, enumitem-zref.pdf, enumitem-zref.ins,
%    enumitem-zexample.tex
%
% Unpacking:
%    (a) If enumitem-zref.ins is present:
%           etex enumitem-zref.ins
%    (b) Without enumitem-zref.ins:
%           etex enumitem-zref.dtx
%    (c) If you insist on using LaTeX
%           latex \let\install=y\input{enumitem-zref.dtx}
%        (quote the arguments according to the demands of your shell)
%
% Documentation:
%           (pdf)latex enumitem-zref.dtx
% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%<*ignore>
\begingroup
  \def\x{LaTeX2e}%
\expandafter\endgroup
\ifcase 0\ifx\install y1\fi\expandafter
         \ifx\csname processbatchFile\endcsname\relax\else1\fi
         \ifx\fmtname\x\else 1\fi\relax
\else\csname fi\endcsname
%</ignore>
%<*install>
\input docstrip.tex
\tracingonline=0
\Msg{************************************************************************}
\Msg{* Installation}
\Msg{* Package: 2011/02/18 v1.8 - Extended references to items for enumitem package and hyperref}
\Msg{************************************************************************}

\keepsilent
\askforoverwritefalse

\let\MetaPrefix\relax
\preamble

This is a generated file.

enumitem-zref : 2011/02/18 v1.8 - Extended references to items for enumitem package and hyperref

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3 of this license or (at your option) any later
version. The latest version of this license is in
   http://www.latex-project.org/lppl.txt

This work consists of the main source file enumitem-zref.dtx
and the derived files
   enumitem-zref.sty, enumitem-zref.pdf, enumitem-zref.ins,
   enumitem-zexample.tex

enumitem-zref : Extended references to items for enumitem package and hyperref
Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>

\endpreamble
\let\MetaPrefix\DoubleperCent

\generate{%
   \file{enumitem-zref.ins}{\from{enumitem-zref.dtx}{install}}%
   \file{enumitem-zref.sty}{\from{enumitem-zref.dtx}{package}}%
   \file{enumitem-zexample.tex}{\from{enumitem-zref.dtx}{example}}%
}

\askforoverwritefalse
\generate{%
   \file{enumitem-zref.drv}{\from{enumitem-zref.dtx}{driver}}%
}

\obeyspaces
\Msg{************************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{*     enumitem-zref.sty}
\Msg{*}
\Msg{* To produce the documentation run the file `enumitem-zref.dtx'}
\Msg{* through LaTeX.}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{*}
\Msg{************************************************************************}

\endbatchfile
%</install>
%<*ignore>
\fi
%</ignore>
%<*driver>
\edef\thisfile{\jobname}
\def\thisinfo{Extended references to items for enumitem package}
\def\thisdate{2011/02/18}
\def\thisversion{1.8}
\PassOptionsToPackage{svgnames,dvipsnames}{xcolor}
\PassOptionsToPackage{hyperfootnotes,verbose}{hyperref}
\def\CTANbaseurl{http://www.ctan.org/tex-archive/}
\def\CTANhref#1{\href{\CTANbaseurl help/Catalogue/entries/#1.html}{\nolinkurl{CTAN:help/Catalogue/entries/#1.html}}}
\let\loadclass \LoadClass
\def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}}
{\makeatletter{\endlinechar`\^^J\obeyspaces
 \gdef\ErrorUpdate#1=#2,{\@ifpackagelater{#1}{#2}{}{\let\CheckDate\errmessage\toks@\expandafter{\the\toks@
        \thisfile-documentation: updates required !
              package #1 must be later than #2
              to compile this documentation.}}}}%
 \gdef\CheckDate#1{{\let\CheckDate\relax\toks@{}\@for\x:=\thisfile=\thisdate,#1\do{\expandafter\ErrorUpdate\x,}\CheckDate\expandafter{\the\toks@}}}}
\AtBeginDocument{\CheckDate{interfaces=2011/02/12,tabu=2011/02/17}}
\documentclass[a4paper,oneside]{ltxdoc}
\AtBeginDocument{\DeleteShortVerb{\|}}
\usepackage[latin1]{inputenc}
\usepackage[american]{babel}
\usepackage[T1]{fontenc}
\usepackage{ltxnew,etoolbox,geometry,graphicx,xcolor,needspace,calc}       % general tools
\usepackage{lmodern,bbding,hologo,relsize,moresize,manfnt,pifont,upgreek}  % fonts
\usepackage[official]{eurosym}                                             % font
\usepackage{xspace,tocloft,titlesec,fancyhdr,lastpage,enumitem,marginnote} % paragraphs & pages management
\usepackage{holtxdoc,bookmark,hypbmsec}                                    % hyper-links
\usepackage{array,delarray,longtable,colortbl,multirow,makecell,booktabs}  % tabulars
\usepackage{tabu}[2011/02/17]\tracingtabu=2                                % tabulars
\usepackage{pifont,engrec,amsmath,wasysym}
\usepackage{embedfile,framed,atveryend,catchfile}
\usepackage[expansion=all,protrusion=all,shrink=30]{microtype}
\usepackage{interfaces}[2011/02/12]
\usetikz{basic,chains}
\RequirePackage{grffile,eso-pic}% to include the example
\csname endofdump\endcsname
\CodelineNumbered
\usepackage[greek]{enumitem-zref}
\usepackage{fancyvrb}\fvset{gobble=1,listparameters={\topsep=0pt}}
\lastlinefit999
\geometry{top=0pt,includeheadfoot,headheight=.6cm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=3cm,right=1.2cm}
\hypersetup{%
  pdftitle={The enumitem-zref package},
  pdfsubject={Extended references to items for enumitem package},
  pdfauthor={Florent CHERVET},
  colorlinks,linkcolor=reflink,
  pdfstartview={FitH},
  pdfkeywords={tex, e-tex, latex, package, enumitem, zref, enumerate, itemize, description, lists, pdftex},
  bookmarksopen=true,bookmarksopenlevel=3}
\embedfile{\thisfile.dtx}
\begin{document}
   \DocInput{\thisfile.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{1718}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs,\~,\@ifpackagelater,\z@,\@ne,\linebreak,\maxdimen,\newrobustcmd}
% \DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo,\tw@,\thr@@,\TMP@EnsureCode,\sloppy,\SetupKeyvalOptions,\sep,\scriptsize,\reset@font}
% \DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage}
% \DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage}
% \DoNotIndex{\filename,\fileversion,\filedate,\let}
% \DoNotIndex{\@listctr,\@nameuse,\csname,\else,\endcsname,\expandafter,\catcode,\@M,\@eha,\@firstofone,\@ifnextchar,\@nil,\@nnil,\@spaces,\@sptoken,\@undefined}
% \DoNotIndex{\gdef,\global,\if,\item,\newcommand,\nobibliography,\@unknownoptionerror,\bfseries,\psi,\ifnum,\ifcase,\unless,\unexpanded,\zen@AtEnd}
% \DoNotIndex{\par,\providecommand,\relax,\renewcommand,\renewenvironment}
% \DoNotIndex{\stepcounter,\usecounter,\nocite,\fi}
% \DoNotIndex{\@fileswfalse,\@gobble,\@ifstar,\@unexpandable@protect}
% \DoNotIndex{\AtBeginDocument,\AtEndDocument,\begingroup,\endgroup}
% \DoNotIndex{\frenchspacing,\MessageBreak,\newif,\PackageWarningNoLine}
% \DoNotIndex{\protect,\string,\xdef,\ifx,\texttt,\@biblabel,\bibitem}
% \DoNotIndex{\z@,\wd,\wheremsg,\vrule,\voidb@x,\verb,\bibitem}
% \DoNotIndex{\FrameCommand,\MakeFramed,\FrameRestore,\hskip,\hfil,\hfill,\hsize,\hspace,\hss,\hbox,\hb@xt@,\endMakeFramed,\escapechar}
% \DoNotIndex{\do,\date,\if@tempswa,\@tempdima,\@tempboxa,\@tempswatrue,\@tempswafalse,\ifdefined,\ifhmode,\ifmmode,\cr}
% \DoNotIndex{\box,\author,\advance,\multiply,\Command,\outer,\next,\leavevmode,\kern,\title,\toks@,\trcg@where,\tt}
% \DoNotIndex{\the,\width,\star,\space,\section,\subsection,\textasteriskcentered,\textwidth}
% \DoNotIndex{\",\:,\@empty,\@for,\@gtempa,\@latex@error,\@namedef,\@nameuse,\@tempa,\@testopt,\@width,\\,\m@ne,\makeatletter,\makeatother}
% \DoNotIndex{\maketitle,\parindent,\setbox,\x,\kernel@ifnextchar}
% \DoNotIndex{\KVS@CommaComma,\KVS@CommaSpace,\KVS@EqualsSpace,\KVS@Equals,\KVS@Global,\KVS@SpaceEquals,\KVS@SpaceComma,\KVS@Comma}
% \DoNotIndex{\DefineShortVerb,\DeleteShortVerb,\UndefineShortVerb,\MakeShortVerb,\endinput,\protected,\gappto,\g@addto@macro,\globcount}
% \makeatletter\DeleteShortVerb{\|}
% \newrobustcmd*\ClearPage{\@ifstar\clearpage{}}
% \newrobustcmd*\FC{{\color{copper}\usefont{T1}{fts}xn FC}}
% \providecommand\lsstyle{}^^A if no microtype
% \catcode`\§ \active   \def§{\@ifnextchar §{\par\nobreak\vskip-2\parskip\nobreak}{\par\nobreak\vskip-\parskip\nobreak}}
% \colorlet{pkgcolor}{teal} \protected\def\pkgcolor{\color{pkgcolor}}
% \newcommand\texorpdf[2]{\texorpdfstring{#1{#2}}{#2}}
% \def\thispackage{\@ifstar{\xpackage{\thisfile}\xspace}{\xpackage{{\pkgcolor\thisfile}}\xspace}}
% \def\ThisPackage{\Xpackage{\thisfile}\xspace}
% \def\Xpackage{\@dblarg\X@package}
% \def\X@package[#1]#2{\@testopt{\X@@package{#1}{#2}}{}}
% \def\X@@package#1#2[#3]{\xpackage{#2\footnote{\noindent\xpackage{#2}: \CTANhref{#1}#3}}\xspace}
% \def\Underbrace#1_#2{$\underbrace{\vtop to2ex{}\hbox{#1}}_{\footnotesize\hbox{#2}}$}
%
% \def\thisfootinfo{{\let\@thefnmark\@empty\let\@makefntext\@firstofone
% \footnotetext{\par\vskip-\baselineskip\smallskip\noindent
% This documentation is produced with the \textt{DocStrip} utility.\par
% \begin{tabu}{X[-3]X[-1]X}
% \smex To get the package,                   &run:          &\texttt{etex \thisfile.dtx}                  \\
% \smex To get the documentation              &run (thrice): &\textt{pdflatex \thisfile.dtx}               \\
% \leavevmode\hphantom\smex To get the index, &run:          &\texttt{makeindex -s gind.ist \thisfile.idx}
% \end{tabu}§
% The \xext{dtx} file is embedded into this pdf file thank to \xpackage{embedfile} by H. Oberdiek.}}}
%
% \parindent\z@\parskip.4\baselineskip\topsep\parskip\partopsep\z@\leftmargini=2cm\clubpenalty20000\widowpenalty\clubpenalty
% \def\smex{\leavevmode\hb@xt@2em{\hfil$\longrightarrow$\hfil}}
% \def\ttdefault{lmvtt}
% \newrobustcmd\verbfont{\usefont{T1}{\ttdefault}{\f@series}{n}}    \let\vb\verbfont
% \newrobustcmd\vbbf{\usefont{T1}{\ttdefault}bn}
% \renewrobustcmd\#[1]{{\usefont{T1}{pcr}{bx}{n}\char`\##1}}
% \newrobustcmd*\grabcs{\leavevmode\hbox\bgroup\bgroup\makeatletter\aftergroup\endgrabcs}
% \def\endgrabcs{\egroup\xspaceverb}
% \renewrobustcmd*\cs{\grabcs\cs@}
% \newrobustcmd*\cs@[2][]{\begingroup\escapechar\m@ne\def\x ##1{\endgroup\@maybehyperlink{##1}{\texttt{#1{\@backslashchar##1}}}}\expandafter\x\expandafter{\string#2}\egroup}
% \newcommand*\cs@pdf[1]{\@backslashchar\if\@backslashchar\string#1 \else\string#1\fi}
% \newrobustcmd*\csbf{\cs[\textbf]}
% \newrobustcmd*\csref[2][]{{\escapechar\m@ne\edef\my@tempa{\string#2}\edef\x ##1{\noexpand\hyperref{}{declcs}{\my@tempa}{\noexpand\cs[{##1}]{\my@tempa}}}\expandafter}\x{#1}}
% \newcommand\env{\texorpdfstring \env@ \env@pdf}
% \newcommand*\env@pdf[1]{#1}
% \newrobustcmd*\env@{\@ifstar {\env@starsw[environment]}{\env@starsw[]}}
% \def\env@starsw[#1]#2{\textt{#2}\ifblank{#1}{}{ #1}\Xspace}
% \newrobustcmd*\@maybehyperlink [2]{\ifcsname zen@declcs.\detokenize{#1}\endcsname \hyperref{}{declcs}{#1}{#2}\else #2\fi}
% \newrobustcmd\csred[1]{\textcolor{red}{\cs{#1}}}
% \newrobustcmd\CSbf[1]{\textbf{\CS{#1}}}
% \newrobustcmd\texttbf[1]{\textbf{\texttt{#1}}}
% \newrobustcmd\textitbf[1]{\textit{\textbf{#1}}}
% \renewrobustcmd*\bf{\bfseries}\newcommand\nnn{\normalfont\mdseries\upshape}\newcommand\nbf{\normalfont\bfseries\upshape}
% \newrobustcmd*\blue{\color{blue}}\newcommand*\red{\color{dr}}\newcommand*\green{\color{green}}\newcommand\rred{\color{red}}
% \newrobustcmd\rrbf{\color{red}\bfseries}
% \newrobustcmd*\pdf{\textsc{pdf}}
% \definecolor{copper}{rgb}{0.67,0.33,0.00}  \newcommand\copper{\color{copper}}
% \definecolor{daleif1}{rgb}{.647,.129,.149}
% \definecolor{dg}{rgb}{0.02,0.29,0.00}      \newcommand\dg{\color{dg}}
% \definecolor{db}{rgb}{0,0,0.502}           \newcommand\db{\color{db}}
% \definecolor{dr}{rgb}{0.75,0.00,0.00}      \let\dr\red
% \definecolor{lk}{rgb}{0.2,0.2,0.2}         \newrobustcmd\lk{\color{lk}}
% \newrobustcmd\bk{\color{black}}\newcommand\md{\mdseries}
% \newrobustcmd\ie{\emph{ie.}\,}
% \newrobustcmd\etc{{\bk\emph{etc.}}}
% \newrobustcmd\textt[2][]{\texorpdf\texttt{#1#2}}
% \newcommand\cellstrut{}\let\cellstrut\bottopstrut
% \def\M{\@ifstar{\M@i\@firstofone}{\M@i\meta}}
% \def\M@i#1{\@ifnextchar[\M@square
%   {\ifx (\@let@token^^A)
%          \expandafter\M@paren
%    \else\ifx |\@let@token
%           \expandafter\expandafter\expandafter\M@bar
%    \else  \expandafter\expandafter\expandafter\M@brace
%    \fi\fi#1}}
% \def\M@square #1[#2]{\M@Bracket[{#1{#2}}]}
% \def\M@paren  #1(#2){\M@Bracket({#1{#2}})}
% \def\M@bar    #1|#2|{\M@Bracket\textbar{#1{#2}}\textbar}
% \def\M@brace  #1#2{\M@Bracket\{{#1{#2}}\}}
% \def\M@Bracket#1#2#3{{\ttfamily#1#2#3}}
% \newrobustcmd*\thisyear{\begingroup
%    \def\thisyear##1/##2\@nil{\endgroup
%       \oldstylenums{\ifnum##1=2010\else 2010\,\textendash\,\fi ##1}^^A
%    }\expandafter\thisyear\thisdate\@nil
% }
% \newenvironment{movepage}[2][]{%
%    \advance\hsize by\dimexpr#2\relax
%    \hoffset\dimexpr\ifblank{#1}{-\dimexpr#2\relax}{\dimexpr#1\relax}\relax
%    \linewidth\hsize
%    \textwidth\hsize
% }{\clearpage}
% \DefineVerbatimEnvironment{VerbLines}{Verbatim}{frame=lines,framesep=6pt,fontfamily=\ttdefault,fontseries=m}
% \DefineVerbatimEnvironment{VerbLines*}{Verbatim}{frame=lines,framesep=6pt,fontfamily=\ttdefault,fontseries=m,commandchars=$()}
% \DefineVerbatimEnvironment{Verb*}{Verbatim}{fontfamily=\ttdefault,fontseries=m,commandchars=$()}
%
% \newrobustcmd*\csanchor[2][]{^^A
%   \immediate\write\@mainaux{\csgdef{zen@declcs.\string\detokenize{#2}}{}}^^A
%   \raisedhyperdef[14pt]{declcs}{#2}{\cs[{#1}]{#2}}^^A
% }
% \renewrobustcmd\declcs[2][]{^^A
%   \if@nobreak \par\nobreak
%   \else \par\addvspace\parskip
%         \Needspace{.08\textheight}\fi
%   \changefont{size+=2.5pt,spread=1,fam=\ttdefault}^^A
%   \def\*{\unskip\,\texttt{*}}\noindent
%   \hskip-\leftmargini
%   \begin{tabu}{|l|}\hline
%     \expandafter\SpecialUsageIndex\csname #2\endcsname
%     \csanchor[{#1}]{#2}}
% \renewcommand\enddeclcs{%
%     \crcr \hline \end{tabu}\nobreak
%     \par  \nobreak \noindent
%     \ignorespacesafterend
%  }
% \def\declmargin{\hspace*{\dimexpr-\leftmargini+\arrayrulewidth+\tabcolsep}}
% \pretocmd\textasteriskcentered{\usefont{OMS}{cmsy}mn}{}{}
% \let\plainllap\llap
% \newrobustcmd\macro@llap[1]{{\global\let\llap\plainllap
%  \setbox0=\hbox\bgroup \raisedhyperdef{macro}{\saved@macroname}{#1}\egroup
%  \ifdim\wd0>20mm
%     \hbox to\z@ \bgroup\hss \hbox to20mm{\unhcopy0\hss}\egroup
%     \edef\@tempa{\hskip\dimexpr\the\wd0-20mm}\global\everypar\expandafter{\the\expandafter\everypar
%                                                                            \@tempa \global\everypar{}}^^A
%  \else \llap{\unhbox0}\fi}}
%  \AtBeginEnvironment{macro}{\if@nobreak\else\Needspace{2\baselineskip}\fi
%     \MacrocodeTopsep\z@skip \MacroTopsep\z@skip \parsep\z@ \topsep\z@ \itemsep\z@ \partopsep\z@
%     \let\llap\macro@llap}
%  \AtEndEnvironment{macro}{\goodbreak\vskip.3\parskip}
%
% \newrobustcmd*\IMPLEMENTATION{%
%     ^^A\geometry{top=0pt,includeheadfoot,headheight=.6cm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=3.5cm,right=1.2cm}
%     \newgeometry{top=0pt,includeheadfoot,headheight=.6cm,headsep=.6cm,bottom=.6cm,footskip=.5cm,left=3.5cm,right=.5cm}
%     \pagesetup*{
%        right/offset-=.7cm,
%        head/left+=\ \ (i\,m\,p\,l\,e\,m\,e\,n\,t\,a\,t\,i\,o\,n),
%      }%
%     \bookmarksetup{openlevel=1}
%     \sectionformat\section{bookmark={color=black,bold*,bold=false}}
%     \section(Implementation)[\mdseries\scshape\pmb{Implementation}]{Implementation} \label{sec:implementation}
%     \addtocontents{toc}{\tocsetup{subsection/font+=\smaller,section/skip*=.5,subsection/skip-=1pt}}}
%
% \newcommand\tikzlabel[2][]{\tikz[{remember picture,#1}]\coordinate ({#2});\ignorespaces}
%
% \AddEnumerateCounter\engrec\@grec{\@grec{23}}
% \bottomtitles=.15\textheight
% \pagesetup[plain]{
%  norules, font=\scriptsize,
%  left/offset=2cm,
%  right/offset=.5cm,
%  foot/left/offset+=.5cm,
%  foot/right=\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}
%  }
% \pagesetup[corpus]{
%  pagestyle=plain,
%  head/font=\footnotesize\color{LightSteelBlue},
%  head/left=\moveleft1cm\vbox to\z@{\vss\setbox0=\null\ht0=\z@\wd0=\paperwidth\dp0=\headheight\rlap{\colorbox{GhostWhite}{\box0}}}\vskip-\headheight\thispackage,
%  head/right=\thisinfo,
%  foot/left/font+=\color[gray]{.35},
%  foot/left=\vbox to\baselineskip{\vss{{\rotatebox[origin=l]{90}{\thispackage\,[rev.\thisversion]\,\copyright\,\thisyear\,\lower.4ex\hbox{\pkgcolor\NibRight}\,\FC}}}},
%  foot/right=\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}
%  }
%  \pagesetup[firstpage]{
%  pagestyle=plain,norules,
%  foot/left=\vbox to\baselineskip{\vss{{\rotatebox[origin=l]{90}{\thispackage\,[rev.\thisversion]\,\copyright\,\thisyear\,\lower.4ex\hbox{\pkgcolor\NibRight}\,\FC\quad \xemail{florent.chervet at free.fr}}}}},
%  }
%  \sectionformat\section[hang]{
%  font=\LARGE\bfseries,
%  bookmark={color=MidnightBlue,bold},
%  bottom=\smallskipamount,
%  left=-1cm,
%  }
%  \sectionformat\subsection[hang]{
%  font=\Large\bfseries,
%  top=.5\smallskipamount,
%  bottom=.5\smallskipamount,
%  left=-1cm,
%  }
%  \sectionformat\subsubsection[hang]{
%  font=\large\bfseries,
%  top=.5\smallskipamount,
%  bottom=.5\smallskipamount,
%  left=-1cm,
%  bookmark={color=RoyalBlue},
%  }
%
% \newcommand\macrocodecolor{\color{macrocode}}\definecolor{macrocode}{rgb}{0.05,0.02,0.07}
% \newcommand\reflinkcolor{\color{reflink}}\colorlet{reflink}{MidnightBlue}
% \let\stf \textasteriskcentered
% \newrobustcmd*\stform{\@ifnextchar*{\@stform[]\textasteriskcentered\@gobble}\@stform}
% \newrobustcmd*\@stform[2][\string]{\texttbf{\rred#1#2}\Xspace}
% \newrobustcmd*\xspaceverb{\ifnum\catcode`\ =\active\else\expandafter\xspace\fi}
% \let\Xspace\xspaceverb
%
% \makeatother
%
% \title{\vspace*{-36pt}\bfseries\href{http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/enumitem-zref.html}{\HUGE\thispackage}\vspace*{6pt}}
% \date{}
% \author{\small\thisdate~--~\hyperref[v\thisversion]{version \thisversion}}
% \subtitle{\begin{tabu}{c}\LARGE \thisinfo\\[.3ex]\large The \cs\refitem command \\[.5ex] \small\FC\end{tabu}\vspace*{-24pt}}
% \maketitle
%
% \deffootnote{1em}{0pt}{\rlap{\thefootnotemark.}\kern1em}
% {\vspace*{-1.3cm}\let\quotation\relax\let\endquotation\relax
% \begin{abstract}\parskip\medskipamount\parindent0pt\lastlinefit0\leftskip.5cm\rightskip\leftskip
%
% \thispackage, as a companion package for \Xpackage{enumitem}, extends the references mechanism
% for lists of items and allows hyperlinks to any items in lists formatted by \xpackage{enumitem}.
% Hyper-references to lists seems not always necessary, but their importance rise much when a document
% contains lists that can stretch out on several pages.
%
% Primarily intented for \texttbf{enumerate} environments (\ie numbered lists),
% \thispackage* can also reference any item in \texttbf{description} or \texttbf{itemize}
% environments: restrictions can be set with the \hyperref[package options]{package options}.
%
% A \hyperref[sec:naturalrefscheme]{natural reference scheme} for referencing items anywhere in the
% document is provided with three modalities (the \hyperref[commarefscheme]{\emph{commaref}} scheme,
% the \hyperref[refitemscheme]{\emph{refitem}} scheme and the \hyperref[userscheme]{\emph{user}} scheme).
% The references can be typeset differently with the command
% \hyperref[refitem]{\cs{refitem}}, its options and eventually arbitrary text.
%
% Additionnally, \thispackage* allows to typeset greek-enumerated lists with the
% \refitem{package options{greek}}[\textt{greek}] or \refitem{package options{greekctr}}[\textt{greekctr}]
% package options, which use code from packages \Xpackage{alphalph} and \Xpackage{engrec} or \Xpackage{greekctr}.
%
% References to items in external documents compiled with \xpackage{enumitem-zref} is also possible
% with \hologo{pdfTeX}\footnote{This is not \xpackage{xr} but ``pure'' \pdf.}.
%
% \thispackage* requires and is based on the packages \xpackage{enumitem} by Javier Bezos
% and \Xpackage{zref} by Heiko Oberdiek.
% It works with an \eTeX{} distribution of \LaTeX.
%
% \end{abstract}}
%
%  \thisfootinfo
%
% \enlargethispage\baselineskip
% \tocsetup{
%  before=\colorlet{reflink}{black},
%  pagestyle=firstpage,
%  section/skip=4pt plus2pt minus2pt,
%  section/dotsep,section/leaders,
%  subsection/skip=0pt plus2pt minus2pt,
%  subsubsection/pagenumbers=off,
%  subsubsection/dotsep=,
%  subsubsection/font=\small,
%  title=Contents\quad{\pkgcolor\leaders\vrule height3.4pt depth-3pt\hfill\null}\kern0pt\vskip-6pt,
%  title/top=6pt plus2pt,
%  bookmark={text=Contents,bold},
%  columns=2,
%  multicols/beforeend=\aftergroup\tochrule,
%  }
%  \def\tochrule{\leavevmode{\pkgcolor\hrule}}
% \begingroup\let\footnoterule\relax
% \tableofcontents
% \clearpage \endgroup
%
% \pagestyle{corpus}
%
% {
% \sectionformat\section{font=\centering\lsstyle\bfseries\LARGE,label=}
% \value{secnumdepth}=0\relax
% \section(\cs{refitem} properties summary){Summary of the properties for \cs{refitem}}
% }
%
% \colorlet{reference}{DarkGreen}
% \colorlet{properties}{RoyalBlue}
%
% \subsection*{Terms definitions}
%
%
% \begin{itemize}[labelsep=2em,leftmargin=3cm]
% \item [\cs{label}\M*{user}]    This is a user \emph{label}.
% \item [{\cs{item}\M*[user]}]   This is a user \emph{item}.
% \item [\cs{item}]              This is an \emph{automatic} item.
% \end{itemize}
%
% \marginnote\dbend User items are labelized, hence expanded (with \cs\protect).
%
% The \cs\label command can be put inside the optional argument of \cs\item:\par
% \centerline{ \cs{item}\M*[ text \cs{label}\M*{label of the item}] }§
% or in the paragraph that follows.
%
% Package \xpackage{hyperref}'s \textt{[verbose]} option reports all inserted
% anchor names in the \xext{log} file.
%
% \subsection*{Syntax for \cs{refitem}}
%
% {\large
% \begin{tikzpicture}
%
% \node at (0,0) (refitem) [anchor=west] {\cs{refitem}}
%    node [anchor=west] at (refitem.east) (reference) {\M*{\textcolor{reference}{reference}}}
%    node [anchor=west] at (reference.east) (properties) {\M*[\textcolor{properties}{properties to display}]};
%
% \node at (0,-4) [anchor=west] (refdesc) {reference with either:}
%    node [anchor=west] at (refdesc.east) {%
%                               \begin{tabu}spread0pt \{{X[-1r]X[-1]}.
%                               The \hyperref[refitemscheme]{\emph{refitem}} scheme: &\textt{listname\M*{label}\M*{label}\M*{label}...} \\
%                               The \hyperref[commarefscheme]{\emph{commaref}} scheme:& \textt{listname,index,index,index,...} \\
%                               The \hyperref[userscheme]{\emph{user}} scheme: &\textt{reference} to a \cs{label} command
%                               \end{tabu}};
% \draw [->,color=reference] (refdesc.north) -- (reference.south);
%
% \node at (7,-2) [anchor=west] (propdesc) {
%           \begin{tabu}spread0pt {X[-1]} Optional text containing properties\\
%                               Default is \M*[\textcolor{properties}{\cs{ref}} ]\end{tabu}};
%
% \draw [->,color=properties] (propdesc.north) -- (properties);
%
% \end{tikzpicture}}
%
%
% The order in which the properties are given is related to the depth of the list:§§
% \begin{tikzpicture}[start chain, node distance=.5cm and 1.5cm]
% \node [on chain] at (0,0) {\textbf[}
%        node [on chain,color=properties] (grandparents) {\cs{ref}}
%                       node [on chain,color=properties] (parents) {\cs{ref}}
%                                         node [on chain,color=properties] (item) {\cs{ref}} node [on chain] {\textbf]};
% \node at ($(item.south)+(0,-1.5)$) (itemref) {\begin{tabu}{c} refers to\\ the item\\ \refitem{tikzex,1,2}\end{tabu}};
% \draw [->] (itemref.north) -- (item.south);
%
% \node at ($(parents.south)+(0,-1.5)$) (parentsref) {\begin{tabu}{c} refers to\\ the parent\\ \refitem{tikzex,1}\end{tabu}};
% \draw [->] (parentsref.north) -- (parents.south);
%
% \node at ($(grandparents.south)+(0,-1.5)$) (grandparentsref) {\begin{tabu}{c} refers to the\\ second ancestor\\ \itshape Here an\\\itshape empty string\end{tabu}};
% \draw [->] (grandparentsref.north) -- (grandparents.south);
%
% \filldraw [MistyRose] (12,-1.3) rectangle (15,-1.8);
%
% \node (list) [on chain,yshift=-1cm,xshift=-1cm] {\begin{tabu}to6cm{X}
%        \begin{enumerate}[label=\arabic*.,name=tikzex]
%        \item One
%           \begin{enumerate}[label=\roman*)]
%           \item sub item
%           \item sub item
%           \end{enumerate}
%        \item Two
%        \end{enumerate}   \end{tabu}};
%
% \end{tikzpicture}
%
% \smallskip
%
% \newtabulinestyle{dotted=on 1pt off2pt}
% \def\dash{\hbox{$\scriptscriptstyle\mkern2mu\cdotp\mkern2mu$}}
%
% \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{^^A
%     \tikz[remember picture,overlay]\draw [<->] (common properties start) -- (common properties end)
%                                     node [midway,above,rotate=90] {\scriptsize\lsstyle\begin{tabu}{X[-1,c]} most common\\ properties\end{tabu}};}}
%
% {\def\arraystretch{1}\def\margintext#1{\noalign{\vtop to0pt{\marginnote{\ttfamily\small #1}[-2.5ex]\vss}}}
% \begin{tabu}{>{\leavevmode\color{properties}}X[2.3]X[8]>{\bfseries\sffamily}X[-2c]} \hline \tabucline-
% \rowfont[c]{\color{black}\bfseries}
% Property          &Description                                                                                     &Examples                          \\ \tabucline[\dash]-
% \tikzlabel[yshift=1ex,xshift=-.3cm]{common properties start}
% \cs{label}        &The item label: automatic or user defined by \cs{item}\M*[...]                                  &II)\,  \textmd{or}\,  \textbullet \\
% \cs{label\stform*}&For automatic labels in \textt{enumerate} lists: the label without any text around (useful to ``concatenate'' labels).
%                    Otherwise, the same as \cs{label}.                                                              &II\, \textmd{or}\, \textbullet    \\
% \cs{ref}          &If the \textt{ref} key of \xpackage{enumitem} has been set, the ``evaluation'' of the \textt{ref} key.
%                   Otherwise, the same as \cs{label}                                                                &II)\, \textmd{or}\, \textbullet                                                                             \\
% \tikzlabel[xshift=-.3cm]{common properties end}
% \cs{ref\stform*}  &The same as \cs{label\stform*}                                                                  &II\, \textmd{or}\, \textbullet    \\ \tabucline[\dash]-
% \cs{listname}     &The name given to the list with the key \textt{name}. \\
% \cs{depth}        &The list depth. \\
% \cs{index}        &The index of the item in the list. Every item is counted.\\
% \cs{listctr}      &The value of \cs{@listctr} for the item -- only inside \textt{enumerate} lists.
%                    May be different from \cs{index} if the list contains user \emph{items}. \\
% \cs{type}         &The type of the list: either \textt{enumerate} or \textt{itemize} or \textt{description}. \\
% \cs{currentlabel} &\LaTeX's \cs{@currentlabel} \\
% \cs{anchor} &The name of the anchor set for the item. \\ \margintext{\textsuperscript{hyperref}}
% \cs{currentlabelname}&\xpackage{hyperref}'s (or \xpackage{nameref}'s) \cs{@currentlabelname} \\ \margintext{\textsuperscript{hyperref}}
% \textt{\string\refitem}   &The list of references with the \hyperref[refitemscheme]{\emph{refitem}} scheme for the item. & \mdseries\csref{zeninfo} \\
% \cs{commaref}     &The list of references with the \hyperref[commarefscheme]{\emph{commaref}} scheme for the item. & \mdseries\csref{zeninfo} \\
% \cs{default}      &The same as \cs{ref} & \\ \tabucline-
% \end{tabu}}
%
%
% \clearpage
%
% \section{Forewords}
%
% \subsection{Numbered lists, not numbered lists and \texorpdf\xpackage{hyperref}}
% \label{sec:numberedlists}
%
% \LaTeX{} defines two ``classes'' of lists of items:
% \begin{itemize}[leftmargin=1cm]
% \item \texttbf{enumerate} lists which are \textit{numbered} (\ie a counter gives an index to each item in the list),
% \item \texttbf{description} and \texttbf{itemize} lists which are \textit{not numbered} (no counter, thus no index).
%\end{itemize}
%
% When \xpackage{hyperref} is used in \textit{numbered lists}, each \cs{item} gives \xpackage{hyperref}
% the opportunity to define an anchor, whose name is chosen considering the current value of the \emph{index}.
%
%
% Different cases have to be considered:
% \begin{enumerate}[label=\arabic*),name=numberedlists,leftmargin=1cm]
% \item We are in a \emph{numbered} list (\ie \textt{enumerate}):
%     \begin{enumerate}[label=\roman*),leftmargin=*]
%     \item if the item is automatic (\cs{item} without option), \xpackage{hyperref} puts an anchor named \texttt{Item.IDX}.
%     \item if the item is user defined (\cs{item}\M*[user item]), \xpackage{hyperref} does not put an anchor.
%     \end{enumerate}
% \item We are not in a \emph{numbered} list (\ie \texttt{description} or \texttt{itemize}):
%     \begin{enumerate}[label=\roman*),leftmargin=*]
%     \item[] \xpackage{hyperref} does not put an anchor.
%     \end{enumerate}
% \end{enumerate}
%
% Moreover, when \xpackage{hyperref} is loaded, the expansion of the \cs{label} command leads to the expansion of the item label
% (with \cs{protect}) for it is written to the \xext{aux} file:
% \begin{itemize}
% \item in the case \refitem{numberedlists{1}{i}}[\ref*\,\ref]
% \item and also in the case \refitem{numberedlists{1}{ii}}[\ref*\,\ref] if:
%     \begin{itemize}[label=-]
%     \item the list is a \textt{description} list, and
%     \item package \xpackage{nameref} is loaded, and
%     \item the \cs{label} command appears inside the \textt{user item} text.
%     \end{itemize}
% \end{itemize}
%
%
% {\flushright\smaller\lk I was guardedly affraid about those rules when I understood them, as you may be...\par}
%
% \thispackage adds an anchor in the cases \refitem{numberedlists,1,2}[\ref*\,\ref] and \refitem{numberedlists,2}.
% The item label text is always expanded (with \cs{protect} and \xpackage{babel} protection).
%
%
% \subsection(A "natural" reference scheme for lists){A ``natural'' reference scheme for lists}
% \label{sec:naturalrefscheme}
%
% \thispackage provides \textbf{3 ways} to reference a specific item in a list. The first 2 can be used to reference
% items in lists of external documents as well.
%
% References are made with the command: \csref{refitem}, but \cs{hyperref} can be used as well.
%
% \makeatletter
% \newrobustcmd*\presitem{\@ifstar\presitem@star\presitem@nost}
% \newrobustcmd*\presitem@nost[1]{this is the item \presitem@star{#1}}
% \newrobustcmd*\presitem@star[1]{\ifdim\lastskip<.4em\unskip\hskip.4em\fi\textcolor{reference}{\textt{#1}}}
% \newrobustcmd*\namelist[1]{\texttt{`#1'}}
% \makeatother
%
% \cs{subitem} and \cs{subsubitem} provided in some classes cannot be referenced with \thispackage*.
%
% \subsubsection(The commaref scheme){The \textit{\db commaref} scheme}
% \label{commarefscheme}
%
% Assuming you gave a name to your \textt{enumerate}, \textt{description} or \textt{itemize} list,
% and let's say this name is \namelist{myList}, each item is given an index.
% Any item is indexed, whether it's printed by the mean of a user item or an an automatic item.
% Then:
% \begin{itemize}[name=commaref-myList]
%  \item \presitem{myList,1}
%  \item \presitem{myList,2}
% \begin{itemize}[itemindent=2cm,font=\bfseries]
%  \item \presitem{myList,2,1}
%  \item \presitem{myList,2,2}
%  \item [user-defined] \presitem{myList,2,3}
% \end{itemize}
%\end{itemize}
%
% Reference to the third item can be made with:
%
% \begin{tabu}{lX}
% \cs[\red]{refitem}\M*{myList,2,1}                                &this prints: \refitem{commaref-myList,2,1} for it is the first item in the inner list. \\
% \cs[\red]{refitem}\M*{myList,2,1}\M*[\cs{ref}.\cs{ref}]          &prints: \refitem{commaref-myList,2,1}[\ref.\ref].                                      \\
% \cs[\red]{refitem}\M*{myList,2,1}\M*[\cs{label}\cs{ }\cs{label}] &prints: \refitem{commaref-myList,2,1}[\label\ \label].
% \end{tabu}
%
%
% Nothing simplest, no more comment...
%
% \subsubsection(The refitem scheme){The \textit{\db refitem} scheme}
% \label{refitemscheme}
%
% \begin{enumerate}[label=\Alph*),name=refitem-myList]
% \item \presitem{myList\M*{A}}.
% \item \presitem{myList\M*{B}} (as you'd have expected...)
%     \begin{enumerate}[label=\roman*)]
%     \item \presitem{myList\M*{B}\M*{i}}. \\
%            and is \emph{also} \presitem*{innerlist\{i\}} if this nested list has been named \namelist{innerlist}.
%     \item \presitem{myList\{B\}\{ii\}} \quad (or \presitem*{innerlist\{ii\}}).
%        \begin{enumerate}[label=\engrec*)\ ,ref=\engrec*]
%        \item \presitem{myList\{B\}\{ii\}\{\string\alpha\}} (with the package option \texttt{[greek]}).
%        \item \presitem{myList\{B\}\{ii\}\{\string\beta\}} \quad (or \presitem*{innerlist\{ii\}\{\string\beta\}}).
%        \end{enumerate}
%     \end{enumerate}
% \item \presitem{myList\{C\}} (as you'd have expected...)
% \item[\textbf{perso}] \presitem{myList\{perso\}}.
% \item \presitem{myList\{D\}} and is also \presitem*{myList,5} in the \textit{commaref} scheme.
%     \begin{itemize}
%     \item \presitem{myList\{D\}\{1\}}
%     \item \presitem{myList\{D\}\{2\}} \\
%           inside \textt{itemize} lists, labels are replaced by their arabic index in the \textit{refitem} scheme.
%     \end{itemize}
% \end{enumerate}
%
% And here is a reference to:
%
% \begin{tabu}{lX}
% \cs[\red]{refitem}\M*{myList\M*{B}\M*{ii}\M*{\cs{alpha}}} & \refitem{refitem-myList{B}{ii}{\alpha}} \\
% \cs[\red]{refitem}\M*{myList\M*{B}\M*{ii}\M*{\cs{alpha}}}\M*[\cs{label}\cs{ }\cs{label}\cs{ }\cs{label}] & \refitem{refitem-myList{B}{ii}{\alpha}}[\label\ \label\ \label] \\
% \cs[\red]{refitem}\M*{myList\M*{B}\M*{ii}\M*{\cs{alpha}}}\M*[\cs{label\stf}-{}-\cs{label\stf}-{}-\cs{label}] & \refitem{refitem-myList{B}{ii}{\alpha}}[\label*--\label*--\label] \\
% \end{tabu}
%
% Now what happens with a description list:
%
% \begin{enumerate}[label=\arabic*\textdegree),name=refitem-myList2]
% \item \presitem{myList\M*{1}}
% \item \presitem{myList\M*{2}}
%        \begin{description}
%        \item [First description label]  \presitem{myList\M*{2}\M*{first description label}}
%        \item [And a second one]         \presitem{myList\M*{2}\M*{and a second one}}
%        \end{description}
% \item \presitem{myList\M*{3}}
% \end{enumerate}
%
% \begin{tabu}{lX}
% \cs[\red]{refitem}\M*{myList\M*{2}\M*{first description label}} & \refitem{refitem-myList2{2}{first description label }} \\
% \cs[\red]{refitem}\M*{myList2\M*{2}\M*{first description label}}\M*[\cs{ref\stf}, \cs{label}] & \refitem{refitem-myList2{2}{first description label }}[\ref*, \label] \\
% \cs[\red]{refitem}\M*{myList2\M*{2}\M*{first description label}}\M*[\cs{ref}\cs{ }\cs{ref}] & \refitem{refitem-myList2{2}{first description label }}[\ref\ \ref] \\
% \end{tabu}
%
% The correspondance between the reference name and the reference that is finally printed is immediate:
% the \emph{refitem} scheme is almost useful when used with \xpackage{hyperref}.
%
% The list name \textt{myList} is case sensitive, but the item number \M*{B} or \M*{first description label} is not.
% This can be changed with the \refitem{package options{CaSeS}} package option. Trailing spaces in the item label
% are always removed from the reference name in the \hyperref[refitemscheme]{\emph{refitem}} scheme.
%
%
% \subsubsection({The user scheme (\cs{label})}){The \textit{\db user} scheme: with the \cs{label} command}
% \label{userscheme}
%
% \begin{enumerate}[label=\arabic*\,\textendash,name=user-myList,ref=\arabic*]
% \item \presitem{myList,1} and \presitem*{myList\{1\}} and as long as I type \cs{label}\M*{Important Item} it is also named \presitem*{Important Item}.
% \item \presitem{myList,2} and \presitem*{myList\{2\}}.
%     \begin{enumerate}[label=\alph*)\ ]
%     \item \presitem{myList,2,1} and \presitem*{myList\{2\}\{a\}}.
%     \item \presitem{myList,2,2} and \presitem*{myList\{2\}\{b\}} and as long as I type:\\
%           \cs{label}\M*{Important subitem} it is also named  \presitem*{Important subitem}. \label{Important subitem}
%     \end{enumerate}
% \end{enumerate}
%
% Then you get:
%
% \begin{tabu}{X[-5]X}
% \cs[\red]{refitem}\M*{Important subitem}                                      &\refitem{Important subitem}                       \\
% \cs[\red]{refitem}\M*{Important subitem}\M*[\cs{label}\cs{ }\cs{label}]       &\refitem{Important subitem}[\label\ \label]       \\
% \cs[\red]{refitem}\M*{Important subitem}\M*[\cs{ref\stf} sub point \cs{ref}] &\refitem{Important subitem}[\ref* sub point \ref]
% \end{tabu}
%
% The reference is case sentitive.
%
% \section{User Interface}
% \label{sec:userinterface}
%
% \subsection{Naming lists}
%
% To use the reference schemes defined by \thispackage, it is necessary to give lists a name. For that purpose,
% two new keys: \textt{name}\, and\, \textt{name\stform*} have been added to the keys provided by \xpackage{enumitem}.
%
% The key \textt{`name'} gives a name to the list, while \textt{name\stform*} is a bit more clever
% and should be used in every circonstances when lists are nested, almost when lists are automatically
% named by the mean of the paragraph they belong to. Example:
%
% \begin{Verb*}
%  \newlist{myList}{enumerate}{3}
%  \setlist[myList]{ label* = \arabic*.,  name* = \arabic{section}.\arabic{subsection}}
% \end{Verb*}
%
% In case of nested lists,\, \texttt{name\stform*}\, will compare the name you gave to the list with the name
% of its parent list, and ignore the key in case of equality.
%
% This gives:
%
% \newlist{naming-myList}{enumerate}{3}
% \setlist[naming-myList]{ label*=\arabic*., name* = \arabic{section}.\arabic{subsection}}
%
% \begin{naming-myList}[itemsep=0pt]
% \item First item
% \item Second item
%     \begin{naming-myList}[itemsep=0pt]
%     \item sub item
%     \item another sub item
%     \item a last sub item \cs{label}\M*{for further reference} \label{for further reference}
%     \end{naming-myList}
% \end{naming-myList}
%
% And then:
%
% \begin{tabu}{lX[c]X}
% \cs[\red]{refitem}\M*{2.1,2,3}               &\refitem{2.1,2,3}               &in the \hyperref[commarefscheme]{\emph{commaref}} scheme \\
% \cs[\red]{refitem}\M*{2.1\M*{2}\M*{3}}       &\refitem{2.1{2}{3}}             &in the \hyperref[refitemscheme]{\emph{refitem}} scheme   \\
% \cs[\red]{refitem}\M*{for further reference} &\refitem{for further reference} &in the \hyperref[userscheme]{\emph{user}} scheme   \\
% \end{tabu}
%
% \medbreak
%
% To name your lists automatically it is also possible to use (these are examples):
%
% \begin{itemize}[itemsep=0pt,topsep=0pt]
% \item \xpackage{interfaces-hypbmsec} with package \xpackage{hypbmsec}:\\
%         \textt{name\stform* = \cs{csname} the\cs{lastsectionname}\cs{endcsname}}
% \item package \xpackage{refcount}: \textt{name\stform* = \cs{getrefbykeydefault}\M*{reference}\M*{anchor}\M*{default}}.
% \end{itemize}
%
%
% \subsection(Making references: \cs{refitem}){Referencing the items : \csbf{refitem}}
% \label{refitem}
%
% \begin{declcs}{refitem}\M{reference}\M*[text with properties \cs{ref}, \cs{label} \etc.]\textsuperscript{babel}\\
%              \cs{refitem}\stform* \\
% \end{declcs}
%
% \thispackage provides \cs{refitem} to reference the items of lists with the following possible syntaxes:
%
% {\tabcolsep=4pt
% \begin{tabu}{X[-1]<{\cellstrut}X} \toprule      \savetabu{refitem}
% \cs{refitem}\M*{\textcolor{reference}{refname}}\M*[\textcolor{properties}{properties}]
%                 & displays a reference to \textt{\dg refname}                    \par
%                    the text displayed depends on the optional \textcolor{properties}{\textt{properties}} \par
%                    whose default value is \cs{ref}. \\ \tabucline[\dash]-
% \cs{refitem}\stform*\M*{\textcolor{reference}{refname}}\M*[\textcolor{properties}{properties}]
%                 & can be used when you want a reference but no hyperlink. \\ \bottomrule
% \end{tabu}}
%
% If the reference \textcolor{reference}{\textt{rename}} does not point to an item, \cs{refitem}
% behaves like \cs{ref} (or \cs{ref\stf}) and the \M*[properties] are ignored.
% A warning is displayed in the \xext{log} file.
%
% The properties available with \cs{refitem} are:
%
% \begin{enumerate}[labelwidth=2.4cm,leftmargin=2.6cm,align=left]
% \item [\csbf{ref}] This is the default property: the same as \LaTeX's \cs{ref} command: it expands
%       to the text corresponding to the \textt{ref} key of the \xpackage{enumitem} list environment,
%       which by default is:
%       \begin{itemize}[leftmargin=1cm]
%       \item in \textt{enumerate} lists: the same as the \textt{label}.
%       \item in \textt{itemize} lists: the index of the item.
%       \item in \textt{description} lists: the user defined label, or if no label has been given to
%             the \cs{item} command, the index of the item.
%       \end{itemize}
% \item [\csbf{label}] The label is printed, whatever value the \textt{ref\ key} has been given. For \textt{description},
%      the label may be empty.
% \item [\csbf{label\stf} \csbf{ref\stf}] This is a variant of \cs{label}: automatic labels in \textt{enumerate} lists are related
%       to a counter. \cs{ref\stf} or \cs{label\stf} prints the formatted value of the counter, without any text around.
%       For \textt{itemize}, \textt{description} or user items inside \textt{enumerate} lists, this is the same as \cs{label}.
% \item [\cs{page}] The same as \cs{pageref}.
% \item [\cs{name}] The name that has been given to the list.
% \item [\cs{depth}] The depth of the list (equal to\, \textt 1\, if the list is not nested).
% \item [\cs{index}] The index of the item; user defined items are counted.
% \item [\cs{listctr}] The item number inside numbered lists (\ie \textt{enumerate}); user defined items are not counted:
%        this is the value of the counter \cs{@listctr}.
% \item [\cs{type}] The type of the list (\ie \textt{enumerate}, \textt{itemize} or \textt{description})
% \item [\cs{refitem}] The list of references names that can be invoked with \cs{refitem} for this specific item
%       in the \hyperref[refitemscheme]{\emph{refitem}} scheme (see also \csref{zeninfo}).
% \item [\cs{commaref}] The list of references names that can be invoked with \cs{refitem} for this specific item
%       in the \hyperref[commarefscheme]{\emph{commaref}} scheme (see also \csref{zeninfo}).
% \end{enumerate}
%
% \begin{declcs}{refitem}\M*[file:\textellipsis]\M{reference}\M{text}\textsuperscript{babel}
% \end{declcs}
%
% For reference to external files (to make hyperlinks), \cs{refitem} can be invoked with the following syntax:
%
% \begin{tabu}{X[-1]<{\cellstrut}X}\toprule
% \cs{refitem}\M*[file:\textellipsis]\M*{{\dg refname}}\M*{{\bf text}}
%                 &Can be used for references to an external \xext{pdf} file. \\ \tabucline[dotted]-
% \cs{refitem}\M*[]\M*{{\dg refname}}\M*{{\bf text}}
%                 & The current file is used by default...
% \\ \bottomrule
% \end{tabu}
%
% Only the \hyperref[refitemscheme]{\emph{refitem}} and the \hyperref[commarefscheme]{\emph{commaref}} schemes can be used.
% The \hyperref[userscheme]{user} scheme cannot be used presently for external files. An implementation ``à la \xpackage{xr}''
% might be provided in a further release.
%
%
% \iffalse
% \begin{tabu}{|>{\ttfamily}l<{\cellstrut}X[m]|}
% \multicolumn{2}{c}{\makecell[c]{\cellstrut\Large\bfseries Available properties \\
%                 \bfseries\large\cellstrut   For the usage of those properties, please refer to the \hyperref[sec:completeexample]{complete example}.%
%                                 }} \\ \hline
% \csbf[\db]{ref}  &
%     This is the default property.
%     The same as \LaTeX's\, \cs{ref}: the text corresponding to the \texttt{ref} key of the
%     \xpackage{enumitem} list environment is printed, which by default is the same as the
%     \textt{label} key in \textt{enumerate} lists. For \textt{itemize} lists, \cs{ref}
%     is the index of the item. \par
%     See \Xpackage{enumitem} package documentation for explanation of the \textt{ref\ key}. \\\hline
% \csbf[\db]{label} &
%     The label will be printed, whatever value the \textt{ref\ key} has been given. \\\hline
% \csbf[\db]{page} & The page will be printed, like ``standard'' \LaTeX-\cs{pageref} \\\hline\hline
% \cs{name} & the list name it is has one (otherwise an empty string)\\ \tabucline[on1pt off 2pt]-
% \cs{depth} &  the list depth \\ \tabucline[on1pt off 2pt]-
% \cs{index} &  the \textbf{index} of the item: user defined items \textbf{are counted}\\ \tabucline[on1pt off 2pt]-
% \cs{listctr} & the \textbf{item number}: user defined items are \textbf{not counted}\\ \tabucline[on1pt off 2pt]-
% \cs{type} & the type of the list (\ie \texttt{enumerate} or \texttt{itemize} or \texttt{description}) \\   \tabucline[on1pt off 2pt]-
% \cs{refitem} & the list of references names that can be invoked with \cs{refitem} for this specific item
%           using the \textit{refitem} scheme (see \hyperref[subsec:zeninfo]{\cs{zeninfo}}) \\ \tabucline[on1pt off 2pt]-
% \cs{commaref} &
%        the list of references names usable with \cs{refitem} for this specific item using the \textit{commaref}
%        scheme (see \hyperref[subsec:zeninfo]{\cs{zeninfo}})\\   \hline\hline
% \end{tabu}
% \fi
%
%
% \subsection[The package options]{\thispackage* package options}
% \label{subsec:packageoptions}\label{package options}
%
% \thispackage can be loaded with the following options:
% \newcommand\CheckOK{{\scriptsize\textcolor{ForestGreen}\CheckmarkBold}}
% \newcommand\CheckFAIL{{\scriptsize\textcolor{Crimson}\XSolidBrush}}
%
% \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{\tikz[remember picture,overlay]
%        \draw [<->] (package options start) -- (package options end)
%                    node [midway,above,rotate=90] {\lsstyle\scriptsize\ttfamily defaults};}}
% \enlargethispage{1.5\baselineskip}
% \begin{itemize}[font=\ttfamily,labelwidth=2cm,leftmargin=\widthof{description\hbox to1em{}},labelsep=6pt,align=left,name=package options]
% \item[enumerate] disables the references for \textt{itemize} and \textt{description} lists:            \marginnote{\tikzlabel[xshift=-.2cm,yshift=.2cm]{package options start}\scriptsize\textt{true}}
%                 only enumerated lists can be referenced.
% \item [itemize] enables/disables the references for \textt{itemize} lists.                                      \marginnote{\scriptsize\textt{true}}
% \item [description] enables/disables the references for \textt{description} lists.                              \marginnote{\scriptsize\textt{true}}
% \item [greek]  Defines \cs{engrec} (lowercase) and \cs{EnGrec} (uppercase) to make enumerate           \marginnote{\scriptsize\textt{false}}
%              lists of items with the greek alphabet as the label (package \xpackage{engrec}).\\
%        \cs{engrec} and \cs{EnGrec} can be used in place of \cs{arabic} (f.ex. \textt{label=\cs{engrec}*}).
% \item [greekctr] Defines \cs{greek} and \cs{Greek} (like \textt{greek} option but with package \Xpackage{greekctr}).  \marginnote{\scriptsize\textt{false}}
% \item [CaSeS] Activate this option to get CaSeS sEnSiTiV references in the \marginnote{\tikzlabel[xshift=-.2cm,yshift=-.5cm]{package options end}\scriptsize\textt{false}}
%       \hyperref[refitemscheme]{\emph{refitem}} scheme. This option applies only
%        to the \hyperref[refitemscheme]{refitem} scheme.
%       List names are always case sensitive.\\
%       If this option is enabled with \xpackage{hyperref}, anchors corresponding to the
%       \hyperref[refitemscheme]{\emph{refitem}} scheme will be case sensitiv as well. \\
%       Package \xpackage{hyperref}'s \textt{[verbose]} option allows to see anchor names in the \xext{log} file. \par
%       \centering
%       \begin{tabu}to .8\linewidth{X[2r]@{\hskip1cm}XX} \tabucline-
%       \rowfont[c]{\bfseries\ttfamily} & CaSeS = true & CaSeS = false \\ \tabucline[\dash]-
%       &
%       \begin{enumerate}[label=\Roman*),before=\vspace*{-\baselineskip}]
%       \item First
%       \item Second
%       \end{enumerate}
%        &
%       \begin{enumerate}[label=\Roman*),before=\vspace*{-\baselineskip}]
%       \item First
%       \item Second
%       \end{enumerate}  \\ \tabucline[\dash]-
%
%       \cs{refitem}\M*{myList\M*{I}} &\CheckOK   works        &   \CheckOK   works        \\
%       \cs{refitem}\M*{myList\M*{i}} &\CheckFAIL doesn't work &   \CheckOK   works \\
%       \cs{refitem}\M*{mylist\M*{I}} &\CheckFAIL doesn't work &   \CheckFAIL doesn't work \\
%
%       \multicolumn3c{List names are always case sensitive.} \\ \tabucline-
%       \end{tabu}
% \end{itemize}
%
% {\small
% \begin{tabu}{>{\ttfamily}X[-4r]*3{X[c]}} \tabucline-
%  \multicolumn4c{\textbf{Types of lists that can be referenced}} \\
%  \rowfont{\normalfont\itshape}
%  \hfill\textup{Package option}\hfill\null         &enumerate                                                      &itemize      &description \\\tabucline-
%  [enumerate]                     &\textbullet                                                    &             &            \\\tabucline[\dash]-
%  [itemize]                       &\textbullet                                                    &\textbullet  &            \\\tabucline[\dash]-
%  [description]                   &\textbullet                                                    &             &\textbullet \\\tabucline[\dash]-
%  [enumerate,itemize]             &\textbullet                                                    &\textbullet  &            \\\tabucline[\dash]-
%  [enumerate,description]         &\textbullet                                                    &             &\textbullet \\\tabucline[\dash]-
%  [itemize,description]           &\textbullet                                                    &\textbullet  &\textbullet \\\tabucline[\dash]-
%  [enumerate,itemize,description] &\textbullet                                                    &\textbullet  &\textbullet \\\tabucline[\dash]-
%  {\normalfont none of the above} &\textbullet                                                    &\textbullet  &\textbullet \\\tabucline-
% \end{tabu}}
%
% \footnotetext{\parbox[t]{\linewidth}{For the French language with \xpackage{babel} \textt{frenchb}-setup,
% \textt{itemize} lists can be processed by \thispackage* only if the option:
%
% \centerline{\cs{frenchbsetup}\M*{CompactItemize=false}}
%
% has been set. This option is automatically set by \xpackage{enumitem-zref} when option \textt{[itemize]}
% is passed.}}
%
%
% \subsection[{If your are lost \cs{zeninfo} is your friend}]{If your are lost \csbf{zeninfo} is your friend}
% \label{subsec:ifyouarelost} \label{subsec:zeninfo}
%
% \begin{declcs}{zeninfo}\M[info-key]
% \end{declcs}
%
% In the paragraph following an item, \cs{zeninfo} reports some informations about the references to the current item:
%
% \begin{tabu}{@{}>{\ttfamily\bfseries}X[-1]X}
% depth      &The depth of the list. \\
% index      &The index of the item. \\
% commaref   &The references that can be used to reference the item in the \hyperref[commarefscheme]{\emph{commaref}} scheme. \\
% refitem    &The reference that can be used to reference the item in the \hyperref[refitemscheme]{\emph{refitem}} scheme. \\
% anchor     &The anchor set for the item (if \xpackage{hyperref}).
% \end{tabu}
%
% With no argument, \cs{zeninfo} prints all these informations.
% \bigskip
%
% Example with the \xpackage{pifont} package:
%
% \begin{Verb*}
% \newcommand\@Ding[1]{\ding{\number\numexpr#1 + 171}}
% \newcommand\Ding[1]{\@Ding{\value{#1}}}
% \AddEnumerateCounter \Ding \@Ding {}
%
% \begin{enumerate}[label=\Ding*,name=dingList]
% \item One
% \item Two
% \item Three              ($rred(\zeninfo))
% \end{enumerate}
% \end{Verb*}
%
% {\makeatletter
% \newcommand\@Ding[1]{\ding{\number\numexpr#1+171}}
% \newcommand\Ding[1]{\@Ding{\value{#1}}}
% \AddEnumerateCounter\Ding\@Ding{}
%
% \begin{enumerate}[label=\Ding*,name=dingList]
% \item One
% \item Two
% \item Three     \textcolor{ForestGreen}\zeninfo
% \end{enumerate}
%
% Now:
%
% {\centering
% \begin{tabu}{X[-1r]X[-1c]X[-1]}
% \cs[\rred]{refitem}\M*{dingList\M*{\cs{@Ding}\M*{3}}} & produces & \refitem{dingList{\@Ding{3}}}
% \end{tabu}\par}
%
% Note that for this purpose:
% \begin{itemize}
% \item \cs{@Ding} could be named differently (without \textt @).
% \item the \hyperref[commarefscheme]{\emph{commaref}} scheme is easier: \cs{refitem}\M*{dingList,3} gives \refitem{dingList,3}.
% \end{itemize}
%
% This example shows the output of \textcolor{ForestGreen}{\cs{zeninfo}}.
%
% }
%
%
%
%
% \StopEventually{
% }
% \clearpage
% \section{Flow chart of expansion: How does it work ?}
%
% \begin{center}
%
% \hspace*{-1.5cm}
% \begin{tikzpicture}[framed,scale=.75,
%       start chain=going below,every join/.style={->},node distance=.5cm and .5cm]
%
%    \node [on chain,font=\bfseries] (beginenv) {\cs{begin}\M*{list environment}}
%     node [on chain] (H) {}
%     node [on chain=going right] (enit@@list) {%
%       \begin{tabu}spread0pt {X[-1]} set the standard keys stored into \cs{enit@@list}\\ set the automatic \textt{name} key without argument.\end{tabu}};
%    \draw [->] (beginenv) |- (enit@@list);
%    \node [on chain,join] (zen@autoname) {\cs{zen@autoname} (callback)}
%    node [on chain=going right,join,node distance=2cm] (zen@autonamedesc) {%
%       \begin{tabu}spread0pt \{{X[-1]}. \rowfont[c]{} saves:\\ \cs{zen@@priorlistname} \\ \cs{zen@@priorcommaref} \\ \cs{zen@@priorrefitem}\\
%                              \rowfont[c]{} defines: \\ \cs{zen@@grouplevel} \\ \cs{zen@@depth} \\
%                              \rowfont[c]{} overloads: \\ \cs{@trivlist} \end{tabu}};
%    \node [yshift=-.5cm] (HH) at (zen@autonamedesc.south -| H) {};
%    \chainin (HH);
%    \node [on chain=going right] (enit@@enum) {set the standard keys stored into \cs{enit@@enum}, \cs{enit@@item} or \cs{enit@@desc}};
%    \draw [->] (H) |- (enit@@enum);
%    \chainin (HH);
%    \node [on chain] (HHH) {}
%     node [on chain=going right] (userkeys) {set the user keys for the environment};
%    \draw [->] (HH) |- (userkeys);
%    \node [on chain] (HH) {};
%    \node (keyname) at (HH -| zen@autoname) {key \textt{name}};
%    \chainin (keyname);
%    \draw [->] (userkeys) |- (keyname.west);
%    \node (keynamecallback) at (keyname -| zen@autonamedesc.west) [anchor=west] {\begin{tabu}spread0pt \{{X[-1]}. \rowfont[c]{} defines:\\ \cs{zen@@listname}\end{tabu}};
%    \chainin (keynamecallback);
%    \draw [->] (keyname) -- (keynamecallback);
%
%    \node [yshift=0cm] (HH) at (keynamecallback.south -| H) {};
%    \chainin (HH);
%    \node [on chain=going right] (expandlist) {expand \cs{list}};
%    \draw [->] (HHH) |- (expandlist);
%    \node [on chain] (HH) {} node [on chain=going right] (expand @trivlist) {\cs{@trivlist}};
%    \draw [->] (expandlist) |- (expand @trivlist);
%    \node [on chain] (HH) {} node [on chain=going right] (expand zen@setupref) {expand \cs{zen@setupref}};
%    \draw [->] (expand @trivlist) |- (expand zen@setupref);
%    \node [on chain=going right] {}
%     node [on chain=going right,join= with expand zen@setupref] (zen@setuprefdesc) {\begin{tabu}spread0pt \{{X[-1]}.
%             overloads: \cs{makelabel}\\
%             defines \cs{zen@refitem@fun}\footnotemark
%             \end{tabu}};
%    \node [yshift=-1cm] (Hitem) at (H |- zen@setuprefdesc) {};
%    \chainin (Hitem);
%    \node [on chain=going right] (item) {expand \cs{item}};
%    \draw [->] (Hitem |- expandlist) |- (item);
%    \node [on chain] (HH) {} node [on chain=going right] (makelabel) {\cs{makelabel}};
%    \draw [->] (item) |- (makelabel);
%    \node [on chain] (HH) {} node [on chain=going right] (zen@makeref) {\cs{zen@makeref}};
%    \draw [->] (makelabel) |- (zen@makeref);
%    \node [on chain=going right,join] (zen@makerefdesc) {%
%          \begin{tabu}spread0pt \{{X[-1]X[-2]}.
%                \rowfont[c]{} defines: &  \\
%                \cs{zen@@ref}            &\xpackage{zref} property (\cs{ref})\\
%                \cs{zen@@starlabel}      &\xpackage{zref} property (\cs{label\textasteriskcentered})\\
%                \cs{zen@@commaref}       &(\hyperref[commarefscheme]{\emph{commaref}} scheme) \\
%                \cs{zen@@refitem}        &(\hyperref[refitemscheme]{\emph{refitem}} scheme)  \\
%                \cs{zen@@anchor}         &\xpackage{hyperref}      \\
%                \multicolumn2l{\cs{refstepcounter\M*{zenItem}}} if no anchor \\
%                 & has been set by \xpackage{hyperref}.
%          \end{tabu}};
%    \node[yshift=-.5cm] (HH) at (makelabel |- zen@makerefdesc.south) {};
%    \chainin (HH);
%    \node [on chain=going right] (makelabelORI) {original \cs{makelabel}: typeset the label};
%    \draw [->] (makelabel) |- (makelabelORI);
%    \chainin (HH);
%    \node [on chain] {} node [on chain=going right] (zen@labelize) {\cs{zen@labelize}};
%    \draw [->] (HH) |- (zen@labelize);
%    \node [on chain=going right,join] (zen@labelizedesc) {\begin{tabu}spread0pt \{{X[-1]}. insert anchors\\ write \xpackage{zref} labels. \end{tabu}};
%    \node (HH) at (H |- zen@labelizedesc.south) {};
%    \chainin (HH);
%    \node [on chain,join = with Hitem,font=\bfseries] (endenv) {\cs{end}\M*{list environment}};
%
% \end{tikzpicture}
%
% \footnotetext{Used for the property \cs{label\textasteriskcentered}
%    and to define the label (and the anchor) in the \emph{refitem} scheme.}
%
% \end{center}
% \clearpage
%
% \StopEventually{
% }
%
% \IMPLEMENTATION
%
% \subsection{Identification and requirements}
%
% The package namespace is \texttbf{\db\string\zen@}
%
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{enumitem-zref}[2011/02/18 v1.8 - Extended references for enumitem pkg]
\RequirePackage{ltxcmds,etoolbox,kvoptions,gettitlestring,enumitem}
\RequirePackage{zref}[2010/05/01]
\RequirePackage{zref-user,zref-counter}
\GetTitleStringDisableCommands{\let\enit@format \@empty}
%    \end{macrocode}
%
%    Some \cs{catcode} assertions:
%
%    \begin{macrocode}
\let\zen@AtEnd \@empty
\def\TMP@EnsureCode#1#2{{%
   \count@\catcode#1\relax
   \toks@\expandafter{\zen@AtEnd \catcode#1 }
   \xdef\zen@AtEnd{\the\toks@ \the\count@\relax}}
   \catcode#1 #2\relax
}
\TMP@EnsureCode{40}{12}    % (
\TMP@EnsureCode{41}{12}    % )
\TMP@EnsureCode{`\Ï}{14}   % Ï (default comment: itemize option)
\TMP@EnsureCode{`\Ð}{14}   % Ð (default comment: description option)
\TMP@EnsureCode{`\Ë}{9}    % Ë (default ignore: external option)
%    \end{macrocode}
%
% \subsection{The package options}
%
%    \begin{macrocode}
\SetupKeyvalOptions{family=zen,prefix=zen@}
\DeclareBoolOption{CaSeS}
\DeclareBoolOption{itemize}
\DeclareBoolOption{description}
\DeclareBoolOption{enumerate}
\DeclareVoidOption{greek}{\AtEndOfPackage\zen@option@greek}
\def\zen@option@greek{%
   \RequirePackage{engrec,alphalph}
   \let\zen@grecORI \@grec \let\zen@GrecORI \@Grec
   \let\@grec \relax       \let\@Grec \relax
   \newalphalph\@grec[wrap]\zen@grecORI{24}
   \newalphalph\@Grec[wrap]\zen@GrecORI{24}
   \AddEnumerateCounter\engrec\@grec{\@grec{23}}% widest is \psi
   \AddEnumerateCounter\EnGrec\@Grec{\@Grec{12}}% widest is M
   \let\zen@option@greek \relax
}% \zen@option@greek
\DeclareVoidOption{greekctr}{\AtEndOfPackage\zen@option@greekctr}
\def\zen@option@greekctr{%
   \RequirePackage{greekctr,alphalph}
   \let\zen@greekORI \@greek \let\zen@GreekORI \@Greek
   \let\@greek \relax        \let\@Greek \relax
   \newalphalph\@greek[wrap]\zen@greekORI{24}%
   \newalphalph\@Greek[wrap]\zen@GreekORI{24}%
   \AddEnumerateCounter\greek\@greek{\@greek{23}}% widest is \psi
   \AddEnumerateCounter\Greek\@Greek{\@Greek{12}}% widest is M
   \let\zen@option@greekctr \relax
}% \zen@option@greekctr
\DeclareVoidOption{external}{\catcode`\Ë 14\relax}% Ë = comment
\DeclareDefaultOption{\@unknownoptionerror}
\AtBeginDocument{%
   \@ifpackageloaded{greekctr} \zen@option@greekctr \relax
   \@ifpackageloaded{engrec} \zen@option@greek      \relax
}
\ProcessLocalKeyvalOptions{zen}
\ifzen@enumerate\else
   \ifzen@itemize     \zen@enumeratetrue\else
   \ifzen@description \zen@enumeratetrue\else
   \zen@enumeratetrue \zen@itemizetrue \zen@descriptiontrue
   \fi\fi
   \ifzen@enumerate\else
      \zen@enumeratetrue \PackageWarning{enumitem-zref}
             {Option `enumerate = false' has no effect}%
   \fi
\fi
\ifzen@itemize    \catcode`\Ï 9  \fi   % ignore Ï
\ifzen@description\catcode`\Ð 9  \fi   % ignore Ð
\AtBeginDocument{\zen@item@comma \setcounter{zenItem}\z@}
%    \end{macrocode}
%
% Babel French: \xfile{frenchb} redefines \cs{itemize} at begin document.
%
% Therefore, when option \texttt{[itemize]} of \thispackage is used, one have to ensure that
% babel-french setup \texttt{CompactItemize=false} is set:
%
%    \begin{macrocode}
Ï \AtEndPreamble{\ifdefined\frenchbsetup\frenchbsetup{CompactItemize=false}\fi}% [itemize] option
%    \end{macrocode}
%
% \subsection{Some constants}
%
%    \begin{macro}{zenItem}
%
%    is the global \LaTeX{} counter for \xpackage{zref} labels and anchors added by \thispackage*
%
%    \begin{macro}{\c@zenidx}
%
%    is the local counter for the index of the items.
%    Every item is counted.
%
%    \begin{macro}{\zen@toks}
%
%    A token to be used by \cs{refitem} at the time the (optional) properties are analyzed:
%    we can't use \cs{toks@} at this time, because \cs{toks@} could have been set to a value
%    anywhere else.
%
%    \begin{macrocode}
\newcounter{zenItem}
\globcount\c@zenidx
\newtoks\zen@toks
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%
%    \begin{macro}{\zen@@autolabel}
%
%    To check if the item user-defined or automatic.
%
%    \begin{macrocode}
\def\zen@@autolabel{\@itemlabel}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@@noreference}
%
%    How to display undefined references.
%
%    \begin{macrocode}
\def\zen@@noreference{\nfss@text{\reset@font\bfseries ??}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@Hy@anchor}
%
%    is used to put the anchors for the items.
%    It's a wrapper for \xpackage{hyperref} \cs{Hy@raisedlink}.
%
%    \begin{macrocode}
\protected\def\zen@Hy@anchor#1{%
   \Hy@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}%
}% \zen@Hy@anchor (wrapper for \Hy@raisedlink)
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@lowercase}
%    \begin{macro}{\zen@CaSeS}
%
%    is used to make lowercase references in the \hyperref[refitemscheme]{\emph{refitem}} scheme,
%    when the package option \refitem{package options{cases}} is not active.
%
%    \begin{macrocode}
\let\zen@CaSeS \@firstofone
\ifzen@CaSeS   \let\zen@lowercase \zen@CaSeS
\else          \let\zen@lowercase \lowercase
\fi
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%
%    \begin{macro}{\zen@ifrefundefined}
%
%    Switch to the first part if the \LaTeX{} label exists, to the second part otherwise.
%    \begin{macrocode}
\def\zen@ifrefundefined#1{\ltx@IfUndefined{r@#1}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@box}
%
%    A utility to expand code inside a temporary \cs{vbox}
%
%    \begin{macrocode}
\def\zen@box{\hfuzz\maxdimen \vfuzz\hfuzz \hbadness\@M \vbadness\hbadness
             \tracinglostchars\z@ \everypar{}\setbox\z@=\vbox}
%    \end{macrocode}
%    \end{macro}
%
% \subsection{Properties for the zref list: zen@list}
%
%    \begin{macro}{\zen@unique}
%
%    is the unique counter to create unique labels for \xpackage{zref} references (internal use only):
%
%    \begin{macrocode}
\zref@newlist{zen@list}
\def\zen@{zen>\the\c@zenItem}
\zref@newprop{zen@}[]\zen@
\def\zen@temp#1#2#3{%
   \zref@newprop{zen@#2}[\zen@@noreference]{#3}%
   \ifx U#1\expandafter\let\csname zen@extract@#2\endcsname\unexpanded
   \else   \expandafter\let\csname zen@extract@#2\endcsname\detokenize
   \fi
}%
\zref@newprop*{zen@page}[\zen@@noreference]\thepage
\expandafter\let\csname zen@extract@page\endcsname\unexpanded
\zen@temp U{anchor}\zen@@anchor
\zen@temp U{default}\zen@@ref
\zen@temp U{type}{\ifdefined\zen@@type\ifnum\zen@@type<\z@\else \enit@type \fi\fi}
\zen@temp D{listname}\zen@@listname
\zen@temp U{depth}{\the\@listdepth}
\zen@temp U{index}{\the\c@zenidx}
\zen@temp U{listctr}{\ifdefined\@listctr \the\value\@listctr\fi}
\zen@temp U{parents}\zen@@parents
\zen@temp U{label}\zen@@itemlabel
\zen@temp U{starlabel}\zen@@starlabel
\zen@temp U{ref}\zen@@ref
\zen@temp U{item}\@itemlabel
\zen@temp U{currentlabel}\@currentlabel
\zen@temp U{currentlabelname}\@currentlabelname
\zen@temp D{refitem}\zen@@refitem
\zen@temp D{commaref}\zen@@commaref
\zen@temp U{counter}{\zref@getcurrent{counter}}
\zref@addprop{zen@list}{%
   zen@default,zen@page,zen@type,zen@depth,zen@listctr,%
   zen@listname,zen@index,zen@label,zen@ref,zen@starlabel,%
   zen@parents,zen@refitem,zen@commaref,zen@item,zen@currentlabel,zen@counter}
\newif\ifzen@Hy
\AtBeginDocument{%
   \ifdefined\hyper@anchor \zen@Hytrue
      \zref@addprop{zen@list}{zen@anchor,zen@currentlabelname}%
   \else \zen@Hyfalse   \let\zen@refHy \zen@refText
   \fi
}
%    \end{macrocode}
%    \end{macro}
%
% \subsection{Normalisation of references and item labels}
%
%    \begin{macro}{\zen@Normalize}
%
%    \begin{macrocode}
\def\zen@Normalize#1#2#3{\begingroup \let\zen@=#1%
   \def\GetTitleStringResult{#3}\toks@{}%
   \ifx \GetTitleStringResult\@empty \else
      \zen@NormalizeCommands     \GetTitleStringExpand{#3}%
      \expandafter\zen@trailingspaces \GetTitleStringResult{\@nnil}\@nnil
   \fi
   \edef\x{\endgroup
      \def\noexpand#2{\expandafter\zen@zap@doublespaces
                      \detokenize\expandafter{\GetTitleStringResult} \@empty}%
      \def\noexpand\zen@temp {\expandafter\zen@zap@doublespaces
                     \detokenize\expandafter{\the\toks@} \@empty}%
   }\x
}% \zen@Normalize
\def\zen@trailingspaces#1#{\toks@{#1}\expandafter\zen@trailingsp@ces}
{\catcode47 = 8 % /
\gdef\zen@trailingsp@ces#1{%
   \ifx \@nnil#1\@empty \expandafter\remove@to@nnil
   \else \zen@{\toks@\expandafter{\the\expandafter\toks@
                        \expandafter{\romannumeral0\zen@postspace #1/ /}}}%
         \expandafter\zen@trailingsp@ces        % (loop)
   \fi
}% \zen@trailingsp@ces
\gdef\zen@postspace#1 /{\zen@postsp@ce#1/}
\gdef\zen@postsp@ce#1/#2{ #1}
}% \catcode group
\def\zen@NormalizeCommands{%
   \let\ensuremath \@firstofone         % \ensuremath (engrec package)
   \let\relax \@empty
   \csname @safe@activestrue\endcsname
}% \zen@NormalizeCommands
\def\zen@zap@doublespaces#1 #2{%
   #1%
   \ifx#2\@empty\else\space\expandafter\zen@zap@doublespaces\fi
   #2%
}% \zen@zap@doublespaces
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection{Keys \textt{name} and \textt{name\stf} are added to \xpackage{enumitem} environments}
%
%    \begin{macrocode}
\define@key{enumitem}{name}[]{\zen@namelist{#1}}
\define@key{enumitem}{name*}[]{\zen@starnamelist{#1}}
%    \end{macrocode}
%
%    \begin{macro}{\zen@namelist}
%
%    is the callback for the key \texttt{name}.
%
%    \begin{macrocode}
Ë \AtBeginDocument{\gappto\enit@@list{,name}}% ignore if [external]
\def\zen@namelist #1{%
   \ifdefined\zen@@grouplevel\else \let\zen@@grouplevel \z@ \fi
   \ifnum\zen@@grouplevel<\currentgrouplevel% first (automatic) assignment  to name
      \zen@type                             % = (automatic from \enit@@list)
      \ifcase\zen@@type             % (case 0) = enum
         \zen@autoname
      \or                           % (case 1) = itemize
Ï        \zen@autoname              % [itemize] option only
      \or                           % (case 2) = description
Ð        \zen@autoname              % [description] option only
      \fi
   \else \zen@Normalize\zen@CaSeS\zen@@listname {#1}%
         \let\zen@@listname \zen@temp
   \fi
}% \zen@namelist (code for key name)
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@starnamelist}
%
%    is the callback for the key \textt{name\stf}.
%
%    \begin{macrocode}
\def\zen@starnamelist #1{% (1st automatic assignment to name done before)
   \zen@Normalize\zen@CaSeS\zen@@listname{#1}%
   \let\zen@@listname \zen@temp
   \ifx \zen@@priorlistname\zen@@listname
        \let\zen@@listname \@empty \fi
   \zen@namelist\zen@@listname
}% \zen@starnamelist (code for key name*)
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@autoname}
%
%    is the callback for the key \textt{name} automatically set without argument
%    by \cs{setkeys}\M*{enit@@list}. This corresponds to some setup:
%
%    \begin{itemize}
%    \item save the prior list name \etc.
%    \item define the group level,
%    \item define the list depth,
%    \item reset the index,
%    \item save the definition of \cs{@trivlist} and overload it temporarily
%          until its next expansion at the beginning of the list.
%    \end{itemize}
%
%    \begin{macrocode}
\def\zen@autoname{% (1st automatic assignment to key name (by \enit@@list))
   \unless \ifx\zen@@listname\@empty
      \let\zen@@priorlistname \zen@@listname \fi
   \unless\ifdefined\zen@@priorlistname \let\zen@@priorlistname \@empty\fi
   \let\zen@@listname \@empty
   \ifdefined\zen@@commaref \let\zen@@priorcommaref \zen@@commaref
   \else                    \let\zen@@priorcommaref \@empty
                            \let\zen@@commaref      \@empty
   \fi
   \ifdefined\zen@@refitem \let\zen@@priorrefitem \zen@@refitem
   \else                   \let\zen@@priorrefitem \@empty
                           \let\zen@@refitem      \@empty
   \fi
   \edef\zen@@grouplevel {\the\currentgrouplevel}%
   \edef\zen@@depth {\number\@listdepth}%
   \ifnum \zen@@depth>\@ne \edef\zen@@parents{{\the\c@zenItem}\zen@@parents}%
   \else                   \let\zen@@parents \@empty \fi
   \let\zen@refitem@fun \@undefined
   \ifcase \zen@@type \zen@prepare@resume \fi   % (enumerate only: key resume)
   \c@zenidx \z@
   \let\zen@trivlistORI \@trivlist
   \let\@trivlist \zen@trivlist
}% \zen@name@list
\def\zen@prepare@resume{\expandafter\def\expandafter\enit@endenumerate
   \expandafter{\enit@endenumerate \zen@endenumerate}%
}% \zen@prepare@resume
\def\zen@endenumerate{% saves the value of \c@zenidx at the exit of enum envir
   \zen@toks\expandafter{\enit@afterlist}%
   \xdef\enit@afterlist{\the\zen@toks
       \def\expandafter\noexpand
         \csname enit@resume@\@currenvir\endcsname{%
         \csname c@\@listctr\endcsname
         \the\csname c@\@listctr\endcsname
         \c@zenidx \the\c@zenidx\relax}}%
}% \zen@prepare@resume
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@trivlist}
%
%    \cs{@trivlist} is temporarily overloaded, and the original definition
%    is immediately restored at the time it will be expanded, just after having
%    set all the specified keys for the list environment.
%
%    The overload sets \cs{zen@setuprefs} to be expanded at the end of \cs{@trivlist}.
%
%    \begin{macrocode}
\def\zen@trivlist{%
   \let\@trivlist \zen@trivlistORI     % restore orginal immediately
   \@trivlist     \zen@setuprefs
}% \zen@trivlist
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@type}
%
%    expands to:§
%    \begin{enumerate}[label=,leftmargin=2cm,itemsep=0pt,parsep=0pt]
%     \item[0] if \texttt{enumerate}
%     \item[1] if \texttt{itemize} (and \texttt{[itemize]} option is active)
%     \item[2] if \texttt{description} (and \texttt{[description]} option is active)
%     \item[-1] in any other case
%    \end{enumerate}
%
%    \begin{macrocode}
\def\zen@type{%
   \ifdefined\enit@type
      \expandafter\strip@prefix        \if e\enit@type>\let\zen@@type\z@  % enum begins with e
      \else>\expandafter\strip@prefix  \if i\enit@type>\let\zen@@type\@ne % item begins with i
      \else>\expandafter\strip@prefix  \if d\enit@type>\let\zen@@type\tw@ % desc begins with d
      \else>\let\zen@@type\m@ne
      \fi\fi\fi
   \else    \let\zen@@type\m@ne
   \fi
}% \zen@type
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection{Overloading \cs{makelabel}}
%
%    \begin{macro}{\zen@setuprefs}
%
%    expands just at the end of \cs{@trivlist}. \cs{makelabel} is overloaded
%    in order to make the references and write the labels into the \xext{aux} file.
%
%    \begin{macro}{\zen@makelabel}
%    \begin{macrocode}
\def\zen@setuprefs{%
   \edef \zen@temp{\zen@@priorlistname\zen@@listname}%
   \ifx \zen@temp\@empty
      \ifx \makelabel\zen@makelabel \let\makelabel \zen@makelabelORI \fi
   \else
      \ifx \makelabel\zen@makelabel \else
         \let \zen@makelabelORI \makelabel
         \let \makelabel \zen@makelabel   \fi
   \fi
   \let\zeninfo \zen@info
   \ifcase \zen@@type         % enumerate only (key start)
      \ifnum \c@zenidx=\z@ \c@zenidx\value\@enumctr\relax \fi
   \fi
   \zen@refitem@implicit
}% \zen@setuprefs
\def\zen@makelabel#1{\zen@makeref{#1}\zen@makelabelORI{#1}\zen@labelize}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%
%
%    \begin{macro}{\zen@refitem@implicit}
%
%    defines \cs{zen@refitem@fun} which cancels text around the formatted counter
%    in \textt{enumerate} lists (\ie numbered lists). This will be used at the time
%    of \cs{makelabel} to create the \textt{refitem} and the property \cs{label\stf}
%    (which corresponds to \xpackage{zref} property \textt{zen@starlabel}).
%
%    \begin{macrocode}
\def\zen@refitem@implicit{% determine value of key refitem according to the label
   \def\zen@gtemp {{\the\c@zenidx}}%
   \ifnum \zen@@type=\z@      % enumerate
      {\let\enit@refstar \zen@refitemfromlabel
       \enit@labellist   \zen@box{\@itemlabel}}%
   \fi
   \let\zen@refitem@fun \zen@gtemp
}% \zen@refitem@implicit
\def\zen@refitemfromlabel#1{\def#1##1{0%
   \def\zen@temp{##1}\ifx \zen@temp\@enumctr
                     \gdef\zen@gtemp{{#1{##1}}}\fi}%
}% \zen@refitemfromlabel
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection{Creating references}
%
%    \begin{macro}{\zen@makeref}
%
%    is expanded just before the original version of \cs{makelabel}
%
%    The aim is to set the \xpackage{zref} properties defined by \thispackage*
%    for the current item, and to define the anchor names.
%
%    \begin{macrocode}
\def\zen@makeref#1{% #1 = argument of \makelabel
   \def\zen@@itemlabel{#1}\advance\c@zenidx \@ne
   \ifx \zen@@itemlabel\zen@@autolabel
      \if@nmbrlist
         \global\advance\c@zenItem \@ne
         \let\zen@@ref \@currentlabel
      \else
         {\refstepcounter{zenItem}}%
         \let\zen@@ref \zen@refitem@fun
      \fi
      \let\zen@@starlabel \zen@refitem@fun
      \zen@Normalize\zen@lowercase\zen@currentrefitem \zen@refitem@fun
   \else                                  % user defined label
      {\refstepcounter{zenItem}}%
      \zen@Normalize\zen@lowercase\zen@@ref {{\zen@@itemlabel}}%
      \let\zen@@starlabel \zen@@ref
   \fi
   \let\zen@currentrefitem \zen@temp      % \zen@temp defined by \zen@Normalize
   \let\zen@@anchor \@currentHref
   \zen@makeref@item@comma
}% \zen@makeref
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@labelize}
%
%    is expanded just after the original version of \cs{makelabel}
%
%    \textt{zlabel}{\smaller s} are written into the \xext{aux} file.
%
%    \begin{macrocode}
\def\zen@labelize{%
   \ifzen@Hy \zen@anchors
             \zref@labelbyprops{zen->\@currentHref}{zen@}\fi
   \zref@labelbylist\zen@{zen@list}%
   \zen@keeplabel
}% \zen@makeref
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@makeref@item@comma}
%
%    Creates the references for the \hyperref[commarefscheme]{\emph{commaref}}
%    and the \hyperref[refitemscheme]{\emph{refitem}} schemes.
%
%    \begin{macrocode}
\def\zen@makeref@item@comma{%
\begingroup    % to avoid silent assignment to \relax
   \edef\x{\endgroup
      \def\noexpand\zen@@commaref{%
         \expandafter\zen@commaref@\zen@@priorcommaref \@nnil}%
      \def\noexpand\zen@@refitem{%
        \expandafter\zen@refitem@\zen@@priorrefitem \@nnil}%
   }\x
}% \zen@makeref@item@comma
\def\zen@refitem@#1{%
   \ifx\@nnil#1%
      \ifx \zen@@listname\@empty \else
         {\zen@@listname\zen@currentrefitem}\fi
   \else {#1\zen@currentrefitem}\expandafter\zen@refitem@ % loop
   \fi
}% \zen@refitem@
\def\zen@commaref@#1{%
   \ifx\@nnil#1%
      \ifx \zen@@listname\@empty \else
         {\zen@@listname,\the\c@zenidx}\fi
   \else {#1,\the\c@zenidx}\expandafter\zen@commaref@     % loop
   \fi
}% \zen@commaref@
%    \end{macrocode}
%    \end{macro}
%
%
%    \begin{macro}{\zen@anchors}
%
%    Put the \pdf anchors for the current item.
%
%    \begin{macrocode}
\let\zen@list@anchors\@empty
\def\zen@anchors{\begingroup
   \def\zen@@anchors{\endgroup}%
   \expandafter\expandafter\expandafter\zen@anchors@
         \expandafter\zen@@commaref \zen@@refitem \@nnil
   \zen@@anchors
}% \zen@anchors
\def\zen@anchors@#1{%
   \ifx \@nnil#1\else
      \expandafter\in@\csname refitem.#1\expandafter\endcsname\expandafter{\zen@list@anchors}%
      \ifin@   \zen@anchor@ignore{#1}%
      \else
         \edef\zen@@anchors{\zen@@anchors\zen@Hy@anchor{refitem.#1}}%
         \xdef\zen@list@anchors{%
            \unexpanded\expandafter{\zen@list@anchors}%
            \expandafter\noexpand\csname refitem.#1\endcsname}%
      \fi
      \expandafter\zen@anchors@   % loop
   \fi
}% \zen@anchors@ (loop)
\def\zen@anchor@ignore#1{\PackageInfo{enumitem-zref}{Ignored anchor `#1'}}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@keeplabel}
%
%    As far as references are built and written inside \cs{makelabel} (which was overloaded)
%    they are built inside a group (inside a \cs{sbox}, and thus inside a \cs{color@setgroup}...\cs{color@endgroup}
%    group if packages \xpackage{color} or \xpackage{xcolor} are used, and may be inside other grouping levels
%    depending on the user need (she may have redefined \cs{makelabel} for a special purpose).
%
%    Therefore, we take advantage of the e-\TeX{} command \cs{currentgrouplevel} in order to
%    decide how many levels of grouping we have to ``pass through'' for keeping the current
%    values of \cs{z@zenidx} (the item \emph{index}), \cs{zen@@refitem},\, and\, \cs{zen@@commaref}.
%
%    The ``target'' group level has been saved into \cs{zen@@grouplevel} at the beginning of the
%    environment, while setting the automatic \texttt{name} key for the first time.
%
%    \begin{macrocode}
\def\zen@keep#1{\def\noexpand#1{\unexpanded\expandafter{#1}}}%
\def\zen@keeplabel{%
   \xdef\zen@gtemp{%
      \noexpand\ifnum \zen@@grouplevel<\currentgrouplevel
         \aftergroup \noexpand\zen@gtemp
      \noexpand\else
         \c@zenidx \the\c@zenidx\relax
         \zen@keep \zen@@refitem
         \zen@keep \zen@@commaref
         \ifzen@Hy \zen@keep\zen@@anchor\fi
      \noexpand\fi
   }\aftergroup\zen@gtemp
}% \zen@keeplabel
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection[{Extracting zref properties}]{Extracting \xpackage{zref} properties}
%
%    \begin{macro}{\zen@extract}
%
%    A wrapper to \cs{zref@extractdefault} which can also \cs{detokenize} the result.
%
%    \begin{macrocode}
\newcommand*\zen@extract[3]{% #1=ref #2=prop #3=def
   \csname zen@extract@#2\endcsname\expandafter\expandafter%
      \expandafter{\zref@extractdefault{zen>\number#1}{zen@#2}{#3}}%
}% \zen@extract
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection{Referencing the items: \cs{refitem}}
%
%    \begin{macro}{\refitem}
%
%    The general macro to print references and insert hyperlinks,
%    with a star variant (no hyperlink).
%
%    \begin{macrocode}
\newrobustcmd*\refitem{\begingroup \@ifstar
   {\zen@refitemOpt \zen@reftext }%          no hyperlink
   {\zen@refitemOpt \zen@refHy }%
}% \refitem
\def\zen@refHy{%
%%   \edef\zen@@anchor{\zen@extract\c@zenItem{anchor}{}\unexpanded}%
%%   \ifx \zen@@anchor\@empty \zen@@text
%%   \else
   \hyperref{}{}{\zref@extract{zen>\the\c@zenItem}{zen@anchor}}\zen@@text
%%   \fi
}% \zen@ref
\def\zen@refText{\zen@@text}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@refitemOpt}
%
%    If the first argument is an option, then \cs{refitem} makes a hyperlink
%    to an external document.
%
%    \begin{macrocode}
\def\zen@refitemOpt#1{\let\zen@ref@#1\@ifnextchar[\zen@refitemExternal \zen@refitemRef }
\def\zen@refitemRef #1{\@tempswatrue \let\zen@lastwarn \m@ne
   \zen@Normalize\zen@lowercase\zen@@label {#1}%
   \zen@ifrefundefined \zen@@label
     {\expandafter\expandafter\expandafter \zen@refused
       \csname\ifcsname zen@refitem(\zen@temp)\endcsname
                        zen@refitem(\zen@temp)\else
                        zen@norefitem\fi\endcsname>}%
      \zen@refitemFromAnchor
}% \zen@refitemRef
\def\zen@norefitem {\z@>0}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@refused}
%
%    Checks if the label exists in the \hyperref[commarefscheme]{\emph{commaref}} scheme
%    or in the \hyperref[refitemscheme]{\emph{refitem}} scheme.
%
%    \begin{macrocode}
\def\zen@refused#1>#2>{%
   \ifcase#1\relax
         \@tempswafalse    \refused\zen@@label
         \let\zen@ref@ \zen@refText % do not create a hyperlink if no reference
   \or   \let\zen@@label \zen@temp \c@zenItem =#2\relax
   \else \let\zen@@label \zen@temp \zen@MultipleLabels
         \c@zenItem =#2\relax
   \fi
   \zen@refitem@prop
}% \zen@refused
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@refitemFromAnchor}
%
%    When \cs{refitem} refers to a user item, we can reached the \xpackage{zref} properties
%    with the chain:
%
%    \tikz[start chain=going right,every join/.style={->}]
%              \node [on chain] {\LaTeX{} label}
%              node [on chain,join] {\xpackage{hyperref} anchor}
%              node [on chain,join] {\thispackage* label}
%              node [on chain,join] {property};
%
%    \begin{macrocode}
\def\zen@refitemFromAnchor{%
   \edef\zen@@anchor{\getrefbykeydefault\zen@@label{anchor}{}}%
   \ifx \zen@@anchor\@empty
      \@tempswafalse \G@refundefinedtrue \zen@warn\z@
      \let\zen@ref@ \zen@refText
   \else
      \edef\zen@temp{\zref@extractdefault{zen->\zen@@anchor}{zen@}{}}%
      \ifx \zen@temp\@empty
         \@tempswafalse \G@refundefinedtrue \zen@warn\@ne
         \ifzen@Hy \ifx\zen@ref@ \zen@refHy \def\zen@ref@{\ref{\zen@@label}}%
                   \else \def\zen@ref@ {\ref*{\zen@@label}}%
                   \fi
         \else \def\zen@ref@{\ref{\zen@@label}}%
         \fi
      \else \c@zenItem \expandafter\strip@prefix\zen@temp\relax
      \fi
   \fi
   \zen@refitem@prop
}% \zen@refitemFromAnchor
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\def\zen@warn#1{\let\zen@lastwarn#1%
   \message{Package enumitem-zref Warning:
   \ifcase#1 %
      \string\refitem{\zen@@label}:
      User references to \string\label\space^^J\zen@spaces
      require hyperref and the appropriate options for enumitem-zref^^J\zen@spaces
      \ifzen@Hy Check the options given to package enumitem-zref.
      \else Package hyperref is not loaded.\fi
   \or User reference does not point to an item!^^J\zen@spaces
       \string\refitem{\zen@@label}
   \fi\on@line^^J^^J}}
\edef\zen@spaces{\@spaces\@spaces}
%    \end{macrocode}
%
%
%    \begin{macro}{\zen@refitem@prop}
%
%    tests if \cs{refitem} has a following optional argument: the properties.
%
%    As long as the optional argument is in last position, we have to take a special
%    care about the the spaces  (\cs{@ifnextchar} removes spaces).
%
%    \begin{macrocode}
\def\zen@refitem@prop{\futurelet\zen@temp \zen@refitemProp}
\def\zen@gobblespace#1 {#1}%
\let\zen@space \relax
\def\zen@refitemProp{%
   \ifcase 0\ifx \zen@temp[\else
            \ifx \zen@temp\@sptoken 1\else
            2\fi\fi\relax
         \expandafter \zen@refitemPrint
   \or   \let\zen@space\space
         \expandafter\zen@gobblespace\expandafter\zen@refitem@prop
   \else \expandafter\zen@refitemPrint \expandafter[\expandafter]%
   \fi
}% \zen@refitemProp
%    \end{macrocode}
%    \end{macro}
%
%
%    \begin{macro}{\zen@refitemPrint}
%
%    is the final macro to print the reference made by \cs{refitem}.
%    The properties, if specified, are first analyzed by \cs{zen@refitemText}.
%
%    \begin{macrocode}
\long\def\zen@refitemPrint[#1]{\def\zen@@text{#1}%
   \if@tempswa    % got a reference
      \ifx \zen@@text\@empty
           \edef\zen@@text{{\zen@extract\c@zenItem{default}\zen@@noreference}\zen@space}%
      \else\zen@refitemText
      \fi
   \else
      \ifx  \zen@@text\@empty \def\zen@@text{\zen@@noreference\zen@space}%\refused\zen@@label
      \else \zen@refitem@noText
      \fi
   \fi
   \zen@ref@
   \endgroup
}% \zen@refitemPrint
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@refitemText}
%
%    creates the text to be typeset for the reference, depending on the properties
%    given by the user as the last optional argument to \cs{refitem}.
%
%    \begin{macrocode}
\def\zen@refitemText{\zen@propcount
   \ifnum \c@zenidx>\z@    \advance\c@zenidx \m@ne
      \ifnum \c@zenidx>\z@
         \edef\zen@@parents{\zen@extract\c@zenItem{parents}{}}%
         \edef\zen@@depth{\zen@extract\c@zenItem{depth}0}%
      \else \let\zen@@depth \@ne     % shortcut (only one property)
      \fi
      \def\ref{\@ifstar{\zen@ancestorprop{starlabel}}{\zen@ancestorprop{ref}}}%
      \def\label{\@ifstar{\zen@ancestorprop{starlabel}}{\zen@ancestorprop{label}}}%
      \def\default{\zen@ancestorprop{default}}\def\counter{\zen@ancestorprop{counter}}%
      \def\type{\zen@ancestorprop{type}}\def\listname{\zen@ancestorprop{listname}}%
      \def\index{\zen@ancestorprop{index}}\def\listctr{\zen@ancestorprop{listctr}}%
      \def\depth{\zen@ancestorprop{depth}}\def\refitem{\zen@ancestorprop{refitem}}%
      \def\anchor{\zen@ancestorprop{anchor}}\def\commaref{\zen@ancestorprop{commaref}}%
      \def\page{\zen@ancestorprop{page}}\def\currentlabel{\zen@ancestorprop{currentlabel}}%
      \def\currentlabelname{\zen@ancestorprop{currentlabelname}}%
      {\zen@box{\zen@@text
               \expandafter}\expandafter}\expandafter\zen@toks
                     \expandafter{\the\zen@toks \zen@nil}%
      \def\ref{\the\zen@toks}\zen@clprops
      \def\ref{\@ifstar{\the\zen@toks}{\the\zen@toks}}\let\label\ref
      \long\def\zen@##1##2\zen@nil{\zen@toks{##2\zen@nil}##1}\let\zen@nil\relax
   \fi
}% \zen@refitemText
\def\zen@ancestorprop#1{%
   \ifnum \zen@@depth>\c@zenidx
      \advance\c@zenidx \m@ne
      \ifnum \c@zenidx<\z@    \let\zen@ \c@zenItem
      \else                   \edef\zen@{\zen@ancestor}%
      \fi
      \edef\zen@temp{{\zen@extract\zen@{#1}\zen@@noreference}}%
   \else \def\zen@temp{{}}\advance\c@zenidx \m@ne
   \fi
   \zen@toks\expandafter{\the\expandafter\zen@toks \expandafter\zen@ \zen@temp}%
}% \zen@ancestorproperty
\def\zen@ancestor{\expandafter\ltx@car\romannumeral0\expandafter\ltx@GobbleNum
   \expandafter{\the\expandafter\c@zenidx\expandafter}\zen@@parents{}{}{}\@nil % no need of {}...
}% \zen@getancestor
\def\zen@propcount{\c@zenidx\z@
   \def\ref{\advance\c@zenidx \@ne}\zen@clprops
   {\zen@box{\zen@@text \expandafter}\expandafter}\expandafter
                               \c@zenidx \the\c@zenidx\relax
}% \zen@propcount
\def\zen@clprops{\let\label\ref    \let\page\ref
   \let\none\ref  \let\default\ref \let\counter\ref \let\listname\ref
   \let\anchor\ref \let\depth\ref  \let\type\ref    \let\index\ref   \let\listctr\ref
   \let\refitem\ref \let\commaref\ref \let\currentlabel\ref \let\currentlabelname\ref
}% \zen@clprops
\def\zen@refitem@noText{\let\ref \zen@@noreference \zen@clprops}
%    \end{macrocode}
%    \end{macro}
%
%
%    \begin{macro}{\zen@refitemExternal}
%
%    for references to an anchor in an external document with \cs{hyperref}:
%
%    \begin{macrocode}
\def\zen@refitemExternal[#1]#2{%
   \toks@{#1}\zen@Normalize\zen@lowercase\zen@@label {#2}%
   \edef\zen@ref@{\endgroup
      \noexpand\hyperref{\the\toks@}{refitem}{\zen@temp}%
   }\zen@ref@
}% \zen@Hy@external
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection{Undefined references and duplicate labels management}
%
%
%    \begin{macro}{\zen@MultipleLabels}
%
%    \begin{macrocode}
\def\zen@MultipleLabels{%
   \PackageWarning{enumitem-zref}
      {`\zen@@label' on page \thepage \space multiple defined\MessageBreak
       Only the first one will be referenced}% et mettre ici la liste des références correspondant aux alias
}% \zen@MultipleLabels
%    \end{macrocode}
%    \end{macro}
%
% \subsection{\cs{zeninfo} (If you are lost...)}
%
%    \begin{macro}{\zen@info}
%
%    \cs{zeninfo} executes \cs{zen@info} when inside environments:
%
%    \begin{macrocode}
\newrobustcmd*\zen@info[1][]{\begingroup \sloppy
   \def\sep##1{##1\hskip\z@ plus.001fil\relax\linebreak[2]}%
   \ifcase\zen@whichinfo{#1}   \zen@@depth      % case 0 (depth)
   \or                         \the\c@zenidx    % case 1 (index)
   \or                                          % case 2 (type)
      \ifcase\zen@@type enumerate\or itemize\or description\or unknown\fi
   \or anchor=\ifzen@Hy\zen@@anchor\else no hyperref\fi % case 3 (anchor)
   \or refitem=\sep{}\detokenize\expandafter{\zen@@refitem}% case 4 (refitem)
   \or commaref=\sep{}\detokenize\expandafter{\zen@@commaref}% case 5 (commaref)
   \else                                        % (case -1) give all infos
      {\ifdefined\scriptsize\scriptsize\fi
          zeninfo:\sep{}depth=\sep{}\zen@@depth
                  \sep/ idx=\sep{}\the\c@zenidx
         \ifcase\zen@@type \sep/ ctr=\sep{}\the\value\@listctr \fi % enumerate only
                  \sep/ commaref=\sep{}\detokenize\expandafter{\zen@@commaref}%
                  \sep/ refitem=\sep{}\detokenize\expandafter{\zen@@refitem}%
         \ifzen@Hy\sep/ anchor=\sep{}\zen@@anchor \fi
      }%
   \fi\endgroup
}% \zen@info
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zeninfo}
%
%    is executed when out of scope:
%
%    \begin{macrocode}
\newrobustcmd\zeninfo[1][]{\begingroup
   \ifdefined\zen@@type
   \ifcase \zen@@type \zeninfo@err
Ï  \or                \zeninfo@err
Ð  \or                \zeninfo@err
   \else\zeninfo@err[{in environment \@currenvir\MessageBreak
                      You should be in a list environment}]%
   \fi\endgroup
}% \zeninfo (out of scope)
\newcommand*\zeninfo@err[1][{you should give a name to your \@currenvir\space list}]{%
   \PackageError{enumitem-zref}
      {\string\zeninfo\space is not available\MessageBreak
      #1}\@eha
}% \zeninfo@err
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@whichinfo}
%
%    \begin{macrocode}
\def\zen@whichinfo#1{%
   \expandafter\strip@prefix      \if d#1>\z@   % depth  (begins with  d)
   \else>\expandafter\strip@prefix\if i#1>\@ne  % index  (begins with  i)
   \else>\expandafter\strip@prefix\if t#1>\tw@  % type   (begins with  t)
   \else>\expandafter\strip@prefix\if a#1>\thr@@% anchor (begins with  a)
   \else>\expandafter\strip@prefix\if r#1>4     % refitem(begins with  r)
   \else>\expandafter\strip@prefix\if c#1>5     % commaref(begins with c)
   \else>\m@ne
   \fi\fi\fi\fi\fi\fi
}% \zen@whichinfo
%    \end{macrocode}
%    \end{macro}
%
%
% \subsection{Create the references At Begin Document for the \texorpdf\emph{refitem} and the \texorpdf\emph{commaref} schemes}
%
%    \begin{macro}{\zen@item@comma}
%
%    \begin{macrocode}
\def\zen@item@comma{%
   \begingroup \c@zenidx \@ne %%\loggingall
   \@whilesw \ifcsname Z@R@zen>\the\c@zenidx\endcsname\fi
                     {\advance\c@zenidx \@ne}%
   \@whilenum \c@zenidx>\@ne
   \do{\advance \c@zenidx \m@ne
      \zref@wrapper@unexpanded{%
      \edef\zen@refitem{%
            \zref@extractdefault{zen>\the\c@zenidx}{zen@refitem}{}%
            \zref@extractdefault{zen>\the\c@zenidx}{zen@commaref}{}}%
       \edef\zen@refitem{\expandafter
            \zen@item@comma@ \zen@refitem \@nnil}%
       \expandafter\zen@def@item@comma@ \zen@refitem \@nnil}}%
   \endgroup
}% \zen@item@comma
\def\zen@item@comma@ #1{%
   \ifx\@nnil#1\else
      \expandafter\noexpand\csname zen@refitem(\detokenize{#1})\endcsname
      \expandafter\zen@item@comma@ % (loop)
   \fi
}% \zen@item@comma@
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@def@item@comma@}
%
%    \begin{macrocode}
\def\zen@def@item@comma@ #1{\ifx\@nnil#1\else
      \zen@def@item@comma{#1}\expandafter\zen@def@item@comma@ \fi % loop
}% \zen@def@item@comma@
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\zen@def@item@comma}
%
%    \begin{macrocode}
\newif\ifzen@duplicatealiases
\def\zen@def@item@comma #1{%
   \xdef#1{%
      \ifdefined#1%
         \ifx\relax#1\@empty         \@ne>\the\c@zenidx% create new
         \else \expandafter
            \ifnum\expandafter\strip@prefix#1=\c@zenidx% redefinition to the same location
               #1%
            \else
               \number\numexpr1+#1% increment multiplicity
            \fi
         \fi
      \else                      \@ne>\the\c@zenidx% create new
      \fi}%
   \ifzen@duplicatealiases\else
   \expandafter\expandafter\expandafter\strip@prefix
      \expandafter\strip@prefix\ifnum\@ne<#1>\global\zen@duplicatealiasestrue\else>>\fi
   \fi
}% \zen@def@item@comma
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\zen@AtEnd \let\zen@AtEnd\@undefined
%</package>
%    \end{macrocode}
%
% \restoregeometry
% \sectionformat\section{label=,font=\LARGE\bfseries,mark=\marksthe{section}{#1}}
% \sectionformat\subsection{font+=\smaller,left=0pt}
% \pagesetup{pagestyle=corpus,head/left+=\ {\lsstyle(\thefirstmarks{section})}}
%
% \begin{thebibliography}{9}
%
% \bibitem{enumitem}
%   \textit{The \xpackage{enumitem} package}; Javier Bezos\\
%   2009/05/18 v2.2 -- Customized lists \\
%   \CTANhref{enumitem}
%
% \bibitem{zref}
%   \textit{The \xpackage{zref} package}; Heiko Oberdiek\\
%   2010/05/01 v2.17 -- New reference scheme for LaTeX2e \\
%   \CTANhref{zref}
%
% \bibitem{gettitlestring}
%   \textit{The \xpackage{gettitlestring} package}; Heiko Oberdiek\\
%   2009/12/18 v1.3 -- Cleanup title references\\
%   \CTANhref{gettitlestring}
%
% \bibitem{engrec}
%     \textit{The \xpackage{engrec} package}; Yvon Henel \\
%     2008/05/07 v1.1 -- Greek letters from counters\\
%     \CTANhref{engrec}
%
% \end{thebibliography}
%
% \setitemize{leftmargin=2em}
% \sectionformat\subsection{font=\normalsize\bfseries\pkgcolor}
% \bottomtitles=-1pt
% \begin{History}
%
%   \begin{Version}{2011/02/18 v1.8}\HistLabel{v1.8}
%   \item Documentation recompiled after \Xpackage{tabu} package v2.5 release.
%   \end{Version}
%
%   \begin{Version}{2010/12/30 v1.75}\HistLabel{v1.75}
%   \item Bug fixed with empty items and nested lists.
%   \end{Version}
%
%   \begin{Version}{2010/12/27 v1.7}\HistLabel{v1.7}
%   \item Documentation improvement.
%   \item No modification in the package file.
%   \end{Version}
%
%   \begin{Version}{2010/12/17 v1.5}\HistLabel{v1.5}
%   \item \thispackage now works with the keys: \textt{start=},\, \textt{resume},\, and\, \textt{resume\stf}\,
%         of \xpackage{enumitem} package.
%   \item Package option: \refitem{package options{greekctr}}[\textt{greekctr}] added as an alternative to the
%        \refitem{package options{greek}}[\textt{greek}] package option: \textt{greekctr} is based on the
%         \Xpackage{greekctr} package while \textt{greek} is based on \Xpackage{engrec}.
%         Both uses code of \Xpackage{alphalph} in order to make the counters \textsl{wrap} around the greek alphabet. \\
%         Options \refitem{package options{greek}}[\textt{greek}] and/or \refitem{package options{greekctr}}[\textt{greekctr}]
%         are automatically loaded \cs{AtBeginDocument} if the \xpackage{engrec} / \xpackage{greekctr} packages are detected.
%   \end{Version}
%
%   \begin{Version}{2010/12/10 v1.2}\HistLabel{v1.2}
%   \item Bug encountered in \cs\zen@anchors@: \\
%        \cs\ifx\#1\cs\@nnil is not the same as \cs\ifx\cs\@nnil\#1\quad !!
%   \end{Version}
%
%   \begin{Version}{2010/12/02 v1.1}\HistLabel{v1.1}
%   \item The first version.
%   \end{Version}
%
% \end{History}
%
% \clearpage
% \PrintIndex
%
% \Finale