[tex4ht-commits] [SCM] tex4ht updated: r971 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Thu Aug 12 22:15:30 CEST 2021
Author: michal_h21
Date: 2021-08-12 20:15:30 +0000 (Thu, 12 Aug 2021)
New Revision: 971
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-ooffice.tex
Log:
fixed support for \Picture+ in ooffice
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2021-08-12 19:47:00 UTC (rev 970)
+++ trunk/lit/ChangeLog 2021-08-12 20:15:30 UTC (rev 971)
@@ -1,6 +1,8 @@
2021-08-12 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-ooffice.tex (ooffice.4ht): added support for SVG image inclusion.
+ * tex4ht-ooffice.tex (ooffice.4ht): fixed support for images created by
+ \Picture+{} and \Picture+{} commands.
2021-08-03 Michal Hoftich <michal.h21 at gmail.com>
Modified: trunk/lit/tex4ht-ooffice.tex
===================================================================
--- trunk/lit/tex4ht-ooffice.tex 2021-08-12 19:47:00 UTC (rev 970)
+++ trunk/lit/tex4ht-ooffice.tex 2021-08-12 20:15:30 UTC (rev 971)
@@ -628,7 +628,7 @@
\<graphics obj manifest\><<<
<manifest:file-entry
- manifest:full-path="Pictures/\PictureFile" manifest:media-type="\get:image:mime:type\Gin at ext"/>\Hnewline
+ manifest:full-path="Pictures/\PictureFile" manifest:media-type="\get:image:mime:type\filename at ext"/>\Hnewline
>>>
\<shared manifest\><<<
@@ -1165,12 +1165,13 @@
\ht:special{t4ht=<draw:frame
draw:name="\PictureFile"
text:anchor-type="as-char" % "paragraph"
-% svg:width="...pt"
-% svg:height="...pt"
- % \ifx\noBoundingBox\UnDefined
- \string svg:width="\the\Gin at req@width"
- svg:height="\the\Gin at req@height"
- % \fi
+ % insert image dimension only if they really exist
+ \ifx\noBoundingBox\UnDefined
+ \ifx\Gin at req@width\undefined\else
+ \ifdim\Gin at req@width>0pt
+ \string svg:width="\the\Gin at req@width"
+ svg:height="\the\Gin at req@height"
+ \fi\fi\fi
draw:z-index="0"
>%
<draw:image\Hnewline
@@ -1231,13 +1232,22 @@
>>>
+% we need to support both images inserted by \includegraphics,
+% and pictures created using \Picture*{}.
\<insert shadowing fig file\><<<
+% parse the image extension, will be used later
+\expandafter\filename at parse\expandafter{\PictureFile}%
+\ifx\Gin at base\@undefined
+\let\graphics:filename\PictureFile
+\else
+\def\graphics:filename{\Gin at base\Gin at ext}
+\fi
% \ht:special{t4ht>\PictureFile.4og}%
-\ht:special{t4ht>\Gin at base\Gin at ext.4og}%
+\ht:special{t4ht>\graphics:filename.4og}%
\ht:special{t4ht*>}%
% \ht:special{t4ht<\PictureFile.4og}%
-\ht:special{t4ht<\Gin at base\Gin at ext.4og}%
+\ht:special{t4ht<\graphics:filename.4og}%
\OOmanifest{|<graphics obj manifest|>}%
>>>
More information about the tex4ht-commits
mailing list.