diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/zref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/zref.dtx | 668 |
1 files changed, 513 insertions, 155 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/zref.dtx b/Master/texmf-dist/source/latex/oberdiek/zref.dtx index dfeab3aaf88..0e4722b16bc 100644 --- a/Master/texmf-dist/source/latex/oberdiek/zref.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/zref.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% 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 @@ -21,12 +21,12 @@ % 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. @@ -68,6 +68,7 @@ % TDS:tex/latex/oberdiek/zref-abspos.sty % TDS:tex/latex/oberdiek/zref-counter.sty % TDS:tex/latex/oberdiek/zref-dotfill.sty +% TDS:tex/latex/oberdiek/zref-env.sty % TDS:tex/latex/oberdiek/zref-hyperref.sty % TDS:tex/latex/oberdiek/zref-lastpage.sty % TDS:tex/latex/oberdiek/zref-marks.sty @@ -107,7 +108,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: zref 2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)} +\Msg{* Package: zref 2011/03/18 v2.21 New reference scheme for LaTeX2e (HO)} \Msg{************************************************************************} \keepsilent @@ -118,7 +119,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 @@ -139,12 +140,12 @@ 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-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. @@ -162,6 +163,7 @@ and the derived files \file{zref-abspos.sty}{\from{zref.dtx}{abspos}}% \file{zref-counter.sty}{\from{zref.dtx}{counter}}% \file{zref-dotfill.sty}{\from{zref.dtx}{dotfill}}% + \file{zref-env.sty}{\from{zref.dtx}{env}}% \file{zref-hyperref.sty}{\from{zref.dtx}{hyperref}}% \file{zref-lastpage.sty}{\from{zref.dtx}{lastpage}}% \file{zref-marks.sty}{\from{zref.dtx}{marks}}% @@ -195,12 +197,12 @@ and the derived files \Msg{* files into a directory searched by TeX:} \Msg{*} \Msg{* zref.sty, zref-base.sty, zref-abspage.sty, zref-abspos.sty,} -\Msg{* zref-counter.sty, zref-dotfill.sty, zref-hyperref.sty,} -\Msg{* zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,} -\Msg{* zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,} -\Msg{* zref-runs.sty, zref-savepos.sty, zref-thepage.sty,} -\Msg{* zref-titleref.sty, zref-totpages.sty, zref-user.sty,} -\Msg{* zref-xr.sty} +\Msg{* zref-counter.sty, zref-dotfill.sty, zref-env.sty,} +\Msg{* zref-hyperref.sty, zref-lastpage.sty, zref-marks.sty,} +\Msg{* zref-nextpage.sty, zref-pageattr.sty, zref-pagelayout.sty,} +\Msg{* zref-perpage.sty, zref-runs.sty, zref-savepos.sty,} +\Msg{* zref-thepage.sty, zref-titleref.sty, zref-totpages.sty,} +\Msg{* zref-user.sty, zref-xr.sty} \Msg{*} \Msg{* And install the following script file:} \Msg{*} @@ -221,7 +223,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{zref.drv}% - [2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)]% + [2011/03/18 v2.21 New reference scheme for LaTeX2e (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] \setlength{\emergencystretch}{1em} @@ -231,7 +233,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{3166} +% \CheckSum{3468} % % \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 @@ -252,7 +254,7 @@ and the derived files % \GetFileInfo{zref.drv} % % \title{The \xpackage{zref} package} -% \date{2010/05/01 v2.17} +% \date{2011/03/18 v2.21} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -910,13 +912,13 @@ and the derived files \newcounter{foo} \renewcommand*{\thefoo}{\Alph{foo}} -\usepackage{zref-lastpage,zref-user}[2010/05/01] +\usepackage{zref-lastpage,zref-user}[2011/03/18] \makeatletter \zref@newprop{thefoo}{\thefoo} \zref@newprop{valuefoo}{\the\value{foo}} \zref@newprop{chapter}{\thechapter} -\zref@addprop{LastPage}{thefoo,valuefoo,chapter} +\zref@addprops{LastPage}{thefoo,valuefoo,chapter} \makeatother \newcommand*{\foo}{% @@ -1024,7 +1026,7 @@ and the derived files %<<END_EXAMPLE \documentclass{book} -\usepackage{zref-nextpage}[2010/05/01] +\usepackage{zref-nextpage}[2011/03/18] \znextpagesetup {\thepage}% next page is unknown {\thepage\ (#1)}% this page is last page @@ -1120,7 +1122,7 @@ and the derived files % \end{declcs} % At the end of document the page layout parameter for each page are % printed into the \xext{log} file if macro \cs{zlistpagelayout} -% is called. +% is called before |\end{document}| (preamble is a good place). % % \subsection{Module \xmodule{marks}} % @@ -1254,8 +1256,9 @@ and the derived files % \begin{declcs}{zsavepos} % \M{refname} % \end{declcs} -% It generates a reference with name \meta{refname} to -% the location where the command is executed. +% It generates a reference with name \meta{refname}. +% The reference stores the location where \cs{zsavepos} +% is executed in properties |posx| and |posy|. % % \begin{declcs}{zposx}\markexp % \M{refname}\\ @@ -1280,6 +1283,16 @@ and the derived files % and \cs{pdflastypos}. They are available in PDF mode and % since version 1.40.0 also in DVI mode. % +% \begin{declcs}{zref@savepos} +% \end{declcs} +% Macro \cs{zref@savepos} performs the first part of \cs{zsavepos} +% by calling \cs{pdfsavepos} (if \xext{aux} files are writable). +% +% Thus \cs{zsavepos} is basically \cs{zref@savepos} followed +% by |\zreflabelbylist{|\texttt{\meta{refname}}|}{savepos}|. +% The property list |savepos| contains the properties |posx| +% and |posy|. +% % \subsection{Module \xmodule{dotfill}} % % \begin{declcs}{zdotfill} @@ -1306,6 +1319,12 @@ and the derived files % the dot in \cs{dotfill}). % \end{description} % +% \subsection{Module \xmodule{env}} +% +% This module defines two properties |envname| and |envline|. They +% remember the name of the environment and the line number at +% the start of the environment. +% % \subsection{Module \xmodule{xr}} % % This package provides the functionality of package \xpackage{xr}, @@ -1566,13 +1585,13 @@ the height difference of the two baselines is %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref} - [2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)]% + [2011/03/18 v2.21 New reference scheme for LaTeX2e (HO)]% % \end{macrocode} % % \subsubsection{Load basic module} % % \begin{macrocode} -\RequirePackage{zref-base}[2010/05/01] +\RequirePackage{zref-base}[2011/03/18] % \end{macrocode} % Abort package loading if \xpackage{zref-base} could not be % loaded successfully. @@ -1587,7 +1606,7 @@ the height difference of the two baselines is \def\ZREF@temp#1{% \DeclareOption{#1}{% \AtEndOfPackage{% - \RequirePackage{zref-#1}[2010/05/01]% + \RequirePackage{zref-#1}[2011/03/18]% }% }% } @@ -1653,7 +1672,7 @@ the height difference of the two baselines is %<*base> \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)]% % \end{macrocode} % % \subsubsection{Utilities} @@ -1662,6 +1681,8 @@ the height difference of the two baselines is \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] % \end{macrocode} % % \begin{macro}{\ZREF@name} @@ -1896,12 +1917,12 @@ the height difference of the two baselines is % \end{macrocode} % \end{macro} % -% \begin{macro}{\zref@addprop} -% \cs{zref@addprop} adds the property \verb|#2| to the property +% \begin{macro}{\zref@addprops} +% \cs{zref@addprop} adds the properties \verb|#2| to the property % list \verb|#1|, if the property is not already in the list. % Otherwise a warning is given. % \begin{macrocode} -\ZREF@Robust\def\zref@addprop#1#2{% +\ZREF@Robust\def\zref@addprops#1#2{% \zref@listexists{#1}{% \comma@parse{#2}{% \zref@propexists\comma@entry{% @@ -1922,10 +1943,33 @@ the height difference of the two baselines is } % \end{macrocode} % \end{macro} +% \begin{macro}{\zref@addprop} +% \cs{zref@addprop} adds the property \verb|#2| to the property +% list \verb|#1|, if the property is not already in the list. +% Otherwise a warning is given. +% \begin{macrocode} +\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}% + }% + }% + }% +} +% \end{macrocode} +% \end{macro} % -% \begin{macro}{\zref@localaddprop} +% \begin{macro}{\zref@localaddprops} % \begin{macrocode} -\ZREF@Robust\def\zref@localaddprop#1#2{% +\ZREF@Robust\def\zref@localaddprops#1#2{% \zref@listexists{#1}{% \comma@parse{#2}{% \zref@propexists\comma@entry{% @@ -1946,6 +1990,148 @@ the height difference of the two baselines is } % \end{macrocode} % \end{macro} +% \begin{macro}{\zref@localaddprop} +% \begin{macrocode} +\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}% + }% + }% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\ltx@IfUndefined{pdf@strcmp}{% +% \end{macrocode} +% \begin{macro}{\zref@delprop} +% \begin{macrocode} + \ZREF@Robust\def\zref@delprop{% + \ZREF@delprop\gdef + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\zref@localdelprop} +% \begin{macrocode} + \ZREF@Robust\def\zref@localdelprop{% + \ZREF@delprop\def + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@delprop} +% \begin{macrocode} + \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@ + }% + }% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@@delprop} +% \begin{macrocode} + \def\ZREF@@delprop#1{% + \expandafter\ZREF@@@delprop\expandafter{\string#1}#1% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@@@delprop} +% \begin{macrocode} + \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 + }% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +}{% +% \end{macrocode} +% \begin{macro}{\zref@delprop} +% \begin{macrocode} + \ZREF@Robust\def\zref@delprop{% + \ZREF@delprop\xdef + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\zref@localdelprop} +% \begin{macrocode} + \ZREF@Robust\def\zref@localdelprop{% + \ZREF@delprop\edef + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@delprop} +% \begin{macrocode} + \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 + }% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@@delprop} +% Caution: |#1| might be an \cs{if} or similar token. +% \begin{macrocode} + \def\ZREF@@delprop#1{% + \expandafter\ZREF@@@delprop\expandafter{\string#1}#1% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@@@delprop} +% \begin{macrocode} + \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 + }% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +} +% \end{macrocode} % % \subsubsection{Properties} % @@ -2152,6 +2338,94 @@ the height difference of the two baselines is } % \end{macrocode} % \end{macro} +% \begin{macro}{\zref@labelbykv} +% \begin{macrocode} +\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 +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\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 +} +% \end{macrocode} +% \begin{macro}{\ZREF@false} +% \begin{macrocode} +\def\ZREF@false{false} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@true} +% \begin{macrocode} +\def\ZREF@true{true} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\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 + }% +} +% \end{macrocode} % % \begin{macro}{\ifZREF@immediate} % The switch \cs{ifZREF@immediate} tells us, whether the @@ -2571,9 +2845,44 @@ the height difference of the two baselines is % \begin{macrocode} \zref@newprop{default}{\@currentlabel} \zref@newprop*{page}{\thepage} -\zref@addprop\ZREF@mainlist{default,page} +\zref@addprops\ZREF@mainlist{default,page} % \end{macrocode} % +% \paragraph{Properties} +% +% \begin{macro}{\ZREF@NewPropAnchor} +% \begin{macrocode} +\def\ZREF@NewPropAnchor{% + \zref@newprop{anchor}{% + \ltx@ifundefined{@currentHref}{}{\@currentHref}% + }% + \global\let\ZREF@NewPropAnchor\relax +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\zref@titleref@current} +% Later we will redefine the section and caption macros +% to catch the current title and remember the value in +% \cs{zref@titleref@current}. +% \begin{macro}{\ZREF@NewPropTitle} +% \begin{macrocode} +\def\ZREF@NewPropTitle{% + \gdef\zref@titleref@current{}% + \zref@newprop{title}{\zref@titleref@current}% + \global\let\ZREF@NewPropTitle\relax +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\ZREF@NewPropTheotype} +% \begin{macrocode} +\def\ZREF@NewPropTheotype{% + \zref@newprop{theotype}{}% + \global\let\ZREF@NewPropTheotype\relax +} +% \end{macrocode} +% \end{macro} +% % \paragraph{Mark successful loading} % % \begin{macrocode} @@ -2588,8 +2897,8 @@ the height difference of the two baselines is %<*user> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-user}% - [2010/05/01 v2.17 Module user for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module user for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -2619,6 +2928,17 @@ the height difference of the two baselines is % \end{macrocode} % \end{macro} % +% \begin{macro}{\zkvlabel} +% \begin{macrocode} +\newcommand*{\zkvlabel}[1]{% + \ifx\label\ltx@gobble + \expandafter\ltx@gobblethree + \fi + \zref@wrapper@babel{\zref@labelbykv{#1}}% +}% +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\zref} % Macro \cs{zref} is the corresponding macro for \cs{ref}. % Also it provides an optional argument in order to @@ -2668,8 +2988,8 @@ the height difference of the two baselines is %<*abspage> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-abspage}% - [2010/05/01 v2.17 Module abspage for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module abspage for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -2716,8 +3036,8 @@ the height difference of the two baselines is %<*counter> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-counter}% - [2010/05/01 v2.17 Module counter for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module counter for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -2756,9 +3076,9 @@ the height difference of the two baselines is %<*lastpage> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-lastpage}% - [2010/05/01 v2.17 Module lastpage for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] -\RequirePackage{zref-abspage}[2010/05/01] + [2011/03/18 v2.21 Module lastpage for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] +\RequirePackage{zref-abspage}[2011/03/18] \RequirePackage{atveryend}[2009/12/07] \ifx\ZREF@base@ok Y% \else @@ -2828,8 +3148,8 @@ the height difference of the two baselines is %<*thepage> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-thepage}% - [2010/05/01 v2.17 Module thepage for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module thepage for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -2838,7 +3158,7 @@ the height difference of the two baselines is % % \begin{macrocode} \RequirePackage{atbegshi} -\RequirePackage{zref-abspage}[2010/05/01] +\RequirePackage{zref-abspage}[2011/03/18] % \end{macrocode} % \begin{macrocode} \zref@newlist{thepage} @@ -2893,8 +3213,8 @@ the height difference of the two baselines is %<*nextpage> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-nextpage}% - [2010/05/01 v2.17 Module nextpage for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module nextpage for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -2902,9 +3222,9 @@ the height difference of the two baselines is % \end{macrocode} % % \begin{macrocode} -\RequirePackage{zref-abspage}[2010/05/01] -\RequirePackage{zref-thepage}[2010/05/01] -\RequirePackage{zref-lastpage}[2010/05/01] +\RequirePackage{zref-abspage}[2011/03/18] +\RequirePackage{zref-thepage}[2011/03/18] +\RequirePackage{zref-lastpage}[2011/03/18] \RequirePackage{uniquecounter}[2009/12/18] % \end{macrocode} % \begin{macrocode} @@ -2997,8 +3317,8 @@ the height difference of the two baselines is %<*totpages> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-totpages}% - [2010/05/01 v2.17 Module totpages for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module totpages for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -3008,8 +3328,8 @@ the height difference of the two baselines is % The absolute page number of the last page is the total % page number. % \begin{macrocode} -\RequirePackage{zref-abspage}[2010/05/01] -\RequirePackage{zref-lastpage}[2010/05/01] +\RequirePackage{zref-abspage}[2011/03/18] +\RequirePackage{zref-lastpage}[2011/03/18] % \end{macrocode} % % \begin{macro}{\ztotpages} @@ -3039,8 +3359,8 @@ the height difference of the two baselines is %<*pagelayout> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-pagelayout}% - [2010/05/01 v2.17 Module pagelayout for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module pagelayout for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -3048,7 +3368,7 @@ the height difference of the two baselines is % \end{macrocode} % % \begin{macrocode} -\RequirePackage{zref-thepage}[2010/05/01] +\RequirePackage{zref-thepage}[2011/03/18] \RequirePackage{ifluatex}[2010/03/01] \RequirePackage{atveryend}[2010/03/24] % \end{macrocode} @@ -3133,7 +3453,7 @@ the height difference of the two baselines is % \begin{macro}{\zref@listpagelayout} % \begin{macrocode} \ZREF@IfDefinable\zlistpagelayout\def{% - {\ZREF@pl@listtrue}% + {\global\ZREF@pl@listtrue}% } % \end{macrocode} % \end{macro} @@ -3148,7 +3468,7 @@ the height difference of the two baselines is \ZREF@org@testdef{##1}{##2}{##3}% \def\ZREF@temp{##1}% \ifx\ZREF@temp\ZREF@RefPrefix - \expandafter\xdef\csname##1@##2\endcsname{##3}% + \expandafter\gdef\csname##1@##2\endcsname{##3}% \fi }% }{}% @@ -3247,8 +3567,8 @@ the height difference of the two baselines is %<*pageattr> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-pageattr}% - [2010/05/01 v2.17 Module pageattr for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module pageattr for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -3298,7 +3618,7 @@ the height difference of the two baselines is \def\zref@pdfpageattr#1{}% \def\zref@pdfpageattr@used#1{}% }{% - \RequirePackage{zref-thepage}[2010/05/01]% + \RequirePackage{zref-thepage}[2011/03/18]% \zref@newprop*{pdfpageattr}[]{\zref@hex{\the\pdfpageattr}}% \zref@addprop{thepage}{pdfpageattr}% \let\ZREF@temp=Y% @@ -3310,7 +3630,7 @@ the height difference of the two baselines is \def\zref@pdfpagesattr{}% \def\zref@pdfpagesattr@used{}% }{% - \RequirePackage{zref-lastpage}[2010/05/01]% + \RequirePackage{zref-lastpage}[2011/03/18]% \zref@newprop*{pdfpagesattr}[]{\zref@hex{\the\pdfpagesattr}}% \zref@addprop{LastPage}{pdfpagesattr}% \let\ZREF@temp=Y% @@ -3322,7 +3642,7 @@ the height difference of the two baselines is \fi % \end{macrocode} % \begin{macrocode} -\RequirePackage{zref-abspage}[2010/05/01] +\RequirePackage{zref-abspage}[2011/03/18] \RequirePackage{atveryend}[2010/03/24] \RequirePackage{pdftexcmds}[2010/04/01] \let\ZREF@temp=Y% @@ -3472,8 +3792,8 @@ the height difference of the two baselines is %<*marks> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-marks}% - [2010/05/01 v2.17 Module marks for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module marks for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -3481,7 +3801,6 @@ the height difference of the two baselines is % \end{macrocode} % % \begin{macrocode} -\RequirePackage{kvsetkeys}[2009/07/30] \newcommand*{\zref@marks@register}[3][]{% \edef\ZREF@TempName{#1}% \edef\ZREF@TempNum{\ZREF@number#2}% @@ -3579,7 +3898,7 @@ the height difference of the two baselines is %<*runs> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-runs}% - [2010/05/01 v2.17 Module runs for zref (HO)]% + [2011/03/18 v2.21 Module runs for zref (HO)]% % \end{macrocode} % % \begin{macro}{\zruns} @@ -3611,8 +3930,8 @@ the height difference of the two baselines is %<*perpage> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-perpage}% - [2010/05/01 v2.17 Module perpage for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module perpage for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -3627,7 +3946,7 @@ the height difference of the two baselines is % For detecting changed pages module \xmodule{abspage} % is loaded. % \begin{macrocode} -\RequirePackage{zref-abspage}[2010/05/01] +\RequirePackage{zref-abspage}[2011/03/18] % \end{macrocode} % % We group the properties for the needed references @@ -3636,7 +3955,7 @@ the height difference of the two baselines is % \begin{macrocode} \zref@newprop*{pagevalue}[0]{\number\c@page} \zref@newlist{perpage} -\zref@addprop{perpage}{abspage,page,pagevalue} +\zref@addprops{perpage}{abspage,page,pagevalue} % \end{macrocode} % The page value, known by the reference mechanism, will be % stored in counter |zpage|. @@ -3778,8 +4097,8 @@ the height difference of the two baselines is %<*titleref> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-titleref}% - [2010/05/01 v2.17 Module titleref for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module titleref for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -3796,18 +4115,10 @@ the height difference of the two baselines is % for the reference system. It uses some of the ideas % of package \xpackage{nameref} and \xpackage{titleref}. % -% \begin{macro}{\zref@titleref@current} -% Later we will redefine the section and caption macros -% to catch the current title and remember the value in -% \cs{zref@titleref@current}. -% \begin{macrocode} -\let\zref@titleref@current\ltx@empty -% \end{macrocode} -% \end{macro} % Now we can add the property \verb|title| is added to % the main property list. % \begin{macrocode} -\zref@newprop{title}{\zref@titleref@current}% +\ZREF@NewPropTitle \zref@addprop\ZREF@mainlist{title}% % \end{macrocode} % @@ -3936,7 +4247,7 @@ the height difference of the two baselines is \def\zref@titleref@current{#1}% }% \ZREF@IfDefinable\ztitlerefsetup\def{% - {\setkeys{ZREF@TR}}% + {\kvsetkeys{ZREF@TR}}% }% % \end{macrocode} % \end{macro} @@ -4188,8 +4499,8 @@ the height difference of the two baselines is %<*xr> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-xr}% - [2010/05/01 v2.17 Module xr for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module xr for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -4211,39 +4522,6 @@ the height difference of the two baselines is \zref@newprop{externaldocument}{}% % \end{macrocode} % -% \begin{macro}{\ZREF@xr@NewPropAnchor} -% \begin{macrocode} -\def\ZREF@xr@NewPropAnchor{% - \ltx@ifpackageloaded{zref-hyper}{% - }{% - \zref@newprop{anchor}{% - \ltx@ifundefined{@currentHref}{}{\@currentHref}% - }% - }% - \global\let\ZREF@xr@NewPropAnchor\relax -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ZREF@xr@NewPropTitle} -% \begin{macrocode} -\def\ZREF@xr@NewPropTitle{% - \ltx@ifpackageloaded{zref-title}{% - }{% - \zref@newprop{title}{}% - }% - \global\let\ZREF@xr@NewPropTitle\relax -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ZREF@xr@NewPropTheotype} -% \begin{macrocode} -\def\ZREF@xr@NewPropTheotype{% - \zref@newprop{theotype}{}% - \global\let\ZREF@xr@NewPropTheotype -} -% \end{macrocode} -% \end{macro} -% % Most code, especially the handling of the \xfile{.aux} % files are taken from David Carlisle's \xpackage{xr} package. % Therefore I drop the documentation for these macros here. @@ -4281,7 +4559,7 @@ the height difference of the two baselines is % \begin{macro}{\zxrsetup} % \begin{macrocode} \newcommand*{\zxrsetup}{% - \setkeys{ZREF@XR}% + \kvsetkeys{ZREF@XR}% }% % \end{macrocode} % \end{macro} @@ -4336,8 +4614,8 @@ the height difference of the two baselines is % \begin{macrocode} \ZREF@IfDefinable\zexternaldocument\def{% {% - \ZREF@xr@NewPropAnchor - \ZREF@xr@NewPropTitle + \ZREF@NewPropAnchor + \ZREF@NewPropTitle \begingroup \csname @safe@actives@true\endcsname \makeatletter @@ -4538,7 +4816,7 @@ the height difference of the two baselines is \ifx\\#4\\% \else % ntheorem knows an optional argument at the end of \newlabel - \ZREF@xr@NewPropTheotype + \ZREF@NewPropTheotype \expandafter\ltx@LocalAppendToMacro \csname\ZREF@xr@temprefname\endcsname{\theotype{#4}}% \fi @@ -4621,8 +4899,8 @@ the height difference of the two baselines is Zref label `#1' is already in use\MessageBreak in file `\ZREF@xr@file'% }% - \edef\ZREF@xr@ignored@empty{% - \the\numexpr\ZREF@xr@ignored+1% + \edef\ZREF@xr@ignored@zref{% + \the\numexpr\ZREF@xr@ignored@zref+1% }% }% % \end{macrocode} @@ -4757,8 +5035,8 @@ the height difference of the two baselines is %<*hyperref> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-hyperref}% - [2010/05/01 v2.17 Module hyperref for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module hyperref for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -4766,11 +5044,7 @@ the height difference of the two baselines is % \end{macrocode} % % \begin{macrocode} -\ltx@ifpackageloaded{zref-xr}{}{% - \zref@newprop{anchor}[]{% - \ltx@ifundefined{@currentHref}{}{\@currentHref}% - }% -} +\ZREF@NewPropAnchor \zref@addprop\ZREF@mainlist{anchor}% % \end{macrocode} % @@ -4791,8 +5065,8 @@ the height difference of the two baselines is %<*savepos> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-savepos}% - [2010/05/01 v2.17 Module savepos for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module savepos for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -4839,11 +5113,21 @@ the height difference of the two baselines is \zref@newlist{savepos} \zref@newprop*{posx}[0]{\the\pdflastxpos} \zref@newprop*{posy}[0]{\the\pdflastypos} -\zref@addprop{savepos}{posx,posy} +\zref@addprops{savepos}{posx,posy} % \end{macrocode} % % \subsubsection{User macros} % +% \begin{macro}{\zref@savepos} +% \begin{macrocode} +\def\zref@savepos{% + \if@filesw + \pdfsavepos + \fi +} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\zsavepos} % The current location is stored in a reference with the % given name. @@ -4852,7 +5136,7 @@ the height difference of the two baselines is #1{% \@bsphack \if@filesw - \pdfsavepos + \zref@savepos \zref@labelbylist{#1}{savepos}% \fi \@esphack @@ -4906,8 +5190,8 @@ the height difference of the two baselines is %<*abspos> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-abspos}% - [2010/05/01 v2.17 Module abspos for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module abspos for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -4915,14 +5199,14 @@ the height difference of the two baselines is % \end{macrocode} % % \begin{macrocode} -\RequirePackage{zref-savepos}[2010/05/01] +\RequirePackage{zref-savepos}[2011/03/18] \ifx\ZREF@savepos@ok Y% \else \expandafter\endinput \fi % \end{macrocode} % \begin{macrocode} -\RequirePackage{zref-pagelayout}[2010/05/01] +\RequirePackage{zref-pagelayout}[2011/03/18] \zref@addprop{savepos}{abspage} % \end{macrocode} % @@ -4937,8 +5221,8 @@ the height difference of the two baselines is %<*dotfill> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-dotfill}% - [2010/05/01 v2.17 Module dotfill for zref (HO)]% -\RequirePackage{zref-base}[2010/05/01] + [2011/03/18 v2.21 Module dotfill for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] \ifx\ZREF@base@ok Y% \else \expandafter\endinput @@ -4948,7 +5232,7 @@ the height difference of the two baselines is % For measuring the width of \cs{zdotfill} we use the features % provided by module \xmodule{savepos}. % \begin{macrocode} -\RequirePackage{zref-savepos}[2010/05/01] +\RequirePackage{zref-savepos}[2011/03/18] % \end{macrocode} % For automatically generated label names we use the unique % counter of module \xmodule{base}. @@ -4981,7 +5265,7 @@ the height difference of the two baselines is % \begin{macro}{\zdotfillsetup} % Configuration of \cs{zdotfill} is done by \cs{zdotfillsetup}. % \begin{macrocode} -\newcommand*{\zdotfillsetup}{\setkeys{ZREF@DF}} +\newcommand*{\zdotfillsetup}{\kvsetkeys{ZREF@DF}} % \end{macrocode} % \end{macro} % @@ -5031,6 +5315,49 @@ the height difference of the two baselines is %</dotfill> % \end{macrocode} % +% \subsection{Module \xmodule{env}} +% +% \begin{macrocode} +%<*env> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{zref-env}% + [2011/03/18 v2.21 Module env for zref (HO)]% +\RequirePackage{zref-base}[2011/03/18] +\ifx\ZREF@base@ok Y% +\else + \expandafter\endinput +\fi +% \end{macrocode} +% +% \begin{macrocode} +\zref@newprop{envname}[]{\@currenvir} +\zref@newprop{envline}[]{\zref@env@line} +% \end{macrocode} +% +% \begin{macro}{\zref@env@line} +% Macro \cs{zref@env@line} extracts the line number +% from \cs{@currenvline}. +% \begin{macrocode} +\def\zref@env@line{% + \ifx\@currenvline\ltx@empty + \else + \expandafter + \ZREF@ENV@line\@currenvline\ltx@empty line \ltx@empty\@nil + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ZREF@ENV@line} +% \begin{macrocode} +\def\ZREF@ENV@line#1line #2\ltx@empty#3\@nil{#2}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</env> +% \end{macrocode} +% +% % \section{Test} % % \subsection{\cs{zref@localaddprop}} @@ -5040,7 +5367,7 @@ the height difference of the two baselines is \NeedsTeXFormat{LaTeX2e} \nofiles \documentclass{article} -\usepackage{zref-base}[2010/05/01] +\usepackage{zref-base}[2011/03/18] \usepackage{qstest} \IncludeTests{*} \LogTests{log}{*}{*} @@ -5080,7 +5407,7 @@ the height difference of the two baselines is %<*test-base> \NeedsTeXFormat{LaTeX2e} \documentclass{article} -\usepackage{zref-base,zref-titleref}[2010/05/01] +\usepackage{zref-base,zref-titleref}[2011/03/18] \usepackage{qstest} \IncludeTests{*} \LogTests{log}{*}{*} @@ -5139,7 +5466,7 @@ the height difference of the two baselines is %<*test-runs> \NeedsTeXFormat{LaTeX2e} \documentclass{article} -\usepackage{zref-runs}[2010/05/01] +\usepackage{zref-runs}[2011/03/18] \usepackage{qstest} \IncludeTests{*} \LogTests{log}{*}{*} @@ -5168,7 +5495,7 @@ the height difference of the two baselines is %<*test-titleref-memoir> \NeedsTeXFormat{LaTeX2e} \documentclass{memoir} -\usepackage{zref-titleref}[2010/05/01] +\usepackage{zref-titleref}[2011/03/18] \usepackage{qstest} \IncludeTests{*} \LogTests{log}{*}{*} @@ -5289,6 +5616,7 @@ the height difference of the two baselines is % zref-abspos.sty & tex/latex/oberdiek/zref-abspos.sty\\ % zref-counter.sty & tex/latex/oberdiek/zref-counter.sty\\ % zref-dotfill.sty & tex/latex/oberdiek/zref-dotfill.sty\\ +% zref-env.sty & tex/latex/oberdiek/zref-env.sty\\ % zref-hyperref.sty & tex/latex/oberdiek/zref-hyperref.sty\\ % zref-lastpage.sty & tex/latex/oberdiek/zref-lastpage.sty\\ % zref-marks.sty & tex/latex/oberdiek/zref-marks.sty\\ @@ -5656,6 +5984,36 @@ the height difference of the two baselines is % \item % Module \xmodule{xr}: Property `urluse' and option \xoption{urluse} added. % \end{Version} +% \begin{Version}{2010/05/13 v2.18} +% \item +% Module \xmodule{env} added. +% \item +% Module \xmodule{savepos}: \cs{zref@savepos} added. +% \end{Version} +% \begin{Version}{2010/10/22 v2.19} +% \item +% \cs{zref@addprop} and \cs{zref@localaddprop} are limited +% to one property only +% (incompatibility to versions v2.13 to v2.18). +% \item +% \cs{zref@addprops} and \cs{zref@localaddprops} added. +% \item +% \cs{zref@delprop} and \cs{zref@localdelprop} added. +% \item +% \cs{zref@labelbykv} and \cs{zkvlabel} (module \xmodule{user}) +% with keys \xoption{prop}, \xoption{list}, \xoption{delprop}, +% \xoption{immediate}, \xoption{values} added. +% \end{Version} +% \begin{Version}{2011/02/12 v2.20} +% \item +% Fix for warning in \xpackage{zref-xr}. +% \end{Version} +% \begin{Version}{2011/03/18 v2.21} +% \item +% Fix in module \xmodule{pagelayout} for \cs{zlistpagelayout}. +% \item +% Fix for \cs{zref@localaddprop} (probably since v2.19). +% \end{Version} % \end{History} % % \PrintIndex |