diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-10 22:18:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-10 22:18:43 +0000 |
commit | 9f4f4e8bd472d2f888f63f255de6aa8e2d461da2 (patch) | |
tree | 38994db2eea96c5c8d9f5652f27ad4dabb269ba7 /Master/texmf-dist | |
parent | 58665a2016e1cccf45a403fef776d82cdce08a3a (diff) |
svg image dimensions, tex4ht r885
git-svn-id: svn://tug.org/texlive/trunk@57704 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/svg.4ht | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/svg.4ht b/Master/texmf-dist/tex/generic/tex4ht/svg.4ht index 524c7824dd9..4f20fc384bb 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/svg.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/svg.4ht @@ -1,4 +1,4 @@ -% svg.4ht (2018-12-30-09:31), generated from tex4ht-4ht.tex +% svg.4ht (2021-02-10-14:18), generated from tex4ht-4ht.tex % Copyright 2018 TeX Users Group % % This work may be distributed and/or modified under the @@ -16,13 +16,31 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2018-12-30-09:31} +\immediate\write-1{version 2021-02-10-14:18} \renewcommand\includesvg[2][]{% -% detect if an extension has been used -\filename@parse{#2} -\@ifundefined{filename@ext}{\edef\svg:filename{#2.svg}}{\edef\svg:filename{#2}} -\includegraphics{\svg:filename} + % get file name with \svgpath support + \svg@get@path{#2}{}% + % set keys + \svg@local@param@set{#1}% + \if@svg@file@found% + % convert supported parameters from \includesvg for use with \includegraphics + \edef\svg@tempb{} + \ifdim\svg@param@height>\z@\relax% + \edef\svg@tempb{\svg@tempb,height=\svg@param@height}% + \fi% + \ifdim\svg@param@width>\z@\relax% + \edef\svg@tempb{\svg@tempb,width=\svg@param@width}% + \fi% + \ifdim\dimexpr\svg@param@angle\p@\relax=\z@\relax\else% + \edef\svg@tempb{% + \svg@tempb,origin=\svg@param@origin,angle=\svg@param@angle% + }% + \fi% + \expandafter\includegraphics\expandafter[\svg@tempb]{\svg@file@base.\svg@file@ext} + \else + \typeout{SVG file #1 cannot be found} + \fi } \Hinput{svg} |