summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/zref-clever/zref-clever.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-16 03:02:08 +0000
committerNorbert Preining <norbert@preining.info>2024-03-16 03:02:08 +0000
commit966f9ba332e49c29e961cb86e08f97d70eda51f6 (patch)
treee111edb864721bb0dac9db16b4e41a8a489ea456 /macros/latex/contrib/zref-clever/zref-clever.dtx
parent12679ab7d3c2a210f4123163671b532b8b55d5f9 (diff)
CTAN sync 202403160302
Diffstat (limited to 'macros/latex/contrib/zref-clever/zref-clever.dtx')
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.dtx43
1 files changed, 14 insertions, 29 deletions
diff --git a/macros/latex/contrib/zref-clever/zref-clever.dtx b/macros/latex/contrib/zref-clever/zref-clever.dtx
index 1a6e2ea44f..5767e6ab4f 100644
--- a/macros/latex/contrib/zref-clever/zref-clever.dtx
+++ b/macros/latex/contrib/zref-clever/zref-clever.dtx
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-clever".
%
-% Copyright (C) 2021-2023 gusbrs
+% Copyright (C) 2021-2024 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -166,7 +166,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2023-11-14} {0.4.3}
+\ProvidesExplPackage {zref-clever} {2024-03-14} {0.4.4}
{Clever LaTeX cross-references based on zref}
% \end{macrocode}
%
@@ -5231,7 +5231,7 @@
% \end{macrocode}
% Integration with \pkg{mathtools}.
% \begin{macrocode}
- \bool_if:NT \l_@@_mathtools_showonlyrefs_bool
+ \bool_if:NT \l_@@_mathtools_loaded_bool
{
\@@_mathtools_showonlyrefs:n
{ \l_@@_zcref_labels_seq }
@@ -8037,40 +8037,25 @@
% it's worth it.
%
% \begin{macrocode}
-\bool_new:N \l_@@_mathtools_showonlyrefs_bool
+\bool_new:N \l_@@_mathtools_loaded_bool
\@@_compat_module:nn { mathtools }
{
\@@_if_package_loaded:nT { mathtools }
{
- \MH_if_boolean:nT { show_only_refs }
+ \bool_set_true:N \l_@@_mathtools_loaded_bool
+ \cs_new_protected:Npn \@@_mathtools_showonlyrefs:n #1
{
- \bool_set_true:N \l_@@_mathtools_showonlyrefs_bool
- \cs_new_protected:Npn \@@_mathtools_showonlyrefs:n #1
+ \seq_map_inline:Nn #1
{
- \@bsphack
- \seq_map_inline:Nn #1
- {
- \exp_args:Ne \tl_if_eq:nnTF
- { \@@_extract_unexp:nnn {##1} { zc@type } { } }
- { equation }
- {
- \protected@write \@auxout { }
- { \string \MT@newlabel {##1} }
- }
- {
- \exp_args:Ne \tl_if_eq:nnT
- { \@@_extract_unexp:nnn {##1} { zc@type } { } }
- { parentequation }
- {
- \protected@write \@auxout { }
- { \string \MT@newlabel {##1} }
- }
- }
- }
- \@esphack
+ \tl_set:Ne \l_@@_tmpa_tl
+ { \@@_extract_unexp:nnn {##1} { zc@type } { } }
+ \bool_lazy_or:nnT
+ { \str_if_eq_p:Vn \l_@@_tmpa_tl { equation } }
+ { \str_if_eq_p:Vn \l_@@_tmpa_tl { parentequation } }
+ { \noeqref {##1} }
}
- \msg_info:nnn { zref-clever } { compat-package } { mathtools }
}
+ \msg_info:nnn { zref-clever } { compat-package } { mathtools }
}
}
% \end{macrocode}