[tex4ht-commits] [SCM] tex4ht updated: r1504 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Apr 19 17:48:04 CEST 2024


Author: michal_h21
Date: 2024-04-19 15:48:03 +0000 (Fri, 19 Apr 2024)
New Revision: 1504

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
Log:
fixed tcolorbox markup for the \tcbox command

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-04-18 22:51:03 UTC (rev 1503)
+++ trunk/lit/ChangeLog	2024-04-19 15:48:03 UTC (rev 1504)
@@ -1,3 +1,12 @@
+2024-04-19  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (tcolorbox.4ht): close boxes after the \tcbox
+	command.
+	https://github.com/wo/logic2
+	* tex4ht-html.tex (html4.4ht): don't print title box in Tcolorbox if
+	it is empty.
+	https://github.com/wo/logic2
+
 2024-04-18  Karl Berry  <karl at freefriends.org>
 
 	* Makefile (derived): do not add tex4ht_fonts_minionpro_derived,

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2024-04-18 22:51:03 UTC (rev 1503)
+++ trunk/lit/tex4ht-4ht.tex	2024-04-19 15:48:03 UTC (rev 1504)
@@ -28844,7 +28844,9 @@
   \fi%
   % open title
   \b:tcolorbox%
-  \kvtcb at before@title\kvtcb at title\kvtcb at after@title%
+  \ifx\kvtcb at title\@empty\else
+    \kvtcb at before@title\kvtcb at title\kvtcb at after@title%
+  \fi
   % close title and open main box
   \c:tcolorbox%
   \box\tcb at upperbox%
@@ -28875,6 +28877,9 @@
 \def\:tempb{\d:tcolorbox\o:tcb at endboxanddraw:}
 \HLet\tcb at endboxanddraw\:tempb
 
+% this should correctly close tcolorbox after the \tcbox command
+\append:defIII\tcb at ox{\d:tcolorbox}
+
 % tcolorbox supports libraries, but it loads them
 % in a way that doesn't register them for the use 
 % with .4ht files.

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2024-04-18 22:51:03 UTC (rev 1503)
+++ trunk/lit/tex4ht-html4.tex	2024-04-19 15:48:03 UTC (rev 1504)
@@ -16477,8 +16477,8 @@
       padding-right:\calc:tcbpadding{\kvtcb at rightupper};
   }}
 }
-{\HCode{\Hnewline<div class="tcolorbox-title">}\par}
-{\ifvmode\IgnorePar\fi\EndP\HCode{</div>\Hnewline<div class="tcolorbox-content">}}
+{\ifx\kvtcb at title\@empty\else\HCode{\Hnewline<div class="tcolorbox-title">}\par\fi}
+{\ifx\kvtcb at title\@empty\else\ifvmode\IgnorePar\fi\EndP\HCode{</div>}\fi\HCode{\Hnewline<div class="tcolorbox-content">}}
 {\ifvmode\IgnorePar\fi\EndP\HCode{\Hnewline</div>\Hnewline</div>}\SaveEndP\par\ShowPar}%
 
 \Css{.tcolorbox{margin-top:0.5em;margin-bottom: 0.5em;}}



More information about the tex4ht-commits mailing list.