diff options
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/accsupp.dtx | 10 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/bookmark.dtx | 33 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/catchfile.dtx | 188 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hologo.dtx | 142 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx | 14 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx | 371 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/zref.dtx | 1567 |
10 files changed, 1922 insertions, 425 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx b/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx index 1917be4d139..aa5950ea5fc 100644 --- a/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx @@ -275,7 +275,7 @@ and the derived files % \item[\xoption{method=pdfstringdef}:] % If package \xpackage{hyperref} is loaded, then its \cs{pdfstringdef} % is used. This method is slow, but useful if the string contains -% arbitrary \TeX\ code. +% arbitrary \hologo{TeX} code. % \item[\xoption{unicode}:] % This option is needed, if the string is given as Unicode string % (16 bit). Internally it adds the string prefix for Unicode. @@ -323,13 +323,13 @@ and the derived files % \subsection{Driver options} % % Driver options are package options only. -% The special \TeX\ compilers \pdfTeX\ and Xe\TeX are detected -% automatically. The default for unrecognized drivers can be +% The special \hologo{TeX} compilers \hologo{pdfTeX} and \hologo{XeTeX} +% are detected automatically. The default for unrecognized drivers can be % set by defining \cs{ActualTextDriverDefault}. This can be done % in the configuration file \xfile{accsupp.cfg}. % % \subsubsection{Option \xoption{pdftex}}\label{sec:pdftex} -% Package option \xoption{pdftex} is used for \pdfTeX\ in PDF mode. +% Package option \xoption{pdftex} is used for \hologo{pdfTeX} in PDF mode. % Additionally \cs{BeginAccSupp} and \cs{EndAccSupp} understand % option \xoption{pdfliteral}. It controls % the modifier keyword for \cs{pdfliteral}: @@ -360,7 +360,7 @@ and the derived files % \end{quote} % Or the PDF file is generated uncompressed: % \begin{description} -% \item[\pdfTeX:] |\pdfcompresslevel=0| +% \item[\hologo{pdfTeX}:] |\pdfcompresslevel=0| % \item[dvipdfm:] |dvipdfm -z0 ...| % \item[dvipdfmx:] |dvipdfmx -z0 ...| % \item[ghostscript/ps2pdf:] diff --git a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx index efc44290276..be438c3d170 100644 --- a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx @@ -217,7 +217,7 @@ and the derived files % This package \xpackage{bookmark} tries to provide a more modern % management for bookmarks: % \begin{itemize} -% \item The bookmarks are already generated in the first \TeX\ compile run. +% \item The bookmarks are already generated in the first \hologo{TeX} compile run. % \item The font style and color of the bookmarks can be changed. % \item More actions than simple GoTo actions are possible. % \end{itemize} @@ -259,7 +259,8 @@ and the derived files % Supported drivers are \xoption{pdftex}, \xoption{dvips}, % \xoption{dvipsone}, \xoption{textures}, % \xoption{dvipdfm} (\xoption{xetex}), and \xoption{vtex}. -% The \TeX\ engines \pdfTeX, Xe\TeX, and V\TeX\ are automatically detected. +% The \hologo{TeX} engines \hologo{pdfTeX}, \hologo{XeTeX}, +% and \hologo{VTeX} are automatically detected. % The default for the DVI drivers is \xoption{dvips}. This can % be changed in the configuration file \xfile{bookmark.cfg} by % \cs{BookmarkDefaultDriver}, e.g.: @@ -291,7 +292,7 @@ and the derived files % Both \xoption{bold} and \xoption{italic} can be used together. % Using value |false| disables the font option. % -% These options are ignored with a warning if \eTeX\ is not +% These options are ignored with a warning if \hologo{eTeX} is not % detected. % % \paragraph{Color option.} @@ -328,7 +329,7 @@ and the derived files % with unit bp. They can be given either as plain numbers or % as length expressions inside \cs{calc}. Expressions of % package \xpackage{calc} are supported if the package is loaded. -% Otherwise \eTeX's \cs{dimexpr} is used. Example:\\ +% Otherwise \hologo{eTeX}'s \cs{dimexpr} is used. Example:\\ % |view={FitH \calc{\paperheight-\topmargin-1in}}|\\ % |view={XYZ 0 \calc{\paperheight} null}|\\ % Note that \cs{calc} cannot be used for the third parameter @@ -544,7 +545,7 @@ and the derived files % \cs{special} that does not have an effect after the last % page. In this case \cs{AtEndDvi} of package \xpackage{atenddvi} % helps. It puts its argument on last page of the document. -% Two \LaTeX\ runs are necessary at least, because +% Two \hologo{LaTeX} runs are necessary at least, because % the last page is detected by a reference. % \item % The time of expansion of the argument of \cs{BookmarkAtEnd} @@ -681,7 +682,7 @@ and the derived files % % \subsubsection{Requirements} % -% \paragraph{\eTeX.} +% \paragraph{\hologo{eTeX}.} % % \begin{macro}{\BKM@CalcExpr} % \begin{macrocode} @@ -706,7 +707,7 @@ and the derived files % \end{macrocode} % \end{macro} % -% \paragraph{Escape features of \pdfTeX.} +% \paragraph{Escape features of \hologo{pdfTeX}.} % % \begin{macrocode} \RequirePackage{pdfescape}[2007/03/20] @@ -1818,7 +1819,7 @@ and the derived files %</dvipdfm> % \end{macrocode} % -% \subsection{Driver for V\TeX} +% \subsection{Driver for \hologo{VTeX}} % % \begin{macrocode} %<*vtex> @@ -2149,7 +2150,7 @@ and the derived files %</vtex> % \end{macrocode} % -% \subsection{Driver for \pdfTeX} +% \subsection{Driver for \hologo{pdfTeX}} % % \begin{macrocode} %<*pdftex> @@ -2350,7 +2351,7 @@ and the derived files % % \begin{macro}{\BKM@pdfmark@out} % Do not use package \xpackage{rerunfilecheck} here, because -% the file \cs{BKM@filename} is not read during the \TeX\ run. +% the file \cs{BKM@filename} is not read during the \hologo{TeX} run. % \begin{macrocode} \def\BKM@pdfmark@out{% \if@filesw @@ -2731,7 +2732,7 @@ and the derived files % last page can already be output. Therefore we use package % \xpackage{atenddvi} that uses the help of packages \xpackage{atbegshi} % and \xpackage{zref}. The argument of \cs{AtEndDvi} is put -% at the end of the last page. At least two \LaTeX\ runs are necessary. +% at the end of the last page. At least two \hologo{LaTeX} runs are necessary. % \begin{macrocode} %<*dvipdfm|vtex> \ifBKM@atend @@ -2939,11 +2940,11 @@ and the derived files % Option \xoption{startatroot} added. % \item % Dummies for \cs{pdf(un)escape...} commands added to get -% the package basically work for non-pdfTeX users. +% the package basically work for non-\hologo{pdfTeX} users. % \end{Version} % \begin{Version}{2007/02/21 v0.3} % \item -% Dependency from \pdfTeX\ 1.30 removed by using package +% Dependency from \hologo{pdfTeX} 1.30 removed by using package % \xpackage{pdfescape}. % \end{Version} % \begin{Version}{2007/02/22 v0.4} @@ -2969,7 +2970,7 @@ and the derived files % \end{Version} % \begin{Version}{2007/03/07 v0.7} % \item -% Dependency from \eTeX\ removed. +% Dependency from \hologo{eTeX} removed. % \end{Version} % \begin{Version}{2007/04/09 v0.8} % \item @@ -3005,7 +3006,7 @@ and the derived files % \begin{Version}{2008/08/08 v1.3} % \item % Package \xpackage{flags} replaced by package \xpackage{bitset}. -% Now flags are also supported without \eTeX. +% Now flags are also supported without \hologo{eTeX}. % \item % Hook for package \xpackage{hypdestopt} added. % \end{Version} @@ -3031,7 +3032,7 @@ and the derived files % \end{Version} % \begin{Version}{2009/12/17 v1.8} % \item -% Support of \xpackage{hyperref} 2009/12/17 v6.79v for Xe\TeX. +% Support of \xpackage{hyperref} 2009/12/17 v6.79v for \hologo{XeTeX}. % \end{Version} % \begin{Version}{2010/03/30 v1.9} % \item diff --git a/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx b/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx index 5067d0ae62f..5e50a738477 100644 --- a/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx @@ -79,7 +79,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: catchfile 2010/04/08 v1.4 Catches the contents of a file (HO)} +\Msg{* Package: catchfile 2010/04/28 v1.5 Catches the contents of a file (HO)} \Msg{************************************************************************} \keepsilent @@ -158,7 +158,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{catchfile.drv}% - [2010/04/08 v1.4 Catches the contents of a file (HO)]% + [2010/04/28 v1.5 Catches the contents of a file (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] \begin{document} @@ -167,7 +167,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{591} +% \CheckSum{833} % % \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 @@ -188,7 +188,7 @@ and the derived files % \GetFileInfo{catchfile.drv} % % \title{The \xpackage{catchfile} package} -% \date{2010/04/08 v1.4} +% \date{2010/04/28 v1.5} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -291,7 +291,7 @@ and the derived files \fi \expandafter\x\csname ver@catchfile.sty\endcsname \ProvidesPackage{catchfile}% - [2010/04/08 v1.4 Catches the contents of a file (HO)] + [2010/04/28 v1.5 Catches the contents of a file (HO)] % \end{macrocode} % % \subsection{Catcodes} @@ -335,8 +335,10 @@ and the derived files \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname RequirePackage\endcsname\relax \input infwarerr.sty\relax + \input ltxcmds.sty\relax \else \RequirePackage{infwarerr}[2007/09/09]% + \RequirePackage{ltxcmds}[2010/03/09]% \fi % \end{macrocode} % @@ -449,7 +451,7 @@ and the derived files % \end{macrocode} % \end{macro} % -% \begin{macro}{\CatchFileNotFound} +% \begin{macro}{\CatchFile@NotFound} % \begin{macrocode} \def\CatchFile@NotFound#1#2{% \def#1{}% @@ -462,6 +464,14 @@ and the derived files % % \subsection{Catch file contents} % +% \begin{macrocode} +\ltx@IfUndefined{RequirePackage}{% + \input etexcmds.sty\relax +}{% + \RequirePackage{etexcmds}[2010/01/28]% +} +% \end{macrocode} +% % \begin{macro}{\CatchFileEdef} % \begin{macrocode} \long\def\CatchFileEdef#1#2#3{% @@ -490,12 +500,30 @@ and the derived files \begingroup \everyeof\expandafter{% \CatchFile@EOF + \expandafter\CatchFile@Finish \noexpand }% - \expandafter\long\expandafter\def\expandafter\CatchFile@Do - \expandafter##\expandafter1\CatchFile@EOF{% - \endgroup - \def#1{##1}% + \ltx@ifundefined{etex@unexpanded}{% + \expandafter\long\expandafter\def\expandafter\CatchFile@Do + \expandafter##\expandafter1\CatchFile@EOF{% + \toks\ltx@zero{##1}% + \xdef\CatchFile@gtemp{\the\toks\ltx@zero}% + \def\CatchFile@Finish{% + \endgroup + \let#1\CatchFile@gtemp + \global\let\CatchFile@gtemp\ltx@undefined + }% + }% + }{% + \expandafter\long\expandafter\def\expandafter\CatchFile@Do + \expandafter##\expandafter1\CatchFile@EOF{% + \edef\CatchFile@Finish{% + \endgroup + \etex@unexpanded{% + \edef#1{\etex@unexpanded{##1}}% + }% + }% + }% }% #3% \expandafter\expandafter\expandafter\CatchFile@Do @@ -623,18 +651,69 @@ and the derived files \NeedsTeXFormat{LaTeX2e} \nofiles \listfiles +\tracingnesting=2 % \documentclass{minimal} -\usepackage{catchfile}[2010/04/08] +\usepackage{catchfile}[2010/04/28] \makeatletter \def\mysetup{% \let\do\@makeother \dospecials } +\def\CheckContents{% + \begingroup + \expandafter\ifx\csname contents\endcsname\relax + \PackageError{TEST}{\string\contents\space is not defined}\@ehc + \fi + \endgroup +} +\def\StartDisableUnexpanded{% + \begingroup + \let\etex@unexpanded\@undefined +} +\def\StopDisableUnexpanded{% + \endgroup +} +\def\CheckCleanup{% + \begingroup + \edef\x{\the\toks0}% + \def\y{ABC}% + \ifx\x\y + \else + \PackageError{TEST}{\string\toks0 has changed}\@ehc + \fi + \ifx\CatchFile@gtemp\@undefined + \else + \PackageError{TEST}{Left over \string\CatchFile@gtemp}\@ehc + \fi + \endgroup +} +\def\Check{% + \CheckContents + \CheckCleanup +} \makeatother \begin{document} +\toks0{ABC} \CatchFileDef\contents{catchfile.sty}\mysetup \typeout{\meaning\contents} +\Check +\typeout{***********************************************************}% +\CatchFileDef\contents{catchfile.sty}{} +\typeout{\meaning\contents} +\Check +\typeout{***********************************************************}% + +\StartDisableUnexpanded +\CatchFileDef\contents{catchfile.sty}\mysetup +\typeout{\meaning\contents} +\Check +\typeout{***********************************************************}% +\CatchFileDef\contents{catchfile.sty}{} +\typeout{\meaning\contents} +\Check +\typeout{***********************************************************}% +\StopDisableUnexpanded \CatchFileEdef\contents{catchfile.sty}{% \mysetup @@ -642,6 +721,17 @@ and the derived files \obeylines } \typeout{\contents} +\Check +\typeout{***********************************************************}% +\CatchFileEdef\contents{catchfile.sty}{% + \catcode`\\=12 % + \catcode`\#=12 % + \def\par{^^J}% + \obeylines +} +\typeout{\contents} +\Check +\typeout{***********************************************************}% \end{document} %</test2> % \end{macrocode} @@ -652,6 +742,7 @@ and the derived files %<*test3> \def\msg#{\immediate\write16} \newlinechar=10 % +\tracingnesting=2 % \input catchfile.sty\relax \def\mysetup{% @@ -660,9 +751,63 @@ and the derived files }% \dospecials } +\def\CheckContents{% + \begingroup + \expandafter\ifx\csname contents\endcsname\relax + \def\space{ }% + \errmessage{\string\contents\space is not defined.}% + \fi + \endgroup +} +\catcode`\@=11 % +\def\CheckCleanup{% + \begingroup + \edef\x{\the\toks0}% + \def\y{ABC}% + \ifx\x\y + \else + \errmessage{\string\toks0 has changed}% + \fi + \ifx\CatchFile@gtemp\@undefined + \else + \errmessage{Left over \string\CatchFile@gtemp}% + \fi + \endgroup +} +\def\Check{% + \CheckContents + \CheckCleanup +} +\def\StartDisableUnexpanded{% + \begingroup + \let\etex@unexpanded\@undefined +} +\def\StopDisableUnexpanded{% + \endgroup +} +\catcode`\@=12 % + +\toks0{ABC} \CatchFileDef\contents{catchfile.sty}\mysetup \msg{\meaning\contents} +\Check +\msg{***********************************************************}% +\CatchFileDef\contents{catchfile.sty}{} +\msg{\meaning\contents} +\Check +\msg{***********************************************************}% + +\StartDisableUnexpanded +\CatchFileDef\contents{catchfile.sty}\mysetup +\msg{\meaning\contents} +\Check +\msg{***********************************************************}% +\CatchFileDef\contents{catchfile.sty}{} +\msg{\meaning\contents} +\Check +\msg{***********************************************************}% +\StopDisableUnexpanded \CatchFileEdef\contents{catchfile.sty}{% \mysetup @@ -670,6 +815,17 @@ and the derived files \obeylines } \msg{\contents} +\Check +\msg{***********************************************************}% +\CatchFileEdef\contents{catchfile.sty}{% + \catcode`\\=12 % + \catcode`\#=12 % + \def\par{^^J}% + \obeylines +} +\msg{\contents} +\Check +\msg{***********************************************************}% \csname @@end\endcsname \end @@ -881,6 +1037,16 @@ and the derived files % \item % \cs{closein} also added if \cs{ifeof} is true. % \end{Version} +% \begin{Version}{2010/04/28 v1.5} +% \item +% \cs{CatchFileDef}: Getting rid of warning `end of semi simple group +% entered at line \dots\ of +% a different file (Florent Chervet). +% \item +% \cs{CatchFileDef}: Fix for error `Illegal parameter number in +% definition of \dots' (HO) including improvement that uses +% \cs{unexpanded} if available (Florent Chervet). +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx b/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx index e2910d06b24..2782aefb6df 100644 --- a/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % Copyright (C) 2001, 2006-2010 by -% Heiko Oberdiek <heiko.oberdiek at googlemail.com> +% Heiko Oberdiek <oberdiek@uni-freiburg.de> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -86,7 +86,7 @@ This is a generated file. Copyright (C) 2001, 2006-2010 by - Heiko Oberdiek <heiko.oberdiek at googlemail.com> + Heiko Oberdiek <oberdiek@uni-freiburg.de> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -179,7 +179,7 @@ and the derived files % % \title{The \xpackage{epstopdf} package} % \date{2010/02/09 v2.5} -% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} +% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx index 69e8569b6fc..590beb898e7 100644 --- a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx @@ -22,7 +22,8 @@ % % This work consists of the main source file hologo.dtx % and the derived files -% hologo.sty, hologo.pdf, hologo.ins, hologo.drv, hologo-test1.tex. +% hologo.sty, hologo.pdf, hologo.ins, hologo.drv, hologo-test1.tex, +% hologo-test-spacefactor.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/hologo.dtx @@ -57,6 +58,7 @@ % Installation: % TDS:tex/generic/oberdiek/hologo.sty % TDS:tex/generic/oberdiek/hologo-test1.tex +% TDS:tex/generic/oberdiek/hologo-test-spacefactor.tex % TDS:doc/latex/oberdiek/hologo.pdf % TDS:source/latex/oberdiek/hologo.dtx % @@ -75,7 +77,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: hologo 2010/04/16 v1.1 Logo collection (HO)} +\Msg{* Package: hologo 2010/04/24 v1.2 Logo collection (HO)} \Msg{************************************************************************} \keepsilent @@ -108,7 +110,8 @@ because some files are installed in TDS:tex/generic//. This work consists of the main source file hologo.dtx and the derived files - hologo.sty, hologo.pdf, hologo.ins, hologo.drv, hologo-test1.tex. + hologo.sty, hologo.pdf, hologo.ins, hologo.drv, hologo-test1.tex, + hologo-test-spacefactor.tex. \endpreamble \let\MetaPrefix\DoubleperCent @@ -119,6 +122,7 @@ and the derived files \usedir{tex/generic/oberdiek}% \file{hologo.sty}{\from{hologo.dtx}{package}}% \file{hologo-test1.tex}{\from{hologo.dtx}{test1}}% + \file{hologo-test-spacefactor.tex}{\from{hologo.dtx}{test-spacefactor}}% } \catcode32=13\relax% active space @@ -128,7 +132,7 @@ 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{* hologo.sty, hologo-test1.tex} +\Msg{* hologo.sty, hologo-test1.tex, hologo-test-spacefactor.tex} \Msg{*} \Msg{* And install the following script file:} \Msg{*} @@ -149,10 +153,10 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{hologo.drv}% - [2010/04/16 v1.1 Logo collection (HO)]% + [2010/04/24 v1.2 Logo collection (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] -\usepackage{hologo}[2010/04/16] +\usepackage{hologo}[2010/04/24] \usepackage{longtable} \usepackage{array} \begin{document} @@ -161,7 +165,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1145} +% \CheckSum{1200} % % \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 @@ -182,7 +186,7 @@ and the derived files % \GetFileInfo{hologo.drv} % % \title{The \xpackage{hologo} package} -% \date{2010/04/16 v1.1} +% \date{2010/04/24 v1.2} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -217,6 +221,7 @@ and the derived files % \entry{eTeX}{}[2010/04/08] % \entry{LaTeX}{}[2010/04/08] % \entry{LaTeX2e}{}[2010/04/08] +% \entry{LaTeX3}{}[2010/04/24] % \entry{LaTeXe}{}[2010/04/08] % \entry{LuaLaTeX}{}[2010/04/08] % \entry{LuaTeX}{}[2010/04/08] @@ -227,6 +232,7 @@ and the derived files % \entry{plainTeX}{hyphen}[2010/04/16] % \entry{plainTeX}{runtogether}[2010/04/16] % \entry{TeX}{}[2010/04/08] +% \entry{VTeX}{}[2010/04/24] % \entry{XeLaTeX}{}[2010/04/08] % \entry{XeTeX}{}[2010/04/08] % \end{longtable} @@ -358,7 +364,7 @@ and the derived files \fi \expandafter\x\csname ver@hologo.sty\endcsname \ProvidesPackage{hologo}% - [2010/04/16 v1.1 Logo collection (HO)] + [2010/04/24 v1.2 Logo collection (HO)] % \end{macrocode} % % \begin{macrocode} @@ -842,6 +848,14 @@ and the derived files % \end{macrocode} % \end{macro} % +% \begin{macro}{\HOLOGO@SpaceFactor} +% \begin{macrocode} +\def\HOLOGO@SpaceFactor{% + \spacefactor1000 % +} +% \end{macrocode} +% \end{macro} +% % \subsection{\hologo{TeX} and friends} % % \subsubsection{\hologo{TeX}} @@ -850,7 +864,7 @@ and the derived files % Source: \hologo{LaTeX} kernel. % \begin{macrocode} \def\HoLogo@TeX#1{% - T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000 % + T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\HOLOGO@SpaceFactor } % \end{macrocode} % \end{macro} @@ -982,6 +996,27 @@ and the derived files % \end{macrocode} % \end{macro} % +% \subsubsection{\hologo{LaTeX3}} +% +% \begin{macro}{\HoLogo@LaTeX3} +% Source: \hologo{LaTeX} kernel +% \begin{macrocode} +\expandafter\def\csname HoLogo@LaTeX3\endcsname#1{% + \hologo{LaTeX}% + 3% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogoBkm@LaTeX3} +% \begin{macrocode} +\expandafter\def\csname HoLogoBkm@LaTeX3\endcsname#1{% + \hologo{LaTeX}% + 3% +} +% \end{macrocode} +% \end{macro} +% % \subsubsection{\hologo{eTeX}} % % \begin{macro}{\HoLogo@eTeX} @@ -1070,12 +1105,6 @@ and the derived files % \end{macrocode} % \end{macro} % -% \begin{macro}{\HoLogoBkm@XeTeX} -% \begin{macrocode} -\def\HoLogoBkm@XeTeX#1{XeTeX} -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\HoLogo@XeLaTeX} % \begin{macrocode} \def\HoLogo@XeLaTeX#1{% @@ -1107,6 +1136,18 @@ and the derived files % \end{macrocode} % \end{macro} % +% \subsubsection{\hologo{VTeX}} +% +% \begin{macro}{\HoLogo@VTeX} +% \begin{macrocode} +\def\HoLogo@VTeX#1{% + \HOLOGO@mbox{% + V\hologo{TeX}% + }% +} +% \end{macrocode} +% \end{macro} +% % \subsubsection{\hologo{AmS}, \dots} % % Source: class \xclass{amsdtx} @@ -1497,6 +1538,68 @@ and the derived files %</test1> % \end{macrocode} % +% \subsection{Spacefactor} +% +% The space factor must be 1000 after a logo. If it is greater 1000 +% then the following space is a space after a sentence closing point. +% If the space factor is smaller 1000 then an immediate following +% dot is interpreted as abbreviation, not sentence closing point. +% +% \begin{macrocode} +%<*test-spacefactor> +\NeedsTeXFormat{LaTeX2e} +\documentclass{article} +\usepackage{hologo}[2010/04/24] +\usepackage{kvsetkeys} +\usepackage{qstest} +\IncludeTests{*} +\LogTests{log}{*}{*} +\begin{document} +\begin{qstest}{spacefactor}{spacefactor} +\newcommand*{\Test}[1]{% + \sbox0{% + \hologo{#1}% + \Expect*{1000 (#1)}*{\the\spacefactor\space(#1)}% + }% +}% +\makeatletter +\kv@parse@normalized{% + AmSLaTeX,% + AmSTeX,% + eTeX,% + LaTeX,% + LaTeX2e,% + LaTeX3,% + LaTeXe,% + LuaLaTeX,% + LuaTeX,% + pdfTeX,% + pdfLaTeX,% + plainTeX=,% + plainTeX={variant=space},% + plainTeX={variant=hyphen},% + plainTeX={variant=runtogether},% + TeX,% + VTeX,% + XeLaTeX,% + XeTeX,% +}{% + \begingroup + \let\@logo=\kv@key + \ifx\kv@value\relax + \else + \expandafter\hologoLogoSetup\expandafter\@logo\expandafter{% + \kv@value + }% + \fi + \Test\@logo + \endgroup + \@gobbletwo +} +\end{qstest} +\end{document} +%</test-spacefactor> +% \end{macrocode} % % \section{Installation} % @@ -1559,6 +1662,7 @@ and the derived files % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} % hologo.sty & tex/generic/oberdiek/hologo.sty\\ % hologo-test1.tex & tex/generic/oberdiek/hologo-test1.tex\\ +% hologo-test-spacefactor.tex & tex/generic/oberdiek/hologo-test-spacefactor.tex\\ % hologo.pdf & doc/latex/oberdiek/hologo.pdf\\ % hologo.dtx & source/latex/oberdiek/hologo.dtx\\ % \end{tabular}^^A @@ -1696,6 +1800,12 @@ and the derived files % \item % Variant support added by option \xoption{variant}. % \end{Version} +% \begin{Version}{2010/04/24 v1.2} +% \item +% \hologo{LaTeX3} added. +% \item +% \hologo{VTeX} added. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx index 0a5a0f9a687..e703aeba8a0 100644 --- a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx @@ -71,7 +71,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: holtxdoc 2010/04/18 v0.18 Private additional ltxdoc support (HO)} +\Msg{* Package: holtxdoc 2010/04/24 v0.19 Private additional ltxdoc support (HO)} \Msg{************************************************************************} \keepsilent @@ -141,7 +141,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{holtxdoc.drv}% - [2010/04/18 v0.18 Private additional ltxdoc support (HO)]% + [2010/04/24 v0.19 Private additional ltxdoc support (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] \begin{document} @@ -171,7 +171,7 @@ and the derived files % \GetFileInfo{holtxdoc.drv} % % \title{The \xpackage{holtxdoc} package} -% \date{2010/04/18 v0.18} +% \date{2010/04/24 v0.19} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -211,7 +211,7 @@ and the derived files % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{holtxdoc}% - [2010/04/18 v0.18 Private additional ltxdoc support (HO)] + [2010/04/24 v0.19 Private additional ltxdoc support (HO)] % \end{macrocode} % % \begin{macrocode} @@ -220,7 +220,7 @@ and the derived files \RequirePackage{hyperref}[2010/03/30] \RequirePackage{pdftexcmds}[2010/04/01] \RequirePackage{ltxcmds}[2010/03/09] -\RequirePackage{hologo}[2010/04/08] +\RequirePackage{hologo}[2010/04/24] \RequirePackage{array} % \end{macrocode} % @@ -745,6 +745,10 @@ and the derived files % \item % Standard index prologue replaced by corrected prologue. % \end{Version} +% \begin{Version}{2010/04/24 v0.19} +% \item +% Requested date of package \xpackage{hologo} updated. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx index 538f1ac4117..e5cfd20f7fb 100644 --- a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx @@ -23,7 +23,7 @@ % This work consists of the main source file ltxcmds.dtx % and the derived files % ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv, -% ltxcmds-test1.tex. +% ltxcmds-test1.tex, ltxcmds-test-gobble.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/ltxcmds.dtx @@ -59,6 +59,7 @@ % TDS:tex/generic/oberdiek/ltxcmds.sty % TDS:doc/latex/oberdiek/ltxcmds.pdf % TDS:doc/latex/oberdiek/test/ltxcmds-test1.tex +% TDS:doc/latex/oberdiek/test/ltxcmds-test-gobble.tex % TDS:source/latex/oberdiek/ltxcmds.dtx % %<*ignore> @@ -76,7 +77,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ltxcmds 2010/04/16 v1.6 LaTeX kernel commands for general use (HO)} +\Msg{* Package: ltxcmds 2010/04/26 v1.7 LaTeX kernel commands for general use (HO)} \Msg{************************************************************************} \keepsilent @@ -110,7 +111,7 @@ because some files are installed in TDS:tex/generic//. This work consists of the main source file ltxcmds.dtx and the derived files ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv, - ltxcmds-test1.tex. + ltxcmds-test1.tex, ltxcmds-test-gobble.tex. \endpreamble \let\MetaPrefix\DoubleperCent @@ -122,6 +123,7 @@ and the derived files \file{ltxcmds.sty}{\from{ltxcmds.dtx}{package}}% \usedir{doc/latex/oberdiek/test}% \file{ltxcmds-test1.tex}{\from{ltxcmds.dtx}{test1}}% + \file{ltxcmds-test-gobble.tex}{\from{ltxcmds.dtx}{test-gobble}}% } \catcode32=13\relax% active space @@ -152,7 +154,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltxcmds.drv}% - [2010/04/16 v1.6 LaTeX kernel commands for general use (HO)]% + [2010/04/26 v1.7 LaTeX kernel commands for general use (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] \usepackage{zref-savepos} @@ -162,7 +164,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{760} +% \CheckSum{1158} % % \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 @@ -183,7 +185,7 @@ and the derived files % \GetFileInfo{ltxcmds.drv} % % \title{The \xpackage{ltxcmds} package} -% \date{2010/04/16 v1.6} +% \date{2010/04/26 v1.7} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -230,10 +232,10 @@ and the derived files % % \subsection{Numbers} % -% \begin{declcs}{ltx@zero}\\ -% \cs{ltx@one}\\ -% \cs{ltx@two}\\ -% \cs{ltx@cclv} +% \begin{declcs}{ltx@zero} \TO 0\\ +% \cs{ltx@one} \TO 1\\ +% \cs{ltx@two} \TO 2\\ +% \cs{ltx@cclv} \TO 255 % \end{declcs} % These commands are numbers 0, 1, 2 and 255. They are not digits % and a space is not gobbled afterwards. @@ -246,6 +248,13 @@ and the derived files % \cs{ltx@gobblefour} \M{1} \M{2} \M{3} \M{4} \TO % \end{declcs} % +% \begin{declcs}{ltx@GobbleNum} \M{num} \M{1} \M{2} \dots\space +% \M{\meta{num}} \TO +% \end{declcs} +% The first argument \meta{num} of macro \cs{ltx@GobbleNum} specifies, +% how many following arguments are eaten. Macro \cs{ltx@GobbleNum} +% is expandable in exact two expansion steps. +% % \subsection{Argument grabbers} % % \begin{declcs}{ltx@firstofone} \M{1} \TO \meta{1}\\ @@ -255,24 +264,39 @@ and the derived files % % \subsection{List helpers} % -% \begin{declcs}{ltx@car} \M{1} \dots \cs{@nil} \TO \meta{1}\\ -% \cs{ltx@cdr} \M{1} \dots \cs{@nil} \TO \dots\\ +% \begin{declcs}{ltx@carzero} \dots\ \cs{@nil} \TO\\ +% \cs{ltx@cdrzero} \dots\ \cs{@nil} \TO \dots +% \end{declcs} +% +% \begin{declcs}{ltx@car} \M{1} \dots\ \cs{@nil} \TO \meta{1}\\ +% \cs{ltx@cdr} \M{1} \dots\ \cs{@nil} \TO \dots % \end{declcs} % -% \begin{declcs}{ltx@cartwo} \M{1} \M{2} \dots \cs{@nil} \TO \meta{1}\meta{2}\\ -% \cs{ltx@cdrtwo} \M{1} \M{2} \dots \cs{@nil} \TO \dots\\ +% \begin{declcs}{ltx@cartwo} \M{1} \M{2} \dots\ \cs{@nil} +% \TO \meta{1}\meta{2}\\ +% \cs{ltx@cdrtwo} \M{1} \M{2} \dots\ \cs{@nil} \TO \dots % \end{declcs} % -% \begin{declcs}{ltx@carthree} \M{1} \M{2} \M{3} \dots \cs{@nil} +% \begin{declcs}{ltx@carthree} \M{1} \M{2} \M{3} \dots\ \cs{@nil} % \TO \meta{1}\meta{2}\meta{3}\\ -% \cs{ltx@cdrthree} \M{1} \M{2} \M{3} \dots \cs{@nil} \TO \dots\\ +% \cs{ltx@cdrthree} \M{1} \M{2} \M{3} \dots\ \cs{@nil} \TO \dots % \end{declcs} % -% \begin{declcs}{ltx@carfour} \M{1} \M{2} \M{3} \M{4} \dots \cs{@nil} +% \begin{declcs}{ltx@carfour} \M{1} \M{2} \M{3} \M{4} \dots\ \cs{@nil} % \TO \meta{1}\meta{2}\meta{3}\meta{4}\\ -% \cs{ltx@cdrfour} \M{1} \M{2} \M{3} \M{4} \dots \cs{@nil} \TO \dots\\ +% \cs{ltx@cdrfour} \M{1} \M{2} \M{3} \M{4} \dots\ \cs{@nil} \TO \dots % \end{declcs} % +% \begin{declcs}{ltx@CarNum} \M{num} \M{1} \dots\ \M{\meta{num}} +% \M{\meta{num}+1} \dots\ \cs{@nil}\\ +% \TO \M{1} \dots\ \M{\meta{num}} \dots\\ +% \cs{ltx@CdrNum} \M{num} \M{1} \dots\ \M{\meta{num}} +% \M{\meta{num}+1} \dots\ \cs{@nil}\\ +% \TO \M{\meta{num}+1} \dots +% \end{declcs} +% Macros \cs{ltx@CarNum} and \cs{ltx@CdrNum} are expandable +% in exact two expansion steps. +% % \subsection{Tail recursion} % % \begin{declcs}{ltx@ReturnAfterFi} \M{1} \cs{fi} \TO \cs{fi} \meta{1}\\ @@ -287,9 +311,11 @@ and the derived files % % \subsection{Characters} % -% \begin{declcs}{ltx@space}\\ -% \cs{ltx@percentchar}\\ -% \cs{ltx@backslashchar} +% \begin{declcs}{ltx@space} \TO \verb*| |\\ +% \cs{ltx@percentchar} \TO \texttt{\%}\\ +% \cs{ltx@backslashchar} \TO +% \makeatletter\texttt{\@backslashchar}\\ +% \cs{ltx@hashchar} \TO \texttt{\#} % \end{declcs} % % \subsection{Boolean switch} @@ -506,7 +532,7 @@ and the derived files \fi \expandafter\x\csname ver@ltxcmds.sty\endcsname \ProvidesPackage{ltxcmds}% - [2010/04/16 v1.6 LaTeX kernel commands for general use (HO)] + [2010/04/26 v1.7 LaTeX kernel commands for general use (HO)] % \end{macrocode} % % \begin{macrocode} @@ -565,6 +591,11 @@ and the derived files \chardef\ltx@two=2 % % \end{macrocode} % \end{macro} +% \begin{macro}{\ltx@active} +% \begin{macrocode} +\chardef\ltx@active=13 % +% \end{macrocode} +% \end{macro} % \begin{macro}{\ltx@cclv} % \begin{macrocode} \chardef\ltx@cclv=255 % @@ -594,6 +625,32 @@ and the derived files % \end{macrocode} % \end{macro} % +% \begin{macro}{\ltx@GobbleNum} +% \begin{macrocode} +\def\ltx@GobbleNum#1{% + \romannumeral + \csname ltx@zero% + \expandafter\LTXcmds@GobbleNum + \romannumeral\expandafter\ltx@firstofone + \expandafter{\LTXcmds@num#1}000{m\endcsname}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@GobbleNum} +% \begin{macrocode} +\def\LTXcmds@GobbleNum#1{% + \csname LTXcmds@G#1\LTXcmds@GobbleNum +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@Gm} +% \begin{macrocode} +\long\def\LTXcmds@Gm#1{% + \endcsname +} +% \end{macrocode} +% \end{macro} +% % \subsection{Argument grabbers} % % \begin{macro}{\ltx@firstofone} @@ -625,6 +682,17 @@ and the derived files % \end{macrocode} % \end{macro} % +% \begin{macro}{\ltx@carzero} +% \begin{macrocode} +\long\def\ltx@carzero#1\@nil{}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ltx@cdrzero} +% \begin{macrocode} +\long\def\ltx@cdrzero#1\@nil{#1}% +% \end{macrocode} +% \end{macro} + % \begin{macro}{\ltx@cartwo} % \begin{macrocode} \long\def\ltx@cartwo#1#2#3\@nil{#1#2} @@ -658,6 +726,62 @@ and the derived files % \end{macrocode} % \end{macro} % +% \begin{macro}{\ltx@CarNum} +% \begin{macrocode} +\def\ltx@CarNum#1{% + \romannumeral + \csname LTXcmds@CarNumFinish% + \expandafter\LTXcmds@CarNum + \romannumeral\expandafter\ltx@firstofone + \expandafter{\LTXcmds@num#1}000{x\endcsname}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@CarNum} +% \begin{macrocode} +\def\LTXcmds@CarNum#1{% + \csname LTXcmds@C#1\LTXcmds@CarNum +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@Cm} +% \begin{macrocode} +\long\def\LTXcmds@Cm#1#2{% + \endcsname{#1#2}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@Cx} +% \begin{macrocode} +\def\LTXcmds@Cx#1{% + \endcsname{}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@CarNumFinish} +% \begin{macrocode} +\long\def\LTXcmds@CarNumFinish#1#2\@nil{% + \ltx@zero + #1% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ltx@CdrNum} +% \begin{macrocode} +\def\ltx@CdrNum#1{% + \romannumeral0% + \expandafter\expandafter\expandafter\LTXcmds@CdrNum + \ltx@GobbleNum{#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LTXcmds@CdrNum} +% \begin{macrocode} +\long\def\LTXcmds@CdrNum#1\@nil{ #1}% +% \end{macrocode} +% \end{macro} +% % \subsection{Tail recursion} % % \begin{macro}{\ltx@ReturnAfterFi} @@ -704,6 +828,15 @@ and the derived files } % \end{macrocode} % \end{macro} +% \begin{macro}{\ltx@hashchar} +% \begin{macrocode} +\begingroup + \lccode`0=`\#\relax +\lowercase{\endgroup + \def\ltx@hashchar{0}% +} +% \end{macrocode} +% \end{macro} % % \subsection{Boolean switch} % @@ -1099,6 +1232,18 @@ and the derived files % \end{macrocode} % \end{macro} % +% \subsection{Help macros} +% +% \begin{macro}{\LTXcmds@num} +% \begin{macrocode} +\ltx@IfUndefined{numexpr}{% + \let\LTXcmds@num\number +}{% + \let\LTXcmds@num\numexpr +} +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} \LTXcmds@AtEnd %</package> @@ -1193,6 +1338,179 @@ and the derived files %</test1> % \end{macrocode} % +% \section{Test \cs{ltx@GobbleNum}} +% +% \begin{macrocode} +%<*test-gobble> +\catcode`\{=1 % +\catcode`\}=2 % +\catcode`\#=6 % +\expandafter\ifx\csname RequirePackage\endcsname\relax + \input ltxcmds.sty\relax +\else + \RequirePackage{ltxcmds}[2010/04/26]% +\fi +\catcode`\@=11 % +\def\msg#{\immediate\write16}% +\msg{[Test \string\ltx@GobbleNum]}% +\long\def\Test#1=#2\\{% + \edef\StrA{\ltx@GobbleNum#1}% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\StrAA + \expandafter\expandafter\expandafter{\ltx@GobbleNum#1}% + \edef\StrB{#2}% + \ifx\StrA\StrB + \ifx\StrAA\StrB + \msg{* ok.}% + \else + \msg{StrAA: \StrAA}% + \msg{StrB: \StrB}% + \errhelp{Test: #1=#2}% + \errmessage{Test (two expansions) failed}% + \fi + \else + \msg{StrA: \StrA}% + \msg{StrB: \StrB}% + \errhelp{Test: #1=#2}% + \errmessage{Test (edef) failed!}% + \fi +} +\Test0abc=abc\\ +\Test1abc=bc\\ +\Test2abc=c\\ +\Test3abcd=d\\ +\Test4abcde=e\\ +\Test5abcdef=f\\ +\Test6abcdefg=g\\ +\Test7abcdefgh=h\\ +\Test8abcdefghi=i\\ +\Test9abcdefghij=j\\ +\Test{10}0123456789X=X\\ +\Test{12}abcdefghijklm=m\\ +\Test{700}% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +X=X\\ +\Test{-1}abc=abc\\ +\Test2\par\par\relax=\relax\\ + +\msg{[Test \string\ltx@CdrNum]}% +\long\def\Test#1=#2\\{% + \edef\StrA{\ltx@CdrNum#1\@nil}% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\StrAA + \expandafter\expandafter\expandafter{\ltx@CdrNum#1\@nil}% + \edef\StrB{#2}% + \ifx\StrA\StrB + \ifx\StrAA\StrB + \msg{* ok.}% + \else + \msg{StrAA: \meaning\StrAA}% + \msg{StrB: \meaning\StrB}% + \errhelp{Test: #1=#2}% + \errmessage{Test (two expansions) failed}% + \fi + \else + \msg{StrA: \StrA}% + \msg{StrB: \StrB}% + \errhelp{Test: #1=#2}% + \errmessage{Test (edef) failed!}% + \fi +} +\Test0abc=abc\\ +\Test1abc=bc\\ +\Test2abc=c\\ +\Test3abcd=d\\ +\Test4abcde=e\\ +\Test5abcdef=f\\ +\Test6abcdefg=g\\ +\Test7abcdefgh=h\\ +\Test8abcdefghi=i\\ +\Test9abcdefghij=j\\ +\Test{10}0123456789X=X\\ +\Test{12}abcdefghijklm=m\\ +\Test{700}% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +X=X\\ +\Test{-1}abc=abc\\ +\Test2\par\par\relax=\relax\\ + +\msg{[Test \string\ltx@CarNum]}% +\long\def\Test#1=#2\\{% + \edef\StrA{\ltx@CarNum#1\@nil}% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\StrAA + \expandafter\expandafter\expandafter{\ltx@CarNum#1\@nil}% + \edef\StrB{#2}% + \ifx\StrA\StrB + \ifx\StrAA\StrB + \msg{* ok.}% + \else + \msg{StrAA: \meaning\StrAA}% + \msg{StrB: \meaning\StrB}% + \errhelp{Test: #1=#2}% + \errmessage{Test (two expansions) failed}% + \fi + \else + \msg{StrA: \StrA}% + \msg{StrB: \StrB}% + \errhelp{Test: #1=#2}% + \errmessage{Test (edef) failed!}% + \fi +} +\Test0abc=\\ +\Test1abc=a\\ +\Test2abc=ab\\ +\Test3abc=abc\\ +\Test3abcd=abc\\ +\Test4abcde=abcd\\ +\Test{10}0123456789X=0123456789\\ +\Test{12}abcdefghijklm=abcdefghijkl\\ +\Test{700}% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +X=% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +0123456789012345678901234567890123456789012345678901234567890123456789% +\\ +\Test{-1}abc=\\ +\Test2\par\par\relax=\par\par\\ +\csname @@end\endcsname\end +%</test-gobble> +% \end{macrocode} % % \section{Installation} % @@ -1256,6 +1574,7 @@ and the derived files % ltxcmds.sty & tex/generic/oberdiek/ltxcmds.sty\\ % ltxcmds.pdf & doc/latex/oberdiek/ltxcmds.pdf\\ % test/ltxcmds-test1.tex & doc/latex/oberdiek/test/ltxcmds-test1.tex\\ +% test/ltxcmds-test-gobble.tex & doc/latex/oberdiek/test/ltxcmds-test-gobble.tex\\ % ltxcmds.dtx & source/latex/oberdiek/ltxcmds.dtx\\ % \end{tabular}^^A % }^^A @@ -1424,6 +1743,14 @@ and the derived files % \item % \cs{ltx@leavevmode}, \cs{ltx@mbox} added. % \end{Version} +% \begin{Version}{2010/04/26 v1.7} +% \item +% \cs{ltx@GobbleNum}, \cs{ltx@CdrNum}, \cs{ltx@CarNum} added. +% \item +% \cs{ltx@carzero}, \cs{ltx@cdrzero} added. +% \item +% \cs{ltx@hashchar} added. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins index c3f5ce63c6d..03729eac6f5 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins @@ -1,5 +1,5 @@ % oberdiek.ins -% 2010/04/23 +% 2010/05/01 % % Copyright (C) 1999, 2001, 2006 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex index f003cf529da..88bd4a6f52f 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex @@ -6,7 +6,7 @@ \newcommand*{\Subject}{CTAN:\CTANdir} \newcommand*{\Author}{Heiko Oberdiek} \newcommand*{\Email}{heiko.oberdiek at googlemail.com} -\newcommand*{\Date}{2010/04/23} +\newcommand*{\Date}{2010/05/01} % Copyright (C) 2006-2010 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -190,7 +190,7 @@ [\entrysep] \entry{bookmark}{2010/04/08}{1.12}{PDF bookmarks}% [\entrysep] -\entry{catchfile}{2010/04/08}{1.4}{Catches the contents of a file}% +\entry{catchfile}{2010/04/28}{1.5}{Catches the contents of a file}% [\entrysep] \entry{centernot}{2010/03/29}{1.2}{Centers the not symbol horizontally}% [\entrysep] @@ -218,9 +218,9 @@ [\entrysep] \entry{grffile}{2010/01/28}{1.11}{Extended file name support for graphics}% [\entrysep] -\entry{hologo}{2010/04/16}{1.1}{Logo collection}% +\entry{hologo}{2010/04/24}{1.2}{Logo collection}% [\entrysep] -\entry{holtxdoc}{2010/04/18}{0.18}{Private additional ltxdoc support}% +\entry{holtxdoc}{2010/04/24}{0.19}{Private additional ltxdoc support}% [\entrysep] \entry{hycolor}{2009/12/12}{1.6}{Color options of hyperref/bookmark}% [\entrysep] @@ -262,7 +262,7 @@ [\entrysep] \entry{listingsutf8}{2007/11/11}{1.1}{Adding support for UTF-8 to listings}% [\entrysep] -\entry{ltxcmds}{2010/04/16}{1.6}{\LaTeX{} kernel commands for general use}% +\entry{ltxcmds}{2010/04/26}{1.7}{\LaTeX{} kernel commands for general use}% [\entrysep] \entry{luacolor}{2010/03/09}{1.2}{Coloring based on LuaTeX's node attributes}% [\entrysep] @@ -334,7 +334,7 @@ [\entrysep] \entry{uniquecounter}{2009/12/18}{1.1}{Provides unlimited unique counter}% [\entrysep] -\entry{zref}{2010/04/23}{2.15}{New reference scheme for \LaTeXe{}}% +\entry{zref}{2010/05/01}{2.17}{New reference scheme for \LaTeXe{}}% \end{overview} \section{Packages} @@ -1218,7 +1218,7 @@ The numeric values are not limited. \label{zref} \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 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{&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}}% +% \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 |