summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-10 16:25:56 +0000
committerKarl Berry <karl@freefriends.org>2021-09-10 16:25:56 +0000
commitd47195262a5323cc776706da3caf2c198e393306 (patch)
tree1ca76abe7c3eeb02ffbb08c4100bd5112bb08fe9 /Master/texmf-dist/source/generic
parent9b7af1c5c8257f788c04a49873c8d09ad658caf8 (diff)
ooffice double slashes in image names, tex4ht r977
git-svn-id: svn://tug.org/texlive/trunk@60463 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog5
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex26
2 files changed, 22 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index 5b94888e6e3..ad9f28c11f1 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,8 @@
+2021-09-09 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-ooffice.tex (ooffice.4ht): fixed issues with double slashes in
+ image file names.
+
2021-08-24 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (usepackage.4ht, hyperxmp.4ht,
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
index 8286197a839..71b3105795f 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-ooffice.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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*}