From cf7fbb67008aafac34c510153ae8177953972025 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 23 Apr 2024 17:44:59 +0000 Subject: label handling in tcolorbox, tex4ht r1506-7 git-svn-id: svn://tug.org/texlive/trunk@71043 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 5 +++++ Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 15 ++++++++++++--- Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht | 17 +++++++++++++---- 3 files changed, 30 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index a2ab9b5b2db..4cc207e3324 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,8 @@ +2024-04-22 Michal Hoftich + + * tex4ht-4ht.tex (tcolorbox.4ht): fixed handling of labels in + Tcolorbox. + 2024-04-21 Michal Hoftich * tex4ht-fonts-noncjk.tex ( diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index 4c5fe4127af..8296aec575f 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1504 2024-04-19 15:48:03Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1507 2024-04-22 13:28:48Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2024 TeX Users Group @@ -28823,6 +28823,7 @@ We need to use dvips driver with XeLaTeX % use custom counter that increments for every \tcolorbox \newcounter{:tcbcolcount} +\ExplSyntaxOn \def\:tempa{% \stepcounter{:tcbcolcount}% % save text and background colors for use in CSS @@ -28838,8 +28839,9 @@ We need to use dvips driver with XeLaTeX % set label if it exists \ifdefined\tcolorbox:label:key% \let\@currentlabel\tcolorbox:currentlabel% at this moment, \@currentlabel has wrong value - \o:tcb@set@label:{\tcolorbox:label:key}% + %\o:tcb@set@label:{\tcolorbox:label:key}% \AnchorLabel% save cross-ref destination + \o:__tcobox_label:n:{\tcolorbox:label:key}% \global\let\tcolorbox:label:key\undefined% \fi% % open title @@ -28862,6 +28864,7 @@ We need to use dvips driver with XeLaTeX \fi% % We need to close box in \tcb@endboxanddraw } +\ExplSyntaxOff \HLet\tcb@drawcolorbox\:tempa % overwrite other versions of box drawing macros @@ -28907,7 +28910,13 @@ We need to use dvips driver with XeLaTeX \xdef\tcolorbox:label:key{#1}% \global\let\tcolorbox:currentlabel\@currentlabel% } -\HLet\tcb@set@label\:tempa + +\ExplSyntaxOn +%\HLet\tcb@set@label\:tempa +\HLet\__tcobox_label_label:n\:tempa +\HLet\__tcobox_label_zlabel:n\:tempa +\HLet\__tcobox_label:n\:tempa +\ExplSyntaxOff | | diff --git a/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht b/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht index 94d26f66ee2..2134c25a871 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht @@ -1,4 +1,4 @@ -% tcolorbox.4ht (2024-04-20-08:15), generated from tex4ht-4ht.tex +% tcolorbox.4ht (2024-04-23-10:44), generated from tex4ht-4ht.tex % Copyright 2020-2024 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,12 +16,13 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2024-04-20-08:15} +\immediate\write-1{version 2024-04-23-10:44} % use custom counter that increments for every \tcolorbox \newcounter{:tcbcolcount} +\ExplSyntaxOn \def\:tempa{% \stepcounter{:tcbcolcount}% % save text and background colors for use in CSS @@ -37,8 +38,9 @@ % set label if it exists \ifdefined\tcolorbox:label:key% \let\@currentlabel\tcolorbox:currentlabel% at this moment, \@currentlabel has wrong value - \o:tcb@set@label:{\tcolorbox:label:key}% + %\o:tcb@set@label:{\tcolorbox:label:key}% \AnchorLabel% save cross-ref destination + \o:__tcobox_label:n:{\tcolorbox:label:key}% \global\let\tcolorbox:label:key\undefined% \fi% % open title @@ -61,6 +63,7 @@ \fi% % We need to close box in \tcb@endboxanddraw } +\ExplSyntaxOff \HLet\tcb@drawcolorbox\:tempa % overwrite other versions of box drawing macros @@ -106,7 +109,13 @@ \xdef\tcolorbox:label:key{#1}% \global\let\tcolorbox:currentlabel\@currentlabel% } -\HLet\tcb@set@label\:tempa + +\ExplSyntaxOn +%\HLet\tcb@set@label\:tempa +\HLet\__tcobox_label_label:n\:tempa +\HLet\__tcobox_label_zlabel:n\:tempa +\HLet\__tcobox_label:n\:tempa +\ExplSyntaxOff \pend:def\tcb@minipage{\SaveEndP} \pend:def\tcb@minipage@top{\SaveEndP} -- cgit v1.2.3