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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Oct 20 18:07:23 CEST 2023


Author: michal_h21
Date: 2023-10-20 16:07:23 +0000 (Fri, 20 Oct 2023)
New Revision: 1396

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
Log:
added support for tcolobox listings library

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-10-18 20:38:31 UTC (rev 1395)
+++ trunk/lit/ChangeLog	2023-10-20 16:07:23 UTC (rev 1396)
@@ -1,3 +1,10 @@
+2023-10-20  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (tcolorbox.4ht),
+	* tex4ht-html4.tex (html4.4ht): added support for the Listings
+	library of the Tcolobox package
+	https://puszcza.gnu.org.ua/bugs/?312
+
 2023-10-18  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (cprotect.4ht): remove spurious characters from the

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2023-10-18 20:38:31 UTC (rev 1395)
+++ trunk/lit/tex4ht-4ht.tex	2023-10-20 16:07:23 UTC (rev 1396)
@@ -28490,7 +28490,7 @@
   \get:xcolorcss{tcbcolframe}\:tcbcolframe%
   \get:xcolorcss{tcbcolupper}\:tcbcolupper%
   % make unique ID for this box
-  \def\:tcbcolid{tcolobox-\arabic{:tcbcolcount}}
+  \gdef\:tcbcolid{tcolobox-\arabic{:tcbcolcount}}
   % Open box
   \a:tcolorbox%
   % set label if it exists
@@ -28530,6 +28530,15 @@
 \def\:tempb{\d:tcolorbox\o:tcb at endboxanddraw:}
 \HLet\tcb at endboxanddraw\:tempb
 
+% tcolorbox supports libraries, but it loads them
+% in a way that doesn't register them for the use 
+% with .4ht files.
+% this fix is for tcblistingscore.code.tex
+\NewConfigure{tcblisting}{1}
+\def\:tempb{\o:endtcblisting:\d:tcolorbox\a:tcblisting}
+\HLet\endtcblisting\:tempb
+
+
 % this code prevents emptying of the box title when
 % some Tcolorbox options are used
 \def\:tempb{}

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2023-10-18 20:38:31 UTC (rev 1395)
+++ trunk/lit/tex4ht-html4.tex	2023-10-20 16:07:23 UTC (rev 1396)
@@ -16458,6 +16458,10 @@
 
 % there is rule p + div elsewhere in TeX4ht. we want to nullify it.
 \Css{.tcolorbox .lowerbox{margin-top:0pt;}}
+
+% remove unwanted margins and border from listings inside tcolorbox
+% https://puszcza.gnu.org.ua/bugs/?312
+\Configure{tcblisting}{\Css{\#\:tcbcolid\space.lstinputlisting{margin-bottom:0em;margin-top:0em;border: none;}}}
 >>>
 
 %%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.