From 1df7188596d8d68b55847f4bdc8163771440c358 Mon Sep 17 00:00:00 2001 From: gusbrs <19410606+gusbrs@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:27:29 -0300 Subject: [PATCH] Check existence of \caption@subtypehook before adding to it --- zref-clever.dtx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zref-clever.dtx b/zref-clever.dtx index 43b3a46..1ea312a 100644 --- a/zref-clever.dtx +++ b/zref-clever.dtx @@ -8359,8 +8359,11 @@ % \begin{macrocode} \zref@newprop { subref } { \cs_if_exist_use:c { thesub \@captype } } - \tl_put_right:Nn \caption@subtypehook - { \zref@localaddprop \ZREF@mainlist { subref } } + \tl_if_exist:NT \caption@subtypehook + { + \tl_put_right:Nn \caption@subtypehook + { \zref@localaddprop \ZREF@mainlist { subref } } + } } } % \end{macrocode}