diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-06 00:23:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-06 00:23:06 +0000 |
commit | 4c3c9c75948c26d5f0779d9a8cf98ed47d6c6dea (patch) | |
tree | 7a19b101a9eae141bb821b746ba0890c8e942295 /Master/texmf-dist/tex/generic/tex4ht | |
parent | f84c635785a77879849e86a07315ebe6e4fdf5a1 (diff) |
adjustbox and tcolorbox fixes, tex4ht 1047, 1048
git-svn-id: svn://tug.org/texlive/trunk@61505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht')
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht | 29 |
2 files changed, 40 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht b/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht index 6e737c73034..a67b89d2171 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/adjustbox.4ht @@ -1,4 +1,4 @@ -% adjustbox.4ht (2021-11-26-13:53), generated from tex4ht-4ht.tex +% adjustbox.4ht (2022-01-05-16:22), generated from tex4ht-4ht.tex % Copyright 2019-2021 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,7 +16,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2021-11-26-13:53} +\immediate\write-1{version 2022-01-05-16:22} \NewConfigure{AdjustboxValignTop}{1} \NewConfigure{AdjustboxValignMiddle}{1} @@ -36,7 +36,9 @@ \def\update:adjustbox:id{\stepcounter{adjustbox@4ht}\def\AdjustboxId{adjustbox-\arabic{adjustbox@4ht}}} \NewConfigure{Adjustbox}{2} -\def\:tempa#1#2#3#4{\update:adjustbox:id\a:Adjustbox\o:adjbox@@frame:{#1}{#2}{#3}{#4}\b:Adjustbox} + +\def\:tempa#1#2#3#4{\update:adjustbox:id\a:Adjustbox\o:adjbox@@frame:{#1}{#2}{#3}{#4}\b:Adjustbox +} \HLet\adjbox@@frame\:tempa % suppress trying to draw the frame @@ -45,15 +47,27 @@ % patch macro that collects adjustbox contents and draw box. we disable this functionality, as all % of this should be handled by CSS % keys are set, so it should be possible to extract colors or frame size in theory -\long\def\:temp#1#2{\update:adjustbox:id\adjbox@setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup} +\long\def\:temp#1#2{% + % copy of definitions from \@adjustbox, to prevent compilation errors + \edef\adjbox@line{\the\inputlineno}% + \let\collectbox@mode\relax + \let\collectbox@noindent\relax + \let\adjbox@collectbox\@collectbox + \let\adjbox@begininnercode\@empty + \let\adjbox@endinnercode\@empty + \chardef\adjbox@innerlevel\z@ + \update:adjustbox:id\adjbox@setkeys{#1}\a:Adjustbox #2\b:Adjustbox\endgroup} \HLet\@adjustbox\:temp % definitions for macros % we don't save any colors and just use one configuration for all box types. -\def\@bgcolorbox#1{\update:adjustbox:id\a:Adjustbox\BOXCONTENT\b:Adjustbox} -\def\@foregroundbox#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox} -\def\@backgroundbox#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox} +\def\:tempa#1{\update:adjustbox:id\a:Adjustbox\BOXCONTENT\b:Adjustbox} +\HLet\@bgcolorbox\:tempa +\def\:tempa#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox} +\HLet\@foregroundbox\:tempa +\def\:tempa#1#2#3{\update:adjustbox:id\leavevmode\a:Adjustbox\BOXCONTENT\b:Adjustbox} +\HLet\@backgroundbox\:tempa \Hinput{adjustbox} \endinput diff --git a/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht b/Master/texmf-dist/tex/generic/tex4ht/tcolorbox.4ht index 0e0dd02bff7..8ff8c5a3dd2 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 (2021-11-24-13:48), generated from tex4ht-4ht.tex +% tcolorbox.4ht (2022-01-05-16:22), generated from tex4ht-4ht.tex % Copyright 2020-2021 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,13 +16,13 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2021-11-24-13:48} +\immediate\write-1{version 2022-01-05-16:22} % use custom counter that increments for every \tcolorbox \newcounter{:tcbcolcount} -\def\tcb@drawcolorbox{% +\def\:tempa{% \stepcounter{:tcbcolcount}% % save text and background colors for use in CSS \get:xcolorcss{tcbcolbacktitle}\:tcbcolbacktitle% @@ -52,12 +52,20 @@ \box\tcb@lowerbox% \b:tcolorlowerbox% \fi% - % close box - \d:tcolorbox% + % We need to close box in \tcb@endboxanddraw } +\HLet\tcb@drawcolorbox\:tempa % overwrite other versions of box drawing macros -\let\tcb@drawcolorbox@standalone\tcb@drawcolorbox +\HLet\tcb@drawcolorbox@standalone\:tempa + +% we need to close tcolorbox environment here, +% in the box. otherwise, last paragraph end +% would be ignored and we would get invalid XML +\def\:tempb{\d:tcolorbox\o:tcb@endboxanddraw:} +\HLet\tcb@endboxanddraw\:tempb + + \NewConfigure{tcolorbox}{4} \NewConfigure{tcolorlowerbox}{2} @@ -69,11 +77,12 @@ } \HLet\tcb@set@label\:tempa +\pend:def\tcb@minipage{\SaveEndP} +\pend:def\tcb@minipage@top{\SaveEndP} +\pend:def\tcb@minipage@bottom{\SaveEndP} +\pend:def\tcb@minipage@center{\SaveEndP} + -% this is a trick to fix issues with paragraphs -% spurious end </p> tags were inserted -\def\tcb@minipage#1{\SaveEndP\vbox\bgroup\par} -\def\endtcb@savebox{\EndP\egroup\RecallEndP} \Hinput{tcolorbox} \endinput |