%%
%% This is file `enumitem-zref.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% enumitem-zref.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% enumitem-zref : 2010/12/02 v1.1 - 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>
%% 
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{enumitem-zref}[2010/12/02 v1.1 - 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}
\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)
\SetupKeyvalOptions{family=zen,prefix=zen@}
\DeclareBoolOption{CaSeS}
\DeclareBoolOption{itemize}
\DeclareBoolOption{description}
\DeclareBoolOption{enumerate}
\DeclareVoidOption{greek}{%
   \AtEndOfPackage{%
      \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
   }%
}
\DeclareVoidOption{external}{\catcode`\� 14\relax}% � = comment
\DeclareDefaultOption{\@unknownoptionerror}
\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@}
� \AtEndPreamble{\ifdefined\frenchbsetup\frenchbsetup{CompactItemize=false}\fi}% [itemize] option
\newcounter{zenItem}
\globcount\c@zenidx
\newtoks\zen@toks
\def\zen@@autolabel{\@itemlabel}
\def\zen@@noreference{\nfss@text{\reset@font\bfseries ??}}
\protected\def\zen@Hy@anchor#1{%
   \Hy@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}%
}% \zen@Hy@anchor (wrapper for \Hy@raisedlink)
\let\zen@CaSeS \@firstofone
\ifzen@CaSeS   \let\zen@lowercase \zen@CaSeS
\else          \let\zen@lowercase \lowercase
\fi
\def\zen@ifrefundefined#1{\ltx@IfUndefined{r@#1}}
\def\zen@box{\hfuzz\maxdimen \vfuzz\hfuzz \hbadness\@M \vbadness\hbadness
             \setbox\z@=\vbox}
\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
}
\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{\detokenize\expandafter{\GetTitleStringResult}}%
      \def\noexpand\zen@temp {\detokenize\expandafter{\the\toks@}}%
   }\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
\define@key{enumitem}{name}[]{\zen@namelist{#1}}
\define@key{enumitem}{name*}[]{\zen@starnamelist{#1}}
� \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)
\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*)
\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
   \c@zenidx \z@
   \let\zen@trivlistORI \@trivlist
   \let\@trivlist \zen@trivlist
}% \zen@name@list
\def\zen@trivlist{%
   \let\@trivlist \zen@trivlistORI     % restore orginal immediately
   \@trivlist     \zen@setuprefs
}% \zen@trivlist
\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
\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
   \zen@refitem@implicit
}% \zen@setuprefs
\def\zen@makelabel#1{\zen@makeref{#1}\zen@makelabelORI{#1}\zen@labelize}
\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{%
   \def\zen@temp{##1}\ifx \zen@temp\@enumctr
                     \gdef\zen@gtemp{{#1{##1}}}\fi}%
}% \zen@refitemfromlabel
\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
\def\zen@labelize{%
   \ifzen@Hy \zen@anchors
             \zref@labelbyprops{zen->\@currentHref}{zen@}\fi
   \zref@labelbylist\zen@{zen@list}%
   \zen@keeplabel
}% \zen@makeref
\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@
\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 #1\@nnil \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'}}
\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
\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
\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}
\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}
\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
\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
\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}
\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
\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
\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}
\def\zen@refitemExternal[#1]#2{%
   \toks@{#1}\zen@Normalize\zen@lowercase\zen@@label {#2}%
   \edef\zen@ref@{\endgroup
      \noexpand\hyperref{\the\toks@}{refitem}{\zen@@label}%
   }\zen@ref@
}% \zen@Hy@external
\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
\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
\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
\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
\def\zen@item@comma{%
   \begingroup \c@zenidx \@ne
   \@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@
\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@
\newif\ifzen@duplicatealiases
\def\zen@def@item@comma #1{%
   \xdef#1{%
      \ifdefined#1%
         \ifx#1\relax            \@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
\zen@AtEnd \let\zen@AtEnd\@undefined
\endinput
%%
%% End of file `enumitem-zref.sty'.
