%% %% This is file `zref-base.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% zref.dtx (with options: `base') %% %% This is a generated file. %% %% Copyright (C) 2006-2010 by %% Heiko Oberdiek %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either %% version 1.3c of this license or (at your option) any later %% version. This version of this license is in %% http://www.latex-project.org/lppl/lppl-1-3c.txt %% and the latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status "maintained". %% %% This Current Maintainer of this work is Heiko Oberdiek. %% %% This work consists of the main source file zref.dtx %% 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-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)]% \RequirePackage{ltxcmds}[2010/03/01] \RequirePackage{infwarerr}[2010/04/08] \RequirePackage{kvsetkeys}[2010/03/01] \def\ZREF@name{zref} \ltx@IfUndefined{protected}{% \RequirePackage{makerobust}[2006/03/18]% \def\ZREF@Robust#1#2{% \def\ZREF@temp{\MakeRobustcommand#2}% \afterassignment\ZREF@temp #1#2% }% }{% \def\ZREF@Robust#1{% \protected#1% }% } \def\ZREF@IfDefinable#1#2#3{% \@ifdefinable{#1}{% \ZREF@Robust{#2}#1#3% }% } \def\ZREF@UpdatePdfTeX{Update pdfTeX.} \newif\ifZREF@found \def\ZREF@patch#1{% \ltx@IfUndefined{#1}{% \ltx@gobble }{% \expandafter\let\csname ZREF@org@#1\expandafter\endcsname \csname #1\endcsname \ltx@firstofone }% } \ltx@IfUndefined{eTeXversion}{% \PackageError\ZREF@name{% Missing support for eTeX; package is abandoned% }{% Use a TeX compiler that support eTeX and enable eTeX % in the format.% }% \endinput }{}% \RequirePackage{etexcmds}[2007/09/09] \ifetex@unexpanded \else \PackageError\ZREF@name{% Missing e-TeX's \string\unexpanded.\MessageBreak Add \string\RequirePackage\string{etexcmds\string} before % \string\documentclass% }{% Probably you are using some package (e.g. ConTeXt) that % redefines \string\unexpanded% }% \expandafter\endinput \fi \RequirePackage{auxhook} \AddLineBeginAux{% \string\providecommand\string\zref@newlabel[2]{}% } \def\ZREF@RefPrefix{Z@R} \ZREF@Robust\edef\zref@newlabel{% \noexpand\@newl@bel{\ZREF@RefPrefix}% } \ZREF@Robust\def\zref@newlist#1{% \zref@iflistundefined{#1}{% \@ifdefinable{Z@L@#1}{% \global\expandafter\let\csname Z@L@#1\endcsname\ltx@empty \PackageInfo\ZREF@name{New property list: #1}% }% }{% \PackageError\ZREF@name{% Property list `#1' already exists% }\@ehc }% } \def\zref@iflistundefined#1{% \ltx@ifundefined{Z@L@#1}% } \ZREF@Robust\def\zref@listexists#1{% \zref@iflistundefined{#1}{% \PackageError\ZREF@name{% Property list `#1' does not exist% }\@ehc }% } \ZREF@Robust\def\zref@iflistcontainsprop#1#2{% \zref@iflistundefined{#1}{% \ltx@secondoftwo }{% \begingroup\expandafter\endgroup \expandafter\in@ \csname#2\expandafter\expandafter\expandafter\endcsname \expandafter\expandafter\expandafter{\csname Z@L@#1\endcsname}% \csname ltx@\ifin@ first\else second\fi oftwo\endcsname }% } \def\zref@listforloop#1#2{% \zref@listexists{#1}{% \expandafter\expandafter\expandafter\@tfor \expandafter\expandafter\expandafter\zref@prop \expandafter\expandafter\expandafter:% \expandafter\expandafter\expandafter=% \csname Z@L@#1\endcsname \do{% \begingroup \escapechar=-1 % \edef\x{\endgroup \def\noexpand\zref@prop{% \expandafter\string\zref@prop }% }% \x #2\zref@prop }% }% } \ZREF@Robust\def\zref@addprop#1#2{% \zref@listexists{#1}{% \comma@parse{#2}{% \zref@propexists\comma@entry{% \zref@iflistcontainsprop{#1}\comma@entry{% \PackageWarning\ZREF@name{% Property `\comma@entry' is already in list `#1'% }% }{% \begingroup\expandafter\endgroup \expandafter\g@addto@macro \csname Z@L@#1\expandafter\endcsname \expandafter{\csname\comma@entry\endcsname}% }% }% \ltx@gobble }% }% } \ZREF@Robust\def\zref@localaddprop#1#2{% \zref@listexists{#1}{% \comma@parse{#2}{% \zref@propexists\comma@entry{% \zref@iflistcontainsprop{#1}\comma@entry{% \PackageWarning\ZREF@name{% Property `\comma@entry' is already in list `#1'% }% }{% \begingroup\expandafter\endgroup \expandafter\ltx@LocalAppendToMacro \csname Z@L@#1\expandafter\endcsname \expandafter{\csname\comma@entry\endcsname}% }% }% \ltx@gobble }% }% } \def\zref@ifpropundefined#1{% \ltx@ifundefined{Z@E@#1}% } \ZREF@Robust\def\zref@propexists#1{% \zref@ifpropundefined{#1}{% \PackageError\ZREF@name{% Property `#1' does not exist% }\@ehc }% } \ZREF@Robust\def\zref@newprop{% \@ifstar{% \let\ZREF@X\noexpand \ZREF@newprop }{% \let\ZREF@X\ltx@empty \ZREF@newprop }% } \def\ZREF@newprop#1{% \edef\ZREF@P{#1}% \@onelevel@sanitize\ZREF@P \begingroup \ifx\ZREF@P\ZREF@par \@PackageError\ZREF@name{% Invalid property name `\ZREF@P'% }{% The property name `par' is not allowed % because of internal reasons.% \MessageBreak \@ehc }% \def\ZREF@@newprop[##1]##2{\endgroup}% \else \zref@ifpropundefined\ZREF@P{% \endgroup \PackageInfo\ZREF@name{% New property: \ZREF@P }% }{% \@PackageError\ZREF@name{% Property `\ZREF@P' already exists% }\@ehc \def\ZREF@@newprop[##1]##2{\endgroup}% }% \fi \@ifnextchar[\ZREF@@newprop{\ZREF@@newprop[\zref@default]}% } \def\ZREF@par{par} \@onelevel@sanitize\ZREF@par \def\ZREF@@newprop[#1]{% \global\@namedef{Z@D@\ZREF@P}{#1}% \global\expandafter\let\csname Z@X@\ZREF@P\endcsname\ZREF@X \begingroup\expandafter\endgroup \expandafter\ZREF@@@newprop\csname\ZREF@P\endcsname \expandafter\gdef\csname Z@C@\ZREF@P\endcsname{}% \zref@setcurrent\ZREF@P } \def\ZREF@@@newprop#1{% \expandafter \gdef\csname Z@E@\ZREF@P\endcsname##1#1##2##3\ZREF@nil{##2}% } \ZREF@Robust\def\zref@setcurrent#1#2{% \zref@propexists{#1}{% \expandafter\def\csname Z@C@#1\endcsname{#2}% }% } \def\ZREF@getcurrent#1{% \romannumeral0% \ltx@ifundefined{Z@C@#1}{% \ltx@space }{% \expandafter\expandafter\expandafter\ltx@space \csname Z@C@#1\endcsname }% } \def\ZREF@wu@getcurrent#1{% \etex@unexpanded\expandafter\expandafter\expandafter{% \ZREF@getcurrent{#1}% }% } \let\zref@getcurrent\ZREF@getcurrent \ZREF@Robust\def\zref@label#1{% \zref@labelbylist{#1}\ZREF@mainlist } \ZREF@Robust\def\zref@labelbylist#1#2{% \@bsphack \zref@listexists{#2}{% \expandafter\expandafter\expandafter\ZREF@label \expandafter\expandafter\expandafter{% \csname Z@L@#2\endcsname }{#1}% }% \@esphack } \ZREF@Robust\def\zref@labelbyprops#1#2{% \@bsphack \begingroup \toks@{}% \comma@parse{#2}{% \zref@ifpropundefined\comma@entry{% \PackageWarning\ZREF@name{% Property `\comma@entry' is not known% }% }{% \toks@\expandafter{% \the\expandafter\toks@\csname\comma@entry\endcsname }% }% \ltx@gobble }% \expandafter\endgroup \expandafter\ZREF@label\expandafter{\the\toks@}{#1}% \@esphack } \newif\ifZREF@immediate \ZREF@Robust{\long\def}\zref@wrapper@immediate#1{% \begingroup \ZREF@immediatetrue \let\ZREF@org@write\write \def\write{\immediate\ZREF@org@write}% #1% \endgroup } \def\ZREF@label#1#2{% \if@filesw \begingroup \ifZREF@immediate \let\ZREF@org@thepage\thepage \fi \protected@write\@auxout{% \ifZREF@immediate \let\thepage\ZREF@org@thepage \fi \let\ZREF@temp\ltx@empty \@tfor\ZREF@P:=#1\do{% \begingroup \escapechar=-1 % \edef\x{\endgroup \def\noexpand\ZREF@P{% \expandafter\string\ZREF@P }% }% \x \expandafter\ifx \csname \ifZREF@immediate relax% \else Z@X@\ZREF@P% \fi \endcsname \noexpand \expandafter\let\csname Z@C@\ZREF@P\endcsname\relax \fi \toks@\expandafter{\ZREF@temp}% \edef\ZREF@temp{% \the\toks@ \ltx@backslashchar\ZREF@P{% \expandafter\noexpand\csname Z@C@\ZREF@P\endcsname }% }% }% }{% \string\zref@newlabel{#2}{\ZREF@temp}% }% \endgroup \fi } \def\ZREF@addtoks#1{% \toks@\expandafter\expandafter\expandafter{% \expandafter\the\expandafter\toks@#1% }% } \def\zref@ifrefundefined#1{% \ltx@ifundefined{Z@R@#1}% } \ZREF@IfDefinable\zifrefundefined\def{% #1{% \zref@wrapper@babel\ZREF@ifrefundefined{#1}% }% } \def\ZREF@ifrefundefined#1{% \zref@refused{#1}% \zref@ifrefundefined{#1}% } \ZREF@Robust\def\zref@refused#1{% \zref@wrapper@babel\ZREF@refused{#1}% } \def\ZREF@refused#1{% \zref@ifrefundefined{#1}{% \protect\G@refundefinedtrue \@latex@warning{% Reference `#1' on page \thepage \space undefined% }% }{}% } \def\zref@ifrefcontainsprop#1#2{% \zref@ifrefundefined{#1}{% \ltx@secondoftwo }{% \expandafter\ZREF@ifrefcontainsprop \csname Z@E@#2\expandafter\endcsname \csname#2\expandafter\expandafter\expandafter\endcsname \expandafter\expandafter\expandafter{% \csname Z@R@#1\endcsname }% }% } \def\ZREF@ifrefcontainsprop#1#2#3{% \expandafter\ifx\expandafter\ZREF@novalue #1#3#2\ZREF@novalue\ZREF@nil\ltx@empty \expandafter\ltx@secondoftwo \else \expandafter\ltx@firstoftwo \fi } \def\ZREF@novalue{\ZREF@NOVALUE} \def\ZREF@extract#1#2{% \romannumeral0% \ltx@ifundefined{Z@D@#2}{% \expandafter\ltx@space\zref@default }{% \expandafter\expandafter\expandafter\ZREF@@extract \expandafter\expandafter\expandafter{% \csname Z@D@#2\endcsname }{#1}{#2}% }% } \def\ZREF@@extract#1#2#3{% \expandafter\expandafter\expandafter\ltx@space \zref@extractdefault{#2}{#3}{#1}% } \def\ZREF@wu@extract#1#2{% \etex@unexpanded\expandafter\expandafter\expandafter{% \ZREF@extract{#1}{#2}% }% } \let\zref@extract\ZREF@extract \def\ZREF@extractdefault#1#2#3{% \romannumeral0% \zref@ifrefundefined{#1}\ltx@firstoftwo{% \zref@ifpropundefined{#2}\ltx@firstoftwo\ltx@secondoftwo }{% \ltx@space #3% }{% \expandafter\expandafter\expandafter\ltx@space \csname Z@E@#2\expandafter\expandafter\expandafter\endcsname \csname Z@R@#1\expandafter\endcsname \csname#2\endcsname{#3}\ZREF@nil }% } \def\ZREF@wu@extractdefault#1#2#3{% \etex@unexpanded\expandafter\expandafter\expandafter{% \ZREF@extractdefault{#1}{#2}{#3}% }% } \let\zref@extractdefault\ZREF@extractdefault \ZREF@Robust{\long\def}\ZREF@wrapper@unexpanded#1{% \let\zref@wrapper@unexpanded\ltx@firstofone \let\zref@getcurrent\ZREF@wu@getcurrent \let\zref@extractdefault\ZREF@wu@extractdefault \let\zref@extract\ZREF@wu@extract #1% \let\zref@wrapper@unexpanded\ZREF@wrapper@unexpanded \let\zref@getcurrent\ZREF@getcurrent \let\zref@extractdefault\ZREF@extractdefault \let\zref@extract\ZREF@extract } \ltx@IfUndefined{etex@unexpanded}{% \let\zref@wrapper@unexpanded\ltx@firstofone }{% \let\zref@wrapper@unexpanded\ZREF@wrapper@unexpanded } \ZREF@Robust{\long\def}\zref@wrapper@babel#1#2{% \ifcsname if@safe@actives\endcsname \expandafter\ltx@firstofone \else \expandafter\ltx@secondoftwo \fi {% \if@safe@actives \expandafter\ltx@secondoftwo \else \expandafter\ltx@firstoftwo \fi {% \begingroup \csname @safe@activestrue\endcsname \edef\x{#2}% \expandafter\endgroup \expandafter\ZREF@wrapper@babel\expandafter{\x}{#1}% }% }{% #1{#2}% }% } \long\def\ZREF@wrapper@babel#1#2{% #2{#1}% } \ZREF@Robust\def\zref@require@unique{% \@ifundefined{c@zref@unique}{% \begingroup \let\@addtoreset\ltx@gobbletwo \newcounter{zref@unique}% \endgroup \renewcommand*{\thezref@unique}{% zref@\number\c@zref@unique }% }{}% } \ltx@IfUndefined{numexpr}{% \let\ZREF@number\number }{% \def\ZREF@number#1{\the\numexpr#1}% } \ZREF@Robust\def\zref@setdefault#1{% \def\zref@default{#1}% } \zref@setdefault{% \nfss@text{\reset@font\bfseries ??}% } \ZREF@Robust\def\zref@setmainlist#1{% \def\ZREF@mainlist{#1}% } \zref@setmainlist{main} \zref@newlist\ZREF@mainlist \zref@newprop{default}{\@currentlabel} \zref@newprop*{page}{\thepage} \zref@addprop\ZREF@mainlist{default,page} \let\ZREF@base@ok=Y \endinput %% %% End of file `zref-base.sty'.