diff options
author | Karl Berry <karl@freefriends.org> | 2021-08-18 20:47:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-08-18 20:47:09 +0000 |
commit | f42dc4b8dd52d7210c99b17d91b387565811c13e (patch) | |
tree | f363ae42c6959f8aba7fed1d51ac0b7e24acb17d | |
parent | b0fee827be0d99a89b05aa57264affdbbd929e48 (diff) |
zref-check (18aug21)
git-svn-id: svn://tug.org/texlive/trunk@60270 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-check/CHANGELOG.md | 18 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-check/README.md | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-check/zref-check-code.pdf | bin | 702150 -> 710511 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/zref-check/zref-check.pdf | bin | 454988 -> 455030 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/zref-check/zref-check.dtx | 301 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/zref-check/zref-check.sty | 210 |
6 files changed, 398 insertions, 142 deletions
diff --git a/Master/texmf-dist/doc/latex/zref-check/CHANGELOG.md b/Master/texmf-dist/doc/latex/zref-check/CHANGELOG.md index debf07cafcb..130aaf8ad75 100644 --- a/Master/texmf-dist/doc/latex/zref-check/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/zref-check/CHANGELOG.md @@ -1,6 +1,22 @@ # Changelog -## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.1.0...HEAD) +## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.2.0...HEAD) + +## [v0.2.0](https://github.com/gusbrs/zref-check/compare/v0.1.0...v0.2.0) (2021-08-17) + +### Changed +- The syntax of user command `\zcheck` has changed. Previously, it received + the `<checks>` as a second optional argument, now both `<checks>` and + `<options>` can be passed together in the single optional argument to + `\zcheck`. +- (Internal) Use new hook management system syntax for begindocument hooks. +- (Internal) Use prefix for internal zref properties. +- Small adjustments in User manual. + +### Added +- CTAN upload automation with l3build. +- Regression tests for labels with `babel` active characters. +- Dedicated Readme for CTAN. ## [v0.1.0](https://github.com/gusbrs/zref-check/releases/tag/v0.1.0) (2021-08-04) diff --git a/Master/texmf-dist/doc/latex/zref-check/README.md b/Master/texmf-dist/doc/latex/zref-check/README.md index c5726af278e..2b5febb76cf 100644 --- a/Master/texmf-dist/doc/latex/zref-check/README.md +++ b/Master/texmf-dist/doc/latex/zref-check/README.md @@ -2,6 +2,9 @@ **Flexible LaTeX cross-references with contextual checks based on zref** +Author: Gustavo Barros +Maintainer: Gustavo Barros + `zref-check` provides an user interface for making LaTeX cross-references flexibly, while allowing to have them checked for consistency with the document structure as typeset. Statements such as “above”, “on the next @@ -12,6 +15,10 @@ compilation time if any of these checks fail. `\zctarget` and the `zcregion` environment are also defined as a means to easily set label targets to arbitrary places in the text which can be referred to by `\zcheck`. -The released version of this package is available from CTAN. +License: LPPL Version 1.3c + +Repository: https://github.com/gusbrs/zref-check + +Bug tracker: https://github.com/gusbrs/zref-check/issues -For more details, check the Documentation. +CTAN: https://ctan.org/pkg/zref-check diff --git a/Master/texmf-dist/doc/latex/zref-check/zref-check-code.pdf b/Master/texmf-dist/doc/latex/zref-check/zref-check-code.pdf Binary files differindex 52682fbc5e5..b412a1c5bef 100644 --- a/Master/texmf-dist/doc/latex/zref-check/zref-check-code.pdf +++ b/Master/texmf-dist/doc/latex/zref-check/zref-check-code.pdf diff --git a/Master/texmf-dist/doc/latex/zref-check/zref-check.pdf b/Master/texmf-dist/doc/latex/zref-check/zref-check.pdf Binary files differindex ffdf3330371..f7b11108026 100644 --- a/Master/texmf-dist/doc/latex/zref-check/zref-check.pdf +++ b/Master/texmf-dist/doc/latex/zref-check/zref-check.pdf diff --git a/Master/texmf-dist/source/latex/zref-check/zref-check.dtx b/Master/texmf-dist/source/latex/zref-check/zref-check.dtx index 3ef8af66d81..29c48befbd3 100644 --- a/Master/texmf-dist/source/latex/zref-check/zref-check.dtx +++ b/Master/texmf-dist/source/latex/zref-check/zref-check.dtx @@ -74,7 +74,7 @@ % provide the text to be typeset based on the contextual information, % \cs{zcheck} lets the user supply an arbitrary text and specify one or more % checks to be done on the label(s) being referred to. If any of the checks -% fail, a warning is issued upon compilation, so that the user can go back to +% fails, a warning is issued upon compilation, so that the user can go back to % that cross-reference and correct it as needed, without having to rely on % burdensome and error prone manual proof-reading. % @@ -151,24 +151,26 @@ % % \begin{function}{\zcheck} % \begin{syntax} -% \cs{zcheck}\oarg{options}\marg{labels}\oarg{checks}\marg{text} +% \cs{zcheck}\oarg{checks/options}\marg{labels}\marg{text} % \end{syntax} -% Typesets \marg{text}, as given, while performing the comma separated list -% of \oarg{checks} on each of the comma separated list of \marg{labels}. -% When \pkg{hyperref} support is enabled, \marg{text} will be made a -% hyperlink to \emph{the first} label in \marg{labels}. The starred version -% of the command does the same as the plain one, just does not form a link. -% The \oarg{options} are (mostly) the same as those of the package, and can -% be given to local effect. +% Typesets \meta{text}, as given, while performing a list of \meta{checks} +% on each of the \meta{labels}. When \pkg{hyperref} support is enabled, +% \meta{text} will be made a hyperlink to \emph{the first} \meta{label} in +% \meta{labels}. The starred version of the command does the same as the +% plain one, just does not form a link. The \meta{options} are (mostly) the +% same as those of the package, and can be given to local effect. +% \meta{checks} and \meta{options} can be given side by side as a comma +% separated list in the optional argument. \meta{labels} is also a comma +% separated list. % \end{function} % % \begin{function}{\zctarget} % \begin{syntax} % \cs{zctarget}\marg{label}\marg{text} % \end{syntax} -% Typesets \marg{text}, as given, and places a pair of \texttt{zlabel}s, one -% at the start of \marg{text}, using \marg{label} as label name, another one -% (internal) at the end of \marg{text}. +% Typesets \meta{text}, as given, and places a pair of \texttt{zlabel}s, one +% at the start of \meta{text}, using \meta{label} as label name, another one +% (internal) at the end of \meta{text}. % \end{function} % % @@ -197,11 +199,11 @@ % \pkg{zref-check} provides several ``checks'' to be used with \cs{zcheck}. % The checks may be combined in a \cs{zcheck} call, e.g.\ \opt{[close, % after]}, or \opt{[thischap, before]}. In this case, each check in -% \oarg{checks} is performed against each of the \marg{labels}. This is done +% \meta{checks} is performed against each of the \meta{labels}. This is done % independently for each check, which means, in practice, that the checks bear % a logical \texttt{AND} relation to the others. Whether the combination is % meaningful, is up to the user. As is the correspondence between the -% \oarg{checks} and the \marg{text>} in \cs{zcheck}. +% \meta{checks} and the \meta{text} in \cs{zcheck}. % % The use of checks which perform ``within the page'' comparisons -- namely % \opt{above} and \opt{below} and, through them, \opt{before} and \opt{after} @@ -214,7 +216,7 @@ % label being referred to, relative to the \cs{zcheck} call being made. For % example, the \opt{before} check should issue no message if % \cs{ztarget}|{mylabel}{...}| occurs before -% \cs{zcheck}|{mylabel}[before]{...}|. +% \cs{zcheck}|[before]{mylabel}{...}|. % % The available checks are the following: % @@ -298,14 +300,13 @@ % set globally either as \cs{usepackage}\oarg{options} at load-time (see % Section~\ref{sec:loading-package}), or by means of \cs{zrefchecksetup} (see % Section~\ref{sec:user-interface}) in the preamble. Most options can also be -% used with local effects, through the optional argument \oarg{options} of -% \cs{zcheck}. +% used with local effects, through the optional argument of \cs{zcheck}. % % \DescribeOption{hyperref} % Controls the use of \pkg{hyperref} by \pkg{zref-check} and takes values % \opt{auto}, \opt{true}, \opt{false}. The default value, \opt{auto}, makes % \pkg{zref-check} use \pkg{hyperref} if it is loaded, meaning \cs{zcheck} can -% be hyperlinked to the \emph{first label} in \marg{labels}. \opt{true} does +% be hyperlinked to the \emph{first label} in \meta{labels}. \opt{true} does % the same thing, but warns if \pkg{hyperref} is not loaded (\pkg{hyperref} is % never loaded for you). In either of these cases, if \pkg{hyperref} is % loaded, module \pkg{zref-hyperref} is also loaded by \pkg{zref-check}. @@ -399,7 +400,7 @@ % in tandem with standard references, for example: % % \begin{verbatim} -% ... Figure~\ref{fig:figure-1}, \zcheck*{fig:figure-1}[nextpage]{on +% ... Figure~\ref{fig:figure-1}, \zcheck*[nextpage]{fig:figure-1}{on % the next page}. % \end{verbatim} % @@ -431,12 +432,12 @@ % \texttt{abspage} property provided by the \pkg{zref-abspage} module. This % is a solid piece of information, on which we can rely upon. However, % despite that, page number checks may still become ill-defined, if the -% \marg{text} argument in \cs{zcheck}, when typeset, crosses page boundaries, +% \meta{text} argument in \cs{zcheck}, when typeset, crosses page boundaries, % starting in one page, and finishing in another. The same can happen with % the text in \cs{zctarget} and the \texttt{zcregion} environment. % -% This is why the user commands of this package set always a pair or labels -% around \meta{text}. So, when checking \cs{zcheck} against a regular +% This is why the user commands of this package set a pair or labels around +% \meta{text}. So, when checking \cs{zcheck} against a regular % \texttt{zlabel} both the start and the end of the \meta{text} are checked % against the label, and the check fails if either of them fails. When % checking \cs{zcheck} against a \cs{zctarget} or a \texttt{zcregion}, both @@ -548,7 +549,7 @@ % % Identify the package. % \begin{macrocode} -\ProvidesExplPackage {zref-check} {2021-08-04} {0.1.0} +\ProvidesExplPackage {zref-check} {2021-08-17} {0.2.0} {Flexible cross-references with contextual checks based on zref} % \end{macrocode} % @@ -587,15 +588,15 @@ \int_gincr:N \g_@@_abschap_int \int_zero:N \g_@@_abssec_int } -\zref@newprop { abschap } [0] { \int_use:N \g_@@_abschap_int } -\zref@addprop \ZREF@mainlist { abschap } +\zref@newprop { zc@abschap } [0] { \int_use:N \g_@@_abschap_int } +\zref@addprop \ZREF@mainlist { zc@abschap } % \end{macrocode} % % \begin{macrocode} \AddToHook { cmd / section / before } { \int_gincr:N \g_@@_abssec_int } -\zref@newprop { abssec } [0] { \int_use:N \g_@@_abssec_int } -\zref@addprop \ZREF@mainlist { abssec } +\zref@newprop { zc@abssec } [0] { \int_use:N \g_@@_abssec_int } +\zref@addprop \ZREF@mainlist { zc@abssec } % \end{macrocode} % % @@ -606,10 +607,10 @@ \zref@newlist { zrefcheck } \zref@addprops { zrefcheck } { + page , abspage , - abschap , - abssec , - page + zc@abschap , + zc@abssec } % \end{macrocode} % @@ -773,7 +774,7 @@ % \end{variable} % % \begin{macrocode} -\AtBeginDocument +\AddToHook { begindocument } { \@ifpackageloaded { hyperref } { @@ -837,7 +838,7 @@ % \end{variable} % % \begin{macrocode} -\AtBeginDocument +\AddToHook { begindocument } { \keys_define:nn { zref-check } { ignore .meta:n = { msglevel = none } } @@ -935,7 +936,7 @@ % \end{macro} % % \begin{macrocode} -\AtBeginDocument +\AddToHook { begindocument } { \bool_if:NT \l_@@_target_label_bool { @@ -1147,9 +1148,11 @@ % circumstances, and except for outrageous label placement by the user, it % would return the expected results. We don't really need exact coordinates % to decide ``above/below''. Besides, it would do an exact job for the -% dedicated target macros of this package. However, I could not conceive a -% situation where the \texttt{yx} criterion would perform clearly better than -% the \texttt{labelseq} one. And, if that's the case, and considering the +% dedicated target macros of this package. It is also true that the ``page'' +% for \cs{pageref} is stored with the value of where the \cs{label} is placed, +% wherever that may be. However, I could not conceive a situation where the +% \texttt{yx} criterion would perform clearly better than the +% \texttt{labelseq} one. And, if that's the case, and considering the % complications it brings, this check was a slippery slope. All in all, I've % decided to drop it. % @@ -1350,13 +1353,13 @@ % \url{https://tex.stackexchange.com/a/179907}. % % \begin{syntax} -% \cs{zcheck}\meta{*}\oarg{options}\marg{labels}\oarg{checks}\marg{text} +% \cs{zcheck}\meta{*}\oarg{checks/options}\marg{labels}\marg{text} % \end{syntax} % % \begin{macrocode} \NewDocumentCommand \zcheck - { s O { } > { \SplitList { , } } m > { \SplitList { , } } O { } m } - { \zref@wrapper@babel \@@_zcheck:nnnnn {#3} {#1} {#2} {#4} {#5} } + { s O { } > { \SplitList { , } } m m } + { \zref@wrapper@babel \@@_zcheck:nnnn {#3} {#1} {#2} {#4} } % \end{macrocode} % \end{macro} % @@ -1368,7 +1371,7 @@ % \l_@@_checkend_tl , % \l_@@_link_label_tl , % \l_@@_link_anchor_tl , -% \l_@@_link_star_tl +% \l_@@_link_star_bool % } % \begin{macrocode} \int_new:N \g_@@_id_int @@ -1376,11 +1379,11 @@ \tl_new:N \l_@@_checkend_tl \tl_new:N \l_@@_link_label_tl \tl_new:N \l_@@_link_anchor_tl -\bool_new:N \l_@@_link_star_tl +\bool_new:N \l_@@_link_star_bool % \end{macrocode} % \end{variable} % -% \begin{macro}{\@@_zcheck:nnnnn} +% \begin{macro}{\@@_zcheck:nnnn} % An intermediate internal function, which does the actual heavy lifting, % and places \Arg{labels} as first argument, so that it can be protected by % \cs{zref@wrapper@babel} in \cs{zcheck}. This is the same procedure as the @@ -1388,15 +1391,19 @@ % protection of \pkg{babel} active characters. % % \begin{syntax} -% \cs{@@_zcheck:nnnnn} \Arg{labels} \Arg{*} \Arg{options} \Arg{checks} \Arg{text} +% \cs{@@_zcheck:nnnn} \Arg{labels} \Arg{*} \Arg{checks/options} \Arg{text} % \end{syntax} % % \begin{macrocode} -\cs_new:Npn \@@_zcheck:nnnnn #1#2#3#4#5 +\cs_new:Npn \@@_zcheck:nnnn #1#2#3#4 { \group_begin: % \end{macrocode} -% Process local options. +% Set checks keys. +% \begin{macrocode} + \@@_set_checks_keys: +% \end{macrocode} +% Process local options and checks. % \begin{macrocode} \keys_set:nn { zref-check } {#3} % \end{macrocode} @@ -1418,25 +1425,25 @@ % hyperlinking. % \begin{macrocode} \tl_set:Nn \l_@@_link_label_tl { \tl_head:n {#1} } - \bool_set:Nn \l_@@_link_star_tl {#2} + \bool_set:Nn \l_@@_link_star_bool {#2} \zref@ifrefundefined { \l_@@_link_label_tl } % \end{macrocode} % If the reference is undefined, just typeset. % \begin{macrocode} - {#5} + {#4} { \bool_if:nTF { \l_@@_use_hyperref_bool && - ! \l_@@_link_star_tl + ! \l_@@_link_star_bool } { \exp_args:Nx \zrefcheck_get_astl:nnn { \l_@@_link_label_tl } { anchor } { \l_@@_link_anchor_tl } - \hyperlink { \l_@@_link_anchor_tl } {#5} + \hyperlink { \l_@@_link_anchor_tl } {#4} } - {#5} + {#4} } % \end{macrocode} % Set checkend label. @@ -1449,7 +1456,8 @@ % \end{macrocode} % Run the checks. % \begin{macrocode} - \@@_run_checks:nnV {#4} {#1} { \l_@@_checkbeg_tl } + \@@_run_checks:nnv + { \l_@@_zcheck_checks_seq } {#1} { l_@@_checkbeg_tl } \group_end: } % \end{macrocode} @@ -1536,25 +1544,146 @@ % registered for \pkg{zref}. This can be done with \cs{zref@newprop}, % \cs{zref@addprop} and friends, as usual. % +% Third, the check must be registered as a key which gets setup in +% \cs{zcheck} by \cs{@@_set_checks_keys:}. +% +% +% \subsection{Setup} +% +% \begin{variable}{\l_@@_zcheck_checks_seq} +% \begin{macrocode} +\seq_new:N \l_@@_zcheck_checks_seq +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\@@_set_checks_keys:} +% \begin{macrocode} +\cs_new:Npn \@@_set_checks_keys: + { + \keys_define:nn { zref-check } + { + thispage .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { thispage } } , + thispage .value_forbidden:n = true , + + prevpage .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { prevpage } } , + prevpage .value_forbidden:n = true , + + nextpage .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { nextpage } } , + nextpage .value_forbidden:n = true , + + facing .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { facing } } , + facing .value_forbidden:n = true , + + above .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { above } } , + above .value_forbidden:n = true , + + below .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { below } } , + below .value_forbidden:n = true , + + pagesbefore .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { pagesbefore } } , + pagesbefore .value_forbidden:n = true , + + ppbefore .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { ppbefore } } , + ppbefore .value_forbidden:n = true , + + pagesafter .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { pagesafter } } , + pagesafter .value_forbidden:n = true , + + ppafter .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { ppafter } } , + ppafter .value_forbidden:n = true , + + before .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { before } } , + before .value_forbidden:n = true , + + after .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { after } } , + after .value_forbidden:n = true , + + thischap .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { thischap } } , + thischap .value_forbidden:n = true , + + prevchap .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { prevchap } } , + prevchap .value_forbidden:n = true , + + nextchap .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { nextchap } } , + nextchap .value_forbidden:n = true , + + chapsbefore .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { chapsbefore } } , + chapsbefore .value_forbidden:n = true , + + chapsafter .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { chapsafter } } , + chapsafter .value_forbidden:n = true , + + thissec .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { thissec } } , + thissec .value_forbidden:n = true , + + prevsec .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { prevsec } } , + prevsec .value_forbidden:n = true , + + nextsec .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { nextsec } } , + nextsec .value_forbidden:n = true , + + secsbefore .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { secsbefore } } , + secsbefore .value_forbidden:n = true , + + secsafter .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { secsafter } } , + secsafter .value_forbidden:n = true , + + close .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { close } } , + close .value_forbidden:n = true , + + far .code:n = + { \seq_put_right:Nn \l_@@_zcheck_checks_seq { far } } , + far .value_forbidden:n = true , + } + } +% \end{macrocode} +% \end{macro} +% +% +% % % \subsection{Running} % -% \begin{macro}{\@@_run_checks:nnn, \@@_run_checks:nnV} +% \begin{macro}{\@@_run_checks:nnn, \@@_run_checks:nnv} % \begin{syntax} % \cs{@@_run_checks:nnn} \Arg{checks} \Arg{labels} \Arg{reference} % \end{syntax} +% \meta{checks} are expected to be received as a sequence variable. % \begin{macrocode} \cs_new:Npn \@@_run_checks:nnn #1#2#3 { \group_begin: \tl_map_inline:nn {#2} { - \tl_map_inline:nn {#1} + \seq_map_inline:Nn #1 { \@@_do_check:nnn {####1} {##1} {#3} } } \group_end: } -\cs_generate_variant:Nn \@@_run_checks:nnn { nnV } +\cs_generate_variant:Nn \@@_run_checks:nnn { nnv } % \end{macrocode} % \end{macro} % @@ -1981,15 +2110,15 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { \int_compare_p:nNn { \l_@@_lbl_int } = { \l_@@_ref_int } && % \end{macrocode} -% `0' is the default value of \texttt{abschap} property, and means here no +% `0' is the default value of \texttt{zc@abschap} property, and means here no % \cs{chapter} has yet been issued, therefore it cannot be ``this chapter'', % nor ``the next chapter'', nor ``the previous chapter'', it is just ``no % chapter''. Note, however, that a statement about a ``future'' chapter does @@ -2007,8 +2136,8 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2024,8 +2153,8 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2042,8 +2171,8 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2059,8 +2188,8 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2092,10 +2221,10 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2104,7 +2233,7 @@ \int_compare_p:nNn { \l_@@_lbl_int } = { \l_@@_ref_int } && % \end{macrocode} -% `0' is the default value of \texttt{abssec} property, and means here no +% `0' is the default value of \texttt{zc@abssec} property, and means here no % \cs{section} has yet been issued since its counter has been reset, which % occurs at the beginning of the document and at every chapter. Hence, as is % the case for chapters, `0' is just ``not a section''. The same observation @@ -2122,10 +2251,10 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2143,10 +2272,10 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2165,10 +2294,10 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { @@ -2186,10 +2315,10 @@ { \group_begin: \bool_set_true:N \l_@@_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int } \bool_lazy_and:nnTF { \l_@@_integer_bool } { diff --git a/Master/texmf-dist/tex/latex/zref-check/zref-check.sty b/Master/texmf-dist/tex/latex/zref-check/zref-check.sty index 72e8a2f8784..ea26b0766bc 100644 --- a/Master/texmf-dist/tex/latex/zref-check/zref-check.sty +++ b/Master/texmf-dist/tex/latex/zref-check/zref-check.sty @@ -55,7 +55,7 @@ }% \endinput }% -\ProvidesExplPackage {zref-check} {2021-08-04} {0.1.0} +\ProvidesExplPackage {zref-check} {2021-08-17} {0.2.0} {Flexible cross-references with contextual checks based on zref} \RequirePackage { zref-user } \RequirePackage { zref-abspage } @@ -67,19 +67,19 @@ \int_gincr:N \g__zrefcheck_abschap_int \int_zero:N \g__zrefcheck_abssec_int } -\zref@newprop { abschap } [0] { \int_use:N \g__zrefcheck_abschap_int } -\zref@addprop \ZREF@mainlist { abschap } +\zref@newprop { zc@abschap } [0] { \int_use:N \g__zrefcheck_abschap_int } +\zref@addprop \ZREF@mainlist { zc@abschap } \AddToHook { cmd / section / before } { \int_gincr:N \g__zrefcheck_abssec_int } -\zref@newprop { abssec } [0] { \int_use:N \g__zrefcheck_abssec_int } -\zref@addprop \ZREF@mainlist { abssec } +\zref@newprop { zc@abssec } [0] { \int_use:N \g__zrefcheck_abssec_int } +\zref@addprop \ZREF@mainlist { zc@abssec } \zref@newlist { zrefcheck } \zref@addprops { zrefcheck } { + page , abspage , - abschap , - abssec , - page + zc@abschap , + zc@abssec } \cs_new:Npn \__zrefcheck_message:nnnn #1#2#3#4 { @@ -175,7 +175,7 @@ hyperref .initial:n = auto , hyperref .default:n = auto } -\AtBeginDocument +\AddToHook { begindocument } { \@ifpackageloaded { hyperref } { @@ -224,7 +224,7 @@ { \msg_warning:nn { zref-check } { ignore-document-only } } , ignore .value_forbidden:n = true } -\AtBeginDocument +\AddToHook { begindocument } { \keys_define:nn { zref-check } { ignore .meta:n = { msglevel = none } } @@ -284,7 +284,7 @@ } \cs_new:Npn \__zrefcheck_target_label:n #1 { \zref@labelbylist {#1} { zrefcheck } } -\AtBeginDocument +\AddToHook { begindocument } { \bool_if:NT \l__zrefcheck_target_label_bool { @@ -410,17 +410,18 @@ } } \NewDocumentCommand \zcheck - { s O { } > { \SplitList { , } } m > { \SplitList { , } } O { } m } - { \zref@wrapper@babel \__zrefcheck_zcheck:nnnnn {#3} {#1} {#2} {#4} {#5} } + { s O { } > { \SplitList { , } } m m } + { \zref@wrapper@babel \__zrefcheck_zcheck:nnnn {#3} {#1} {#2} {#4} } \int_new:N \g__zrefcheck_id_int \tl_new:N \l__zrefcheck_checkbeg_tl \tl_new:N \l__zrefcheck_checkend_tl \tl_new:N \l__zrefcheck_link_label_tl \tl_new:N \l__zrefcheck_link_anchor_tl -\bool_new:N \l__zrefcheck_link_star_tl -\cs_new:Npn \__zrefcheck_zcheck:nnnnn #1#2#3#4#5 +\bool_new:N \l__zrefcheck_link_star_bool +\cs_new:Npn \__zrefcheck_zcheck:nnnn #1#2#3#4 { \group_begin: + \__zrefcheck_set_checks_keys: \keys_set:nn { zref-check } {#3} \int_gincr:N \g__zrefcheck_id_int \tl_set:Nx \l__zrefcheck_checkbeg_tl @@ -429,26 +430,27 @@ { \__zrefcheck_end_lblfmt:n { \l__zrefcheck_checkbeg_tl } } \zref@labelbylist { \l__zrefcheck_checkbeg_tl } { zrefcheck } \tl_set:Nn \l__zrefcheck_link_label_tl { \tl_head:n {#1} } - \bool_set:Nn \l__zrefcheck_link_star_tl {#2} + \bool_set:Nn \l__zrefcheck_link_star_bool {#2} \zref@ifrefundefined { \l__zrefcheck_link_label_tl } - {#5} + {#4} { \bool_if:nTF { \l__zrefcheck_use_hyperref_bool && - ! \l__zrefcheck_link_star_tl + ! \l__zrefcheck_link_star_bool } { \exp_args:Nx \zrefcheck_get_astl:nnn { \l__zrefcheck_link_label_tl } { anchor } { \l__zrefcheck_link_anchor_tl } - \hyperlink { \l__zrefcheck_link_anchor_tl } {#5} + \hyperlink { \l__zrefcheck_link_anchor_tl } {#4} } - {#5} + {#4} } \zref@labelbylist { \l__zrefcheck_checkend_tl } { zrefcheck } \tl_map_function:nN {#1} \zref@refused - \__zrefcheck_run_checks:nnV {#4} {#1} { \l__zrefcheck_checkbeg_tl } + \__zrefcheck_run_checks:nnv + { \l__zrefcheck_zcheck_checks_seq } {#1} { l__zrefcheck_checkbeg_tl } \group_end: } \NewDocumentCommand \zctarget { m +m } @@ -470,17 +472,119 @@ \zref@wrapper@babel \zref@labelbylist { \__zrefcheck_end_lblfmt:n {#1} } { zrefcheck } } +\seq_new:N \l__zrefcheck_zcheck_checks_seq +\cs_new:Npn \__zrefcheck_set_checks_keys: + { + \keys_define:nn { zref-check } + { + thispage .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { thispage } } , + thispage .value_forbidden:n = true , + + prevpage .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { prevpage } } , + prevpage .value_forbidden:n = true , + + nextpage .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { nextpage } } , + nextpage .value_forbidden:n = true , + + facing .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { facing } } , + facing .value_forbidden:n = true , + + above .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { above } } , + above .value_forbidden:n = true , + + below .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { below } } , + below .value_forbidden:n = true , + + pagesbefore .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { pagesbefore } } , + pagesbefore .value_forbidden:n = true , + + ppbefore .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { ppbefore } } , + ppbefore .value_forbidden:n = true , + + pagesafter .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { pagesafter } } , + pagesafter .value_forbidden:n = true , + + ppafter .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { ppafter } } , + ppafter .value_forbidden:n = true , + + before .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { before } } , + before .value_forbidden:n = true , + + after .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { after } } , + after .value_forbidden:n = true , + + thischap .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { thischap } } , + thischap .value_forbidden:n = true , + + prevchap .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { prevchap } } , + prevchap .value_forbidden:n = true , + + nextchap .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { nextchap } } , + nextchap .value_forbidden:n = true , + + chapsbefore .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { chapsbefore } } , + chapsbefore .value_forbidden:n = true , + + chapsafter .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { chapsafter } } , + chapsafter .value_forbidden:n = true , + + thissec .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { thissec } } , + thissec .value_forbidden:n = true , + + prevsec .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { prevsec } } , + prevsec .value_forbidden:n = true , + + nextsec .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { nextsec } } , + nextsec .value_forbidden:n = true , + + secsbefore .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { secsbefore } } , + secsbefore .value_forbidden:n = true , + + secsafter .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { secsafter } } , + secsafter .value_forbidden:n = true , + + close .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { close } } , + close .value_forbidden:n = true , + + far .code:n = + { \seq_put_right:Nn \l__zrefcheck_zcheck_checks_seq { far } } , + far .value_forbidden:n = true , + } + } \cs_new:Npn \__zrefcheck_run_checks:nnn #1#2#3 { \group_begin: \tl_map_inline:nn {#2} { - \tl_map_inline:nn {#1} + \seq_map_inline:Nn #1 { \__zrefcheck_do_check:nnn {####1} {##1} {#3} } } \group_end: } -\cs_generate_variant:Nn \__zrefcheck_run_checks:nnn { nnV } +\cs_generate_variant:Nn \__zrefcheck_run_checks:nnn { nnv } \bool_new:N \l__zrefcheck_passedcheck_bool \bool_new:N \l__zrefcheck_onpage_bool \seq_new:N \c__zrefcheck_onpage_checks_seq @@ -765,8 +869,8 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -783,8 +887,8 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -800,8 +904,8 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -818,8 +922,8 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -835,8 +939,8 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -853,10 +957,10 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l__zrefcheck_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_b_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -875,10 +979,10 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l__zrefcheck_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_b_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -896,10 +1000,10 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l__zrefcheck_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_b_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -918,10 +1022,10 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l__zrefcheck_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_b_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { @@ -939,10 +1043,10 @@ { \group_begin: \bool_set_true:N \l__zrefcheck_integer_bool - \zrefcheck_get_asint:nnn {#1} { abssec } { \l__zrefcheck_lbl_int } - \zrefcheck_get_asint:nnn {#2} { abssec } { \l__zrefcheck_ref_int } - \zrefcheck_get_asint:nnn {#1} { abschap } { \l__zrefcheck_lbl_b_int } - \zrefcheck_get_asint:nnn {#2} { abschap } { \l__zrefcheck_ref_b_int } + \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l__zrefcheck_lbl_int } + \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l__zrefcheck_ref_int } + \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l__zrefcheck_lbl_b_int } + \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l__zrefcheck_ref_b_int } \bool_lazy_and:nnTF { \l__zrefcheck_integer_bool } { |