summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-ooffice.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-ooffice.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-ooffice.tex26
1 files changed, 17 insertions, 9 deletions
diff --git a/support/TeX4ht/source/tex4ht-ooffice.tex b/support/TeX4ht/source/tex4ht-ooffice.tex
index 8286197a83..71b3105795 100644
--- a/support/TeX4ht/source/tex4ht-ooffice.tex
+++ b/support/TeX4ht/source/tex4ht-ooffice.tex
@@ -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 @@ All images should be saved in one directory (`Pictures' by default),
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*}