diff options
Diffstat (limited to 'Master')
-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} |