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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Sep 17 14:20:37 CEST 2021


Author: michal_h21
Date: 2021-09-17 12:20:37 +0000 (Fri, 17 Sep 2021)
New Revision: 982

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html4.tex
Log:
fixed support for floating listings

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2021-09-14 20:14:03 UTC (rev 981)
+++ trunk/lit/ChangeLog	2021-09-17 12:20:37 UTC (rev 982)
@@ -1,3 +1,8 @@
+2021-09-17  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html4.tex (html4.4ht): fixed support for floating listings.
+	https://tex.stackexchange.com/a/615703/2891
+
 2021-09-14  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): fixed TOC support for \exp

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2021-09-14 20:14:03 UTC (rev 981)
+++ trunk/lit/tex4ht-html4.tex	2021-09-17 12:20:37 UTC (rev 982)
@@ -15254,15 +15254,17 @@
     \gdef\start:LstLn{%
        \HCode{<div class="lstlisting" id="listing-\listingN">}%
        \gdef\start:LstLn{|<nbsp|>\HCode{<br />\Hnewline}}}
-    \bgroup 
+    \bgroup%
+    % we put the closing </div> here in order to support floating listings
+    % https://tex.stackexchange.com/a/615703/2891
+    \pend:def\lst at DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}%
        \Configure{listings}
          {{\everypar{}\leavevmode}}
          {{\everypar{}\leavevmode}}
          {\start:LstLn \HCode{<span class="label">}}
          {\HCode{</span>}}%
    }
-   {\egroup
-    \ifvmode \IgnorePar\fi \EndP \HCode{</div>}\par}
+   {\egroup\par}
    {} {}
 \Css{.lstlisting .label{margin-right:0.5em; }}
 \Css{div.lstlisting{font-family: monospace,monospace; white-space: nowrap; 



More information about the tex4ht-commits mailing list.