summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-13 03:00:43 +0000
committerNorbert Preining <norbert@preining.info>2021-08-13 03:00:43 +0000
commit07801f7ec3e3482aba8553fd75f9f190ac3f9f0a (patch)
treedb15f085c41deb0b13cea839d7a807fe4365cb0b /support
parenta19bf62ec5fa04167fc9480e22cd235ec53b3e41 (diff)
CTAN sync 202108130300
Diffstat (limited to 'support')
-rw-r--r--support/TeX4ht/source/ChangeLog8
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex21
-rw-r--r--support/TeX4ht/source/tex4ht-ooffice.tex35
3 files changed, 46 insertions, 18 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 0fa6887299..9d23de7852 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,11 @@
+2021-08-12 Michal Hoftich <michal.h21@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.
+ * tex4ht-4ht.tex (graphics.4ht, graphicx.4ht): moved mapping to .xbb files
+ from graphicx.4ht to graphics.4ht, so they work with both packages.
+
2021-08-03 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (mdframed.4ht): correctly empty the frame title.
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index f409c9f06a..2f3aa6f0e1 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 969 2021-08-03 18:00:44Z michal_h21 $
+% $Id: tex4ht-4ht.tex 972 2021-08-12 20:24:34Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2021 TeX Users Group
@@ -25920,6 +25920,18 @@ Show dimensions only for pictures that have dimensions specified explicitly or u
\def\if:boundingbox#1#2{\ifdim\Gin@req@width=\Gin@nat@width\ifx\noBoundingBox\UnDefined#1\else#2\fi\else#1\fi}
>>>
+We need to find bounding boxes of images. Graphics support the .xbb file that contain this information.
+It is necessary to provide the DeclareGraphicsRule commands for supported image formats so
+the .xbb file works.
+
+\<fix graphics\><<<
+\DeclareGraphicsRule{.png}{bmp}{.xbb}{}
+\DeclareGraphicsRule{.jpg}{bmp}{.xbb}{}
+\DeclareGraphicsRule{.gif}{bmp}{.xbb}{}
+\DeclareGraphicsRule{.pdf}{bmp}{.xbb}{}
+\DeclareGraphicsRule{.svg}{bmp}{.xbb}{}
+>>>
+
%\expandafter\def\csname c:graphics-file:\endcsname#1{\Gin@drafttrue
% \def\Gin@setfile##1##2##3{%
% \def\:temp####1####2{#1}\:temp{##3}{\Gin@base}}}
@@ -26037,11 +26049,6 @@ dvips needs to be used instead
\fi
\Gin:esetsize
}
-\DeclareGraphicsRule{.png}{bmp}{.xbb}{}
-\DeclareGraphicsRule{.jpg}{bmp}{.xbb}{}
-\DeclareGraphicsRule{.gif}{bmp}{.xbb}{}
-\DeclareGraphicsRule{.pdf}{bmp}{.xbb}{}
-\DeclareGraphicsRule{.svg}{bmp}{.xbb}{}
\NewConfigure{rotatebox}{2}
\pend:def\Grot@box{\a:rotatebox}
@@ -26605,7 +26612,7 @@ We need to use dvips driver with XeLaTeX
\<mdframed.4ht\><<<
% mdframed.4ht (|version), generated from |jobname.tex
-% Copyright 2017 TeX Users Group
+% Copyright 2017-2021 TeX Users Group
|<TeX4ht license text|>
\NewConfigure{mdframed}{2}
diff --git a/support/TeX4ht/source/tex4ht-ooffice.tex b/support/TeX4ht/source/tex4ht-ooffice.tex
index 5a8a69ec0b..8286197a83 100644
--- a/support/TeX4ht/source/tex4ht-ooffice.tex
+++ b/support/TeX4ht/source/tex4ht-ooffice.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-ooffice.tex 904 2021-04-16 20:30:30Z karl $
+% $Id: tex4ht-ooffice.tex 971 2021-08-12 20:15:30Z michal_h21 $
% compile 3 times: latex tex4ht-ooffice
% htlatex tex4ht-ooffice "xhtml,4,sections+"
%
@@ -628,7 +628,7 @@ Commands for basic character styles:
\<graphics obj manifest\><<<
<manifest:file-entry
- manifest:full-path="Pictures/\PictureFile" manifest:media-type="\get:image:mime:type\Gin@ext"/>\Hnewline
+ manifest:full-path="Pictures/\PictureFile" manifest:media-type="\get:image:mime:type\filename@ext"/>\Hnewline
>>>
\<shared manifest\><<<
@@ -1083,6 +1083,9 @@ original paths to be able to copy pictures to correct location.
\Configure{graphics*}
{jpeg}
{|<save image name|>\Picture[IMG]{\imgBase.jpeg |<graphics dimensions|> }}
+\Configure{graphics*}
+ {svg}
+ {|<save image name|>\Picture[IMG]{\imgBase.svg |<graphics dimensions|> }}
|<graphics default extensions|>
@@ -1144,7 +1147,7 @@ original paths to be able to copy pictures to correct location.
Enable supported image extensions out of the box.
\<graphics default extensions\><<<
-\DeclareGraphicsExtensions{.png,.jpg,.eps,.pdf}
+\DeclareGraphicsExtensions{.png,.jpg,.eps,.pdf,.svg}
>>>
\<configure ooffice tex4ht\><<<
@@ -1162,12 +1165,13 @@ Enable supported image extensions out of the box.
\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@req@width"
- svg:height="\the\Gin@req@height"
- % \fi
+ % insert image dimension only if they really exist
+ \ifx\noBoundingBox\UnDefined
+ \ifx\Gin@req@width\undefined\else
+ \ifdim\Gin@req@width>0pt
+ \string svg:width="\the\Gin@req@width"
+ svg:height="\the\Gin@req@height"
+ \fi\fi\fi
draw:z-index="0"
>%
<draw:image\Hnewline
@@ -1228,13 +1232,22 @@ Enable supported image extensions out of the box.
>>>
+% 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@parse\expandafter{\PictureFile}%
+\ifx\Gin@base\@undefined
+\let\graphics:filename\PictureFile
+\else
+\def\graphics:filename{\Gin@base\Gin@ext}
+\fi
% \ht:special{t4ht>\PictureFile.4og}%
-\ht:special{t4ht>\Gin@base\Gin@ext.4og}%
+\ht:special{t4ht>\graphics:filename.4og}%
\ht:special{t4ht*>}%
% \ht:special{t4ht<\PictureFile.4og}%
-\ht:special{t4ht<\Gin@base\Gin@ext.4og}%
+\ht:special{t4ht<\graphics:filename.4og}%
\OOmanifest{|<graphics obj manifest|>}%
>>>