Skip to content

Commit

Permalink
fix issue #14
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Apr 7, 2022
1 parent e4ca6fe commit ffdbb2c
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 38 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to the `zref` package since the
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project uses date-based 'snapshot' version identifiers.

## [2022-04-07]

### Fixed
- use zref@unique counter in the include hook only if the module needs it
https://github.com/ho-tex/zref/issues/14

## [2022-03-29]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# zref packages for LaTeX

Version: 2022-03-08 v2.33
Version: 2022-04-07 v2.34


Package zref tries to get rid of the restriction
Expand Down
14 changes: 14 additions & 0 deletions testfiles/zref-gh14.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%% This is file `zref-gh14.tex',
%% The original source files were:
%%
%% zref.dtx (with options: `test1')
\input{regression-test}
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
\usepackage{zref}
\begin{document}
\START
\include{filename}
\end{document}
%%
%% End of file `zref-gh14.tex'.
4 changes: 4 additions & 0 deletions testfiles/zref-gh14.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
No file filename.tex.
(zref-gh14.aux (filename.aux))
77 changes: 40 additions & 37 deletions zref.dtx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: zref.dtx
% Version: 2022-03-08 v2.33
% Version: 2022-04-07 v2.34
% Info: A new reference scheme for LaTeX
%
% Copyright (C)
Expand Down Expand Up @@ -112,7 +112,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
\Msg{* Package: zref 2022-03-08 v2.33 A new reference scheme for LaTeX (HO)}
\Msg{* Package: zref 2022-04-07 v2.34 A new reference scheme for LaTeX (HO)}
\Msg{************************************************************************}

\keepsilent
Expand All @@ -124,7 +124,7 @@
This is a generated file.

Project: zref
Version: 2022-03-08 v2.33
Version: 2022-04-07 v2.34

Copyright (C)
2006-2012 Heiko Oberdiek
Expand Down Expand Up @@ -230,7 +230,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{zref.drv}%
[2022-03-08 v2.33 A new reference scheme for LaTeX (HO)]%
[2022-04-07 v2.34 A new reference scheme for LaTeX (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\setlength{\emergencystretch}{1em}
Expand All @@ -245,7 +245,7 @@ and the derived files
% \GetFileInfo{zref.drv}
%
% \title{The \xpackage{zref} package}
% \date{2022-03-08 v2.33}
% \date{2022-04-07 v2.34}
% \author{Heiko Oberdiek\thanks
% {Please report any issues at \url{https://github.com/ho-tex/zref/issues}}}
%
Expand Down Expand Up @@ -1663,7 +1663,7 @@ the height difference of the two baselines is
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref}
[2022-03-08 v2.33 A new reference scheme for LaTeX (HO)]%
[2022-04-07 v2.34 A new reference scheme for LaTeX (HO)]%
% \end{macrocode}
%
% \subsubsection{Load basic module}
Expand Down Expand Up @@ -1750,7 +1750,7 @@ the height difference of the two baselines is
%<*base>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
[2022-03-08 v2.33 Module base for zref (HO)]%
[2022-04-07 v2.34 Module base for zref (HO)]%
% \end{macrocode}
%
% \subsubsection{Utilities}
Expand Down Expand Up @@ -2924,22 +2924,22 @@ the height difference of the two baselines is
\renewcommand*{\thezref@unique}{%
zref@\number\c@zref@unique
}%
}{}%
}
% \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)}}}
}{}
\IfFormatAtLeastTF{2020/10/01}
{%
\AddToHook
{include/after}
{\setcounter{zref@unique}
{\csname fp_to_int:n\endcsname{ceil(\c@zref@unique +100,-2)}}}
}{}%
}{}%
}
% \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Utilities}
%
Expand Down Expand Up @@ -3070,7 +3070,7 @@ the height difference of the two baselines is
%<*user>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-user}%
[2022-03-08 v2.33 Module user for zref (HO)]%
[2022-04-07 v2.34 Module user for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3161,7 +3161,7 @@ the height difference of the two baselines is
%<*abspage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspage}%
[2022-03-08 v2.33 Module abspage for zref (HO)]%
[2022-04-07 v2.34 Module abspage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3209,7 +3209,7 @@ the height difference of the two baselines is
%<*counter>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-counter}%
[2022-03-08 v2.33 Module counter for zref (HO)]%
[2022-04-07 v2.34 Module counter for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3254,7 +3254,7 @@ the height difference of the two baselines is
%<*lastpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-lastpage}%
[2022-03-08 v2.33 Module lastpage for zref (HO)]%
[2022-04-07 v2.34 Module lastpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\RequirePackage{zref-abspage}[2019/11/29]
\RequirePackage{atveryend}[2009/12/07]
Expand Down Expand Up @@ -3326,7 +3326,7 @@ the height difference of the two baselines is
%<*thepage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-thepage}%
[2022-03-08 v2.33 Module thepage for zref (HO)]%
[2022-04-07 v2.34 Module thepage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3401,7 +3401,7 @@ the height difference of the two baselines is
%<*nextpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-nextpage}%
[2022-03-08 v2.33 Module nextpage for zref (HO)]%
[2022-04-07 v2.34 Module nextpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3505,7 +3505,7 @@ the height difference of the two baselines is
%<*totpages>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-totpages}%
[2022-03-08 v2.33 Module totpages for zref (HO)]%
[2022-04-07 v2.34 Module totpages for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3547,7 +3547,7 @@ the height difference of the two baselines is
%<*pagelayout>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pagelayout}%
[2022-03-08 v2.33 Module pagelayout for zref (HO)]%
[2022-04-07 v2.34 Module pagelayout for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -3779,7 +3779,7 @@ the height difference of the two baselines is
%<*pageattr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pageattr}%
[2022-03-08 v2.33 Module pageattr for zref (HO)]%
[2022-04-07 v2.34 Module pageattr for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -4011,7 +4011,7 @@ the height difference of the two baselines is
%<*marks>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-marks}%
[2022-03-08 v2.33 Module marks for zref (HO)]%
[2022-04-07 v2.34 Module marks for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -4117,7 +4117,7 @@ the height difference of the two baselines is
%<*runs>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-runs}%
[2022-03-08 v2.33 Module runs for zref (HO)]%
[2022-04-07 v2.34 Module runs for zref (HO)]%
% \end{macrocode}
%
% \begin{macro}{\zruns}
Expand Down Expand Up @@ -4149,7 +4149,7 @@ the height difference of the two baselines is
%<*perpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-perpage}%
[2022-03-08 v2.33 Module perpage for zref (HO)]%
[2022-04-07 v2.34 Module perpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -4352,7 +4352,7 @@ the height difference of the two baselines is
%<*titleref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-titleref}%
[2022-03-08 v2.33 Module titleref for zref (HO)]%
[2022-04-07 v2.34 Module titleref for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -4765,7 +4765,7 @@ the height difference of the two baselines is
%<*xr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-xr}%
[2022-03-08 v2.33 Module xr for zref (HO)]%
[2022-04-07 v2.34 Module xr for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -5301,7 +5301,7 @@ the height difference of the two baselines is
%<*hyperref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-hyperref}%
[2022-03-08 v2.33 Module hyperref for zref (HO)]%
[2022-04-07 v2.34 Module hyperref for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -5331,7 +5331,7 @@ the height difference of the two baselines is
%<*savepos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-savepos}%
[2022-03-08 v2.33 Module savepos for zref (HO)]%
[2022-04-07 v2.34 Module savepos for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -5504,7 +5504,7 @@ the height difference of the two baselines is
%<*abspos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspos}%
[2022-03-08 v2.33 Module abspos for zref (HO)]%
[2022-04-07 v2.34 Module abspos for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -6158,7 +6158,7 @@ the height difference of the two baselines is
%<*dotfill>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-dotfill}%
[2022-03-08 v2.33 Module dotfill for zref (HO)]%
[2022-04-07 v2.34 Module dotfill for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -6258,7 +6258,7 @@ the height difference of the two baselines is
%<*env>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-env}%
[2022-03-08 v2.33 Module env for zref (HO)]%
[2022-04-07 v2.34 Module env for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
Expand Down Expand Up @@ -6797,6 +6797,9 @@ the height difference of the two baselines is
% \item Make the unique counter more robust when includeonly is used,
% https://github.com/ho-tex/zref/issues/10
% \end{Version}
% \begin{Version}{2022-04-07 v2.34}
% \item Updated
% \end{Version}
% \end{History}
%
% \PrintIndex
Expand Down

0 comments on commit ffdbb2c

Please sign in to comment.