texlive[60463] Master/texmf-dist: ooffice double slashes in image

commits+karl at tug.org commits+karl at tug.org
Fri Sep 10 18:25:56 CEST 2021


Revision: 60463
          http://tug.org/svn/texlive?view=revision&revision=60463
Author:   karl
Date:     2021-09-10 18:25:56 +0200 (Fri, 10 Sep 2021)
Log Message:
-----------
ooffice double slashes in image names, tex4ht r977

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

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	2021-09-09 23:48:09 UTC (rev 60462)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2021-09-10 16:25:56 UTC (rev 60463)
@@ -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/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex	2021-09-09 23:48:09 UTC (rev 60462)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex	2021-09-10 16:25:56 UTC (rev 60463)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-ooffice.tex 971 2021-08-12 20:15:30Z michal_h21 $
+% $Id: tex4ht-ooffice.tex 977 2021-09-09 13:53:34Z michal_h21 $
 % compile 3 times: latex tex4ht-ooffice
 %      htlatex tex4ht-ooffice "xhtml,4,sections+"
 %
@@ -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*}

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht	2021-09-09 23:48:09 UTC (rev 60462)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht	2021-09-10 16:25:56 UTC (rev 60463)
@@ -1,4 +1,4 @@
-% ooffice.4ht (2021-08-12-13:49), generated from tex4ht-ooffice.tex
+% ooffice.4ht (2021-09-10-08:38), generated from tex4ht-ooffice.tex
 % Copyright 2009-2021 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 2021-08-12-13:49}
+\immediate\write-1{version 2021-09-10-08:38}
 
   \exit:ifnot{Preamble,% 
 algorithmicx,% 
@@ -6955,6 +6955,7 @@
 
 
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{graphics}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -6970,16 +6971,21 @@
       \Hnewline -->}%
     \egroup}
 \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*}
@@ -8322,6 +8328,7 @@
 
 
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{biblatex}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -12940,7 +12947,6 @@
 
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{verse}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -18858,6 +18864,7 @@
 
 
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{algorithmicx}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -18939,7 +18946,6 @@
 
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{ulem}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -19460,6 +19466,8 @@
 
 
 
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{footmisc}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -19500,7 +19508,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{mdwlist}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -19559,6 +19566,7 @@
 
 
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{soul}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -19695,7 +19703,6 @@
 
 
 
-
 
 
 



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