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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Thu Sep 9 15:53:35 CEST 2021


Author: michal_h21
Date: 2021-09-09 13:53:34 +0000 (Thu, 09 Sep 2021)
New Revision: 977

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-ooffice.tex
Log:
fixed issues with image filenames with double slashes in ooffice output

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2021-08-24 14:28:48 UTC (rev 976)
+++ trunk/lit/ChangeLog	2021-09-09 13:53:34 UTC (rev 977)
@@ -1,3 +1,8 @@
+2021-09-09  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-ooffice.tex (ooffice.4ht): fixed issues with double slashes in
+	image file names.
+
 2021-08-24  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (usepackage.4ht, hyperxmp.4ht,

Modified: trunk/lit/tex4ht-ooffice.tex
===================================================================
--- trunk/lit/tex4ht-ooffice.tex	2021-08-24 14:28:48 UTC (rev 976)
+++ trunk/lit/tex4ht-ooffice.tex	2021-09-09 13:53:34 UTC (rev 977)
@@ -1057,18 +1057,26 @@
 regardless of the original path structure. We must save image names and
 original paths to be able to copy pictures to correct location.
 
+Sometimes, we may get double slashes, so we need extra tests to handle 
+this case.
+
 \<configure ooffice graphics\><<<
 \def\getImgFileParser#1/{%
-  \ifx\relax#1\relax
-    \let\next\relax
-  \else
-    \do{#1}\let\next\getImgFileParser
-  \fi\next
+  \edef\:tmpa{#1}%
+  \ifx\:tmpa\:null%
+  \let\next\relax%
+  \else%
+  \ifx\relax#1\relax\else%
+    \do{#1}%
+  \fi%
+  \let\next\getImgFileParser%
+  \fi\next%
 }
 \newcommand\getImgFile[2]{%
-  \def\do##1{\def\imgBaseName{##1#2}\def\imgBase{##1}}
-  \def\imgFullName{#1#2}
-  \getImgFileParser#1//
+  \def\do##1{\def\imgBaseName{##1#2}\def\imgBase{##1}}%
+  \def\imgFullName{#1#2}%
+  \def\:null{xxx}%
+  \getImgFileParser#1/\:null/%
 }
 
 \Configure{graphics*}



More information about the tex4ht-commits mailing list.