summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek/zref.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/zref.dtx')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/zref.dtx1567
1 files changed, 1228 insertions, 339 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/zref.dtx b/Master/texmf-dist/source/latex/oberdiek/zref.dtx
index ea5bc61a208..dfeab3aaf88 100644
--- a/Master/texmf-dist/source/latex/oberdiek/zref.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/zref.dtx
@@ -20,9 +20,10 @@
% 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-counter.sty, zref-dotfill.sty,
-% zref-hyperref.sty, zref-lastpage.sty, zref-marks.sty,
-% zref-nextpage.sty, zref-perpage.sty, zref-runs.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,
@@ -64,12 +65,15 @@
% TDS:tex/latex/oberdiek/zref.sty
% TDS:tex/latex/oberdiek/zref-base.sty
% TDS:tex/latex/oberdiek/zref-abspage.sty
+% 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-hyperref.sty
% TDS:tex/latex/oberdiek/zref-lastpage.sty
% TDS:tex/latex/oberdiek/zref-marks.sty
% TDS:tex/latex/oberdiek/zref-nextpage.sty
+% TDS:tex/latex/oberdiek/zref-pageattr.sty
+% TDS:tex/latex/oberdiek/zref-pagelayout.sty
% TDS:tex/latex/oberdiek/zref-perpage.sty
% TDS:tex/latex/oberdiek/zref-runs.sty
% TDS:tex/latex/oberdiek/zref-savepos.sty
@@ -103,7 +107,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: zref 2010/04/23 v2.15 New reference scheme for LaTeX2e (HO)}
+\Msg{* Package: zref 2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -134,9 +138,10 @@ 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-counter.sty, zref-dotfill.sty,
- zref-hyperref.sty, zref-lastpage.sty, zref-marks.sty,
- zref-nextpage.sty, zref-perpage.sty, zref-runs.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,
@@ -154,12 +159,15 @@ and the derived files
\file{zref.sty}{\from{zref.dtx}{package}}%
\file{zref-base.sty}{\from{zref.dtx}{base}}%
\file{zref-abspage.sty}{\from{zref.dtx}{abspage}}%
+ \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-hyperref.sty}{\from{zref.dtx}{hyperref}}%
\file{zref-lastpage.sty}{\from{zref.dtx}{lastpage}}%
\file{zref-marks.sty}{\from{zref.dtx}{marks}}%
\file{zref-nextpage.sty}{\from{zref.dtx}{nextpage}}%
+ \file{zref-pageattr.sty}{\from{zref.dtx}{pageattr}}%
+ \file{zref-pagelayout.sty}{\from{zref.dtx}{pagelayout}}%
\file{zref-perpage.sty}{\from{zref.dtx}{perpage}}%
\file{zref-runs.sty}{\from{zref.dtx}{runs}}%
\file{zref-savepos.sty}{\from{zref.dtx}{savepos}}%
@@ -186,9 +194,10 @@ and the derived files
\Msg{* To finish the installation you have to move the following}
\Msg{* files into a directory searched by TeX:}
\Msg{*}
-\Msg{* zref.sty, zref-base.sty, zref-abspage.sty, zref-counter.sty,}
-\Msg{* zref-dotfill.sty, zref-hyperref.sty, zref-lastpage.sty,}
-\Msg{* zref-marks.sty, zref-nextpage.sty, zref-perpage.sty,}
+\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}
@@ -212,16 +221,17 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{zref.drv}%
- [2010/04/23 v2.15 New reference scheme for LaTeX2e (HO)]%
+ [2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
+\setlength{\emergencystretch}{1em}
\begin{document}
\DocInput{zref.dtx}%
\end{document}
%</driver>
% \fi
%
-% \CheckSum{2400}
+% \CheckSum{3166}
%
% \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
@@ -242,14 +252,14 @@ and the derived files
% \GetFileInfo{zref.drv}
%
% \title{The \xpackage{zref} package}
-% \date{2010/04/23 v2.15}
+% \date{2010/05/01 v2.17}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
%
% \begin{abstract}
% Package \xpackage{zref} tries to get rid of the restriction
-% in \LaTeX's reference system that only two properties are
+% in \hologo{LaTeX}'s reference system that only two properties are
% supported. The package implements an extensible referencing
% system, where properties are handled in a more flexible way.
% It offers an interface for macro programmers for the access
@@ -284,19 +294,19 @@ and the derived files
%
% \section{Introduction}
%
-% Standard \LaTeX's reference system with \cs{label}, \cs{ref},
+% Standard \hologo{LaTeX}'s reference system with \cs{label}, \cs{ref},
% and \cs{pageref} supports two properties, the apperance of
% the counter that is last incremented by \cs{refstepcounter} and
% the page with the \cs{label} command.
%
-% Unhappily \LaTeX\ does not provide an interface for adding
+% Unhappily \hologo{LaTeX} does not provide an interface for adding
% another properties. Packages such as \xpackage{hyperref},
% \xpackage{nameref}, or \xpackage{titleref} are forced to
% use ugly hacks to extend the reference system.
% These ugly hacks are one of the causes for \xpackage{hyperref}'s
% difficulty regarding compatibility with other packages.
%
-% \subsection{Standard \LaTeX\ behaviour}
+% \subsection{Standard \hologo{LaTeX} behaviour}
%
% References are created by the \cs{label} command:
% \begin{quote}
@@ -304,23 +314,23 @@ and the derived files
% |\section{First section on page 7} % section 2.1|\\
% |\label{myref}|
% \end{quote}
-% Now \LaTeX\ records the section number |2.1| and the page |7|
+% Now \hologo{LaTeX} records the section number |2.1| and the page |7|
% in the reference. Internally the reference is a list with
% two entries:
% \begin{quote}
% |\r@myref| $\rightarrow$ |{2.1}{7}|
% \end{quote}
-% The length of the list if fixed in the \LaTeX\ kernel,
+% The length of the list if fixed in the \hologo{LaTeX} kernel,
% An interface for adding new properties is missing.
%
% There are several tries to add new properties:
% \begin{description}
% \item[\xpackage{hyperref}] uses a list of five
% properties instead of the standard list with two entries.
-% This causes many compatibility problems with \LaTeX\ and
+% This causes many compatibility problems with \hologo{LaTeX} and
% other packages.
% \item[\xpackage{titleref}] stores its title data into the
-% first entry in the list. \LaTeX\ is happy because it
+% first entry in the list. \hologo{LaTeX} is happy because it
% does only see its list with two entries. The situation
% becomes more difficult, if more properties are added
% this way. Then the macros form a nested structure
@@ -349,9 +359,9 @@ and the derived files
% \item The order of the entries does not matter.
% \end{itemize}
% Unhappily I am not familiar with the experimental code
-% for \LaTeX3 that will need some time before its first release.
-% Thus I have implemented it as \LaTeXe\ package without disturbing
-% the existing \LaTeX\ reference system.
+% for \hologo{LaTeX3} that will need some time before its first release.
+% Thus I have implemented it as \hologo{LaTeXe} package without disturbing
+% the existing \hologo{LaTeX} reference system.
%
% \subsection{Interfaces}
%
@@ -488,7 +498,7 @@ and the derived files
% \M{propname} \M{value}
% \end{declcs}
% This sets the current value of the property \meta{propname}.
-% It is a generalization of setting \LaTeX's \cs{currentlabel}.
+% It is a generalization of setting \hologo{LaTeX}'s \cs{currentlabel}.
%
% \begin{declcs}{zref@getcurrent}\markexptwo
% \M{propname}
@@ -564,7 +574,7 @@ and the derived files
% Example for page references:
% \begin{quote}
% \begin{tabular}{@{}ll}
-% \LaTeX:& |\pageref{foobar}|\\
+% \hologo{LaTeX}:& |\pageref{foobar}|\\
% \xpackage{zref}:& |\zref@extract{foobar}{page}|
% \end{tabular}
% \end{quote}
@@ -632,33 +642,77 @@ and the derived files
% \setlength{\tabcolsep}{2\tabcolsep}
% \def\VV{\vphantom{\large \"Ag}}
% \def\EMPTY{{\itshape\textless empty\textgreater}}
+% \def\pl#1{&#1&thepage&\cs{number}\cs{#1}}
% \begin{tabular}{@{}>{\sffamily}l|>{\ttfamily}l|>{\ttfamily}l|>{\ttfamily}l@{}}
% \rmfamily Module&
% \rmfamily Property&
% \rmfamily Property list&
% \rmfamily Default\\
% \hline
-% & default & main & \EMPTY\\
-% & page & main & \EMPTY\\
+% (base)
+% & default & main & \EMPTY\\
+% & page & main & \EMPTY\\
% \hline
-% abspage\textrm{, }totpages & abspage & main & 0\\
+% abspage
+% & abspage & main & 0\\
% \hline
-% perpage & pagevalue & perpage & 0\\
-% & page & perpage & \EMPTY\\
-% & abspage & perpage & 0\\
+% counter
+% & counter & main & \EMPTY\\
% \hline
-% counter & counter & main & \EMPTY\\
+% hyperref
+% & anchor & main & \EMPTY\\
+% & url & & \EMPTY\\
% \hline
-% titleref & title & main & \EMPTY\\
+% pageattr
+% & pdfpageattr & thepage & \dots\\
+% & pdfpagesattr & LastPage & \dots\\
% \hline
-% savepos & posx & savepos & 0\\
-% & posy & savepos & 0\\
+% pagelayout\footnotemark
+% \pl{mag}\\
+% \pl{paperwidth}\\
+% \pl{paperheight}\\
+% \pl{stockwidth}\\
+% \pl{stockheight}\\
+% \pl{pdfpageheight}\\
+% \pl{pdfpagewidth}\\
+% \pl{pdfhorigin}\\
+% \pl{pdfvorigin}\\
+% \pl{hoffset}\\
+% \pl{voffset}\\
+% \pl{topmargin}\\
+% \pl{oddsidemargin}\\
+% \pl{evensidemargin}\\
+% \pl{textwidth}\\
+% \pl{textheight}\\
+% \pl{headheight}\\
+% \pl{headsep}\\
+% \pl{footskip}\\
+% \pl{marginparwidth}\\
+% \pl{marginparsep}\\
+% \pl{columnwidth}\\
+% \pl{columnsep}\\
% \hline
-% hyperref & anchor & main & \EMPTY\\
-% & url & & \EMPTY\\
+% perpage
+% & pagevalue & perpage & 0\\
+% & page & perpage & \EMPTY\\
+% & abspage & perpage & 0\\
% \hline
-% xr & url & & \EMPTY\\
+% savepos
+% & posx & savepos & 0\\
+% & posy & savepos & 0\\
+% \hline
+% titleref
+% & title & main & \EMPTY\\
+% \hline
+% xr
+% & anchor & & \EMPTY\\
+% & externaldocument & & \EMPTY\\
+% & theotype & & \EMPTY\\
+% & title & & \EMPTY\\
+% & url & & \EMPTY\\
% \end{tabular}
+% \footnotetext{Module \xmodule{pagelayout} only defines properties
+% if the parameter exists.}%
% \end{quote}
%
% \subsection{Wrapper for advanced situations}
@@ -698,7 +752,7 @@ and the derived files
% \end{quote}
% The \cs{edef} forces the expansion of \cs{zref@extract},
% but the extraction of the value is prevented by
-% the wrapper that uses \eTeX'\ \cs{unexpanded} for this
+% the wrapper that uses \hologo{eTeX}'\ \cs{unexpanded} for this
% purpose. Supported macros are \cs{zref@extract}, \cs{zref@extractdefault}
% and since version 2010/04/22 v2.14 macro \cs{zref@getcurrent}.
%
@@ -744,7 +798,7 @@ and the derived files
% \end{quote}
%
% The basic user interface of the package without modules
-% are commands that mimic the standard \LaTeX\ behaviour
+% are commands that mimic the standard \hologo{LaTeX} behaviour
% of \cs{label}, \cs{ref}, and \cs{pageref}:
%
% \begin{declcs}{zlabel}
@@ -792,7 +846,8 @@ and the derived files
% page number:
% \begin{quote}
% |Section \zref{foo} is on page \zpageref{foo}.|\\
-% |This is page \zref[abspage]{foo} of \zref[abspage]{LastPage}.|
+% |This is page \zref[abspage]{foo}|\\
+% |of \zref[abspage]{LastPage}.|
% \end{quote}
% The example also makes use of module \xmodule{lastpage}.
%
@@ -855,7 +910,7 @@ and the derived files
\newcounter{foo}
\renewcommand*{\thefoo}{\Alph{foo}}
-\usepackage{zref-lastpage,zref-user}[2010/04/23]
+\usepackage{zref-lastpage,zref-user}[2010/05/01]
\makeatletter
\zref@newprop{thefoo}{\thefoo}
@@ -969,7 +1024,7 @@ and the derived files
%<<END_EXAMPLE
\documentclass{book}
-\usepackage{zref-nextpage}[2010/04/23]
+\usepackage{zref-nextpage}[2010/05/01]
\znextpagesetup
{\thepage}% next page is unknown
{\thepage\ (#1)}% this page is last page
@@ -1012,25 +1067,80 @@ and the derived files
% and can also used even in expandable calculations (\cs{numexpr})
% or counter assignments.
%
+% \subsection{Module \xmodule{pagelayout}}
+%
+% The module defines additional properties for each parameter
+% of the page layout that is effective during page shipout.
+% The value of length parameters is given in sp without the
+% unit as plain number.
+%
+% Some parameters are specific for a class (e.g.\@ \xoption{stockwidth}
+% and \xoption{stockheight} for class \xclass{memoir}) or the
+% \hologo{TeX} engine like \hologo{pdfTeX}. If the parameter is not
+% available, then the property will not be defined. The default value
+% of the property is the current setting of the parameter.
+%
+% The module \xmodule{thepage} is loaded that generates a label
+% for each page. The properties of module \xmodule{pagelayout}
+% are added to the property list |thepage| of module \xmodule{thepage}.
+%
+% List of properties:
+% \begin{quote}
+% \def\x#1{\cs{#1}&#1}%
+% \begin{tabular}{l>{\sffamily}ll}
+% \textrm{parameter} & \textrm{property} & remarks\\
+% \hline
+% \x{mag}\\
+% \x{paperwidth}\\
+% \x{paperheight}\\
+% \x{stockwidth}& class \xclass{memoir}\\
+% \x{stockheight}& class \xclass{memoir}\\
+% \x{pdfpagewidth}& \hologo{pdfTeX}, \hologo{LuaTeX}\\
+% \x{pdfpageheight}& \hologo{pdfTeX}, \hologo{LuaTeX}\\
+% \x{pdfhorigin}& \hologo{pdfTeX}, \hologo{LuaTeX}\\
+% \x{pdfvorigin}& \hologo{pdfTeX}, \hologo{LuaTeX}\\
+% \x{hoffset}\\
+% \x{voffset}\\
+% \x{topmargin}\\
+% \x{oddsidemargin}\\
+% \x{evensidemargin}\\
+% \x{textwidth}\\
+% \x{textheight}\\
+% \x{headheight}\\
+% \x{headsep}\\
+% \x{footskip}\\
+% \x{marginparwidth}\\
+% \x{marginparsep}\\
+% \x{columnwidth}\\
+% \x{columnsep}\\
+% \end{tabular}
+% \end{quote}
+%
+% \begin{declcs}{zlistpagelayout}
+% \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.
+%
% \subsection{Module \xmodule{marks}}
%
% ToDo.
%
% \subsection{Module \xmodule{runs}}
%
-% Module \xmodule{runs} counts the \LaTeX\ runs since last
+% Module \xmodule{runs} counts the \hologo{LaTeX} runs since last
% \xext{aux} file creation and prints the number in the
% \xext{log} file.
%
% \begin{declcs}{zruns}\markexp
% \end{declcs}
-% Prints the the total number of \LaTeX\ runs including
+% Prints the the total number of \hologo{LaTeX} runs including
% the current one. It expands to an explicit number.
% Before |begin{document}| the value is zero meaning
% the \xext{aux} file is not read yet. If a previous
% \xext{aux} file exists, the value found there increased
% by one is the new number. Otherwise \cs{zruns} is set to one.
-% \LaTeX~runs where the \xext{aux} files are not rewritten
+% \hologo{LaTeX}~runs where the \xext{aux} files are not rewritten
% are not counted (see \cs{nofiles}).
%
% \subsection{Module \xmodule{perpage}}
@@ -1040,7 +1150,7 @@ and the derived files
% well if the other counter is the page counter. The page counter is
% incremented in the output routine that is often called asynchronous
% somewhere on the next page. A reference mechanism costs at least
-% two \LaTeX\ runs, but ensures correct page counter values.
+% two \hologo{LaTeX} runs, but ensures correct page counter values.
%
% \begin{declcs}{zmakeperpage}
% |[|\meta{reset}|]| \M{counter}
@@ -1132,10 +1242,10 @@ and the derived files
% \subsection{Module \xmodule{savepos}}
%
% This option supports a feature that \pdfTeX\ provides
-% (and Xe\TeX).
+% (and \hologo{XeTeX}).
% \pdfTeX\ is able to tell the current position on the
% page. The page position is not instantly known. First the
-% page must be constructed by \TeX's asynchronous output
+% page must be constructed by \hologo{TeX}'s asynchronous output
% routine. Thus the time where the position is known is
% the page shipout time. Thus a reference system where the
% information is recorded in the first run and made available
@@ -1162,7 +1272,7 @@ and the derived files
% Both \cs{zposx} and \cs{zposy} are expandable and can be
% used inside calculations (\cs{setcounter}, \cs{addtocounter},
% package \xpackage{calc}, \cs{numexpr}). However this property
-% prevents from notifying \LaTeX\ that the reference is actually
+% prevents from notifying \hologo{LaTeX} that the reference is actually
% used (the notifying is not expandable). Therefore you should
% mark the reference as used by \cs{zrefused}.
%
@@ -1238,13 +1348,17 @@ and the derived files
% The following setup options are available:
% \begin{description}
% \item[\xoption{ext}:] It sets the default extension.
-% \item[\xoption{tozreflabel}:] The found references
-% are imported as zref labels. This is enabled by default.
-% \item[\xoption{toltxlabel}:] The found references
-% are imported as \LaTeX\ labels. Packages \xpackage{nameref},
-% \xpackage{titleref} and class \xclass{memoir} are supported.
-% \item[\xoption{verbose}:] List the imported labels in the
-% \xext{log} file. Default is |false|.
+% \item[\xoption{tozreflabel}:] Boolean option. The found references
+% are imported as zref labels. This is enabled by default.
+% \item[\xoption{toltxlabel}:] Boolean option. The found references
+% are imported as \hologo{LaTeX} labels. Packages \xpackage{nameref},
+% \xpackage{titleref} and class \xclass{memoir} are supported.
+% \item[\xoption{urluse}:] Boolean option. If enabled, then a URL
+% is stored in a macro and the macro is put in property `urluse'.
+% The URL is not put in property `url'.
+% The purpose is to save \hologo{TeX} memory.
+% \item[\xoption{verbose}:] Boolean option. List the imported labels in the
+% \xext{log} file. Default is |false|.
% \end{description}
%
% \begin{declcs}{zref@xr@ext}
@@ -1258,12 +1372,6 @@ and the derived files
%
% Among other things the following issues are left for future work:
% \begin{itemize}
-% \item
-% The user land macros are not checked for robustness yet.
-% They can be fragile. If this happens, use \cs{protect}
-% until a later version of this package. The \cs{protect}
-% will not disturb, if the protected macro become robust
-% in the future.
% \item Other applications: autoref, hyperref, \dots
% \end{itemize}
%
@@ -1340,7 +1448,8 @@ and the derived files
\begin{itemize}
\item
The frontmatter part has
- \number\numexpr\zref@extract{chap:first}{abspage}-1\relax~pages.
+ \number\numexpr\zref@extract{chap:first}{abspage}-1\relax
+ ~pages.
\item
Chapter \zref{chap:first} has \ChapterPages{first} page(s).
\item
@@ -1358,7 +1467,8 @@ and the derived files
\item
The last page is labeled with \zpageref{LastPage}.
\item
- The title of chapter \zref{chap:next} is ``\zref[chaptitle]{chap:next}''.
+ The title of chapter \zref{chap:next} %
+ is ``\zref[chaptitle]{chap:next}''.
\end{itemize}
\tableofcontents
@@ -1393,7 +1503,7 @@ Text.
% feature. The position on the page is not known before the
% page is constructed and shipped out. Therefore the position
% ist stored in references and are available for calculations
-% in the next \LaTeX\ compile run.
+% in the next \hologo{LaTeX} compile run.
% \begin{macrocode}
The width of the first column is
\the\dimexpr \zposx{secondcol}sp - \zposx{firstcol}sp\relax,\\
@@ -1405,8 +1515,8 @@ the height difference of the two baselines is
\end{tabular}
% \end{macrocode}
-% With \cs{zrefused} \LaTeX\ is notified, if the references
-% are not yet available and \LaTeX\ can generate the rerun
+% With \cs{zrefused} \hologo{LaTeX} is notified, if the references
+% are not yet available and \hologo{LaTeX} can generate the rerun
% hint.
% \begin{macrocode}
\zrefused{firstcol}
@@ -1456,18 +1566,18 @@ the height difference of the two baselines is
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref}
- [2010/04/23 v2.15 New reference scheme for LaTeX2e (HO)]%
+ [2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)]%
% \end{macrocode}
%
% \subsubsection{Load basic module}
%
% \begin{macrocode}
-\RequirePackage{zref-base}[2010/04/23]
+\RequirePackage{zref-base}[2010/05/01]
% \end{macrocode}
% Abort package loading if \xpackage{zref-base} could not be
% loaded successfully.
% \begin{macrocode}
-\@ifundefined{ZREF@baseok}{\endinput}{}
+\@ifundefined{ZREF@base@ok}{\endinput}{}
% \end{macrocode}
%
% \subsubsection{Process options}
@@ -1477,7 +1587,7 @@ the height difference of the two baselines is
\def\ZREF@temp#1{%
\DeclareOption{#1}{%
\AtEndOfPackage{%
- \RequirePackage{zref-#1}[2010/04/23]%
+ \RequirePackage{zref-#1}[2010/05/01]%
}%
}%
}
@@ -1486,8 +1596,14 @@ the height difference of the two baselines is
\ZREF@temp{dotfill}
\ZREF@temp{hyperref}
\ZREF@temp{lastpage}
+\ZREF@temp{marks}
+\ZREF@temp{nextpage}
+\ZREF@temp{pageattr}
+\ZREF@temp{pagelayout}
\ZREF@temp{perpage}
+\ZREF@temp{runs}
\ZREF@temp{savepos}
+\ZREF@temp{thepage}
\ZREF@temp{titleref}
\ZREF@temp{totpages}
\ZREF@temp{user}
@@ -1537,13 +1653,14 @@ the height difference of the two baselines is
%<*base>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
- [2010/04/23 v2.15 Module base for zref (HO)]%
+ [2010/05/01 v2.17 Module base for zref (HO)]%
% \end{macrocode}
%
% \subsubsection{Utilities}
%
% \begin{macrocode}
\RequirePackage{ltxcmds}[2010/03/01]
+\RequirePackage{infwarerr}[2010/04/08]
\RequirePackage{kvsetkeys}[2010/03/01]
% \end{macrocode}
%
@@ -1555,6 +1672,42 @@ the height difference of the two baselines is
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\ltx@IfUndefined{protected}{%
+ \RequirePackage{makerobust}[2006/03/18]%
+% \end{macrocode}
+% \begin{macro}{\ZREF@Robust}
+% \begin{macrocode}
+ \def\ZREF@Robust#1#2{%
+ \def\ZREF@temp{\MakeRobustcommand#2}%
+ \afterassignment\ZREF@temp
+ #1#2%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}{%
+% \end{macrocode}
+% \begin{macro}{\ZREF@Robust}
+% \begin{macrocode}
+ \def\ZREF@Robust#1{%
+ \protected#1%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}
+% \end{macrocode}
+% \begin{macro}{\ZREF@IfDefinable}
+% \begin{macrocode}
+\def\ZREF@IfDefinable#1#2#3{%
+ \@ifdefinable{#1}{%
+ \ZREF@Robust{#2}#1#3%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\ZREF@UpdatePdfTeX}
% \cs{ZREF@UpdatePdfTeX} is used as help message text in
% error messages.
@@ -1586,10 +1739,10 @@ the height difference of the two baselines is
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{Check for \eTeX}
+% \subsubsection{Check for \hologo{eTeX}}
%
-% The use of \eTeX\ should be standard nowadays for \LaTeX.
-% We test for \eTeX\ in order to use its features later.
+% The use of \hologo{eTeX} should be standard nowadays for \hologo{LaTeX}.
+% We test for \hologo{eTeX} in order to use its features later.
% \begin{macrocode}
\ltx@IfUndefined{eTeXversion}{%
\PackageError\ZREF@name{%
@@ -1622,7 +1775,7 @@ the height difference of the two baselines is
%
% We are using some commands in the \xfile{.aux} files.
% However sometimes these auxiliary files are interpreted
-% by \LaTeX\ processes that haven't loaded this package
+% by \hologo{LaTeX} processes that haven't loaded this package
% (e.g. package \xpackage{xr}).
% Therefore we provide dummy definitions.
% \begin{macrocode}
@@ -1631,18 +1784,23 @@ the height difference of the two baselines is
\string\providecommand\string\zref@newlabel[2]{}%
}
% \end{macrocode}
+% \begin{macro}{\ZREF@RefPrefix}
+% \begin{macrocode}
+\def\ZREF@RefPrefix{Z@R}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\zref@newlabel}
% For the implementation of \cs{zref@newlabel} we call
% the same internal macro \cs{@newl@bel} that is used
% in \cs{newlabel}. Thus we have for free:
% \begin{itemize}
% \item \cs{Z@R@}\metacs{labelname} is defined.
-% \item \LaTeX's check for multiple references.
-% \item \LaTeX's check for changed references.
+% \item \hologo{LaTeX}'s check for multiple references.
+% \item \hologo{LaTeX}'s check for changed references.
% \end{itemize}
% \begin{macrocode}
-\def\zref@newlabel{%
- \@newl@bel{Z@R}%
+\ZREF@Robust\edef\zref@newlabel{%
+ \noexpand\@newl@bel{\ZREF@RefPrefix}%
}
% \end{macrocode}
% \end{macro}
@@ -1655,11 +1813,11 @@ the height difference of the two baselines is
% creates a new list as empty list. Assignments to
% property lists are global.
% \begin{macrocode}
-\def\zref@newlist#1{%
+\ZREF@Robust\def\zref@newlist#1{%
\zref@iflistundefined{#1}{%
\@ifdefinable{Z@L@#1}{%
- \global\expandafter\let\csname Z@L@#1\endcsname\@empty
- \PackageInfo{zref}{New property list: #1}%
+ \global\expandafter\let\csname Z@L@#1\endcsname\ltx@empty
+ \PackageInfo\ZREF@name{New property list: #1}%
}%
}{%
\PackageError\ZREF@name{%
@@ -1685,7 +1843,7 @@ the height difference of the two baselines is
% property list \verb|#1| exists and raises an error
% message otherwise.
% \begin{macrocode}
-\def\zref@listexists#1{%
+\ZREF@Robust\def\zref@listexists#1{%
\zref@iflistundefined{#1}{%
\PackageError\ZREF@name{%
Property list `#1' does not exist%
@@ -1699,44 +1857,40 @@ the height difference of the two baselines is
% \cs{zref@iflistcontainsprop} checks, whether a property \verb|#2| is
% already present in a property list \verb|#1|.
% \begin{macrocode}
-\def\zref@iflistcontainsprop#1{%
+\ZREF@Robust\def\zref@iflistcontainsprop#1#2{%
\zref@iflistundefined{#1}{%
- \expandafter\ltx@secondoftwo\@gobble
+ \ltx@secondoftwo
}{%
- \expandafter\ZREF@iflistcontainsprop\csname Z@L@#1\endcsname
+ \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@iflistcontainsprop#1#2{%
- \begingroup
- \ZREF@foundfalse
- \edef\y{#2}%
- \expandafter\@tfor\expandafter\x
- \expandafter:\expandafter=#1\do{%
- \edef\x{\x}%
- \ifx\x\y
- \ZREF@foundtrue
- \fi
- }%
- \expandafter\endgroup
- \ifZREF@found
- \expandafter\ltx@firstoftwo
- \else
- \expandafter\ltx@secondoftwo
- \fi
-}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\zref@listforloop}
% \begin{macrocode}
\def\zref@listforloop#1#2{%
- \expandafter\expandafter\expandafter\@tfor
- \expandafter\expandafter\expandafter\zref@prop
- \expandafter\expandafter\expandafter:%
- \expandafter\expandafter\expandafter=%
- \csname Z@L@#1\endcsname
- \do{%
- #2\zref@prop
+ \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
+ }%
}%
}
% \end{macrocode}
@@ -1747,7 +1901,7 @@ the height difference of the two baselines is
% list \verb|#1|, if the property is not already in the list.
% Otherwise a warning is given.
% \begin{macrocode}
-\def\zref@addprop#1#2{%
+\ZREF@Robust\def\zref@addprop#1#2{%
\zref@listexists{#1}{%
\comma@parse{#2}{%
\zref@propexists\comma@entry{%
@@ -1756,9 +1910,10 @@ the height difference of the two baselines is
Property `\comma@entry' is already in list `#1'%
}%
}{%
- \edef\comma@entry{\comma@entry}%
- \expandafter\g@addto@macro\csname Z@L@#1\expandafter\endcsname
- \expandafter{\expandafter{\comma@entry}}%
+ \begingroup\expandafter\endgroup
+ \expandafter\g@addto@macro
+ \csname Z@L@#1\expandafter\endcsname
+ \expandafter{\csname\comma@entry\endcsname}%
}%
}%
\ltx@gobble
@@ -1770,7 +1925,7 @@ the height difference of the two baselines is
%
% \begin{macro}{\zref@localaddprop}
% \begin{macrocode}
-\def\zref@localaddprop#1#2{%
+\ZREF@Robust\def\zref@localaddprop#1#2{%
\zref@listexists{#1}{%
\comma@parse{#2}{%
\zref@propexists\comma@entry{%
@@ -1779,10 +1934,10 @@ the height difference of the two baselines is
Property `\comma@entry' is already in list `#1'%
}%
}{%
- \edef\comma@entry{\comma@entry}%
+ \begingroup\expandafter\endgroup
\expandafter\ltx@LocalAppendToMacro
\csname Z@L@#1\expandafter\endcsname
- \expandafter{\expandafter{\comma@entry}}%
+ \expandafter{\csname\comma@entry\endcsname}%
}%
}%
\ltx@gobble
@@ -1810,7 +1965,7 @@ the height difference of the two baselines is
% property \verb|#1| exists and raises an error
% message otherwise.
% \begin{macrocode}
-\def\zref@propexists#1{%
+\ZREF@Robust\def\zref@propexists#1{%
\zref@ifpropundefined{#1}{%
\PackageError\ZREF@name{%
Property `#1' does not exist%
@@ -1839,29 +1994,69 @@ the height difference of the two baselines is
% Current value of the property.
% \end{description}
% \begin{macrocode}
-\def\zref@newprop{%
+\ZREF@Robust\def\zref@newprop{%
\@ifstar{%
\let\ZREF@X\noexpand
\ZREF@newprop
}{%
- \let\ZREF@X\@empty
+ \let\ZREF@X\ltx@empty
\ZREF@newprop
}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@newprop}
+% \begin{macrocode}
\def\ZREF@newprop#1{%
- \PackageInfo{zref}{New property: #1}%
- \def\ZREF@P{#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]}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@par}
+% \begin{macrocode}
+\def\ZREF@par{par}
+\@onelevel@sanitize\ZREF@par
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@@newprop}
+% \begin{macrocode}
\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}%
+ \expandafter
+ \gdef\csname Z@E@\ZREF@P\endcsname##1#1##2##3\ZREF@nil{##2}%
}
% \end{macrocode}
% \end{macro}
@@ -1869,7 +2064,7 @@ the height difference of the two baselines is
% \begin{macro}{\zref@setcurrent}
% \cs{zref@setcurrent} sets the current value for a property.
% \begin{macrocode}
-\def\zref@setcurrent#1#2{%
+\ZREF@Robust\def\zref@setcurrent#1#2{%
\zref@propexists{#1}{%
\expandafter\def\csname Z@C@#1\endcsname{#2}%
}%
@@ -1911,7 +2106,7 @@ the height difference of the two baselines is
% \begin{macro}{\zref@label}
% Label macro that uses the main property list.
% \begin{macrocode}
-\def\zref@label#1{%
+\ZREF@Robust\def\zref@label#1{%
\zref@labelbylist{#1}\ZREF@mainlist
}
% \end{macrocode}
@@ -1920,7 +2115,7 @@ the height difference of the two baselines is
% Label macro that stores the properties, specified in the
% property list \verb|#2|.
% \begin{macrocode}
-\def\zref@labelbylist#1#2{%
+\ZREF@Robust\def\zref@labelbylist#1#2{%
\@bsphack
\zref@listexists{#2}{%
\expandafter\expandafter\expandafter\ZREF@label
@@ -1935,21 +2130,21 @@ the height difference of the two baselines is
% \begin{macro}{\zref@labelbyprops}
% The properties are directly specified in a comma separated list.
% \begin{macrocode}
-\def\zref@labelbyprops#1#2{%
+\ZREF@Robust\def\zref@labelbyprops#1#2{%
\@bsphack
\begingroup
- \edef\l{#2}%
\toks@{}%
- \@for\x:=#2\do{%
- \zref@ifpropundefined{\x}{%
+ \comma@parse{#2}{%
+ \zref@ifpropundefined\comma@entry{%
\PackageWarning\ZREF@name{%
- Property `\x' is not known%
+ Property `\comma@entry' is not known%
}%
}{%
- \toks@\expandafter\expandafter\expandafter{%
- \expandafter\the\expandafter\toks@\expandafter{\x}%
+ \toks@\expandafter{%
+ \the\expandafter\toks@\csname\comma@entry\endcsname
}%
}%
+ \ltx@gobble
}%
\expandafter\endgroup
\expandafter\ZREF@label\expandafter{\the\toks@}{#1}%
@@ -1974,7 +2169,7 @@ the height difference of the two baselines is
% \cs{immediate} before its execution. Also \cs{ZREF@label}
% is notified via the switch \cs{ifZREF@immediate}.
% \begin{macrocode}
-\long\def\zref@wrapper@immediate#1{%
+\ZREF@Robust{\long\def}\zref@wrapper@immediate#1{%
\begingroup
\ZREF@immediatetrue
\let\ZREF@org@write\write
@@ -2002,17 +2197,31 @@ the height difference of the two baselines is
\ifZREF@immediate
\let\thepage\ZREF@org@thepage
\fi
- \let\ZREF@temp\@empty
+ \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
+ \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@
- \expandafter\string\csname\ZREF@P\endcsname{%
+ \ltx@backslashchar\ZREF@P{%
\expandafter\noexpand\csname Z@C@\ZREF@P\endcsname
}%
}%
@@ -2038,7 +2247,7 @@ the height difference of the two baselines is
% in expandable contexts. But there are problems that cannot
% be solved by full expandable macros:
% \begin{itemize}
-% \item In standard \LaTeX\ undefined references sets a flag
+% \item In standard \hologo{LaTeX} undefined references sets a flag
% and generate a warning. Both actions are not expandable.
% \item Babel's support for its shorthand uses commands that
% use non-expandable assignments. However currently there
@@ -2062,8 +2271,10 @@ the height difference of the two baselines is
% \cs{zref@ifrefundefined} calls \verb|#2| and \verb|#3| otherwise.
% Also the reference is marked used.
% \begin{macrocode}
-\newcommand*{\zifrefundefined}[1]{%
- \zref@wrapper@babel\ZREF@ifrefundefined{#1}%
+\ZREF@IfDefinable\zifrefundefined\def{%
+ #1{%
+ \zref@wrapper@babel\ZREF@ifrefundefined{#1}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -2080,9 +2291,9 @@ the height difference of the two baselines is
% The problem with undefined references is addressed by
% the macro \cs{zref@refused}. This can be used outside
% the expandable context. In case of an undefined reference
-% the flag is set to notify \LaTeX\ and a warning is given.
+% the flag is set to notify \hologo{LaTeX} and a warning is given.
% \begin{macrocode}
-\def\zref@refused#1{%
+\ZREF@Robust\def\zref@refused#1{%
\zref@wrapper@babel\ZREF@refused{#1}%
}
% \end{macrocode}
@@ -2119,7 +2330,7 @@ the height difference of the two baselines is
}
\def\ZREF@ifrefcontainsprop#1#2#3{%
\expandafter\ifx\expandafter\ZREF@novalue
- #1#3#2\ZREF@novalue\ZREF@nil\@empty
+ #1#3#2\ZREF@novalue\ZREF@nil\ltx@empty
\expandafter\ltx@secondoftwo
\else
\expandafter\ltx@firstoftwo
@@ -2208,7 +2419,7 @@ the height difference of the two baselines is
%
% \begin{macro}{\ZREF@wrapper@unexpanded}
% \begin{macrocode}
-\long\def\ZREF@wrapper@unexpanded#1{%
+\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
@@ -2235,7 +2446,7 @@ the height difference of the two baselines is
%
% \begin{macro}{\zref@wrapper@babel}
% \begin{macrocode}
-\long\def\zref@wrapper@babel#1#2{%
+\ZREF@Robust{\long\def}\zref@wrapper@babel#1#2{%
\ifcsname if@safe@actives\endcsname
\expandafter\ltx@firstofone
\else
@@ -2270,7 +2481,7 @@ the height difference of the two baselines is
% Generate the counter |zref@unique| if the counter does not
% already exist.
% \begin{macrocode}
-\def\zref@require@unique{%
+\ZREF@Robust\def\zref@require@unique{%
\@ifundefined{c@zref@unique}{%
\begingroup
\let\@addtoreset\ltx@gobbletwo
@@ -2306,21 +2517,21 @@ the height difference of the two baselines is
% \subsubsection{Setup}
%
% \begin{macro}{\zref@setdefault}
-% Standard \LaTeX\ prints ``??'' in bold face if a reference
+% Standard \hologo{LaTeX} prints ``??'' in bold face if a reference
% is not known. \cs{zref@default} holds the text that is
% printed in case of unknown references and is used, if
% the default was not specified during the definition
% of the new property by \cs{ref@newprop}.
% The global default value can be set by \cs{zref@setdefault}.
% \begin{macrocode}
-\def\zref@setdefault#1{%
+\ZREF@Robust\def\zref@setdefault#1{%
\def\zref@default{#1}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\zref@default}
% Now we initialize \cs{zref@default} with the same value
-% that \LaTeX\ uses for its undefined references.
+% that \hologo{LaTeX} uses for its undefined references.
% \begin{macrocode}
\zref@setdefault{%
\nfss@text{\reset@font\bfseries ??}%
@@ -2334,7 +2545,7 @@ the height difference of the two baselines is
% The name of the default property list is stored in
% \cs{ZREF@mainlist} and can be set by \cs{zref@setmainlist}.
% \begin{macrocode}
-\def\zref@setmainlist#1{%
+\ZREF@Robust\def\zref@setmainlist#1{%
\def\ZREF@mainlist{#1}%
}
\zref@setmainlist{main}
@@ -2350,7 +2561,7 @@ the height difference of the two baselines is
% The two properties \texttt{default} and \texttt{page}
% are created and added to the main property list.
% They store the data that
-% standard \LaTeX\ uses in its references created by
+% standard \hologo{LaTeX} uses in its references created by
% \cs{label}.
% \begin{description}
% \item[\texttt{default}] the apperance of the latest
@@ -2366,7 +2577,7 @@ the height difference of the two baselines is
% \paragraph{Mark successful loading}
%
% \begin{macrocode}
-\let\ZREF@baseok\@empty
+\let\ZREF@base@ok=Y
%</base>
% \end{macrocode}
%
@@ -2377,15 +2588,18 @@ the height difference of the two baselines is
%<*user>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-user}%
- [2010/04/23 v2.15 Module user for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module user for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% Module \xmodule{user} enables a small user interface.
% All macros are prefixed by \cs{z}.
%
-% First we define the pendants to the standard \LaTeX\ referencing
+% First we define the pendants to the standard \hologo{LaTeX} referencing
% commands \cs{label}, \cs{ref}, and \cs{pageref}.
%
% \begin{macro}{\zlabel}
@@ -2410,7 +2624,7 @@ the height difference of the two baselines is
% Also it provides an optional argument in order to
% select another property.
% \begin{macrocode}
-\newcommand*{\zref}[2][default]{%
+\newcommand*{\zref}[2][default]{% robust because of optional argument
\zref@propexists{#1}{%
\zref@wrapper@babel\ZREF@zref{#2}{#1}%
}%
@@ -2426,18 +2640,20 @@ the height difference of the two baselines is
% For macro \cs{zpageref} we just call \cs{zref}
% with property \verb|page|.
% \begin{macrocode}
-\newcommand*\zpageref{%
- \zref[page]%
-}%
+\ZREF@IfDefinable\zpageref\def{%
+ {\zref[page]}%
+}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\zrefused}
% For the following expandible user macros \cs{zrefused}
-% should be used to notify \LaTeX\ in case of undefined
+% should be used to notify \hologo{LaTeX} in case of undefined
% references.
% \begin{macrocode}
-\newcommand*{\zrefused}{\zref@refused}%
+\ZREF@IfDefinable\zrefused\def{%
+ {\zref@refused}%
+}
% \end{macrocode}
% \end{macro}
%
@@ -2452,9 +2668,12 @@ the height difference of the two baselines is
%<*abspage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspage}%
- [2010/04/23 v2.15 Module abspage for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module abspage for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% Module \xmodule{abspage} adds a new property \verb|abspage|
@@ -2465,7 +2684,7 @@ the height difference of the two baselines is
% \end{macrocode}
% The counter \verb|abspage| must not go in the clear list
% of \verb|@ckpt| that is used to set counters in
-% \xfile{.aux} files of included \TeX\ files.
+% \xfile{.aux} files of included \hologo{TeX} files.
% \begin{macrocode}
\begingroup
\let\@addtoreset\ltx@gobbletwo
@@ -2497,9 +2716,12 @@ the height difference of the two baselines is
%<*counter>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-counter}%
- [2010/04/23 v2.15 Module counter for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module counter for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% For features such as \xpackage{hyperref}'s \cs{autoref}
@@ -2534,11 +2756,14 @@ the height difference of the two baselines is
%<*lastpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-lastpage}%
- [2010/04/23 v2.15 Module lastpage for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\RequirePackage{zref-abspage}[2010/04/23]
+ [2010/05/01 v2.17 Module lastpage for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\RequirePackage{zref-abspage}[2010/05/01]
\RequirePackage{atveryend}[2009/12/07]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% The module \xmodule{lastpage} implements the service
@@ -2578,8 +2803,8 @@ the height difference of the two baselines is
% \end{macro}
% \begin{macro}{\ziflastpage}
% \begin{macrocode}
-\newcommand*{\ziflastpage}{%
- \zref@wrapper@babel\ZREF@iflastpage
+\ZREF@IfDefinable\ziflastpage\def{%
+ {\zref@wrapper@babel\ZREF@iflastpage}%
}
% \end{macrocode}
% \end{macro}
@@ -2603,14 +2828,17 @@ the height difference of the two baselines is
%<*thepage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-thepage}%
- [2010/04/23 v2.15 Module thepage for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module thepage for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% \begin{macrocode}
\RequirePackage{atbegshi}
-\RequirePackage{zref-abspage}[2010/04/23]
+\RequirePackage{zref-abspage}[2010/05/01]
% \end{macrocode}
% \begin{macrocode}
\zref@newlist{thepage}
@@ -2639,16 +2867,18 @@ the height difference of the two baselines is
% \end{macro}
% \begin{macro}{\zref@thepage@refused}
% \begin{macrocode}
-\def\zref@thepage@refused#1{%
+\ZREF@Robust\def\zref@thepage@refused#1{%
\zref@refused{\zref@thepage@name{#1}}%
}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\zthepage}
% \begin{macrocode}
-\newcommand*{\zthepage}[1]{%
- \zref@thepage@refused{#1}%
- \zref@thepage{#1}%
+\ZREF@IfDefinable\zthepage\def{%
+ #1{%
+ \zref@thepage@refused{#1}%
+ \zref@thepage{#1}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -2663,15 +2893,18 @@ the height difference of the two baselines is
%<*nextpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-nextpage}%
- [2010/04/23 v2.15 Module nextpage for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module nextpage for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/04/23]
-\RequirePackage{zref-thepage}[2010/04/23]
-\RequirePackage{zref-lastpage}[2010/04/23]
+\RequirePackage{zref-abspage}[2010/05/01]
+\RequirePackage{zref-thepage}[2010/05/01]
+\RequirePackage{zref-lastpage}[2010/05/01]
\RequirePackage{uniquecounter}[2009/12/18]
% \end{macrocode}
% \begin{macrocode}
@@ -2691,9 +2924,9 @@ the height difference of the two baselines is
\def\ZREF@np@call@unknown#1{#1}
\def\ZREF@np@call@nonext#1{#1}
\def\ZREF@np@call@next#1{#1}
-\newcommand*{\znextpage}{%
- \UniqueCounterCall{znextpage}{\ZREF@nextpage}%
-}
+\ZREF@IfDefinable\znextpage\def{%
+ {\UniqueCounterCall{znextpage}{\ZREF@nextpage}}%
+}%
\newcommand*{\znonextpagename}{}
\newcommand*{\zunknownnextpagename}{\Z@D@page}
\def\ZREF@nextpage#1{%
@@ -2764,16 +2997,19 @@ the height difference of the two baselines is
%<*totpages>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-totpages}%
- [2010/04/23 v2.15 Module totpages for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module totpages for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% The absolute page number of the last page is the total
% page number.
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/04/23]
-\RequirePackage{zref-lastpage}[2010/04/23]
+\RequirePackage{zref-abspage}[2010/05/01]
+\RequirePackage{zref-lastpage}[2010/05/01]
% \end{macrocode}
%
% \begin{macro}{\ztotpages}
@@ -2797,15 +3033,451 @@ the height difference of the two baselines is
% \end{macrocode}
%
%
+% \subsection{Module \xmodule{pagelayout}}
+%
+% \begin{macrocode}
+%<*pagelayout>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{zref-pagelayout}%
+ [2010/05/01 v2.17 Module pagelayout for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{zref-thepage}[2010/05/01]
+\RequirePackage{ifluatex}[2010/03/01]
+\RequirePackage{atveryend}[2010/03/24]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifluatex
+ \ifnum\luatexversion<39 %
+ \else
+ \begingroup
+ \escapechar=-1 %
+ \def\ZREF@temp#1{%
+ \ltx@IfUndefined{\string#1}{%
+ \let#1\ltx@undefined
+ \directlua{%
+ if tex.enableprimitives then %
+ tex.enableprimitives('', {'\string#1'})%
+ end%
+ }%
+ \ltx@ifundefined{\string#1}{%
+ }{%
+ \global#1=#1%
+ \@PackageInfoNoLine{zref-pagelayout}{%
+ \string#1 enabled%
+ }%
+ }%
+ }{}%
+ }%
+ \ZREF@temp\pdfpagewidth
+ \ZREF@temp\pdfpageheight
+ \ZREF@temp\pdfhorigin
+ \ZREF@temp\pdfvorigin
+ \endgroup
+ \fi
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\ZREF@temp#1{%
+ \begingroup
+ \escapechar=-1 %
+ \ltx@ifundefined{\string#1}{\endgroup}{%
+ \edef\x{%
+ \endgroup
+ \noexpand\zref@newprop*{\string#1}%
+ [\number\noexpand#1]% hash-ok
+ {\number\noexpand#1}%
+ \noexpand\zref@addprop{thepage}{\string#1}%
+ }%
+ \x
+ }%
+}
+\ZREF@temp\mag
+\ZREF@temp\paperwidth
+\ZREF@temp\paperheight
+\ZREF@temp\stockwidth
+\ZREF@temp\stockheight
+\ZREF@temp\pdfpagewidth
+\ZREF@temp\pdfpageheight
+\ZREF@temp\pdfhorigin
+\ZREF@temp\pdfvorigin
+\ZREF@temp\hoffset
+\ZREF@temp\voffset
+\ZREF@temp\topmargin
+\ZREF@temp\oddsidemargin
+\ZREF@temp\evensidemargin
+\ZREF@temp\textwidth
+\ZREF@temp\textheight
+\ZREF@temp\headheight
+\ZREF@temp\headsep
+\ZREF@temp\footskip
+\ZREF@temp\marginparwidth
+\ZREF@temp\marginparsep
+\ZREF@temp\columnwidth
+\ZREF@temp\columnsep
+% \end{macrocode}
+%
+% \begin{macro}{\ifZREF@pl@list}
+% \begin{macrocode}
+\ltx@newif\ifZREF@pl@list
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@listpagelayout}
+% \begin{macrocode}
+\ZREF@IfDefinable\zlistpagelayout\def{%
+ {\ZREF@pl@listtrue}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pl@AfterLastShipout}
+% \begin{macrocode}
+\def\ZREF@pl@AfterLastShipout{%
+ \ifZREF@pl@list
+ \edef\ZREF@page@max{\the\value{abspage}}%
+ \ltx@ifundefined{ZREF@org@testdef}{%
+ \let\ZREF@org@testdef\@testdef
+ \def\@testdef##1##2##3{%
+ \ZREF@org@testdef{##1}{##2}{##3}%
+ \def\ZREF@temp{##1}%
+ \ifx\ZREF@temp\ZREF@RefPrefix
+ \expandafter\xdef\csname##1@##2\endcsname{##3}%
+ \fi
+ }%
+ }{}%
+ \AtVeryEndDocument{\ZREF@pl@AtVeryEnd}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pl@AtVeryEnd}
+% \begin{macrocode}
+\def\ZREF@pl@AtVeryEnd{%
+ \begingroup
+ \toks@{Page layout parameters:\MessageBreak}%
+ \count@=1 %
+ \ZREF@pl@ListPage
+ \edef\x{\endgroup
+ \noexpand\@PackageInfoNoLine{zref-pagelayout}{\the\toks@}%
+ }%
+ \x
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pl@ListPage}
+% \begin{macrocode}
+\def\ZREF@pl@ListPage{%
+ \edef\x{%
+ \toks@={%
+ \the\toks@
+ Page \the\count@:\noexpand\MessageBreak
+ \zref@ifrefundefined{thepage\the\count@}{}{%
+ \ltx@space\ltx@space mag = %
+ \zref@extract{thepage\the\count@}{mag}%
+ \noexpand\MessageBreak
+ \ZREF@pl@ListEntry{paperwidth}%
+ \ZREF@pl@ListEntry{paperheight}%
+ \ZREF@pl@ListEntry{stockwidth}%
+ \ZREF@pl@ListEntry{stockheight}%
+ \ZREF@pl@ListEntry{pdfpagewidth}%
+ \ZREF@pl@ListEntry{pdfpageheight}%
+ \ZREF@pl@ListEntry{pdfhorigin}%
+ \ZREF@pl@ListEntry{pdfvorigin}%
+ \ZREF@pl@ListEntry{hoffset}%
+ \ZREF@pl@ListEntry{voffset}%
+ \ZREF@pl@ListEntry{topmargin}%
+ \ZREF@pl@ListEntry{oddsidemargin}%
+ \ZREF@pl@ListEntry{evensidemargin}%
+ \ZREF@pl@ListEntry{textwidth}%
+ \ZREF@pl@ListEntry{textheight}%
+ \ZREF@pl@ListEntry{headheight}%
+ \ZREF@pl@ListEntry{headsep}%
+ \ZREF@pl@ListEntry{footskip}%
+ \ZREF@pl@ListEntry{marginparwidth}%
+ \ZREF@pl@ListEntry{marginparsep}%
+ \ZREF@pl@ListEntry{columnwidth}%
+ \ZREF@pl@ListEntry{columnsep}%
+ }%
+ }%
+ }\x
+ \ifnum\ZREF@page@max>\count@
+ \advance\count@ by\ltx@one
+ \else
+ \expandafter\ltx@gobble
+ \fi
+ \ZREF@pl@ListPage
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pl@ListEntry}
+% \begin{macrocode}
+\def\ZREF@pl@ListEntry#1{%
+ \zref@ifpropundefined{#1}{%
+ }{%
+ \zref@ifrefcontainsprop{thepage\the\count@}{#1}{%
+ \ltx@space\ltx@space#1 = %
+ \zref@extract{thepage\the\count@}{#1}sp = %
+ \the\dimexpr\zref@extract{thepage\the\count@}{#1}sp\relax
+ \noexpand\MessageBreak
+ }{}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\AfterLastShipout{%
+ \ZREF@pl@AfterLastShipout
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</pagelayout>
+% \end{macrocode}
+%
+%
+% \subsection{Module \xmodule{pageattr}}
+%
+% \begin{macrocode}
+%<*pageattr>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{zref-pageattr}%
+ [2010/05/01 v2.17 Module pageattr for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{ifluatex}[2010/03/01]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifluatex
+ \ifnum\luatexversion<39 %
+ \else
+ \begingroup
+ \escapechar=-1 %
+ \def\ZREF@temp#1{%
+ \ltx@IfUndefined{\string#1}{%
+ \let#1\ltx@undefined
+ \directlua{%
+ if tex.enableprimitives then %
+ tex.enableprimitives('', {'\string#1'})%
+ end%
+ }%
+ \ltx@ifundefined{\string#1}{%
+ }{%
+ \global#1=#1%
+ \@PackageInfoNoLine{zref-pageattr}{%
+ \string#1 enabled%
+ }%
+ }%
+ }{}%
+ }%
+ \ZREF@temp\pdfpageattr
+ \ZREF@temp\pdfpagesattr
+ \endgroup
+ \fi
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\ZREF@temp=N%
+\ltx@IfUndefined{pdfpageattr}{%
+ \@PackageInfoNoLine{zref-pageattr}{%
+ \string\pdfpageattr\space is not available%
+ }%
+ \def\zref@pdfpageattr#1{}%
+ \def\zref@pdfpageattr@used#1{}%
+}{%
+ \RequirePackage{zref-thepage}[2010/05/01]%
+ \zref@newprop*{pdfpageattr}[]{\zref@hex{\the\pdfpageattr}}%
+ \zref@addprop{thepage}{pdfpageattr}%
+ \let\ZREF@temp=Y%
+}
+\ltx@IfUndefined{pdfpagesattr}{%
+ \@PackageInfoNoLine{zref-pageattr}{%
+ \string\pdfpagesattr\space is not available%
+ }%
+ \def\zref@pdfpagesattr{}%
+ \def\zref@pdfpagesattr@used{}%
+}{%
+ \RequirePackage{zref-lastpage}[2010/05/01]%
+ \zref@newprop*{pdfpagesattr}[]{\zref@hex{\the\pdfpagesattr}}%
+ \zref@addprop{LastPage}{pdfpagesattr}%
+ \let\ZREF@temp=Y%
+}%
+% \end{macrocode}
+% \begin{macrocode}
+\ifx\ZREF@temp N%
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{zref-abspage}[2010/05/01]
+\RequirePackage{atveryend}[2010/03/24]
+\RequirePackage{pdftexcmds}[2010/04/01]
+\let\ZREF@temp=Y%
+\ltx@IfUndefined{pdf@escapehex}{\let\ZREF@temp=N}{}
+\ltx@IfUndefined{pdf@unescapehex}{\let\ZREF@temp=N}{}
+\ifx\ZREF@temp N%
+ \let\zref@hex\ltx@firstofone
+ \let\zref@unhex\ltx@firstofone
+\else
+ \let\zref@hex\pdf@escapehex
+ \let\zref@unhex\pdf@unescapehex
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\ifZREF@pa@list}
+% \begin{macrocode}
+\ltx@newif\ifZREF@pa@list
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@listpageattr}
+% \begin{macrocode}
+\ZREF@IfDefinable\zlistpageattr\def{%
+ {\ZREF@pa@listtrue}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pa@AfterLastShipout}
+% \begin{macrocode}
+\def\ZREF@pa@AfterLastShipout{%
+ \ifZREF@pa@list
+ \edef\ZREF@page@max{\the\value{abspage}}%
+ \ltx@ifundefined{ZREF@org@testdef}{%
+ \let\ZREF@org@testdef\@testdef
+ \def\@testdef##1##2##3{%
+ \ZREF@org@testdef{##1}{##2}{##3}%
+ \def\ZREF@temp{##1}%
+ \ifx\ZREF@temp\ZREF@RefPrefix
+ \expandafter\xdef\csname##1@##2\endcsname{##3}%
+ \fi
+ }%
+ }{}%
+ \AtVeryEndDocument{\ZREF@pa@AtVeryEnd}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pa@AtVeryEnd}
+% \begin{macrocode}
+\ltx@IfUndefined{pdfpageattr}{%
+ \def\ZREF@pa@AtVeryEnd{}%
+}{%
+ \def\ZREF@pa@AtVeryEnd{%
+ \begingroup
+ \toks@{List of \ltx@backslashchar pdfpageattr:\MessageBreak}%
+ \count@=1 %
+ \ZREF@pa@ListPage
+ \edef\x{\endgroup
+ \noexpand\@PackageInfoNoLine{zref-pageattr}{%
+ \the\toks@
+ }%
+ }%
+ \x
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@pageattr}
+% \begin{macrocode}
+\def\zref@pageattr#1{%
+ \zref@unhex{%
+ \zref@extract{thepage\ZREF@number#1}{pdfpageattr}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@pageattr@used}
+% \begin{macrocode}
+\ZREF@Robust\def\zref@pageattr@used#1{%
+ \zref@refused{thepage\ZREF@number#1}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@pa@ListPage}
+% \begin{macrocode}
+ \def\ZREF@pa@ListPage{%
+ \edef\x{%
+ \toks@={%
+ \the\toks@
+ Page \the\count@:%
+ \noexpand\MessageBreak
+ \zref@ifrefundefined{thepage\the\count@}{}{%
+ <<\zref@pdfpageattr\count@>>%
+ \noexpand\MessageBreak
+ }%
+ }%
+ }\x
+ \ifnum\ZREF@page@max>\count@
+ \advance\count@ by\ltx@one
+ \else
+ \expandafter\ltx@gobble
+ \fi
+ \ZREF@pa@ListPage
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\ltx@IfUndefined{pdfpagesattr}{%
+}{%
+% \end{macrocode}
+% \begin{macro}{\zref@pdfpagesattr}
+% \begin{macrocode}
+ \def\zref@pdfpagesattr{%
+ \zref@unhex{%
+ \zref@extract{LastPage}{pdfpagesattr}%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@pdfpagesattr@used}
+% \begin{macrocode}
+ \ZREF@Robust\def\zref@pdfpagesattr@used{%
+ \zref@refused{LastPage}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \ltx@LocalAppendToMacro\ZREF@pa@AtVeryEnd{%
+ \@PackageInfoNoLine{zref-pageattr}{%
+ \ltx@backslashchar pdfpagesattr:\MessageBreak
+ <<\zref@pdfpagesattr>>%
+ \MessageBreak
+ }%
+ }%
+}
+\AfterLastShipout{%
+ \ZREF@pa@AfterLastShipout
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</pageattr>
+% \end{macrocode}
+%
+%
% \subsection{Module \xmodule{marks}}
%
% \begin{macrocode}
%<*marks>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-marks}%
- [2010/04/23 v2.15 Module marks for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module marks for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% \begin{macrocode}
@@ -2835,16 +3507,16 @@ the height difference of the two baselines is
\ifx\kv@value\relax
\def\kv@value{top,first,bot}%
\fi
- \edef\ZREF@temp{\expandafter\@car\kv@key X\@nil}%
+ \edef\ZREF@temp{\expandafter\ltx@car\kv@key X\@nil}%
\ifx\ZREF@temp\ZREF@STAR
- \edef\kv@key{\expandafter\@cdr\kv@key\@nil}%
+ \edef\kv@key{\expandafter\ltx@cdr\kv@key\@nil}%
\zref@newlist\kv@key
\fi
\expandafter\comma@parse\expandafter{\kv@value}{%
\ifcase0\ifx\comma@entry\ZREF@NAME@top 1\else
\ifx\comma@entry\ZREF@NAME@first 1\else
\ifx\comma@entry\ZREF@NAME@bot 1\fi\fi\fi\ltx@space
- \PackageWarning\ZREF@name{%
+ \PackageWarning{zref-marks}{%
Use `top', `first' or `bot' for the list values%
\MessageBreak
in the third argument of \string\zref@marks@register.%
@@ -2885,7 +3557,7 @@ the height difference of the two baselines is
\x
\fi
}{%
- \PackageWarning\ZREF@name{%
+ \PackageWarning{zref-marks}{%
\string\zref@marks@register\ltx@space does not generate the%
\MessageBreak
new property `#1\ZREF@TempName', because\MessageBreak
@@ -2901,13 +3573,13 @@ the height difference of the two baselines is
% \subsection{Module \xmodule{runs}}
%
% This module does not use the label-reference-system.
-% The reference changes with each \LaTeX~run and would
+% The reference changes with each \hologo{LaTeX}~run and would
% force a rerun warning always.
% \begin{macrocode}
%<*runs>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-runs}%
- [2010/04/23 v2.15 Module runs for zref (HO)]%
+ [2010/05/01 v2.17 Module runs for zref (HO)]%
% \end{macrocode}
%
% \begin{macro}{\zruns}
@@ -2939,9 +3611,12 @@ the height difference of the two baselines is
%<*perpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-perpage}%
- [2010/04/23 v2.15 Module perpage for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module perpage for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% This module resets a counter at page boundaries.
@@ -2952,7 +3627,7 @@ the height difference of the two baselines is
% For detecting changed pages module \xmodule{abspage}
% is loaded.
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/04/23]
+\RequirePackage{zref-abspage}[2010/05/01]
% \end{macrocode}
%
% We group the properties for the needed references
@@ -2996,8 +3671,10 @@ the height difference of the two baselines is
% \cs{stepcounter} on a new page the counter starts with
% one.
% \begin{macrocode}
-\newcommand*{\zmakeperpage}{%
- \@ifnextchar[\ZREF@makeperpage@opt{\ZREF@@makeperpage[\z@]}%
+\ZREF@IfDefinable\zmakeperpage\def{%
+ {%
+ \@ifnextchar[\ZREF@makeperpage@opt{\ZREF@@makeperpage[\ltx@zero]}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -3035,9 +3712,10 @@ the height difference of the two baselines is
% \end{macrocode}
% First the reference is generated.
% \begin{macrocode}
- \global\advance\c@zref@unique\@ne
+ \global\advance\c@zref@unique\ltx@one
\begingroup
- \expandafter\zref@labelbylist\expandafter{\thezref@unique}{perpage}%
+ \expandafter
+ \zref@labelbylist\expandafter{\thezref@unique}{perpage}%
% \end{macrocode}
% The \cs{expandafter} commands are necessary, because \cs{ZREF@temp}
% is also used inside of \cs{zref@labelbylist}.
@@ -3048,7 +3726,9 @@ the height difference of the two baselines is
\zref@ifrefundefined\thezref@unique{%
\global\c@zpage=\c@page
\global\let\thezpage\thepage
- \expandafter\xdef\csname ZREF@abspage@#1\endcsname{\number\c@abspage}%
+ \expandafter\xdef\csname ZREF@abspage@#1\endcsname{%
+ \number\c@abspage
+ }%
}{%
% \end{macrocode}
% The reference is used to set \cs{thezpage} and counter |zpage|.
@@ -3056,7 +3736,8 @@ the height difference of the two baselines is
\global\c@zpage=\zref@extract\thezref@unique{pagevalue}\relax
\xdef\thezpage{\noexpand\zref@extract{\thezref@unique}{page}}%
\expandafter\xdef\csname ZREF@abspage@#1\endcsname{%
- \zref@extractdefault\thezref@unique{abspage}{\number\c@abspage}%
+ \zref@extractdefault\thezref@unique
+ {abspage}{\number\c@abspage}%
}%
}%
% \end{macrocode}
@@ -3077,8 +3758,11 @@ the height difference of the two baselines is
% \begin{macro}{\zunmakeperpage}
% Macro \cs{zunmakeperpage} cancels the effect of \cs{zmakeperpage}.
% \begin{macrocode}
-\newcommand*{\zunmakeperpage}[1]{%
- \global\expandafter\let\csname ZREF@perpage@#1\endcsname\@undefined
+\ZREF@IfDefinable\zunmakeperpage\def{%
+ #1{%
+ \global\expandafter
+ \let\csname ZREF@perpage@#1\endcsname\@undefined
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -3094,9 +3778,12 @@ the height difference of the two baselines is
%<*titleref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-titleref}%
- [2010/04/23 v2.15 Module titleref for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module titleref for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
\RequirePackage{gettitlestring}[2009/12/08]
% \end{macrocode}
%
@@ -3114,7 +3801,7 @@ the height difference of the two baselines is
% to catch the current title and remember the value in
% \cs{zref@titleref@current}.
% \begin{macrocode}
-\let\zref@titleref@current\@empty
+\let\zref@titleref@current\ltx@empty
% \end{macrocode}
% \end{macro}
% Now we can add the property \verb|title| is added to
@@ -3156,7 +3843,7 @@ the height difference of the two baselines is
% removed. The hook is executed before the expansion of
% \cs{zref@titleref@current}.
% \begin{macrocode}
-\let\ZREF@titleref@hook\@empty
+\let\ZREF@titleref@hook\ltx@empty
% \end{macrocode}
% \end{macro}
% \begin{macro}{\zref@titleref@cleanup}
@@ -3165,7 +3852,7 @@ the height difference of the two baselines is
% and prevents that a previous non-empty content is not discarded
% accidently.
% \begin{macrocode}
-\def\zref@titleref@cleanup#1{%
+\ZREF@Robust\def\zref@titleref@cleanup#1{%
\begingroup
\toks@\expandafter{%
\ZREF@titleref@hook
@@ -3197,7 +3884,7 @@ the height difference of the two baselines is
% expansion is performed that can be controlled by the
% previous switches.
% \begin{macrocode}
-\def\zref@titleref@setcurrent#1{%
+\ZREF@Robust\def\zref@titleref@setcurrent#1{%
\ifzref@titleref@expand
\GetTitleStringExpand{#1}%
\else
@@ -3209,7 +3896,7 @@ the height difference of the two baselines is
\ifzref@titleref@stripperiod
\edef\zref@titleref@current{%
\expandafter\ZREF@stripperiod\zref@titleref@current
- \@empty.\@empty\@nil
+ \ltx@empty.\ltx@empty\@nil
}%
\fi
}%
@@ -3221,9 +3908,9 @@ the height difference of the two baselines is
% \begin{macro}{\ZREF@stripperiod}
% If \cs{ZREF@stripperiod} is called, the argument consists of
% space tokens and tokens with catcode 12 (other), because
-% of \eTeX's \cs{detokenize}.
+% of \hologo{eTeX}'s \cs{detokenize}.
% \begin{macrocode}
-\def\ZREF@stripperiod#1.\@empty#2\@nil{#1}%
+\def\ZREF@stripperiod#1.\ltx@empty#2\@nil{#1}%
% \end{macrocode}
% \end{macro}
%
@@ -3248,8 +3935,8 @@ the height difference of the two baselines is
\define@key{ZREF@TR}{title}{%
\def\zref@titleref@current{#1}%
}%
-\newcommand*{\ztitlerefsetup}{%
- \setkeys{ZREF@TR}%
+\ZREF@IfDefinable\ztitlerefsetup\def{%
+ {\setkeys{ZREF@TR}}%
}%
% \end{macrocode}
% \end{macro}
@@ -3259,8 +3946,8 @@ the height difference of the two baselines is
% For safety \cs{label} is disabled to prevent multiply
% defined references.
% \begin{macrocode}
-\newcommand*{\ztitleref}{%
- \zref@wrapper@babel\ZREF@titleref
+\ZREF@IfDefinable\ztitleref\def{%
+ {\zref@wrapper@babel\ZREF@titleref}%
}%
\def\ZREF@titleref#1{%
\begingroup
@@ -3333,6 +4020,17 @@ the height difference of the two baselines is
}%
% \end{macrocode}
%
+% \subsubsection{Environment \textsf{description}}
+%
+% \begin{macrocode}
+ \ZREF@patch{descriptionlabel}{%
+ \def\descriptionlabel#1{%
+ \zref@titleref@setcurrent{#1}%
+ \ZREF@org@descriptionlabel{#1}%
+ }%
+ }%
+% \end{macrocode}
+%
% \subsubsection{Class \xclass{memoir}}
%
% \begin{macrocode}
@@ -3435,7 +4133,7 @@ the height difference of the two baselines is
\@ifpackageloaded{listings}{%
\ZREF@patch{lst@MakeCaption}{%
\def\lst@MakeCaption{%
- \ifx\lst@label\@empty
+ \ifx\lst@label\ltx@empty
\else
\expandafter\zref@titleref@setcurrent\expandafter{%
\lst@@caption
@@ -3490,9 +4188,12 @@ the height difference of the two baselines is
%<*xr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-xr}%
- [2010/04/23 v2.15 Module xr for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module xr for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
% \begin{macrocode}
\RequirePackage{keyval}
@@ -3504,11 +4205,45 @@ the height difference of the two baselines is
% Or if |hyperref| is used, then this property can be asked.
% \begin{macrocode}
\zref@newprop{url}{}%
+\zref@newprop{urluse}{}%
% \end{macrocode}
% \begin{macrocode}
\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.
@@ -3541,6 +4276,7 @@ the height difference of the two baselines is
\define@key{ZREF@XR}{ext}{%
\def\zref@xr@{#1}%
}
+\DeclareBoolOption[false]{urluse}
% \end{macrocode}
% \begin{macro}{\zxrsetup}
% \begin{macrocode}
@@ -3550,6 +4286,47 @@ the height difference of the two baselines is
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ZREF@xr@URL}
+% \begin{macrocode}
+\newcount\ZREF@xr@URL
+\ZREF@xr@URL=\ltx@zero
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@xr@AddURL}
+% \begin{macrocode}
+\def\ZREF@xr@AddURL#1{%
+ \begingroup
+ \def\ZREF@temp{#1}%
+ \count@=\ltx@one
+ \ZREF@xr@@AddUrl
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@xr@@AddUrl}
+% \begin{macrocode}
+\def\ZREF@xr@@AddUrl{%
+ \ifnum\count@>\ZREF@xr@URL
+ \global\advance\ZREF@xr@URL by\ltx@one
+ \xdef\ZREF@xr@theURL{\romannumeral\ZREF@xr@URL}%
+ \global\expandafter\let
+ \csname Z@U@\ZREF@xr@theURL\endcsname\ZREF@temp
+ \@PackageInfo{zref-xr}{%
+ \ltx@backslashchar Z@U@\ZREF@xr@theURL:\MessageBreak
+ \ZREF@temp\MessageBreak
+ }%
+ \else
+ \expandafter
+ \ifx\csname Z@U@\romannumeral\count@\endcsname\ZREF@temp
+ \xdef\ZREF@xr@theURL{\romannumeral\count@}%
+ \else
+ \expandafter\expandafter\expandafter\ZREF@xr@@AddUrl
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\zexternaldocument}
% In its star form it looks for \cs{newlabel},
% otherwise for \cs{zref@newlabel}.
@@ -3557,28 +4334,21 @@ the height difference of the two baselines is
% will read \xfile{.aux} files that expects
% |@| to have catcode 11 (letter).
% \begin{macrocode}
-\newcommand*{\zexternaldocument}{%
- \zref@ifpropundefined{title}{%
- \zref@newprop{title}{}%
- }{}%
- \zref@ifpropundefined{anchor}{%
- \zref@newprop{anchor}{%
- \ltx@ifundefined{@currentHref}{}{\@currentHref}%
- }%
- }{}%
- \zref@ifpropundefined{url}{%
- \zref@newprop{url}{}%
- }{}%
- \begingroup
- \csname @safe@actives@true\endcsname
- \makeatletter
- \@ifstar{%
- \ZREF@xr@zreflabelfalse
- \@testopt\ZREF@xr@externaldocument{}%
- }{%
- \ZREF@xr@zreflabeltrue
- \@testopt\ZREF@xr@externaldocument{}%
- }%
+\ZREF@IfDefinable\zexternaldocument\def{%
+ {%
+ \ZREF@xr@NewPropAnchor
+ \ZREF@xr@NewPropTitle
+ \begingroup
+ \csname @safe@actives@true\endcsname
+ \makeatletter
+ \@ifstar{%
+ \ZREF@xr@zreflabelfalse
+ \@testopt\ZREF@xr@externaldocument{}%
+ }{%
+ \ZREF@xr@zreflabeltrue
+ \@testopt\ZREF@xr@externaldocument{}%
+ }%
+ }%
}%
% \end{macrocode}
% \end{macro}
@@ -3588,7 +4358,7 @@ the height difference of the two baselines is
% one after another, especially they are not recursively
% read in order to save read registers. Thus it can
% happen that the read order of the newlabel commands
-% differs from \LaTeX's order using \cs{input}.
+% differs from \hologo{LaTeX}'s order using \cs{input}.
%
% \begin{macro}{\ZREF@xr@externaldocument}
% It reads the remaining arguments. \cs{newcommand}
@@ -3596,7 +4366,7 @@ the height difference of the two baselines is
% \begin{macrocode}
\def\ZREF@xr@externaldocument[#1]#2{%
\def\ZREF@xr@prefix{#1}%
- \let\ZREF@xr@filelist\@empty
+ \let\ZREF@xr@filelist\ltx@empty
\edef\ZREF@xr@externalfile{#2}%
\edef\ZREF@xr@file{\ZREF@xr@externalfile.aux}%
\filename@parse{#2}%
@@ -3604,6 +4374,11 @@ the height difference of the two baselines is
}%
\def\ZREF@xr@graburl[#1]{%
\edef\ZREF@xr@url{#1}%
+ \ifZREF@xr@urluse
+ \expandafter\ZREF@xr@AddURL\expandafter{\ZREF@xr@url}%
+ \expandafter\def\expandafter\ZREF@xr@url
+ \expandafter{\csname Z@U@\ZREF@xr@theURL\endcsname}%
+ \fi
\ZREF@xr@checkfile
\endgroup
}%
@@ -3622,7 +4397,8 @@ the height difference of the two baselines is
}%
\else
\PackageInfo{zref-xr}{%
- Label \ifZREF@xr@zreflabel (zref) \fi import from `\ZREF@xr@file'%
+ Label \ifZREF@xr@zreflabel (zref) \fi
+ import from `\ZREF@xr@file'%
}%
\def\ZREF@xr@found{0}%
\def\ZREF@xr@ignored@empty{0}%
@@ -3631,7 +4407,7 @@ the height difference of the two baselines is
\ZREF@xr@processfile
\closein\@inputcheck
\begingroup
- \let\on@line\@empty
+ \let\on@line\ltx@empty
\PackageInfo{zref-xr}{%
Statistics for `\ZREF@xr@file':\MessageBreak
\ZREF@xr@found\space
@@ -3643,19 +4419,25 @@ the height difference of the two baselines is
\fi
\ifnum\ZREF@xr@ignored@zref>0 %
,\MessageBreak
- \ZREF@xr@ignored@zref\space doublicated zref label(s) ignored%
+ \ZREF@xr@ignored@zref\space
+ duplicated zref label(s) ignored%
\fi
\ifnum\ZREF@xr@ignored@ltx>0 %
,\MessageBreak
- \ZREF@xr@ignored@ltx\space doublicated latex label(s) ignored%
+ \ZREF@xr@ignored@ltx\space
+ duplicated latex label(s) ignored%
\fi
}%
\endgroup
\fi
- \ifx\ZREF@xr@filelist\@empty
+ \ifx\ZREF@xr@filelist\ltx@empty
\else
- \edef\ZREF@xr@file{\expandafter\@car\ZREF@xr@filelist\@nil}%
- \edef\ZREF@xr@filelist{\expandafter\@cdr\ZREF@xr@filelist\@nil}%
+ \edef\ZREF@xr@file{%
+ \expandafter\ltx@car\ZREF@xr@filelist\@nil
+ }%
+ \edef\ZREF@xr@filelist{%
+ \expandafter\ltx@cdr\ZREF@xr@filelist\ltx@empty\@nil
+ }%
\expandafter\ZREF@xr@checkfile
\fi
}%
@@ -3683,11 +4465,13 @@ the height difference of the two baselines is
\toks@{#2}%
\ifZREF@xr@zreflabel
\ifx\x\ZREF@xr@zref@newlabel
- \expandafter\ZREF@xr@process@zreflabel\ZREF@xr@line...\ZREF@nil
+ \expandafter
+ \ZREF@xr@process@zreflabel\ZREF@xr@line...\ZREF@nil
\fi
\else
\ifx\x\ZREF@xr@newlabel
- \expandafter\ZREF@xr@process@label\ZREF@xr@line...[]\ZREF@nil
+ \expandafter
+ \ZREF@xr@process@label\ZREF@xr@line...[]\ZREF@nil
\fi
\fi
\ifx\x\ZREF@xr@@input
@@ -3704,7 +4488,7 @@ the height difference of the two baselines is
\edef\ZREF@xr@tempname{$temp$}%
\edef\ZREF@xr@temprefname{Z@R@\ZREF@xr@tempname}%
\let\ZREF@xr@list\x
- \ifx\ZREF@xr@list\@empty
+ \ifx\ZREF@xr@list\ltx@empty
\PackageWarningNoLine{zref-xr}{%
Label `#1' without properties ignored\MessageBreak
in file `\ZREF@xr@file'%
@@ -3754,14 +4538,12 @@ the height difference of the two baselines is
\ifx\\#4\\%
\else
% ntheorem knows an optional argument at the end of \newlabel
- \zref@ifpropundefined{theotype}{%
- \zref@newprop{theotype}{}%
- }{}%
+ \ZREF@xr@NewPropTheotype
\expandafter\ltx@LocalAppendToMacro
\csname\ZREF@xr@temprefname\endcsname{\theotype{#4}}%
\fi
\expandafter\ltx@LocalAppendToMacro
- \csname\ZREF@xr@temprefname\expandafter\endcsname\expandafter{%
+ \csname\ZREF@xr@temprefname\expandafter\endcsname\expandafter{%
\expandafter\externaldocument\expandafter{%
\ZREF@xr@externalfile
}%
@@ -3820,7 +4602,11 @@ the height difference of the two baselines is
\ltx@ifpackageloaded{nameref}{%
{\zref@extractdefault{#1}{title}{}}%
{\zref@extractdefault{#1}{anchor}{}}%
- {\zref@extractdefault{#1}{url}{}}%
+ \zref@ifrefcontainsprop{#1}{urluse}{%
+ {\zref@extractdefault{#1}{urluse}{}}%
+ }{%
+ {\zref@extractdefault{#1}{url}{}}%
+ }%
}{}%
}%
}%
@@ -3880,7 +4666,7 @@ the height difference of the two baselines is
% \begin{macro}{\ZREF@xr@scanparams}
% \begin{macrocode}
\def\ZREF@xr@scanparams#1#2#3#4#5#6#7\ZREF@nil{%
- \let#1\@empty
+ \let#1\ltx@empty
\ZREF@foundfalse
\ZREF@xr@scantitleref#1#2\TR@TitleReference{}{}\ZREF@nil
\ifZREF@found
@@ -3908,7 +4694,17 @@ the height difference of the two baselines is
\fi
\ifx\\#6\\%
\else
- \ltx@LocalAppendToMacro#1{\url{#6}}%
+ \ifZREF@xr@urluse
+ \ZREF@xr@AddURL{#6}%
+ \expandafter\ltx@LocalAppendToMacro\expandafter#1%
+ \expandafter{%
+ \expandafter\urluse\expandafter{%
+ \csname Z@U@\ZREF@xr@theURL\endcsname
+ }%
+ }%
+ \else
+ \ltx@LocalAppendToMacro#1{\url{#6}}%
+ \fi
\fi
}%
% \end{macrocode}
@@ -3938,7 +4734,8 @@ the height difference of the two baselines is
\expandafter
\ltx@LocalAppendToMacro\csname Z@R@#1\expandafter\endcsname
\expandafter{%
- \expandafter\url\expandafter{\ZREF@xr@url}%
+ \csname url\ifZREF@xr@urluse use\fi
+ \expandafter\endcsname\expandafter{\ZREF@xr@url}%
}%
}%
}{%
@@ -3960,15 +4757,20 @@ the height difference of the two baselines is
%<*hyperref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-hyperref}%
- [2010/04/23 v2.15 Module hyperref for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module hyperref for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% \begin{macrocode}
-\zref@newprop{anchor}[]{%
- \ltx@ifundefined{@currentHref}{}{\@currentHref}%
-}%
+\ltx@ifpackageloaded{zref-xr}{}{%
+ \zref@newprop{anchor}[]{%
+ \ltx@ifundefined{@currentHref}{}{\@currentHref}%
+ }%
+}
\zref@addprop\ZREF@mainlist{anchor}%
% \end{macrocode}
%
@@ -3989,9 +4791,12 @@ the height difference of the two baselines is
%<*savepos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-savepos}%
- [2010/04/23 v2.15 Module savepos for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module savepos for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% \subsubsection{Availability}
@@ -4009,7 +4814,7 @@ the height difference of the two baselines is
% In PDF mode we are done. However support for DVI mode
% was added later in version 1.40.0. In earlier versions
% \cs{pdfsavepos} is defined, but its execution raises
-% an error. Note that Xe\TeX\ also provides \cs{pdfsavepos}.
+% an error. Note that \hologo{XeTeX} also provides \cs{pdfsavepos}.
% \begin{macrocode}
\RequirePackage{ifpdf}
\ifpdf
@@ -4043,13 +4848,15 @@ the height difference of the two baselines is
% The current location is stored in a reference with the
% given name.
% \begin{macrocode}
-\def\zsavepos#1{%
- \@bsphack
- \if@filesw
- \pdfsavepos
- \zref@labelbylist{#1}{savepos}%
- \fi
- \@esphack
+\ZREF@IfDefinable\zsavepos\def{%
+ #1{%
+ \@bsphack
+ \if@filesw
+ \pdfsavepos
+ \zref@labelbylist{#1}{savepos}%
+ \fi
+ \@esphack
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -4078,28 +4885,70 @@ the height difference of the two baselines is
%
% Also it is in the responsibility of the user to marked
% used positions by \cs{zrefused}
-% in order to notify \LaTeX\ about undefined references.
+% in order to notify \hologo{LaTeX} about undefined references.
+%
+% \begin{macro}{\ZREF@savepos@ok}
+% \begin{macrocode}
+\let\ZREF@savepos@ok=Y
+% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%</savepos>
% \end{macrocode}
%
%
+% \subsection{Module \xmodule{abspos}}
+%
+% \subsubsection{Identification}
+%
+% \begin{macrocode}
+%<*abspos>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{zref-abspos}%
+ [2010/05/01 v2.17 Module abspos for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{zref-savepos}[2010/05/01]
+\ifx\ZREF@savepos@ok Y%
+\else
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{zref-pagelayout}[2010/05/01]
+\zref@addprop{savepos}{abspage}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</abspos>
+% \end{macrocode}
+%
+%
% \subsection{Module \xmodule{dotfill}}
%
% \begin{macrocode}
%<*dotfill>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-dotfill}%
- [2010/04/23 v2.15 Module dotfill for zref (HO)]%
-\RequirePackage{zref-base}[2010/04/23]
-\@ifundefined{ZREF@baseok}{\endinput}{}
+ [2010/05/01 v2.17 Module dotfill for zref (HO)]%
+\RequirePackage{zref-base}[2010/05/01]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
% \end{macrocode}
%
% For measuring the width of \cs{zdotfill} we use the features
% provided by module \xmodule{savepos}.
% \begin{macrocode}
-\RequirePackage{zref-savepos}[2010/04/23]
+\RequirePackage{zref-savepos}[2010/05/01]
% \end{macrocode}
% For automatically generated label names we use the unique
% counter of module \xmodule{base}.
@@ -4141,28 +4990,31 @@ the height difference of the two baselines is
% the horizontal position. \cs{zsavepos} is not used, because
% we do not need the vertical position.
% \begin{macrocode}
-\newcommand*{\zdotfill}{%
- \leavevmode
- \global\advance\c@zref@unique\@ne
- \begingroup
- \def\ZREF@temp{zref@\number\c@zref@unique}%
- \pdfsavepos
- \zref@labelbyprops{\thezref@unique L}{posx}%
- \setlength{\dimen@}{\ZREF@df@unit}%
- \zref@ifrefundefined{\thezref@unique R}{%
- \ZREF@dotfill
- }{%
- \ifnum\numexpr\zposx{\thezref@unique R}-\zposx{\thezref@unique L}\relax
- <\dimexpr\ZREF@df@min\dimen@\relax
- \hfill
- \else
+\ZREF@IfDefinable\zdotfill\def{%
+ {%
+ \leavevmode
+ \global\advance\c@zref@unique\ltx@one
+ \begingroup
+ \def\ZREF@temp{zref@\number\c@zref@unique}%
+ \pdfsavepos
+ \zref@labelbyprops{\thezref@unique L}{posx}%
+ \setlength{\dimen@}{\ZREF@df@unit}%
+ \zref@ifrefundefined{\thezref@unique R}{%
\ZREF@dotfill
- \fi
- }%
- \pdfsavepos
- \zref@labelbyprops{\thezref@unique R}{posx}%
- \endgroup
- \kern\z@
+ }{%
+ \ifnum\numexpr\zposx{\thezref@unique R}%
+ -\zposx{\thezref@unique L}\relax
+ <\dimexpr\ZREF@df@min\dimen@\relax
+ \hfill
+ \else
+ \ZREF@dotfill
+ \fi
+ }%
+ \pdfsavepos
+ \zref@labelbyprops{\thezref@unique R}{posx}%
+ \endgroup
+ \kern\z@
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -4188,25 +5040,35 @@ the height difference of the two baselines is
\NeedsTeXFormat{LaTeX2e}
\nofiles
\documentclass{article}
-\usepackage{zref-base}[2010/04/23]
+\usepackage{zref-base}[2010/05/01]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
\makeatletter
+\def\ExpectList#1#2{%
+ \expandafter\expandafter\expandafter\Expect
+ \expandafter\expandafter\expandafter{\csname Z@L@#1\endcsname}{#2}%
+}
\begin{qstest}{localaddprop}{localaddprop}
- \Expect*{\Z@L@main}*{{default}{page}}%
+ \ExpectList{main}{\default\page}%
+ \Expect{undefined}*{\meaning\foobar}%
\zref@newprop{foobar}{FOO}%
+ \Expect{undefined}*{\meaning\foobar}%
\zref@newlist{alist}%
- \Expect*{\Z@L@alist}{}%
+ \ExpectList{alist}{}%
\begingroup
\zref@localaddprop{main}{foobar}%
- \Expect*{\Z@L@main}{{default}{page}{foobar}}%
+ \Expect{undefined}*{\meaning\foobar}%
+ \ExpectList{main}{\default\page\foobar}%
\zref@localaddprop{alist}{page}%
- \Expect*{\Z@L@alist}{{page}}%
+ \ExpectList{alist}{\page}%
\endgroup
- \Expect*{\Z@L@main}*{{default}{page}}%
- \Expect*{\Z@L@alist}{}%
+ \ExpectList{main}{\default\page}%
+ \ExpectList{alist}{}%
+ \zref@addprop{alist}{foobar}%
+ \ExpectList{alist}{\foobar}%
+ \Expect{undefined}*{\meaning\foobar}%
\end{qstest}
\@@end
%</test1>
@@ -4218,7 +5080,7 @@ the height difference of the two baselines is
%<*test-base>
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
-\usepackage{zref-base,zref-titleref}[2010/04/23]
+\usepackage{zref-base,zref-titleref}[2010/05/01]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -4263,7 +5125,8 @@ the height difference of the two baselines is
}{%
\Test{\zref@extract{sec:hello}{default}}{1}{1}%
\Test{\zref@extract{sec:hello}{title}}%
- {[Hello] <World>}{\noexpand\textit{Hello} \noexpand\textbf{World}}%
+ {[Hello] <World>}%
+ {\noexpand\textit{Hello} \noexpand\textbf{World}}%
}%
\end{qstest}
\end{document}
@@ -4276,7 +5139,7 @@ the height difference of the two baselines is
%<*test-runs>
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
-\usepackage{zref-runs}[2010/04/23]
+\usepackage{zref-runs}[2010/05/01]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -4305,7 +5168,7 @@ the height difference of the two baselines is
%<*test-titleref-memoir>
\NeedsTeXFormat{LaTeX2e}
\documentclass{memoir}
-\usepackage{zref-titleref}[2010/04/23]
+\usepackage{zref-titleref}[2010/05/01]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -4358,7 +5221,6 @@ the height difference of the two baselines is
\newpage
\List
\end{document}
-
%</test-titleref-memoir>
% \end{macrocode}
%
@@ -4424,12 +5286,15 @@ the height difference of the two baselines is
% zref.sty & tex/latex/oberdiek/zref.sty\\
% zref-base.sty & tex/latex/oberdiek/zref-base.sty\\
% zref-abspage.sty & tex/latex/oberdiek/zref-abspage.sty\\
+% 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-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\\
% zref-nextpage.sty & tex/latex/oberdiek/zref-nextpage.sty\\
+% zref-pageattr.sty & tex/latex/oberdiek/zref-pageattr.sty\\
+% zref-pagelayout.sty & tex/latex/oberdiek/zref-pagelayout.sty\\
% zref-perpage.sty & tex/latex/oberdiek/zref-perpage.sty\\
% zref-runs.sty & tex/latex/oberdiek/zref-runs.sty\\
% zref-savepos.sty & tex/latex/oberdiek/zref-savepos.sty\\
@@ -4624,7 +5489,7 @@ the height difference of the two baselines is
% \item
% \cs{zref@getcurrent} added (suggestion of Igor Akkerman).
% \item
-% Module \xmodule{savepos} also supports Xe\TeX.
+% Module \xmodule{savepos} also supports \hologo{XeTeX}.
% \end{Version}
% \begin{Version}{2007/04/06 v1.6}
% \item
@@ -4652,7 +5517,7 @@ the height difference of the two baselines is
% \end{Version}
% \begin{Version}{2007/05/06 v2.0}
% \item
-% Uses package \xpackage{etexcmds} for accessing \eTeX's \cs{unexpanded}.
+% Uses package \xpackage{etexcmds} for accessing \hologo{eTeX}'s \cs{unexpanded}.
% \end{Version}
% \begin{Version}{2007/05/28 v2.1}
% \item
@@ -4767,6 +5632,30 @@ the height difference of the two baselines is
% \item
% Nested calls of \cs{zref@wrapper@unexpanded} possible.
% \end{Version}
+% \begin{Version}{2010/04/28 v2.16}
+% \item
+% More consequent use of package `ltxcmds' and `hologo'.
+% \item
+% Module \xmodule{pagelayout} added.
+% \item
+% Module \xmodule{pageattr} added.
+% \item
+% Robustness introduced for non-expandable interface macros.
+% \item
+% Internal change of the data format of property lists
+% (suggestion of Florent Chervet).
+% \item
+% Module \xmodule{titleref}: Support of environment \textsf{description}.
+% \end{Version}
+% \begin{Version}{2010/05/01 v2.17}
+% \item
+% \cs{zref@newprop} throws an error if the property already exists.
+% \item
+% Module \xmodule{xr}: Bug fix for the case of several \xext{aux} files
+% (bug found by Victor Ivrii).
+% \item
+% Module \xmodule{xr}: Property `urluse' and option \xoption{urluse} added.
+% \end{Version}
% \end{History}
%
% \PrintIndex