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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Sep 17 16:27:15 CEST 2021


Author: michal_h21
Date: 2021-09-17 14:27:15 +0000 (Fri, 17 Sep 2021)
New Revision: 983

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-ooffice.tex
Log:
fixed listings support in the odt format

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2021-09-17 12:20:37 UTC (rev 982)
+++ trunk/lit/ChangeLog	2021-09-17 14:27:15 UTC (rev 983)
@@ -2,6 +2,8 @@
 
 	* tex4ht-html4.tex (html4.4ht): fixed support for floating listings.
 	https://tex.stackexchange.com/a/615703/2891
+	* tex4ht-ooffice.tex (ooffice.4ht): fixed listings support in the ODT
+	format.
 
 2021-09-14  Michal Hoftich  <michal.h21 at gmail.com>
 

Modified: trunk/lit/tex4ht-ooffice.tex
===================================================================
--- trunk/lit/tex4ht-ooffice.tex	2021-09-17 12:20:37 UTC (rev 982)
+++ trunk/lit/tex4ht-ooffice.tex	2021-09-17 14:27:15 UTC (rev 983)
@@ -10446,15 +10446,21 @@
 \ConfigureEnv{lstlisting}
    {\ifvmode \IgnorePar\fi \EndP  
     \HCode{<!--l. \the\inputlineno lstlisting-->}%
-    \HCode{<text:p\Hnewline text:style-name="Preformatted-Text">}%
-    \bgroup \special{t4ht@(}%
+    % \HCode{}%
+    \bgroup %
+    \gdef\start:LstLn{%
+       \ifvmode\IgnorePar\fi\EndP\HCode{<text:p\Hnewline text:style-name="Preformatted-Text">}%
+       \ht:special{t4ht@(}\ttfamily%
+       \gdef\start:LstLn{\HCode{<text:s/><text:line-break/>}}}
+    \pend:def\lst at DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{</text:p>}}%
        \Configure{listings}
          {{\everypar{}\leavevmode}}
          {{\everypar{}\leavevmode}}
-         {\HCode{<text:s/><text:line-break/>}}{}%
+         {\start:LstLn}{}%
    }
-   {\special{t4ht@)}\egroup
-    \ifvmode \IgnorePar\fi \EndP   \HCode{</text:p>}\par}
+   {\ht:special{t4ht@)}\egroup
+    % \ifvmode \IgnorePar\fi \EndP   \HCode{</text:p>}\par}
+    \par}
    {} {}
 >>>
 
@@ -10462,16 +10468,20 @@
 \Configure{lstinputlisting}
    {\ifvmode \IgnorePar\fi \EndP
     \HCode{<!--l. \the\inputlineno lstinputlisting-->}%
-    \HCode{<text:p\Hnewline text:style-name="Preformatted-Text">}%
-    \bgroup \tt \special{t4ht@(}%
+    % \HCode{<text:p\Hnewline text:style-name="Preformatted-Text">}%
+    \bgroup%
+    \gdef\start:LstLn{%
+       \ifvmode\IgnorePar\fi\EndP\HCode{<text:p\Hnewline text:style-name="Preformatted-Text">}%
+       \ht:special{t4ht@(}\ttfamily%
+       \gdef\start:LstLn{\HCode{<text:s/><text:line-break/>}}}
+    \pend:def\lst at DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{</text:p>}}%
        \Configure{listings}
          {{\everypar{}\leavevmode}}
          {{\everypar{}\leavevmode}}
-         {\HCode{<text:s/><text:line-break/>}} 
+         {\start:LstLn} 
          {\HCode{<text:line-break/>}}%
    }
-   {\special{t4ht@)}\egroup
-    \ifvmode \IgnorePar\fi \EndP   \HCode{</text:p>}\par}
+   {\special{t4ht@)}\egroup\par}
 >>>
 
 



More information about the tex4ht-commits mailing list.