summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/enumitem-zref
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-16 23:57:32 +0000
committerKarl Berry <karl@freefriends.org>2010-12-16 23:57:32 +0000
commit3d7921d8c3592f86548fb1c0dda79e234a63c223 (patch)
tree90cc3f0351bef071d215004e4f2a63cd2b1f6f4c /Master/texmf-dist/tex/latex/enumitem-zref
parented6fcfcd2ce561cfee9ac566ee1945a079dbd27d (diff)
enumitem-zref (16dec10)
git-svn-id: svn://tug.org/texlive/trunk@20767 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/enumitem-zref')
-rw-r--r--Master/texmf-dist/tex/latex/enumitem-zref/enumitem-zref.sty61
1 files changed, 46 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/enumitem-zref/enumitem-zref.sty b/Master/texmf-dist/tex/latex/enumitem-zref/enumitem-zref.sty
index ae5ed71b819..d937d9b63c9 100644
--- a/Master/texmf-dist/tex/latex/enumitem-zref/enumitem-zref.sty
+++ b/Master/texmf-dist/tex/latex/enumitem-zref/enumitem-zref.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% enumitem-zref : 2010/12/10 v1.2 - Extended references to items for enumitem package and hyperref
+%% enumitem-zref : 2010/12/17 v1.5 - 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
@@ -25,7 +25,7 @@
%% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{enumitem-zref}[2010/12/10 v1.2 - Extended references for enumitem pkg]
+\ProvidesPackage{enumitem-zref}[2010/12/17 v1.5 - Extended references for enumitem pkg]
\RequirePackage{ltxcmds,etoolbox,kvoptions,gettitlestring,enumitem}
\RequirePackage{zref}[2010/05/01]
\RequirePackage{zref-user,zref-counter}
@@ -47,19 +47,34 @@
\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{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
@@ -89,7 +104,7 @@
\fi
\def\zen@ifrefundefined#1{\ltx@IfUndefined{r@#1}}
\def\zen@box{\hfuzz\maxdimen \vfuzz\hfuzz \hbadness\@M \vbadness\hbadness
- \setbox\z@=\vbox}
+ \tracinglostchars\z@ \setbox\z@=\vbox}
\zref@newlist{zen@list}
\def\zen@{zen>\the\c@zenItem}
\zref@newprop{zen@}[]\zen@
@@ -200,10 +215,23 @@
\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
\def\zen@trivlist{%
\let\@trivlist \zen@trivlistORI % restore orginal immediately
\@trivlist \zen@setuprefs
@@ -228,6 +256,9 @@
\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}
@@ -239,7 +270,7 @@
\fi
\let\zen@refitem@fun \zen@gtemp
}% \zen@refitem@implicit
-\def\zen@refitemfromlabel#1{\def#1##1{%
+\def\zen@refitemfromlabel#1{\def#1##1{0%
\def\zen@temp{##1}\ifx \zen@temp\@enumctr
\gdef\zen@gtemp{{#1{##1}}}\fi}%
}% \zen@refitemfromlabel