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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Wed Jan 12 23:24:14 CET 2022


Author: michal_h21
Date: 2022-01-12 22:24:14 +0000 (Wed, 12 Jan 2022)
New Revision: 1056

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-ooffice.tex
Log:
Added alternative text support for images in the odt output

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-01-12 21:28:48 UTC (rev 1055)
+++ trunk/lit/ChangeLog	2022-01-12 22:24:14 UTC (rev 1056)
@@ -1,5 +1,9 @@
 2022-01-12  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-ooffice.tex (ooffice.4ht): added alternative
+	text support for images.
+	https://tex.stackexchange.com/a/630017/2891
+
 	* tex4ht-4ht.tex (graphicx.4ht): declare GraphicsAlt configuration,
 	in order to support the \includegraphics's alt attribute in other
 	output formats than HTML.

Modified: trunk/lit/tex4ht-ooffice.tex
===================================================================
--- trunk/lit/tex4ht-ooffice.tex	2022-01-12 21:28:48 UTC (rev 1055)
+++ trunk/lit/tex4ht-ooffice.tex	2022-01-12 22:24:14 UTC (rev 1056)
@@ -1171,6 +1171,9 @@
 \def:image:mime:type{.gif}{image/gif}
 \def:image:mime:type{.svg}{image/svg+xml}
 \def\svg:width{0.0pt}\def\svg:height{0.0pt}
+% this is defined in graphicx.4ht, but we should it define here too, for cases
+% when graphicx is not used
+\NewConfigure{GraphicsAlt}{1}
 \Configure{IMG}
   {|<insert shadowing fig file|>%
    \ht:special{t4ht=<draw:frame  
@@ -1194,7 +1197,12 @@
         /><!--draw:name="}}
   {" }
   {\ht:special{t4ht=" }}
-  {\ht:special{t4ht=--></draw:frame>}}
+  {%
+    \ifx\a:GraphicsAlt\relax%
+      \Configure{GraphicsAlt}{ALT}%
+    \fi%
+    \ht:special{t4ht=--><svg:title>\a:GraphicsAlt</svg:title></draw:frame>}%
+  }
 >>>
 
 \<configure ooffice pst-jtree\><<<



More information about the tex4ht-commits mailing list.