texlive[55527] Master/texmf-dist: svg (12jun20)

commits+karl at tug.org commits+karl at tug.org
Fri Jun 12 23:02:37 CEST 2020


Revision: 55527
          http://tug.org/svn/texlive?view=revision&revision=55527
Author:   karl
Date:     2020-06-12 23:02:37 +0200 (Fri, 12 Jun 2020)
Log Message:
-----------
svg (12jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/svg/README.md
    trunk/Master/texmf-dist/doc/latex/svg/svg.pdf
    trunk/Master/texmf-dist/source/latex/svg/svg.dtx
    trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty
    trunk/Master/texmf-dist/tex/latex/svg/svg.sty

Modified: trunk/Master/texmf-dist/doc/latex/svg/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/svg/README.md	2020-06-12 21:02:23 UTC (rev 55526)
+++ trunk/Master/texmf-dist/doc/latex/svg/README.md	2020-06-12 21:02:37 UTC (rev 55527)
@@ -3,9 +3,9 @@
 ----------------------------------------------------------------------------
 
  Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016<br>
- Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-
+ Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-2020
 
- **svg 2020/05/07 v2.02f**
+ **svg 2020/06/12 v2.02g**
 
 ----------------------------------------------------------------------------
 
@@ -39,6 +39,10 @@
 Versions
 --------
 
+**v2.02g** (2020/06/12)
++ hot fix for including files with mutliple dots in it's names, 
+  see https://github.com/mrpiggi/svg/issues/27
+
 **v2.02f** (2020/05/07)
 + support for ***Inkscape*** 1.0
 

Modified: trunk/Master/texmf-dist/doc/latex/svg/svg.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/svg/svg.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/svg/svg.dtx	2020-06-12 21:02:23 UTC (rev 55526)
+++ trunk/Master/texmf-dist/source/latex/svg/svg.dtx	2020-06-12 21:02:37 UTC (rev 55527)
@@ -1,84 +1,72 @@
 % \iffalse meta-comment
+%<*identify>
 %
 %  svg and svg-extract -- Handling SVG pictures in LaTeX documents
-% ----------------------------------------------------------------------------
 %
-%  Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016  
-%  Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-2020
+%% ----------------------------------------------------------------------------
+%%
+%% Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016
+%% Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-2020
+%%
+%% ----------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, version 1.3c of the license.
+%% The latest version of this license is in
+%%     http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX 2005/12/01 or later and of this work.
+%%
+%% This work has the LPPL maintenance status "author-maintained".
+%%
+%% The current maintainer and author of this work is Falk Hanisch.
+%%
+%% This work consists of the main source file README.md, LICENSE.md, svg.dtx 
+%% and the derived documentation svg.pdf as well as the example files
+%% svg-example.svg, svg-preamble.tex and root.C (with derived file root.svg).
+%%
+%% ----------------------------------------------------------------------------
+%%
+%</identify>
+% \fi
 %
-% ----------------------------------------------------------------------------
-%
-%  This work may be distributed and/or modified under the conditions of the
-%  LaTeX Project Public License, version 1.3c of the license. The latest
-%  version of this license is in http://www.latex-project.org/lppl.txt and
-%  version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-%  or later and of this work. This work has the LPPL maintenance status
-%  "author-maintained". The current maintainer and author of this work
-%  is Falk Hanisch.
-%
-% ----------------------------------------------------------------------------
-%
-%<*batchfile>
-\ifx\documentclass\@undefined
+% \iffalse
+%<*dtx>
+\ifx\documentclass\undefined
 \input docstrip.tex
 \keepsilent
 
-\begingroup
-\catcode`\^^M=13 \catcode`\ =12 %
-\gdef\svgpreamble{%
-Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016  
-Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-
+\declarepreamble\svgmainpreamble
 
-This file was generated from file svg.dtx.
-----------------------------------------------------------------------------
-
-This work may be distributed and/or modified under the conditions
-of the LaTeX Project Public License, version 1.3c of the license.
-The latest version of this license is in
-    http://www.latex-project.org/lppl.txt
-and version 1.3c or later is part of all distributions of
-LaTeX 2005/12/01 or later and of this work.
-
-This work has the LPPL maintenance status "author-maintained".
-
-The current maintainer and author of this work is Falk Hanisch.
-
-This work consists of the main source file README.md, LICENSE.md, svg.dtx 
-and the derived documentation svg.pdf as well as the example files
-svg-example.svg, svg-preamble.tex and root.C (with derived file root.svg).
-}
-\endgroup
-
-\declarepreamble\svgbasepreamble
-
 svg -- Include SVG pictures in LaTeX documents using Inkscape
 
-\svgpreamble
-
 \endpreamble
 \declarepreamble\svgextractpreamble
 
 svg-extract -- Extract independent graphic files from SVG pictures
 
-\svgpreamble
-
 \endpreamble
 \askforoverwritefalse
 \usedir{tex/latex/svg}
 \generate{%
-  \usepreamble\svgbasepreamble
-  \file{svg.sty}{%
-    \from{svg.dtx}{package,option,base}%
-    \from{svg.dtx}{package,body,base}%
+  \usepreamble\svgmainpreamble
+  \file{svg.sty}{
+    \from{svg.dtx}{package,identify,main}
+    \from{svg.dtx}{package,base,main}
+    \from{svg.dtx}{package,option,main}
+    \from{svg.dtx}{package,body,main}
   }
   \usepreamble\svgextractpreamble
-  \file{svg-extract.sty}{%
-    \from{svg.dtx}{package,option,extract}%
-    \from{svg.dtx}{package,body,extract}%
+  \file{svg-extract.sty}{
+    \from{svg.dtx}{package,identify,extract}
+    \from{svg.dtx}{package,base,extract}
+    \from{svg.dtx}{package,option,extract}
+    \from{svg.dtx}{package,standalone,extract}
+    \from{svg.dtx}{package,body,extract}
   }
 %  \usepreamble\defaultpreamble
-%  \file{svg-old.sty}{%
-%    \from{svg.dtx}{package,old}%
+%  \file{svg-old.sty}{
+%    \from{svg.dtx}{package,old}
 %  }
 }
 \else
@@ -85,26 +73,62 @@
 \let\endbatchfile\relax
 \fi
 \endbatchfile
-%</batchfile>
+%</dtx>
 % \fi
 %
 % \iffalse
-%<package&option>\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-%<*driver>
-\ifx\ProvidesFile\@undefined\def\ProvidesFile#1[#2]{}\fi
-\ProvidesFile{svg.dtx}[%
-%</driver>
-%<package&option&base>\ProvidesPackage{svg}[%
-%<package&option&extract>\ProvidesPackage{svg-extract}[%
-%<*driver|package&option>
-  2020/05/07 v2.02f\space%
-%<package&option&base>  (include SVG pictures)%
-%<package&option&extract>  (extract independent graphics from SVG pictures)%
-]
-%</driver|package&option>
-%<*driver>
+%<*dtx|package&identify>
+\NeedsTeXFormat{LaTeX2e}[2020-02-02]
+%<*dtx>
+\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
+%</dtx>
+\begingroup
+  \catcode`\@11\relax%
+  \def\svg at Provides#1#2[#3]{%
+    \def\@tempa{\def\svg at version{#3}}%
+    \ifx\svg at version\@undefined\else%
+      \def\@tempb{#3}%
+      \ifx\svg at version\@tempb\else%
+        \def\@tempa{%
+          \@latex at warning@no at line{%
+            The version of package `#1' is `#3',\MessageBreak%
+            but `\svg at version' was expected!\MessageBreak%
+            You should update the svg bundle%
+          }%
+        }%
+      \fi%
+    \fi%
+    \edef\@tempb{%
+      \endgroup%
+%<*dtx>
+      \noexpand\ProvidesFile%
+%</dtx>
+%<package&identify>      \noexpand\ProvidesPackage%
+      {#1}[#3\space(#2)]%
+%<package&identify&extract>      \noexpand\RequirePackage{svg}[#3]%
+      \unexpanded\expandafter{\@tempa}%
+    }%
+  }%
+  \svg at Provides%
+%<*dtx>
+  {svg.dtx}{source}%
+%</dtx>
+%<package&identify&main>  {svg}{include SVG pictures}%
+%<package&identify&extract>  {svg-extract}{extract graphics from SVG pictures}%
+  [2020/06/12 v2.02g]%
+\@tempb
+%</dtx|package&identify>
+% \fi
+%
+% \iffalse
+%<*dtx>
 \documentclass[english,xindy]{tudscrdoc}[2017/03/27]
-\usepackage[T1]{fontenc}
+\usepackage{iftex}[2020/03/06]
+\iftutex
+  \usepackage{fontspec}
+\else
+  \usepackage[T1]{fontenc}
+\fi
 \usepackage{babel}
 \KOMAoptions{parskip=half-}
 \usepackage{marginnote}
@@ -129,18 +153,18 @@
 
 \usepackage{listings}
 \lstset{%
-  inputencoding=utf8,extendedchars=true,
+  inputencoding=utf8,extendedchars=true,%
   literate=%
     {ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
     {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
-    {~}{{\textasciitilde}}1 {ß}{{\ss}}1
+    {ß}{{\ss}}1 {~}{{\textasciitilde}}1
+    {»}{{\guillemetright}}1 {«}{{\guillemetleft}}1
 }
 \newcommand*\svglstbelowskip{\medskipamount}
 \AtBeginDocument{%
-  \edef\svglstbelowskip{\the\glueexpr\medskipamount-\parskip\relax}
+  \renewcommand*\svglstbelowskip{\glueexpr\medskipamount-\parskip\relax}%
 }
 \lstdefinestyle{svg}{%
-%  language=[LaTeX]TeX,%
   basicstyle=\small\ttfamily,%
   columns=flexible,%
   frame=single,%
@@ -148,7 +172,7 @@
   xleftmargin=\fboxsep,%
   xrightmargin=\fboxsep,%
   gobble=2,%
-  escapechar=§,
+  escapechar=§,%
   belowskip=\svglstbelowskip,%
 }
 \lstnewenvironment{svgexample}[1][]{%
@@ -168,17 +192,18 @@
 \CodelineIndex
 \RecordChanges
 \GetFileInfo{svg.dtx}
-\title{The packages \pkg{svg} and \pkg{svg-extract}}
-\author{%
-  Philip Ilten (2012--2016) \\
-  Falk Hanisch (2017--) \\
-  \url{https://github.com/mrpiggi/svg} \\
-  \mailto{hanisch.latex at outlook.com}
-}
-\date{\fileversion\nobreakspace(\filedate)}
 
 \begin{document}
-  \maketitle
+  \title{The packages \pkg{svg} and \pkg{svg-extract}}
+  \author{%
+    Philip Ilten (2012--2016)\\%
+    Falk Hanisch (2017--)\\%
+    \url{https://github.com/mrpiggi/svg}\\%
+    \mailto{hanisch.latex at outlook.com}%
+  }
+  \date{\fileversion\nobreakspace(\filedate)}
+  \providerobustcmd*\default[1]{\val{\textit{#1}}}
+  \maketitle%
   \begin{abstract}
     \noindent
     The \pkg{svg} package is intended for the automated integration of 
@@ -185,7 +210,7 @@
     SVG~graphics into \LaTeX~documents. Therefor the capabilities provided 
     by \app{Inkscape}---or more precisely its command~line~interface---are used 
     to export the text within a SVG~graphic to a separate file, which is 
-    then rendered by \LaTeX. The two commands \cs{includesvg} and 
+    then rendered by \LaTeX{}. The two commands \cs{includesvg} and 
     \cs{includeinkscape} are provided as central user\hbox{-}interface, 
     which are very similar to the \cs{includegraphics} command of the 
     \pkg{graphicx} package.
@@ -192,11 +217,11 @@
     
     In addition, the package \pkg{svg-extract} allows the extraction of these 
     graphics into independent files in different graphic formats, exactly as it 
-    is rendered within the document. For the creation of these graphics in the 
-    well\hbox{-}known formats PDF, EPS and~PS, \LaTeX{} and possibly conversion 
-    tools shipped with the distribution are used. If the graphics are required 
-    in other file formats, either \app{ImageMagick} or \app{Ghostscript} can be 
-    invoked.
+    is rendered within the \LaTeX~document. For the creation of these graphics 
+    in the well\hbox{-}known formats PDF, EPS and~PS, \LaTeX{} and possibly 
+    conversion tools shipped with the distribution are used. If the graphics 
+    are required in other file formats, either \app{ImageMagick} or 
+    \app{Ghostscript} can be invoked.
     
     \bigskip\noindent%
     \fbox{\parbox{\dimexpr\linewidth-(\fboxsep+\fboxrule)*2\relax}{%
@@ -212,7 +237,7 @@
   \tableofcontents
   \DocInput{\filename}
 \end{document}
-%</driver>
+%</dtx>
 % \fi
 %
 % \changes{v1.0}{2004/11/05}{initial version by Philip Ilten}^^A
@@ -219,23 +244,17 @@
 % \changes{v2.00}{2016/09/23}{new maintainer: Falk Hanisch}^^A
 % \changes{v2.00}{2017/03/27}{re-implementation from scratch}^^A
 % \changes{v2.00}{2017/03/27}{package \pkg{subfig} not required anymore}^^A
-% \changes{v2.00}{2017/03/27}{support of subfigures stopped due to the huge 
+% \changes{v2.00}{2017/03/27}{support of subfigures stopped due to the huge
 %   number of packages which deal with this topic and the large variety of
 %   implementing this functionality; naming exported graphics after their
 %   consecutive numbering can't be ensured for all variants of subfigures, so
 %   it's neglected}^^A
-% \changes{v2.01}{2017/11/27}{new option \opt{svgextension} to change format of
-%   files exported by \app{Inkscape} from \file{svg} to a custom one}^^A
-% \changes{v2.01}{2017/11/28}{usage of \cs{input}\marg{tex filename} within
-%   \app{Inkscape}~graphics possible; locates files in all declared searched
-%   folders}^^A
+% \changes{v2.01}{2017/11/28}{usage of \cs{input}\marg{tex~filename} within
+%   \app{Inkscape}~graphics locates files in all declared searched folders}^^A
 % \changes{v2.02}{2018/09/07}{package \pkg{trimspaces} required}^^A
 % \changes{v2.02}{2018/09/07}{multiple dots within file names possible}^^A
-% \changes{v2.02}{2018/09/07}{fixed errors with active double qoutes from
+% \changes{v2.02}{2018/09/07}{fixed errors with active double quotes from
 %   \pkg{babel} in path arguments}^^A
-% \changes{v2.02}{2018/09/07}{distortion of included and extracted graphics
-%   supported with options \opt{distort} (or \opt{keepaspectratio}) as well as
-%   \opt{extractdistort} and rotation for extractions (\opt{extractangle})}^^A
 % \changes{v2.02a}{2018/10/17}{fix bug for package \pkg{polyglossia} which
 %   fakes \pkg{babel} poorly}^^A
 % \changes{v2.02b}{2018/11/12}{fix bug for package \pkg{tikzscale} which
@@ -244,9 +263,11 @@
 %   name parsing}^^A
 % \changes{v2.02d}{2019/10/22}{fix bugs with kernel (2019/10/01) regarding file
 %   name parsing, see \url{https://github.com/mrpiggi/svg/issues/16}}^^A
-% \changes{v2.02f}{2020/05/06}{new option {inkscapeversion} for explicitly
-%   setting \app{Inkscape}-CLI version; automatic detection implemented}^^A
-% \ToDo{Workaround for missing \cs{transparent} (Lua\TeX lacks support)}[v2.03]
+% \changes{v2.02d}{2019/10/22}{conditional invocation of \app{Inkscape} export
+%   based on file modification date implemented for Xe\TeX{}}^^A
+% \changes{v2.02f}{2020/05/06}{command~line~interface of \app{Inkscape~1.0} 
+%   is supported}^^A
+% \changes{v2.02g}{2020/06/12}{fix for mutliple dots in file names (\#27)}^^A
 %
 %
 %
@@ -257,13 +278,13 @@
 % the simple and easy creation of images and diagrams using a graphical 
 % user\hbox{-}interface. The work by Johan\,B.\,C.~Engelen has further enhanced 
 % the ability of \app{Inkscape} to split a SVG~file into a text component that
-% can be compiled with \LaTeX, and an image component that can be imported as a 
-% PDF~file. For further information see the documentation of 
+% can be compiled with \LaTeX{}, and an image component that can be imported 
+% as a PDF~file. For further information see the documentation of 
 % \hrfn{http://www.ctan.org/pkg/svg-inkscape}{\pkg{svg-inkscape} on CTAN}.
 % The procedure described therein is taken up and consistently expanded. Thus, 
 % it is now possible to include a SVG~file into a \LaTeX~document where the
-% text within the SVG~graphic will be rendered natively by \LaTeX.
-% 
+% text within the SVG~graphic will be rendered natively by \LaTeX{}.
+%
 % Both packages \pkg{svg} and \pkg{svg-extract} rely heavily upon executing 
 % commands on shell using the \cs{ShellEscape} command---or respectively the
 % old known \cs{write18}---for executing the CLIs of the applications mentioned 
@@ -282,7 +303,7 @@
 % \file{inkscape -V}. Moreover, there are some required packages which are 
 % loaded by packages \pkg{svg} and \pkg{svg-extract} to provide the 
 % functionallity. These are:
-% \begin{description}[parsep=.5\smallskipamount]
+% \begin{description}[parsep=\glueexpr\smallskipamount/2\relax]
 % \item[\pkg{iftex}]
 %   for flow control depending on the used \LaTeX~engine
 % \item[\pkg{scrbase}]
@@ -323,17 +344,17 @@
 %
 %
 %
-% \section{Usage of package \pkg{svg}}\label{sec:inkscape}
+% \section{Usage of package \pkg{svg}\label{sec:inkscape}}
 %
-% The purpose of this package is to include SVG~graphics into a \LaTeX~document.
-% The command \cs{includesvg} is defined which does all necessary steps for
-% this task. It first launches the export of a SVG~file to a supported 
-% file~format with Inkscape, if necessary, and includes the exported 
-% graphic~file afterwards. The usage and the syntax is quite similiar to the
-% command \cs{includegraphics} from the \pkg{graphicx} package. In fact, the
-% inclusion of the exported graphic~file is done with \cs{includegraphics}.
+% The purpose of this package is to include standalone SVG~graphics into a 
+% \LaTeX~document. The command \cs{includesvg} is defined which does all 
+% necessary steps for this task. It first launches the export of a SVG~file 
+% to a supported file~format with Inkscape, if necessary, and includes the 
+% exported graphic~file afterwards. The usage and the syntax is quite similiar 
+% to the command \cs{includegraphics} from the \pkg{graphicx} package. In fact, 
+% the inclusion of the exported graphic~file is done with \cs{includegraphics}.
 %
-% \DescribeOptions{usexcolor,usetransparent,noxcolor,notransparent}
+% \DescribeOptions{usexcolor,usetransparent,noxcolor,notransparent}^^A
 % The packages \pkg{xcolor} and \pkg{transparent} are loaded by default at the 
 % end of package \pkg{svg}. The listed options are intended to prevent these 
 % packages from loading. They are the only options which have to be given while
@@ -349,27 +370,28 @@
 %
 % \subsection{General settings}
 %
-% \DescribeMacro{\svgsetup}
+% \DescribeMacro{\svgsetup}^^A
 % All other options described in detail below can also be changed after loading 
 % the package either in the preamble or within the document. They don't have to 
 % be given as optional argument to \cs{usepackage}\oarg{options}|{svg}| but can 
-% be set by using macro \cs{svgsetup}\marg{options} where \marg{options} is a 
+% be set by using macro \cs{svgsetup}\marg{options} where \meta{options} is a 
 % comma separated list of options. Settings with \cs{svgsetup} are done in the
 % current scope which means globally or within the current group.
 % \begin{svgexample}
 %   \svgsetup§\marg{options}§
 % \end{svgexample}
-% Further, it's possible to reset any setting locally with the optional 
-% argument of the commands \cs{includesvg}\oarg{options}\marg{svg filename} or
-% \cs{includesvg}\oarg{options}\marg{graphic filename}.
+% Further, with the optional argument of commands 
+% \cs{includesvg}\oarg{options}\marg{svg~filename} or
+% \cs{includeinkscape}\oarg{options}\marg{graphic~filename}, it's possible to 
+% reset any setting locally for a certain file.
 %
-% \DescribeMacro{\svgpath}
+% \DescribeMacro{\svgpath}^^A
 % Most likely you want to organize your SVG~files in a separate folder either 
 % as a subfolder in the working directory or elsewhere in your local folder 
 % structure. For this purpose, a list of root paths to SVG~files can be
 % specified using the \cs{svgpath} command in the same way as \cs{graphicspath}
 % is used. Every path has to be given in a group of braces |{}|---even if there 
-% is only one---and terminate with |/| last. For example:
+% is only one---and should terminate with a slash. For example:
 % \begin{svgexample}
 %   \svgpath{{svg/}{/usr/local/svg/}}
 % \end{svgexample}
@@ -377,21 +399,23 @@
 % afterwards in the absolute path \file{/usr/local/svg/}. Further, if no path 
 % was specified with \cs{svgpath} or the desired file wasn't found, all
 % directories given with \cs{graphicspath} are searched too. Please keep in 
-% mind that the current working directory is browsed first in any case. It's 
-% recommended to avoid any spaces and/or quotes respectively \cs{dq} both in 
-% paths and file~names, especially when DVI~output is active.
+% mind that the current working directory is browsed first in any case. 
+% It is recommended to avoid umlauts or any other Non\hbox{-}ASCII characters
+% as well as any spaces and/or quotes respectively \cs{dq} both in paths and 
+% file~names. Especially when DVI~output is active using quotes will certainly
+% cause an error. 
 %
 %
 %
 % \subsection{Options for the invocation of \app{Inkscape}}
 %
-% \DescribeOption{inkscape}
+% \DescribeOption{inkscape}^^A
 % This option controls, when the export with \app{Inkscape} is invoked and is 
-% \val{true} by default.
-% \begin{DescribeValues}
+% \default{true} by default.
+% \begin{DescribeValues}^^A
 % \item[false/off/no]
 %   \app{Inkscape} won't be invoked in any case, no export is done.
-% \item[\textbf{true}/on/yes/newer/onlynewer]
+% \item[\default{true}/on/yes/newer/onlynewer]
 %   The export with \app{Inkscape} will only be done, if the exported 
 %   graphic~file either does not exist or the file~modification date of the
 %   SVG~file is newer than that of the exported graphic~file. Thus the
@@ -401,12 +425,12 @@
 %   The \app{Inkscape}~export will definitely be done, any already existing 
 %   exported file will overwritten regardlessly.
 % \end{DescribeValues}
-% 
+%
 % In addition to controlling the export behavior, the option \opt{inkscape} can 
 % also be used to make additional settings, which then acts as a wrapper for 
 % the options described below.
 %
-% \begin{DescribeValues}
+% \begin{DescribeValues}^^A
 % \item[pdf/eps/ps/png]
 %   see \opt{inkscapeformat}|=|\val{pdf/eps/ps/png}
 % \item[latex/nolatex]
@@ -417,12 +441,12 @@
 %   see \opt{inkscapedpi}|=|\val{\meta{integer}}
 % \end{DescribeValues}
 %
-% \DescribeOption{inkscapepath}
+% \DescribeOption{inkscapepath}^^A
 % The option \opt{inkscapepath} specifies, where the resulting files of the
-% \app{Inkscape}~export should be located. The subfolder \file{./svg-inkscape/} 
-% within the current working directory is used by default 
-% (\opt{inkscapepath}|=|\val{basesubdir}).
-% \begin{DescribeValues}
+% \app{Inkscape}~export should be located. The default setting is 
+% \default{basesubdir}, which uses the subfolder \file{./svg-inkscape/} 
+% within the current working directory.
+% \begin{DescribeValues}^^A
 % \item[svgdir/svgpath]
 %   The PDF/EPS/PS/PNG~graphic~files as well as the \LaTeX~files generated by 
 %   \app{Inkscape} will be located in the same directory as the corresponding
@@ -432,7 +456,7 @@
 %   located in a subfolder named \file{svg-inkscape/}.
 % \item[basedir/basepath/jobdir/jobpath]
 %   All exported files will be located in the current working directory.
-% \item[\textbf{basesubdir}/basesubpath/jobsubdir/jobsubpath]
+% \item[\default{basesubdir}/basesubpath/jobsubdir/jobsubpath]
 %   A subfolder named \file{svg-inkscape/} within the current working directory 
 %   will be used for files generated by \app{Inkscape}.
 % \item[/path/to/somewhere/]
@@ -442,29 +466,32 @@
 %
 % \DescribeOption{inkscapeexe}^^A
 % For including a SVG~file, \app{Inkscape} is used to separate the text and
-% image from the SVG~file itself. In order to run the command~line~interface 
+% image from the SVG~file itself. In order to use the command~line~interface 
 % on shell, the path where the executable is located has to be known to the
-% operating system. You can check this by typing \file{inkscape -V} into the 
-% terminal. If this fails and nothing is returned, you should add the binaray 
-% directory of \app{Inkscape} to the environment variable \file{PATH} on your
-% operating system.
+% operating system and its name is assumed to be \val{inkscape} by default.
 %
-% If this is not possible or you aren't willing to do so, you can use option 
-% \opt{inkscapeexe} \emph{within the document preamble} to set the absolute 
-% path where the executable of \app{Inkscape} is located. The option is set to 
-% \opt{inkscapeexe}|=|\val{inkscape} by default.
+% You can check if the default setting is valid for your system by typing
+% \file{inkscape -V} into the terminal. If this fails and nothing is returned, 
+% you should add the binary directory of \app{Inkscape} to the environment
+% variable \file{PATH} on your operating system. If this is not possible or you
+% aren't willing to do so, you can alternatively use option \opt{inkscapeexe} 
+% \emph{within the document preamble} to set the absolute path where the
+% executable of \app{Inkscape} is located. 
 %
 % \DescribeOption{inkscapeversion}^^A
+% \changes{v2.02f}{2020/05/06}{option {inkscapeversion} for explicitly setting 
+%   \app{Inkscape}-CLI version; automatic detection implemented}^^A
 % The command~line~interface of \app{Inkscape} changed slightly from version
 % \val{0.9x} to \val{1.x} and makes it necessary to distinguish between the two 
 % versions. By default, \opt{inkscapeversion}|=|\val{auto} is set and the used 
-% version is detected by calling the given \opt{inkscapeexe} described above 
-% with parameter~\prm{-V} on shell and evaluating the result by either piping 
-%\val{stdout} or eventually writing it to a temporary file and read this back 
+% version is automatically detected. This is done by calling \app{Inkscape}-CLI 
+% with parameter~\prm{-V} on shell---see option \opt{inkscapeexe} described 
+% above. The returned result is evaluated by either piping \val{stdout} or 
+% eventually---if this fails---writing to a temporary file and read this back
 % in (pipes with a potentially quoted path can not be used with MiK\TeX).^^A
 % \footnote{^^A
-%   If this fails, the used inkscape version is guessed when \cs{svg at ink@run}
-%   is used the very first time.^^A
+%   If this fails too, the \app{Inkscape} version is guessed when macro
+%   \cs{svg at ink@run} is used the very first time.^^A
 % }
 % It is also possible to switch off the automatic detection routine by setting 
 % the desired version manually with either \opt{inkscapeversion}|=|\val{0} to 
@@ -472,12 +499,12 @@
 %
 % \DescribeOption{inkscapename}^^A
 % The file names of the \app{Inkscape}~export are derived from the name of the 
-% base SVG~file by default but can be modified with 
-% \opt{inkscapename}|=|\file{\meta{filename}}. It's possible to use counters 
-% for specifying the name of the exported file. Repeatedly specifying the same
-% file name will overwrite previously created files. 
+% base SVG~file by default. Nevertheless, the name of the exported file can be 
+% customized with \opt{inkscapename}|=|\file{\meta{filename}}. It is possible 
+% to use counters for specifying the name of the exported file. Repeatedly
+% specifying the same file name will overwrite previously created files. 
 %
-% \DescribeOption{inkscapeformat}
+% \DescribeOption{inkscapeformat}^^A
 % With this option, the \app{Inkscape}~export~format can be controlled. Valid 
 % values are \val{pdf}, \val{eps}, \val{ps} and \val{png}, where a \LaTeX~export
 % is not possible for \val{png} and option \opt{inkscapelatex} won't have any 
@@ -485,18 +512,18 @@
 % was detected. In this case \opt{inkscapeformat}|=|\val{eps} is the default
 % setting.
 %
-% \DescribeOption{inkscapelatex}
+% \DescribeOption{inkscapelatex}^^A
 % If option \opt{inkscapelatex}|=|\val{true} is set, the output is split into 
 % a seperate PDF/EPS/PS~file (see option \opt{inkscapeformat}) and a 
 % corresponding \LaTeX~file. This is the default setting. Setting 
 % \opt{inkscapelatex}|=|\val{false} will result in a single PDF/EPS/PS~file,
-% where any contained text won't be rendered by \LaTeX. 
+% where any contained text won't be rendered by \LaTeX{}. 
 %
-% \DescribeOption{inkscapearea}
+% \DescribeOption{inkscapearea}^^A
 % This option controls which area of the SVG~file should be exported, 
-% \val{drawing} is set by default.
-% \begin{DescribeValues}
-% \item[\textbf{drawing}/crop]
+% \default{drawing} is set by default.
+% \begin{DescribeValues}^^A
+% \item[\default{drawing}/crop]
 %   The area exported corresponds to the bounding box of all objects in a
 %   drawing, including any that are not on the page.
 % \item[page/nocrop]
@@ -504,7 +531,7 @@
 %   SVG~file.
 % \end{DescribeValues}
 %
-% \DescribeOption{inkscapedpi}
+% \DescribeOption{inkscapedpi}^^A
 % The resolution used either for PNG~export or for fallback rasterization of 
 % filtered objects when exporting to PDF/EPS/PS~file. For PNG~export it is set 
 % to 300\,dpi by default, if no value was given. The given value should be a 
@@ -511,18 +538,21 @@
 % positive integer. The default behaviour can be reversed after a given value
 % with \opt{inkscapedpi}|=|\val{\cs{relax}}.
 %
-% \DescribeOption{inkscapeopt}
+% \DescribeOption{inkscapeopt}^^A
 % You can use this option to pass additional switches to the \app{Inkscape} 
 % command~line~interface. For further information see the documentation of 
 % \hrfn{https://inkscape.org/de/doc/inkscape-man.html}{\app{Inkscape}}.
 %
-% \DescribeOption{svgextension}
+% \DescribeOption{svgextension}^^A
+% \changes{v2.01}{2017/11/27}{option \opt{svgextension} added in order to 
+%   change the format of files exported by \app{Inkscape} from \file{svg} to 
+%   a custom one}^^A
 % The package assumes SVG~files with \file{.svg} extension as source for the 
 % \app{Inkscape} export. This option can be used to change this behaviour. 
 % For example, in order to process \file{.dia} files instead of \file{.svg} you 
 % could use 
 % \begin{svgexample}
-%   \includesvg[svgextension=dia,§\meta{additional options}§]§\marg{filename}§
+%   \includesvg[svgextension=dia,§\meta{additional~options}§]§\marg{filename}§
 % \end{svgexample}
 %
 %
@@ -529,21 +559,22 @@
 %
 % \subsection{Options for the graphic inclusion}
 %
-% \DescribeOptions{width,height,distort,scale}
+% \DescribeOptions{width,height,distort,scale}^^A
+% \changes{v2.02}{2018/09/07}{option \opt{distort} (or \opt{keepaspectratio}) 
+%   added for distortion of included graphics}^^A
 % The width of the included graphic~file can be specified via the \opt{width} 
 % option and the height by the \opt{height} option. If both the width and
 % height are specified, the figure will be scaled such that neither of the
 % specified dimensions is exceeded, unless option \opt{distort}|=|\val{true} is 
-% given.\footnote{\ignorespaces%
-%   to provide compatibility for package \pkg{graphicx}, it's possible to use
-%   \prm{keepaspectratio}|=|\val{true} as alias for \opt{distort}|=|\val{false}
-%   and the other way round
-% } If \opt{width} and/or \opt{height} once have been set, this can be undone
+% given.\footnote{to provide compatibility for package \pkg{graphicx}, it's 
+%   possible to use \prm{keepaspectratio}|=|\val{true} as alias for 
+%   \opt{distort}|=|\val{false} and the other way round}
+% If \opt{width} and/or \opt{height} once have been set, this can be undone 
 % by setting them to \val{0pt} or \cs{relax}. If neither \opt{width} nor 
 % \opt{height} are set, the included graphic~file can also be scaled by setting 
 % \opt{scale} to a positive real number.
 %
-% \DescribeOptions{pretex,apptex}
+% \DescribeOptions{pretex,apptex}^^A
 % Commands prior and post to the inclusion of the graphic~file may be desired, 
 % such as font or color commands. The options \opt{pretex} and \opt{apptex} are
 % provided where the \LaTeX~code given to \opt{pretex} is included before the 
@@ -550,15 +581,15 @@
 % graphic~file and \opt{apptex} right afterwards. For example, to change the 
 % size of the included text one could use:
 % \begin{svgexample}
-%   \includesvg[pretex=\tiny,§\meta{additional options}§]§\marg{svg filename}§
+%   \includesvg[pretex=\tiny,§\meta{additional~options}§]§\marg{svg~filename}§
 % \end{svgexample}
 %
-% \DescribeOption{draft}
+% \DescribeOption{draft}^^A
 % This option can be used with booelan values and is equal to the identically 
 % named option of the \pkg{graphicx} package. If the \opt{draft} option is
 % given to \pkg{graphicx}, it's activated for \pkg{svg} as well.
 %
-% \DescribeOption{lastpage}
+% \DescribeOption{lastpage}^^A
 % A \hrfn{https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1417470}{bug} 
 % concerning the \LaTeX~export has been reported for \app{Inkscape}\,0.91. It 
 % may happen that within the exported \LaTeX~file, it's attempted to include
@@ -567,29 +598,29 @@
 %
 % Consequently, the total number of pages is read and only existing PDF~pages
 % are included, if both options \opt{inkscapeformat}|=|\val{pdf} and 
-% \opt{lastpage}|=|\val{true} are set. This is the default setting and can be
-% switched off with \opt{lastpage}|=|\val{false}. It's also possible to set the 
-% number of the last page included of a PDF~graphic manually as optional
-% parameter for \cs{includesvg} or \cs{includeinkscape}. For details, see the
-% description of the respective commands.
+% \opt{lastpage}|=|\val{true} are set. This is the default setting 
+% (unless DVI~output is active) and can be switched off with 
+% \opt{lastpage}|=|\val{false}. It's also possible to set the number of the 
+% last page included of a PDF~graphic manually as optional parameter for 
+% \cs{includesvg} or \cs{includeinkscape}. For details, see the description of 
+% the respective commands.
 %
 %
 %
 % \subsection{Including SVG~files}
 %
-% \DescribeMacro{\includesvg}
+% \DescribeMacro{\includesvg}^^A
 % The command \cs{includesvg} to include a SVG~file is quite similar to the 
 % \cs{includegraphics} command provided by the \pkg{graphicx} package.
 % \begin{svgexample}
-%   \includesvg§\oarg{parameters}\marg{svg filename}§
+%   \includesvg§\oarg{parameters}\marg{svg~filename}§
 % \end{svgexample}
 %
-% \begin{DescribeParameterParent}{Macro}{\includesvg}
-% \DescribeParameters{%
-%   inkscape,inkscapeformat,inkscapelatex,inkscapearea,inkscapedpi,inkscapeopt,%
-%   svgextension,width,height,distort,scale,pretex,apptex,draft,%
-% }
-% It is used right in the same way but where \marg{svg filename} is the 
+% \begin{DescribeParameterParent}{Macro}{\includesvg}^^A
+% \DescribeParameters{inkscape,inkscapeformat,inkscapelatex,inkscapearea,^^A
+%   inkscapedpi,inkscapeopt,svgextension,width,height,distort,scale,^^A
+%   pretex,apptex,draft}^^A
+% It is used right in the same way but where \meta{svg~filename} is the 
 % file~name of the SVG~file, where any given file~extension will be replaced
 % with \file{.svg} ruthlessly. In order to change the source file format for 
 % the \app{Inkscape} export, you have to use parameter \prm{svgextension}.
@@ -596,9 +627,12 @@
 %
 % If the given file is not located in the current working directory but
 % elsewhere on your file~system, the command \cs{svgpath} could be used to
-% specify this path. It is recommended to avoid any spaces and/or quotes
-% respectively \cs{dq} both in paths an file~names. Espacially when DVI~output
-% is active using quotes will certainly cause an error. 
+% specify this path. 
+% \ToDo{reference to general note at the very beginning instead}[v2.03]^^A
+% It is recommended to avoid umlauts or any other Non\hbox{-}ASCII characters
+% as well as any spaces and/or quotes respectively \cs{dq} both in paths and
+% file~names. Especially when DVI~output is active using quotes will certainly
+% cause an error. 
 %
 % The command \cs{includesvg} is intended to do an automated export with 
 % \app{Inkscape} at first, where the given SVG~file is exported to a
@@ -607,19 +641,19 @@
 % invoked, if the SVG~file is newer than the exported graphic~file or latter 
 % doesn't exist at all. Once the export has been done, the graphic~file and
 % maybe the \LaTeX~file are included.
-% 
+%
 % All previously described options can also be used as optional parameters to 
 % \cs{includesvg} and do have the same effect as described before. However, the 
 % optional parameters specified have an effect only once when \cs{includesvg}
 % is executed and remain unchanged afterwards.
 %
-% \DescribeParameter{lastpage}
+% \DescribeParameter{lastpage}^^A
 % In addition to the use of boolean values, the parameter \prm{lastpage} can 
 % also be assigned a specific (integer) page number, which defines the last
 % used page of a PDF~graphic. This, just like the identically named option, has 
 % an effect only when \prm{inkscapeformat}|=|\val{pdf} is set.
 %
-% \DescribeParameters{angle,origin}
+% \DescribeParameters{angle,origin}^^A
 % Both parameters correlate to the identically named parameters of the  
 % \cs{includegraphics} command provided by the \pkg{graphicx} package. However,
 % unlike to \cs{includegraphics}, they \prm{angle} and \prm{origin} are
@@ -633,20 +667,18 @@
 %
 % \subsection{Including already exported SVG~files}
 %
-% \DescribeMacro{\includeinkscape}
+% \DescribeMacro{\includeinkscape}^^A
 % If you don't want to make use of the automated export with \app{Inkscape} but 
 % the user\hbox{-}interface provided by the \pkg{svg} package, you can use 
 % \cs{includeinkscape} instead of \cs{includesvg}.  
 % \begin{svgexample}
-%   \includeinkscape§\oarg{parameters}\marg{graphic filename}§
+%   \includeinkscape§\oarg{parameters}\marg{graphic~filename}§
 % \end{svgexample}
 %
-% \begin{DescribeParameterParent}{Macro}{\includeinkscape}
-% \DescribeParameters{%
-%   inkscapeformat,inkscapelatex,%
-%   width,height,distort,scale,pretex,apptex,draft,lastpage,angle,origin,%
-% }
-% You can use it similar to \cs{includesvg} but \marg{graphic filename} has to 
+% \begin{DescribeParameterParent}{Macro}{\includeinkscape}^^A
+% \DescribeParameters{inkscapeformat,inkscapelatex,width,height,distort,^^A
+%   scale,pretex,apptex,draft,lastpage,angle,origin}^^A
+% You can use it similar to \cs{includesvg} but \meta{graphic~filename} has to 
 % be the filename of the already exported graphic file. If a valid 
 % file~extension (\file{.pdf/.eps/.ps/.png}) is given, the current setting for 
 % \opt{inkscapeformat} is overwritten. It's even possible to specify a 
@@ -668,13 +700,13 @@
 %
 % In order to extract to PDF, EPS, or PS~files the programs \file{pstoeps}, 
 % \file{pstopdf} and \file{pdftops} are used which are usually provided by most 
-% of the \LaTeXe~distributions. In additon, the command~line~interfaces of 
+% of the \LaTeX~distributions. In additon, the command~line~interfaces of 
 % \app{ImageMagick} and \app{Ghostscript} can be invoked for converting images 
 % in formats like PNG, JPG, TIF or something else. It's also possible to create 
 % PDF, EPS or PS~files with one of the two programs. Therefor the desired 
 % program---\file{magick} and/or \file{gswin32c}/\file{gswin64c} on Windows 
 % respectively \file{convert} and/or \file{gs} on unix-like operating 
-% systems---must be installed. By typing \file{\meta{program} -{}-version} on 
+% systems---must be installed. By typing \file{\meta{program}~-{}-version} on 
 % shell, this can be checked.
 %
 % If you want to extract independent graphic~files from included SVG~files, you 
@@ -688,7 +720,7 @@
 %
 % In contrast to package \pkg{svg}, the console commands for graphic extraction 
 % are executed with each LaTeX run by package \pkg{svg-extract} when 
-% \file{-{}-shell-escape} mode is activated. This behaviour can be switched of 
+% \file{-{}-shell-escape} mode is activated. This behaviour can be switched off 
 % with option \opt{extract}|=|\val{false}.
 %
 % \minisec{Important changes}
@@ -699,13 +731,13 @@
 % different \LaTeX~packages which all provide the possibility to include
 % subfigures with very different implemetations, this feature can't be provided
 % reliably by \pkg{svg-extract}. See option \opt{extractname} for further 
-% information. 
+% information.
 %
 %
 %
 % \subsection{General settings}
 %
-% \DescribeOptions{on,off}
+% \DescribeOptions{on,off}^^A
 % This options have to be given while loading the \pkg{svg-extract} package and 
 % are intended to toggle the functionality of this package. As both extracting 
 % and converting independent graphic~files is invoked with every \LaTeX~run 
@@ -715,80 +747,76 @@
 % used to reactivate functionality of this package. This can also be done by 
 % using \opt{extract}|=|\val{true}/\val{false}.
 %
-% \DescribeMacros{\svgsetup,\includesvg,\includeinkscape}
+% \DescribeMacros{\svgsetup,\includesvg,\includeinkscape}^^A
 % With package \pkg{svg-extract} the applicable options for 
 % \cs{svgsetup}\marg{options} as well as parameters for the already described
-% macros \cs{includesvg}\oarg{parameters}\marg{filename} and 
-% \cs{includeinkscape}\oarg{parameters}\marg{filename} are extended. They can
-% be used to control the process of graphic extraction and converting.
+% macros \cs{includesvg}\oarg{parameters}\marg{svg~filename} and 
+% \cs{includeinkscape}\oarg{parameters}\marg{graphic~filename} are extended. 
+% They can be used to control the process of graphic extraction and converting.
 %
-% \begin{DescribeParameterParent}{Macro}{\includesvg}
-% \DescribeParameters{extractangle}
-% With this parameter the graphic is rotated during the extraction process. The 
-% value is not inherited from \prm{angle} if it was given by default. this can 
-% be achieved by setting:
-% \begin{svgexample}
-%   \includesvg[angle=§\meta{angle}§,extractangle=inherit]§\marg{filename}§
-% \end{svgexample}
-% \end{DescribeParameterParent}
-%
 % All option described below can be used togehter with \cs{svgsetup} and are
 % then valid in the current scope. There also exist identically named 
 % parameters for the optional arguments of 
 % \begin{svgexample}
-%   \includesvg§\oarg{parameters}\marg{svg filename}§
-%   \includeinkscape§\oarg{parameters}\marg{graphic filename}§
+%   \includesvg§\oarg{parameters}\marg{svg~filename}§
+%   \includeinkscape§\oarg{parameters}\marg{graphic~filename}§
 % \end{svgexample}
-% These parameters have an effect only once when the specific command is 
-% executed and remain unchanged afterwards.
-% \begingroup\ignorespaces%
-% \newcommand*\parameterlist{}\ignorespaces%
-% \listadd\parameterlist{extract}\ignorespaces%
-% \listadd\parameterlist{extractpreamble}\ignorespaces%
-% \listadd\parameterlist{extractformat}\ignorespaces%
-% \listadd\parameterlist{extractruns}\ignorespaces%
-% \listadd\parameterlist{latexopt}\ignorespaces%
-% \listadd\parameterlist{extractwidth}\ignorespaces%
-% \listadd\parameterlist{extractheight}\ignorespaces%
-% \listadd\parameterlist{extractdistort}\ignorespaces%
-% \listadd\parameterlist{extractscale}\ignorespaces%
-% \listadd\parameterlist{extractangle}\ignorespaces%
-% \listadd\parameterlist{extractpretex}\ignorespaces%
-% \listadd\parameterlist{extractapptex}\ignorespaces%
-% \listadd\parameterlist{convert}\ignorespaces%
-% \listadd\parameterlist{convertformat}\ignorespaces%
-% \listadd\parameterlist{convertdpi}\ignorespaces%
-% \listadd\parameterlist{magicksetting}\ignorespaces%
-% \listadd\parameterlist{magickoperator}\ignorespaces%
-% \listadd\parameterlist{gsopt}\ignorespaces%
-% \listadd\parameterlist{gsdevice}\ignorespaces%
-% \listadd\parameterlist{clean}\ignorespaces%
-% \listadd\parameterlist{exclude}\ignorespaces%
-% \def\buffer{}\def\do#1{\buffer\prm{#1}\def\buffer{, }}\ignorespaces%
-% These parameters are: \dolistloop{\parameterlist}.
-% \renewcommand*\marginpar[2][]{}\ignorespaces%
-% \def\do#1{\DescribeParameter{#1}}\ignorespaces%
-% \begin{DescribeParameterParent}{Macro}{\includesvg}%
-% \dolistloop{\parameterlist}%
-% \end{DescribeParameterParent}%
-% \begin{DescribeParameterParent}{Macro}{\includeinkscape}%
-% \dolistloop{\parameterlist}%
-% \end{DescribeParameterParent}%
-% \endgroup%
+% These have an effect only once, when the specific command is executed.
+%^^A \begingroup^^A
+%^^A \newcommand*\parameterlist{}^^A
+%^^A \listadd\parameterlist{extract}^^A
+%^^A \listadd\parameterlist{extractpreamble}^^A
+%^^A \listadd\parameterlist{extractformat}^^A
+%^^A \listadd\parameterlist{extractwidth}^^A
+%^^A \listadd\parameterlist{extractheight}^^A
+%^^A \listadd\parameterlist{extractdistort}^^A
+%^^A \listadd\parameterlist{extractscale}^^A
+%^^A \listadd\parameterlist{extractangle}^^A
+%^^A \listadd\parameterlist{extractpretex}^^A
+%^^A \listadd\parameterlist{extractapptex}^^A
+%^^A \listadd\parameterlist{extractruns}^^A
+%^^A \listadd\parameterlist{latexexe}^^A
+%^^A \listadd\parameterlist{latexopt}^^A
+%^^A \listadd\parameterlist{latexext}^^A
+%^^A \listadd\parameterlist{dvipsopt}^^A
+%^^A \listadd\parameterlist{pstoepsopt}^^A
+%^^A \listadd\parameterlist{pstopdfopt}^^A
+%^^A \listadd\parameterlist{pdftoepsopt}^^A
+%^^A \listadd\parameterlist{pdftopsopt}^^A
+%^^A \listadd\parameterlist{convert}^^A
+%^^A \listadd\parameterlist{convertformat}^^A
+%^^A \listadd\parameterlist{convertdpi}^^A
+%^^A \listadd\parameterlist{magicksetting}^^A
+%^^A \listadd\parameterlist{magickoperator}^^A
+%^^A \listadd\parameterlist{gsopt}^^A
+%^^A \listadd\parameterlist{gsdevice}^^A
+%^^A \listadd\parameterlist{clean}^^A
+%^^A \listadd\parameterlist{exclude}^^A
+%^^A \def\buffer{}\def\do#1{\buffer\prm{#1}\def\buffer{, }}^^A
+%^^A These parameters are: \dolistloop{\parameterlist}.
+%^^A \renewcommand*\marginpar[2][]{}^^A
+%^^A \def\do#1{\DescribeParameter{#1}}^^A
+%^^A \begin{DescribeParameterParent}{Macro}{\includesvg}^^A
+%^^A \dolistloop{\parameterlist}^^A
+%^^A \end{DescribeParameterParent}^^A
+%^^A \begin{DescribeParameterParent}{Macro}{\includeinkscape}^^A
+%^^A \dolistloop{\parameterlist}^^A
+%^^A \end{DescribeParameterParent}^^A
+%^^A \endgroup^^A
 %
 %
 %
-% \subsection{Extract independent grahic files}\label{sec:extract}
-% \DescribeOption{extract}
+% \subsection{Extract independent grahic files\label{sec:extract}}
+%
+% \DescribeOption{extract}^^A
 % This option can be used with boolean values. Using \opt{extract}|=|\val{true}
 % activates the functionality for both extracting and converting which is the 
 % default setting, whereas \opt{extract}|=|\val{false} turns it off completely.
 %
-% \DescribeOption{extractpath}
+% \DescribeOption{extractpath}^^A
 % The path where the extracted and converted files are located can be specified 
-% with option \opt{extractpath}, whereas \opt{extractpath}|=|\val{basesubdir}
-% is set by default.
-% \begin{DescribeValues}
+% with option \opt{extractpath}, whereas \default{basesubdir} is set by default.
+% \begin{DescribeValues}^^A
 % \item[svgdir/svgpath]
 %   The extracted and converted independent graphic~files are located in the 
 %   same directory as the corresponding SVG~file.
@@ -798,7 +826,7 @@
 % \item[basedir/basepath/jobdir/jobpath]
 %   All extracted and converted files will be located in the current working 
 %   directory.
-% \item[\textbf{basesubdir}/basesubpath/jobsubdir/jobsubpath]
+% \item[\default{basesubdir}/basesubpath/jobsubdir/jobsubpath]
 %   A subfolder named \file{svg-extract/} within the current working directory 
 %   will be used for all extracted and converted files.
 % \item[/path/to/somewhere/]
@@ -806,33 +834,33 @@
 %   working directory (\file{./relative/path/}) or as an absolute path.
 % \end{DescribeValues}
 %
-% \DescribeOption{extractname}
+% \DescribeOption{extractname}^^A
 % It's also possible to change the name for extracted and converted files. The 
-% default setting is \opt{extractname}|=|\val{filenamenumbered}.
-% \begin{DescribeValues}
+% default setting is \opt{extractname}|=|\val{filenamenumbered}. The appended 
+% file extension is derived from option \opt{extractformat}.
+% \begin{DescribeValues}^^A
 % \item[filename/name]
 %   The name of the exported \app{Inkscape}~file is used and the suffix
 %   \file{-extract} is attached.
-% \item[\textbf{filenamenumbered}/namenumbered/numberedfilename/numberedname]
-%   Same as above, but a prefix with the count of extracted files is used
-%   instead of the suffix.
+% \item[\default{filenamenumbered}/namenumbered/numberedfilename/numberedname]
+%   Same as above, but a prefix with the current enumerated count of SVG~files
+%   is used instead of the suffix.
 % \item[numbered/section/numberedsection/sectionnumbered]
-%   The file name is composed by the number of extracted files and the current 
-%   outline numbering.
-% \item[\meta{filename}]
-%   You can use any file name, the file extension is derived from option 
-%   \opt{extractformat}. It's possible to use counters for specifying the 
+%   The file name is composed by the current enumerated count of SVG~files and 
+%   the present outline numbering.
+% \item[\file{\meta{filename}}]
+%   You can use any file name. It's possible to use counters for specifying the 
 %   name of the extracted file. Repeatedly specifying the same file name will
 %   overwrite previously created files. 
 % \end{DescribeValues}
 %
-% \DescribeOption{extractformat}
-% The included SVG~file can be extracted from the document into a independent
+% \DescribeOption{extractformat}^^A
+% The included SVG~file can be extracted from the document into an independent
 % graphic~file of type PDF, EPS or PS. The option can be used with either a
 % single value (\opt{extractformat}|=|\val{pdf}) or a comma separated list. 
 % For example,
 % \begin{svgexample}
-%   \includesvg[extractformat={pdf,eps,ps}]§\marg{svg filename}§
+%   \includesvg[extractformat={pdf,eps,ps}]§\marg{svg~filename}§
 % \end{svgexample}
 % will extract the SVG~file to both PDF and EPS~formats and generates two 
 % independent graphic~files. By default, \opt{extractformat}|=|\val{pdf} is set 
@@ -839,25 +867,24 @@
 % unless DVI~output was detected. In this case \opt{extractformat}|=|\val{eps} 
 % is the default setting.
 %
-% \DescribeOptions{%
-%   extractwidth,extractheight,extractdistort,extractscale,
-%   extractpretex,extractapptex,%
-% }
+% \DescribeOptions{extractwidth,extractheight,extractdistort,extractscale,^^A
+%   extractpretex,extractapptex}^^A
+% \changes{v2.02}{2018/09/07}{option \opt{extractdistort} added for distortion 
+%   of extracted graphics}^^A
 % These options can be used to overwrite the settings given for the appearance 
 % of a SVG~file within the document. For example, a SVG~file should cover the 
-% entire text width within the document but be extracted to a fixed width, this 
+% entire text width within the document but be extracted to a fixed width. This 
 % can be done with:
 % \begin{svgexample}
-%   \includesvg[width=\textwidth,extractwidth=500pt]§\marg{svg filename}§
+%   \includesvg[width=\textwidth,extractwidth=500pt]§\marg{svg~filename}§
 % \end{svgexample}
 % Assigning the value \val{inherit} to one of these options---which is set by 
 % default---leads to the usage of the corresponding option of package \pkg{svg} 
 % (\opt{width}/\opt{height}/\opt{scale}/\opt{pretex}/\opt{apptex}), whereas
 % \opt{extract\dots}|=|\val{\cs{relax}} can be used to ignore a parent option
-% utterly. Only option \opt{extractdistort} is initialized to \val{false} and
-% does not inherit from \opt{distort} by default.
+% utterly.
 %
-% \DescribeOptions{extractpreamble,extractpreambleend}
+% \DescribeOptions{extractpreamble,extractpreambleend}^^A
 % Within the included and extracted SVG~files any \LaTeX~macro can be used 
 % either defined by the user---this should be done in the preamble of the 
 % \LaTeX~document in which the SVG~file is to be included---or provided by a 
@@ -865,7 +892,7 @@
 % auxiliary \LaTeX~file all used packages and commands have to be known within 
 % this file. Consequently, the preamble of the current \LaTeX~document is used 
 % for the extraction of the SVG~file by default.
-% 
+%
 % However, it is possible to specify a different \emph{preamble~file} with the 
 % option \opt{extractpreamble} where the file to use as the preamble is given
 % as the argument---including maybe path, but file~name and file~extension in 
@@ -877,7 +904,7 @@
 % option \opt{extractpreambleend} will be used, which is set to a default with
 % \cs{begin}|{document}|. 
 %
-% \DescribeMacros{\svghidepreamblestart,\svghidepreambleend}
+% \DescribeMacros{\svghidepreamblestart,\svghidepreambleend}^^A
 % In case, the preamble of the current \LaTeX~document is used, there are maybe 
 % packages included or some parts within the preamble, which should not be used
 % within the separate auxiliary \LaTeX~file. These parts can be excluded if
@@ -897,33 +924,33 @@
 %   §\dots§
 % \end{svgexample}
 %
-% \DescribeOption{extractruns}
+% \DescribeOption{extractruns}^^A
 % When extracting independent grahic~files by compiling the generated auxiliary 
-% \LaTeX~file, it's maybe necessary to do multiple \LaTeX~runs on this file. 
-% The number of runs can be controlled with option \opt{extractruns}. It's set
-% to \opt{extractruns}|=|\val{2} by default.
+% \LaTeX~file, it's maybe necessary to do multiple \LaTeX~iterations on this. 
+% The number of iterations is controlled with option \opt{extractruns}. It is 
+% set to \opt{extractruns}|=|\val{2} by default.
 %
-% \DescribeOptions{latexexe,latexopt,latexext}
+% \DescribeOptions{latexexe,latexopt,latexext}^^A
 % For the extraction of an independent grahic~file, the \LaTeX~program is used
 % which is set by the \opt{latexexe} option. Depending on the \LaTeX~engine 
 % used for the current \LaTeX~document, it is set to either \app{pdflatex}, 
 % \app{lualatex}, \app{xelatex} or \app{latex} by default. It's also possible
-% to specify additional flags or switches for the \LaTeX~runs, which are
+% to specify additional flags or switches for the \LaTeX~iterations, which are
 % performed during the extraction process by the \opt{latexopt} option. If you
-% are used to utilize a other file~extension for \LaTeX~files than \file{.tex}, 
+% are used to utilize a different extension for \LaTeX~files than \file{.tex}, 
 % option \opt{latexext} can be used like \opt{latexext}|=|\val{ltx}.
 %
-% \DescribeOptions{dvipsopt,pstoepsopt,pstopdfopt,pdftoepsopt,pdftopsopt}
+% \DescribeOptions{dvipsopt,pstoepsopt,pstopdfopt,pdftoepsopt,pdftopsopt}^^A
 % Depending on the used \LaTeX~engine, the file~type of the extracted 
 % graphic differs. In order to create all formats, requested with option
 % \opt{extractformat}, several converting tools provided by most of the 
-% \LaTeXe~distributions are maybe invoked. These are \file{dvips},
+% \LaTeX~distributions are maybe invoked. These are \file{dvips},
 % \file{ps2eps}, \file{ps2pdf} and/or \file{pdftops} and can't be changed. It's
 % only possible to specify additional switches for every single tool with
 % \opt{dvipsopt}, \opt{pstoepsopt}, \opt{pstopdfopt}, \opt{pdftoepsopt} and
 % \opt{pdftopsopt}.
 %
-% \DescribeOption{clean}
+% \DescribeOption{clean}^^A
 % During the extraction process many files are generated for each SVG~file 
 % extraction. So it's oftentimes desirable to automatically remove these 
 % temporary files. Using the option \opt{clean}|=|\val{true} will remove any 
@@ -933,28 +960,51 @@
 % file~extensions in order to specify auxiliary files generated by package 
 % \pkg{svg-extract} to be deleted, for example \opt{clean}|=|\val{\{log,aux\}}.
 %
-% \DescribeOption{exclude}
+% \DescribeOption{exclude}^^A
 % Sometimes it may be necessary to extract and/or convert a SVG~file without 
 % including it. If the flag \opt{exclude} is specified, the SVG~file will not 
 % be rendered in the current \LaTeX~document, but will be extracted and/or
 % converted to the requested output format(s).
 %
+% \DescribeMacros{\includesvg,\includeinkscape}^^A
+% As previously mentioned, for extracting independent graphic files it is
+% sufficient to load package \pkg{svg-extract} and afterwards everything 
+% necassary is done by just using \cs{includesvg} or \cs{includeinkscape}.
 %
+% \begin{DescribeParameterParent}{Macro}{\includesvg}^^A
+% \DescribeParameter{extractangle}^^A
+% \begin{DescribeParameterParent}{Macro}{\includeinkscape}^^A
+% \renewcommand*\marginpar[2][]{}^^A
+% \DescribeParameter{extractangle}^^A
+% \changes{v2.02}{2018/09/07}{parameter \prm{extractangle} for \cs{includesvg}
+%   and \cs{includeinkscape} implemented in order to rotate graphics during 
+%   extractions}^^A
+% With this additional parameter the graphic is rotated during the extraction 
+% process. The value is not inherited from \prm{angle} if it was given by 
+% default. This can be achieved by setting:
+% \begin{svgexample}
+%   \includesvg[angle=§\meta{angle}§,extractangle=inherit]§\marg{svg~filename}§
+% \end{svgexample}
+% \end{DescribeParameterParent}
+% \end{DescribeParameterParent}
 %
-% \subsection{Convert extracted grahic files}\label{sec:convert}
-% 
+%
+%
+% \subsection{Convert extracted grahic files\label{sec:convert}}
+%
 % Based on the extraction of independent graphic~files, the \pkg{svg-extract} 
-% packages also provides the possibility to convert those extracted graphics in 
+% packages also provides the possibility to convert these extracted graphics in 
 % another format than PDF, EPS or PS with either \app{ImageMagick}---which is 
 % set by default---or \app{Ghostscript}.
 %
-% \DescribeOption{convert}
+% \DescribeOption{convert}^^A
 % This option can be used to control the invocation of the conversion process. 
 % By default, \opt{convert}|=|\val{false} is set. For Windows, there exist two 
 % different versions of \app{Ghostscript}, either 64\,bit or 32\,bit. If 
 % it is selected as converting tool the 64\,bit~executable is set by default.
-% \begin{DescribeValues}
-% \item[\textbf{false}/off/no]
+% Please note, that option \opt{extract} has to be activated.
+% \begin{DescribeValues}^^A
+% \item[\default{false}/off/no]
 %   No conversion is done.
 % \item[true/on/yes]
 %   The conversion will be done with the current chosen converting tool. 
@@ -970,8 +1020,8 @@
 %   The same as for the latter case applies, only option
 %  \opt{gsexe}|=|\val{gswin32c} is set on Windows.
 % \end{DescribeValues}
-% 
-% \DescribeOption{convertformat}
+%
+% \DescribeOption{convertformat}^^A
 % With this option, the desired output format(s) can be given. Multiple graphic 
 % formats can be specified in a list, for example something like 
 % \opt{convertformat}|=|\val{\{png,jpg,tif\}}. The value specified in 
@@ -993,7 +1043,7 @@
 % desired output~format is trailed with |+| as inner key.
 %
 % The first variant is applied to all output formats in general. If one of
-% these mentioned options is evaluated and a output format specific value was
+% these mentioned options is evaluated and an output format specific value was
 % given like in the second variant, the general setting is overwritten. If the 
 % general setting should be used and extended by an additional output format
 % specific settings, then the third variant is to be used. In this case, no 
@@ -1004,7 +1054,7 @@
 % or a specific one 
 % (\opt{\meta{option}}|=|\val{\{\meta{outputformat}[+]=\cs{relax}\}}).
 %
-% \DescribeOption{convertdpi}
+% \DescribeOption{convertdpi}^^A
 % This option controls the used density for all file~formats or a specific one,
 % whether \app{ImageMagick} or \app{Ghostscript} is used for the graphic 
 % conversion. The desired resolution of the converted file is given in dots per
@@ -1033,9 +1083,10 @@
 % the used conversion tool and not to the processing of the option.
 %
 %
+%
 % \subsubsection{Settings for the invocation of \app{ImageMagick}}
 %
-% \DescribeOptions{magickexe,magicksetting,magickoperator}
+% \DescribeOptions{magickexe,magicksetting,magickoperator}^^A
 % The conversion with \app{ImageMagick} via the \file{magick} or \file{convert} 
 % command~line~interface can be controlled with these options. The option
 % \opt{magickexe} determines the used executable and is set to \file{magick} on
@@ -1046,13 +1097,14 @@
 % \opt{magickoperator} can be set for all output formats or a \emph{specific}
 % one either resetting or extending the general settings. For further 
 % information see the documentation of 
-% \hrfn{http://www.imagemagick.org/script/command-line-processing.php}%
+% \hrfn{http://www.imagemagick.org/script/command-line-processing.php}^^A
 % {\app{ImageMagick} command~line~interface}.
 %
 %
+%
 % \subsubsection{Settings for the invocation of \app{Ghostscript}}
 %
-% \DescribeOptions{gsexe,gsdevice,gsopt}
+% \DescribeOptions{gsexe,gsdevice,gsopt}^^A
 % The conversion with \app{Ghostscript} is done with command~line~interface 
 % \file{gswin64c} or \file{gswin32c} on Windows and \file{gs} on unix-like 
 % operating systems. The executable can be changed with option \opt{gsexe}.
@@ -1073,14 +1125,14 @@
 %
 %
 %
+% \cleardoublepage
 % \section{Example}
 %
-% As an minimal example\footnote{\ignorespaces%
-%   The image used here is a slightly modified version of the image used in the
-%   initial documentation on how to include a SVG~file in \LaTeX{} by 
-%   Johan\,B.\,C.~Engelen available as package 
-%   \href{http://www.ctan.org/pkg/svg-inkscape}{\pkg{svg-inkscape} on CTAN}.
-% } take the following lines of code:
+% As an minimal example\footnote{The image used here is a slightly modified 
+%   version of the image used in the initial documentation on how to include a 
+%   SVG~file in \LaTeX{} by Johan\,B.\,C.~Engelen available as package 
+%   \href{http://www.ctan.org/pkg/svg-inkscape}{\pkg{svg-inkscape} on CTAN}.}
+% take the following lines of code:
 % \begin{svgexample}
 %   \documentclass{article}
 %   \usepackage[T1]{fontenc}
@@ -1092,58 +1144,59 @@
 %   \usepackage{subcaption}
 %   \begin{document}
 %   \begin{figure}
-%     \begin{minipage}{.5\linewidth}
+%     \begin{minipage}{\dimexpr\linewidth/2\relax}
 %       \includesvg[width=\linewidth]{svg-example}%
-%       \subcaption{This text is too large!}
+%       \subcaption{This text is too large!}%
 %     \end{minipage}%
-%     \begin{minipage}{.5\linewidth}
+%     \begin{minipage}{\dimexpr\linewidth/2\relax}
 %       \includesvg[width=\linewidth,pretex=\relscale{0.6}]{svg-example}%
-%       \subcaption{This text fits better.}
+%       \subcaption{This text fits better.}%
 %     \end{minipage}
-%   \caption{An example figure with \LaTeX~support}\label{fig:example}
+%   \caption{An example figure with \LaTeX~support\label{fig:example}}%
 %   \end{figure}
 %   \begin{figure}\centering
 %     \includesvg[%
 %       width=.5\linewidth,inkscapelatex=false,extractformat={pdf,eps}%
 %     ]{svg-example}%
-%     \caption{The same example figure without \LaTeX~support}
+%     \caption{The same example figure without \LaTeX~support}%
 %   \end{figure}
 %   \end{document}
 % \end{svgexample}
 % \begin{figure}[tb]
-%   \null\hfill\ignorespaces%
-%   \begin{minipage}{.45\linewidth}
-%     \includesvg[width=\linewidth]{svg-example}%
-%     \subcaption{This text is too large!}\label{fig:example-tex-a}
-%   \end{minipage}\hfill\ignorespaces%
-%   \begin{minipage}{.45\linewidth}
-%     \includesvg[width=\linewidth,pretex=\relscale{0.6}]{svg-example}%
-%     \subcaption{This text fits better.}\label{fig:example-tex-b}
+%   \null\hfill^^A
+%   \begin{minipage}{\dimexpr\linewidth*9/20\relax}
+%     \includesvg[width=\linewidth]{svg-example}^^A
+%     \subcaption{This text is too large!\label{fig:example-tex-a}}^^A
+%   \end{minipage}\hfill^^A
+%   \begin{minipage}{\dimexpr\linewidth*9/20\relax}
+%     \includesvg[width=\linewidth,pretex=\relscale{0.6}]{svg-example}^^A
+%     \subcaption{This text fits better.\label{fig:example-tex-b}}^^A
 %   \end{minipage}
-%   \hfill\null\ignorespaces%
-%   \caption{An example figure with \LaTeX~support}\label{fig:example-tex}
+%   \hfill\null^^A
+%   \caption{An example figure with \LaTeX~support\label{fig:example-tex}}^^A
 % \end{figure}
 % \begin{figure}[tb]\centering
-%   \includesvg[%
-%     width=.5\linewidth,inkscapelatex=false,extractformat={pdf,eps}%
-%   ]{svg-example}%
-%   \caption{The same example figure without \LaTeX~support}\label{fig:example}
+%   \includesvg[^^A
+%     width=.5\linewidth,inkscapelatex=false,extractformat={pdf,eps}^^A
+%   ]{svg-example}^^A
+%   \caption{^^A
+%     The same example figure without \LaTeX~support\label{fig:example}^^A
+%   }^^A
 % \end{figure}
 %
+% The output is shown in \autoref{fig:example-tex} and \autoref{fig:example}. 
+% Within this example the file \file{svg-example.svg} was included three times 
+% using the \cs{includesvg} command.
+%
 % If you are willing to compile the example, there are two aspects to consider. 
 % First, the included SVG~file \file{svg-example.svg} has to be located in the 
-% current folder and is located in \file{\meta{texmf}/doc/latex/svg/examples/}. 
-% Second, you have to run the desired \LaTeX~engine with 
-% \file{-{}-shell-escape} option enabled. 
+% current folder and is located in \file{\meta{texmf}/doc/latex/svg/}. Second, 
+% you have to run the desired \LaTeX~engine with flag \file{-{}-shell-escape}. 
 %
-% The output is shown in \autoref{fig:example-tex} and \autoref{fig:example}. 
-% Within this example the file \file{svg-example.svg} was included three times 
-% using the \cs{includesvg} command.
-% 
 % As you can see, \autoref{fig:example-tex-a} is created with default settings, 
-% except for the width specification. So the \app{Inkscape}~export with
-% \LaTeX~support is done as well as the extraction of a independent graphic~file
-% in PDF~format as the \pkg{svg-extract} package was loaded. 
+% except the width specification. The \app{Inkscape}~export with \LaTeX~support 
+% is done and the extraction of an independent graphic~file in PDF~format as 
+% the \pkg{svg-extract} package was loaded. 
 %
 % However, the text is slightly overrunning the margins of the image, and so 
 % \autoref{fig:example-tex-b}---which again uses the same \app{Inkscape}~export 
@@ -1177,7 +1230,7 @@
 % |Package svg Info:| or |Package svg-extract Info:|
 % \end{quote}
 % Right afterwards, there should appear |runsystem(<command>)...excuted.| which 
-% you should try to execute manually from terminal in the right directory. In 
+% you should try to execute manually at the terminal in the right directory. In 
 % most cases, the problem will be an invalid command call. If something goes
 % wrong during the extraction/converting process of package \pkg{svg-extract},
 % it would make sense to set option \opt{clean}|=|\val{false} to not delete any 
@@ -1190,9 +1243,9 @@
 % \minisec{When using pdf\LaTeX{} there are a lot of warnings}
 %
 % It may happen that several warnings like
-% \begin{quote}\ttfamily\raggedright%
+% \begin{quote}\ttfamily\raggedright^^A
 % pdfTeX warning:\,pdflatex.exe(file \meta{filename}.pdf):\,PDF inclusion:
-% multiple pdfs with page group included in a single page
+% multiple pdfs with page group included in a single page^^A
 % \end{quote}
 % occur when including the PDF~graphics exported with \app{Inkscape}. This is 
 % related to the handling of transparency effects within PDF~files. Since
@@ -1206,7 +1259,7 @@
 % \section{Include SVG files created with \app{ROOT}}
 %
 % This section was originally written by Philip Ilten. In the hope that since 
-% then nothing has changed fundamentally in the described procedure, this 
+% then nothing has changed fundamentally in the described procedure. This 
 % passage remains in the documentation, even if it will almost certainly be 
 % relevant to experimental particle physicists only, who frequently use the
 % analysis package \app{ROOT}.
@@ -1257,7 +1310,7 @@
 %
 % Consider the following example image produced by \app{ROOT} in 
 % \autoref{fig:root}. This figure was generated by the \app{ROOT} macro
-% \file{root.C}, provided within \file{\meta{texmf}/doc/latex/svg/examples/},
+% \file{root.C}, provided within \file{\meta{texmf}/doc/latex/svg/},
 % which produces the file~\file{root.svg} when run. The code used to produce
 % this SVG~file from within \app{ROOT} is
 % \lstinputlisting[style=svg,backgroundcolor=\color{red!10}]{examples/root.C} 
@@ -1272,27 +1325,35 @@
 %     \includesvg[%
 %       inkscapearea=page,height=6cm,pretex=\tiny,convertformat=png%
 %     ]{root}%
-%     \caption{Rendering of a \app{ROOT} plot---no more \emph{Comic CERNs}}%
-%     \label{fig:root}%
+%     \caption{%
+%       Rendering of a \app{ROOT} plot---no more \emph{Comic CERNs}%
+%       \label{fig:root}%
+%     }%
 %   \end{figure}
 % \end{svgexample}
 % \begin{figure}
-%   \centering%
-%     \includesvg[%
-%       inkscapearea=page,height=6cm,pretex=\tiny,convertformat=png%
-%     ]{root}%
-%   \caption{Rendering of a \app{ROOT} plot---no more \emph{Comic CERNs}}%
-%   \label{fig:root}%
+%   \centering^^A
+%     \includesvg[^^A
+%       inkscapearea=page,height=6cm,pretex=\tiny,convertformat=png^^A
+%     ]{root}^^A
+%   \caption{^^A
+%     Rendering of a \app{ROOT} plot---no more \emph{Comic CERNs}
+%     \label{fig:root}^^A
+%   }^^A
 % \end{figure}
 % which includes the graphic as well as the \LaTeX~file exported by 
 % \app{Inkscape}, produces the extracted PDF~image~(\file{root.pdf}) and 
 % converts this to a PNG~image~(\file{root.png}) by using \app{ImageMagick}.
-% Enjoy plots from \app{ROOT} with natively rendered \LaTeX!
+% Enjoy plots from \app{ROOT} with natively rendered \LaTeX{}!
 %
-% \StopEventually{\clearpage\PrintIndex\PrintChanges\PrintToDos}
+% \StopEventually{^^A
+%   \cleardoublepage\PrintIndex^^A
+%   \cleardoublepage\PrintChanges^^A
+%   \cleardoublepage\PrintToDos^^A
+% }
 %
 % \iffalse
-%<*package&option>
+%<*package&base>
 % \fi
 %
 %
@@ -1303,66 +1364,553 @@
 % \section{Initialization}
 % \subsection{Packages}
 %
-% The package \pkg{svg} requires package \pkg{iftex} for detecting the used 
-% \LaTeX~engine, \pkg{scrbase} for options processing, \pkg{pdftexcmds} for 
-% pdf\TeX{} primitives when using Lua\TeX, \pkg{shellesc} and \pkg{ifplatform}
-% for engine independent access to systems commands and files as well as
-% \pkg{graphicx} for the inclusion of PDF~files. The usage of packages
-% \pkg{xcolor} and \pkg{transparent} can be switched of with the corresponding
-% options. Package \pkg{svg-extract} only needs package \pkg{svg} itself.
+% The package \pkg{svg} mainly requires \pkg{scrbase} for options processing 
+% and \pkg{graphicx} for the inclusion of the exported graphic~files. 
+%
+% The packages \pkg{iftex} and \pkg{pdftexcmds} are needed to detect the used 
+% \LaTeX~engine on the one hand and enabling pdf\TeX{} primitives independent 
+% of the used \LaTeX~engine on the other hand. Additionally, \pkg{trimspaces} 
+% is responsible for string manipulation. Both packages \pkg{shellesc} and 
+% \pkg{ifplatform} are used for engine independent access to systems commands 
+% and files. The package \pkg{svg-extract} only needs package \pkg{svg} itself, 
+% which is loaded during initialization.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \RequirePackage{iftex}[2020/03/06]
 \RequirePackage{scrbase}[2020/04/19]
 \RequirePackage{pdftexcmds}[2019/11/24]
-\RequirePackage{shellesc}[2019/11/08]
 \RequirePackage{trimspaces}[2009/09/17]
 \RequirePackage{graphicx}[2019/11/30]
-%</base>
-%<*extract>
-\RequirePackage{svg}[2020/05/07]
-%</extract>
+\RequirePackage{shellesc}[2019/11/08]
 %    \end{macrocode}
+% In order to do not raise a warning, package \pkg{ifplatform} is only used if
+% \file{-{}-shell-escape} flag is enabled.
+%    \begin{macrocode}
+\ifnum\pdf at shellescape=\@ne\relax
+  \RequirePackage{ifplatform}[2017/10/13]
+\fi
+%</main>
+%    \end{macrocode}
 %
+%
+%
+% \subsection{Dealing with catcodes}
+%
+% The catcode for double quotes are temporarily changed and restored at the 
+% very end of both packages.
+%    \begin{macrocode}
+\edef\svg at catcodecodes@restore{%
+  \catcode`\noexpand\"\the\catcode`\"\relax%
+}
+\@makeother\"%
+\AtEndOfPackage{\svg at catcodecodes@restore}
+%    \end{macrocode}
+%
 % \iffalse
-%<*base>
+%<*main>
 % \fi
 %
-% \subsection{Helper macros}
 %
+%
+% \subsection{General macros}
+%
 % \begin{macro}{\svg at tempa}
 % \begin{macro}{\svg at tempb}
-% \begin{macro}{\svg at box}
 % \begin{macro}{\if at svg@tempswa}
-% Internal temporary macros. The catcode for double quotes are also temporarily 
-% changed.
+% Internal temporary macros.
 %    \begin{macrocode}
 \newcommand*\svg at tempa{}
 \newcommand*\svg at tempb{}
-\newbox\svg at box
 \newif\if at svg@tempswa
-\edef\svg at catcodecodes@restore{%
-  \catcode`\noexpand\"\the\catcode`\"\relax%
-}
-\@makeother\"%
 %    \end{macrocode}
 % \end{macro}^^A \if at svg@tempswa
-% \end{macro}^^A \svg at box
 % \end{macro}^^A \svg at tempb
 % \end{macro}^^A \svg at tempa
 %
+%
+%
+% \subsubsection{Macros for process control}
+%
+% \begin{macro}{\svg at ifwindowsdetected}
+% Do some Windows specific stuff if it was detected.
+%    \begin{macrocode}
+\newcommand*\svg at ifwindowsdetected{\@secondoftwo}
+\AfterPackage*{ifplatform}{%
+  \renewcommand*\svg at ifwindowsdetected{%
+    \ifwindows%
+      \expandafter\@firstoftwo%
+    \else%
+      \expandafter\@secondoftwo%
+    \fi%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at ifwindowsdetected
+% \begin{macro}{\svg at ifvalueisrelax}
+% For some keys the usage of \val{\cs{relax}} as a value should lead to a 
+% special reaction, such as restoring to default behavior or reseting the key.
+% Therefore, \cs{svg at ifvalueisrelax} checks, whether \val{\cs{relax}} was used
+% as value or not.
+%    \begin{macrocode}
+\newcommand*\svg at ifvalueisrelax[1]{%
+  \begingroup%
+    \def\svg at tempa{#1}%
+    \def\svg at tempb{\relax}%
+    \ifx\svg at tempa\svg at tempb%
+      \aftergroup\@firstoftwo%
+    \else%
+      \aftergroup\@secondoftwo%
+    \fi%
+  \endgroup%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at ifvalueisrelax
+%
 % \iffalse
-%</base>
+%</main>
+%<*extract>
 % \fi
 %
+% \begin{macro}{\svgx at ifkeyandval}
+% \begin{macro}{\svgx@@ifkeyandval}
+% It is checked whether a key was given as \val{\meta{key}=\meta{value}} or 
+% like \val{\meta{key}=\{\meta{format}=\meta{value}\}}.
+%    \begin{macrocode}
+\newcommand*\svgx@@ifkeyandval{}
+\newcommand*\svgx at ifkeyandval[3]{%
+  \def\svgx@@ifkeyandval##1=##2=##3\@nil{\IfArgIsEmpty{##3}{#3}{#2}}%
+  \svgx@@ifkeyandval#1==\@nil%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svgx@@ifkeyandval
+% \end{macro}^^A \svgx at ifkeyandval
 %
+% \iffalse
+%</extract>
+%<*main>
+% \fi
+%
+%
+%
+% \subsubsection{String manipulation}
+%
+% Both packages \pkg{svg} and \pkg{svg-extract} should be able to handle 
+% user-defined input and output paths. As there is the possibility for users to 
+% provide paths with or without quotes to \LaTeX{}, this is taken into account.
+%
+% \begin{macro}{\svg at deactivate@dq}
+% \changes{v2.02}{2018/09/07}{new}^^A
+% \changes{v2.02a}{2018/10/17}{bug fix for \pkg{polyglossia}}^^A
+% In order to avoid errors concerning file names with package \pkg{babel} and 
+% it's active double quotes, this command is defined. 
+%    \begin{macrocode}
+\newcommand*\svg at deactivate@dq{}
+\AfterPackage+{babel}{%
+  \renewcommand*\svg at deactivate@dq{\bbl at deactivate{"}}%
+  \providecommand*\bbl at deactivate[1]{}%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at deactivate@dq
+% \begin{macro}{\svg at sanitize@dq}
+% \changes{v2.02}{2018/09/07}{new}^^A
+% Save expansion of the second argument in the macro from the first argument 
+% with deactivated double quotes.
+%    \begin{macrocode}
+\newcommand*\svg at sanitize@dq[2]{%
+  \begingroup%
+    \svg at deactivate@dq%
+    \edef\svg at tempa{\endgroup\def\noexpand#1{#2}}%
+  \svg at tempa%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at sanitize@dq
+% \begin{macro}{\svg at quotes@check}
+% \begin{macro}{\svg at quotes@@check}
+% \begin{macro}{\if at svg@quotes at found}
+% During the treatment of paths, it may be necessary to temporarily remove 
+% quotes and, if required, add them again later. For this purpose, the switch 
+% \cs{if at svg@quotes at found} as well as the commands \cs{svg at quotes@check} and
+% \cs{svg at quotes@@check}, which controls the switch, are defined. As before, 
+% the string is passed in a macro to \cs{svg at quotes@check}.
+%    \begin{macrocode}
+\newif\if at svg@quotes at found
+\newcommand*\svg at quotes@check[1]{%
+  \expandafter\svg at quotes@@check#1"\@nil%
+}
+\newcommand*\svg at quotes@@check{}
+\def\svg at quotes@@check#1"#2\@nil{%
+  \IfArgIsEmpty{#2}{\@svg at quotes@foundfalse}{\@svg at quotes@foundtrue}%
+}
+%    \end{macrocode}
+% \end{macro}^^A \if at svg@quotes at found
+% \end{macro}^^A \svg at quotes@@check
+% \end{macro}^^A \svg at quotes@check
+% \begin{macro}{\svg at quotes@remove}
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at sanitize@dq}}^^A
+% \changes{v2.02}{2018/09/07}{calling \cs{svg at quotes@check}}^^A
+% \begin{macro}{\svg at quotes@@remove}
+% These two commands are used to remove all occurring quotes within a string. 
+% The only argument passed to \cs{svg at quotes@remove} is not the string itself
+% but a macro in which a string is stored.
+%    \begin{macrocode}
+\newcommand*\svg at quotes@remove[2][]{%
+  \begingroup%
+    \IfArgIsEmpty{#1}{\def\svg at tempb{#2}}{\def\svg at tempb{#1}}%
+    \svg at sanitize@dq\svg at tempa{\svg at tempb}%
+    \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
+    \expandafter\svg at quotes@@remove\svg at tempa""\@nil%
+    \edef\svg at tempb{%
+      \endgroup%
+      \def\noexpand#2{\svg at tempa}%
+      \if at svg@quotes at found%
+        \noexpand\@svg at quotes@foundtrue%
+      \else%
+        \noexpand\@svg at quotes@foundfalse%
+      \fi%
+    }%
+  \svg at tempb%
+}
+\newcommand*\svg at quotes@@remove{}
+\def\svg at quotes@@remove#1"#2"#3\@nil{%
+  \IfArgIsEmpty{#2}{%
+    \edef\svg at tempa{#1}%
+  }{%
+    \svg at quotes@@remove#1#2#3""\@nil%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at quotes@@remove
+% \end{macro}^^A \svg at quotes@remove
+% \begin{macro}{\svg at remove@leadingchar}
+% \changes{v2.02}{2018/09/07}{new}^^A
+% This command removes the single character in given with the first argument 
+% from the expanded macro in the second argument.
+%    \begin{macrocode}
+\newcommand*\svg at remove@leadingchar[2]{%
+  \begingroup%
+    \svg at sanitize@dq\svg at tempa{#2}%
+    \def\svg at tempb{%
+      \def\svg at tempa####1\@nil{\def\svg at tempa{####1}}%
+      \kernel at ifnextchar#1%
+        {\expandafter\svg at tempa\@gobble}%
+        {\svg at tempa}%
+    }%
+    \expandafter\svg at tempb\svg at tempa\@nil%
+    \edef\svg at tempb{%
+      \endgroup%
+      \def\noexpand#2{\svg at tempa}%
+    }%
+  \svg at tempb%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at remove@leadingchar
+%
+%
+%
+% \subsubsection{File handling}
+%
+% \begin{macro}{\svg at filename@parse}
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at sanitize@dq}}^^A
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at remove@leadingchar}}^^A
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at extension@parse}}^^A
+% As the internal \LaTeX{} command \cs{filename at parse} is not able to split a 
+% given file name containing quotes, \cs{svg at filename@parse} is defined to 
+% resolve this problem. The optional argument can be used to give a specific 
+% file extension, which should be searched within \cs{filename at ext}. If found 
+% at the very end, the previous part is appended to \cs{filename at base}.
+%    \begin{macrocode}
+\newcommand*\svg at filename@parse[2][]{%
+  \begingroup%
+%    \end{macrocode}
+% The given path and file is parsed with \cs{filename at parse}.
+%    \begin{macrocode}
+    \svg at sanitize@dq\svg at tempa{#2}%
+    \expandafter\filename at parse\expandafter{\svg at tempa}%
+% If there are quotes in the file path, the closing one will be found as first 
+% character in \cs{filename at base} as \cs{filename at area} is splitted at the last
+% slash. This leading quote is removed from \cs{filename at base} with 
+% \cs{svg at remove@leadingchar}.
+%    \begin{macrocode}
+    \svg at quotes@remove{\filename at area}%
+    \if at svg@quotes at found%
+      \edef\filename at area{"\filename at area"}%
+      \svg at remove@leadingchar"\filename at base%
+    \fi%
+%    \end{macrocode}
+% The found extension is parsed against the optional argument. If a double quote
+% was found within the extension, it actually belongs to \cs{filename at base}.
+%    \begin{macrocode}
+    \ifx\filename at ext\relax\else%
+      \svg at quotes@remove{\filename at ext}%
+      \svg at extension@parse{#1}%
+      \if at svg@quotes at found%
+        \edef\filename at base{\filename at base"}%
+      \fi%
+    \fi%
+%    \end{macrocode}
+% Quotes within \cs{filename at base} are normalized.
+%    \begin{macrocode}
+    \svg at quotes@remove{\filename at base}%
+    \if at svg@quotes at found%
+      \edef\filename at base{"\filename at base"}%
+    \fi%
+%    \end{macrocode}
+% With \cs{svg at tempa} the group is closed and the results are saved in the
+% macros \cs{filename@\dots}.
+%    \begin{macrocode}
+    \edef\svg at tempa{%
+      \endgroup%
+      \def\noexpand\filename at area{\filename at area}%
+      \def\noexpand\filename at base{\filename at base}%
+      \ifx\filename at ext\relax%
+        \let\noexpand\filename at ext\noexpand\relax%
+      \else%
+        \def\noexpand\filename at ext{\filename at ext}%
+      \fi%
+    }%
+  \svg at tempa%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at filename@parse
+% \begin{macro}{\svg at extension@parse}
+% \changes{v2.02}{2018/09/07}{new}^^A
+% \begin{macro}{\svg at extension@@parse}
+% \changes{v2.02}{2018/09/07}{new}^^A
+% These macros are used to permit multiple dots in file names. The content of 
+% \cs{filename at ext} is split at each occurence of \val{.} and the trailing part 
+% is compared against the content of the argument of \cs{svg at extension@parse}, 
+% which is probably \cs{svg at file@ext}. If they are equal, the previous part is 
+% appended to \cs{filename at base} and \cs{filename at ext} is set to the content of 
+% the first argument.
+%    \begin{macrocode}
+\newcommand*\svg at extension@parse[1]{%
+  \IfArgIsEmpty{#1}{}{%
+    \@expandtwoargs\Ifstr%
+      {\detokenize\expandafter{\filename at ext}}{\detokenize\expandafter{#1}}{}{%
+      \begingroup%
+%    \end{macrocode}
+% Macro \cs{svg at tempa} is used to temporarily store anything before the 
+% searched extension at the end of \cs{filename at ext} and \cs{svg at tempb} is set
+% to the actual searched extension if found.
+%    \begin{macrocode}
+        \edef\svg at tempa{%
+          \def\noexpand\svg at tempa{}%
+          \let\noexpand\svg at tempb\relax%
+          \noexpand\svg at extension@@parse%
+            \filename at ext.\noexpand\@nil#1\noexpand\@nil%
+        }%
+        \svg at tempa%
+        \edef\svg at tempa{%
+          \endgroup%
+%    \end{macrocode}
+% If the trailing extension was found, \cs{filename at base} and \cs{filename at ext} 
+% are adopted.
+%    \begin{macrocode}
+          \def\noexpand\filename at base{\filename at base\svg at tempa}%
+          \ifx\svg at tempb\relax%
+            \let\noexpand\filename at ext\relax%
+          \else%
+            \def\noexpand\filename at ext{\svg at tempb}%
+          \fi%
+        }%
+      \svg at tempa%
+    }%
+  }%
+}
+%    \end{macrocode}
+% Macro \cs{svg at extension@@parse} is recursively called as long as there are 
+% any dots or the searched extension is found.
+%    \begin{macrocode}
+\newcommand*\svg at extension@@parse{}
+\def\svg at extension@@parse#1.#2\@nil#3\@nil{%
+  \edef\svg at tempa{\svg at tempa.#1}%
+  \IfArgIsEmpty{#2}{}{%
+    \Ifstr{\detokenize{#2}}{\detokenize{#3.}}{%
+%    \end{macrocode}
+% If the trailing extension is found, \cs{svg at tempb} is definied.
+%    \begin{macrocode}
+      \edef\svg at tempb{#3}%
+    }{%
+      \svg at extension@@parse#2\@nil#3\@nil%
+    }%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at extension@@parse
+% \end{macro}^^A \svg at extension@parse
+% \begin{macro}{\svg at iffilenewer}
+% \changes{v2.02d}{2019/10/22}{use \cs{filemoddate} with Xe\LaTeX, see
+%   \url{https://github.com/mrpiggi/svg/issues/12}}^^A
+% The macro \cs{svg at iffilenewer} is used to decide, whether the export with 
+% \app{Inkscape} is necessary due to an updated SVG~file. This can only be
+% done, if \cs{pdf at filemoddate} or \cs{filemoddate} is definied.
+% \ToDo{\cs{svg at iffilenewer} instead \cs{IfFileExists} to check results}[v2.03]
+%    \begin{macrocode}
+\newcommand*\svg at iffilenewer[2]{\@gobbletwo}
+\ifx\pdf at filemoddate\@undefined
+  \ifx\filemoddate\@undefined\else
+    \ifx\strcmp\@undefined\else
+      \renewcommand*\svg at iffilenewer[2]{%
+        \begingroup%
+          \edef\svg at tempa{\filemoddate{#1}}%
+          \edef\svg at tempb{\filemoddate{#2}}%
+          \ifnum\strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
+            \aftergroup\@firstoftwo%
+          \else%
+            \aftergroup\@secondoftwo%
+          \fi%
+        \endgroup%
+      }%
+    \fi
+  \fi
+\else
+  \ifx\pdf at strcmp\@undefined\else
+    \renewcommand*\svg at iffilenewer[2]{%
+      \begingroup%
+        \edef\svg at tempa{\pdf at filemoddate{#1}}%
+        \edef\svg at tempb{\pdf at filemoddate{#2}}%
+        \ifnum\pdf at strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
+          \aftergroup\@firstoftwo%
+        \else%
+          \aftergroup\@secondoftwo%
+        \fi%
+      \endgroup%
+    }%
+  \fi
+\fi
+%    \end{macrocode}
+% \end{macro}^^A \svg at iffilenewer
+% \begin{macro}{\svg at shell@mkdir}
+% \begin{macro}{\svg at shell@@mkdir}
+% \begin{macro}{\svg at shell@mv}
+% \begin{macro}{\svg at shell@@mv}
+% \begin{macro}{\svg at shell@rm}
+% \begin{macro}{\svg at shell@@rm}
+% Finally, platform dependend macros for creating directories as well as 
+% moving and deleting files are provided.
+%    \begin{macrocode}
+\newcommand*\svg at shell@mkdir[1]{%
+  \begingroup%
+%    \end{macrocode}
+% A directory should only be created, if it isn't the current working directory.
+%    \begin{macrocode}
+    \svg at quotes@remove[{#1}]{\svg at tempa}%
+    \@svg at tempswatrue%
+    \Ifstr{\svg at tempa}{}{\@svg at tempswafalse}{%
+    \Ifstr{\svg at tempa}{./}{\@svg at tempswafalse}{%
+    }}%
+    \if at svg@tempswa%
+      \ShellEscape{\svg at shell@@mkdir{\svg at tempa}}%
+    \fi%
+  \endgroup%
+}
+\newcommand*\svg at shell@mv[2]{%
+  \ShellEscape{\svg at shell@@mv\space"#1"\space"#2"}%
+}
+\newcommand*\svg at shell@rm[1]{%
+  \ShellEscape{\svg at shell@@rm\space"#1"}%
+}
+%    \end{macrocode}
+% The platform dependent commands for file access. 
+%    \begin{macrocode}
+\svg at ifwindowsdetected{%
+  \newcommand*\svg at shell@@mkdir[1]{if not exist "#1" mkdir "#1"}%
+  \newcommand*\svg at shell@@mv{move}%
+  \newcommand*\svg at shell@@rm{del}%
+}{%
+  \newcommand*\svg at shell@@mkdir[1]{mkdir -p "#1"}%
+  \newcommand*\svg at shell@@mv{mv}%
+  \newcommand*\svg at shell@@rm{rm}%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at shell@@rm
+% \end{macro}^^A \svg at shell@rm
+% \end{macro}^^A \svg at shell@@mv
+% \end{macro}^^A \svg at shell@mv
+% \end{macro}^^A \svg at shell@@mkdir
+% \end{macro}^^A \svg at shell@mkdir
+% \begin{macro}{\svg at normalize@path}
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at deactivate@dq}}^^A
+% \begin{macro}{\svg at normalize@@path}
+% If any path is given, a trailing slash is needed. These two macros ensure
+% that this condition is fulfilled in any case, even if this is not considered
+% by the user. As before, a macro containing the path string is passed to 
+% \cs{svg at normalize@path}.
+%    \begin{macrocode}
+\newcommand*\svg at normalize@path[1]{%
+  \begingroup%
+    \svg at quotes@remove[{#1}]{\svg at tempa}%
+    \ifx\svg at tempa\@empty\relax%
+      \def\svg at tempa{./}%
+    \fi%
+    \expandafter\svg at normalize@@path\svg at tempa//\@nil%
+    \edef\svg at tempb{%
+      \endgroup%
+      \if at svg@quotes at found%
+        \def\noexpand#1{"\svg at tempa"}%
+      \else%
+        \def\noexpand#1{\svg at tempa}%
+      \fi%
+    }%
+  \svg at tempb%
+}
+\newcommand*\svg at normalize@@path{}
+\def\svg at normalize@@path#1/#2/\@nil{%
+  \IfArgIsEmpty{#2}{%
+    \IfArgIsEmpty{#1}{\def\svg at tempa{}}{\def\svg at tempa{#1/}}%
+  }{%
+    \svg at normalize@@path#2/\@nil%
+    \edef\svg at tempa{#1/\svg at tempa}%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at normalize@@path
+% \end{macro}^^A \svg at normalize@path
+%
+% \iffalse
+%</main>
+%<*extract>
+% \fi
+%
+%
+%
+% \subsubsection{List handling}
+%
+% \begin{macro}{\svgx at ifinlist}
+% Check, if the first argument is included in a comma-separated list in the 
+% second argument. Keep in mind that the first argument is not expanded at all, 
+% the second one exactly once. 
+%    \begin{macrocode}
+\newcommand*\svgx at ifinlist[2]{%
+  \begingroup%
+    \def\svg at tempa##1,#1,##2\@nil{%
+      \IfArgIsEmpty{##2}{%
+        \aftergroup\@secondoftwo%
+      }{%
+        \aftergroup\@firstoftwo%
+      }%
+    }%
+    \expandafter\svg at tempa\expandafter,#2,#1,\@nil%
+  \endgroup%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svgx at ifinlist
+%
+% \iffalse
+%</extract>
+%</package&base>
+%<*package&option>
+% \fi
+%
+%
+%
 % \section{Including SVG files with package \pkg{svg}}
 % \subsection{Options}
 %
 % All options, which can be set either as package options or with 
 % \cs{svgsetup}, as well as the optional parameters for both user commands 
-% \cs{includesvg}\oarg{parameters}\marg{svg filename} and
-% \cs{includeinkscape}\oarg{parameters}\marg{graphic filename} are defined with
+% \cs{includesvg}\oarg{parameters}\marg{svg~filename} and
+% \cs{includeinkscape}\oarg{parameters}\marg{graphic~filename} are defined with
 % the interface provided by package \pkg{scrbase}.
 %    \begin{macrocode}
 \DefineFamily{SVG}
@@ -1371,8 +1919,7 @@
 %
 % \iffalse
 %</package&option>
-%<*package&base>
-%<*option>
+%<*package&option&main>
 % \fi
 %
 % \begin{macro}{\svg at deprecated@key}
@@ -1383,7 +1930,7 @@
 %    \begin{macrocode}
 \newcommand*\svg at deprecated@key[3][svg]{%
   \PackageWarning{#1}{%
-    The option key `#2' is deprecated.\MessageBreak%
+    The option key `#2' is deprecated. \MessageBreak%
     It's recommended to use `#3'\MessageBreak%
     instead%
   }%
@@ -1394,7 +1941,7 @@
 %
 % Within the exported \LaTeX~files of \app{Inkscape}, some commands are used 
 % out of additional packages. But maybe the user doesn't want to load this 
-% packages anyways.
+% packages anyhow.
 %
 % \begin{option}{usexcolor}
 % \changes{v2.00}{2017/02/17}{new}^^A
@@ -1435,6 +1982,15 @@
       \PackageWarning{svg}{Package `transparent' was loaded anyway}%
     }%
   \fi%
+%    \end{macrocode}
+% There is an issue\footnote{\url{https://github.com/ho-tex/oberdiek/issues/62}}
+% with package \pkg{transparent}, which currently implements an \emph{invalid} 
+% check relying on internal commands of package \pkg{pgfsys}, whereas these
+% have changed in the latest version.
+%    \begin{macrocode}
+  \AfterPackage*{transparent}{%
+    \@ifpackagelater{transparent}{2018/11/19}{}{\RequirePackage{pgfsys}}%
+  }%
 }
 %    \end{macrocode}
 % \end{macro}^^A \if at svg@use at transparent
@@ -1467,12 +2023,12 @@
 %    \begin{macrocode}
 \newcommand*\svg at ink@mode{}
 \DefineFamilyKey{SVG}{inkscape}[true]{%
-  \lowercase{\svg at sanitize@dq\svg at tempb{#1}}%
+  \svg at sanitize@dq\svg at tempb{#1}%
   \FamilySetNumerical{SVG}{inkscape}{svg at tempa}{%
     {false}{0},{off}{0},{no}{0},%
-    {true}{1},{on}{1},{yes}{1},{onlynewer}{1},{newer}{1},%
-    {force}{2},{forced}{2},{overwrite}{2},%
-    {pdf}{3},{eps}{4},{ps}{5},{png}{6},%
+    {true}{1},{on}{1},{yes}{1},{auto}{1},{onlynewer}{1},{newer}{1},%
+    {forced}{2},{force}{2},{overwrite}{2},%
+    {pdf}{3},{PDF}{3},{eps}{4},{EPS}{4},{ps}{5},{PS}{5},{png}{6},{PNG}{6},%
     {drawing}{7},{crop}{7},%
     {page}{8},{nocrop}{8},%
     {tex}{9},{latex}{9},{exportlatex}{9},{latexexport}{9},%
@@ -1520,7 +2076,7 @@
 % In version~v1.0 the option \opt{inkscape} was used to set both the executable 
 % and options for \app{Inkscape}. This is taken into account here.
 %    \begin{macrocode}
-    \ifx\FamilyKeyState\FamilyKeyStateProcessed\else%
+    \ifx\FamilyKeyState\FamilyKeyStateProcessed\else% legacy option
 %    \end{macrocode}
 % Splitting executable from options with delimitted macros. After calling 
 % \cs{svg at tempa} with the given value, the part for the executable is stored in 
@@ -1529,7 +2085,7 @@
 %    \begin{macrocode}
       \svg at quotes@remove[{#1}]{\svg at tempb}%
       \def\svg at tempa##1-##2\@nil{%
-        \IfArgIsEmpty{##2}{\def\svg at tempb{}}{%
+        \IfArgIsEmpty{##2}{\let\svg at tempb\@empty}{%
           \def\svg at tempa####1-\@nil{\def\svg at tempb{-####1}}%
           \svg at tempa##2\@nil%
         }%
@@ -1591,7 +2147,7 @@
 % \begin{option}{inkscapeopt}
 % \changes{v2.00}{2017/02/17}{new}^^A
 % \begin{macro}{\svg at ink@opt}
-% With these options, the terminal command for invoking \app{Inkscape} as well 
+% With these options, the executed command for invoking \app{Inkscape} as well 
 % as additional options can be defined.
 % \ToDo{rename \cs{svg at ink@ver} > \cs{svg at ink@ver at val} (keep former cs)?}[v2.03]
 %    \begin{macrocode}
@@ -1660,10 +2216,9 @@
   \renewcommand*\svg at ink@format{eps}
 \fi\fi
 \DefineFamilyKey{SVG}{inkscapeformat}{%
-  \lowercase{\def\svg at tempa{#1}}%
   \FamilySetNumerical{SVG}{inkscapeformat}{svg at tempa}{%
-    {pdf}{0},{eps}{1},{ps}{2},{png}{3}%
-  }{\svg at tempa}%
+    {pdf}{0},{PDF}{0},{eps}{1},{EPS}{1},{ps}{2},{PS}{2},{png}{3},{PNG}{3}%
+  }{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
     \ifcase\svg at tempa\relax% latex
       \renewcommand*\svg at ink@format{pdf}%
@@ -1750,7 +2305,7 @@
 % \end{option}^^A inkscapedpi
 % \begin{macro}{\svg at ink@cmd}
 % \changes{v2.02f}{2020/05/06}{distinguish \app{Inkscape}~CLI versions}^^A
-% The actual call of the \app{Inkscape} command~line~interface.
+% The actual usage of the \app{Inkscape} command~line~interface.
 %    \begin{macrocode}
 \newcommand*\svg at ink@cmd[2]{%
   \svg at ink@exe\space"#1.\svg at file@ext"\space\svg at ink@area\space%
@@ -1821,23 +2376,16 @@
 %
 %
 %
-% \subsubsection{Setting output folder}
+% \subsubsection{Setting output folder and file}
 %
 % \begin{option}{inkscapepath}
 % \changes{v2.00}{2017/02/17}{new}^^A
 % \changes{v2.02}{2018/09/07}{usage of \cs{svg at sanitize@dq}}^^A
-% \begin{option}{inkscapename}
-% \changes{v2.00}{2017/02/17}{new}^^A
 % \begin{macro}{\svg at out@path}
-% \begin{macro}{\svg at out@name}
-% \begin{macro}{\svg at out@base}
 % The option \opt{inkscapepath} controls, in which folder the results of the
-% \app{Inkscape} export will be located. With option \opt{inkscapename} the 
-% name of the exported file itself can be changed.
+% \app{Inkscape} export will be located.
 %    \begin{macrocode}
 \newcommand*\svg at out@path{}
-\newcommand*\svg at out@name{\svg at file@name\svg at file@suffix}
-\newcommand*\svg at out@base{\svg at out@path\svg at out@name.\svg at ink@format}
 \DefineFamilyKey{SVG}{inkscapepath}{%
   \svg at sanitize@dq\svg at tempb{#1}%
   \FamilySetNumerical{SVG}{inkscapepath}{svg at tempa}{%
@@ -1862,6 +2410,17 @@
     \FamilyKeyStateProcessed%
   \fi%
 }
+%    \end{macrocode}
+% \end{macro}^^A \svg at out@path
+% \end{option}^^A inkscapepath
+% \begin{option}{inkscapename}
+% \changes{v2.00}{2017/02/17}{new}^^A
+% \begin{macro}{\svg at out@name}
+% \begin{macro}{\svg at out@base}
+% With option \opt{inkscapename} the name of the exported file can be changed.
+%    \begin{macrocode}
+\newcommand*\svg at out@name{\svg at file@name\svg at file@suffix}
+\newcommand*\svg at out@base{\svg at out@path\svg at out@name.\svg at ink@format}
 \DefineFamilyKey{SVG}{inkscapename}{%
   \renewcommand*\svg at out@name{#1\svg at file@suffix}%
   \FamilyKeyStateProcessed%
@@ -1869,9 +2428,7 @@
 %    \end{macrocode}
 % \end{macro}^^A \svg at out@base
 % \end{macro}^^A \svg at out@name
-% \end{macro}^^A \svg at out@path
 % \end{option}^^A inkscapename
-% \end{option}^^A inkscapepath
 %
 %
 %
@@ -1933,9 +2490,9 @@
   \FamilySetBool{SVG}{keepaspectratio}{@svg at tempswa}{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
     \if at svg@tempswa%
-      \FamilyOptions{SVG}{distort=false}%
-    \else
-      \FamilyOptions{SVG}{distort=true}%
+      \FamilyExecuteOptions[.svg.sty]{SVG}{distort=false}%
+    \else%
+      \FamilyExecuteOptions[.svg.sty]{SVG}{distort=true}%
     \fi%
   \fi%
 }
@@ -2013,7 +2570,7 @@
 % from the PDF~file. 
 %    \begin{macrocode}
 \newcounter{svg at param@lastpage}
-\DefineFamilyKey{SVG}{lastpage}{%
+\DefineFamilyKey{SVG}{lastpage}[true]{%
   \FamilySetNumerical{SVG}{lastpage}{svg at tempa}{%
     {false}{0},{off}{0},{no}{0},{ignore}{0},%
     {true}{1},{on}{1},{yes}{1},{auto}{1}%
@@ -2037,518 +2594,36 @@
 %    \begin{macrocode}
 \newif\if at svg@draft
 \FamilyBoolKey{SVG}{draft}{@svg at draft}
-\AtBeginDocument{\if at svg@draft\else\ifGin at draft\@svg at drafttrue\fi\fi}
+\AfterPackage*{graphicx}{\ifGin at draft\@svg at drafttrue\fi}
 %    \end{macrocode}
 % \end{macro}^^A \if at svg@draft
 % \end{option}^^A draft
 %
+% \iffalse
+%</package&option&main>
+% \fi
 %
 %
-% \subsection{Handling path information}
 %
-% Both packages \pkg{svg} and \pkg{svg-extract} should be able to handle 
-% user-defined input and output paths. As there is the possibility for users to 
-% provide paths with or without quotes to \LaTeX, this is taken into account.
+% \subsection{User commands}
+% \subsubsection{Optional parameters for user commands}
 %
-% \begin{macro}{\svg at deactivate@dq}
-% \changes{v2.02}{2018/09/07}{new}^^A
-% \changes{v2.02a}{2018/10/17}{bug fix for \pkg{polyglossia}}^^A
-% In order to avoid errors concerning file names with package \pkg{babel} and 
-% it's active double quotes, this command is defined. 
+% The family member is defined for both \pkg{svg} and \pkg{svg-extract}.
 %    \begin{macrocode}
-\newcommand*\svg at deactivate@dq{}
-\AfterPackage+{babel}{%
-  \renewcommand*\svg at deactivate@dq{\bbl at deactivate{"}}%
-  \providecommand*\bbl at deactivate[1]{}%
-}
+%<*package&body>
+\DefineFamilyMember[.param]{SVG}
+%</package&body>
 %    \end{macrocode}
-% \end{macro}^^A \svg at deactivate@dq
-% \begin{macro}{\svg at sanitize@dq}
-% \changes{v2.02}{2018/09/07}{new}^^A
-% Save expansion of the second argument in the macro from teh first argument 
-% with deactivated double quotes.
-%    \begin{macrocode}
-\newcommand*\svg at sanitize@dq[2]{%
-  \begingroup%
-    \svg at deactivate@dq%
-    \edef\svg at tempa{\endgroup\def\noexpand#1{#2}}%
-  \svg at tempa%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at sanitize@dq
-% \begin{macro}{\svg at quotes@remove}
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at sanitize@dq}}^^A
-% \changes{v2.02}{2018/09/07}{calling \cs{svg at quotes@check}}^^A
-% \begin{macro}{\svg at quotes@@remove}
-% These two commands are used to remove all occurring quotes within a string. 
-% The only argument passed to \cs{svg at quotes@remove} is not the string itself
-% but a macro in which a string is stored.
-%    \begin{macrocode}
-\newcommand*\svg at quotes@remove[2][]{%
-  \begingroup%
-    \IfArgIsEmpty{#1}{\def\svg at tempb{#2}}{\def\svg at tempb{#1}}%
-    \svg at sanitize@dq\svg at tempa{\svg at tempb}%
-    \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
-    \expandafter\svg at quotes@@remove\svg at tempa""\@nil%
-    \edef\svg at tempb{%
-      \endgroup%
-      \def\noexpand#2{\svg at tempa}%
-      \if at svg@quotes at found%
-        \noexpand\@svg at quotes@foundtrue%
-      \else%
-        \noexpand\@svg at quotes@foundfalse%
-      \fi%
-    }%
-  \svg at tempb%
-}
-\newcommand*\svg at quotes@@remove{}
-\def\svg at quotes@@remove#1"#2"#3\@nil{%
-  \IfArgIsEmpty{#2}{%
-    \edef\svg at tempa{#1}%
-  }{%
-    \svg at quotes@@remove#1#2#3""\@nil%
-  }%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at quotes@@remove
-% \end{macro}^^A \svg at quotes@remove
-% \begin{macro}{\svg at quotes@check}
-% \begin{macro}{\svg at quotes@@check}
-% \begin{macro}{\if at svg@quotes at found}
-% During the treatment of paths, it may be necessary to temporarily remove 
-% quotes and, if required, add them again later. For this purpose, the switch 
-% \cs{if at svg@quotes at found} as well as the commands \cs{svg at quotes@check} and
-% \cs{svg at quotes@@check}, which controls the switch, are defined. As before, 
-% the string is passed in a macro to \cs{svg at quotes@check}.
-%    \begin{macrocode}
-\newif\if at svg@quotes at found
-\newcommand*\svg at quotes@check[1]{%
-  \expandafter\svg at quotes@@check#1"\@nil%
-}
-\newcommand*\svg at quotes@@check{}
-\def\svg at quotes@@check#1"#2\@nil{%
-  \IfArgIsEmpty{#2}{\@svg at quotes@foundfalse}{\@svg at quotes@foundtrue}%
-}
-%    \end{macrocode}
-% \end{macro}^^A \if at svg@quotes at found
-% \end{macro}^^A \svg at quotes@@check
-% \end{macro}^^A \svg at quotes@check
-% \begin{macro}{\svg at remove@leadingchar}
-% \changes{v2.02}{2018/09/07}{new}^^A
-% This command removes the single character in given with the first argument 
-% from the expanded macro in the second argument.
-%    \begin{macrocode}
-\newcommand*\svg at remove@leadingchar[2]{%
-  \begingroup%
-    \svg at sanitize@dq\svg at tempa{#2}%
-    \def\svg at tempb{%
-      \def\svg at tempa####1\@nil{\def\svg at tempa{####1}}%
-      \kernel at ifnextchar#1%
-        {\expandafter\svg at tempa\@gobble}%
-        {\svg at tempa}%
-    }%
-    \expandafter\svg at tempb\svg at tempa\@nil%
-    \edef\svg at tempb{%
-      \endgroup%
-      \def\noexpand#2{\svg at tempa}%
-    }%
-  \svg at tempb%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at remove@leadingchar% 
-% \begin{macro}{\svg at set@input at path}
-% \changes{v2.01}{2017/11/28}{new}^^A
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at deactivate@dq}}^^A
-% \begin{macro}{\svg at append@input at path}
-% \changes{v2.01}{2017/11/28}{new}^^A
-% \changes{v2.02}{2018/09/07}{avoid duplicates in \cs{input at path}}^^A
-% In order to import SVG~files from different folders, \cs{svg at set@input at path}
-% evaluates several macros, which are supposed to be used for holding different 
-% search folders. Any given path will be handled by \cs{svg at normalize@path}.
-% The optional argument can be used to append an additional search path.
-%    \begin{macrocode}
-\newcommand*\svg at set@input at path[1][]{%
-  \begingroup%
-    \svg at deactivate@dq%
-%    \end{macrocode}
-% If a path was already found and stored within \cs{svg at file@path}, it is
-% searched first and wrapped in curly braces. This is necessary for using
-% commands like \cs{input}\marg{tex filename} within SVG~files.
-%    \begin{macrocode}
-    \ifx\svg at file@path\@empty\else%
-      \svg at normalize@path{\svg at file@path}%
-      \edef\svg at file@path{{\svg at file@path}}%
-    \fi%
-%    \end{macrocode}
-% Afterwards, several search paths are appended. If \cs{svgpath} was used, it 
-% is searched next. If nothing was found, \cs{graphicspath} is considered if 
-% defined followed by a path given in the third argument. If nothing was found
-% yet, the standard \cs{input at path} is searched last.
-%    \begin{macrocode}
-    \svg at append@input at path{\svg at file@path}{\svg at input@path}%
-    \svg at append@input at path{\svg at file@path}{\Ginput at path}%
-    \IfArgIsEmpty{#1}{}{\svg at append@input at path{\svg at file@path}{{#1}}}%
-    \svg at append@input at path{\svg at file@path}{\input at path}%
-%    \end{macrocode}
-% Finally, \cs{input at path} is set.
-%    \begin{macrocode}
-    \edef\svg at tempa{%
-      \endgroup%
-      \ifx\svg at file@path\@empty\else%
-        \def\noexpand\input at path{\svg at file@path}%
-      \fi%
-    }%
-  \svg at tempa%
-}
-%    \end{macrocode}
-% Only, if a certain search path is defined, it is added. The paths given in 
-% the first argument are compared to each path in the second argument and only 
-% new ones are added.
-%    \begin{macrocode}
-\newcommand*\svg at append@input at path[2]{%
-  \ifx#2\@undefined\else%
-    \edef\svg at tempb{#2}%
-    \expandafter\@tfor\expandafter\svg at tempa\expandafter:\expandafter=%
-        \svg at tempb\do{%
-%    \end{macrocode}
-% Passing each new path to \cs{svg at normalize@path}. If a path already exists, 
-% switch \cs{if at svg@tempswa} is set to \val{false}.
-%    \begin{macrocode}
-      \ifx\svg at tempa\@empty\else%
-        \@svg at tempswatrue%
-        \svg at normalize@path{\svg at tempa}%
-        \expandafter\@tfor\expandafter\svg at tempb\expandafter:\expandafter=%
-            #1\do{%
-          \ifx\svg at tempa\svg at tempb%
-            \@svg at tempswafalse%
-            \@break at tfor%
-          \fi%
-        }%
-        \if at svg@tempswa%
-          \edef#1{#1{\svg at tempa}}%
-        \fi%
-      \fi%
-    }%
-  \fi%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at append@input at path
-% \end{macro}^^A \svg at set@input at path
-% \begin{macro}{\svg at normalize@path}
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at deactivate@dq}}^^A
-% \begin{macro}{\svg at normalize@@path}
-% If any path is given, a trailing slash is needed. These two macros ensure
-% that this condition is fulfilled in any case, even if this is not considered
-% by the user. As before, a macro containing the path string is passed to 
-% \cs{svg at normalize@path}.
-%    \begin{macrocode}
-\newcommand*\svg at normalize@path[1]{%
-  \begingroup%
-    \svg at quotes@remove[{#1}]{\svg at tempa}%
-    \ifx\svg at tempa\@empty\relax%
-      \def\svg at tempa{./}%
-    \fi%
-    \expandafter\svg at normalize@@path\svg at tempa//\@nil%
-    \edef\svg at tempb{%
-      \endgroup%
-      \if at svg@quotes at found%
-        \def\noexpand#1{"\svg at tempa"}%
-      \else%
-        \def\noexpand#1{\svg at tempa}%
-      \fi%
-    }%
-  \svg at tempb%
-}
-\newcommand*\svg at normalize@@path{}
-\def\svg at normalize@@path#1/#2/\@nil{%
-  \IfArgIsEmpty{#2}{%
-    \IfArgIsEmpty{#1}{\def\svg at tempa{}}{\def\svg at tempa{#1/}}%
-  }{%
-    \svg at normalize@@path#2/\@nil%
-    \edef\svg at tempa{#1/\svg at tempa}%
-  }%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at normalize@@path
-% \end{macro}^^A \svg at normalize@path
-% \begin{macro}{\svg at ifvalueisrelax}
-% For some keys the usage of \val{\cs{relax}} as a value should lead to a 
-% special reaction, such as restoring to default behavior or reseting the key.
-% Therefore, \cs{svg at ifvalueisrelax} checks, whether \val{\cs{relax}} was used
-% as value or not.
-%    \begin{macrocode}
-\newcommand*\svg at ifvalueisrelax[1]{%
-  \begingroup%
-    \def\svg at tempa{#1}%
-    \def\svg at tempb{\relax}%
-    \ifx\svg at tempa\svg at tempb\relax%
-      \aftergroup\@firstoftwo%
-    \else%
-      \aftergroup\@secondoftwo%
-    \fi%
-  \endgroup%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at ifvalueisrelax
 %
 % \iffalse
-%</option>
+%<*package&main>
 %<*body>
 % \fi
 %
-% \begin{macro}{\svg at get@path}
-% \changes{v2.01}{2017/11/28}{using \cs{svg at set@input at path}}^^A
-% \changes{v2.01}{2017/11/28}{using \cs{trim at spaces}}^^A
-% \begin{macro}{\if at svg@file at found}
-% \begin{macro}{\svg at file@path}
-% \begin{macro}{\svg at file@name}
-% \begin{macro}{\svg at file@base}
-% \begin{macro}{\svg at file@suffix}
-% The command \cs{svg at get@path} tries to find a given SVG~file. If the 
-% searched file wasn't found in the current path, all paths given with 
-% \cs{svgpath} are evaluated. If there was no appropriate file again, all paths
-% given by \cs{graphicspath} are examined. In the last step, a given path 
-% within the second mandatory argument is browsed. The results for file path
-% and name are stored in \cs{svg at file@path} and \cs{svg at file@name} as well as
-% the compound of both is saved in \cs{svg at file@base}.
-%    \begin{macrocode}
-\newif\if at svg@file at found
-\newcommand*\svg at file@path{}
-\newcommand*\svg at file@name{}
-\newcommand*\svg at file@base{}
-\newcommand*\svg at file@suffix{}
-\newcommand*\svg at get@path[3][\svg at file@ext]{%
-  \begingroup%
-%    \end{macrocode}
-% A maybe given, unneeded file extension is removed.
-%    \begin{macrocode}
-    \svg at filename@parse[{#1}]{#2}%
-    \IfArgIsEmpty{#1}{%
-      \edef\svg at tempa{\filename at area\filename at base.\filename at ext}%
-    }{%
-      \edef\svg at tempa{\filename at area\filename at base.#1}%
-    }%
-%    \end{macrocode}
-% After calling \cs{svg at set@input at path}, all search paths are stored in
-% \cs{input at path}, a single path given in the third argument will also be 
-% considered.
-%    \begin{macrocode}
-    \svg at set@input at path[{#3}]%
-%    \end{macrocode}
-% The specified file is searched with \cs{IfFileExists}. If the file search was 
-% succesful, the macro \cs{svg at filename@parse} is called with the result.
-%    \begin{macrocode}
-    \@svg at tempswafalse%
-    \expandafter\IfFileExists\expandafter{\svg at tempa}{%
-      \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
-      \if at svg@quotes at found\else%
-        \svg at quotes@remove{\@filef at und}%
-      \fi%
-      \@svg at tempswatrue%
-      \edef\@filef at und{\expandafter\trim at spaces\expandafter{\@filef at und}}%
-      \svg at filename@parse[{#1}]{\@filef at und}%
-    }{}%
-    \edef\svg at tempa{%
-      \endgroup%
-      \if at svg@tempswa%
-        \noexpand\@svg at file@foundtrue%
-        \def\noexpand\svg at file@path{\filename at area}%
-        \def\noexpand\svg at file@name{\filename at base}%
-        \def\noexpand\svg at file@base{\filename at area\filename at base}%
-      \else%
-        \noexpand\@svg at file@foundfalse%
-        \def\noexpand\svg at file@path{}%
-        \def\noexpand\svg at file@name{#2}%
-        \def\noexpand\svg at file@base{#2}%
-      \fi%
-    }%
-  \svg at tempa%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at file@suffix
-% \end{macro}^^A \svg at file@base
-% \end{macro}^^A \svg at file@name
-% \end{macro}^^A \svg at file@path
-% \end{macro}^^A \if at svg@file at found
-% \end{macro}^^A \svg at get@path
-% \begin{macro}{\svg at filename@parse}
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at sanitize@dq}}^^A
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at remove@leadingchar}}^^A
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at extension@parse}}^^A
-% As the internal \LaTeXe{} command \cs{filename at parse} is not able to split a 
-% given file name containing quotes, \cs{svg at filename@parse} is defined to 
-% resolve this problem. The optional argument can be used to give a specific 
-% file extension, which should be searched within \cs{filename at ext}. If found 
-% at the very end, the previous part is appended to \cs{filename at base}.
-%    \begin{macrocode}
-\newcommand*\svg at filename@parse[2][]{%
-  \begingroup%
-%    \end{macrocode}
-% The given path and file is parsed with \cs{filename at parse}.
-%    \begin{macrocode}
-    \svg at sanitize@dq\svg at tempa{#2}%
-    \expandafter\filename at parse\expandafter{\svg at tempa}%
-% If there are quotes in the file path, the closing one will be found as first 
-% character in \cs{filename at base} as \cs{filename at area} is splitted at the last
-% slash. This leading quote is removed from \cs{filename at base} with 
-% \cs{svg at remove@leadingchar}.
-%    \begin{macrocode}
-    \svg at quotes@remove{\filename at area}%
-    \if at svg@quotes at found%
-      \edef\filename at area{"\filename at area"}%
-      \svg at remove@leadingchar"\filename at base%
-    \fi%
-%    \end{macrocode}
-% The found extension is parsed against the optional argument. If a double quote
-% was found within the extension, it actually belongs to \cs{filename at base}.
-%    \begin{macrocode}
-    \ifx\filename at ext\relax\else%
-      \svg at quotes@remove{\filename at ext}%
-      \svg at extension@parse{#1}%
-      \if at svg@quotes at found%
-        \edef\filename at base{\filename at base"}%
-      \fi%
-    \fi%
-%    \end{macrocode}
-% Quotes within \cs{filename at base} are normalized.
-%    \begin{macrocode}
-    \svg at quotes@remove{\filename at base}%
-    \if at svg@quotes at found%
-      \edef\filename at base{"\filename at base"}%
-    \fi%
-%    \end{macrocode}
-% With \cs{svg at tempa} the group is closed and the results are saved in the
-% macros \cs{filename@\dots}.
-%    \begin{macrocode}
-    \edef\svg at tempa{%
-      \endgroup%
-      \def\noexpand\filename at area{\filename at area}%
-      \def\noexpand\filename at base{\filename at base}%
-      \ifx\filename at ext\relax%
-        \let\noexpand\filename at ext\noexpand\relax%
-      \else%
-        \def\noexpand\filename at ext{\filename at ext}%
-      \fi%
-    }%
-  \svg at tempa%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at filename@parse
-% \begin{macro}{\svg at extension@parse}
-% \changes{v2.02}{2018/09/07}{new}^^A
-% \begin{macro}{\svg at extension@@parse}
-% \changes{v2.02}{2018/09/07}{new}^^A
-% These macros are used to permit multiple dots in file names. The content of 
-% \cs{filename at ext} is split at each occurence of \val{.} and the trailing part 
-% is compared against the content of the argument of \cs{svg at extension@parse}, 
-% which is probably \cs{svg at file@ext}. If they are equal, the previous part is 
-% appended to \cs{filename at base} and \cs{filename at ext} is set to the content of 
-% the first argument.
-%    \begin{macrocode}
-\newcommand*\svg at extension@parse[1]{%
-  \IfArgIsEmpty{#1}{}{%
-    \@expandtwoargs\Ifstr%
-      {\detokenize\expandafter{\filename at ext}}{\detokenize\expandafter{#1}}{}{%
-      \begingroup%
-%    \end{macrocode}
-% Macro \cs{svg at tempa} is used to temporarily store anything before the 
-% searched extension at the end of \cs{filename at ext} and \cs{svg at tempb} is set
-% to the actual searched extension if found.
-%    \begin{macrocode}
-        \edef\svg at tempa{%
-          \def\noexpand\svg at tempa{}%
-          \let\noexpand\svg at tempb\relax%
-          \noexpand\svg at extension@@parse%
-            \filename at ext.\noexpand\@nil#1\noexpand\@nil%
-        }%
-        \svg at tempa%
-        \edef\svg at tempa{%
-          \endgroup%
-%    \end{macrocode}
-% If the trailing extension was found, \cs{filename at base} and \cs{filename at ext} 
-% are adopted.
-%    \begin{macrocode}
-          \def\noexpand\filename at base{\filename at base\svg at tempa}%
-          \ifx\svg at tempb\relax%
-            \let\noexpand\filename at ext\relax%
-          \else%
-            \def\noexpand\filename at ext{\svg at tempb}%
-          \fi%
-        }%
-      \svg at tempa%
-    }%
-  }%
-}
-%    \end{macrocode}
-% Macro \cs{svg at extension@@parse} is recursively called as long as there are 
-% any dots or the searched extension is found.
-%    \begin{macrocode}
-\newcommand*\svg at extension@@parse{}
-\def\svg at extension@@parse#1.#2\@nil#3\@nil{%
-  \edef\svg at tempa{\svg at tempa.#1}%
-  \IfArgIsEmpty{#2}{}{%
-    \Ifstr{\detokenize{#2}}{\detokenize{#3.}}{%
-%    \end{macrocode}
-% If the trailing extension is found, \cs{svg at tempb} is definied.
-%    \begin{macrocode}
-      \edef\svg at tempb{#3}%
-    }{%
-      \svg at extension@@parse#2\@nil#3\@nil%
-    }%
-  }%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at extension@@parse
-% \end{macro}^^A \svg at extension@parse
-% \begin{macro}{\svg at iffilenewer}
-% \changes{v2.02d}{2019/10/22}{use \cs{filemoddate} with Xe\LaTeX, see
-%   \url{https://github.com/mrpiggi/svg/issues/12}}^^A
-% The macro \cs{svg at iffilenewer} is used to decide, whether the export with 
-% \app{Inkscape} is necessary due to an updated SVG~file. This can only be
-% done, if \cs{pdf at filemoddate} or \cs{filemoddate} is definied.
-% \ToDo{\cs{svg at iffilenewer} instead \cs{IfFileExists} to check results}[v2.03]
-%    \begin{macrocode}
-\newcommand*\svg at iffilenewer[2]{\@gobbletwo}
-\ifx\pdf at filemoddate\@undefined
-  \ifx\filemoddate\@undefined\else
-    \ifx\strcmp\@undefined\else
-      \renewcommand*\svg at iffilenewer[2]{%
-        \begingroup%
-          \edef\svg at tempa{\filemoddate{#1}}%
-          \edef\svg at tempb{\filemoddate{#2}}%
-          \ifnum\strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
-            \aftergroup\@firstoftwo%
-          \else%
-            \aftergroup\@secondoftwo%
-          \fi%
-        \endgroup%
-      }%
-    \fi
-  \fi
-\else
-  \ifx\pdf at strcmp\@undefined\else
-    \renewcommand*\svg at iffilenewer[2]{%
-      \begingroup%
-        \edef\svg at tempa{\pdf at filemoddate{#1}}%
-        \edef\svg at tempb{\pdf at filemoddate{#2}}%
-        \ifnum\pdf at strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
-          \aftergroup\@firstoftwo%
-        \else%
-          \aftergroup\@secondoftwo%
-        \fi%
-      \endgroup%
-    }%
-  \fi
-\fi
-%    \end{macrocode}
-% \end{macro}^^A \svg at iffilenewer
-%
-% \subsection{Optional Parameters for user commands}
-%
+% \begin{macro}{\svg at local@param at def}
+% \begin{macro}{\svg at local@param at use}
 % \begin{macro}{\svg at local@param at set}
 % \changes{v2.02}{2018/09/07}{reasonable value for key \opt{distort}}^^A
-% \begin{macro}{\svg at local@param at use}
-% \begin{macro}{\svg at local@param at def}
 % Most of the package options can also be used as optional parameters for 
 % \cs{includesvg} or \cs{includeinkscape}. Some of them are overloaded for the 
 % usage as optional argument and there are some keys, which \emph{only} can be
@@ -2556,6 +2631,12 @@
 % \cs{svg at local@param at use} is extended with \cs{svg at local@param at def} by the
 % definition of local keys during the loading of package \pkg{svg}.
 %    \begin{macrocode}
+\newcommand*\svg at local@param at use{}
+\newcommand*\svg at local@param at def[1]{%
+  \edef\svg at local@param at use{%
+    \unexpanded\expandafter{\svg at local@param at use}\unexpanded{#1}%
+  }%
+}
 \newcommand*\svg at local@param at set[1]{%
   \svg at local@param at use%
   \FamilyOptions{SVG}{#1}%
@@ -2569,44 +2650,51 @@
 % Using \opt{distort=true} is only reasonable, if \opt{height} and \opt{width} 
 % are given.
 %    \begin{macrocode}
-  \@svg at tempswafalse%
+  \@svg at tempswatrue%
   \ifdim\svg at param@width>\z@\relax\ifdim\svg at param@height>\z@\relax%
-    \@svg at tempswatrue%
+    \@svg at tempswafalse%
   \fi\fi%
-  \if at svg@tempswa\else%
-    \FamilyOptions{SVG}{distort=false}%
+  \if at svg@tempswa%
+    \FamilyExecuteOptions[.svg.sty]{SVG}{distort=false}%
   \fi%
 }
-\newcommand*\svg at local@param at use{}
-\newcommand*\svg at local@param at def[1]{%
-  \edef\svg at local@param at use{%
-    \unexpanded\expandafter{\svg at local@param at use}\unexpanded{#1}%
-  }%
-}
 %    \end{macrocode}
+% \end{macro}^^A \svg at local@param at set
+% \end{macro}^^A \svg at local@param at use
 % \end{macro}^^A \svg at local@param at def
-% \end{macro}^^A \svg at local@param at use
-% \end{macro}^^A \svg at local@param at set
-%
-% \iffalse
-%</body>
-%</package&base>
-% \fi
-%
-% The family member is defined for both \pkg{svg} and \pkg{svg-extract}.
+% \begin{macro}{\svg at deprecated@param}
+% This macro checks, if \cs{svgwidth} or \cs{svgscale} are defined. In this 
+% case, the given values are passed to the correlating parameters and a warning 
+% is raised.
 %    \begin{macrocode}
-%<*body>
-\DefineFamilyMember[.param]{SVG}
-%</body>
+\newcommand*\svg at deprecated@param{%
+  \@svg at tempswafalse%
+  \ifx\svgwidth\@undefined\else%
+    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{width=\svgwidth}}%
+    \svg at tempa%
+    \@svg at tempswatrue%
+  \fi%
+  \ifx\svgscale\@undefined\else%
+    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{scale=\svgscale}}%
+    \svg at tempa%
+    \@svg at tempswatrue%
+  \fi%
+  \if at svg@tempswa%
+    \PackageWarning{svg}{%
+      You should specify the image size with parameters\MessageBreak%
+      `width' and `height' or `scale' instead of using\MessageBreak%
+      `\string\svgscale' or `\string\svgwidth'%
+    }%
+    \let\svgwidth\@undefined%
+    \let\svgscale\@undefined%
+  \fi%
+}
 %    \end{macrocode}
+% \end{macro}^^A \svg at deprecated@param
 %
 %
-% \iffalse
-%<*package&base>
-%<*body>
-% \fi
 %
-% \subsection{User commands}
+% \subsubsection{Definition of user commands}
 %
 % \begin{macro}{\svgsetup}
 % \changes{v2.00}{2017/02/17}{new}^^A
@@ -2769,6 +2857,7 @@
 \newcommand*\svg at param@angle{0}
 \svg at local@param at def{%
   \DefineFamilyKey[.param]{SVG}{angle}{%
+    \FamilyKeyStateUnknownValue%
     \Ifisdimension{#1\p@}{%
       \renewcommand*\svg at param@angle{#1}%
       \FamilyKeyStateProcessed%
@@ -2917,35 +3006,6 @@
 %
 % \subsection{Auxiliary macros}
 %
-% \begin{macro}{\svg at deprecated@param}
-% This macro checks, if \cs{svgwidth} or \cs{svgscale} are defined. In this 
-% case, the given values are passed to the correlating parameters and a warning 
-% is raised.
-%    \begin{macrocode}
-\newcommand*\svg at deprecated@param{%
-  \@svg at tempswafalse%
-  \ifx\svgwidth\@undefined\else%
-    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{width=\svgwidth}}%
-    \svg at tempa%
-    \@svg at tempswatrue%
-  \fi%
-  \ifx\svgscale\@undefined\else%
-    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{scale=\svgscale}}%
-    \svg at tempa%
-    \@svg at tempswatrue%
-  \fi%
-  \if at svg@tempswa%
-    \PackageWarning{svg}{%
-      You should specify the image size with parameters\MessageBreak%
-      `width' and `height' or `scale' instead of using\MessageBreak%
-      `\string\svgscale' or `\string\svgwidth'%
-    }%
-    \let\svgwidth\@undefined%
-    \let\svgscale\@undefined%
-  \fi%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at deprecated@param
 % \begin{macro}{\svg at ink@run}
 % \begin{macro}{\if at svg@ink at run}
 % The command, which performs the call of \app{Inkscape} via \cs{ShellEscape}.
@@ -2996,7 +3056,7 @@
       \fi%
 %    \end{macrocode}
 % If all checks were positive, the export with \app{Inkscape} can be done in 
-% case \file{-{}-shell-escape} is enabled.
+% case flag \file{-{}-shell-escape} is used.
 %    \begin{macrocode}
       \if at svg@ink at run%
         \ifnum\pdf at shellescape=\@ne\relax%
@@ -3016,8 +3076,8 @@
             \fi%
           }%
 %    \end{macrocode}
-% Executing \app{Inkscape} through the command~line~interface. Afterwards, the 
-% export results are moved into the given output path.
+% Executing \app{Inkscape} on shell. Afterwards, the export results are moved 
+% into the given output path.
 %    \begin{macrocode}
           \svg at quotes@remove[\svg at file@base]{\svg at tempa}%
           \svg at quotes@remove[\svg at out@name]{\svg at tempb}%
@@ -3064,9 +3124,9 @@
             \edef\svg at tempb{\svg at tempb.\svg at ink@format}%
             \svg at quotes@remove{\svg at out@base}%
             \svg at shell@mkdir{\svg at out@path}%
-            \svg at shell@move{\svg at tempb}{\svg at out@base}%
+            \svg at shell@mv{\svg at tempb}{\svg at out@base}%
             \if at svg@ink at latex%
-              \svg at shell@move{\svg at tempb_tex}{\svg at out@base_tex}%
+              \svg at shell@mv{\svg at tempb_tex}{\svg at out@base_tex}%
             \fi%
           }{%
             \gdef\svg at ink@ver{\m at ne}%
@@ -3098,71 +3158,43 @@
 % \end{macro}^^A \svg at ink@run
 % \begin{macro}{\svg at input}
 % \begin{macro}{\svg@@input}
+% \changes{v2.02g}{2020/06/12}{parsing of file extension discarded; meanwhile 
+%   taken over by the kernel}^^A
+% \begin{macro}{\svg at box}
 % With \cs{svg@@input} the export results of \app{Inkscape} are included. The 
 % macro \cs{svg at input} is defined in order to realize the option \opt{exclude} 
 % for package \pkg{svg-extract}. The macro \cs{svg at set@input at path} is called to 
 % support commands like \cs{input}\marg{tex filename} within SVG~files.
 %    \begin{macrocode}
+\newsavebox\svg at box
 \newcommand*\svg at input{\svg@@input}
 \newcommand*\svg@@input[2][]{%
   \IfArgIsEmpty{#1}{}{\svg at local@param at set{#1}}%
   \svg at set@input at path%
+  \@svg at tempswatrue%
   \if at svg@draft%
-    \@svg at ink@latexfalse%
+    \@svg at tempswafalse%
   \fi%
+  \if at svg@ink at latex\else%
+    \@svg at tempswafalse%
+  \fi%
+  \edef\svg at tempa{#2}%
 %    \end{macrocode}
-% In order to support file names with multiple dots, the second argument is 
-% parsed and only the part after the last dot is stroed in \cs{svg at tempb} as 
-% extension. Everything before is stored in \cs{svg at tempa}.
-%    \begin{macrocode}
-  \def\svg at tempb##1.##2\@nil{%
-    \IfArgIsEmpty{##2}{%
-      \def\svg at tempb{##1}%
-    }{%
-      \edef\svg at tempa{\svg at tempa.##1}%
-      \svg at tempb##2\@nil%
-    }%
-  }%
-  \edef\svg at tempa{%
-    \def\noexpand\svg at tempa{}%
-    \noexpand\svg at tempb#2.\noexpand\@nil%
-  }%
-  \svg at tempa%
-%    \end{macrocode}
-% Afterwards \cs{svg at tempa} is defined with the file name within enclosing 
-% braces followed by the extension---only if the file name itself contains any 
-% dots--- and \cs{svg at tempb} holds the original file name plus extension
-% without enclosing braces.
-%    \begin{macrocode}
-  \svg at remove@leadingchar.\svg at tempa%
-  \begingroup%
-    \expandafter\filename at parse\expandafter{\svg at tempa}%
-    \edef\svg at tempa{%
-      \endgroup%
-      \ifx\filename at ext\relax%
-        \edef\noexpand\svg at tempa{\svg at tempa.\svg at tempb}%
-      \else%
-        \edef\noexpand\svg at tempa{{\svg at tempa}.\svg at tempb}%
-      \fi%
-    }%
-  \svg at tempa%
-  \edef\svg at tempb{#2}%
-%    \end{macrocode}
 % If the export with \app{Inkscape} was done with \LaTeX~support enabled, the 
 % corresponding file will be used together with \cs{input}. The necessary 
 % patches to environment \env{picture} as well as command \cs{includegraphics} 
 % are made beforehand with \cs{svg at patches}.
 %    \begin{macrocode}
-  \if at svg@ink at latex%
+  \if at svg@tempswa%
     \svg at patches{\svg at tempa}%
     \ifnum\value{svg at param@lastpage}=\z@\relax%
-      \expandafter\svg at get@lastpage\expandafter{\svg at tempb}%
+      \expandafter\svg at get@lastpage\expandafter{\svg at tempa}%
     \fi%
     \edef\svg at tempa{%
       \ifx\svg at param@pretex\relax\else%
         \noexpand\svg at param@pretex%
       \fi%
-      \noexpand\input{\svg at tempb_tex}%
+      \noexpand\input{\svg at tempa_tex}%
       \ifx\svg at param@apptex\relax\else%
         \noexpand\svg at param@apptex%
       \fi%
@@ -3213,6 +3245,7 @@
   \fi%
 }
 %    \end{macrocode}
+% \end{macro}^^A \svg at box
 % \end{macro}^^A \svg@@input
 % \end{macro}^^A \svg at input
 % \begin{macro}{\svg at wrn@scale}
@@ -3448,7 +3481,7 @@
 % \ToDo{Markup for link to issue}[v2.03]
 %    \begin{macrocode}
     \ifx\svg at tempa\@empty%
-      \ifwindows%
+      \svg at ifwindowsdetected{%
         \def\svg at tempb{\jobname.svg.ink.ver.aux}%
         \IfFileExists{\svg at tempb}{}{%
           \ShellEscape{call "\svg at ink@exe" -V > \svg at tempb}%
@@ -3457,7 +3490,7 @@
           \closein\@inputcheck%
           \ShellEscape{del \svg at tempb}%
         }%
-      \fi%
+      }{}%
     \fi%
 %    \end{macrocode}
 % The found version is stored in \cs{svg at tempa} and parsed afterwards.
@@ -3490,6 +3523,161 @@
 %
 %
 %
+% \subsection{Handling path and file names}
+%
+% \begin{macro}{\svg at set@input at path}
+% \changes{v2.01}{2017/11/28}{new}^^A
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at deactivate@dq}}^^A
+% \begin{macro}{\svg at append@input at path}
+% \changes{v2.01}{2017/11/28}{new}^^A
+% \changes{v2.02}{2018/09/07}{avoid duplicates in \cs{input at path}}^^A
+% In order to import SVG~files from different folders, \cs{svg at set@input at path}
+% evaluates several macros, which are supposed to be used for holding different 
+% search folders. Any given path will be handled by \cs{svg at normalize@path}.
+% The optional argument can be used to append an additional search path.
+%    \begin{macrocode}
+\newcommand*\svg at set@input at path[1][]{%
+  \begingroup%
+    \svg at deactivate@dq%
+%    \end{macrocode}
+% If a path was already found and stored within \cs{svg at file@path}, it is
+% searched first and wrapped in curly braces. This is necessary for using
+% commands like \cs{input}\marg{tex~filename} within SVG~files.
+%    \begin{macrocode}
+    \ifx\svg at file@path\@empty\else%
+      \svg at normalize@path{\svg at file@path}%
+      \edef\svg at file@path{{\svg at file@path}}%
+    \fi%
+%    \end{macrocode}
+% Afterwards, several search paths are appended. If \cs{svgpath} was used, it 
+% is searched next. If nothing was found, \cs{graphicspath} is considered if 
+% defined followed by a path given in the third argument. If nothing was found
+% yet, the standard \cs{input at path} is searched last.
+%    \begin{macrocode}
+    \svg at append@input at path{\svg at file@path}{\svg at input@path}%
+    \svg at append@input at path{\svg at file@path}{\Ginput at path}%
+    \IfArgIsEmpty{#1}{}{\svg at append@input at path{\svg at file@path}{{#1}}}%
+    \svg at append@input at path{\svg at file@path}{\input at path}%
+%    \end{macrocode}
+% Finally, \cs{input at path} is set.
+%    \begin{macrocode}
+    \edef\svg at tempa{%
+      \endgroup%
+      \ifx\svg at file@path\@empty\else%
+        \def\noexpand\input at path{\svg at file@path}%
+      \fi%
+    }%
+  \svg at tempa%
+}
+%    \end{macrocode}
+% Only, if a certain search path is defined, it is added. The paths given in 
+% the first argument are compared to each path in the second argument and only 
+% new ones are added.
+%    \begin{macrocode}
+\newcommand*\svg at append@input at path[2]{%
+  \ifx#2\@undefined\else%
+    \edef\svg at tempb{#2}%
+    \expandafter\@tfor\expandafter\svg at tempa\expandafter:\expandafter=%
+        \svg at tempb\do{%
+%    \end{macrocode}
+% Passing each new path to \cs{svg at normalize@path}. If a path already exists, 
+% switch \cs{if at svg@tempswa} is set to \val{false}.
+%    \begin{macrocode}
+      \ifx\svg at tempa\@empty\else%
+        \@svg at tempswatrue%
+        \svg at normalize@path{\svg at tempa}%
+        \expandafter\@tfor\expandafter\svg at tempb\expandafter:\expandafter=%
+            #1\do{%
+          \ifx\svg at tempa\svg at tempb%
+            \@svg at tempswafalse%
+            \@break at tfor%
+          \fi%
+        }%
+        \if at svg@tempswa%
+          \edef#1{#1{\svg at tempa}}%
+        \fi%
+      \fi%
+    }%
+  \fi%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at append@input at path
+% \end{macro}^^A \svg at set@input at path
+% \begin{macro}{\svg at get@path}
+% \changes{v2.01}{2017/11/28}{using \cs{svg at set@input at path}}^^A
+% \changes{v2.01}{2017/11/28}{using \cs{trim at spaces}}^^A
+% \begin{macro}{\if at svg@file at found}
+% \begin{macro}{\svg at file@path}
+% \begin{macro}{\svg at file@name}
+% \begin{macro}{\svg at file@base}
+% \begin{macro}{\svg at file@suffix}
+% The command \cs{svg at get@path} tries to find a given SVG~file. If the 
+% searched file wasn't found in the current path, all paths given with 
+% \cs{svgpath} are evaluated. If there was no appropriate file again, all paths
+% given by \cs{graphicspath} are examined. In the last step, a given path 
+% within the second mandatory argument is browsed. The results for file path
+% and name are stored in \cs{svg at file@path} and \cs{svg at file@name} as well as
+% the compound of both is saved in \cs{svg at file@base}.
+%    \begin{macrocode}
+\newif\if at svg@file at found
+\newcommand*\svg at file@path{}
+\newcommand*\svg at file@name{}
+\newcommand*\svg at file@base{}
+\newcommand*\svg at file@suffix{}
+\newcommand*\svg at get@path[3][\svg at file@ext]{%
+  \begingroup%
+    \svg at filename@parse[{#1}]{#2}%
+    \IfArgIsEmpty{#1}{%
+      \edef\svg at tempa{\filename at area\filename at base.\filename at ext}%
+    }{%
+      \edef\svg at tempa{\filename at area\filename at base.#1}%
+    }%
+%    \end{macrocode}
+% After calling \cs{svg at set@input at path}, all search paths are stored in
+% \cs{input at path}, a single path given in the third argument will also be 
+% considered.
+%    \begin{macrocode}
+    \svg at set@input at path[{#3}]%
+%    \end{macrocode}
+% The specified file is searched with \cs{IfFileExists}. If the file search was 
+% succesful, the macro \cs{svg at filename@parse} is called with the result.
+%    \begin{macrocode}
+    \@svg at tempswafalse%
+    \expandafter\IfFileExists\expandafter{\svg at tempa}{%
+      \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
+      \if at svg@quotes at found\else%
+        \svg at quotes@remove{\@filef at und}%
+      \fi%
+      \@svg at tempswatrue%
+      \edef\@filef at und{\expandafter\trim at spaces\expandafter{\@filef at und}}%
+      \svg at filename@parse[{#1}]{\@filef at und}%
+    }{}%
+    \edef\svg at tempa{%
+      \endgroup%
+      \if at svg@tempswa%
+        \noexpand\@svg at file@foundtrue%
+        \def\noexpand\svg at file@path{\filename at area}%
+        \def\noexpand\svg at file@name{\filename at base}%
+        \def\noexpand\svg at file@base{\filename at area\filename at base}%
+      \else%
+        \noexpand\@svg at file@foundfalse%
+        \def\noexpand\svg at file@path{}%
+        \def\noexpand\svg at file@name{#2}%
+        \def\noexpand\svg at file@base{#2}%
+      \fi%
+    }%
+  \svg at tempa%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svg at file@suffix
+% \end{macro}^^A \svg at file@base
+% \end{macro}^^A \svg at file@name
+% \end{macro}^^A \svg at file@path
+% \end{macro}^^A \if at svg@file at found
+% \end{macro}^^A \svg at get@path
+%
+%
+%
 % \subsection{Patches}
 %
 % \begin{macro}{\svg at patches}
@@ -3500,7 +3688,7 @@
 % \begin{macro}{\svg at includegraphics@saved}
 % For including the export results from \app{Inkscape} with \LaTeX~support 
 % enabled, there are some patches necessary for environment \env{picture} and 
-% \cs{includegraphics}. Those patches are done with \cs{svg at patches}.
+% \cs{includegraphics}. These patches are done with \cs{svg at patches}.
 %    \begin{macrocode}
 \newcommand*\svg at picture@saved{}
 \let\svg at picture@saved\picture
@@ -3515,6 +3703,7 @@
 % \end{macro}^^A \svg at includegraphics@saved
 % \end{macro}^^A \svg at picture@saved
 % \end{macro}^^A \svg at patches
+% \begin{macro}{\svg at picture@patched}
 % \begin{macro}{\svg at pictur@patched}
 % In order to provide the possibility specify the desired width of a graphic, 
 % the appropriate \cs{unitlength} is calculated at the beginning of the 
@@ -3559,6 +3748,7 @@
 }
 %    \end{macrocode}
 % \end{macro}^^A \svg at pictur@patched
+% \end{macro}^^A \svg at picture@patched
 % \begin{macro}{\svg at includegraphics@patched}
 % \begin{macro}{\svg at includegraphics@file}
 % The patch to \cs{includegraphics} is meant to dissolve the \app{Inkscape} bug 
@@ -3606,7 +3796,7 @@
 %
 % \iffalse
 %</body>
-%</package&base>
+%</package&main>
 %<*package&option>
 % \fi
 %
@@ -3624,7 +3814,7 @@
 % for package \pkg{svg} in order to raise a warning message. Primarily this is 
 % done for compatibility reasons.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \DefineFamilyMember[.dummy]{SVG}
 \newcommand*\svg at dummy@key[2][]{%
   \@ifpackageloaded{svg-extract}{}{%
@@ -3654,7 +3844,7 @@
     \AfterPackage{svg-extract}{\RelaxFamilyKey[.dummy]{SVG}{#2}}%
   }%
 }
-%</base>
+%</main>
 %    \end{macrocode}
 % \end{macro}^^A \svg at dummy@key
 %
@@ -3668,9 +3858,9 @@
 % With option \opt{extract} it can be controlled, if the extraction of 
 % independent graphic files should be done.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key[true]{extract}
-%</base>
+%</main>
 %<*extract>
 \newif\if at svgx@run
 \DefineFamilyKey{SVG}{extract}[true]{%
@@ -3724,11 +3914,11 @@
 % is set to \val{pdf} or, if dvi output could be detected, to \val{eps} during
 % initialization.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{extractformat}
 \svg at dummy@key[true]{pdf}
 \svg at dummy@key[true]{eps}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at format{pdf}
 \ifxetex\else\ifpdf\else
@@ -3784,12 +3974,12 @@
 % \LaTeX~file. By default, the preamble of the main document is used, which end
 % is detected at \cs{begin}|{document}|.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{extractpreamble}
 \svg at dummy@key{preamble}
 \svg at dummy@key{extractpreambleend}
 \svg at dummy@key{end}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at preamble{\jobname.\svgx at latex@ext}%
 \DefineFamilyKey{SVG}{extractpreamble}{%
@@ -3824,9 +4014,9 @@
 % With this option, the number of \LaTeX~runs for the separate auxiliary file 
 % can be set.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{extractruns}
-%</base>
+%</main>
 %<*extract>
 \newcounter{svgx at runs}
 \DefineFamilyKey{SVG}{extractruns}{%
@@ -3858,12 +4048,12 @@
 % The command and facultative options for the \LaTeX~call of the separate 
 % auxiliary file. The default is set according to the currently used engine.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{latexexe}
 \svg at dummy@key{pdflatex}
 \svg at dummy@key{latexext}
 \svg at dummy@key{latexopt}
-%</base>
+%</main>
 %<*extract>
 \ifxetex
   \newcommand*\svgx at latex@exe{xelatex}
@@ -3927,11 +4117,11 @@
 % \begin{option}{pdftops}
 % \changes{v2.00}{2017/02/24}{deprecated}^^A
 % Options and macros for calling convert commands, which are supplied by most
-% \LaTeXe~distributions. These are used to generate all files, which are 
+% \LaTeX~distributions. These are used to generate all files, which are 
 % supported by option \opt{extractformat}, as they don't need an additional
 % application.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{dvipsopt}
 \svg at dummy@key{pstoepsopt}
 \svg at dummy@key{pstopdfopt}
@@ -3938,7 +4128,7 @@
 \svg at dummy@key{pdftoepsopt}
 \svg at dummy@key{pdftopsopt}
 \svg at dummy@key{pdftops}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at dvips@exe{dvips}
 \newcommand*\svgx at dvips@opt{}
@@ -3971,8 +4161,8 @@
   \FamilyKeyStateProcessed%
 }
 \DefineFamilyKey{SVG}{pdftops}{%
-  \PackageWarning{#1}{%
-    The option key `pdftops' is deprecated.\MessageBreak%
+  \PackageWarning{svg-extract}{%
+    The option key `pdftops' is deprecated. \MessageBreak%
     You should use either `pdftoepsopt' or\MessageBreak%
     `pdftopsopt' instead. See the manual for\MessageBreak%
     more. Nothing was done%
@@ -4002,8 +4192,9 @@
 %
 % \subsubsection{Invoking external application for graphic conversion}
 %
-% Besides the use of a conversion tool supplied by \LaTeXe, the applications 
-% \app{ImageMagick} and \app{Ghostscript} can be used for converting graphics.
+% Besides the use of a conversion tool supplied by the \LaTeX~distribution, 
+% the applications \app{ImageMagick} and \app{Ghostscript} can be used for 
+% converting graphics.
 %
 % \begin{option}{convert}
 % \changes{v2.00}{2017/02/24}{changed/extended}^^A
@@ -4012,9 +4203,9 @@
 % The option \opt{convert} can be used to define, which of both applications 
 % should be use. \app{ImageMagick} is set by default.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key[true]{convert}
-%</base>
+%</main>
 %<*extract>
 \newif\if at svgx@cnv at run
 \newcommand*\svgx at cnv@cmd{}
@@ -4042,15 +4233,15 @@
     \or% gs64
       \@svgx at cnv@runtrue%
       \renewcommand*\svgx at cnv@cmd{\svgx at gs@cmd}%
-      \svgx at onlywindows{%
+      \svg at ifwindowsdetected{%
         \renewcommand*\svgx at gs@exe{gswin64c}%
-      }%
+      }{}%
     \or% gs32
       \@svgx at cnv@runtrue%
       \renewcommand*\svgx at cnv@cmd{\svgx at gs@cmd}%
-      \svgx at onlywindows{%
+      \svg at ifwindowsdetected{%
         \renewcommand*\svgx at gs@exe{gswin32c}%
-      }%
+      }{}%
     \fi%
 %    \end{macrocode}
 % In version~v1.0 the option \opt{convert} was used to set both the executable 
@@ -4057,9 +4248,9 @@
 % and options for the conversion application, meant for the usage of 
 % \app{ImageMagick}. This is taken into account here.
 %    \begin{macrocode}
-  \else%
+  \else% legacy option
 %    \end{macrocode}
-% Same doing like with option \opt{inkscape}.
+% Same doing like with legacy part of option \opt{inkscape}.
 %    \begin{macrocode}
     \def\svg at tempa##1-##2\@nil{%
       \IfArgIsEmpty{##2}{\def\svg at tempb{}}{%
@@ -4108,10 +4299,10 @@
 % Option \opt{convertformat} controls the output format for converted files. It
 % is set to \val{png} by default.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{convertformat}
 \svg at dummy@key[true]{png}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at cnv@format{png}
 \DefineFamilyKey{SVG}{convertformat}{%
@@ -4143,6 +4334,7 @@
 % \changes{v2.00}{2017/02/24}{new}^^A
 % \begin{option}{convertdensity}
 % \begin{macro}{\svgx at cnv@dpi}
+% \begin{macro}{\svgx at cnv@get at dpi}
 % The option \opt{convertdpi} is meant to define the used density during the 
 % conversion process. It can be set either for all designated output formats or 
 % targeted for a specific format. It's also possible to use something like 
@@ -4151,10 +4343,10 @@
 % the option is used for a specific or for all output formats is recocnized by 
 % \cs{svgx at ifkeyandval}.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{convertdpi}
 \svg at dummy@key{convertdensity}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at cnv@dpi{}
 \let\svgx at cnv@dpi\relax
@@ -4175,11 +4367,151 @@
   }%
 }
 \DefineFamilyKey{SVG}{convertdensity}{\FamilyOptions{SVG}{convertdpi=#1}}
+%    \end{macrocode}
+% This macro is used to resolve a given value to set the density for the 
+% conversion. The delimited macros \cs{svg at tempa} and \cs{svg at tempb} are 
+% defined to first crop any given suffix \val{dpi} and second to split two 
+% numbers at |x|, if present. Pay attention how both macros are invoked. In the
+% end, a passed value in any of the forms \val{300}, \val{300dpi}, \val{300x400}
+% or \val{300x400dpi} and even \val{300dpix400dpi} is possible. The result is
+% stored in \cs{svg at tempa}.
+%    \begin{macrocode}
+\newcommand*\svgx at cnv@get at dpi[1]{%
+  \begingroup%
+    \def\svg at tempa##1dpi##2x##3dpi##4\@nil{%
+      \edef\svg at tempa{##1}%
+%    \end{macrocode}
+% Switch \cs{if at svg@tempswa} as \cs{iftrue} means, a valid value was found.
+%    \begin{macrocode}
+      \@svg at tempswafalse%
+%    \end{macrocode}
+% If only the first argument is a number and third is empty, a single number 
+% was given and there's nothing more to do. If the argument is something like 
+% \val{300dpix400dpi}, the third argument is the second number.
+%    \begin{macrocode}
+      \Ifnumber{##1}{%
+        \IfArgIsEmpty{##3}{\@svg at tempswatrue}{%
+          \Ifnumber{##3}{\edef\svg at tempa{##1x##3}}{}%
+        }%
+      }{}%
+      \if at svg@tempswa\else%
+        \expandafter\svg at tempb\svg at tempa xx\@nil%
+      \fi%
+    }%
+%    \end{macrocode}
+% Macro \cs{svg at tempb} splits at |x| and checks, if something valid like 
+% \val{300x400} was given. If true, the value is stored in \cs{svg at tempa}.
+%    \begin{macrocode}
+    \def\svg at tempb##1x##2x##3\@nil{%
+      \Ifstr{##3}{x}{%
+        \@svg at tempswatrue%
+        \IfArgIsEmpty{##1}{\@svg at tempswafalse}{%
+          \Ifnumber{##1}{}{\@svg at tempswafalse}%
+        }%
+        \IfArgIsEmpty{##2}{\@svg at tempswafalse}{%
+          \Ifnumber{##2}{}{\@svg at tempswafalse}%
+        }%
+        \if at svg@tempswa%
+          \edef\svg at tempa{##1x##2}%
+        \fi%
+      }{}%
+    }%
+    \IfArgIsEmpty{#1}{%
+      \let\svg at tempa\@empty%
+    }{%
+      \lowercase{\svg at tempa#1dpi#1xdpi\@nil}%
+      \if at svg@tempswa\else%
+        \let\svg at tempa\relax%
+      \fi%
+    }%
+    \edef\svg at tempb{%
+      \endgroup%
+      \ifx\svg at tempa\relax%
+        \let\noexpand\svg at tempa\noexpand\relax%
+      \else%
+        \def\noexpand\svg at tempa{\svg at tempa}%
+      \fi%
+    }%
+  \svg at tempb%
+}
 %</extract>
 %    \end{macrocode}
+% \end{macro}^^A \svgx at cnv@get at dpi
 % \end{macro}^^A \svgx at cnv@dpi
 % \end{option}^^A convertdensity
 % \end{option}^^A convertdpi
+%
+% \iffalse
+%<*extract>
+% \fi
+%
+% \begin{macro}{\svgx at setformatkey}
+% \begin{macro}{\svgx at useformatkey}
+% With \cs{svgx at setformatkey} the---maybe output format depend---keys for the 
+% conversion tools are set. First argument contains the value given to a key, 
+% second the command sequence name of the macro, to whom the value shall be 
+% allocated.
+%    \begin{macrocode}
+\newcommand*\svgx at setformatkey[2]{%
+%    \end{macrocode}
+% A key of the form \val{\meta{key}=\{\meta{format}=\meta{value}\}} is given. 
+% The desired output format can be accessed with |##1|, the value with |##2|
+% within the arguments of \cs{svgx at ifkeyandval}.
+%    \begin{macrocode}
+  \svgx at ifkeyandval{#1}{%
+    \svg at ifvalueisrelax{##2}{%
+      \expandafter\let\csname #2@##1\endcsname\relax%
+    }{%
+      \@namedef{#2@##1}{##2}%
+    }%
+%    \end{macrocode}
+% A key of the form \val{\meta{key}=\{\meta{format}=\meta{value}\}} is given.
+% The value can be used with |##1|.
+%    \begin{macrocode}
+  }{%
+    \svg at ifvalueisrelax{##1}{%
+      \expandafter\let\csname #2\endcsname\relax%
+    }{%
+      \@namedef{#2}{##1}%
+    }%
+  }%
+}
+%    \end{macrocode}
+% The command \cs{svgx at useformatkey} checks, if a format specific key was 
+% definded with \cs{svgx at setformatkey}, whereas the format is given in the 
+% second argument. If this is not the case, the setting for all output formats 
+% is used. After that, a specific key appended with a |+| can be used to do 
+% some additional stuff.
+%    \begin{macrocode}
+\newcommand*\svgx at useformatkey[3]{%
+  \scr at ifundefinedorrelax{#1@#2}{%
+    \scr at ifundefinedorrelax{#1}{}{%
+      \expandafter\ifx\csname #1\endcsname\@empty\else%
+        #3\@nameuse{#1}\space%
+      \fi%
+    }%
+    \scr at ifundefinedorrelax{#1@#2+}{}{%
+      \expandafter\ifx\csname #1@#2+\endcsname\@empty\else%
+        #3\@nameuse{#1@#2+}\space%
+      \fi%
+    }%
+  }{%
+%    \end{macrocode}
+% If a format specific key was definded, it is used.
+%    \begin{macrocode}
+    \expandafter\ifx\csname #1@#2\endcsname\@empty\else%
+      #3\@nameuse{#1@#2}\space%
+    \fi%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svgx at useformatkey
+% \end{macro}^^A \svgx at setformatkey
+%
+% \iffalse
+%</extract>
+% \fi
+%
 % \begin{option}{magickexe}
 % \changes{v2.00}{2017/02/24}{new}^^A
 % \begin{macro}{\svgx at magick@exe}
@@ -4189,6 +4521,7 @@
 % \begin{option}{magickoperator}
 % \changes{v2.00}{2017/02/24}{new}^^A
 % \begin{macro}{\svgx at magick@opr}
+% \begin{macro}{\svgx at magick@cmd}
 % Setting the command including maybe the path to \app{ImageMagick}. The keys
 % \opt{magicksetting} and \opt{magickoperator} should be used to add optional
 % arguments before (\emph{Settings}) or after (\emph{Operators}) the input
@@ -4195,13 +4528,17 @@
 % file. They can either be set for all or a specific output format as like
 % option \opt{convertdpi}. For this \cs{svgx at setformatkey} is used.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{magickexe}
 \svg at dummy@key{magicksetting}
 \svg at dummy@key{magickoperator}
-%</base>
+%</main>
 %<*extract>
-\newcommand*\svgx at magick@exe{}
+\svg at ifwindowsdetected{%
+  \newcommand*\svgx at magick@exe{magick}%
+}{%
+  \newcommand*\svgx at magick@exe{convert}%
+}
 \DefineFamilyKey{SVG}{magickexe}{%
   \renewcommand*\svgx at magick@exe{#1}%
   \FamilyKeyStateProcessed%
@@ -4216,8 +4553,17 @@
   \svgx at setformatkey{#1}{svgx at magick@opr}%
   \FamilyKeyStateProcessed%
 }
+\newcommand*\svgx at magick@cmd[3]{%
+  \svgx at magick@exe\space%
+  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-density }%
+  \svgx at useformatkey{svgx at magick@set}{#3}{}%
+  "#1.#2"\space%
+  \svgx at useformatkey{svgx at magick@opr}{#3}{}%
+  "#1.#3"%
+}
 %</extract>
 %    \end{macrocode}
+% \end{macro}^^A \svgx at magick@cmd
 % \end{macro}^^A \svgx at magick@opr
 % \end{option}^^A magickoperator
 % \end{macro}^^A \svgx at magick@set
@@ -4233,6 +4579,7 @@
 % \begin{option}{gsdevice}
 % \changes{v2.00}{2017/02/24}{new}^^A
 % \begin{macro}{\svgx at gs@device}
+% \begin{macro}{\svgx at gs@cmd}
 % Options to set the command including maybe the path to \app{Ghostscript}. As 
 % \app{Ghostscript} needs a specific device defined for different output
 % formats, the option \opt{gsdevice} can be used. It can either be set for all 
@@ -4239,13 +4586,17 @@
 % or a specific output format just like \opt{gsopt} in the same manner like 
 % option \opt{convertdpi}. 
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{gsexe}
 \svg at dummy@key{gsopt}
 \svg at dummy@key{gsdevice}
-%</base>
+%</main>
 %<*extract>
-\newcommand*\svgx at gs@exe{}
+\svg at ifwindowsdetected{%
+  \newcommand*\svgx at gs@exe{gswin64c}%
+}{%
+  \newcommand*\svgx at gs@exe{gs}%
+}
 \DefineFamilyKey{SVG}{gsexe}{%
   \renewcommand*\svgx at gs@exe{#1}%
   \FamilyKeyStateProcessed%
@@ -4260,8 +4611,16 @@
   \svgx at setformatkey{#1}{svgx at gs@device}%
   \FamilyKeyStateProcessed%
 }
+\newcommand*\svgx at gs@cmd[3]{%
+  \svgx at gs@exe\space-dSAFER -dBATCH -dNOPAUSE\space%
+  \svgx at useformatkey{svgx at gs@device}{#3}{-sDEVICE=}%
+  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-r}%
+  \svgx at useformatkey{svgx at gs@opt}{#3}{}%
+  -sOutputFile="#1.#3"\space"#1.#2"%
+}
 %</extract>
 %    \end{macrocode}
+% \end{macro}^^A \svgx at gs@cmd
 % \end{macro}^^A \svgx at gs@device
 % \end{option}^^A gsdevice
 % \end{macro}^^A \svgx at gs@opt
@@ -4278,27 +4637,15 @@
 % \changes{v2.02}{2018/09/07}{usage of \cs{svg at sanitize@dq}}^^A
 % \begin{option}{path}
 % \changes{v2.00}{2017/02/24}{deprecated}^^A
-% \begin{option}{extractname}
-% \changes{v2.00}{2017/02/24}{new}^^A
-% \changes{v2.02}{2018/09/07}{usage of \cs{svg at quotes@remove}}^^A
-% \begin{option}{name}
-% \changes{v2.00}{2017/02/24}{deprecated}^^A
-% \changes{v2.00}{2017/02/24}{support of \pkg{subfig} removed}^^A
 % \begin{macro}{\svgx at out@path}
-% \begin{macro}{\svgx at out@name}
-% \begin{macro}{\if at svgx@out at sec}
-% \begin{counter}{svgx at out@count}
 % The option \opt{extractpath} controls, in which folder the results both of 
 % the extraction as well as the conversion of \app{ImageMagick} or 
-% \app{Ghostscript} will be located. With option \opt{extractname} the 
-% name of the extracted and maybe converted file itself can be changed.
+% \app{Ghostscript} will be located.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{extractpath}
 \svg at dummy@key{path}
-\svg at dummy@key{extractname}
-\svg at dummy@key{name}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at out@path{}
 \DefineFamilyKey{SVG}{extractpath}{%
@@ -4328,9 +4675,33 @@
 \DefineFamilyKey{SVG}{path}{%
   \svg at deprecated@key[svg-extract]{path=#1}{extractpath=#1}%
 }
-\newcounter{svgx at out@count}
+%</extract>
+%    \end{macrocode}
+% \end{macro}^^A \svgx at out@path
+% \end{option}^^A path
+% \end{option}^^A extractpath
+% \begin{option}{extractname}
+% \changes{v2.00}{2017/02/24}{new}^^A
+% \changes{v2.02}{2018/09/07}{usage of \cs{svg at quotes@remove}}^^A
+% \begin{option}{name}
+% \changes{v2.00}{2017/02/24}{deprecated}^^A
+% \changes{v2.00}{2017/02/24}{support of \pkg{subfig} removed}^^A
+% \begin{macro}{\svgx at out@name}
+% \begin{macro}{\if at svgx@out at sec}
+% \begin{counter}{svgx at out@count}
+% \begin{macro}{\svgx at out@sec}
+% With option \opt{extractname} the name of the extracted and maybe converted 
+% file itself can be changed.
+%    \begin{macrocode}
+%<*main>
+\svg at dummy@key{extractname}
+\svg at dummy@key{name}
+%</main>
+%<*extract>
 \newcommand*\svgx at out@name{}
 \newif\if at svgx@out at sec
+\newcounter{svgx at out@count}
+\newcommand*\svgx at out@sec{unknown}
 \DefineFamilyKey{SVG}{extractname}{%
   \svg at quotes@remove[{#1}]{\svg at tempb}%
   \FamilySetNumerical{SVG}{extractname}{svg at tempa}{%
@@ -4363,14 +4734,12 @@
 }
 %</extract>
 %    \end{macrocode}
+% \end{macro}^^A \svgx at out@sec
 % \end{counter}^^A svgx at out@count
 % \end{macro}^^A \if at svgx@out at sec
 % \end{macro}^^A \svgx at out@name
-% \end{macro}^^A \svgx at out@path
 % \end{option}^^A name
 % \end{option}^^A extractname
-% \end{option}^^A path
-% \end{option}^^A extractpath
 %
 %
 %
@@ -4395,13 +4764,13 @@
 % value \val{inherit} means, that the actual option for including is used for
 % extraction as well. This is the default setting.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{extractwidth}
 \svg at dummy@key{extractheight}
 \svg at dummy@key{extractdistort}
 \svg at dummy@key{extractkeepaspectratio}
 \svg at dummy@key{extractscale}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at param@width{\svg at param@width}
 \DefineFamilyKey{SVG}{extractwidth}{%
@@ -4463,7 +4832,7 @@
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
     \if at svg@tempswa%
       \FamilyOptions{SVG}{extractdistort=false}%
-    \else
+    \else%
       \FamilyOptions{SVG}{extractdistort=true}%
     \fi%
   \else%
@@ -4511,11 +4880,11 @@
 % The similar hooks for executing code right before or after the graphic 
 % extraction.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key{extractpretex}
 \svg at dummy@key{extractapptex}
 \svg at dummy@key{extractpostex}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at param@pretex{\svg at param@pretex}
 \DefineFamilyKey{SVG}{extractpretex}{%
@@ -4566,10 +4935,10 @@
 % deleted. Setting \val{true} will remove all files, \val{false} won't clear 
 % any file. Additionally, a specific file list of suffixes can be given.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key[true]{clean}
 \svg at dummy@key[true]{clear}
-%</base>
+%</main>
 %<*extract>
 \newcommand*\svgx at clean{}
 \DefineFamilyKey{SVG}{clean}[true]{%
@@ -4585,7 +4954,7 @@
     \FamilyKeyStateProcessed%
   \fi%
 }
-\DefineFamilyKey{SVG}{clear}{\FamilyOptions{SVG}{clean=#1}}
+\DefineFamilyKey{SVG}{clear}[true]{\FamilyOptions{SVG}{clean=#1}}
 %</extract>
 %    \end{macrocode}
 % \end{macro}^^A \svgx at clean
@@ -4595,9 +4964,9 @@
 % If it is desired not to include but only extract graphics with package 
 % \pkg{svg-extract}, option \opt{exclude} can be used.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \svg at dummy@key[true]{exclude}
-%</base>
+%</main>
 %<*extract>
 \DefineFamilyKey{SVG}{exclude}[true]{%
   \FamilySetBool{SVG}{exclude}{@svg at tempswa}{#1}%
@@ -4643,7 +5012,14 @@
 % \begin{parameter}{extractpretex}
 % \begin{parameter}{extractapptex}
 % \begin{parameter}{extractruns}
+% \begin{parameter}{latexexe}
 % \begin{parameter}{latexopt}
+% \begin{parameter}{latexext}
+% \begin{parameter}{dvipsopt}
+% \begin{parameter}{pstoepsopt}
+% \begin{parameter}{pstopdfopt}
+% \begin{parameter}{pdftoepsopt}
+% \begin{parameter}{pdftopsopt}
 % \begin{parameter}{convert}
 % \begin{parameter}{convertformat}
 % \begin{parameter}{convertdpi}
@@ -4663,10 +5039,18 @@
 % \changes{v2.02}{2018/09/07}{new}^^A
 % \begin{parameter}{extractscale}
 % \begin{parameter}{extractangle}
+% \changes{v2.02}{2018/09/07}{new}^^A
 % \begin{parameter}{extractpretex}
 % \begin{parameter}{extractapptex}
 % \begin{parameter}{extractruns}
+% \begin{parameter}{latexexe}
 % \begin{parameter}{latexopt}
+% \begin{parameter}{latexext}
+% \begin{parameter}{dvipsopt}
+% \begin{parameter}{pstoepsopt}
+% \begin{parameter}{pstopdfopt}
+% \begin{parameter}{pdftoepsopt}
+% \begin{parameter}{pdftopsopt}
 % \begin{parameter}{convert}
 % \begin{parameter}{convertformat}
 % \begin{parameter}{convertdpi}
@@ -4711,7 +5095,14 @@
 % \end{parameter}^^A convertdpi
 % \end{parameter}^^A convertformat
 % \end{parameter}^^A convert
+% \end{parameter}^^A pdftopsopt
+% \end{parameter}^^A pdftoepsopt
+% \end{parameter}^^A pstopdfopt
+% \end{parameter}^^A pstoepsopt
+% \end{parameter}^^A dvipsopt
+% \end{parameter}^^A latexext
 % \end{parameter}^^A latexopt
+% \end{parameter}^^A latexexe
 % \end{parameter}^^A extractruns
 % \end{parameter}^^A extractapptex
 % \end{parameter}^^A extractpretex
@@ -4733,7 +5124,14 @@
 % \end{parameter}^^A convertdpi
 % \end{parameter}^^A convertformat
 % \end{parameter}^^A convert
+% \end{parameter}^^A pdftopsopt
+% \end{parameter}^^A pdftoepsopt
+% \end{parameter}^^A pstopdfopt
+% \end{parameter}^^A pstoepsopt
+% \end{parameter}^^A dvipsopt
+% \end{parameter}^^A latexext
 % \end{parameter}^^A latexopt
+% \end{parameter}^^A latexexe
 % \end{parameter}^^A extractruns
 % \end{parameter}^^A extractapptex
 % \end{parameter}^^A extractpretex
@@ -4752,11 +5150,11 @@
 % \changes{v2.00}{2017/02/24}{new}^^A
 % Some dummys for package \pkg{svg}.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \newcommand*\svghidepreamblestart{%
   \PackageWarning{svg}{%
     The macro `\string\svghidepreamblestart' is only meant\MessageBreak%
-    to be used together with package `svg-extract'.\MessageBreak%
+    to be used together with package `svg-extract'. \MessageBreak%
     Nevertheless, nothing will happen%
   }%
 }
@@ -4763,11 +5161,11 @@
 \newcommand*\svghidepreambleend{%
   \PackageWarning{svg}{%
     The macro `\string\svghidepreambleend' is only meant\MessageBreak%
-    to be used together with package `svg-extract'.\MessageBreak%
+    to be used together with package `svg-extract'. \MessageBreak%
     Nevertheless, nothing will happen%
   }%
 }
-%</base>
+%</main>
 %    \end{macrocode}
 % These two macros can be used to hide some parts of the preamble during 
 % reading the preamble of the main document.
@@ -4785,18 +5183,14 @@
 % \subsection{Auxiliary macros}
 %
 % \begin{macro}{\svg at extract}
-% \begin{macro}{\svgx at stream@in}
-% \begin{macro}{\svgx at read@line}
-% \begin{macro}{\svgx at stream@out}
-% \begin{macro}{\if at svgx@preamble at write}
 % The macro \cs{svg at extract} does the actual job of both extracting and 
 % converting independent graphic files. Since it is necessary to run it with 
 % \file{-{}-shell-escape} enabled, the command raises a warning if it is not 
 % activated. Afterwards, the package is finished.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \newcommand*\svg at extract[1]{}
-%</base>
+%</main>
 %<*extract>
 \ifnum\pdf at shellescape=\@ne\relax\else%
   \renewcommand*\svg at extract[1]{%
@@ -4814,15 +5208,37 @@
   }%
   \expandafter\endinput%
 \fi
+%</extract>
 %    \end{macrocode}
-% If \file{-{}-shell-escape} is enabled, the command is defined with its
-% intended functionality. Some macros and a input stream as well as a output
-% stream are necessary for this.
+% \end{macro}^^A \svg at extract
+%
+% \iffalse
+%</package&body>
+%<*package&body&extract>
+% \fi
+%
+% \begin{macro}{\svgx at stream@in}
+% \begin{macro}{\svgx at read@line}
+% \begin{macro}{\svgx at stream@out}
+% \begin{macro}{\if at svgx@preamble at write}
+% Both an input stream and an output stream are necessary for this as well as a
+% token register, which is used to store all commands which should be executed
+% on shell.
 %    \begin{macrocode}
 \newread\svgx at stream@in
 \newcommand*\svgx at read@line{}
 \newwrite\svgx at stream@out
 \newif\if at svgx@preamble at write
+%    \end{macrocode}
+% \end{macro}^^A \if at svgx@preamble at write
+% \end{macro}^^A \svgx at stream@out
+% \end{macro}^^A \svgx at read@line
+% \end{macro}^^A \svgx at stream@in
+% \begin{macro}{\svg at extract}
+% If flag \file{-{}-shell-escape} is enabled, the command is defined with its
+% intended functionality. It runs all necessary processes to extract and
+% convert grahic files.
+%    \begin{macrocode}
 \renewcommand*\svg at extract[1]{%
 %    \end{macrocode}
 % If option \opt{extract} is enabled\dots
@@ -5263,26 +5679,13 @@
     }%
   \fi%
 }
-%</extract>
 %    \end{macrocode}
-% \end{macro}^^A \if at svgx@preamble at write
-% \end{macro}^^A \svgx at stream@out
-% \end{macro}^^A \svgx at read@line
-% \end{macro}^^A \svgx at stream@in
 % \end{macro}^^A \svg at extract
-%
-% \iffalse
-%</package&body>
-%<*package&extract&body>
-% \fi
-%
 % \begin{macro}{\svgx at get@out at sec}
-% \begin{macro}{\svgx at out@sec}
 % The macro \cs{svgx at get@out at sec} reads all sectioning counters in order to 
 % get the numbering of the current sectioning level. The value is stored in 
 % \cs{svgx at out@sec}.
 %    \begin{macrocode}
-\newcommand*\svgx at out@sec{unknown}
 \newcommand*\svgx at get@out at sec{%
   \begingroup%
     \def\svg at tempa{}%
@@ -5306,11 +5709,10 @@
   \svg at tempb%
 }
 %    \end{macrocode}
-% \end{macro}^^A \svgx at out@sec
 % \end{macro}^^A \svgx at get@out at sec
 % \begin{macro}{\svgx at documentclass}
 % \begin{macro}{\if at svgx@classfound}
-% This delimited macro is used to find a occurrence of \cs{documentclass} 
+% This delimited macro is used to find the occurrence of \cs{documentclass} 
 % within a read in line. The delinmiter \cs{documentclass} is used twice in
 % order to ignore the possible occurrence of white space or anything else right
 % before \cs{documentclass}.
@@ -5425,46 +5827,6 @@
 %    \end{macrocode}
 % \end{macro}^^A \svgx at cnv@get at informat
 % \end{macro}^^A \svgx at cnv@informat
-% \begin{macro}{\svgx at magick@cmd}
-% \begin{macro}{\svgx at gs@cmd}
-% Depending on option \opt{convert}, one of these two macros is actually used
-% by \cs{svgx at cnv@cmd}. For invoking the conversion process, the required 
-% platform-dependent executable is set, if nothing was set by a package option.
-%    \begin{macrocode}
-\ifx\svgx at magick@exe\@empty
-  \ifwindows
-    \renewcommand*\svgx at magick@exe{magick}
-  \else
-    \renewcommand*\svgx at magick@exe{convert}
-  \fi
-\fi
-\newcommand*\svgx at magick@cmd[3]{%
-  \svgx at magick@exe\space%
-  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-density }%
-  \svgx at useformatkey{svgx at magick@set}{#3}{}%
-  "#1.#2"\space%
-  \svgx at useformatkey{svgx at magick@opr}{#3}{}%
-  "#1.#3"%
-}
-%    \end{macrocode}
-%    \begin{macrocode}
-\ifx\svgx at gs@exe\@empty
-  \ifwindows
-    \renewcommand*\svgx at gs@exe{gswin64c}
-  \else
-    \renewcommand*\svgx at gs@exe{gs}
-  \fi
-\fi
-\newcommand*\svgx at gs@cmd[3]{%
-  \svgx at gs@exe\space-dSAFER -dBATCH -dNOPAUSE\space%
-  \svgx at useformatkey{svgx at gs@device}{#3}{-sDEVICE=}%
-  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-r}%
-  \svgx at useformatkey{svgx at gs@opt}{#3}{}%
-  -sOutputFile="#1.#3"\space"#1.#2"%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svgx at gs@cmd
-% \end{macro}^^A \svgx at magick@cmd
 % \begin{macro}{\svgx at move}
 % If the file doesn't exist
 %    \begin{macrocode}
@@ -5471,7 +5833,7 @@
 \newcommand*\svgx at move[3]{%
   \begingroup%
     \IfFileExists{"#1".#2}{%
-      \svg at shell@move{#1.#2}{#3#1.#2}%
+      \svg at shell@mv{#1.#2}{#3#1.#2}%
     }{%
       \edef\svg at tempa{#2}%
       \@svg at tempswafalse%
@@ -5508,177 +5870,10 @@
 % \end{macro}^^A \svgx at move
 %
 % \iffalse
-%</package&extract&body>
-%<*package&extract&option>
+%</package&body&extract>
+%<*package&standalone&extract>
 % \fi
 %
-% \begin{macro}{\svgx at ifinlist}
-% Check, if the first argument is included in a comma-separated list in the 
-% second argument. Keep in mind that the first argument is not expanded at all, 
-% the second one exactly once. 
-%    \begin{macrocode}
-\newcommand*\svgx at ifinlist[2]{%
-  \begingroup%
-    \def\svg at tempa##1,#1,##2\@nil{%
-      \IfArgIsEmpty{##2}{%
-        \aftergroup\@secondoftwo%
-      }{%
-        \aftergroup\@firstoftwo%
-      }%
-    }%
-    \expandafter\svg at tempa\expandafter,#2,#1,\@nil%
-  \endgroup%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svgx at ifinlist
-% \begin{macro}{\svgx at onlywindows}
-% Do only some stuff, if Windows was detected.
-%    \begin{macrocode}
-\newcommand*\svgx at onlywindows[1]{}
-\AfterPackage*{ifplatform}{\renewcommand*\svgx at onlywindows[1]{\ifwindows#1\fi}}
-%    \end{macrocode}
-% \end{macro}^^A \svgx at onlywindows
-% \begin{macro}{\svgx at ifkeyandval}
-% It is checked whether a key was given as \val{\meta{key}=\meta{value}} or 
-% like \val{\meta{key}=\{\meta{format}=\meta{value}\}}.
-%    \begin{macrocode}
-\newcommand*\svgx at ifkeyandval[3]{%
-  \def\svg at tempa##1=##2=##3\@nil{\Ifstr{##3}{=}{#2}{#3}}%
-  \svg at tempa#1==\@nil%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svgx at ifkeyandval
-% \begin{macro}{\svgx at cnv@get at dpi}
-% This macro is used to resolve a given value to set the density for the 
-% conversion. The delimited macros \cs{svg at tempa} and \cs{svg at tempb} are 
-% defined to first crop any given suffix \val{dpi} and second to split two 
-% numbers at |x|, if present. Pay attention how both macros are invoked. In the
-% end, a passed value in any of the forms \val{300}, \val{300dpi}, \val{300x400}
-% or \val{300x400dpi} and even \val{300dpix400dpi} is possible. The result is
-% stored in \cs{svg at tempa}.
-%    \begin{macrocode}
-\newcommand*\svgx at cnv@get at dpi[1]{%
-  \begingroup%
-    \def\svg at tempa##1dpi##2x##3dpi##4\@nil{%
-      \edef\svg at tempa{##1}%
-%    \end{macrocode}
-% Switch \cs{if at svg@tempswa} as \cs{iftrue} means, a valid value was found.
-%    \begin{macrocode}
-      \@svg at tempswafalse%
-%    \end{macrocode}
-% If only the first argument is a number and third is empty, a single number 
-% was given and there's nothing more to do. If the argument is something like 
-% \val{300dpix400dpi}, the third argument is the second number.
-%    \begin{macrocode}
-      \Ifnumber{##1}{%
-        \IfArgIsEmpty{##3}{\@svg at tempswatrue}{%
-          \Ifnumber{##3}{\edef\svg at tempa{##1x##3}}{}%
-        }%
-      }{}%
-      \if at svg@tempswa\else%
-        \expandafter\svg at tempb\svg at tempa xx\@nil%
-      \fi%
-    }%
-%    \end{macrocode}
-% Macro \cs{svg at tempb} splits at |x| and checks, if something valid like 
-% \val{300x400} was given. If true, the value is stored in \cs{svg at tempa}.
-%    \begin{macrocode}
-    \def\svg at tempb##1x##2x##3\@nil{%
-      \Ifstr{##3}{x}{%
-        \@svg at tempswatrue%
-        \IfArgIsEmpty{##1}{\@svg at tempswafalse}{%
-          \Ifnumber{##1}{}{\@svg at tempswafalse}%
-        }%
-        \IfArgIsEmpty{##2}{\@svg at tempswafalse}{%
-          \Ifnumber{##2}{}{\@svg at tempswafalse}%
-        }%
-        \if at svg@tempswa%
-          \edef\svg at tempa{##1x##2}%
-        \fi%
-      }{}%
-    }%
-    \IfArgIsEmpty{#1}{%
-      \let\svg at tempa\@empty%
-    }{%
-      \lowercase{\svg at tempa#1dpi#1xdpi\@nil}%
-      \if at svg@tempswa\else%
-        \let\svg at tempa\relax%
-      \fi%
-    }%
-    \edef\svg at tempb{%
-      \endgroup%
-      \ifx\svg at tempa\relax%
-        \let\noexpand\svg at tempa\noexpand\relax%
-      \else%
-        \def\noexpand\svg at tempa{\svg at tempa}%
-      \fi%
-    }%
-  \svg at tempb%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svgx at cnv@get at dpi
-% \begin{macro}{\svgx at setformatkey}
-% \begin{macro}{\svgx at useformatkey}
-% With \cs{svgx at setformatkey} the---maybe output format depend---keys for the 
-% conversion tools are set. First argument contains the value given to a key, 
-% second the command sequence name of the macro, to whom the value shall be 
-% allocated.
-%    \begin{macrocode}
-\newcommand*\svgx at setformatkey[2]{%
-%    \end{macrocode}
-% A key of the form \val{\meta{key}=\{\meta{format}=\meta{value}\}} is given. 
-% The desired output format can be accessed with |##1|, the value with |##2|
-% within the arguments of \cs{svgx at ifkeyandval}.
-%    \begin{macrocode}
-  \svgx at ifkeyandval{#1}{%
-    \svg at ifvalueisrelax{##2}{%
-      \expandafter\let\csname #2@##1\endcsname\relax%
-    }{%
-      \@namedef{#2@##1}{##2}%
-    }%
-%    \end{macrocode}
-% A key of the form \val{\meta{key}=\{\meta{format}=\meta{value}\}} is given.
-% The value can be used with |##1|.
-%    \begin{macrocode}
-  }{%
-    \svg at ifvalueisrelax{##1}{%
-      \expandafter\let\csname #2\endcsname\relax%
-    }{%
-      \@namedef{#2}{##1}%
-    }%
-  }%
-}
-%    \end{macrocode}
-% The command \cs{svgx at useformatkey} checks, if a format specific key was 
-% definded with \cs{svgx at setformatkey}, whereas the format is given in the 
-% second argument. If this is not the case, the setting for all output formats 
-% is used. After that, a specific key appended with a |+| can be used to do 
-% some additional stuff.
-%    \begin{macrocode}
-\newcommand*\svgx at useformatkey[3]{%
-  \scr at ifundefinedorrelax{#1@#2}{%
-    \scr at ifundefinedorrelax{#1}{}{%
-      \expandafter\ifx\csname #1\endcsname\@empty\else%
-        #3\@nameuse{#1}\space%
-      \fi%
-    }%
-    \scr at ifundefinedorrelax{#1@#2+}{}{%
-      \expandafter\ifx\csname #1@#2+\endcsname\@empty\else%
-        #3\@nameuse{#1@#2+}\space%
-      \fi%
-    }%
-  }{%
-%    \end{macrocode}
-% If this a format specific key was definded, it is used.
-%    \begin{macrocode}
-    \expandafter\ifx\csname #1@#2\endcsname\@empty\else%
-      #3\@nameuse{#1@#2}\space%
-    \fi%
-  }%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svgx at useformatkey
-% \end{macro}^^A \svgx at setformatkey
 %
 %
 %
@@ -5796,7 +5991,7 @@
 % \end{macro}^^A \svgxoutputbox
 %
 % \iffalse
-%</package&extract&option>
+%</package&standalone&extract>
 %<*package&option>
 % \fi
 %
@@ -5807,13 +6002,13 @@
 % Setting the default options and processing the given ones during when loading 
 % the packages.
 %    \begin{macrocode}
-%<*base>
+%<*main>
 \FamilyExecuteOptions{SVG}{%
-  inkscape=true,inkscapeversion=auto,inkscapepath=basesubdir,
+  inkscape=true,inkscapeversion=auto,inkscapepath=basesubdir,%
   inkscapelatex=true,inkscapearea=drawing,distort=false,%
   usexcolor=true,usetransparent=true%
 }
-%</base>
+%</main>
 %<*extract>
 \FamilyExecuteOptions{SVG}{%
   extract=true,extractpath=basesubdir,%
@@ -5829,79 +6024,8 @@
 %
 % \iffalse
 %</package&option>
-%<*package&base&body>
 % \fi
 %
-%
-%
-% \section{Macros for file access}
-%
-% Finally, platform dependend macros for creating directories as well as moving 
-% and deleting files are provided, if \file{-{}-shell-escape} is enabled. Only 
-% then package \pkg{ifplatform} is only used in order to do not raise a warning.
-%    \begin{macrocode}
-\ifnum\pdf at shellescape=\@ne\relax\else%
-  \expandafter\endinput%
-\fi
-\RequirePackage{ifplatform}[2017/10/13]
-%    \end{macrocode}
-% \begin{macro}{\svg at shell@mkdir}
-% \begin{macro}{\svg at shell@@mkdir}
-% \begin{macro}{\svg at shell@mv}
-% \begin{macro}{\svg at shell@@mv}
-% \begin{macro}{\svg at shell@rm}
-% \begin{macro}{\svg at shell@@rm}
-% The platform dependent commands for file access.
-%    \begin{macrocode}
-\ifwindows
-  \newcommand*\svg at shell@@mkdir[1]{if not exist "#1" mkdir "#1"}
-  \newcommand*\svg at shell@@mv{move}
-  \newcommand*\svg at shell@@rm{del}
-\else
-  \newcommand*\svg at shell@@mkdir[1]{mkdir -p "#1"}
-  \newcommand*\svg at shell@@mv{mv}
-  \newcommand*\svg at shell@@rm{rm}
-\fi
-%    \end{macrocode}
-% A directory should only be created, if it isn't the current working directory.
-%    \begin{macrocode}
-\newcommand*\svg at shell@mkdir[1]{%
-  \begingroup%
-    \svg at quotes@remove[{#1}]{\svg at tempa}%
-    \@svg at tempswatrue%
-    \Ifstr{\svg at tempa}{}{\@svg at tempswafalse}{%
-    \Ifstr{\svg at tempa}{./}{\@svg at tempswafalse}{%
-    }}%
-    \if at svg@tempswa%
-      \ShellEscape{\svg at shell@@mkdir{\svg at tempa}}%
-    \fi%
-  \endgroup%
-}
-%    \end{macrocode}
-% Commands for moving and deleting files.
-%    \begin{macrocode}
-\newcommand*\svg at shell@move[2]{%
-  \ShellEscape{\svg at shell@@mv\space"#1"\space"#2"}%
-}
-\newcommand*\svg at shell@rm[1]{%
-  \ShellEscape{\svg at shell@@rm\space"#1"}%
-}
-%    \end{macrocode}
-% \end{macro}^^A \svg at shell@@rm
-% \end{macro}^^A \svg at shell@rm
-% \end{macro}^^A \svg at shell@@mv
-% \end{macro}^^A \svg at shell@mv
-% \end{macro}^^A \svg at shell@@mkdir
-% \end{macro}^^A \svg at shell@mkdir
-% At the very end, the catcodes are restored.
-%    \begin{macrocode}
-\svg at catcodecodes@restore
-%    \end{macrocode}
-%
-% \iffalse
-%</package&base&body>
-% \fi
-%
 % \Finale
 %
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty	2020-06-12 21:02:23 UTC (rev 55526)
+++ trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty	2020-06-12 21:02:37 UTC (rev 55527)
@@ -4,17 +4,21 @@
 %%
 %% The original source files were:
 %%
+%% svg.dtx  (with options: `package,identify,extract')
+%% svg.dtx  (with options: `package,base,extract')
 %% svg.dtx  (with options: `package,option,extract')
+%% svg.dtx  (with options: `package,standalone,extract')
 %% svg.dtx  (with options: `package,body,extract')
 %% 
 %% svg-extract -- Extract independent graphic files from SVG pictures
 %% 
+%% ----------------------------------------------------------------------------
+%%
 %% Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016
-%% Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-
-%% 
-%% This file was generated from file svg.dtx.
+%% Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-2020
+%%
 %% ----------------------------------------------------------------------------
-%% 
+%%
 %% This work may be distributed and/or modified under the conditions
 %% of the LaTeX Project Public License, version 1.3c of the license.
 %% The latest version of this license is in
@@ -21,22 +25,68 @@
 %%     http://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX 2005/12/01 or later and of this work.
-%% 
+%%
 %% This work has the LPPL maintenance status "author-maintained".
-%% 
+%%
 %% The current maintainer and author of this work is Falk Hanisch.
-%% 
+%%
 %% This work consists of the main source file README.md, LICENSE.md, svg.dtx
 %% and the derived documentation svg.pdf as well as the example files
 %% svg-example.svg, svg-preamble.tex and root.C (with derived file root.svg).
-%% 
-%% 
+%%
+%% ----------------------------------------------------------------------------
+%%
 \NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\ProvidesPackage{svg-extract}[%
-  2020/05/07 v2.02f\space%
-  (extract independent graphics from SVG pictures)%
-]
-\RequirePackage{svg}[2020/05/07]
+\begingroup
+  \catcode`\@11\relax%
+  \def\svg at Provides#1#2[#3]{%
+    \def\@tempa{\def\svg at version{#3}}%
+    \ifx\svg at version\@undefined\else%
+      \def\@tempb{#3}%
+      \ifx\svg at version\@tempb\else%
+        \def\@tempa{%
+          \@latex at warning@no at line{%
+            The version of package `#1' is `#3',\MessageBreak%
+            but `\svg at version' was expected!\MessageBreak%
+            You should update the svg bundle%
+          }%
+        }%
+      \fi%
+    \fi%
+    \edef\@tempb{%
+      \endgroup%
+      \noexpand\ProvidesPackage%
+      {#1}[#3\space(#2)]%
+      \noexpand\RequirePackage{svg}[#3]%
+      \unexpanded\expandafter{\@tempa}%
+    }%
+  }%
+  \svg at Provides%
+  {svg-extract}{extract graphics from SVG pictures}%
+  [2020/06/12 v2.02g]%
+\@tempb
+\edef\svg at catcodecodes@restore{%
+  \catcode`\noexpand\"\the\catcode`\"\relax%
+}
+\@makeother\"%
+\AtEndOfPackage{\svg at catcodecodes@restore}
+\newcommand*\svgx@@ifkeyandval{}
+\newcommand*\svgx at ifkeyandval[3]{%
+  \def\svgx@@ifkeyandval##1=##2=##3\@nil{\IfArgIsEmpty{##3}{#3}{#2}}%
+  \svgx@@ifkeyandval#1==\@nil%
+}
+\newcommand*\svgx at ifinlist[2]{%
+  \begingroup%
+    \def\svg at tempa##1,#1,##2\@nil{%
+      \IfArgIsEmpty{##2}{%
+        \aftergroup\@secondoftwo%
+      }{%
+        \aftergroup\@firstoftwo%
+      }%
+    }%
+    \expandafter\svg at tempa\expandafter,#2,#1,\@nil%
+  \endgroup%
+}
 \DefineFamily{SVG}
 \DefineFamilyMember{SVG}
 \newif\if at svgx@run
@@ -190,8 +240,8 @@
   \FamilyKeyStateProcessed%
 }
 \DefineFamilyKey{SVG}{pdftops}{%
-  \PackageWarning{#1}{%
-    The option key `pdftops' is deprecated.\MessageBreak%
+  \PackageWarning{svg-extract}{%
+    The option key `pdftops' is deprecated. \MessageBreak%
     You should use either `pdftoepsopt' or\MessageBreak%
     `pdftopsopt' instead. See the manual for\MessageBreak%
     more. Nothing was done%
@@ -224,17 +274,17 @@
     \or% gs64
       \@svgx at cnv@runtrue%
       \renewcommand*\svgx at cnv@cmd{\svgx at gs@cmd}%
-      \svgx at onlywindows{%
+      \svg at ifwindowsdetected{%
         \renewcommand*\svgx at gs@exe{gswin64c}%
-      }%
+      }{}%
     \or% gs32
       \@svgx at cnv@runtrue%
       \renewcommand*\svgx at cnv@cmd{\svgx at gs@cmd}%
-      \svgx at onlywindows{%
+      \svg at ifwindowsdetected{%
         \renewcommand*\svgx at gs@exe{gswin32c}%
-      }%
+      }{}%
     \fi%
-  \else%
+  \else% legacy option
     \def\svg at tempa##1-##2\@nil{%
       \IfArgIsEmpty{##2}{\def\svg at tempb{}}{%
         \def\svg at tempa##1####1\@nil{\def\svg at tempb{####1}}%
@@ -309,7 +359,90 @@
   }%
 }
 \DefineFamilyKey{SVG}{convertdensity}{\FamilyOptions{SVG}{convertdpi=#1}}
-\newcommand*\svgx at magick@exe{}
+\newcommand*\svgx at cnv@get at dpi[1]{%
+  \begingroup%
+    \def\svg at tempa##1dpi##2x##3dpi##4\@nil{%
+      \edef\svg at tempa{##1}%
+      \@svg at tempswafalse%
+      \Ifnumber{##1}{%
+        \IfArgIsEmpty{##3}{\@svg at tempswatrue}{%
+          \Ifnumber{##3}{\edef\svg at tempa{##1x##3}}{}%
+        }%
+      }{}%
+      \if at svg@tempswa\else%
+        \expandafter\svg at tempb\svg at tempa xx\@nil%
+      \fi%
+    }%
+    \def\svg at tempb##1x##2x##3\@nil{%
+      \Ifstr{##3}{x}{%
+        \@svg at tempswatrue%
+        \IfArgIsEmpty{##1}{\@svg at tempswafalse}{%
+          \Ifnumber{##1}{}{\@svg at tempswafalse}%
+        }%
+        \IfArgIsEmpty{##2}{\@svg at tempswafalse}{%
+          \Ifnumber{##2}{}{\@svg at tempswafalse}%
+        }%
+        \if at svg@tempswa%
+          \edef\svg at tempa{##1x##2}%
+        \fi%
+      }{}%
+    }%
+    \IfArgIsEmpty{#1}{%
+      \let\svg at tempa\@empty%
+    }{%
+      \lowercase{\svg at tempa#1dpi#1xdpi\@nil}%
+      \if at svg@tempswa\else%
+        \let\svg at tempa\relax%
+      \fi%
+    }%
+    \edef\svg at tempb{%
+      \endgroup%
+      \ifx\svg at tempa\relax%
+        \let\noexpand\svg at tempa\noexpand\relax%
+      \else%
+        \def\noexpand\svg at tempa{\svg at tempa}%
+      \fi%
+    }%
+  \svg at tempb%
+}
+\newcommand*\svgx at setformatkey[2]{%
+  \svgx at ifkeyandval{#1}{%
+    \svg at ifvalueisrelax{##2}{%
+      \expandafter\let\csname #2@##1\endcsname\relax%
+    }{%
+      \@namedef{#2@##1}{##2}%
+    }%
+  }{%
+    \svg at ifvalueisrelax{##1}{%
+      \expandafter\let\csname #2\endcsname\relax%
+    }{%
+      \@namedef{#2}{##1}%
+    }%
+  }%
+}
+\newcommand*\svgx at useformatkey[3]{%
+  \scr at ifundefinedorrelax{#1@#2}{%
+    \scr at ifundefinedorrelax{#1}{}{%
+      \expandafter\ifx\csname #1\endcsname\@empty\else%
+        #3\@nameuse{#1}\space%
+      \fi%
+    }%
+    \scr at ifundefinedorrelax{#1@#2+}{}{%
+      \expandafter\ifx\csname #1@#2+\endcsname\@empty\else%
+        #3\@nameuse{#1@#2+}\space%
+      \fi%
+    }%
+  }{%
+    \expandafter\ifx\csname #1@#2\endcsname\@empty\else%
+      #3\@nameuse{#1@#2}\space%
+    \fi%
+  }%
+}
+\svg at ifwindowsdetected{%
+  \newcommand*\svgx at magick@exe{magick}%
+}{%
+  \newcommand*\svgx at magick@exe{convert}%
+}
 \DefineFamilyKey{SVG}{magickexe}{%
   \renewcommand*\svgx at magick@exe{#1}%
   \FamilyKeyStateProcessed%
@@ -324,7 +457,19 @@
   \svgx at setformatkey{#1}{svgx at magick@opr}%
   \FamilyKeyStateProcessed%
 }
-\newcommand*\svgx at gs@exe{}
+\newcommand*\svgx at magick@cmd[3]{%
+  \svgx at magick@exe\space%
+  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-density }%
+  \svgx at useformatkey{svgx at magick@set}{#3}{}%
+  "#1.#2"\space%
+  \svgx at useformatkey{svgx at magick@opr}{#3}{}%
+  "#1.#3"%
+}
+\svg at ifwindowsdetected{%
+  \newcommand*\svgx at gs@exe{gswin64c}%
+}{%
+  \newcommand*\svgx at gs@exe{gs}%
+}
 \DefineFamilyKey{SVG}{gsexe}{%
   \renewcommand*\svgx at gs@exe{#1}%
   \FamilyKeyStateProcessed%
@@ -339,6 +484,13 @@
   \svgx at setformatkey{#1}{svgx at gs@device}%
   \FamilyKeyStateProcessed%
 }
+\newcommand*\svgx at gs@cmd[3]{%
+  \svgx at gs@exe\space-dSAFER -dBATCH -dNOPAUSE\space%
+  \svgx at useformatkey{svgx at gs@device}{#3}{-sDEVICE=}%
+  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-r}%
+  \svgx at useformatkey{svgx at gs@opt}{#3}{}%
+  -sOutputFile="#1.#3"\space"#1.#2"%
+}
 \newcommand*\svgx at out@path{}
 \DefineFamilyKey{SVG}{extractpath}{%
   \svg at sanitize@dq\svg at tempb{#1}%
@@ -367,9 +519,10 @@
 \DefineFamilyKey{SVG}{path}{%
   \svg at deprecated@key[svg-extract]{path=#1}{extractpath=#1}%
 }
-\newcounter{svgx at out@count}
 \newcommand*\svgx at out@name{}
 \newif\if at svgx@out at sec
+\newcounter{svgx at out@count}
+\newcommand*\svgx at out@sec{unknown}
 \DefineFamilyKey{SVG}{extractname}{%
   \svg at quotes@remove[{#1}]{\svg at tempb}%
   \FamilySetNumerical{SVG}{extractname}{svg at tempa}{%
@@ -460,7 +613,7 @@
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
     \if at svg@tempswa%
       \FamilyOptions{SVG}{extractdistort=false}%
-    \else
+    \else%
       \FamilyOptions{SVG}{extractdistort=true}%
     \fi%
   \else%
@@ -530,7 +683,7 @@
     \FamilyKeyStateProcessed%
   \fi%
 }
-\DefineFamilyKey{SVG}{clear}{\FamilyOptions{SVG}{clean=#1}}
+\DefineFamilyKey{SVG}{clear}[true]{\FamilyOptions{SVG}{clean=#1}}
 \DefineFamilyKey{SVG}{exclude}[true]{%
   \FamilySetBool{SVG}{exclude}{@svg at tempswa}{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
@@ -548,103 +701,15 @@
     \fi%
   \fi%
 }
-\newcommand*\svgx at ifinlist[2]{%
-  \begingroup%
-    \def\svg at tempa##1,#1,##2\@nil{%
-      \IfArgIsEmpty{##2}{%
-        \aftergroup\@secondoftwo%
-      }{%
-        \aftergroup\@firstoftwo%
-      }%
-    }%
-    \expandafter\svg at tempa\expandafter,#2,#1,\@nil%
-  \endgroup%
+\FamilyExecuteOptions{SVG}{%
+  extract=true,extractpath=basesubdir,%
+  extractruns=2,extractname=namenumbered,extractdistort=false,%
+  convert=magick,convert=false,%
+  gsdevice={png=png16m},gsdevice={jpeg=jpeg},gsdevice={jpg=jpeg},%
+  gsdevice={tif=tiff48nc},gsdevice={tiff=tiff48nc},%
+  gsdevice={eps=eps2write},gsdevice={ps=ps2write}%
 }
-\newcommand*\svgx at onlywindows[1]{}
-\AfterPackage*{ifplatform}{\renewcommand*\svgx at onlywindows[1]{\ifwindows#1\fi}}
-\newcommand*\svgx at ifkeyandval[3]{%
-  \def\svg at tempa##1=##2=##3\@nil{\Ifstr{##3}{=}{#2}{#3}}%
-  \svg at tempa#1==\@nil%
-}
-\newcommand*\svgx at cnv@get at dpi[1]{%
-  \begingroup%
-    \def\svg at tempa##1dpi##2x##3dpi##4\@nil{%
-      \edef\svg at tempa{##1}%
-      \@svg at tempswafalse%
-      \Ifnumber{##1}{%
-        \IfArgIsEmpty{##3}{\@svg at tempswatrue}{%
-          \Ifnumber{##3}{\edef\svg at tempa{##1x##3}}{}%
-        }%
-      }{}%
-      \if at svg@tempswa\else%
-        \expandafter\svg at tempb\svg at tempa xx\@nil%
-      \fi%
-    }%
-    \def\svg at tempb##1x##2x##3\@nil{%
-      \Ifstr{##3}{x}{%
-        \@svg at tempswatrue%
-        \IfArgIsEmpty{##1}{\@svg at tempswafalse}{%
-          \Ifnumber{##1}{}{\@svg at tempswafalse}%
-        }%
-        \IfArgIsEmpty{##2}{\@svg at tempswafalse}{%
-          \Ifnumber{##2}{}{\@svg at tempswafalse}%
-        }%
-        \if at svg@tempswa%
-          \edef\svg at tempa{##1x##2}%
-        \fi%
-      }{}%
-    }%
-    \IfArgIsEmpty{#1}{%
-      \let\svg at tempa\@empty%
-    }{%
-      \lowercase{\svg at tempa#1dpi#1xdpi\@nil}%
-      \if at svg@tempswa\else%
-        \let\svg at tempa\relax%
-      \fi%
-    }%
-    \edef\svg at tempb{%
-      \endgroup%
-      \ifx\svg at tempa\relax%
-        \let\noexpand\svg at tempa\noexpand\relax%
-      \else%
-        \def\noexpand\svg at tempa{\svg at tempa}%
-      \fi%
-    }%
-  \svg at tempb%
-}
-\newcommand*\svgx at setformatkey[2]{%
-  \svgx at ifkeyandval{#1}{%
-    \svg at ifvalueisrelax{##2}{%
-      \expandafter\let\csname #2@##1\endcsname\relax%
-    }{%
-      \@namedef{#2@##1}{##2}%
-    }%
-  }{%
-    \svg at ifvalueisrelax{##1}{%
-      \expandafter\let\csname #2\endcsname\relax%
-    }{%
-      \@namedef{#2}{##1}%
-    }%
-  }%
-}
-\newcommand*\svgx at useformatkey[3]{%
-  \scr at ifundefinedorrelax{#1@#2}{%
-    \scr at ifundefinedorrelax{#1}{}{%
-      \expandafter\ifx\csname #1\endcsname\@empty\else%
-        #3\@nameuse{#1}\space%
-      \fi%
-    }%
-    \scr at ifundefinedorrelax{#1@#2+}{}{%
-      \expandafter\ifx\csname #1@#2+\endcsname\@empty\else%
-        #3\@nameuse{#1@#2+}\space%
-      \fi%
-    }%
-  }{%
-    \expandafter\ifx\csname #1@#2\endcsname\@empty\else%
-      #3\@nameuse{#1@#2}\space%
-    \fi%
-  }%
-}
+\FamilyProcessOptions{SVG}
 \newif\if at svgx@standalone
 \newcommand*\svgxsetbox[2][]{%
   \@svgx at standalonetrue%
@@ -709,15 +774,6 @@
     \endgraf%
   \endgroup%
 }
-\FamilyExecuteOptions{SVG}{%
-  extract=true,extractpath=basesubdir,%
-  extractruns=2,extractname=namenumbered,extractdistort=false,%
-  convert=magick,convert=false,%
-  gsdevice={png=png16m},gsdevice={jpeg=jpeg},gsdevice={jpg=jpeg},%
-  gsdevice={tif=tiff48nc},gsdevice={tiff=tiff48nc},%
-  gsdevice={eps=eps2write},gsdevice={ps=ps2write}%
-}
-\FamilyProcessOptions{SVG}
 \DefineFamilyMember[.param]{SVG}
 \newcommand*\svgx at param@angle{0}
 \svg at local@param at def{%
@@ -1063,7 +1119,6 @@
     }%
   \fi%
 }
-\newcommand*\svgx at out@sec{unknown}
 \newcommand*\svgx at get@out at sec{%
   \begingroup%
     \def\svg at tempa{}%
@@ -1147,39 +1202,10 @@
     \fi\fi%
   \fi%
 }
-\ifx\svgx at magick@exe\@empty
-  \ifwindows
-    \renewcommand*\svgx at magick@exe{magick}
-  \else
-    \renewcommand*\svgx at magick@exe{convert}
-  \fi
-\fi
-\newcommand*\svgx at magick@cmd[3]{%
-  \svgx at magick@exe\space%
-  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-density }%
-  \svgx at useformatkey{svgx at magick@set}{#3}{}%
-  "#1.#2"\space%
-  \svgx at useformatkey{svgx at magick@opr}{#3}{}%
-  "#1.#3"%
-}
-\ifx\svgx at gs@exe\@empty
-  \ifwindows
-    \renewcommand*\svgx at gs@exe{gswin64c}
-  \else
-    \renewcommand*\svgx at gs@exe{gs}
-  \fi
-\fi
-\newcommand*\svgx at gs@cmd[3]{%
-  \svgx at gs@exe\space-dSAFER -dBATCH -dNOPAUSE\space%
-  \svgx at useformatkey{svgx at gs@device}{#3}{-sDEVICE=}%
-  \svgx at useformatkey{svgx at cnv@dpi}{#3}{-r}%
-  \svgx at useformatkey{svgx at gs@opt}{#3}{}%
-  -sOutputFile="#1.#3"\space"#1.#2"%
-}
 \newcommand*\svgx at move[3]{%
   \begingroup%
     \IfFileExists{"#1".#2}{%
-      \svg at shell@move{#1.#2}{#3#1.#2}%
+      \svg at shell@mv{#1.#2}{#3#1.#2}%
     }{%
       \edef\svg at tempa{#2}%
       \@svg at tempswafalse%

Modified: trunk/Master/texmf-dist/tex/latex/svg/svg.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/svg/svg.sty	2020-06-12 21:02:23 UTC (rev 55526)
+++ trunk/Master/texmf-dist/tex/latex/svg/svg.sty	2020-06-12 21:02:37 UTC (rev 55527)
@@ -4,17 +4,20 @@
 %%
 %% The original source files were:
 %%
-%% svg.dtx  (with options: `package,option,base')
-%% svg.dtx  (with options: `package,body,base')
+%% svg.dtx  (with options: `package,identify,main')
+%% svg.dtx  (with options: `package,base,main')
+%% svg.dtx  (with options: `package,option,main')
+%% svg.dtx  (with options: `package,body,main')
 %% 
 %% svg -- Include SVG pictures in LaTeX documents using Inkscape
 %% 
+%% ----------------------------------------------------------------------------
+%%
 %% Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016
-%% Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-
-%% 
-%% This file was generated from file svg.dtx.
+%% Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-2020
+%%
 %% ----------------------------------------------------------------------------
-%% 
+%%
 %% This work may be distributed and/or modified under the conditions
 %% of the LaTeX Project Public License, version 1.3c of the license.
 %% The latest version of this license is in
@@ -21,40 +24,301 @@
 %%     http://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX 2005/12/01 or later and of this work.
-%% 
+%%
 %% This work has the LPPL maintenance status "author-maintained".
-%% 
+%%
 %% The current maintainer and author of this work is Falk Hanisch.
-%% 
+%%
 %% This work consists of the main source file README.md, LICENSE.md, svg.dtx
 %% and the derived documentation svg.pdf as well as the example files
 %% svg-example.svg, svg-preamble.tex and root.C (with derived file root.svg).
-%% 
-%% 
+%%
+%% ----------------------------------------------------------------------------
+%%
 \NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\ProvidesPackage{svg}[%
-  2020/05/07 v2.02f\space%
-  (include SVG pictures)%
-]
+\begingroup
+  \catcode`\@11\relax%
+  \def\svg at Provides#1#2[#3]{%
+    \def\@tempa{\def\svg at version{#3}}%
+    \ifx\svg at version\@undefined\else%
+      \def\@tempb{#3}%
+      \ifx\svg at version\@tempb\else%
+        \def\@tempa{%
+          \@latex at warning@no at line{%
+            The version of package `#1' is `#3',\MessageBreak%
+            but `\svg at version' was expected!\MessageBreak%
+            You should update the svg bundle%
+          }%
+        }%
+      \fi%
+    \fi%
+    \edef\@tempb{%
+      \endgroup%
+      \noexpand\ProvidesPackage%
+      {#1}[#3\space(#2)]%
+      \unexpanded\expandafter{\@tempa}%
+    }%
+  }%
+  \svg at Provides%
+  {svg}{include SVG pictures}%
+  [2020/06/12 v2.02g]%
+\@tempb
 \RequirePackage{iftex}[2020/03/06]
 \RequirePackage{scrbase}[2020/04/19]
 \RequirePackage{pdftexcmds}[2019/11/24]
-\RequirePackage{shellesc}[2019/11/08]
 \RequirePackage{trimspaces}[2009/09/17]
 \RequirePackage{graphicx}[2019/11/30]
+\RequirePackage{shellesc}[2019/11/08]
+\ifnum\pdf at shellescape=\@ne\relax
+  \RequirePackage{ifplatform}[2017/10/13]
+\fi
+\edef\svg at catcodecodes@restore{%
+  \catcode`\noexpand\"\the\catcode`\"\relax%
+}
+\@makeother\"%
+\AtEndOfPackage{\svg at catcodecodes@restore}
 \newcommand*\svg at tempa{}
 \newcommand*\svg at tempb{}
-\newbox\svg at box
 \newif\if at svg@tempswa
-\edef\svg at catcodecodes@restore{%
-  \catcode`\noexpand\"\the\catcode`\"\relax%
+\newcommand*\svg at ifwindowsdetected{\@secondoftwo}
+\AfterPackage*{ifplatform}{%
+  \renewcommand*\svg at ifwindowsdetected{%
+    \ifwindows%
+      \expandafter\@firstoftwo%
+    \else%
+      \expandafter\@secondoftwo%
+    \fi%
+  }%
 }
-\@makeother\"%
+\newcommand*\svg at ifvalueisrelax[1]{%
+  \begingroup%
+    \def\svg at tempa{#1}%
+    \def\svg at tempb{\relax}%
+    \ifx\svg at tempa\svg at tempb%
+      \aftergroup\@firstoftwo%
+    \else%
+      \aftergroup\@secondoftwo%
+    \fi%
+  \endgroup%
+}
+\newcommand*\svg at deactivate@dq{}
+\AfterPackage+{babel}{%
+  \renewcommand*\svg at deactivate@dq{\bbl at deactivate{"}}%
+  \providecommand*\bbl at deactivate[1]{}%
+}
+\newcommand*\svg at sanitize@dq[2]{%
+  \begingroup%
+    \svg at deactivate@dq%
+    \edef\svg at tempa{\endgroup\def\noexpand#1{#2}}%
+  \svg at tempa%
+}
+\newif\if at svg@quotes at found
+\newcommand*\svg at quotes@check[1]{%
+  \expandafter\svg at quotes@@check#1"\@nil%
+}
+\newcommand*\svg at quotes@@check{}
+\def\svg at quotes@@check#1"#2\@nil{%
+  \IfArgIsEmpty{#2}{\@svg at quotes@foundfalse}{\@svg at quotes@foundtrue}%
+}
+\newcommand*\svg at quotes@remove[2][]{%
+  \begingroup%
+    \IfArgIsEmpty{#1}{\def\svg at tempb{#2}}{\def\svg at tempb{#1}}%
+    \svg at sanitize@dq\svg at tempa{\svg at tempb}%
+    \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
+    \expandafter\svg at quotes@@remove\svg at tempa""\@nil%
+    \edef\svg at tempb{%
+      \endgroup%
+      \def\noexpand#2{\svg at tempa}%
+      \if at svg@quotes at found%
+        \noexpand\@svg at quotes@foundtrue%
+      \else%
+        \noexpand\@svg at quotes@foundfalse%
+      \fi%
+    }%
+  \svg at tempb%
+}
+\newcommand*\svg at quotes@@remove{}
+\def\svg at quotes@@remove#1"#2"#3\@nil{%
+  \IfArgIsEmpty{#2}{%
+    \edef\svg at tempa{#1}%
+  }{%
+    \svg at quotes@@remove#1#2#3""\@nil%
+  }%
+}
+\newcommand*\svg at remove@leadingchar[2]{%
+  \begingroup%
+    \svg at sanitize@dq\svg at tempa{#2}%
+    \def\svg at tempb{%
+      \def\svg at tempa####1\@nil{\def\svg at tempa{####1}}%
+      \kernel at ifnextchar#1%
+        {\expandafter\svg at tempa\@gobble}%
+        {\svg at tempa}%
+    }%
+    \expandafter\svg at tempb\svg at tempa\@nil%
+    \edef\svg at tempb{%
+      \endgroup%
+      \def\noexpand#2{\svg at tempa}%
+    }%
+  \svg at tempb%
+}
+\newcommand*\svg at filename@parse[2][]{%
+  \begingroup%
+    \svg at sanitize@dq\svg at tempa{#2}%
+    \expandafter\filename at parse\expandafter{\svg at tempa}%
+    \svg at quotes@remove{\filename at area}%
+    \if at svg@quotes at found%
+      \edef\filename at area{"\filename at area"}%
+      \svg at remove@leadingchar"\filename at base%
+    \fi%
+    \ifx\filename at ext\relax\else%
+      \svg at quotes@remove{\filename at ext}%
+      \svg at extension@parse{#1}%
+      \if at svg@quotes at found%
+        \edef\filename at base{\filename at base"}%
+      \fi%
+    \fi%
+    \svg at quotes@remove{\filename at base}%
+    \if at svg@quotes at found%
+      \edef\filename at base{"\filename at base"}%
+    \fi%
+    \edef\svg at tempa{%
+      \endgroup%
+      \def\noexpand\filename at area{\filename at area}%
+      \def\noexpand\filename at base{\filename at base}%
+      \ifx\filename at ext\relax%
+        \let\noexpand\filename at ext\noexpand\relax%
+      \else%
+        \def\noexpand\filename at ext{\filename at ext}%
+      \fi%
+    }%
+  \svg at tempa%
+}
+\newcommand*\svg at extension@parse[1]{%
+  \IfArgIsEmpty{#1}{}{%
+    \@expandtwoargs\Ifstr%
+      {\detokenize\expandafter{\filename at ext}}{\detokenize\expandafter{#1}}{}{%
+      \begingroup%
+        \edef\svg at tempa{%
+          \def\noexpand\svg at tempa{}%
+          \let\noexpand\svg at tempb\relax%
+          \noexpand\svg at extension@@parse%
+            \filename at ext.\noexpand\@nil#1\noexpand\@nil%
+        }%
+        \svg at tempa%
+        \edef\svg at tempa{%
+          \endgroup%
+          \def\noexpand\filename at base{\filename at base\svg at tempa}%
+          \ifx\svg at tempb\relax%
+            \let\noexpand\filename at ext\relax%
+          \else%
+            \def\noexpand\filename at ext{\svg at tempb}%
+          \fi%
+        }%
+      \svg at tempa%
+    }%
+  }%
+}
+\newcommand*\svg at extension@@parse{}
+\def\svg at extension@@parse#1.#2\@nil#3\@nil{%
+  \edef\svg at tempa{\svg at tempa.#1}%
+  \IfArgIsEmpty{#2}{}{%
+    \Ifstr{\detokenize{#2}}{\detokenize{#3.}}{%
+      \edef\svg at tempb{#3}%
+    }{%
+      \svg at extension@@parse#2\@nil#3\@nil%
+    }%
+  }%
+}
+\newcommand*\svg at iffilenewer[2]{\@gobbletwo}
+\ifx\pdf at filemoddate\@undefined
+  \ifx\filemoddate\@undefined\else
+    \ifx\strcmp\@undefined\else
+      \renewcommand*\svg at iffilenewer[2]{%
+        \begingroup%
+          \edef\svg at tempa{\filemoddate{#1}}%
+          \edef\svg at tempb{\filemoddate{#2}}%
+          \ifnum\strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
+            \aftergroup\@firstoftwo%
+          \else%
+            \aftergroup\@secondoftwo%
+          \fi%
+        \endgroup%
+      }%
+    \fi
+  \fi
+\else
+  \ifx\pdf at strcmp\@undefined\else
+    \renewcommand*\svg at iffilenewer[2]{%
+      \begingroup%
+        \edef\svg at tempa{\pdf at filemoddate{#1}}%
+        \edef\svg at tempb{\pdf at filemoddate{#2}}%
+        \ifnum\pdf at strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
+          \aftergroup\@firstoftwo%
+        \else%
+          \aftergroup\@secondoftwo%
+        \fi%
+      \endgroup%
+    }%
+  \fi
+\fi
+\newcommand*\svg at shell@mkdir[1]{%
+  \begingroup%
+    \svg at quotes@remove[{#1}]{\svg at tempa}%
+    \@svg at tempswatrue%
+    \Ifstr{\svg at tempa}{}{\@svg at tempswafalse}{%
+    \Ifstr{\svg at tempa}{./}{\@svg at tempswafalse}{%
+    }}%
+    \if at svg@tempswa%
+      \ShellEscape{\svg at shell@@mkdir{\svg at tempa}}%
+    \fi%
+  \endgroup%
+}
+\newcommand*\svg at shell@mv[2]{%
+  \ShellEscape{\svg at shell@@mv\space"#1"\space"#2"}%
+}
+\newcommand*\svg at shell@rm[1]{%
+  \ShellEscape{\svg at shell@@rm\space"#1"}%
+}
+\svg at ifwindowsdetected{%
+  \newcommand*\svg at shell@@mkdir[1]{if not exist "#1" mkdir "#1"}%
+  \newcommand*\svg at shell@@mv{move}%
+  \newcommand*\svg at shell@@rm{del}%
+}{%
+  \newcommand*\svg at shell@@mkdir[1]{mkdir -p "#1"}%
+  \newcommand*\svg at shell@@mv{mv}%
+  \newcommand*\svg at shell@@rm{rm}%
+}
+\newcommand*\svg at normalize@path[1]{%
+  \begingroup%
+    \svg at quotes@remove[{#1}]{\svg at tempa}%
+    \ifx\svg at tempa\@empty\relax%
+      \def\svg at tempa{./}%
+    \fi%
+    \expandafter\svg at normalize@@path\svg at tempa//\@nil%
+    \edef\svg at tempb{%
+      \endgroup%
+      \if at svg@quotes at found%
+        \def\noexpand#1{"\svg at tempa"}%
+      \else%
+        \def\noexpand#1{\svg at tempa}%
+      \fi%
+    }%
+  \svg at tempb%
+}
+\newcommand*\svg at normalize@@path{}
+\def\svg at normalize@@path#1/#2/\@nil{%
+  \IfArgIsEmpty{#2}{%
+    \IfArgIsEmpty{#1}{\def\svg at tempa{}}{\def\svg at tempa{#1/}}%
+  }{%
+    \svg at normalize@@path#2/\@nil%
+    \edef\svg at tempa{#1/\svg at tempa}%
+  }%
+}
 \DefineFamily{SVG}
 \DefineFamilyMember{SVG}
 \newcommand*\svg at deprecated@key[3][svg]{%
   \PackageWarning{#1}{%
-    The option key `#2' is deprecated.\MessageBreak%
+    The option key `#2' is deprecated. \MessageBreak%
     It's recommended to use `#3'\MessageBreak%
     instead%
   }%
@@ -83,15 +347,18 @@
       \PackageWarning{svg}{Package `transparent' was loaded anyway}%
     }%
   \fi%
+  \AfterPackage*{transparent}{%
+    \@ifpackagelater{transparent}{2018/11/19}{}{\RequirePackage{pgfsys}}%
+  }%
 }
 \newcommand*\svg at ink@mode{}
 \DefineFamilyKey{SVG}{inkscape}[true]{%
-  \lowercase{\svg at sanitize@dq\svg at tempb{#1}}%
+  \svg at sanitize@dq\svg at tempb{#1}%
   \FamilySetNumerical{SVG}{inkscape}{svg at tempa}{%
     {false}{0},{off}{0},{no}{0},%
-    {true}{1},{on}{1},{yes}{1},{onlynewer}{1},{newer}{1},%
-    {force}{2},{forced}{2},{overwrite}{2},%
-    {pdf}{3},{eps}{4},{ps}{5},{png}{6},%
+    {true}{1},{on}{1},{yes}{1},{auto}{1},{onlynewer}{1},{newer}{1},%
+    {forced}{2},{force}{2},{overwrite}{2},%
+    {pdf}{3},{PDF}{3},{eps}{4},{EPS}{4},{ps}{5},{PS}{5},{png}{6},{PNG}{6},%
     {drawing}{7},{crop}{7},%
     {page}{8},{nocrop}{8},%
     {tex}{9},{latex}{9},{exportlatex}{9},{latexexport}{9},%
@@ -125,10 +392,10 @@
       \Ifstr{##2}{dpi}{\FamilyOptions{SVG}{inkscapedpi=##1}}{}%
     }%
     \lowercase{\expandafter\svg at tempa\svg at tempb dpi\@nil}%
-    \ifx\FamilyKeyState\FamilyKeyStateProcessed\else%
+    \ifx\FamilyKeyState\FamilyKeyStateProcessed\else% legacy option
       \svg at quotes@remove[{#1}]{\svg at tempb}%
       \def\svg at tempa##1-##2\@nil{%
-        \IfArgIsEmpty{##2}{\def\svg at tempb{}}{%
+        \IfArgIsEmpty{##2}{\let\svg at tempb\@empty}{%
           \def\svg at tempa####1-\@nil{\def\svg at tempb{-####1}}%
           \svg at tempa##2\@nil%
         }%
@@ -212,10 +479,9 @@
   \renewcommand*\svg at ink@format{eps}
 \fi\fi
 \DefineFamilyKey{SVG}{inkscapeformat}{%
-  \lowercase{\def\svg at tempa{#1}}%
   \FamilySetNumerical{SVG}{inkscapeformat}{svg at tempa}{%
-    {pdf}{0},{eps}{1},{ps}{2},{png}{3}%
-  }{\svg at tempa}%
+    {pdf}{0},{PDF}{0},{eps}{1},{EPS}{1},{ps}{2},{PS}{2},{png}{3},{PNG}{3}%
+  }{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
     \ifcase\svg at tempa\relax% latex
       \renewcommand*\svg at ink@format{pdf}%
@@ -295,8 +561,6 @@
 \DefineFamilyKey{SVG}{extension}{\FamilyOptions{SVG}{svgextension=#1}}
 \DefineFamilyKey{SVG}{ext}{\FamilyOptions{SVG}{svgextension=#1}}
 \newcommand*\svg at out@path{}
-\newcommand*\svg at out@name{\svg at file@name\svg at file@suffix}
-\newcommand*\svg at out@base{\svg at out@path\svg at out@name.\svg at ink@format}
 \DefineFamilyKey{SVG}{inkscapepath}{%
   \svg at sanitize@dq\svg at tempb{#1}%
   \FamilySetNumerical{SVG}{inkscapepath}{svg at tempa}{%
@@ -321,6 +585,8 @@
     \FamilyKeyStateProcessed%
   \fi%
 }
+\newcommand*\svg at out@name{\svg at file@name\svg at file@suffix}
+\newcommand*\svg at out@base{\svg at out@path\svg at out@name.\svg at ink@format}
 \DefineFamilyKey{SVG}{inkscapename}{%
   \renewcommand*\svg at out@name{#1\svg at file@suffix}%
   \FamilyKeyStateProcessed%
@@ -361,9 +627,9 @@
   \FamilySetBool{SVG}{keepaspectratio}{@svg at tempswa}{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed%
     \if at svg@tempswa%
-      \FamilyOptions{SVG}{distort=false}%
-    \else
-      \FamilyOptions{SVG}{distort=true}%
+      \FamilyExecuteOptions[.svg.sty]{SVG}{distort=false}%
+    \else%
+      \FamilyExecuteOptions[.svg.sty]{SVG}{distort=true}%
     \fi%
   \fi%
 }
@@ -406,7 +672,7 @@
   \svg at deprecated@key{postex=#1}{apptex=#1}%
 }
 \newcounter{svg at param@lastpage}
-\DefineFamilyKey{SVG}{lastpage}{%
+\DefineFamilyKey{SVG}{lastpage}[true]{%
   \FamilySetNumerical{SVG}{lastpage}{svg at tempa}{%
     {false}{0},{off}{0},{no}{0},{ignore}{0},%
     {true}{1},{on}{1},{yes}{1},{auto}{1}%
@@ -421,145 +687,7 @@
 }
 \newif\if at svg@draft
 \FamilyBoolKey{SVG}{draft}{@svg at draft}
-\AtBeginDocument{\if at svg@draft\else\ifGin at draft\@svg at drafttrue\fi\fi}
-\newcommand*\svg at deactivate@dq{}
-\AfterPackage+{babel}{%
-  \renewcommand*\svg at deactivate@dq{\bbl at deactivate{"}}%
-  \providecommand*\bbl at deactivate[1]{}%
-}
-\newcommand*\svg at sanitize@dq[2]{%
-  \begingroup%
-    \svg at deactivate@dq%
-    \edef\svg at tempa{\endgroup\def\noexpand#1{#2}}%
-  \svg at tempa%
-}
-\newcommand*\svg at quotes@remove[2][]{%
-  \begingroup%
-    \IfArgIsEmpty{#1}{\def\svg at tempb{#2}}{\def\svg at tempb{#1}}%
-    \svg at sanitize@dq\svg at tempa{\svg at tempb}%
-    \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
-    \expandafter\svg at quotes@@remove\svg at tempa""\@nil%
-    \edef\svg at tempb{%
-      \endgroup%
-      \def\noexpand#2{\svg at tempa}%
-      \if at svg@quotes at found%
-        \noexpand\@svg at quotes@foundtrue%
-      \else%
-        \noexpand\@svg at quotes@foundfalse%
-      \fi%
-    }%
-  \svg at tempb%
-}
-\newcommand*\svg at quotes@@remove{}
-\def\svg at quotes@@remove#1"#2"#3\@nil{%
-  \IfArgIsEmpty{#2}{%
-    \edef\svg at tempa{#1}%
-  }{%
-    \svg at quotes@@remove#1#2#3""\@nil%
-  }%
-}
-\newif\if at svg@quotes at found
-\newcommand*\svg at quotes@check[1]{%
-  \expandafter\svg at quotes@@check#1"\@nil%
-}
-\newcommand*\svg at quotes@@check{}
-\def\svg at quotes@@check#1"#2\@nil{%
-  \IfArgIsEmpty{#2}{\@svg at quotes@foundfalse}{\@svg at quotes@foundtrue}%
-}
-\newcommand*\svg at remove@leadingchar[2]{%
-  \begingroup%
-    \svg at sanitize@dq\svg at tempa{#2}%
-    \def\svg at tempb{%
-      \def\svg at tempa####1\@nil{\def\svg at tempa{####1}}%
-      \kernel at ifnextchar#1%
-        {\expandafter\svg at tempa\@gobble}%
-        {\svg at tempa}%
-    }%
-    \expandafter\svg at tempb\svg at tempa\@nil%
-    \edef\svg at tempb{%
-      \endgroup%
-      \def\noexpand#2{\svg at tempa}%
-    }%
-  \svg at tempb%
-}
-\newcommand*\svg at set@input at path[1][]{%
-  \begingroup%
-    \svg at deactivate@dq%
-    \ifx\svg at file@path\@empty\else%
-      \svg at normalize@path{\svg at file@path}%
-      \edef\svg at file@path{{\svg at file@path}}%
-    \fi%
-    \svg at append@input at path{\svg at file@path}{\svg at input@path}%
-    \svg at append@input at path{\svg at file@path}{\Ginput at path}%
-    \IfArgIsEmpty{#1}{}{\svg at append@input at path{\svg at file@path}{{#1}}}%
-    \svg at append@input at path{\svg at file@path}{\input at path}%
-    \edef\svg at tempa{%
-      \endgroup%
-      \ifx\svg at file@path\@empty\else%
-        \def\noexpand\input at path{\svg at file@path}%
-      \fi%
-    }%
-  \svg at tempa%
-}
-\newcommand*\svg at append@input at path[2]{%
-  \ifx#2\@undefined\else%
-    \edef\svg at tempb{#2}%
-    \expandafter\@tfor\expandafter\svg at tempa\expandafter:\expandafter=%
-        \svg at tempb\do{%
-      \ifx\svg at tempa\@empty\else%
-        \@svg at tempswatrue%
-        \svg at normalize@path{\svg at tempa}%
-        \expandafter\@tfor\expandafter\svg at tempb\expandafter:\expandafter=%
-            #1\do{%
-          \ifx\svg at tempa\svg at tempb%
-            \@svg at tempswafalse%
-            \@break at tfor%
-          \fi%
-        }%
-        \if at svg@tempswa%
-          \edef#1{#1{\svg at tempa}}%
-        \fi%
-      \fi%
-    }%
-  \fi%
-}
-\newcommand*\svg at normalize@path[1]{%
-  \begingroup%
-    \svg at quotes@remove[{#1}]{\svg at tempa}%
-    \ifx\svg at tempa\@empty\relax%
-      \def\svg at tempa{./}%
-    \fi%
-    \expandafter\svg at normalize@@path\svg at tempa//\@nil%
-    \edef\svg at tempb{%
-      \endgroup%
-      \if at svg@quotes at found%
-        \def\noexpand#1{"\svg at tempa"}%
-      \else%
-        \def\noexpand#1{\svg at tempa}%
-      \fi%
-    }%
-  \svg at tempb%
-}
-\newcommand*\svg at normalize@@path{}
-\def\svg at normalize@@path#1/#2/\@nil{%
-  \IfArgIsEmpty{#2}{%
-    \IfArgIsEmpty{#1}{\def\svg at tempa{}}{\def\svg at tempa{#1/}}%
-  }{%
-    \svg at normalize@@path#2/\@nil%
-    \edef\svg at tempa{#1/\svg at tempa}%
-  }%
-}
-\newcommand*\svg at ifvalueisrelax[1]{%
-  \begingroup%
-    \def\svg at tempa{#1}%
-    \def\svg at tempb{\relax}%
-    \ifx\svg at tempa\svg at tempb\relax%
-      \aftergroup\@firstoftwo%
-    \else%
-      \aftergroup\@secondoftwo%
-    \fi%
-  \endgroup%
-}
+\AfterPackage*{graphicx}{\ifGin at draft\@svg at drafttrue\fi}
 \DefineFamilyMember[.dummy]{SVG}
 \newcommand*\svg at dummy@key[2][]{%
   \@ifpackageloaded{svg-extract}{}{%
@@ -631,170 +759,52 @@
 \svg at dummy@key[true]{clear}
 \svg at dummy@key[true]{exclude}
 \FamilyExecuteOptions{SVG}{%
-  inkscape=true,inkscapeversion=auto,inkscapepath=basesubdir,
+  inkscape=true,inkscapeversion=auto,inkscapepath=basesubdir,%
   inkscapelatex=true,inkscapearea=drawing,distort=false,%
   usexcolor=true,usetransparent=true%
 }
 \FamilyProcessOptions{SVG}
-\newif\if at svg@file at found
-\newcommand*\svg at file@path{}
-\newcommand*\svg at file@name{}
-\newcommand*\svg at file@base{}
-\newcommand*\svg at file@suffix{}
-\newcommand*\svg at get@path[3][\svg at file@ext]{%
-  \begingroup%
-    \svg at filename@parse[{#1}]{#2}%
-    \IfArgIsEmpty{#1}{%
-      \edef\svg at tempa{\filename at area\filename at base.\filename at ext}%
-    }{%
-      \edef\svg at tempa{\filename at area\filename at base.#1}%
-    }%
-    \svg at set@input at path[{#3}]%
-    \@svg at tempswafalse%
-    \expandafter\IfFileExists\expandafter{\svg at tempa}{%
-      \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
-      \if at svg@quotes at found\else%
-        \svg at quotes@remove{\@filef at und}%
-      \fi%
-      \@svg at tempswatrue%
-      \edef\@filef at und{\expandafter\trim at spaces\expandafter{\@filef at und}}%
-      \svg at filename@parse[{#1}]{\@filef at und}%
-    }{}%
-    \edef\svg at tempa{%
-      \endgroup%
-      \if at svg@tempswa%
-        \noexpand\@svg at file@foundtrue%
-        \def\noexpand\svg at file@path{\filename at area}%
-        \def\noexpand\svg at file@name{\filename at base}%
-        \def\noexpand\svg at file@base{\filename at area\filename at base}%
-      \else%
-        \noexpand\@svg at file@foundfalse%
-        \def\noexpand\svg at file@path{}%
-        \def\noexpand\svg at file@name{#2}%
-        \def\noexpand\svg at file@base{#2}%
-      \fi%
-    }%
-  \svg at tempa%
-}
-\newcommand*\svg at filename@parse[2][]{%
-  \begingroup%
-    \svg at sanitize@dq\svg at tempa{#2}%
-    \expandafter\filename at parse\expandafter{\svg at tempa}%
-    \svg at quotes@remove{\filename at area}%
-    \if at svg@quotes at found%
-      \edef\filename at area{"\filename at area"}%
-      \svg at remove@leadingchar"\filename at base%
-    \fi%
-    \ifx\filename at ext\relax\else%
-      \svg at quotes@remove{\filename at ext}%
-      \svg at extension@parse{#1}%
-      \if at svg@quotes at found%
-        \edef\filename at base{\filename at base"}%
-      \fi%
-    \fi%
-    \svg at quotes@remove{\filename at base}%
-    \if at svg@quotes at found%
-      \edef\filename at base{"\filename at base"}%
-    \fi%
-    \edef\svg at tempa{%
-      \endgroup%
-      \def\noexpand\filename at area{\filename at area}%
-      \def\noexpand\filename at base{\filename at base}%
-      \ifx\filename at ext\relax%
-        \let\noexpand\filename at ext\noexpand\relax%
-      \else%
-        \def\noexpand\filename at ext{\filename at ext}%
-      \fi%
-    }%
-  \svg at tempa%
-}
-\newcommand*\svg at extension@parse[1]{%
-  \IfArgIsEmpty{#1}{}{%
-    \@expandtwoargs\Ifstr%
-      {\detokenize\expandafter{\filename at ext}}{\detokenize\expandafter{#1}}{}{%
-      \begingroup%
-        \edef\svg at tempa{%
-          \def\noexpand\svg at tempa{}%
-          \let\noexpand\svg at tempb\relax%
-          \noexpand\svg at extension@@parse%
-            \filename at ext.\noexpand\@nil#1\noexpand\@nil%
-        }%
-        \svg at tempa%
-        \edef\svg at tempa{%
-          \endgroup%
-          \def\noexpand\filename at base{\filename at base\svg at tempa}%
-          \ifx\svg at tempb\relax%
-            \let\noexpand\filename at ext\relax%
-          \else%
-            \def\noexpand\filename at ext{\svg at tempb}%
-          \fi%
-        }%
-      \svg at tempa%
-    }%
+\DefineFamilyMember[.param]{SVG}
+\newcommand*\svg at local@param at use{}
+\newcommand*\svg at local@param at def[1]{%
+  \edef\svg at local@param at use{%
+    \unexpanded\expandafter{\svg at local@param at use}\unexpanded{#1}%
   }%
 }
-\newcommand*\svg at extension@@parse{}
-\def\svg at extension@@parse#1.#2\@nil#3\@nil{%
-  \edef\svg at tempa{\svg at tempa.#1}%
-  \IfArgIsEmpty{#2}{}{%
-    \Ifstr{\detokenize{#2}}{\detokenize{#3.}}{%
-      \edef\svg at tempb{#3}%
-    }{%
-      \svg at extension@@parse#2\@nil#3\@nil%
-    }%
-  }%
-}
-\newcommand*\svg at iffilenewer[2]{\@gobbletwo}
-\ifx\pdf at filemoddate\@undefined
-  \ifx\filemoddate\@undefined\else
-    \ifx\strcmp\@undefined\else
-      \renewcommand*\svg at iffilenewer[2]{%
-        \begingroup%
-          \edef\svg at tempa{\filemoddate{#1}}%
-          \edef\svg at tempb{\filemoddate{#2}}%
-          \ifnum\strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
-            \aftergroup\@firstoftwo%
-          \else%
-            \aftergroup\@secondoftwo%
-          \fi%
-        \endgroup%
-      }%
-    \fi
-  \fi
-\else
-  \ifx\pdf at strcmp\@undefined\else
-    \renewcommand*\svg at iffilenewer[2]{%
-      \begingroup%
-        \edef\svg at tempa{\pdf at filemoddate{#1}}%
-        \edef\svg at tempb{\pdf at filemoddate{#2}}%
-        \ifnum\pdf at strcmp{\svg at tempa}{\svg at tempb}>\z@\relax%
-          \aftergroup\@firstoftwo%
-        \else%
-          \aftergroup\@secondoftwo%
-        \fi%
-      \endgroup%
-    }%
-  \fi
-\fi
 \newcommand*\svg at local@param at set[1]{%
   \svg at local@param at use%
   \FamilyOptions{SVG}{#1}%
   \Ifstr{\svg at ink@format}{png}{\FamilyOptions{SVG}{inkscapelatex=false}}{}%
-  \@svg at tempswafalse%
+  \@svg at tempswatrue%
   \ifdim\svg at param@width>\z@\relax\ifdim\svg at param@height>\z@\relax%
-    \@svg at tempswatrue%
+    \@svg at tempswafalse%
   \fi\fi%
-  \if at svg@tempswa\else%
-    \FamilyOptions{SVG}{distort=false}%
+  \if at svg@tempswa%
+    \FamilyExecuteOptions[.svg.sty]{SVG}{distort=false}%
   \fi%
 }
-\newcommand*\svg at local@param at use{}
-\newcommand*\svg at local@param at def[1]{%
-  \edef\svg at local@param at use{%
-    \unexpanded\expandafter{\svg at local@param at use}\unexpanded{#1}%
-  }%
+\newcommand*\svg at deprecated@param{%
+  \@svg at tempswafalse%
+  \ifx\svgwidth\@undefined\else%
+    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{width=\svgwidth}}%
+    \svg at tempa%
+    \@svg at tempswatrue%
+  \fi%
+  \ifx\svgscale\@undefined\else%
+    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{scale=\svgscale}}%
+    \svg at tempa%
+    \@svg at tempswatrue%
+  \fi%
+  \if at svg@tempswa%
+    \PackageWarning{svg}{%
+      You should specify the image size with parameters\MessageBreak%
+      `width' and `height' or `scale' instead of using\MessageBreak%
+      `\string\svgscale' or `\string\svgwidth'%
+    }%
+    \let\svgwidth\@undefined%
+    \let\svgscale\@undefined%
+  \fi%
 }
-\DefineFamilyMember[.param]{SVG}
 \newcommand*\svgsetup{\FamilyOptions{SVG}}
 \newcommand*\setsvg{\FamilyOptions{SVG}}
 \newcommand*\svg at input@path{}
@@ -847,6 +857,7 @@
 \newcommand*\svg at param@angle{0}
 \svg at local@param at def{%
   \DefineFamilyKey[.param]{SVG}{angle}{%
+    \FamilyKeyStateUnknownValue%
     \Ifisdimension{#1\p@}{%
       \renewcommand*\svg at param@angle{#1}%
       \FamilyKeyStateProcessed%
@@ -921,28 +932,6 @@
     \fi%
   \endgroup%
 }
-\newcommand*\svg at deprecated@param{%
-  \@svg at tempswafalse%
-  \ifx\svgwidth\@undefined\else%
-    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{width=\svgwidth}}%
-    \svg at tempa%
-    \@svg at tempswatrue%
-  \fi%
-  \ifx\svgscale\@undefined\else%
-    \edef\svg at tempa{\noexpand\FamilyOptions{SVG}{scale=\svgscale}}%
-    \svg at tempa%
-    \@svg at tempswatrue%
-  \fi%
-  \if at svg@tempswa%
-    \PackageWarning{svg}{%
-      You should specify the image size with parameters\MessageBreak%
-      `width' and `height' or `scale' instead of using\MessageBreak%
-      `\string\svgscale' or `\string\svgwidth'%
-    }%
-    \let\svgwidth\@undefined%
-    \let\svgscale\@undefined%
-  \fi%
-}
 \newif\if at svg@ink at run
 \newcommand*\svg at ink@run{%
   \ifnum\svg at ink@mode>\z@\relax%
@@ -1018,9 +1007,9 @@
             \edef\svg at tempb{\svg at tempb.\svg at ink@format}%
             \svg at quotes@remove{\svg at out@base}%
             \svg at shell@mkdir{\svg at out@path}%
-            \svg at shell@move{\svg at tempb}{\svg at out@base}%
+            \svg at shell@mv{\svg at tempb}{\svg at out@base}%
             \if at svg@ink at latex%
-              \svg at shell@move{\svg at tempb_tex}{\svg at out@base_tex}%
+              \svg at shell@mv{\svg at tempb_tex}{\svg at out@base_tex}%
             \fi%
           }{%
             \gdef\svg at ink@ver{\m at ne}%
@@ -1044,49 +1033,29 @@
     \endgroup%
   \fi%
 }
+\newsavebox\svg at box
 \newcommand*\svg at input{\svg@@input}
 \newcommand*\svg@@input[2][]{%
   \IfArgIsEmpty{#1}{}{\svg at local@param at set{#1}}%
   \svg at set@input at path%
+  \@svg at tempswatrue%
   \if at svg@draft%
-    \@svg at ink@latexfalse%
+    \@svg at tempswafalse%
   \fi%
-  \def\svg at tempb##1.##2\@nil{%
-    \IfArgIsEmpty{##2}{%
-      \def\svg at tempb{##1}%
-    }{%
-      \edef\svg at tempa{\svg at tempa.##1}%
-      \svg at tempb##2\@nil%
-    }%
-  }%
-  \edef\svg at tempa{%
-    \def\noexpand\svg at tempa{}%
-    \noexpand\svg at tempb#2.\noexpand\@nil%
-  }%
-  \svg at tempa%
-  \svg at remove@leadingchar.\svg at tempa%
-  \begingroup%
-    \expandafter\filename at parse\expandafter{\svg at tempa}%
-    \edef\svg at tempa{%
-      \endgroup%
-      \ifx\filename at ext\relax%
-        \edef\noexpand\svg at tempa{\svg at tempa.\svg at tempb}%
-      \else%
-        \edef\noexpand\svg at tempa{{\svg at tempa}.\svg at tempb}%
-      \fi%
-    }%
-  \svg at tempa%
-  \edef\svg at tempb{#2}%
-  \if at svg@ink at latex%
+  \if at svg@ink at latex\else%
+    \@svg at tempswafalse%
+  \fi%
+  \edef\svg at tempa{#2}%
+  \if at svg@tempswa%
     \svg at patches{\svg at tempa}%
     \ifnum\value{svg at param@lastpage}=\z@\relax%
-      \expandafter\svg at get@lastpage\expandafter{\svg at tempb}%
+      \expandafter\svg at get@lastpage\expandafter{\svg at tempa}%
     \fi%
     \edef\svg at tempa{%
       \ifx\svg at param@pretex\relax\else%
         \noexpand\svg at param@pretex%
       \fi%
-      \noexpand\input{\svg at tempb_tex}%
+      \noexpand\input{\svg at tempa_tex}%
       \ifx\svg at param@apptex\relax\else%
         \noexpand\svg at param@apptex%
       \fi%
@@ -1265,7 +1234,7 @@
     }%
     \svg at tempa%
     \ifx\svg at tempa\@empty%
-      \ifwindows%
+      \svg at ifwindowsdetected{%
         \def\svg at tempb{\jobname.svg.ink.ver.aux}%
         \IfFileExists{\svg at tempb}{}{%
           \ShellEscape{call "\svg at ink@exe" -V > \svg at tempb}%
@@ -1274,7 +1243,7 @@
           \closein\@inputcheck%
           \ShellEscape{del \svg at tempb}%
         }%
-      \fi%
+      }{}%
     \fi%
     \def\svg at tempb Inkscape ##1.##2\@nil{%
       \gdef\svg at ink@ver{##1}%
@@ -1290,6 +1259,87 @@
     }%
   \fi%
 }
+\newcommand*\svg at set@input at path[1][]{%
+  \begingroup%
+    \svg at deactivate@dq%
+    \ifx\svg at file@path\@empty\else%
+      \svg at normalize@path{\svg at file@path}%
+      \edef\svg at file@path{{\svg at file@path}}%
+    \fi%
+    \svg at append@input at path{\svg at file@path}{\svg at input@path}%
+    \svg at append@input at path{\svg at file@path}{\Ginput at path}%
+    \IfArgIsEmpty{#1}{}{\svg at append@input at path{\svg at file@path}{{#1}}}%
+    \svg at append@input at path{\svg at file@path}{\input at path}%
+    \edef\svg at tempa{%
+      \endgroup%
+      \ifx\svg at file@path\@empty\else%
+        \def\noexpand\input at path{\svg at file@path}%
+      \fi%
+    }%
+  \svg at tempa%
+}
+\newcommand*\svg at append@input at path[2]{%
+  \ifx#2\@undefined\else%
+    \edef\svg at tempb{#2}%
+    \expandafter\@tfor\expandafter\svg at tempa\expandafter:\expandafter=%
+        \svg at tempb\do{%
+      \ifx\svg at tempa\@empty\else%
+        \@svg at tempswatrue%
+        \svg at normalize@path{\svg at tempa}%
+        \expandafter\@tfor\expandafter\svg at tempb\expandafter:\expandafter=%
+            #1\do{%
+          \ifx\svg at tempa\svg at tempb%
+            \@svg at tempswafalse%
+            \@break at tfor%
+          \fi%
+        }%
+        \if at svg@tempswa%
+          \edef#1{#1{\svg at tempa}}%
+        \fi%
+      \fi%
+    }%
+  \fi%
+}
+\newif\if at svg@file at found
+\newcommand*\svg at file@path{}
+\newcommand*\svg at file@name{}
+\newcommand*\svg at file@base{}
+\newcommand*\svg at file@suffix{}
+\newcommand*\svg at get@path[3][\svg at file@ext]{%
+  \begingroup%
+    \svg at filename@parse[{#1}]{#2}%
+    \IfArgIsEmpty{#1}{%
+      \edef\svg at tempa{\filename at area\filename at base.\filename at ext}%
+    }{%
+      \edef\svg at tempa{\filename at area\filename at base.#1}%
+    }%
+    \svg at set@input at path[{#3}]%
+    \@svg at tempswafalse%
+    \expandafter\IfFileExists\expandafter{\svg at tempa}{%
+      \expandafter\svg at quotes@check\expandafter{\svg at tempa}%
+      \if at svg@quotes at found\else%
+        \svg at quotes@remove{\@filef at und}%
+      \fi%
+      \@svg at tempswatrue%
+      \edef\@filef at und{\expandafter\trim at spaces\expandafter{\@filef at und}}%
+      \svg at filename@parse[{#1}]{\@filef at und}%
+    }{}%
+    \edef\svg at tempa{%
+      \endgroup%
+      \if at svg@tempswa%
+        \noexpand\@svg at file@foundtrue%
+        \def\noexpand\svg at file@path{\filename at area}%
+        \def\noexpand\svg at file@name{\filename at base}%
+        \def\noexpand\svg at file@base{\filename at area\filename at base}%
+      \else%
+        \noexpand\@svg at file@foundfalse%
+        \def\noexpand\svg at file@path{}%
+        \def\noexpand\svg at file@name{#2}%
+        \def\noexpand\svg at file@base{#2}%
+      \fi%
+    }%
+  \svg at tempa%
+}
 \newcommand*\svg at picture@saved{}
 \let\svg at picture@saved\picture
 \newcommand*\svg at includegraphics@saved{}
@@ -1343,7 +1393,7 @@
 \newcommand*\svghidepreamblestart{%
   \PackageWarning{svg}{%
     The macro `\string\svghidepreamblestart' is only meant\MessageBreak%
-    to be used together with package `svg-extract'.\MessageBreak%
+    to be used together with package `svg-extract'. \MessageBreak%
     Nevertheless, nothing will happen%
   }%
 }
@@ -1350,43 +1400,11 @@
 \newcommand*\svghidepreambleend{%
   \PackageWarning{svg}{%
     The macro `\string\svghidepreambleend' is only meant\MessageBreak%
-    to be used together with package `svg-extract'.\MessageBreak%
+    to be used together with package `svg-extract'. \MessageBreak%
     Nevertheless, nothing will happen%
   }%
 }
 \newcommand*\svg at extract[1]{}
-\ifnum\pdf at shellescape=\@ne\relax\else%
-  \expandafter\endinput%
-\fi
-\RequirePackage{ifplatform}[2017/10/13]
-\ifwindows
-  \newcommand*\svg at shell@@mkdir[1]{if not exist "#1" mkdir "#1"}
-  \newcommand*\svg at shell@@mv{move}
-  \newcommand*\svg at shell@@rm{del}
-\else
-  \newcommand*\svg at shell@@mkdir[1]{mkdir -p "#1"}
-  \newcommand*\svg at shell@@mv{mv}
-  \newcommand*\svg at shell@@rm{rm}
-\fi
-\newcommand*\svg at shell@mkdir[1]{%
-  \begingroup%
-    \svg at quotes@remove[{#1}]{\svg at tempa}%
-    \@svg at tempswatrue%
-    \Ifstr{\svg at tempa}{}{\@svg at tempswafalse}{%
-    \Ifstr{\svg at tempa}{./}{\@svg at tempswafalse}{%
-    }}%
-    \if at svg@tempswa%
-      \ShellEscape{\svg at shell@@mkdir{\svg at tempa}}%
-    \fi%
-  \endgroup%
-}
-\newcommand*\svg at shell@move[2]{%
-  \ShellEscape{\svg at shell@@mv\space"#1"\space"#2"}%
-}
-\newcommand*\svg at shell@rm[1]{%
-  \ShellEscape{\svg at shell@@rm\space"#1"}%
-}
-\svg at catcodecodes@restore
 \endinput
 %%
 %% End of file `svg.sty'.



More information about the tex-live-commits mailing list.