summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/zref-base.sty')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/zref-base.sty216
1 files changed, 205 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty b/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
index 4ddad0871e9..ddfe2afab5c 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2006-2010 by
+%% Copyright (C) 2006-2011 by
%% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%%
%% This work may be distributed and/or modified under the
@@ -29,22 +29,24 @@
%% and the derived files
%% zref.sty, zref.pdf, zref.ins, zref.drv, zref-base.sty,
%% zref-abspage.sty, zref-abspos.sty, zref-counter.sty,
-%% zref-dotfill.sty, zref-hyperref.sty, zref-lastpage.sty,
-%% zref-marks.sty, zref-nextpage.sty, zref-pageattr.sty,
-%% zref-pagelayout.sty, zref-perpage.sty, zref-runs.sty,
-%% zref-savepos.sty, zref-thepage.sty, zref-titleref.sty,
-%% zref-totpages.sty, zref-user.sty, zref-xr.sty,
-%% zref-example.tex, zref-example-lastpage.tex,
+%% zref-dotfill.sty, zref-env.sty, zref-hyperref.sty,
+%% zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,
+%% zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,
+%% zref-runs.sty, zref-savepos.sty, zref-thepage.sty,
+%% zref-titleref.sty, zref-totpages.sty, zref-user.sty,
+%% zref-xr.sty, zref-example.tex, zref-example-lastpage.tex,
%% zref-example-nextpage.tex, zref-test1.tex,
%% zref-test-base.tex, zref-test-runs.tex,
%% zref-test-titleref-memoir.tex.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
- [2010/05/01 v2.17 Module base for zref (HO)]%
+ [2011/03/18 v2.21 Module base for zref (HO)]%
\RequirePackage{ltxcmds}[2010/03/01]
\RequirePackage{infwarerr}[2010/04/08]
\RequirePackage{kvsetkeys}[2010/03/01]
+\RequirePackage{kvdefinekeys}[2010/03/01]
+\RequirePackage{pdftexcmds}[2010/04/01]
\def\ZREF@name{zref}
\ltx@IfUndefined{protected}{%
\RequirePackage{makerobust}[2006/03/18]%
@@ -157,7 +159,7 @@
}%
}%
}
-\ZREF@Robust\def\zref@addprop#1#2{%
+\ZREF@Robust\def\zref@addprops#1#2{%
\zref@listexists{#1}{%
\comma@parse{#2}{%
\zref@propexists\comma@entry{%
@@ -176,7 +178,23 @@
}%
}%
}
-\ZREF@Robust\def\zref@localaddprop#1#2{%
+\ZREF@Robust\def\zref@addprop#1#2{%
+ \zref@listexists{#1}{%
+ \zref@propexists{#2}{%
+ \zref@iflistcontainsprop{#1}{#2}{%
+ \PackageWarning\ZREF@name{%
+ Property `#2' is already in list `#1'%
+ }%
+ }{%
+ \begingroup\expandafter\endgroup
+ \expandafter\g@addto@macro
+ \csname Z@L@#1\expandafter\endcsname
+ \expandafter{\csname#2\endcsname}%
+ }%
+ }%
+ }%
+}
+\ZREF@Robust\def\zref@localaddprops#1#2{%
\zref@listexists{#1}{%
\comma@parse{#2}{%
\zref@propexists\comma@entry{%
@@ -195,6 +213,96 @@
}%
}%
}
+\ZREF@Robust\def\zref@localaddprop#1#2{%
+ \zref@listexists{#1}{%
+ \zref@propexists{#2}{%
+ \zref@iflistcontainsprop{#1}{#2}{%
+ \PackageWarning\ZREF@name{%
+ Property `#2' is already in list `#1'%
+ }%
+ }{%
+ \begingroup\expandafter\endgroup
+ \expandafter\ltx@LocalAppendToMacro
+ \csname Z@L@#1\expandafter\endcsname
+ \expandafter{\csname#2\endcsname}%
+ }%
+ }%
+ }%
+}
+\ltx@IfUndefined{pdf@strcmp}{%
+ \ZREF@Robust\def\zref@delprop{%
+ \ZREF@delprop\gdef
+ }%
+ \ZREF@Robust\def\zref@localdelprop{%
+ \ZREF@delprop\def
+ }%
+ \def\ZREF@delprop#1#2#3{%
+ \zref@listexists{#2}{%
+ \begingroup
+ \escapechar=-1 %
+ \def\ZREF@param{#3}%
+ \@onelevel@sanitize\ZREF@param
+ \toks@{}%
+ \expandafter\expandafter\expandafter\ZREF@@delprop
+ \csname Z@L@#2\endcsname!%
+ \expandafter\endgroup
+ \expandafter#1\csname Z@L@#2\expandafter\endcsname
+ \expandafter{%
+ \the\toks@
+ }%
+ }%
+ }%
+ \def\ZREF@@delprop#1{%
+ \expandafter\ZREF@@@delprop\expandafter{\string#1}#1%
+ }%
+ \def\ZREF@@@delprop#1#2{%
+ \ifx#2!%
+ \else
+ \def\ZREF@temp{#1}%
+ \@onelevel@sanitize\ZREF@temp
+ \ifx\ZREF@param\ZREF@temp
+ \else
+ \toks@\expandafter{%
+ \the\expandafter\toks@\csname#1\endcsname
+ }%
+ \fi
+ \expandafter\ZREF@@delprop
+ \fi
+ }%
+}{%
+ \ZREF@Robust\def\zref@delprop{%
+ \ZREF@delprop\xdef
+ }%
+ \ZREF@Robust\def\zref@localdelprop{%
+ \ZREF@delprop\edef
+ }%
+ \def\ZREF@delprop#1#2#3{%
+ \zref@listexists{#2}{%
+ \def\ZREF@param{#3}%
+ \edef\ZREF@SavedEscapechar{\the\escapechar}%
+ \escapechar=-1 %
+ \expandafter#1\csname Z@L@#2%
+ \expandafter\expandafter\expandafter\endcsname{%
+ \expandafter\expandafter\expandafter\ZREF@@delprop
+ \csname Z@L@#2\endcsname!%
+ }%
+ \escapechar=\ZREF@SavedEscapechar\relax
+ }%
+ }%
+ \def\ZREF@@delprop#1{%
+ \expandafter\ZREF@@@delprop\expandafter{\string#1}#1%
+ }%
+ \def\ZREF@@@delprop#1#2{%
+ \ifx#2!%
+ \else
+ \ifnum\pdf@strcmp{#1}{\ZREF@param}=\ltx@zero
+ \else
+ \expandafter\noexpand\csname#1\endcsname
+ \fi
+ \expandafter\ZREF@@delprop
+ \fi
+ }%
+}
\def\zref@ifpropundefined#1{%
\ltx@ifundefined{Z@E@#1}%
}
@@ -310,6 +418,77 @@
\expandafter\ZREF@label\expandafter{\the\toks@}{#1}%
\@esphack
}
+\ZREF@Robust\def\zref@labelbykv#1#2{%
+ \@bsphack
+ \begingroup
+ \let\Z@L@ZREF@temp\ltx@empty
+ \kvsetkeys{ZREF@LABEL}{#1}%
+ \ifZREF@immediate
+ \expandafter\zref@wrapper@immediate\expandafter{%
+ \expandafter\ZREF@label\expandafter{\Z@L@ZREF@temp}{#2}%
+ }%
+ \else
+ \expandafter\ZREF@label\expandafter{\Z@L@ZREF@temp}{#2}%
+ \fi
+ \endgroup
+ \@esphack
+}
+\kv@define@key{ZREF@LABEL}{prop}{%
+ \edef\ZREF@param{#1}%
+ \zref@propexists\ZREF@param{%
+ \zref@iflistcontainsprop{ZREF@temp}\ZREF@param{}{%
+ \begingroup\expandafter\endgroup
+ \expandafter\ltx@LocalAppendToMacro
+ \expandafter\Z@L@ZREF@temp
+ \expandafter{\csname\ZREF@param\endcsname}%
+ }%
+ }%
+}
+\kv@define@key{ZREF@LABEL}{list}{%
+ \zref@listforloop{#1}{%
+ \zref@iflistcontainsprop{ZREF@temp}\zref@prop{}{%
+ \begingroup\expandafter\endgroup
+ \expandafter\ltx@LocalAppendToMacro
+ \expandafter\Z@L@ZREF@temp
+ \expandafter{\csname\zref@prop\endcsname}%
+ }%
+ \ltx@gobble
+ }%
+}
+\kv@define@key{ZREF@LABEL}{delprop}{%
+ \zref@propexists{#1}{%
+ \zref@localdelprop{ZREF@temp}{#1}%
+ }%
+}
+\kv@define@key{ZREF@LABEL}{immediate}[true]{%
+ \edef\ZREF@param{#1}%
+ \ifx\ZREF@param\ZREF@true
+ \ZREF@immediatetrue
+ \else
+ \ifx\ZREF@param\ZREF@false
+ \ZREF@immediatefalse
+ \else
+ \PackageWarning\ZREF@name{%
+ Option `immediate' expects `true' or `false'.\MessageBreak
+ Ignoring invalid value `\ZREF@param'%
+ }%
+ \fi
+ \fi
+}
+\def\ZREF@false{false}
+\def\ZREF@true{true}
+\kv@define@key{ZREF@LABEL}{values}[]{%
+ \kv@parse{#1}{%
+ \ifx\kv@value\relax
+ \@PackageWarning\ZREF@name{%
+ Missing value for property `\kv@key'%
+ }%
+ \expandafter\ltx@gobbletwo
+ \else
+ \expandafter\zref@setcurrent
+ \fi
+ }%
+}
\newif\ifZREF@immediate
\ZREF@Robust{\long\def}\zref@wrapper@immediate#1{%
\begingroup
@@ -525,7 +704,22 @@
\zref@newlist\ZREF@mainlist
\zref@newprop{default}{\@currentlabel}
\zref@newprop*{page}{\thepage}
-\zref@addprop\ZREF@mainlist{default,page}
+\zref@addprops\ZREF@mainlist{default,page}
+\def\ZREF@NewPropAnchor{%
+ \zref@newprop{anchor}{%
+ \ltx@ifundefined{@currentHref}{}{\@currentHref}%
+ }%
+ \global\let\ZREF@NewPropAnchor\relax
+}
+\def\ZREF@NewPropTitle{%
+ \gdef\zref@titleref@current{}%
+ \zref@newprop{title}{\zref@titleref@current}%
+ \global\let\ZREF@NewPropTitle\relax
+}
+\def\ZREF@NewPropTheotype{%
+ \zref@newprop{theotype}{}%
+ \global\let\ZREF@NewPropTheotype\relax
+}
\let\ZREF@base@ok=Y
\endinput
%%