texlive[72424] Master/texmf-dist: zref-clever (30sep24)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 30 22:11:13 CEST 2024


Revision: 72424
          https://tug.org/svn/texlive?view=revision&revision=72424
Author:   karl
Date:     2024-09-30 22:11:13 +0200 (Mon, 30 Sep 2024)
Log Message:
-----------
zref-clever (30sep24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-code.pdf
    trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-doc.pdf
    trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-doc.tex
    trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx
    trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md	2024-09-30 20:11:01 UTC (rev 72423)
+++ trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md	2024-09-30 20:11:13 UTC (rev 72424)
@@ -1,7 +1,12 @@
 # Changelog
 
-## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.6...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.7...HEAD)
 
+## [v0.4.7](https://github.com/gusbrs/zref-clever/compare/v0.4.6...v0.4.7) (2024-09-30)
+
+### Changed
+- Inhibit missing name warning if `noname` option is in use.
+
 ## [v0.4.6](https://github.com/gusbrs/zref-clever/compare/v0.4.5...v0.4.6) (2024-08-23)
 
 ### Fixed

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-doc.tex	2024-09-30 20:11:01 UTC (rev 72423)
+++ trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-doc.tex	2024-09-30 20:11:13 UTC (rev 72424)
@@ -2332,6 +2332,13 @@
 required.  Of course, this effort is bound to be incomplete (see
 \zcref{sec:limitations}).
 
+Note that settings performed by the compatibility modules require special care
+if they are to be changed by users.  Since the modules depend on what has been
+loaded or not in the document, the settings are done at
+\texttt{begindocument}.  Hence, to override a setting performed by a
+compatibility module, the user must ensure their change comes after that,
+e.g.\ by adding their setting to the \texttt{begindocument} hook.
+
 The purpose of outlining to some extend what the compatibility modules do is
 twofold.  First, some of them require usage adjustments for label setting,
 which must be somehow conveyed in this documentation.  Second, the kind and

Modified: trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx	2024-09-30 20:11:01 UTC (rev 72423)
+++ trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx	2024-09-30 20:11:13 UTC (rev 72424)
@@ -171,7 +171,7 @@
 %
 % Identify the package.
 %    \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2024-08-23} {0.4.6}
+\ProvidesExplPackage {zref-clever} {2024-09-30} {0.4.7}
   {Clever LaTeX cross-references based on zref}
 %    \end{macrocode}
 %
@@ -7253,145 +7253,145 @@
 %
 % \begin{macro}{\@@_type_name_setup:}
 %   Auxiliary function to \cs{@@_typeset_refs_last_of_type:}.  It is
-%   responsible for setting the type name variable \cs{l_@@_type_name_tl} and
-%   \cs{l_@@_name_in_link_bool}.  If a type name can't be found,
-%   \cs{l_@@_type_name_tl} is cleared.  The function takes no arguments, but
-%   is expected to be called in \cs{@@_typeset_refs_last_of_type:} right
-%   before \cs{@@_get_ref_first:}, which is the main consumer of the variables
-%   it sets, though not the only one (and hence this cannot be moved into
-%   \cs{@@_get_ref_first:} itself).  It also expects a number of relevant
-%   variables to have been appropriately set, and which it uses, prominently
-%   \cs{l_@@_type_first_label_type_tl}, but also the queue itself in
-%   \cs{l_@@_typeset_queue_curr_tl}, which should be ``ready except for the
-%   first label'', and the type counter \cs{l_@@_type_count_int}.
+%   responsible for setting the type name variable \cs{l_@@_type_name_tl},
+%   \cs{l_@@_name_in_link_bool}, and \cs{l_@@_type_name_missing_bool}.  If a
+%   type name can't be found, \cs{l_@@_type_name_tl} is cleared.  The function
+%   takes no arguments, but is expected to be called in
+%   \cs{@@_typeset_refs_last_of_type:} right before \cs{@@_get_ref_first:},
+%   which is the main consumer of the variables it sets, though not the only
+%   one (and hence this cannot be moved into \cs{@@_get_ref_first:} itself).
+%   It also expects a number of relevant variables to have been appropriately
+%   set, and which it uses, prominently \cs{l_@@_type_first_label_type_tl},
+%   but also the queue itself in \cs{l_@@_typeset_queue_curr_tl}, which should
+%   be ``ready except for the first label'', and the type counter
+%   \cs{l_@@_type_count_int}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_type_name_setup:
   {
-    \zref at ifrefundefined { \l_@@_type_first_label_tl }
+    \bool_if:nTF
+      { \l_@@_typeset_ref_bool && ! \l_@@_typeset_name_bool }
       {
+        % `typeset=ref' / `noname' option
+        % Probably redundant, since in this case the type name is not being
+        % typeset.  But, for completeness sake:
         \tl_clear:N \l_@@_type_name_tl
+        \bool_set_false:N \l_@@_name_in_link_bool
         \bool_set_true:N \l_@@_type_name_missing_bool
       }
       {
-        \tl_if_eq:NnTF
-          \l_@@_type_first_label_type_tl { zc at missingtype }
+        \zref at ifrefundefined { \l_@@_type_first_label_tl }
           {
             \tl_clear:N \l_@@_type_name_tl
             \bool_set_true:N \l_@@_type_name_missing_bool
           }
           {
-            % Determine whether we should use capitalization, abbreviation,
-            % and plural.
-            \bool_lazy_or:nnTF
-              { \l_@@_cap_bool }
+            \tl_if_eq:NnTF
+              \l_@@_type_first_label_type_tl { zc at missingtype }
               {
-                \l_@@_capfirst_bool &&
-                \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
+                \tl_clear:N \l_@@_type_name_tl
+                \bool_set_true:N \l_@@_type_name_missing_bool
               }
-              { \tl_set:Nn \l_@@_name_format_tl {Name} }
-              { \tl_set:Nn \l_@@_name_format_tl {name} }
-            % If the queue is empty, we have a singular, otherwise, plural.
-            \tl_if_empty:NTF \l_@@_typeset_queue_curr_tl
-              { \tl_put_right:Nn \l_@@_name_format_tl { -sg } }
-              { \tl_put_right:Nn \l_@@_name_format_tl { -pl } }
-            \bool_lazy_and:nnTF
-              { \l_@@_abbrev_bool }
               {
-                ! \int_compare_p:nNn
-                    { \l_@@_type_count_int } = { 0 } ||
-                ! \l_@@_noabbrev_first_bool
-              }
-              {
-                \tl_set:NV \l_@@_name_format_fallback_tl
-                  \l_@@_name_format_tl
-                \tl_put_right:Nn \l_@@_name_format_tl { -ab }
-              }
-              { \tl_clear:N \l_@@_name_format_fallback_tl }
-
-            % Handle number and gender nudges.
-            \bool_if:NT \l_@@_nudge_enabled_bool
-              {
-                \bool_if:NTF \l_@@_nudge_singular_bool
+                % Determine whether we should use capitalization,
+                % abbreviation, and plural.
+                \bool_lazy_or:nnTF
+                  { \l_@@_cap_bool }
                   {
-                    \tl_if_empty:NF \l_@@_typeset_queue_curr_tl
-                      {
-                        \msg_warning:nne { zref-clever }
-                          { nudge-plural-when-sg }
-                          { \l_@@_type_first_label_type_tl }
-                      }
+                    \l_@@_capfirst_bool &&
+                    \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
                   }
+                  { \tl_set:Nn \l_@@_name_format_tl {Name} }
+                  { \tl_set:Nn \l_@@_name_format_tl {name} }
+                % If the queue is empty, we have a singular, otherwise,
+                % plural.
+                \tl_if_empty:NTF \l_@@_typeset_queue_curr_tl
+                  { \tl_put_right:Nn \l_@@_name_format_tl { -sg } }
+                  { \tl_put_right:Nn \l_@@_name_format_tl { -pl } }
+                \bool_lazy_and:nnTF
+                  { \l_@@_abbrev_bool }
                   {
-                    \bool_lazy_all:nT
-                      {
-                        { \l_@@_nudge_comptosing_bool }
-                        { \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl }
-                        {
-                          \int_compare_p:nNn
-                            { \l_@@_label_count_int } > { 0 }
-                        }
-                      }
-                      {
-                        \msg_warning:nne { zref-clever }
-                          { nudge-comptosing }
-                          { \l_@@_type_first_label_type_tl }
-                      }
+                    ! \int_compare_p:nNn
+                        { \l_@@_type_count_int } = { 0 } ||
+                    ! \l_@@_noabbrev_first_bool
                   }
-                \bool_lazy_and:nnT
-                  { \l_@@_nudge_gender_bool }
-                  { ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
                   {
-                    \@@_get_rf_opt_seq:neeN { gender }
-                      { \l_@@_type_first_label_type_tl }
-                      { \l_@@_ref_language_tl }
-                      \l_@@_type_name_gender_seq
-                    \seq_if_in:NVF
-                      \l_@@_type_name_gender_seq
-                      \l_@@_ref_gender_tl
+                    \tl_set:NV \l_@@_name_format_fallback_tl
+                      \l_@@_name_format_tl
+                    \tl_put_right:Nn \l_@@_name_format_tl { -ab }
+                  }
+                  { \tl_clear:N \l_@@_name_format_fallback_tl }
+
+                % Handle number and gender nudges.
+                % Note that these nudges get disabled for `typeset=ref' /
+                % `noname' option, but in this case they are not really
+                % meaningful anyway.
+                \bool_if:NT \l_@@_nudge_enabled_bool
+                  {
+                    \bool_if:NTF \l_@@_nudge_singular_bool
                       {
-                        \seq_if_empty:NTF \l_@@_type_name_gender_seq
+                        \tl_if_empty:NF \l_@@_typeset_queue_curr_tl
                           {
-                            \msg_warning:nneee { zref-clever }
-                              { nudge-gender-not-declared-for-type }
-                              { \l_@@_ref_gender_tl }
+                            \msg_warning:nne { zref-clever }
+                              { nudge-plural-when-sg }
                               { \l_@@_type_first_label_type_tl }
-                              { \l_@@_ref_language_tl }
                           }
+                      }
+                      {
+                        \bool_lazy_all:nT
                           {
-                            \msg_warning:nneeee { zref-clever }
-                              { nudge-gender-mismatch }
+                            { \l_@@_nudge_comptosing_bool }
+                            { \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl }
+                            {
+                              \int_compare_p:nNn
+                                { \l_@@_label_count_int } > { 0 }
+                            }
+                          }
+                          {
+                            \msg_warning:nne { zref-clever }
+                              { nudge-comptosing }
                               { \l_@@_type_first_label_type_tl }
-                              { \l_@@_ref_gender_tl }
+                          }
+                      }
+                    \bool_lazy_and:nnT
+                      { \l_@@_nudge_gender_bool }
+                      { ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
+                      {
+                        \@@_get_rf_opt_seq:neeN { gender }
+                          { \l_@@_type_first_label_type_tl }
+                          { \l_@@_ref_language_tl }
+                          \l_@@_type_name_gender_seq
+                        \seq_if_in:NVF
+                          \l_@@_type_name_gender_seq
+                          \l_@@_ref_gender_tl
+                          {
+                            \seq_if_empty:NTF \l_@@_type_name_gender_seq
                               {
-                                \seq_use:Nn
-                                  \l_@@_type_name_gender_seq { ,~ }
+                                \msg_warning:nneee { zref-clever }
+                                  { nudge-gender-not-declared-for-type }
+                                  { \l_@@_ref_gender_tl }
+                                  { \l_@@_type_first_label_type_tl }
+                                  { \l_@@_ref_language_tl }
                               }
-                              { \l_@@_ref_language_tl }
+                              {
+                                \msg_warning:nneeee { zref-clever }
+                                  { nudge-gender-mismatch }
+                                  { \l_@@_type_first_label_type_tl }
+                                  { \l_@@_ref_gender_tl }
+                                  {
+                                    \seq_use:Nn
+                                      \l_@@_type_name_gender_seq { ,~ }
+                                  }
+                                  { \l_@@_ref_language_tl }
+                              }
                           }
                       }
                   }
-              }
 
-            \tl_if_empty:NTF \l_@@_name_format_fallback_tl
-              {
-                \@@_opt_tl_get:cNF
+                \tl_if_empty:NTF \l_@@_name_format_fallback_tl
                   {
-                    \@@_opt_varname_type:een
-                      { \l_@@_type_first_label_type_tl }
-                      { \l_@@_name_format_tl }
-                      { tl }
-                  }
-                  \l_@@_type_name_tl
-                  {
-                    \tl_if_empty:NF \l_@@_ref_decl_case_tl
-                      {
-                        \tl_put_left:Nn \l_@@_name_format_tl { - }
-                        \tl_put_left:NV \l_@@_name_format_tl
-                          \l_@@_ref_decl_case_tl
-                      }
                     \@@_opt_tl_get:cNF
                       {
-                        \@@_opt_varname_lang_type:eeen
-                          { \l_@@_ref_language_tl }
+                        \@@_opt_varname_type:een
                           { \l_@@_type_first_label_type_tl }
                           { \l_@@_name_format_tl }
                           { tl }
@@ -7398,72 +7398,89 @@
                       }
                       \l_@@_type_name_tl
                       {
-                        \tl_clear:N \l_@@_type_name_tl
-                        \bool_set_true:N \l_@@_type_name_missing_bool
-                        \msg_warning:nnee { zref-clever } { missing-name }
-                          { \l_@@_name_format_tl }
-                          { \l_@@_type_first_label_type_tl }
+                        \tl_if_empty:NF \l_@@_ref_decl_case_tl
+                          {
+                            \tl_put_left:Nn \l_@@_name_format_tl { - }
+                            \tl_put_left:NV \l_@@_name_format_tl
+                              \l_@@_ref_decl_case_tl
+                          }
+                        \@@_opt_tl_get:cNF
+                          {
+                            \@@_opt_varname_lang_type:eeen
+                              { \l_@@_ref_language_tl }
+                              { \l_@@_type_first_label_type_tl }
+                              { \l_@@_name_format_tl }
+                              { tl }
+                          }
+                          \l_@@_type_name_tl
+                          {
+                            \tl_clear:N \l_@@_type_name_tl
+                            \bool_set_true:N \l_@@_type_name_missing_bool
+                            \msg_warning:nnee { zref-clever } { missing-name }
+                              { \l_@@_name_format_tl }
+                              { \l_@@_type_first_label_type_tl }
+                          }
                       }
                   }
-              }
-              {
-                \@@_opt_tl_get:cNF
                   {
-                    \@@_opt_varname_type:een
-                      { \l_@@_type_first_label_type_tl }
-                      { \l_@@_name_format_tl }
-                      { tl }
-                  }
-                  \l_@@_type_name_tl
-                  {
                     \@@_opt_tl_get:cNF
                       {
                         \@@_opt_varname_type:een
                           { \l_@@_type_first_label_type_tl }
-                          { \l_@@_name_format_fallback_tl }
+                          { \l_@@_name_format_tl }
                           { tl }
                       }
                       \l_@@_type_name_tl
                       {
-                        \tl_if_empty:NF \l_@@_ref_decl_case_tl
-                          {
-                            \tl_put_left:Nn
-                              \l_@@_name_format_tl { - }
-                            \tl_put_left:NV \l_@@_name_format_tl
-                              \l_@@_ref_decl_case_tl
-                            \tl_put_left:Nn
-                              \l_@@_name_format_fallback_tl { - }
-                            \tl_put_left:NV
-                              \l_@@_name_format_fallback_tl
-                              \l_@@_ref_decl_case_tl
-                          }
                         \@@_opt_tl_get:cNF
                           {
-                            \@@_opt_varname_lang_type:eeen
-                              { \l_@@_ref_language_tl }
+                            \@@_opt_varname_type:een
                               { \l_@@_type_first_label_type_tl }
-                              { \l_@@_name_format_tl }
+                              { \l_@@_name_format_fallback_tl }
                               { tl }
                           }
                           \l_@@_type_name_tl
                           {
+                            \tl_if_empty:NF \l_@@_ref_decl_case_tl
+                              {
+                                \tl_put_left:Nn
+                                  \l_@@_name_format_tl { - }
+                                \tl_put_left:NV \l_@@_name_format_tl
+                                  \l_@@_ref_decl_case_tl
+                                \tl_put_left:Nn
+                                  \l_@@_name_format_fallback_tl { - }
+                                \tl_put_left:NV
+                                  \l_@@_name_format_fallback_tl
+                                  \l_@@_ref_decl_case_tl
+                              }
                             \@@_opt_tl_get:cNF
                               {
                                 \@@_opt_varname_lang_type:eeen
                                   { \l_@@_ref_language_tl }
                                   { \l_@@_type_first_label_type_tl }
-                                  { \l_@@_name_format_fallback_tl }
+                                  { \l_@@_name_format_tl }
                                   { tl }
                               }
                               \l_@@_type_name_tl
                               {
-                                \tl_clear:N \l_@@_type_name_tl
-                                \bool_set_true:N
-                                  \l_@@_type_name_missing_bool
-                                \msg_warning:nnee { zref-clever }
-                                  { missing-name }
-                                  { \l_@@_name_format_tl }
-                                  { \l_@@_type_first_label_type_tl }
+                                \@@_opt_tl_get:cNF
+                                  {
+                                    \@@_opt_varname_lang_type:eeen
+                                      { \l_@@_ref_language_tl }
+                                      { \l_@@_type_first_label_type_tl }
+                                      { \l_@@_name_format_fallback_tl }
+                                      { tl }
+                                  }
+                                  \l_@@_type_name_tl
+                                  {
+                                    \tl_clear:N \l_@@_type_name_tl
+                                    \bool_set_true:N
+                                      \l_@@_type_name_missing_bool
+                                    \msg_warning:nnee { zref-clever }
+                                      { missing-name }
+                                      { \l_@@_name_format_tl }
+                                      { \l_@@_type_first_label_type_tl }
+                                  }
                               }
                           }
                       }
@@ -7470,34 +7487,35 @@
                   }
               }
           }
-      }
 
-    % Signal whether the type name is to be included in the hyperlink or not.
-    \bool_lazy_any:nTF
-      {
-        { ! \l_@@_hyperlink_bool }
-        { \l_@@_link_star_bool }
-        { \tl_if_empty_p:N \l_@@_type_name_tl }
-        { \str_if_eq_p:Vn \l_@@_nameinlink_str { false } }
-      }
-      { \bool_set_false:N \l_@@_name_in_link_bool }
-      {
+        % Signal whether the type name is to be included in the hyperlink or
+        % not.
         \bool_lazy_any:nTF
           {
-            { \str_if_eq_p:Vn \l_@@_nameinlink_str { true } }
-            {
-              \str_if_eq_p:Vn \l_@@_nameinlink_str { tsingle } &&
-              \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl
-            }
-            {
-              \str_if_eq_p:Vn \l_@@_nameinlink_str { single } &&
-              \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl &&
-              \l_@@_typeset_last_bool &&
-              \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
-            }
+            { ! \l_@@_hyperlink_bool }
+            { \l_@@_link_star_bool }
+            { \tl_if_empty_p:N \l_@@_type_name_tl }
+            { \str_if_eq_p:Vn \l_@@_nameinlink_str { false } }
           }
-          { \bool_set_true:N \l_@@_name_in_link_bool }
           { \bool_set_false:N \l_@@_name_in_link_bool }
+          {
+            \bool_lazy_any:nTF
+              {
+                { \str_if_eq_p:Vn \l_@@_nameinlink_str { true } }
+                {
+                  \str_if_eq_p:Vn \l_@@_nameinlink_str { tsingle } &&
+                  \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl
+                }
+                {
+                  \str_if_eq_p:Vn \l_@@_nameinlink_str { single } &&
+                  \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl &&
+                  \l_@@_typeset_last_bool &&
+                  \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
+                }
+              }
+              { \bool_set_true:N \l_@@_name_in_link_bool }
+              { \bool_set_false:N \l_@@_name_in_link_bool }
+          }
       }
   }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty	2024-09-30 20:11:01 UTC (rev 72423)
+++ trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty	2024-09-30 20:11:13 UTC (rev 72424)
@@ -52,7 +52,7 @@
         'zref-clever' requires a LaTeX kernel \zrefclever at required@kernel\space or newer.%
       }%
   }%
-\ProvidesExplPackage {zref-clever} {2024-08-23} {0.4.6}
+\ProvidesExplPackage {zref-clever} {2024-09-30} {0.4.7}
   {Clever LaTeX cross-references based on zref}
 \RequirePackage { zref-base }
 \RequirePackage { zref-user }
@@ -4970,131 +4970,130 @@
   }
 \cs_new_protected:Npn \__zrefclever_type_name_setup:
   {
-    \zref at ifrefundefined { \l__zrefclever_type_first_label_tl }
+    \bool_if:nTF
+      { \l__zrefclever_typeset_ref_bool && ! \l__zrefclever_typeset_name_bool }
       {
+        % `typeset=ref' / `noname' option
+        % Probably redundant, since in this case the type name is not being
+        % typeset.  But, for completeness sake:
         \tl_clear:N \l__zrefclever_type_name_tl
+        \bool_set_false:N \l__zrefclever_name_in_link_bool
         \bool_set_true:N \l__zrefclever_type_name_missing_bool
       }
       {
-        \tl_if_eq:NnTF
-          \l__zrefclever_type_first_label_type_tl { zc at missingtype }
+        \zref at ifrefundefined { \l__zrefclever_type_first_label_tl }
           {
             \tl_clear:N \l__zrefclever_type_name_tl
             \bool_set_true:N \l__zrefclever_type_name_missing_bool
           }
           {
-            % Determine whether we should use capitalization, abbreviation,
-            % and plural.
-            \bool_lazy_or:nnTF
-              { \l__zrefclever_cap_bool }
+            \tl_if_eq:NnTF
+              \l__zrefclever_type_first_label_type_tl { zc at missingtype }
               {
-                \l__zrefclever_capfirst_bool &&
-                \int_compare_p:nNn { \l__zrefclever_type_count_int } = { 0 }
+                \tl_clear:N \l__zrefclever_type_name_tl
+                \bool_set_true:N \l__zrefclever_type_name_missing_bool
               }
-              { \tl_set:Nn \l__zrefclever_name_format_tl {Name} }
-              { \tl_set:Nn \l__zrefclever_name_format_tl {name} }
-            % If the queue is empty, we have a singular, otherwise, plural.
-            \tl_if_empty:NTF \l__zrefclever_typeset_queue_curr_tl
-              { \tl_put_right:Nn \l__zrefclever_name_format_tl { -sg } }
-              { \tl_put_right:Nn \l__zrefclever_name_format_tl { -pl } }
-            \bool_lazy_and:nnTF
-              { \l__zrefclever_abbrev_bool }
               {
-                ! \int_compare_p:nNn
-                    { \l__zrefclever_type_count_int } = { 0 } ||
-                ! \l__zrefclever_noabbrev_first_bool
-              }
-              {
-                \tl_set:NV \l__zrefclever_name_format_fallback_tl
-                  \l__zrefclever_name_format_tl
-                \tl_put_right:Nn \l__zrefclever_name_format_tl { -ab }
-              }
-              { \tl_clear:N \l__zrefclever_name_format_fallback_tl }
-
-            % Handle number and gender nudges.
-            \bool_if:NT \l__zrefclever_nudge_enabled_bool
-              {
-                \bool_if:NTF \l__zrefclever_nudge_singular_bool
+                % Determine whether we should use capitalization,
+                % abbreviation, and plural.
+                \bool_lazy_or:nnTF
+                  { \l__zrefclever_cap_bool }
                   {
-                    \tl_if_empty:NF \l__zrefclever_typeset_queue_curr_tl
-                      {
-                        \msg_warning:nne { zref-clever }
-                          { nudge-plural-when-sg }
-                          { \l__zrefclever_type_first_label_type_tl }
-                      }
+                    \l__zrefclever_capfirst_bool &&
+                    \int_compare_p:nNn { \l__zrefclever_type_count_int } = { 0 }
                   }
+                  { \tl_set:Nn \l__zrefclever_name_format_tl {Name} }
+                  { \tl_set:Nn \l__zrefclever_name_format_tl {name} }
+                % If the queue is empty, we have a singular, otherwise,
+                % plural.
+                \tl_if_empty:NTF \l__zrefclever_typeset_queue_curr_tl
+                  { \tl_put_right:Nn \l__zrefclever_name_format_tl { -sg } }
+                  { \tl_put_right:Nn \l__zrefclever_name_format_tl { -pl } }
+                \bool_lazy_and:nnTF
+                  { \l__zrefclever_abbrev_bool }
                   {
-                    \bool_lazy_all:nT
-                      {
-                        { \l__zrefclever_nudge_comptosing_bool }
-                        { \tl_if_empty_p:N \l__zrefclever_typeset_queue_curr_tl }
-                        {
-                          \int_compare_p:nNn
-                            { \l__zrefclever_label_count_int } > { 0 }
-                        }
-                      }
-                      {
-                        \msg_warning:nne { zref-clever }
-                          { nudge-comptosing }
-                          { \l__zrefclever_type_first_label_type_tl }
-                      }
+                    ! \int_compare_p:nNn
+                        { \l__zrefclever_type_count_int } = { 0 } ||
+                    ! \l__zrefclever_noabbrev_first_bool
                   }
-                \bool_lazy_and:nnT
-                  { \l__zrefclever_nudge_gender_bool }
-                  { ! \tl_if_empty_p:N \l__zrefclever_ref_gender_tl }
                   {
-                    \__zrefclever_get_rf_opt_seq:neeN { gender }
-                      { \l__zrefclever_type_first_label_type_tl }
-                      { \l__zrefclever_ref_language_tl }
-                      \l__zrefclever_type_name_gender_seq
-                    \seq_if_in:NVF
-                      \l__zrefclever_type_name_gender_seq
-                      \l__zrefclever_ref_gender_tl
+                    \tl_set:NV \l__zrefclever_name_format_fallback_tl
+                      \l__zrefclever_name_format_tl
+                    \tl_put_right:Nn \l__zrefclever_name_format_tl { -ab }
+                  }
+                  { \tl_clear:N \l__zrefclever_name_format_fallback_tl }
+
+                % Handle number and gender nudges.
+                % Note that these nudges get disabled for `typeset=ref' /
+                % `noname' option, but in this case they are not really
+                % meaningful anyway.
+                \bool_if:NT \l__zrefclever_nudge_enabled_bool
+                  {
+                    \bool_if:NTF \l__zrefclever_nudge_singular_bool
                       {
-                        \seq_if_empty:NTF \l__zrefclever_type_name_gender_seq
+                        \tl_if_empty:NF \l__zrefclever_typeset_queue_curr_tl
                           {
-                            \msg_warning:nneee { zref-clever }
-                              { nudge-gender-not-declared-for-type }
-                              { \l__zrefclever_ref_gender_tl }
+                            \msg_warning:nne { zref-clever }
+                              { nudge-plural-when-sg }
                               { \l__zrefclever_type_first_label_type_tl }
-                              { \l__zrefclever_ref_language_tl }
                           }
+                      }
+                      {
+                        \bool_lazy_all:nT
                           {
-                            \msg_warning:nneeee { zref-clever }
-                              { nudge-gender-mismatch }
+                            { \l__zrefclever_nudge_comptosing_bool }
+                            { \tl_if_empty_p:N \l__zrefclever_typeset_queue_curr_tl }
+                            {
+                              \int_compare_p:nNn
+                                { \l__zrefclever_label_count_int } > { 0 }
+                            }
+                          }
+                          {
+                            \msg_warning:nne { zref-clever }
+                              { nudge-comptosing }
                               { \l__zrefclever_type_first_label_type_tl }
-                              { \l__zrefclever_ref_gender_tl }
+                          }
+                      }
+                    \bool_lazy_and:nnT
+                      { \l__zrefclever_nudge_gender_bool }
+                      { ! \tl_if_empty_p:N \l__zrefclever_ref_gender_tl }
+                      {
+                        \__zrefclever_get_rf_opt_seq:neeN { gender }
+                          { \l__zrefclever_type_first_label_type_tl }
+                          { \l__zrefclever_ref_language_tl }
+                          \l__zrefclever_type_name_gender_seq
+                        \seq_if_in:NVF
+                          \l__zrefclever_type_name_gender_seq
+                          \l__zrefclever_ref_gender_tl
+                          {
+                            \seq_if_empty:NTF \l__zrefclever_type_name_gender_seq
                               {
-                                \seq_use:Nn
-                                  \l__zrefclever_type_name_gender_seq { ,~ }
+                                \msg_warning:nneee { zref-clever }
+                                  { nudge-gender-not-declared-for-type }
+                                  { \l__zrefclever_ref_gender_tl }
+                                  { \l__zrefclever_type_first_label_type_tl }
+                                  { \l__zrefclever_ref_language_tl }
                               }
-                              { \l__zrefclever_ref_language_tl }
+                              {
+                                \msg_warning:nneeee { zref-clever }
+                                  { nudge-gender-mismatch }
+                                  { \l__zrefclever_type_first_label_type_tl }
+                                  { \l__zrefclever_ref_gender_tl }
+                                  {
+                                    \seq_use:Nn
+                                      \l__zrefclever_type_name_gender_seq { ,~ }
+                                  }
+                                  { \l__zrefclever_ref_language_tl }
+                              }
                           }
                       }
                   }
-              }
 
-            \tl_if_empty:NTF \l__zrefclever_name_format_fallback_tl
-              {
-                \__zrefclever_opt_tl_get:cNF
+                \tl_if_empty:NTF \l__zrefclever_name_format_fallback_tl
                   {
-                    \__zrefclever_opt_varname_type:een
-                      { \l__zrefclever_type_first_label_type_tl }
-                      { \l__zrefclever_name_format_tl }
-                      { tl }
-                  }
-                  \l__zrefclever_type_name_tl
-                  {
-                    \tl_if_empty:NF \l__zrefclever_ref_decl_case_tl
-                      {
-                        \tl_put_left:Nn \l__zrefclever_name_format_tl { - }
-                        \tl_put_left:NV \l__zrefclever_name_format_tl
-                          \l__zrefclever_ref_decl_case_tl
-                      }
                     \__zrefclever_opt_tl_get:cNF
                       {
-                        \__zrefclever_opt_varname_lang_type:eeen
-                          { \l__zrefclever_ref_language_tl }
+                        \__zrefclever_opt_varname_type:een
                           { \l__zrefclever_type_first_label_type_tl }
                           { \l__zrefclever_name_format_tl }
                           { tl }
@@ -5101,72 +5100,89 @@
                       }
                       \l__zrefclever_type_name_tl
                       {
-                        \tl_clear:N \l__zrefclever_type_name_tl
-                        \bool_set_true:N \l__zrefclever_type_name_missing_bool
-                        \msg_warning:nnee { zref-clever } { missing-name }
-                          { \l__zrefclever_name_format_tl }
-                          { \l__zrefclever_type_first_label_type_tl }
+                        \tl_if_empty:NF \l__zrefclever_ref_decl_case_tl
+                          {
+                            \tl_put_left:Nn \l__zrefclever_name_format_tl { - }
+                            \tl_put_left:NV \l__zrefclever_name_format_tl
+                              \l__zrefclever_ref_decl_case_tl
+                          }
+                        \__zrefclever_opt_tl_get:cNF
+                          {
+                            \__zrefclever_opt_varname_lang_type:eeen
+                              { \l__zrefclever_ref_language_tl }
+                              { \l__zrefclever_type_first_label_type_tl }
+                              { \l__zrefclever_name_format_tl }
+                              { tl }
+                          }
+                          \l__zrefclever_type_name_tl
+                          {
+                            \tl_clear:N \l__zrefclever_type_name_tl
+                            \bool_set_true:N \l__zrefclever_type_name_missing_bool
+                            \msg_warning:nnee { zref-clever } { missing-name }
+                              { \l__zrefclever_name_format_tl }
+                              { \l__zrefclever_type_first_label_type_tl }
+                          }
                       }
                   }
-              }
-              {
-                \__zrefclever_opt_tl_get:cNF
                   {
-                    \__zrefclever_opt_varname_type:een
-                      { \l__zrefclever_type_first_label_type_tl }
-                      { \l__zrefclever_name_format_tl }
-                      { tl }
-                  }
-                  \l__zrefclever_type_name_tl
-                  {
                     \__zrefclever_opt_tl_get:cNF
                       {
                         \__zrefclever_opt_varname_type:een
                           { \l__zrefclever_type_first_label_type_tl }
-                          { \l__zrefclever_name_format_fallback_tl }
+                          { \l__zrefclever_name_format_tl }
                           { tl }
                       }
                       \l__zrefclever_type_name_tl
                       {
-                        \tl_if_empty:NF \l__zrefclever_ref_decl_case_tl
-                          {
-                            \tl_put_left:Nn
-                              \l__zrefclever_name_format_tl { - }
-                            \tl_put_left:NV \l__zrefclever_name_format_tl
-                              \l__zrefclever_ref_decl_case_tl
-                            \tl_put_left:Nn
-                              \l__zrefclever_name_format_fallback_tl { - }
-                            \tl_put_left:NV
-                              \l__zrefclever_name_format_fallback_tl
-                              \l__zrefclever_ref_decl_case_tl
-                          }
                         \__zrefclever_opt_tl_get:cNF
                           {
-                            \__zrefclever_opt_varname_lang_type:eeen
-                              { \l__zrefclever_ref_language_tl }
+                            \__zrefclever_opt_varname_type:een
                               { \l__zrefclever_type_first_label_type_tl }
-                              { \l__zrefclever_name_format_tl }
+                              { \l__zrefclever_name_format_fallback_tl }
                               { tl }
                           }
                           \l__zrefclever_type_name_tl
                           {
+                            \tl_if_empty:NF \l__zrefclever_ref_decl_case_tl
+                              {
+                                \tl_put_left:Nn
+                                  \l__zrefclever_name_format_tl { - }
+                                \tl_put_left:NV \l__zrefclever_name_format_tl
+                                  \l__zrefclever_ref_decl_case_tl
+                                \tl_put_left:Nn
+                                  \l__zrefclever_name_format_fallback_tl { - }
+                                \tl_put_left:NV
+                                  \l__zrefclever_name_format_fallback_tl
+                                  \l__zrefclever_ref_decl_case_tl
+                              }
                             \__zrefclever_opt_tl_get:cNF
                               {
                                 \__zrefclever_opt_varname_lang_type:eeen
                                   { \l__zrefclever_ref_language_tl }
                                   { \l__zrefclever_type_first_label_type_tl }
-                                  { \l__zrefclever_name_format_fallback_tl }
+                                  { \l__zrefclever_name_format_tl }
                                   { tl }
                               }
                               \l__zrefclever_type_name_tl
                               {
-                                \tl_clear:N \l__zrefclever_type_name_tl
-                                \bool_set_true:N
-                                  \l__zrefclever_type_name_missing_bool
-                                \msg_warning:nnee { zref-clever }
-                                  { missing-name }
-                                  { \l__zrefclever_name_format_tl }
-                                  { \l__zrefclever_type_first_label_type_tl }
+                                \__zrefclever_opt_tl_get:cNF
+                                  {
+                                    \__zrefclever_opt_varname_lang_type:eeen
+                                      { \l__zrefclever_ref_language_tl }
+                                      { \l__zrefclever_type_first_label_type_tl }
+                                      { \l__zrefclever_name_format_fallback_tl }
+                                      { tl }
+                                  }
+                                  \l__zrefclever_type_name_tl
+                                  {
+                                    \tl_clear:N \l__zrefclever_type_name_tl
+                                    \bool_set_true:N
+                                      \l__zrefclever_type_name_missing_bool
+                                    \msg_warning:nnee { zref-clever }
+                                      { missing-name }
+                                      { \l__zrefclever_name_format_tl }
+                                      { \l__zrefclever_type_first_label_type_tl }
+                                  }
                               }
                           }
                       }
@@ -5173,34 +5189,35 @@
                   }
               }
           }
-      }
 
-    % Signal whether the type name is to be included in the hyperlink or not.
-    \bool_lazy_any:nTF
-      {
-        { ! \l__zrefclever_hyperlink_bool }
-        { \l__zrefclever_link_star_bool }
-        { \tl_if_empty_p:N \l__zrefclever_type_name_tl }
-        { \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { false } }
-      }
-      { \bool_set_false:N \l__zrefclever_name_in_link_bool }
-      {
+        % Signal whether the type name is to be included in the hyperlink or
+        % not.
         \bool_lazy_any:nTF
           {
-            { \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { true } }
-            {
-              \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { tsingle } &&
-              \tl_if_empty_p:N \l__zrefclever_typeset_queue_curr_tl
-            }
-            {
-              \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { single } &&
-              \tl_if_empty_p:N \l__zrefclever_typeset_queue_curr_tl &&
-              \l__zrefclever_typeset_last_bool &&
-              \int_compare_p:nNn { \l__zrefclever_type_count_int } = { 0 }
-            }
+            { ! \l__zrefclever_hyperlink_bool }
+            { \l__zrefclever_link_star_bool }
+            { \tl_if_empty_p:N \l__zrefclever_type_name_tl }
+            { \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { false } }
           }
-          { \bool_set_true:N \l__zrefclever_name_in_link_bool }
           { \bool_set_false:N \l__zrefclever_name_in_link_bool }
+          {
+            \bool_lazy_any:nTF
+              {
+                { \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { true } }
+                {
+                  \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { tsingle } &&
+                  \tl_if_empty_p:N \l__zrefclever_typeset_queue_curr_tl
+                }
+                {
+                  \str_if_eq_p:Vn \l__zrefclever_nameinlink_str { single } &&
+                  \tl_if_empty_p:N \l__zrefclever_typeset_queue_curr_tl &&
+                  \l__zrefclever_typeset_last_bool &&
+                  \int_compare_p:nNn { \l__zrefclever_type_count_int } = { 0 }
+                }
+              }
+              { \bool_set_true:N \l__zrefclever_name_in_link_bool }
+              { \bool_set_false:N \l__zrefclever_name_in_link_bool }
+          }
       }
   }
 \cs_new_protected:Npn \__zrefclever_hyperlink:nnn #1#2#3



More information about the tex-live-commits mailing list.