From 3593305133bcfb167225af1b35c299bde1456579 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 15 Aug 2023 03:00:53 +0000
Subject: CTAN sync 202308150300

---
 macros/latex/contrib/zref-check/zref-check.dtx | 1004 ++++++++++++------------
 1 file changed, 503 insertions(+), 501 deletions(-)

(limited to 'macros/latex/contrib/zref-check/zref-check.dtx')

diff --git a/macros/latex/contrib/zref-check/zref-check.dtx b/macros/latex/contrib/zref-check/zref-check.dtx
index 58eb421cdd..c3a05b9990 100644
--- a/macros/latex/contrib/zref-check/zref-check.dtx
+++ b/macros/latex/contrib/zref-check/zref-check.dtx
@@ -72,23 +72,22 @@
 % the new hook system in \pkg{ltcmdhooks}, which was released with the
 % 2021/06/01 \LaTeX{} kernel.
 %    \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
+\def\zrefcheck@required@kernel{2021-06-01}
+\NeedsTeXFormat{LaTeX2e}[\zrefcheck@required@kernel]
 \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
-\IfFormatAtLeastTF{2021-06-01}
+\IfFormatAtLeastTF{\zrefcheck@required@kernel}
   {}
   {%
     \PackageError{zref-check}{LaTeX kernel too old}
       {%
-        'zref-check' requires a LaTeX kernel newer than 2021-06-01.%
-        \MessageBreak Loading will abort!%
+        'zref-check' requires a LaTeX kernel \zrefcheck@required@kernel\space or newer.%
       }%
-    \endinput
   }%
 %    \end{macrocode}
 %
 % Identify the package.
 %    \begin{macrocode}
-\ProvidesExplPackage {zref-check} {2023-06-14} {0.3.3}
+\ProvidesExplPackage {zref-check} {2023-08-13} {0.3.4}
   {Flexible cross-references with contextual checks based on zref}
 %    \end{macrocode}
 %
@@ -193,6 +192,13 @@
     Same~page~check~\msg_line_context:.~
     Double-check~'#1'~for~label~'#2'~on~page~#3.
   }
+\msg_new:nnn { zref-check } { empty-label }
+  {
+    Check~failed~\msg_line_context:.~
+    Failed~check~'#1'~for~empty~label.
+  }
+\msg_new:nnn { zref-check } { no-checks }
+  { No~checks~for~'\iow_char:N\\zcheck'~\msg_line_context:. }
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -214,9 +220,9 @@
   }
 \msg_new:nnn { zref-check } { missing-hyperref }
   { Missing~'hyperref'~package. \iow_newline: Setting~'hyperref=false'. }
-\msg_new:nnn { zref-check } { ignore-document-only }
+\msg_new:nnn { zref-check } { ignore-ok-document-only }
   {
-    Option~'ignore'~only~available~in~the~document. \iow_newline:
+    Option~'#1'~only~available~in~the~document. \iow_newline:
     Use~option~'msglevel'~instead.
   }
 \msg_new:nnn { zref-check } { option-preamble-only }
@@ -379,27 +385,18 @@
           { \tl_set:Nn \l_@@_msglevel_tl { warning } }
           { \tl_set:Nn \l_@@_msglevel_tl { info } }
       } ,
-    msglevel / obeydraft .code:n =
-      {
-        % NOTE Option value deprecated in 2021-12-07 for v0.2.2.
-        \msg_warning:nnnn { zref-check }{ option-deprecated-with-alternative }
-          { msglevel=obeydraft } { msglevel=infoifdraft }
-      } ,
-    msglevel / obeyfinal .code:n =
-      {
-        % NOTE Option value deprecated in 2021-12-07 for v0.2.2.
-        \msg_warning:nnnn { zref-check }{ option-deprecated-with-alternative }
-          { msglevel=obeyfinal } { msglevel=warniffinal }
-      } ,
     msglevel .value_required:n = true ,
     msglevel .initial:n = warn ,
 %    \end{macrocode}
-% \opt{ignore} is a convenience alias for \opt{msglevel=none}, but only for
-% use in the document body.
+% \opt{ignore} and \opt{ok} are convenience aliases for \opt{msglevel=none},
+% but only for use in the document body.
 %    \begin{macrocode}
     ignore .code:n =
-      { \msg_warning:nn { zref-check } { ignore-document-only } } ,
-    ignore .value_forbidden:n = true
+      { \msg_warning:nnn { zref-check } { ignore-ok-document-only } { ignore } } ,
+    ignore .value_forbidden:n = true ,
+    ok .code:n =
+      { \msg_warning:nnn { zref-check } { ignore-ok-document-only } { ok } } ,
+    ok .value_forbidden:n = true ,
   }
 %    \end{macrocode}
 % \end{variable}
@@ -408,7 +405,10 @@
 \AddToHook { begindocument }
   {
     \keys_define:nn { zref-check }
-      { ignore .meta:n = { msglevel = none } }
+      {
+        ignore .meta:n = { msglevel = none } ,
+        ok .meta:n = { msglevel = none } ,
+      }
   }
 %    \end{macrocode}
 %
@@ -441,18 +441,6 @@
           { \bool_set_true:N \l_@@_msgonpage_bool }
           { \bool_set_false:N \l_@@_msgonpage_bool }
       } ,
-    onpage / obeydraft .code:n =
-      {
-        % NOTE Option value deprecated in 2021-12-07 for v0.2.2.
-        \msg_warning:nnnn { zref-check }{ option-deprecated-with-alternative }
-          { onpage=obeydraft } { onpage=labelseqifdraft }
-      } ,
-    onpage / obeyfinal .code:n =
-      {
-        % NOTE Option value deprecated in 2021-12-07 for v0.2.2.
-        \msg_warning:nnnn { zref-check }{ option-deprecated-with-alternative }
-          { onpage=obeyfinal } { onpage=msgiffinal }
-      } ,
     onpage .value_required:n = true ,
     onpage .initial:n = labelseq
   }
@@ -483,22 +471,6 @@
 % \end{variable}
 %
 %
-% \subsubsection*{\opt{labelcmd} option}
-%
-%    \begin{macrocode}
-\keys_define:nn { zref-check }
-  {
-    labelcmd .code:n =
-      {
-        % NOTE Option value deprecated in 2022-02-08 for v0.2.4.
-        \msg_warning:nnn { zref-check }{ option-deprecated }
-          { labelcmd }
-      } ,
-  }
-%    \end{macrocode}
-%
-%
-%
 % \subsubsection*{Package options}
 %
 % \pkg{zref-check} does not accept load-time options.  Despite the tradition
@@ -631,30 +603,30 @@
 %    \begin{macrocode}
     \ior_open:Nn \g_tmpa_ior { \g_tmpa_tl }
     \group_begin:
-      \int_zero:N \l_tmpa_int
-      \tl_clear:N \l_tmpa_tl
-      \tl_clear:N \l_tmpb_tl
-      \bool_set_false:N \l_tmpa_bool
-      \ior_map_variable:NNn \g_tmpa_ior \l_tmpa_tl
-        {
-          \tl_map_variable:NNn \l_tmpa_tl \l_tmpb_tl
-            {
-              \tl_if_eq:NnTF \l_tmpb_tl { \zref@newlabel }
-                {
+    \int_zero:N \l_tmpa_int
+    \tl_clear:N \l_tmpa_tl
+    \tl_clear:N \l_tmpb_tl
+    \bool_set_false:N \l_tmpa_bool
+    \ior_map_variable:NNn \g_tmpa_ior \l_tmpa_tl
+      {
+        \tl_map_variable:NNn \l_tmpa_tl \l_tmpb_tl
+          {
+            \tl_if_eq:NnTF \l_tmpb_tl { \zref@newlabel }
+              {
 %    \end{macrocode}
 % Found a \cs{zref@label}, signal it.
 %    \begin{macrocode}
-                  \bool_set_true:N \l_tmpa_bool
-                }
-                {
-                  \bool_if:NTF \l_tmpa_bool
-                    {
-                      \bool_set_false:N \l_tmpa_bool
-                      \int_incr:N \l_tmpa_int
-                      \prop_gput:Nxx \g_@@_auxfile_lblseq_prop
-                        { \l_tmpb_tl } { \int_use:N \l_tmpa_int }
-                    }
-                    {
+                \bool_set_true:N \l_tmpa_bool
+              }
+              {
+                \bool_if:NTF \l_tmpa_bool
+                  {
+                    \bool_set_false:N \l_tmpa_bool
+                    \int_incr:N \l_tmpa_int
+                    \prop_gput:Nxx \g_@@_auxfile_lblseq_prop
+                      { \l_tmpb_tl } { \int_use:N \l_tmpa_int }
+                  }
+                  {
 %    \end{macrocode}
 % If there is not a match of the first token with \cs{zref@newlabel}, break
 % the loop and discard the rest of the line, to ensure no babel calls to
@@ -662,11 +634,11 @@
 % loop and discards the rest of the \cs{zref@newlabel} lines after we got the
 % label we wanted, since we reset \cs{l_tmpa_bool} in the \texttt{T} branch.
 %    \begin{macrocode}
-                      \tl_map_break:
-                    }
-                }
-            }
-        }
+                    \tl_map_break:
+                  }
+              }
+          }
+      }
     \group_end:
     \ior_close:N \g_tmpa_ior
   }
@@ -942,65 +914,68 @@
   {
     \group_begin:
 %    \end{macrocode}
-% Process local options and checks.
+% Process local options and checks.  We use \cs{seq_set_split:Nnn} to set
+% \cs{l_@@_zcheck_labels_seq} -- instead of \cs{seq_set_from_clist:Nn} -- to
+% support empty labels.
 %    \begin{macrocode}
-      \keys_set:nn { zref-check / zcheck } {#3}
-      \seq_set_from_clist:Nn \l_@@_zcheck_labels_seq {#1}
+    \keys_set:nn { zref-check / zcheck } {#3}
+    \seq_set_split:Nnn \l_@@_zcheck_labels_seq { , } {#1}
 %    \end{macrocode}
 % Names of the labels for this zcheck call.
 %    \begin{macrocode}
-      \int_gincr:N \g_@@_id_int
-      \tl_set:Nx \l_@@_checkbeg_tl
-        { \@@_check_lblfmt:n { \g_@@_id_int } }
+    \int_gincr:N \g_@@_id_int
+    \tl_set:Nx \l_@@_checkbeg_tl
+      { \@@_check_lblfmt:n { \g_@@_id_int } }
 %    \end{macrocode}
 % Set checkbeg label.
 %    \begin{macrocode}
-      \zref@labelbylist { \l_@@_checkbeg_tl } { zrefcheck-check }
+    \zref@labelbylist { \l_@@_checkbeg_tl } { zrefcheck-check }
 %    \end{macrocode}
 % Typeset \marg{text}, with hyperlink when appropriate.  Even though the first
 % argument can receive a list of labels, there is no meaningful way to set
 % links to multiple targets.  Hence, only the first one is considered for
 % hyperlinking.
 %    \begin{macrocode}
-      \seq_get:NN \l_@@_zcheck_labels_seq \l_@@_link_label_tl
-      \bool_set:Nn \l_@@_link_star_bool {#2}
-      \zref@ifrefundefined { \l_@@_link_label_tl }
+    \seq_get:NN \l_@@_zcheck_labels_seq \l_@@_link_label_tl
+    \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}
-        {#4}
-        {
-          \bool_if:nTF
-            {
-              \l_@@_use_hyperref_bool &&
-              ! \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 } {#4}
-            }
-            {#4}
-        }
+      {#4}
+      {
+        \bool_if:nTF
+          {
+            \l_@@_use_hyperref_bool &&
+            ! \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 } {#4}
+          }
+          {#4}
+      }
 %    \end{macrocode}
 % Set checkend label.
 %    \begin{macrocode}
-      \bool_if:NT \l_@@_zcheck_end_label_bool
-        {
-          \zref@labelbylist
-            { \@@_end_lblfmt:n { \l_@@_checkbeg_tl } }
-            { zrefcheck-end }
-        }
+    \bool_if:NT \l_@@_zcheck_end_label_bool
+      {
+        \zref@labelbylist
+          { \@@_end_lblfmt:n { \l_@@_checkbeg_tl } }
+          { zrefcheck-end }
+      }
 %    \end{macrocode}
 % Check if \meta{labels} are defined.
 %    \begin{macrocode}
-      \seq_map_function:NN \l_@@_zcheck_labels_seq \zref@refused
+    \seq_map_inline:Nn \l_@@_zcheck_labels_seq
+      { \tl_if_empty:nF {##1} { \zref@refused {##1} } }
 %    \end{macrocode}
 % Run the checks.
 %    \begin{macrocode}
-      \@@_run_checks:nnx { \l_@@_zcheck_checks_seq }
-        { \l_@@_zcheck_labels_seq } { \l_@@_checkbeg_tl }
+    \@@_run_checks:nnx { \l_@@_zcheck_checks_seq }
+      { \l_@@_zcheck_labels_seq } { \l_@@_checkbeg_tl }
     \group_end:
   }
 %    \end{macrocode}
@@ -1119,6 +1094,7 @@
     nextsec ,
     secsbefore ,
     secsafter ,
+    manual ,
   }
 %    \end{macrocode}
 % \end{variable}
@@ -1171,6 +1147,7 @@
     secsafter ,
     close ,
     far ,
+    manual ,
   }
   {
     \keys_define:nn { zref-check / zcheck }
@@ -1199,11 +1176,15 @@
 \cs_new_protected:Npn \@@_run_checks:nnn #1#2#3
   {
     \group_begin:
-      \seq_map_inline:Nn #2
-        {
-          \seq_map_inline:Nn #1
-            { \@@_do_check:nnn {####1} {##1} {#3} }
-        }
+    \seq_map_inline:Nn #2
+      {
+        \seq_if_empty:NTF #1
+          { \@@_message:nnnn { no-checks } { } { } { } }
+          {
+            \seq_map_inline:Nn #1
+              { \@@_do_check:nnn {####1} {##1} {#3} }
+          }
+      }
     \group_end:
   }
 \cs_generate_variant:Nn \@@_run_checks:nnn { nnx }
@@ -1215,11 +1196,13 @@
 %   {
 %     \l_@@_passedcheck_bool ,
 %     \l_@@_onpage_bool ,
+%     \l_@@_empty_label_bool ,
 %     \c_@@_onpage_checks_seq
 %   }
 %    \begin{macrocode}
 \bool_new:N \l_@@_passedcheck_bool
 \bool_new:N \l_@@_onpage_bool
+\bool_new:N \l_@@_empty_label_bool
 \seq_const_from_clist:Nn \c_@@_onpage_checks_seq
   { above , below , before , after }
 %    \end{macrocode}
@@ -1239,119 +1222,127 @@
 \cs_new_protected:Npn \@@_do_check:nnn #1#2#3
   {
     \group_begin:
+    \bool_set_true:N \l_@@_passedcheck_bool
+    \bool_set_false:N \l_@@_onpage_bool
+    \bool_set_false:N \l_@@_empty_label_bool
+    \cs_if_exist:cTF { @@_check_ #1 :nnF }
+      {
 %    \end{macrocode}
 % \meta{label beg} may be defined or not, it is arbitrary user input.  Whether
 % this is the case is checked in \cs{@@_zcheck:nnnnn}, and due warning already
-% ensues.  And there is no point in checking ``relative position'' of an
-% undefined label.  Hence, in the absence of |#2|, we do nothing at all here.
-%    \begin{macrocode}
-      \zref@ifrefundefined {#2}
-        {}
-        {
-          \tl_if_empty:nF {#1}
-            {
-              \bool_set_true:N \l_@@_passedcheck_bool
-              \bool_set_false:N \l_@@_onpage_bool
-              \cs_if_exist:cTF { @@_check_ #1 :nnF }
-                {
-                  % ``label beg'' vs ``reference beg''.
-                  \use:c { @@_check_ #1 :nnF }
-                    {#2} {#3}
-                    { \bool_set_false:N \l_@@_passedcheck_bool }
-                  % ``reference end'' \emph{may} exist or not depending on the
-                  % checks.
-                  \zref@ifrefundefined { \@@_end_lblfmt:n {#3} }
-                    {
-                      % ``label end'' \emph{may} have been created by the
-                      % target commands.
-                      \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
-                        {}
-                        {
-                          % ``label end'' vs ``reference beg''.
-                          \exp_args:Nno \use:c { @@_check_ #1 :nnF }
-                            { \@@_end_lblfmt:n {#2} } {#3}
-                            { \bool_set_false:N \l_@@_passedcheck_bool }
-                        }
-                    }
-                    {
-                      % ``label beg'' vs ``reference end''.
-                      \exp_args:Nnno \use:c { @@_check_ #1 :nnF }
-                        {#2} { \@@_end_lblfmt:n {#3} }
-                        { \bool_set_false:N \l_@@_passedcheck_bool }
-                      % ``label end'' \emph{may} have been created by the
-                      % target commands.
-                      \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
-                        {}
-                        {
-                          % ``label end'' vs ``reference beg''.
-                          \exp_args:Nno \use:c { @@_check_ #1 :nnF }
-                            { \@@_end_lblfmt:n {#2} } {#3}
-                            { \bool_set_false:N \l_@@_passedcheck_bool }
-                          % ``label end'' vs ``reference end''.
-                          \exp_args:Nnoo \use:c { @@_check_ #1 :nnF }
-                            { \@@_end_lblfmt:n {#2} }
-                            { \@@_end_lblfmt:n {#3} }
-                            { \bool_set_false:N \l_@@_passedcheck_bool }
-                        }
-                    }
+% ensues.  So there's no need to do it again here.  The only exception is the
+% case of empty labels, for which we want to issue a failed check warning.
+%    \begin{macrocode}
+        \zref@ifrefundefined {#2}
+          {
+            \tl_if_empty:nT {#2}
+              {
+                \bool_set_false:N \l_@@_passedcheck_bool
+                \bool_set_true:N \l_@@_empty_label_bool
+              }
+          }
+          {
+            % ``label beg'' vs ``reference beg''.
+            \use:c { @@_check_ #1 :nnF }
+              {#2} {#3}
+              { \bool_set_false:N \l_@@_passedcheck_bool }
+            % ``reference end'' \emph{may} exist or not depending on the
+            % checks.
+            \zref@ifrefundefined { \@@_end_lblfmt:n {#3} }
+              {
+                % ``label end'' \emph{may} have been created by the
+                % target commands.
+                \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
+                  {}
+                  {
+                    % ``label end'' vs ``reference beg''.
+                    \exp_args:Nno \use:c { @@_check_ #1 :nnF }
+                      { \@@_end_lblfmt:n {#2} } {#3}
+                      { \bool_set_false:N \l_@@_passedcheck_bool }
+                  }
+              }
+              {
+                % ``label beg'' vs ``reference end''.
+                \exp_args:Nnno \use:c { @@_check_ #1 :nnF }
+                  {#2} { \@@_end_lblfmt:n {#3} }
+                  { \bool_set_false:N \l_@@_passedcheck_bool }
+                % ``label end'' \emph{may} have been created by the
+                % target commands.
+                \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
+                  {}
+                  {
+                    % ``label end'' vs ``reference beg''.
+                    \exp_args:Nno \use:c { @@_check_ #1 :nnF }
+                      { \@@_end_lblfmt:n {#2} } {#3}
+                      { \bool_set_false:N \l_@@_passedcheck_bool }
+                    % ``label end'' vs ``reference end''.
+                    \exp_args:Nnoo \use:c { @@_check_ #1 :nnF }
+                      { \@@_end_lblfmt:n {#2} }
+                      { \@@_end_lblfmt:n {#3} }
+                      { \bool_set_false:N \l_@@_passedcheck_bool }
+                  }
+              }
 %    \end{macrocode}
 % Handle option \opt{onpage=msg}.  This is only granted for tests which
 % perform ``within this page'' checks (\opt{above}, \opt{below}, \opt{before},
 % \opt{after}) \emph{and} if any of the two by two checks uses a ``within this
 % page'' comparison.  If both conditions are met, signal.
 %    \begin{macrocode}
-                  \seq_if_in:NnT \c_@@_onpage_checks_seq {#1}
-                    {
-                      \@@_check_thispage:nnT
-                        {#2} {#3}
-                        { \bool_set_true:N \l_@@_onpage_bool }
-                      \zref@ifrefundefined { \@@_end_lblfmt:n {#3} }
-                        {
-                          \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
-                            {}
-                            {
-                              \@@_check_thispage:nnT
-                                { \@@_end_lblfmt:n {#2} } {#3}
-                                { \bool_set_true:N \l_@@_onpage_bool }
-                            }
-                        }
-                        {
-                          \@@_check_thispage:nnT
-                            {#2} { \@@_end_lblfmt:n {#3} }
-                            { \bool_set_true:N \l_@@_onpage_bool }
-                          \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
-                            {}
-                            {
-                              \@@_check_thispage:nnT
-                                { \@@_end_lblfmt:n {#2} } {#3}
-                                { \bool_set_true:N \l_@@_onpage_bool }
-                              \@@_check_thispage:nnT
-                                { \@@_end_lblfmt:n {#2} }
-                                { \@@_end_lblfmt:n {#3} }
-                                { \bool_set_true:N \l_@@_onpage_bool }
-                            }
-                        }
-                    }
-                  \bool_if:NTF \l_@@_passedcheck_bool
-                    {
-                      \bool_if:nT
-                        {
-                          \l_@@_msgonpage_bool &&
-                          \l_@@_onpage_bool
-                        }
-                        {
-                          \@@_message:nnnx { double-check } {#1} {#2}
-                            { \zref@extractdefault {#3} {page} {'unknown'} }
-                        }
-                    }
-                    {
-                      \@@_message:nnnx { check-failed } {#1} {#2}
-                        { \zref@extractdefault {#3} {page} {'unknown'} }
-                    }
-                }
-                { \msg_warning:nnn { zref-check } { check-missing } {#1} }
-            }
-        }
+            \seq_if_in:NnT \c_@@_onpage_checks_seq {#1}
+              {
+                \@@_check_thispage:nnT
+                  {#2} {#3}
+                  { \bool_set_true:N \l_@@_onpage_bool }
+                \zref@ifrefundefined { \@@_end_lblfmt:n {#3} }
+                  {
+                    \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
+                      {}
+                      {
+                        \@@_check_thispage:nnT
+                          { \@@_end_lblfmt:n {#2} } {#3}
+                          { \bool_set_true:N \l_@@_onpage_bool }
+                      }
+                  }
+                  {
+                    \@@_check_thispage:nnT
+                      {#2} { \@@_end_lblfmt:n {#3} }
+                      { \bool_set_true:N \l_@@_onpage_bool }
+                    \zref@ifrefundefined { \@@_end_lblfmt:n {#2} }
+                      {}
+                      {
+                        \@@_check_thispage:nnT
+                          { \@@_end_lblfmt:n {#2} } {#3}
+                          { \bool_set_true:N \l_@@_onpage_bool }
+                        \@@_check_thispage:nnT
+                          { \@@_end_lblfmt:n {#2} }
+                          { \@@_end_lblfmt:n {#3} }
+                          { \bool_set_true:N \l_@@_onpage_bool }
+                      }
+                  }
+              }
+          }
+      }
+      { \msg_warning:nnn { zref-check } { check-missing } {#1} }
+    \bool_if:NTF \l_@@_passedcheck_bool
+      {
+        \bool_if:nT
+          {
+            \l_@@_msgonpage_bool &&
+            \l_@@_onpage_bool
+          }
+          {
+            \@@_message:nnnx { double-check } {#1} {#2}
+              { \zref@extractdefault {#3} {page} {'unknown'} }
+          }
+      }
+      {
+        \bool_if:NTF \l_@@_empty_label_bool
+          { \@@_message:nnnn { empty-label } {#1} { } { } }
+          {
+            \@@_message:nnnx { check-failed } {#1} {#2}
+              { \zref@extractdefault {#3} {page} {'unknown'} }
+          }
+      }
     \group_end:
   }
 \cs_generate_variant:Nn \@@_do_check:nnn { nnV }
@@ -1385,25 +1376,25 @@
 \prg_new_protected_conditional:Npnn \@@_check_thispage:nn #1#2 { T , F , TF }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } = { \l_@@_ref_int } &&
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \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{abspage}, but this value should not
 % happen normally for this property, since even the first page, after it gets
 % shipped out, will receive value `1'.  So, if we do find `0' here, better
 % signal something is wrong.  This comment extends to all page number checks.
 %    \begin{macrocode}
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_otherpage:nn #1#2 { T , F , TF }
@@ -1423,23 +1414,23 @@
 \prg_new_protected_conditional:Npnn \@@_check_above:nn #1#2 { F , TF }
   {
     \group_begin:
-      \@@_check_thispage:nnTF {#1} {#2}
-        {
-          \bool_set_true:N \l_@@_integer_bool
-          \zrefcheck_get_asint:nnn {#1} { lblseq } { \l_@@_lbl_int }
-          \zrefcheck_get_asint:nnn {#2} { lblseq } { \l_@@_ref_int }
-          \bool_lazy_and:nnTF
-            { \l_@@_integer_bool }
-            {
-              \int_compare_p:nNn
-                { \l_@@_lbl_int } < { \l_@@_ref_int } &&
-              ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-              ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-            }
-            { \group_insert_after:N \prg_return_true:  }
-            { \group_insert_after:N \prg_return_false: }
-        }
-        { \group_insert_after:N \prg_return_false: }
+    \@@_check_thispage:nnTF {#1} {#2}
+      {
+        \bool_set_true:N \l_@@_integer_bool
+        \zrefcheck_get_asint:nnn {#1} { lblseq } { \l_@@_lbl_int }
+        \zrefcheck_get_asint:nnn {#2} { lblseq } { \l_@@_ref_int }
+        \bool_lazy_and:nnTF
+          { \l_@@_integer_bool }
+          {
+            \int_compare_p:nNn
+              { \l_@@_lbl_int } < { \l_@@_ref_int } &&
+            ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+            ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+          }
+          { \group_insert_after:N \prg_return_true:  }
+          { \group_insert_after:N \prg_return_false: }
+      }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_below:nn #1#2 { F , TF }
@@ -1501,128 +1492,128 @@
 \prg_new_protected_conditional:Npnn \@@_check_nextpage:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } = { \l_@@_ref_int + 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } = { \l_@@_ref_int + 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_prevpage:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } = { \l_@@_ref_int - 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } = { \l_@@_ref_int - 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_pagesbefore:nn #1#2 { F , TF }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } < { \l_@@_ref_int } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } < { \l_@@_ref_int } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \cs_new_eq:NN \@@_check_ppbefore:nnF \@@_check_pagesbefore:nnF
 \prg_new_protected_conditional:Npnn \@@_check_pagesafter:nn #1#2 { F , TF }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } > { \l_@@_ref_int } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } > { \l_@@_ref_int } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \cs_new_eq:NN \@@_check_ppafter:nnF \@@_check_pagesafter:nnF
 \prg_new_protected_conditional:Npnn \@@_check_pagegap:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \int_abs:n { \l_@@_lbl_int - \l_@@_ref_int } } > { 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
+        \int_compare_p:nNn
+          { \int_abs:n { \l_@@_lbl_int - \l_@@_ref_int } } > { 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_facing:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
 %    \end{macrocode}
 % There exists no ``facing'' page if the document is not twoside.
 %    \begin{macrocode}
-          \legacy_if_p:n { @twoside } &&
+        \legacy_if_p:n { @twoside } &&
 %    \end{macrocode}
 % Now we test ``facing''.
 %    \begin{macrocode}
+        (
           (
-            (
-              \int_if_odd_p:n { \l_@@_ref_int } &&
-              \int_compare_p:nNn
-                { \l_@@_lbl_int } = { \l_@@_ref_int - 1 }
-            ) ||
-            (
-              \int_if_even_p:n { \l_@@_ref_int } &&
-              \int_compare_p:nNn
-                { \l_@@_lbl_int } = { \l_@@_ref_int + 1 }
-            )
-          ) &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+            \int_if_odd_p:n { \l_@@_ref_int } &&
+            \int_compare_p:nNn
+              { \l_@@_lbl_int } = { \l_@@_ref_int - 1 }
+          ) ||
+          (
+            \int_if_even_p:n { \l_@@_ref_int } &&
+            \int_compare_p:nNn
+              { \l_@@_lbl_int } = { \l_@@_ref_int + 1 }
+          )
+        ) &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 %    \end{macrocode}
@@ -1636,21 +1627,21 @@
 \prg_new_protected_conditional:Npnn \@@_check_close:nn #1#2 { F , TF }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
-      \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
-      \bool_lazy_and:nnTF
-        { \l_@@_integer_bool }
-        {
-          \int_compare_p:nNn
-            { \int_abs:n { \l_@@_lbl_int - \l_@@_ref_int } }
-            <
-            { \l_@@_close_range_int + 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \zrefcheck_get_asint:nnn {#1} { abspage } { \l_@@_lbl_int }
+    \zrefcheck_get_asint:nnn {#2} { abspage } { \l_@@_ref_int }
+    \bool_lazy_and:nnTF
+      { \l_@@_integer_bool }
+      {
+        \int_compare_p:nNn
+          { \int_abs:n { \l_@@_lbl_int - \l_@@_ref_int } }
+          <
+          { \l_@@_close_range_int + 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_far:nn #1#2 { F }
@@ -1677,14 +1668,14 @@
 \prg_new_protected_conditional:Npnn \@@_check_thischap:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 } &&
+    \bool_set_true:N \l_@@_integer_bool
+    \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{zc@abschap} property, and means here no
 % \cs{chapter} has yet been issued, therefore it cannot be ``this chapter'',
@@ -1693,81 +1684,81 @@
 % not require the ``current'' one to exist.  This comment extends to all
 % chapter checks.
 %    \begin{macrocode}
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_nextchap:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 + 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 + 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_prevchap:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 - 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 - 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_chapsafter:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_chapsbefore:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 %    \end{macrocode}
@@ -1788,18 +1779,18 @@
 \prg_new_protected_conditional:Npnn \@@_check_thissec:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } = { \l_@@_ref_int } &&
+    \bool_set_true:N \l_@@_integer_bool
+    \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 }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } = { \l_@@_ref_int } &&
 %    \end{macrocode}
 % `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
@@ -1808,97 +1799,97 @@
 % about the need of the ``current'' section to exist to be able to refer to a
 % ``future'' one also holds.  This comment extends to all section checks.
 %    \begin{macrocode}
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_nextsec:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } = { \l_@@_ref_int + 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } = { \l_@@_ref_int + 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_prevsec:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } = { \l_@@_ref_int - 1 } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } = { \l_@@_ref_int - 1 } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_secsafter:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } > { \l_@@_ref_int } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } > { \l_@@_ref_int } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 \prg_new_protected_conditional:Npnn \@@_check_secsbefore:nn #1#2 { F }
   {
     \group_begin:
-      \bool_set_true:N \l_@@_integer_bool
-      \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 }
-        {
-          \int_compare_p:nNn
-            { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
-          \int_compare_p:nNn
-            { \l_@@_lbl_int } < { \l_@@_ref_int } &&
-          ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
-          ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
-        }
-        { \group_insert_after:N \prg_return_true:  }
-        { \group_insert_after:N \prg_return_false: }
+    \bool_set_true:N \l_@@_integer_bool
+    \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 }
+      {
+        \int_compare_p:nNn
+          { \l_@@_lbl_b_int } = { \l_@@_ref_b_int } &&
+        \int_compare_p:nNn
+          { \l_@@_lbl_int } < { \l_@@_ref_int } &&
+        ! \int_compare_p:nNn { \l_@@_lbl_int } = { 0 } &&
+        ! \int_compare_p:nNn { \l_@@_ref_int } = { 0 }
+      }
+      { \group_insert_after:N \prg_return_true:  }
+      { \group_insert_after:N \prg_return_false: }
     \group_end:
   }
 %    \end{macrocode}
@@ -1906,6 +1897,17 @@
 %
 %
 %
+% \subsubsection{Manual}
+%
+% \begin{macro}{ \@@_check_manual:nn }
+%    \begin{macrocode}
+\prg_new_protected_conditional:Npnn \@@_check_manual:nn #1#2 { F }
+  { \prg_return_false: }
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
 % \section{\pkg{zref-clever} integration}
 %
 %
-- 
cgit v1.2.3

