| 1 |
% svg.4ht (2025-01-09-13:20), generated from tex4ht-4ht.tex |
| 2 |
% Copyright 2018-2025 TeX Users Group |
| 3 |
% |
| 4 |
% This work may be distributed and/or modified under the |
| 5 |
% conditions of the LaTeX Project Public License, either |
| 6 |
% version 1.3c of this license or (at your option) any |
| 7 |
% later version. The latest version of this license is in |
| 8 |
% http://www.latex-project.org/lppl.txt |
| 9 |
% and version 1.3c or later is part of all distributions |
| 10 |
% of LaTeX version 2005/12/01 or later. |
| 11 |
% |
| 12 |
% This work has the LPPL maintenance status "maintained". |
| 13 |
% |
| 14 |
% The Current Maintainer of this work |
| 15 |
% is the TeX4ht Project <http://tug.org/tex4ht>. |
| 16 |
% |
| 17 |
% If you modify this program, changing the |
| 18 |
% version identification would be appreciated. |
| 19 |
\immediate\write-1{version 2025-01-09-13:20} |
| 20 |
|
| 21 |
\renewcommand\includesvg[2][]{% |
| 22 |
% get file name with \svgpath support |
| 23 |
\svg@get@path{#2}{}% |
| 24 |
% set keys |
| 25 |
\svg@local@param@set{#1}% |
| 26 |
\if@svg@file@found% |
| 27 |
% convert supported parameters from \includesvg for use with \includegraphics |
| 28 |
\edef\svg@tempb{} |
| 29 |
\ifdim\svg@param@height>\z@\relax% |
| 30 |
\edef\svg@tempb{\svg@tempb,height=\svg@param@height}% |
| 31 |
\fi% |
| 32 |
\ifdim\svg@param@width>\z@\relax% |
| 33 |
\edef\svg@tempb{\svg@tempb,width=\svg@param@width}% |
| 34 |
\fi% |
| 35 |
\ifdim\dimexpr\svg@param@angle\p@\relax=\z@\relax\else% |
| 36 |
\edef\svg@tempb{% |
| 37 |
\svg@tempb,origin=\svg@param@origin,angle=\svg@param@angle% |
| 38 |
}% |
| 39 |
\fi% |
| 40 |
\expandafter\includegraphics\expandafter[\svg@tempb]{\svg@file@base.\svg@file@ext} |
| 41 |
\else |
| 42 |
\PackageWarning{svg.4ht}{SVG file "#2" cannot be found} |
| 43 |
\fi |
| 44 |
} |
| 45 |
|
| 46 |
\Hinput{svg} |
| 47 |
\endinput |
| 48 |
|