summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/zref/zref.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-04-05 22:34:49 +0000
committerKarl Berry <karl@freefriends.org>2022-04-05 22:34:49 +0000
commitc9a6d1abe2565fa523fb85615b9a4ec5467bf09b (patch)
treef3d2afbaa65d2ee897144e10aa0a7c11116da47f /Master/texmf-dist/source/latex/zref/zref.dtx
parent4eb7772be8862583675589d9552a487b6d956715 (diff)
zref (29mar22)
git-svn-id: svn://tug.org/texlive/trunk@62956 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/zref/zref.dtx')
-rw-r--r--Master/texmf-dist/source/latex/zref/zref.dtx101
1 files changed, 70 insertions, 31 deletions
diff --git a/Master/texmf-dist/source/latex/zref/zref.dtx b/Master/texmf-dist/source/latex/zref/zref.dtx
index a74626aa7dd..731338b70a6 100644
--- a/Master/texmf-dist/source/latex/zref/zref.dtx
+++ b/Master/texmf-dist/source/latex/zref/zref.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: zref.dtx
-% Version: 2020-07-03 v2.32
+% Version: 2022-03-08 v2.33
% Info: A new reference scheme for LaTeX
%
% Copyright (C)
@@ -112,7 +112,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: zref 2020-07-03 v2.32 A new reference scheme for LaTeX (HO)}
+\Msg{* Package: zref 2022-03-08 v2.33 A new reference scheme for LaTeX (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -124,11 +124,11 @@
This is a generated file.
Project: zref
-Version: 2020-07-03 v2.32
+Version: 2022-03-08 v2.33
Copyright (C)
2006-2012 Heiko Oberdiek
- 2016-2020 Oberdiek Package Support Group
+ 2016-2022 Oberdiek Package Support Group
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -230,7 +230,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{zref.drv}%
- [2020-07-03 v2.32 A new reference scheme for LaTeX (HO)]%
+ [2022-03-08 v2.33 A new reference scheme for LaTeX (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\setlength{\emergencystretch}{1em}
@@ -245,7 +245,7 @@ and the derived files
% \GetFileInfo{zref.drv}
%
% \title{The \xpackage{zref} package}
-% \date{2020-07-03 v2.32}
+% \date{2022-03-08 v2.33}
% \author{Heiko Oberdiek\thanks
% {Please report any issues at \url{https://github.com/ho-tex/zref/issues}}}
%
@@ -1663,7 +1663,7 @@ the height difference of the two baselines is
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref}
- [2020-07-03 v2.32 A new reference scheme for LaTeX (HO)]%
+ [2022-03-08 v2.33 A new reference scheme for LaTeX (HO)]%
% \end{macrocode}
%
% \subsubsection{Load basic module}
@@ -1750,7 +1750,7 @@ the height difference of the two baselines is
%<*base>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
- [2020-07-03 v2.32 Module base for zref (HO)]%
+ [2022-03-08 v2.33 Module base for zref (HO)]%
% \end{macrocode}
%
% \subsubsection{Utilities}
@@ -2907,13 +2907,13 @@ the height difference of the two baselines is
% \begin{macro}{\zref@require@unique}
% Generate the counter |zref@unique| if the counter does not
% already exist.
+% change 2022-08-03: The counter is no longer removed from the reset,
+% so that the behaviour with includeonly is improved, see issue
+% https://github.com/ho-tex/zref/issues/10
% \begin{macrocode}
\ZREF@Robust\def\zref@require@unique{%
\@ifundefined{c@zref@unique}{%
- \begingroup
- \let\@addtoreset\ltx@gobbletwo
\newcounter{zref@unique}%
- \endgroup
% \end{macrocode}
% \end{macro}
%
@@ -2928,6 +2928,18 @@ the height difference of the two baselines is
}
% \end{macrocode}
% \end{macro}
+% To improve the behaviour if include/includeonly is used, we round the
+% counter up at every include, see https://github.com/ho-tex/zref/issues/10
+%
+% \begin{macrocode}
+\IfFormatAtLeastTF{2020/10/01}
+ {
+ \AddToHook
+ {include/after}
+ {\setcounter{zref@unique}
+ {\csname fp_to_int:n\endcsname{ceil(\c@zref@unique +100,-2)}}}
+ }{}
+% \end{macrocode}
%
% \subsubsection{Utilities}
%
@@ -3058,7 +3070,7 @@ the height difference of the two baselines is
%<*user>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-user}%
- [2020-07-03 v2.32 Module user for zref (HO)]%
+ [2022-03-08 v2.33 Module user for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3149,7 +3161,7 @@ the height difference of the two baselines is
%<*abspage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspage}%
- [2020-07-03 v2.32 Module abspage for zref (HO)]%
+ [2022-03-08 v2.33 Module abspage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3197,7 +3209,7 @@ the height difference of the two baselines is
%<*counter>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-counter}%
- [2020-07-03 v2.32 Module counter for zref (HO)]%
+ [2022-03-08 v2.33 Module counter for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3242,7 +3254,7 @@ the height difference of the two baselines is
%<*lastpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-lastpage}%
- [2020-07-03 v2.32 Module lastpage for zref (HO)]%
+ [2022-03-08 v2.33 Module lastpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\RequirePackage{zref-abspage}[2019/11/29]
\RequirePackage{atveryend}[2009/12/07]
@@ -3314,7 +3326,7 @@ the height difference of the two baselines is
%<*thepage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-thepage}%
- [2020-07-03 v2.32 Module thepage for zref (HO)]%
+ [2022-03-08 v2.33 Module thepage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3389,7 +3401,7 @@ the height difference of the two baselines is
%<*nextpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-nextpage}%
- [2020-07-03 v2.32 Module nextpage for zref (HO)]%
+ [2022-03-08 v2.33 Module nextpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3493,7 +3505,7 @@ the height difference of the two baselines is
%<*totpages>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-totpages}%
- [2020-07-03 v2.32 Module totpages for zref (HO)]%
+ [2022-03-08 v2.33 Module totpages for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3535,7 +3547,7 @@ the height difference of the two baselines is
%<*pagelayout>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pagelayout}%
- [2020-07-03 v2.32 Module pagelayout for zref (HO)]%
+ [2022-03-08 v2.33 Module pagelayout for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3767,7 +3779,7 @@ the height difference of the two baselines is
%<*pageattr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pageattr}%
- [2020-07-03 v2.32 Module pageattr for zref (HO)]%
+ [2022-03-08 v2.33 Module pageattr for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3999,7 +4011,7 @@ the height difference of the two baselines is
%<*marks>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-marks}%
- [2020-07-03 v2.32 Module marks for zref (HO)]%
+ [2022-03-08 v2.33 Module marks for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -4105,7 +4117,7 @@ the height difference of the two baselines is
%<*runs>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-runs}%
- [2020-07-03 v2.32 Module runs for zref (HO)]%
+ [2022-03-08 v2.33 Module runs for zref (HO)]%
% \end{macrocode}
%
% \begin{macro}{\zruns}
@@ -4137,7 +4149,7 @@ the height difference of the two baselines is
%<*perpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-perpage}%
- [2020-07-03 v2.32 Module perpage for zref (HO)]%
+ [2022-03-08 v2.33 Module perpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -4187,6 +4199,27 @@ the height difference of the two baselines is
\ZREF@org@stepcounter{#1}%
}
% \end{macrocode}
+%
+% If amstext is loaded it overwrites the definition (or we overwrite their definition)
+% so we account for this by using a package hook, see
+% https://github.com/ho-tex/zref/issues/11.
+% \begin{macrocode}
+\IfFormatAtLeastTF{2020/10/01}
+ {
+ \AddToHook{package/amstext/after}
+ {\def\stepcounter#1{%
+ \iffirstchoice@
+ \ifcsname @stepcounterhook@#1\endcsname
+ \csname @stepcounterhook@#1\endcsname
+ \fi
+ \addtocounter{#1}\@ne
+ \begingroup \let\@elt\@stpelt \csname cl@#1\endcsname \endgroup
+ \fi
+ }}
+ }{}
+% \end{macrocode}
+%
+%
% \cs{@stpelt} must be adapted due to the change in latex
% 2015-01, see https://github.com/ho-tex/zref/issues/26
% \begin{macrocode}
@@ -4319,7 +4352,7 @@ the height difference of the two baselines is
%<*titleref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-titleref}%
- [2020-07-03 v2.32 Module titleref for zref (HO)]%
+ [2022-03-08 v2.33 Module titleref for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -4732,7 +4765,7 @@ the height difference of the two baselines is
%<*xr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-xr}%
- [2020-07-03 v2.32 Module xr for zref (HO)]%
+ [2022-03-08 v2.33 Module xr for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -5268,7 +5301,7 @@ the height difference of the two baselines is
%<*hyperref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-hyperref}%
- [2020-07-03 v2.32 Module hyperref for zref (HO)]%
+ [2022-03-08 v2.33 Module hyperref for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -5298,7 +5331,7 @@ the height difference of the two baselines is
%<*savepos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-savepos}%
- [2020-07-03 v2.32 Module savepos for zref (HO)]%
+ [2022-03-08 v2.33 Module savepos for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -5471,7 +5504,7 @@ the height difference of the two baselines is
%<*abspos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspos}%
- [2020-07-03 v2.32 Module abspos for zref (HO)]%
+ [2022-03-08 v2.33 Module abspos for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -6125,7 +6158,7 @@ the height difference of the two baselines is
%<*dotfill>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-dotfill}%
- [2020-07-03 v2.32 Module dotfill for zref (HO)]%
+ [2022-03-08 v2.33 Module dotfill for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -6225,7 +6258,7 @@ the height difference of the two baselines is
%<*env>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-env}%
- [2020-07-03 v2.32 Module env for zref (HO)]%
+ [2022-03-08 v2.33 Module env for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -6261,7 +6294,7 @@ the height difference of the two baselines is
%</env>
% \end{macrocode}
%
-%% \section{Installation}
+% \section{Installation}
%
% \subsection{Download}
%
@@ -6758,6 +6791,12 @@ the height difference of the two baselines is
% \item Changed in zref-pagelayout the names of the shipout box dimensions
% to adapt to the new hook management.
% \end{Version}
+% \begin{Version}{2022-03-08 v2.33}
+% \item Avoid that amstext undoes the stepcounter patch in zref-perpage,
+% https://github.com/ho-tex/zref/issues/11
+% \item Make the unique counter more robust when includeonly is used,
+% https://github.com/ho-tex/zref/issues/10
+% \end{Version}
% \end{History}
%
% \PrintIndex