texlive[61591] Master/texmf-dist: alt text in odt output, tex4ht

commits+karl at tug.org commits+karl at tug.org
Wed Jan 12 23:30:35 CET 2022


Revision: 61591
          http://tug.org/svn/texlive?view=revision&revision=61591
Author:   karl
Date:     2022-01-12 23:30:35 +0100 (Wed, 12 Jan 2022)
Log Message:
-----------
alt text in odt output, tex4ht r1056

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1056

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-01-12 21:54:22 UTC (rev 61590)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-01-12 22:30:35 UTC (rev 61591)
@@ -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/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex	2022-01-12 21:54:22 UTC (rev 61590)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex	2022-01-12 22:30:35 UTC (rev 61591)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-ooffice.tex 1053 2022-01-09 15:36:40Z karl $
+% $Id: tex4ht-ooffice.tex 1056 2022-01-12 22:24:14Z michal_h21 $
 % compile 3 times: latex tex4ht-ooffice
 %      htlatex tex4ht-ooffice "xhtml,4,sections+"
 %
@@ -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\><<<

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht	2022-01-12 21:54:22 UTC (rev 61590)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht	2022-01-12 22:30:35 UTC (rev 61591)
@@ -1,4 +1,4 @@
-% ooffice.4ht (2022-01-09-07:36), generated from tex4ht-ooffice.tex
+% ooffice.4ht (2022-01-12-14:29), generated from tex4ht-ooffice.tex
 % Copyright 2009-2022 TeX Users Group
 % Copyright 2001-2009 Maarten Wisse, James Naughton, Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-01-09-07:36}
+\immediate\write-1{version 2022-01-12-14:29}
 
   \exit:ifnot{Preamble,% 
 algorithmicx,% 
@@ -500,6 +500,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}
   {% parse the image extension, will be used later
 \expandafter\filename at parse\expandafter{\PictureFile}%
@@ -538,7 +541,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{PictureAlt*+[]}
    {\ht:special{t4ht>\jobname .tmp}}
    {\ht:special{t4ht<\jobname .tmp}}



More information about the tex-live-commits mailing list.