summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/svg/svg-extract.sty1147
-rw-r--r--Master/texmf-dist/tex/latex/svg/svg.sty1253
2 files changed, 2208 insertions, 192 deletions
diff --git a/Master/texmf-dist/tex/latex/svg/svg-extract.sty b/Master/texmf-dist/tex/latex/svg/svg-extract.sty
new file mode 100644
index 00000000000..b3d1a728880
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/svg/svg-extract.sty
@@ -0,0 +1,1147 @@
+%%
+%% This is file `svg-extract.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% svg.dtx (with options: `package,option,extract')
+%% svg.dtx (with options: `package,body,extract')
+%%
+%% svg-extract -- Extract independent graphic files from SVG pictures
+%%
+%% Copyright (C) Philip Ilten <philten@cern.ch>, 2012-2016
+%% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2017-
+%%
+%% 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).
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{svg-extract}[%
+ 2017/03/27 v2.00\space%
+ (extract independent graphics from SVG pictures)%
+]
+\RequirePackage{svg}[2017/03/27]
+\DefineFamily{SVG}
+\DefineFamilyMember{SVG}
+\newif\if@svgx@run
+\DefineFamilyKey{SVG}{extract}[true]{%
+ \lowercase{\def\svg@tempa{#1}}%
+ \FamilySetNumerical{SVG}{extract}{svg@tempa}{%
+ {false}{0},{off}{0},{no}{0},%
+ {true}{1},{on}{1},{yes}{1},{onlynewer}{1},{newer}{1},%
+ {overwrite}{1},{force}{1},{forced}{1},%
+ {pdf}{2},{eps}{3},{ps}{4}%
+ }{\svg@tempa}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% false
+ \@svgx@runfalse%
+ \or% true
+ \@svgx@runtrue%
+ \or% pdf
+ \FamilyOptions{SVG}{extractformat=pdf}%
+ \or% eps
+ \FamilyOptions{SVG}{extractformat=eps}%
+ \or% ps
+ \FamilyOptions{SVG}{extractformat=ps}%
+ \fi%
+ \fi%
+}
+\DeclareOption{on}{\FamilyOptions{SVG}{extract=true}}
+\DeclareOption{off}{\FamilyOptions{SVG}{extract=false}}
+\newcommand*\svgx@format{pdf}
+\ifxetex\else\ifpdf\else
+ \renewcommand*\svgx@format{eps}
+\fi\fi
+\DefineFamilyKey{SVG}{extractformat}{%
+ \lowercase{\edef\svgx@format{#1}}%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{pdf}[true]{%
+ \FamilySetBool{SVG}{pdf}{@svg@tempswa}{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \if@svg@tempswa%
+ \svgx@ifinlist{pdf}{\svgx@format}{}{%
+ \edef\svgx@format{\svgx@format,pdf}%
+ }%
+ \svg@deprecated@key{pdf}{extractformat={\svgx@format}}%
+ \else%
+ \FamilyKeyStateUnknownValue
+ \fi%
+ \fi%
+}
+\DefineFamilyKey{SVG}{eps}[true]{%
+ \FamilySetBool{SVG}{eps}{@svg@tempswa}{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \if@svg@tempswa%
+ \svgx@ifinlist{eps}{\svgx@format}{}{%
+ \edef\svgx@format{\svgx@format,eps}%
+ }%
+ \svg@deprecated@key{eps}{extractformat={\svgx@format}}%
+ \else%
+ \FamilyKeyStateUnknownValue
+ \fi%
+ \fi%
+}
+\newcommand*\svgx@preamble{\jobname.\svgx@latex@ext}%
+\DefineFamilyKey{SVG}{extractpreamble}{%
+ \renewcommand*\svgx@preamble{#1}%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{preamble}{%
+ \svg@deprecated@key[svg-extract]{preamble=#1}{extractpreamble=#1}%
+}
+\newcommand*\svgx@endpreamble{}
+\expandafter\def\expandafter\svgx@endpreamble\expandafter{%
+ \csname begin\endcsname{document}%
+}
+\DefineFamilyKey{SVG}{extractpreambleend}{%
+ \renewcommand*\svgx@endpreamble{#1}%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{end}{%
+ \svg@deprecated@key[svg-extract]{end=#1}{extractpreambleend=#1}%
+}
+\newcounter{svgx@runs}
+\DefineFamilyKey{SVG}{extractruns}{%
+ \FamilySetCounter{SVG}{extractruns}{svgx@runs}{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifnum\value{svgx@runs}<\@ne\relax%
+ \PackageWarning{svg-extract}{%
+ The count for runs has to be at least one%
+ }%
+ \FamilySetCounter{SVG}{extractruns}{svgx@runs}{\@ne}%
+ \fi%
+ \fi%
+}
+\ifxetex
+ \newcommand*\svgx@latex@exe{xelatex}
+\else\ifluatex
+ \ifpdf
+ \newcommand*\svgx@latex@exe{lualatex}
+ \else
+ \newcommand*\svgx@latex@exe{lualatex --output-format=dvi}
+ \fi
+\else\ifpdf
+ \newcommand*\svgx@latex@exe{pdflatex}
+\else
+ \newcommand*\svgx@latex@exe{latex}
+\fi\fi\fi
+\DefineFamilyKey{SVG}{latexexe}{%
+ \renewcommand*\svgx@latex@exe{#1}%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{pdflatex}{%
+ \svg@deprecated@key[svg-extract]{pdflatex=#1}{latexexe=#1}%
+}
+\newcommand*\svgx@latex@ext{tex}
+\DefineFamilyKey{SVG}{latexext}{%
+ \renewcommand*\svgx@latex@ext{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@latex@opt{}
+\DefineFamilyKey{SVG}{latexopt}{%
+ \renewcommand*\svgx@latex@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@dvips@exe{dvips}
+\newcommand*\svgx@dvips@opt{}
+\DefineFamilyKey{SVG}{dvipsopt}{%
+ \renewcommand*\svgx@dvips@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@pstoeps@exe{ps2eps}
+\newcommand*\svgx@pstoeps@opt{-B -C}
+\DefineFamilyKey{SVG}{pstoepsopt}{%
+ \renewcommand*\svgx@pstoeps@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@pstopdf@exe{ps2pdf}
+\newcommand*\svgx@pstopdf@opt{}
+\DefineFamilyKey{SVG}{pstopdfopt}{%
+ \renewcommand*\svgx@pstopdf@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@pdftoeps@exe{pdftops -eps}
+\newcommand*\svgx@pdftoeps@opt{}
+\DefineFamilyKey{SVG}{pdftoepsopt}{%
+ \renewcommand*\svgx@pdftoeps@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@pdftops@exe{pdftops}
+\newcommand*\svgx@pdftops@opt{}
+\DefineFamilyKey{SVG}{pdftopsopt}{%
+ \renewcommand*\svgx@pdftops@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{pdftops}{%
+ \PackageWarning{#1}{%
+ 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%
+ }%
+ \FamilyKeyStateProcessed
+}
+\newif\if@svgx@cnv@run
+\newcommand*\svgx@cnv@cmd{}
+\DefineFamilyKey{SVG}{convert}[true]{%
+ \FamilySetNumerical{SVG}{convert}{svg@tempa}{%
+ {false}{0},{off}{0},{no}{0},%
+ {true}{1},{on}{1},{yes}{1},{onlynewer}{1},{newer}{1},%
+ {overwrite}{1},{force}{1},{forced}{1},%
+ {magick}{2},{imagemagick}{2},{convert}{2},%
+ {gs}{3},{ghostscript}{3},%
+ {gs64}{4},{ghostscript64}{4},%
+ {gs32}{5},{ghostscript32}{5}%
+ }{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% false
+ \@svgx@cnv@runfalse%
+ \or% true
+ \@svgx@cnv@runtrue%
+ \or% magick
+ \@svgx@cnv@runtrue%
+ \renewcommand*\svgx@cnv@cmd{\svgx@magick@cmd}%
+ \or% gs
+ \@svgx@cnv@runtrue%
+ \renewcommand*\svgx@cnv@cmd{\svgx@gs@cmd}%
+ \or% gs64
+ \@svgx@cnv@runtrue%
+ \renewcommand*\svgx@cnv@cmd{\svgx@gs@cmd}%
+ \svgx@onlywindows{%
+ \renewcommand*\svgx@gs@exe{gswin64c}%
+ }%
+ \or% gs32
+ \@svgx@cnv@runtrue%
+ \renewcommand*\svgx@cnv@cmd{\svgx@gs@cmd}%
+ \svgx@onlywindows{%
+ \renewcommand*\svgx@gs@exe{gswin32c}%
+ }%
+ \fi%
+ \else%
+ \def\svg@tempa##1-##2\@nil{%
+ \IfArgIsEmpty{##2}{\def\svg@tempb{}}{%
+ \def\svg@tempa##1####1\@nil{\def\svg@tempb{####1}}%
+ \svg@tempa#1\@nil%
+ }%
+ \def\svg@tempa{##1}%
+ }%
+ \svg@tempa#1-\@nil%
+ \PackageWarning{svg-extract}{%
+ Setting the executable%
+ \ifx\svg@tempb\@empty\else%
+ \space and associated options%
+ \fi%
+ \MessageBreak%
+ for ImageMagick should be done with options\MessageBreak%
+ `magickexe=\svg@tempa'%
+ \ifx\svg@tempb\@empty\else%
+ \MessageBreak and `magicksetting' and/or `magickoperator'%
+ \fi.\MessageBreak%
+ Nevertheless, this was done by now%
+ \ifx\svg@tempb\@empty\else%
+ , whereby \MessageBreak `magicksetting=\svg@tempb' was used%
+ \fi%
+ }%
+ \FamilyOptions{SVG}{convert=magick}%
+ \edef\svg@tempa{%
+ \noexpand\FamilyOptions{SVG}{magickexe=\svg@tempa}%
+ \ifx\svg@tempb\@empty\else%
+ \noexpand\FamilyOptions{SVG}{magicksetting=\svg@tempb}%
+ \fi%
+ }%
+ \svg@tempa%
+ \fi%
+}
+\newcommand*\svgx@cnv@format{png}
+\DefineFamilyKey{SVG}{convertformat}{%
+ \lowercase{\edef\svgx@cnv@format{#1}}%
+ \ifx\svgx@cnv@format\@empty\else%
+ \@svgx@cnv@runtrue%
+ \fi%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{png}[true]{%
+ \FamilySetBool{SVG}{png}{@svg@tempswa}{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \if@svg@tempswa%
+ \svgx@ifinlist{png}{\svgx@cnv@format}{}{%
+ \edef\svgx@cnv@format{\svgx@cnv@format,png}%
+ }%
+ \svg@deprecated@key{png}{convertformat={\svgx@cnv@format}}%
+ \else%
+ \FamilyKeyStateUnknownValue
+ \fi%
+ \fi%
+}
+\newcommand*\svgx@cnv@dpi{}
+\let\svgx@cnv@dpi\relax
+\DefineFamilyKey{SVG}{convertdpi}{%
+ \FamilyKeyStateUnknownValue%
+ \svgx@ifkeyandval{#1}{%
+ \svgx@cnv@get@dpi{##2}%
+ \ifx\svg@tempa\relax\else%
+ \expandafter\edef\csname svgx@cnv@dpi@##1\endcsname{\svg@tempa}%
+ \FamilyKeyStateProcessed%
+ \fi%
+ }{%
+ \svgx@cnv@get@dpi{##1}%
+ \ifx\svg@tempa\relax\else%
+ \edef\svgx@cnv@dpi{\svg@tempa}%
+ \FamilyKeyStateProcessed%
+ \fi%
+ }%
+}
+\DefineFamilyKey{SVG}{convertdensity}{\FamilyOptions{SVG}{convertdpi=#1}}
+\newcommand*\svgx@magick@exe{}
+\DefineFamilyKey{SVG}{magickexe}{%
+ \renewcommand*\svgx@magick@exe{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@magick@set{}
+\DefineFamilyKey{SVG}{magicksetting}{%
+ \svgx@setformatkey{#1}{svgx@magick@set}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@magick@opr{}
+\DefineFamilyKey{SVG}{magickoperator}{%
+ \svgx@setformatkey{#1}{svgx@magick@opr}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@gs@exe{}
+\DefineFamilyKey{SVG}{gsexe}{%
+ \renewcommand*\svgx@gs@exe{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@gs@opt{}
+\DefineFamilyKey{SVG}{gsopt}{%
+ \svgx@setformatkey{#1}{svgx@gs@opt}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@gs@device{}
+\DefineFamilyKey{SVG}{gsdevice}{%
+ \svgx@setformatkey{#1}{svgx@gs@device}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@out@path{}
+\DefineFamilyKey{SVG}{extractpath}{%
+ \FamilySetNumerical{SVG}{extractpath}{svg@tempa}{%
+ {svgpath}{0},{svgdir}{0},%
+ {svgsubpath}{1},{svgsubdir}{1},%
+ {basepath}{2},{basedir}{2},{jobpath}{2},{jobdir}{2},%
+ {basesubpath}{3},{basesubdir}{3},{jobsubpath}{3},{jobsubdir}{3}%
+ }{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% svgpath
+ \renewcommand*\svgx@out@path{\svg@file@path}%
+ \or% svgsubpath
+ \renewcommand*\svgx@out@path{\svg@file@path svg-extract/}%
+ \or% basepath
+ \renewcommand*\svgx@out@path{./}%
+ \or% basesubpath
+ \renewcommand*\svgx@out@path{./svg-extract/}%
+ \fi%
+ \else%
+ \renewcommand*\svgx@out@path{#1}%
+ \svg@normalize@path{\svgx@out@path}%
+ \FamilyKeyStateProcessed%
+ \fi%
+}
+\DefineFamilyKey{SVG}{path}{%
+ \svg@deprecated@key[svg-extract]{path=#1}{extractpath=#1}%
+}
+\newcounter{svgx@out@count}
+\newcommand*\svgx@out@name{}
+\newif\if@svgx@out@sec
+\DefineFamilyKey{SVG}{extractname}{%
+ \FamilySetNumerical{SVG}{extractname}{svg@tempa}{%
+ {filename}{0},{name}{0},%
+ {filenamenumbered}{1},{namenumbered}{1},%
+ {numberedfilename}{1},{numberedname}{1},%
+ {numbered}{2},{section}{2},{numberedsection}{2},{sectionnumbered}{2}%
+ }{#1}%
+ \@svgx@out@secfalse%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% filename
+ \renewcommand*\svgx@out@name{\svg@out@name-extract}%
+ \or% filenamenumbered
+ \renewcommand*\svgx@out@name{\the\value{svgx@out@count}-\svg@out@name}%
+ \or% numbered
+ \renewcommand*\svgx@out@name{\the\value{svgx@out@count}-\svgx@out@sec}%
+ \@svgx@out@sectrue%
+ \fi%
+ \else%
+ \def\svg@tempa##1.##2\@nil{%
+ \IfArgIsEmpty{##1}{}{\renewcommand*\svgx@out@name{##1}}%
+ }%
+ \svg@tempa#1.\@nil%
+ \FamilyKeyStateProcessed%
+ \fi%
+}
+\DefineFamilyKey{SVG}{name}{%
+ \svg@deprecated@key[svg-extract]{name=#1}{extractname=#1}%
+}
+\newcommand*\svgx@param@width{\svg@param@width}
+\DefineFamilyKey{SVG}{extractwidth}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \renewcommand*\svgx@param@width{\z@}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \ifstr{#1}{inherit}{%
+ \renewcommand*\svgx@param@width{\svg@param@width}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \FamilySetLengthMacro{SVG}{extractwidth}{\svgx@param@width}{#1}%
+ \ifdim\svgx@param@width<\z@\relax%
+ \FamilyKeyStateUnknownValue%
+ \fi%
+ }%
+ }%
+}
+\newcommand*\svgx@param@height{\svg@param@height}
+\DefineFamilyKey{SVG}{extractheight}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \renewcommand*\svgx@param@height{\z@}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \ifstr{#1}{inherit}{%
+ \renewcommand*\svgx@param@height{\svg@param@height}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \FamilySetLengthMacro{SVG}{extractheight}{\svgx@param@height}{#1}%
+ \ifdim\svgx@param@height<\z@\relax%
+ \FamilyKeyStateUnknownValue%
+ \fi%
+ }%
+ }%
+}
+\newcommand*\svgx@param@scale{\svg@param@scale}
+\DefineFamilyKey{SVG}{extractscale}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \renewcommand*\svgx@param@scale{1}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \ifstr{#1}{inherit}{%
+ \renewcommand*\svgx@param@scale{\svg@param@scale}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \ifisdimension{#1\p@}{%
+ \ifdim\dimexpr#1\p@\relax>\z@\relax%
+ \renewcommand*\svgx@param@scale{#1}%
+ \FamilyKeyStateProcessed%
+ \fi%
+ }{}%
+ }%
+ }%
+}
+\newcommand*\svgx@param@pretex{\svg@param@pretex}
+\DefineFamilyKey{SVG}{extractpretex}{%
+ \svg@ifvalueisrelax{#1}{%
+ \let\svgx@param@pretex\relax%
+ }{%
+ \ifstr{#1}{inherit}{%
+ \def\svgx@param@pretex{\svg@param@pretex}%
+ }{%
+ \def\svgx@param@pretex{#1}%
+ }%
+ }%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svgx@param@apptex{\svg@param@apptex}
+\DefineFamilyKey{SVG}{extractapptex}{%
+ \svg@ifvalueisrelax{#1}{%
+ \let\svgx@param@apptex\relax%
+ }{%
+ \ifstr{#1}{inherit}{%
+ \def\svgx@param@apptex{\svg@param@apptex}%
+ }{%
+ \def\svgx@param@apptex{#1}%
+ }%
+ }%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{extractpostex}{%
+ \svg@deprecated@key[svg-extract]{extractpostex=#1}{extractapptex=#1}%
+}
+\newcommand*\svgx@clean{}
+\DefineFamilyKey{SVG}{clean}[true]{%
+ \FamilySetBool{SVG}{clean}{@svg@tempswa}{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \if@svg@tempswa%
+ \renewcommand*\svgx@clean{log,aux,dvi,out,ps,eps,pdf,\svgx@latex@ext}%
+ \else%
+ \renewcommand*\svgx@clean{}%
+ \fi%
+ \else%
+ \renewcommand*\svgx@clean{#1}%
+ \FamilyKeyStateProcessed%
+ \fi%
+}
+\DefineFamilyKey{SVG}{clear}{\FamilyOptions{SVG}{clean=#1}}
+\DefineFamilyKey{SVG}{exclude}[true]{%
+ \FamilySetBool{SVG}{exclude}{@svg@tempswa}{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \if@svg@tempswa%
+ \renewcommand*\svg@input[2][]{%
+ \if@svgx@run\else%
+ \PackageWarning{svg-extract}{%
+ The image `##2' was\MessageBreak%
+ neither extracted nor included%
+ }%
+ \fi%
+ }%
+ \else%
+ \renewcommand*\svg@input{\svg@@input}%
+ \fi%
+ \fi%
+}
+\newcommand*\svgx@ifinlist[2]{%
+ \begingroup%
+ \def\svg@tempa##1,#1,##2\@nil{%
+ \IfArgIsEmpty{##2}{%
+ \aftergroup\@secondoftwo%
+ }{%
+ \aftergroup\@firstoftwo%
+ }%
+ }%
+ \expandafter\svg@tempa\expandafter,#2,#1,\@nil%
+ \endgroup%
+}
+\newcommand*\svgx@onlywindows[1]{}
+\AfterPackage*{ifplatform}{\renewcommand*\svgx@onlywindows[1]{\ifwindows#1\fi}}
+\newcommand*\svgx@ifkeyandval[3]{%
+ \def\svg@tempa##1=##2=##3\@nil{\ifstr{##3}{=}{#2}{#3}}%
+ \svg@tempa#1==\@nil%
+}
+\newcommand*\svgx@cnv@get@dpi[1]{%
+ \begingroup%
+ \def\svg@tempa##1dpi##2x##3dpi##4\@nil{%
+ \edef\svg@tempa{##1}%
+ \@svg@tempswafalse%
+ \ifnumber{##1}{%
+ \IfArgIsEmpty{##3}{\@svg@tempswatrue}{%
+ \ifnumber{##3}{\edef\svg@tempa{##1x##3}}{}%
+ }%
+ }{}%
+ \if@svg@tempswa\else%
+ \expandafter\svg@tempb\svg@tempa xx\@nil%
+ \fi%
+ }%
+ \def\svg@tempb##1x##2x##3\@nil{%
+ \ifstr{##3}{x}{%
+ \@svg@tempswatrue%
+ \IfArgIsEmpty{##1}{\@svg@tempswafalse}{%
+ \ifnumber{##1}{}{\@svg@tempswafalse}%
+ }%
+ \IfArgIsEmpty{##2}{\@svg@tempswafalse}{%
+ \ifnumber{##2}{}{\@svg@tempswafalse}%
+ }%
+ \if@svg@tempswa%
+ \edef\svg@tempa{##1x##2}%
+ \fi%
+ }{}%
+ }%
+ \IfArgIsEmpty{#1}{%
+ \let\svg@tempa\@empty%
+ }{%
+ \lowercase{\svg@tempa#1dpi#1xdpi\@nil}%
+ \if@svg@tempswa\else%
+ \let\svg@tempa\relax%
+ \fi%
+ }%
+ \edef\svg@tempb{%
+ \noexpand\endgroup%
+ \ifx\svg@tempa\relax%
+ \noexpand\let\noexpand\svg@tempa\noexpand\relax%
+ \else%
+ \noexpand\def\noexpand\svg@tempa{\svg@tempa}%
+ \fi%
+ }%
+ \svg@tempb%
+}
+\newcommand*\svgx@setformatkey[2]{%
+ \svgx@ifkeyandval{#1}{%
+ \svg@ifvalueisrelax{##2}{%
+ \expandafter\let\csname #2@##1\endcsname\relax%
+ }{%
+ \@namedef{#2@##1}{##2}%
+ }%
+ }{%
+ \svg@ifvalueisrelax{##1}{%
+ \expandafter\let\csname #2\endcsname\relax%
+ }{%
+ \@namedef{#2}{##1}%
+ }%
+ }%
+}
+\newcommand*\svgx@useformatkey[3]{%
+ \scr@ifundefinedorrelax{#1@#2}{%
+ \scr@ifundefinedorrelax{#1}{}{%
+ \expandafter\ifx\csname #1\endcsname\@empty\else%
+ #3\@nameuse{#1}\space%
+ \fi%
+ }%
+ \scr@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%
+ }%
+}
+\newbox\svgx@box
+\newcommand*\svgxsetbox[2][]{%
+ \sbox\svgx@box{\svg@@input[{#1},draft=false]{#2}}%
+ \csname @tud@x@standalone@croptrue\endcsname%
+ \svgxsetpapersize%
+}
+\newcommand*\svgxsetpapersize{%
+ \setlength\paperwidth{\the\wd\svgx@box}%
+ \ifx\stockwidth\@undefined\else%
+ \setlength\stockwidth{\paperwidth}%
+ \fi%
+ \ifx\mediawidth\@undefined\else%
+ \setlength\mediawidth{\paperwidth}%
+ \fi%
+ \setlength\textwidth{\paperwidth}%
+ \setlength\paperheight{\the\dimexpr\ht\svgx@box+\dp\svgx@box\relax}%
+ \ifx\stockheight\@undefined\else%
+ \setlength\stockheight{\paperheight}%
+ \fi%
+ \ifx\mediaheight\@undefined\else%
+ \setlength\mediaheight{\paperheight}%
+ \fi%
+ \setlength\textheight{\paperheight}%
+ \hoffset=-1in%
+ \oddsidemargin=\z@%
+ \evensidemargin=\z@%
+ \voffset=-1in%
+ \topmargin=\z@%
+ \headheight=\z@%
+ \headsep=\z@%
+ \topskip=\z@%
+ \footskip=\z@%
+ \marginparsep=\z@%
+ \marginparwidth=\z@%
+ \marginparpush=\z@%
+}
+\@onlypreamble\svgxsetpapersize
+\newif\if@svgx@beamer
+\@ifclassloaded{beamer}{\@svgx@beamertrue}{}%
+\newcommand*\svgxoutputbox{%
+ \begingroup%
+ \setlength\parindent{\z@}%
+ \setlength\parskip{\z@}%
+ \setlength\parfillskip{\z@}%
+ \if@svgx@beamer%
+ \setbeamertemplate{navigation symbols}{}%
+ \begin{frame}[plain]%
+ \usebox\svgx@box%
+ \end{frame}%
+ \else%
+ \usebox\svgx@box%
+ \fi%
+ \endgraf%
+ \endgroup%
+}
+\FamilyExecuteOptions{SVG}{%
+ extract=true,extractpath=basesubdir,extractruns=2,extractname=namenumbered,%
+ 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}
+\let\svghidepreamblestart\relax
+\let\svghidepreambleend\relax
+\ifnum\pdf@shellescape=\@ne\relax\else%
+ \renewcommand*\svg@extract[1]{%
+ \if@svgx@run%
+ \begingroup%
+ \edef\svg@tempa{#1}%
+ \svg@quotes@remove{\svg@tempa}%
+ \PackageWarning{svg-extract}{%
+ You didn't enable `shell escape' (or `write18')\MessageBreak%
+ so it wasn't possible to run the extraction for\MessageBreak%
+ file `\svg@tempa'%
+ }%
+ \endgroup%
+ \fi%
+ }%
+ \expandafter\endinput%
+\fi
+\newread\svgx@stream@in
+\newcommand*\svgx@read@line{}
+\newwrite\svgx@stream@out
+\newif\if@svgx@preamble@write
+\renewcommand*\svg@extract[1]{%
+ \if@svgx@run%
+ \if@svgx@out@sec%
+ \svgx@get@out@sec%
+ \fi%
+ \stepcounter{svgx@out@count}%
+ \begingroup%
+ \def\svg@tempa##1.##2\@nil{%
+ \IfArgIsEmpty{##2}{\edef\svgx@preamble{##1.\svgx@latex@ext}}{}%
+ }%
+ \expandafter\svg@tempa\svgx@preamble.\@nil%
+ \IfFileExists{\svg@file@path\svgx@preamble}{%
+ \@svg@file@foundtrue%
+ }{%
+ \svg@get@path[]{\svgx@preamble}{\svg@out@path}%
+ \def\svg@tempa####1.####2\@nil{%
+ \edef\svgx@preamble{\svg@file@name.####2}%
+ }%
+ \expandafter\svg@tempa\svgx@preamble\@nil%
+ }%
+ \edef\svg@tempa{%
+ \endgroup%
+ \if@svg@file@found%
+ \ifx\svg@file@path\@empty%
+ \def\noexpand\svgx@preamble{./\svgx@preamble}%
+ \else%
+ \def\noexpand\svgx@preamble{\svg@file@path\svgx@preamble}%
+ \fi%
+ \fi%
+ }%
+ \svg@tempa%
+ \begingroup%
+ \endlinechar=\m@ne%
+ \IfFileExists{\svgx@preamble}{%
+ \PackageInfo{svg-extract}{%
+ The preamble file `\svgx@preamble'\MessageBreak%
+ is used for the generation of the auxiliary file\MessageBreak%
+ `\svgx@out@name.\svgx@latex@ext'%
+ }%
+ \catcode`\#=12\relax%
+ \immediate\openout\svgx@stream@out=\svgx@out@name.\svgx@latex@ext%
+ \immediate\openin\svgx@stream@in=\svgx@preamble%
+ \@svg@tempswatrue%
+ \@svgx@preamble@writetrue%
+ \def\svgx@read@line{}%
+ \@whilesw\if@svg@tempswa\fi{%
+ \immediate\read\svgx@stream@in to\svgx@read@line%
+ \ifx\svgx@read@line\@empty%
+ \ifeof\svgx@stream@in\@svg@tempswafalse\fi%
+ \else%
+ \svgx@read@preamble@till{\svghidepreamblestart}{}%
+ \svgx@read@preamble@from{\svghidepreambleend}{}%
+ \svgx@read@preamble@till{\svgx@endpreamble}{\@svg@tempswafalse}%
+ \if@svgx@preamble@write%
+ \if@svgx@classfound\else%
+ \expandafter\svgx@documentclass%
+ \svgx@read@line\documentclass\documentclass\@nil%
+ \fi%
+ \ifx\svgx@read@line\@empty\else%
+ \immediate\write\svgx@stream@out{%
+ \unexpanded\expandafter{\svgx@read@line}%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ }%
+ \immediate\closein\svgx@stream@in%
+ \immediate\closeout\svgx@stream@out%
+ \catcode`\#=6\relax%
+ \immediate\openin\svgx@stream@in=\svgx@out@name.\svgx@latex@ext%
+ \def\svg@tempa{}%
+ \loop\unless\ifeof\svgx@stream@in%
+ \readline\svgx@stream@in to\svgx@read@line%
+ \ifx\svgx@read@line\@empty\else%
+ \edef\svg@tempa{%
+ \unexpanded\expandafter{\svg@tempa}%
+ \unexpanded\expandafter{\svgx@read@line}^^J%
+ }%
+ \fi%
+ \repeat%
+ \immediate\closein\svgx@stream@in%
+ }{%
+ \svg@quotes@remove{\svgx@preamble}%
+ \ifx\svgx@preamble\@empty\else%
+ \PackageWarning{svg-extract}{%
+ The preamble file `\svgx@preamble'\MessageBreak%
+ does not exist%
+ }%
+ \fi%
+ \def\svg@tempa{}%
+ }%
+ \immediate\openout\svgx@stream@out=\svgx@out@name.\svgx@latex@ext%
+ \immediate\write\svgx@stream@out{%
+ \@percentchar\@percentchar\space This file was generated by package
+ `svg-extract'^^J%
+ \@percentchar\@percentchar\space from source `\jobname'^^J%
+ \@percentchar\@percentchar\space It's intended to be compiled with
+ `\svgx@latex@exe\ifx\svgx@latex@opt\@empty\else\space\svgx@latex@opt\fi'
+ }%
+ \immediate\write\svgx@stream@out{%
+ \string\AtBeginDocument{\@percentchar^^J%
+ \space\space\string\svgxsetpapersize\@percentchar^^J%
+ \ifxetex\else\ifpdf\else%
+ \space\space\string\AtBeginDvi{\string\special{%
+ papersize=\string\the\string\paperwidth,%
+ \string\the\string\paperheight%
+ }}\@percentchar^^J%
+ \fi\fi%
+ }^^J%
+ \string\PassOptionsToPackage{hidelinks}{hyperref}%
+ }%
+ \if@svgx@classfound\else%
+ \immediate\write\svgx@stream@out{\string\documentclass{article}}%
+ \fi%
+ \ifx\svg@tempa\@empty\else%
+ \immediate\write\svgx@stream@out{\unexpanded\expandafter{\svg@tempa}}%
+ \fi%
+ \immediate\write\svgx@stream@out{\string\usepackage{svg-extract}}%
+ \def\svg@tempa##1{%
+ \immediate\write\svgx@stream@out{\string\svgsetup{##1}}%
+ }%
+ \if@svg@ink@latex\else%
+ \svg@tempa{inkscapelatex=false}%
+ \fi%
+ \ifdim\svgx@param@width>\z@\relax%
+ \svg@tempa{width=\svgx@param@width}%
+ \fi%
+ \ifdim\svgx@param@height>\z@\relax%
+ \svg@tempa{height=\svgx@param@height}%
+ \fi%
+ \ifdim\dimexpr\svgx@param@scale\p@\relax=\p@\relax\else%
+ \svg@tempa{scale=\svgx@param@scale}%
+ \fi%
+ \def\svg@tempb{\svg@param@pretex}%
+ \ifx\svgx@param@pretex\svg@tempb\relax%
+ \let\svgx@param@pretex\svg@param@pretex%
+ \fi%
+ \ifx\svgx@param@pretex\relax\else%
+ \svg@tempa{pretex=\unexpanded\expandafter{\svgx@param@pretex}}%
+ \fi%
+ \def\svg@tempb{\svg@param@apptex}%
+ \ifx\svgx@param@apptex\svg@tempb\relax%
+ \let\svgx@param@apptex\svg@param@apptex%
+ \fi%
+ \ifx\svgx@param@apptex\relax\else%
+ \svg@tempa{apptex=\unexpanded\expandafter{\svgx@param@apptex}}%
+ \fi%
+ \let\svg@tempa\@empty%
+ \if@svg@ink@latex%
+ \ifstr{\svg@ink@format}{pdf}{%
+ \ifnum\value{svg@param@lastpage}>\z@\relax%
+ \edef\svg@tempa{lastpage=\the\value{svg@param@lastpage}}%
+ \else%
+ \ifnum\value{svg@param@lastpage}=\z@\relax%
+ \def\svg@tempa{lastpage=true}%
+ \else%
+ \def\svg@tempa{lastpage=false}%
+ \fi%
+ \fi%
+ }{}%
+ \fi%
+ \ifx\svg@tempa\@empty%
+ \def\svg@tempa{\string\svgxsetbox{#1}}%
+ \else%
+ \edef\svg@tempa{\noexpand\string\noexpand\svgxsetbox[\svg@tempa]{#1}}%
+ \fi%
+ \immediate\write\svgx@stream@out{\svg@tempa}%
+ \if@svg@ink@latex%
+ \IfFileExists{xr.sty}{%
+ \immediate\write\svgx@stream@out{%
+ \string\usepackage{xr}^^J%
+ \string\externaldocument{\jobname}^^J%
+ }%
+ }{}%
+ \fi%
+ \immediate\write\svgx@stream@out{%
+ \string\AtBeginDocument{\@percentchar^^J%
+ \space\space\svg@tempa\@percentchar^^J%
+ }^^J^^J%
+ \string\begin{document}^^J%
+ \string\pagestyle{empty}^^J%
+ \string\svgxoutputbox\@percentchar^^J%
+ \string\end{document}%
+ }%
+ \immediate\closeout\svgx@stream@out%
+ \endgroup%
+ \ifstr{\svgx@format\svgx@cnv@format}{}{%
+ \PackageWarning{svg-extract}{%
+ Both keys `extractformat' and `convertformat' are\MessageBreak%
+ empty, so nothing to do so far%
+ }%
+ }{%
+ \svg@quotes@remove{\svgx@out@path}%
+ \svg@quotes@remove{\svgx@out@name}%
+ \edef\svg@tempb{%
+ \noexpand\svg@shell@mkdir{\svgx@out@path}%
+ }%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ \edef\svg@tempb{%
+ \noexpand\PackageInfo{svg-extract}{%
+ Running LaTeX (\svgx@latex@exe) for graphic extraction%
+ \ifx\svgx@latex@opt\@empty\else%
+ \MessageBreak with added options `\svgx@latex@opt'%
+ \fi%
+ }%
+ }%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ \edef\svg@tempb{%
+ \noexpand\ShellEscape{%
+ \svgx@latex@exe\space\svgx@latex@opt\space%
+ "\svgx@out@name.\svgx@latex@ext"%
+ }%
+ }%
+ \loop\ifnum\value{svgx@runs}>\z@\relax%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ \advance\c@svgx@runs\m@ne%
+ \repeat%
+ \def\svg@tempa##1##2##3{%
+ \edef\svg@tempb{%
+ \noexpand\ShellEscape{%
+ \@nameuse{svgx@##1@exe}\space\@nameuse{svgx@##1@opt}\space%
+ "\svgx@out@name.##2"%
+ }%
+ }%
+ \AfterReadingMainAux{\PackageInfo{svg-extract}{Running ##1}}%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ }%
+ \@svg@tempswafalse%
+ \ifxetex\else\ifpdf\else%
+ \@svg@tempswatrue%
+ \fi\fi%
+ \if@svg@tempswa%
+ \svg@tempa{dvips}{dvi}{ps}%
+ \svgx@ifinlist{eps}{\svgx@format}{\svg@tempa{pstoeps}{ps}{eps}}{}%
+ \svgx@ifinlist{pdf}{\svgx@format}{\svg@tempa{pstopdf}{ps}{pdf}}{}%
+ \else%
+ \svgx@ifinlist{eps}{\svgx@format}{\svg@tempa{pdftoeps}{pdf}{eps}}{}%
+ \svgx@ifinlist{ps}{\svgx@format}{\svg@tempa{pdftops}{pdf}{ps}}{}%
+ \fi%
+ \if@svgx@cnv@run%
+ \ifx\svgx@cnv@dpi\relax%
+ \ifx\svgx@cnv@dpi@png\@undefined%
+ \def\svgx@cnv@dpi@png{300}%
+ \fi%
+ \fi%
+ \expandafter\svgx@cnv@get@informat\expandafter{\svgx@format}%
+ \@for\svg@tempa:=\svgx@cnv@format\do{%
+ \ifx\svg@tempa\@empty\else%
+ \expandafter\svgx@ifinlist\expandafter{\svg@tempa}{\svgx@format}{%
+ \PackageWarning{svg-extract}{%
+ File type `\svg@tempa' was specified for option\MessageBreak%
+ `extractformat' (\svgx@format) as well as for \MessageBreak
+ option `convertformat' (\svgx@cnv@format) so the\MessageBreak%
+ conversion won't be done%
+ }%
+ }{%
+ \edef\svg@tempb{%
+ \noexpand\PackageInfo{svg-extract}{%
+ Converting `\svgx@out@name.\svgx@cnv@informat'\MessageBreak%
+ to `\svgx@out@name.\svg@tempa'%
+ }%
+ }%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ \edef\svg@tempb{%
+ \noexpand\ShellEscape{%
+ \svgx@cnv@cmd{\svgx@out@name}{\svgx@cnv@informat}{\svg@tempa}%
+ }%
+ }%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ }%
+ \fi%
+ }%
+ \fi%
+ \edef\svg@tempa{\svgx@format\if@svgx@cnv@run,\svgx@cnv@format\fi}%
+ \@for\svg@tempb:=\svg@tempa\do{%
+ \ifx\svg@tempb\@empty\else%
+ \edef\svg@tempb{%
+ \noexpand\svgx@move{\svgx@out@name}{\svg@tempb}{\svgx@out@path}%
+ }%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ \fi%
+ }%
+ \@for\svg@tempa:=\svgx@clean\do{%
+ \expandafter\svgx@ifinlist\expandafter{\svg@tempa}{\svg@tempb}{}{%
+ \edef\svg@tempb{%
+ \noexpand\IfFileExists{"\svgx@out@name".\svg@tempa}{%
+ \noexpand\svg@shell@rm{\svgx@out@name.\svg@tempa}%
+ }{}%
+ }%
+ \expandafter\AtEndDocument\expandafter{%
+ \expandafter\AfterReadingMainAux\expandafter{\svg@tempb}%
+ }%
+ }%
+ }%
+ }%
+ \fi%
+}
+\newcommand*\svgx@out@sec{unknown}
+\newcommand*\svgx@get@out@sec{%
+ \begingroup%
+ \def\svg@tempa{}%
+ \@for\svg@tempb:={%
+ part,chapter,section,subsection,subsubsection,paragraph,subparagraph%
+ }\do{%
+ \ifx\svg@tempb\@empty\else%
+ \scr@ifundefinedorrelax{the\svg@tempb}{}{%
+ \ifnum\value{\svg@tempb}>\z@\relax%
+ \edef\svg@tempa{\svg@tempb}%
+ \fi%
+ }%
+ \fi%
+ }%
+ \edef\svg@tempb{%
+ \endgroup%
+ \ifx\svg@tempa\@empty\else%
+ \def\noexpand\svgx@out@sec{\csname the\svg@tempa\endcsname}%
+ \fi%
+ }%
+ \svg@tempb%
+}
+\newif\if@svgx@classfound
+\newcommand*\svgx@documentclass{}
+\def\svgx@documentclass#1\documentclass#2\documentclass#3\@nil{%
+ \IfArgIsEmpty{#2}{}{\@svgx@classfoundtrue}%
+}
+\newcommand*\svgx@read@preamble@till[2]{%
+ \svgx@read@preamble@skip#1\@nil{till}{#2}%
+}
+\newcommand*\svgx@read@preamble@from[2]{%
+ \svgx@read@preamble@skip#1\@nil{from}{#2}%
+}
+\newcommand*\svgx@read@preamble@skip{}
+\def\svgx@read@preamble@skip#1\@nil#2#3{%
+ \def\svg@tempa##1{%
+ \def\svg@tempa####1##1####2##1####3\@nil{%
+ \IfArgIsEmpty{####3}{}{%
+ \ifstr{#2}{till}{%
+ \IfArgIsEmpty{####1}{}{%
+ \immediate\write\svgx@stream@out{####1}%
+ }%
+ \@svgx@preamble@writefalse%
+ }{%
+ \ifstr{#2}{from}{%
+ \IfArgIsEmpty{####2}{%
+ \def\svgx@read@line{}%
+ }{%
+ \def\svgx@read@line{####2}%
+ }%
+ \@svgx@preamble@writetrue%
+ }{}%
+ }%
+ #3%
+ }%
+ }%
+ }%
+ \edef\svg@tempb{\expandafter\detokenize\expandafter{#1}}%
+ \expandafter\svg@tempa\expandafter{\svg@tempb}%
+ \edef\svg@tempb{%
+ \expandafter\detokenize\expandafter{\svgx@read@line}\svg@tempb\svg@tempb%
+ }%
+ \expandafter\svg@tempa\svg@tempb\@nil%
+}
+\newcommand*\svgx@cnv@informat{}
+\newcommand*\svgx@cnv@get@informat[1]{%
+ \begingroup%
+ \def\svg@tempa##1,##2\@nil{%
+ \def\svg@tempa{##1}%
+ }%
+ \svg@tempa#1,\@nil%
+ \edef\svg@tempa{%
+ \noexpand\endgroup%
+ \noexpand\def\noexpand\svgx@cnv@informat{\svg@tempa}%
+ }%
+ \svg@tempa%
+ \ifx\svgx@cnv@informat\@empty%
+ \renewcommand*\svgx@cnv@informat{pdf}%
+ \ifxetex\else\ifpdf\else%
+ \renewcommand*\svgx@cnv@informat{ps}%
+ \fi\fi%
+ \fi%
+}
+\ifx\svgx@magick@exe\@empty
+ \ifwindows
+ \renewcommand*\svgx@magick@exe{magick}
+ \else
+ \renewcommand*\svgx@magick@exe{convert}
+ \fi
+\fi
+\newcommand*\svgx@magick@cmd[3]{%
+ \svgx@magick@exe\space%
+ \svgx@useformatkey{svgx@cnv@dpi}{#3}{-density }%
+ \svgx@useformatkey{svgx@magick@set}{#3}{}%
+ "#1.#2"\space%
+ \svgx@useformatkey{svgx@magick@opr}{#3}{}%
+ "#1.#3"%
+}
+\ifx\svgx@gs@exe\@empty
+ \ifwindows
+ \renewcommand*\svgx@gs@exe{gswin64c}
+ \else
+ \renewcommand*\svgx@gs@exe{gs}
+ \fi
+\fi
+\newcommand*\svgx@gs@cmd[3]{%
+ \svgx@gs@exe\space-dSAFER -dBATCH -dNOPAUSE\space%
+ \svgx@useformatkey{svgx@gs@device}{#3}{-sDEVICE=}%
+ \svgx@useformatkey{svgx@cnv@dpi}{#3}{-r}%
+ \svgx@useformatkey{svgx@gs@opt}{#3}{}%
+ -sOutputFile="#1.#3"\space"#1.#2"%
+}
+\newcommand*\svgx@move[3]{%
+ \begingroup%
+ \IfFileExists{"#1".#2}{%
+ \svg@shell@move{#1.#2}{#3#1.#2}%
+ }{%
+ \edef\svg@tempa{#2}%
+ \@svg@tempswafalse%
+ \expandafter\svgx@ifinlist\expandafter{\svg@tempa}{\svgx@cnv@format}{%
+ \@svg@tempswatrue%
+ \def\svg@tempb{conversion}%
+ }{%
+ \expandafter\svgx@ifinlist\expandafter{\svg@tempa}{pdf,ps,eps}{%
+ \@svg@tempswatrue%
+ \def\svg@tempb{extraction}%
+ }{}%
+ }%
+ \if@svg@tempswa%
+ \edef\svg@tempb{%
+ The graphic file \svg@tempb\space failed\MessageBreak%
+ for `#1.#2'\MessageBreak%
+ Troubleshooting: Please check the log file how the\MessageBreak%
+ invocation of the extraction took place and try\MessageBreak%
+ to execute it yourself in the terminal%
+ }%
+ \else%
+ \def\svg@tempb{%
+ The extraction to format `#2' failed\MessageBreak%
+ for `#1.#2'\MessageBreak%
+ Only file types `pdf,ps,eps' are supported for\MessageBreak%
+ key `exportformat'%
+ }%
+ \fi%
+ \PackageWarning{svg-extract}{\svg@tempb}%
+ }%
+ \endgroup%
+}
+\endinput
+%%
+%% End of file `svg-extract.sty'.
diff --git a/Master/texmf-dist/tex/latex/svg/svg.sty b/Master/texmf-dist/tex/latex/svg/svg.sty
index a40b54daaf6..f0689b8e64f 100644
--- a/Master/texmf-dist/tex/latex/svg/svg.sty
+++ b/Master/texmf-dist/tex/latex/svg/svg.sty
@@ -4,201 +4,1070 @@
%%
%% The original source files were:
%%
-%% svg.dtx (with options: `svg')
+%% svg.dtx (with options: `package,option,base')
+%% svg.dtx (with options: `package,body,base')
%%
-%% -------------------------------------------------------
-%% Copyright (C) 2012 by Philip Ilten <philten@cern.ch>
-%% -------------------------------------------------------
-%%
-%% This file may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3 of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in:
-%%
+%% svg -- Include SVG pictures in LaTeX documents using Inkscape
+%%
+%% Copyright (C) Philip Ilten <philten@cern.ch>, 2012-2016
+%% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2017-
+%%
+%% 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.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% The Current Maintainer of this work is Philip Ilten.
-%%
-%% This work consists of the files README, svg.dtx (with derived files
-%% svg.sty, svg.pdf, Fig.1a.pdf, Fig.1b.eps, Fig.2.pdf, Fig.2.png),
-%% preamble.tex, example.svg (with derived files example.pdf and
-%% example.pdf_tex), and root.C (with derived files root.svg,
-%% root.pdf, and root.pdf_tex).
-%%
-%% The following files constitute the svg package and should be
-%% distributed as a whole: README, svg.dtx, svg.sty, svg.pdf,
-%% Fig.1a.pdf, Fig.1b.eps, Fig.2.pdf, Fig.2.png, preamble.tex
-%% example.svg, example.pdf, example.pdf_tex, root.C, root.svg,
-%% root.pdf, and root.pdf_tex.
-\ProvidesPackage{svg}[2012/09/05 v1.0 SVG inclusion and extraction]%
-\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}%
-\@ifpackageloaded{subfig}{}{\RequirePackage{subfig}}%
-\@ifpackageloaded{import}{}{\RequirePackage{import}}%
-\@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}}%
-\@ifpackageloaded{transparent}{}{\RequirePackage{transparent}}%
-\@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}%
-\def\SVG@in@preamble{\jobname.tex}%
-\define@key[SVG]{svg.sty}{preamble}{\def\SVG@in@preamble{#1}}%
-\def\SVG@in@path{./}%
-\define@key[SVG]{svg.sty}{svgpath}{\def\SVG@in@path{#1}}%
-\def\SVG@in@end{\begin{document}}%
-\define@key[SVG]{svg.sty}{end}{\def\SVG@in@end{#1}}%
-\define@boolkey[SVG]{svg.sty}[SVG@in@]{exclude}[true]{}%
-\newlength\SVG@out@width%
-\newif\ifSVG@out@usewidth%
-\define@key[SVG]{svg.sty}{width}%
-{\setlength{\SVG@out@width}{#1}\SVG@out@usewidthtrue}%
-\newlength\SVG@out@height%
-\newif\ifSVG@out@useheight%
-\define@key[SVG]{svg.sty}{height}%
-{\setlength{\SVG@out@height}{#1}\SVG@out@useheighttrue}%
-\define@boolkey[SVG]{svg.sty}[SVG@out@]{pdf}[true]{}%
-\define@boolkey[SVG]{svg.sty}[SVG@out@]{eps}[true]{}%
-\define@boolkey[SVG]{svg.sty}[SVG@out@]{png}[true]{}%
-\newif\ifSVG@out@extract
-\def\SVG@out@path{./}%
-\define@key[SVG]{svg.sty}{path}{\def\SVG@out@path{#1}}%
-\def\SVG@out@name{Fig.\arabic{svgfigure}\alph{subfigure}}%
-\define@key[SVG]{svg.sty}{name}{\def\SVG@out@name{#1}}%
-\define@boolkey[SVG]{svg.sty}[SVG@out@]{clean}[true]{}%
-\def\SVG@out@pretex{}%
-\define@key[SVG]{svg.sty}{pretex}{\def\SVG@out@pretex{#1}}%
-\def\SVG@out@postex{}%
-\define@key[SVG]{svg.sty}{postex}{\def\SVG@out@postex{#1}}%
-\def\SVG@cmd@inkscape{inkscape -z -C}%
-\define@key[SVG]{svg.sty}{inkscape}{\def\SVG@cmd@inkscape{#1}}%
-\def\SVG@cmd@pdflatex{pdflatex}%
-\define@key[SVG]{svg.sty}{pdflatex}{\def\SVG@cmd@pdflatex{#1}}%
-\def\SVG@cmd@pdftops{pdftops -eps}%
-\define@key[SVG]{svg.sty}{pdftops}{\def\SVG@cmd@pdftops{#1}}%
-\def\SVG@cmd@convert{convert -density 300}%
-\define@key[SVG]{svg.sty}{convert}{\def\SVG@cmd@convert{#1}}%
-\ProcessOptionsX[SVG]%
-\newcounter{svgfigure}[figure]%
-\def\setsvg#1{\setkeys[SVG]{svg.sty}{#1}}%
-\def\includesvg{\@ifnextchar[\@includesvg{\@includesvg[]}}%
-\def\@includesvg[#1]#2{%
- \setkeys[SVG]{svg.sty}{#1}%
- \SVG@out@extractfalse%
- \ifSVG@out@pdf \SVG@out@extracttrue \fi%
- \ifSVG@out@eps \SVG@out@extracttrue \fi%
- \ifSVG@out@png \SVG@out@extracttrue \fi%
-\ifnum\pdfstrcmp%
-{\pdffilemoddate{\SVG@in@path#2.svg}}%
-{\pdffilemoddate{\SVG@in@path#2.pdf}}>0%
-\immediate\write18{\SVG@cmd@inkscape \space -f\SVG@in@path#2.svg%
- \space-A\SVG@in@path#2.pdf --export-latex}%
-\fi%
-\ifSVG@out@usewidth%
-\settoheight\SVG@out@height%
-{\includegraphics[width=\SVG@out@width]{\SVG@in@path#2}}%
-\else\ifSVG@out@useheight%
-\settowidth\SVG@out@width%
-{\includegraphics[height=\SVG@out@height]{\SVG@in@path#2}}%
-\else%
-\settoheight\SVG@out@height{\includegraphics{\SVG@in@path#2}}%
-\settowidth\SVG@out@width{\includegraphics{\SVG@in@path#2}}%
-\fi%
-\fi%
-\ifSVG@out@extract%
-\newwrite\SVG@out@file%
-\setcounter{svgfigure}{\value{figure}}%
-\stepcounter{svgfigure}%
-\def\SVG@out@filename{\SVG@out@name}%
-\immediate\openout\SVG@out@file=\SVG@out@path\SVG@out@filename.tex%
-\fi%
-\ifSVG@out@extract%
-\def\SVG@in@line{}%
-\newread\SVG@in@file%
-\immediate\openin\SVG@in@file=\SVG@in@preamble%
-\fi%
-\newif\ifSVG@in@read%
-\ifSVG@out@extract \SVG@in@readtrue \fi%
-\@whilesw\ifSVG@in@read\fi{%
- \catcode`\#=12\relax\endlinechar=-1%
- \immediate\read\SVG@in@file to \SVG@in@line%
- \ifx\SVG@in@end\SVG@in@line%
- \SVG@in@readfalse%
+%% 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}
+\ProvidesPackage{svg}[%
+ 2017/03/27 v2.00\space%
+ (include SVG pictures)%
+]
+\RequirePackage{scrbase}[2016/06/14]
+\RequirePackage{ifxetex}[2010/09/12]
+\RequirePackage{ifluatex}[2016/05/16]
+\RequirePackage{ifpdf}[2016/05/14]
+\RequirePackage{pdftexcmds}[2016/05/21]
+\RequirePackage{shellesc}[2016/06/07]
+\RequirePackage{graphicx}[1999/02/16]
+\DefineFamily{SVG}
+\DefineFamilyMember{SVG}
+\newcommand*\svg@deprecated@key[3][svg]{%
+ \PackageWarning{#1}{%
+ The option key `#2' is deprecated.\MessageBreak%
+ It's recommended to use `#3'\MessageBreak%
+ instead%
+ }%
+ \FamilyOptions{SVG}{#3}%
+}
+\newcommand*\svg@tempa{}
+\newcommand*\svg@tempb{}
+\newif\if@svg@tempswa
+\newcount\svg@tempcnt
+\newif\if@svg@use@xcolor
+\FamilyBoolKey{SVG}{usexcolor}{@svg@use@xcolor}
+\DeclareOption{noxcolor}{\FamilyOptions{SVG}{usexcolor=false}}
+\newif\if@svg@use@transparent
+\FamilyBoolKey{SVG}{usetransparent}{@svg@use@transparent}
+\DeclareOption{notransparent}{\FamilyOptions{SVG}{usetransparent=false}}
+\AtEndOfPackage{%
+ \RelaxFamilyKey{SVG}{usexcolor}%
+ \RelaxFamilyKey{SVG}{usetransparent}%
+ \if@svg@use@xcolor%
+ \RequirePackage{xcolor}[2016/05/11]%
\else%
- \immediate\write\SVG@out@file{\unexpanded\expandafter{\SVG@in@line}}%
- \fi%
- \ifeof\SVG@in@file\SVG@in@readfalse\fi%
- \endlinechar=13\catcode`\#=6\relax}%
-\ifSVG@out@extract \immediate\closein\SVG@in@file \fi%
-\ifSVG@out@extract%
-\def\SVG@out@defpack{\makeatletter%
- \@ifpackageloaded{import}{}{\RequirePackage{import}}%
- \@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}}%
- \@ifpackageloaded{transparent}{}{\RequirePackage{transparent}}%
- \@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}\makeatother}%
-\def\SVG@out@defwidth{\def\svgwidth{0.99\textwidth}}%
-\def\SVG@out@definput{\import{\SVG@in@path}{#2.pdf_tex}}%
-\immediate\write\SVG@out@file{\unexpanded\expandafter{\SVG@out@defpack}}%
-\immediate\write\SVG@out@file%
-{\noexpand\setlength{\pdfpagewidth}{\the\SVG@out@width}}%
-\immediate\write\SVG@out@file%
-{\noexpand\setlength{\pdfpageheight}{\the\SVG@out@height}}%
-\immediate\write\SVG@out@file%
-{\noexpand\setlength{\paperheight}{\pdfpageheight}}%
-\immediate\write\SVG@out@file%
-{\noexpand\setlength{\paperwidth}{\pdfpagewidth}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\textheight}{\paperheight}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\textwidth}{\paperwidth}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\textheight}{\paperheight}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\oddsidemargin}{-1in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\evensidemargin}{-1in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\topmargin}{-1in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\headheight}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\headsep}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\topskip}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\footskip}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\parindent}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\parsep}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\setlength{\parskip}{0in}}%
-\immediate\write\SVG@out@file{\noexpand\begin{document}}%
- \immediate\write\SVG@out@file{%
- \noexpand\pagestyle{empty}%
- \noexpand\begin{center}%
- \unexpanded\expandafter{\SVG@out@defwidth}%
- \unexpanded\expandafter{\SVG@out@pretex}%
- \expandafter\noexpand\SVG@out@definput%
- \unexpanded\expandafter{\SVG@out@postex}%
- \noexpand\end{center}}%
- \immediate\write\SVG@out@file{\noexpand\end{document}}%
-\immediate\closeout\SVG@out@file%
-\fi%
-\ifSVG@out@extract%
-\immediate\write18{\SVG@cmd@pdflatex\space\SVG@out@path\SVG@out@filename.tex}%
-\fi%
-\ifSVG@out@eps%
-\immediate\write18{\SVG@cmd@pdftops\space\SVG@out@filename.pdf}%
-\immediate\write18{mv \SVG@out@filename.eps%
- \space\SVG@out@path\SVG@out@filename.eps}%
-\fi%
-\ifSVG@out@png%
-\immediate\write18{\SVG@cmd@convert\space\SVG@out@filename.pdf%
- \space\SVG@out@filename.png}%
-\immediate\write18{mv \SVG@out@filename.png%
- \space\SVG@out@path\SVG@out@filename.png}%
-\fi%
-\ifSVG@out@extract%
-\ifSVG@out@pdf%
-\immediate\write18{mv \SVG@out@filename.pdf%
- \space\SVG@out@path\SVG@out@filename.pdf}%
-\else \ifSVG@out@clean \immediate\write18{rm \SVG@out@filename.pdf} \fi%
-\fi%
-\ifSVG@out@clean%
-\immediate\write18{rm \SVG@out@path\SVG@out@filename.tex%
- \space\SVG@out@filename.aux \SVG@out@filename.log \SVG@out@filename.out}%
-\fi\fi%
-\ifSVG@in@exclude \else {\def\svgwidth{\the\SVG@out@width}%
-\SVG@out@pretex\import{\SVG@in@path}{#2.pdf_tex}\SVG@out@postex} \fi%
-}%
+ \AfterPackage*{xcolor}{%
+ \PackageWarning{svg}{Package `xcolor' was loaded anyway}%
+ }%
+ \fi%
+ \if@svg@use@transparent%
+ \RequirePackage{transparent}[2016/05/16]%
+ \else%
+ \AfterPackage*{transparent}{%
+ \PackageWarning{svg}{Package `transparent' was loaded anyway}%
+ }%
+ \fi%
+}
+\newcommand*\svg@ink@mode{}
+\DefineFamilyKey{SVG}{inkscape}[true]{%
+ \lowercase{\def\svg@tempa{#1}}%
+ \FamilySetNumerical{SVG}{inkscape}{svg@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},%
+ {drawing}{7},{crop}{7},%
+ {page}{8},{nocrop}{8},%
+ {tex}{9},{latex}{9},{exportlatex}{9},{latexexport}{9},%
+ {notex}{10},{nolatex}{10},{noexportlatex}{10},{nolatexexport}{10},%
+ {latexnoexport}{10},{raw}{10},{plain}{10},{simple}{10}%
+ }{\svg@tempa}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifnum\svg@tempa<\thr@@\relax%
+ \let\svg@ink@mode\svg@tempa%
+ \else%
+ \ifcase\svg@tempa\relax\or\or\or% pdf
+ \FamilyOptions{SVG}{inkscapeformat=pdf}%
+ \or% eps
+ \FamilyOptions{SVG}{inkscapeformat=eps}%
+ \or% ps
+ \FamilyOptions{SVG}{inkscapeformat=ps}%
+ \or% png
+ \FamilyOptions{SVG}{inkscapeformat=png}%
+ \or% drawing
+ \FamilyOptions{SVG}{inkscapearea=drawing}%
+ \or% page
+ \FamilyOptions{SVG}{inkscapearea=page}%
+ \or% tex
+ \FamilyOptions{SVG}{inkscapelatex=true}%
+ \or% notex
+ \FamilyOptions{SVG}{inkscapelatex=false}%
+ \fi%
+ \fi%
+ \else% dpi
+ \def\svg@tempa##1dpi##2\@nil{%
+ \ifstr{##2}{dpi}{\FamilyOptions{SVG}{inkscapedpi=##1}}{}%
+ }%
+ \lowercase{\svg@tempa#1dpi\@nil}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed\else%
+ \def\svg@tempa##1-##2\@nil{%
+ \IfArgIsEmpty{##2}{\def\svg@tempb{}}{%
+ \def\svg@tempa##1####1\@nil{\def\svg@tempb{####1}}%
+ \svg@tempa#1\@nil%
+ }%
+ \def\svg@tempa{##1}%
+ }%
+ \svg@tempa#1-\@nil%
+ \PackageWarning{svg}{%
+ Setting the executable%
+ \ifx\svg@tempb\@empty\else%
+ \space and associated options%
+ \fi%
+ \MessageBreak%
+ for Inkscape should be done with options\MessageBreak%
+ `inkscapeexe=\svg@tempa'%
+ \ifx\svg@tempb\@empty\else%
+ \MessageBreak and `inkscapeopt=\svg@tempb'%
+ \fi.\MessageBreak%
+ Nevertheless, this was done by now anyway%
+ }%
+ \edef\svg@tempa{%
+ \noexpand\FamilyOptions{SVG}{inkscapeexe=\svg@tempa}%
+ \ifx\svg@tempb\@empty\else%
+ \noexpand\FamilyOptions{SVG}{inkscapeopt=\svg@tempb}%
+ \fi%
+ }%
+ \svg@tempa%
+ \fi%
+ \fi%
+}
+\DeclareOption{on}{\FamilyOptions{SVG}{inkscape=true}}
+\DeclareOption{off}{\FamilyOptions{SVG}{inkscape=false}}
+\newcommand*\svg@ink@format{pdf}
+\ifxetex\else\ifpdf\else
+ \renewcommand*\svg@ink@format{eps}
+\fi\fi
+\DefineFamilyKey{SVG}{inkscapeformat}{%
+ \lowercase{\def\svg@tempa{#1}}%
+ \FamilySetNumerical{SVG}{inkscapeformat}{svg@tempa}{%
+ {pdf}{0},{eps}{1},{ps}{2},{png}{3}%
+ }{\svg@tempa}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% latex
+ \renewcommand*\svg@ink@format{pdf}%
+ \or% eps
+ \renewcommand*\svg@ink@format{eps}%
+ \or% ps
+ \renewcommand*\svg@ink@format{ps}%
+ \or% png
+ \renewcommand*\svg@ink@format{png}%
+ \fi%
+ \fi%
+}
+\newif\if@svg@ink@latex
+\FamilyBoolKey{SVG}{inkscapelatex}{@svg@ink@latex}
+\newcommand*\svg@ink@area{}
+\DefineFamilyKey{SVG}{inkscapearea}{%
+ \FamilySetNumerical{SVG}{inkscapearea}{svg@tempa}{%
+ {drawing}{0},{crop}{0},%
+ {page}{1},{nocrop}{1}%
+ }{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% drawing
+ \renewcommand*\svg@ink@area{-D}%
+ \else% page
+ \renewcommand*\svg@ink@area{-C}%
+ \fi%
+ \fi%
+}
+\newcommand*\svg@ink@dpi{}
+\let\svg@ink@dpi\relax
+\DefineFamilyKey{SVG}{inkscapedpi}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \let\svg@ink@dpi\relax%
+ \FamilyKeyStateProcessed%
+ }{%
+ \def\svg@tempa##1dpi##2\@nil{\def\svg@tempa{##1}}%
+ \lowercase{\svg@tempa#1dpi\@nil}%
+ \ifnumber{\svg@tempa}{%
+ \edef\svg@ink@dpi{\svg@tempa}%
+ \FamilyKeyStateProcessed%
+ }{}%
+ }%
+}
+\DefineFamilyKey{SVG}{inkscapedensity}{\FamilyOptions{SVG}{inkscapedpi=#1}}
+\newcommand*\svg@ink@exe{inkscape}
+\DefineFamilyKey{SVG}{inkscapeexe}{%
+ \renewcommand*\svg@ink@exe{#1}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svg@ink@opt{}
+\DefineFamilyKey{SVG}{inkscapeopt}{%
+ \renewcommand*\svg@ink@opt{#1}%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{svgpath}{%
+ \PackageWarning{svg}{%
+ The key `svgpath' is deprecated. It's recommended\MessageBreak%
+ to use `\string\svgpath' instead%
+ }%
+ \ifx\svgpath\@undefined%
+ \AtEndOfPackage{\svgpath{{#1}}}%
+ \else%
+ \svgpath{{#1}}%
+ \fi%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svg@out@path{}
+\newcommand*\svg@out@name{\svg@file@name\svg@file@suffix}
+\newcommand*\svg@out@base{\svg@out@path\svg@out@name.\svg@ink@format}
+\DefineFamilyKey{SVG}{inkscapepath}{%
+ \FamilySetNumerical{SVG}{inkscapepath}{svg@tempa}{%
+ {svgpath}{0},{svgdir}{0},%
+ {svgsubpath}{1},{svgsubdir}{1},%
+ {basepath}{2},{basedir}{2},{jobpath}{2},{jobdir}{2},%
+ {basesubpath}{3},{basesubdir}{3},{jobsubpath}{3},{jobsubdir}{3}%
+ }{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% svgpath
+ \renewcommand*\svg@out@path{\svg@file@path}%
+ \or% svgsubpath
+ \renewcommand*\svg@out@path{\svg@file@path svg-inkscape/}%
+ \or% basepath
+ \renewcommand*\svg@out@path{./}%
+ \or% basesubpath
+ \renewcommand*\svg@out@path{./svg-inkscape/}%
+ \fi%
+ \else%
+ \renewcommand*\svg@out@path{#1}%
+ \svg@normalize@path{\svg@out@path}%
+ \FamilyKeyStateProcessed%
+ \fi%
+}
+\DefineFamilyKey{SVG}{inkscapename}{%
+ \renewcommand*\svg@out@name{#1\svg@file@suffix}%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svg@param@width{\z@}
+\DefineFamilyKey{SVG}{width}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \renewcommand*\svg@param@width{\z@}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \FamilySetLengthMacro{SVG}{width}{\svg@param@width}{#1}%
+ \ifdim\svg@param@width<\z@\relax%
+ \FamilyKeyStateUnknownValue%
+ \fi%
+ }%
+}
+\newcommand*\svg@param@height{\z@}
+\DefineFamilyKey{SVG}{height}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \renewcommand*\svg@param@height{\z@}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \FamilySetLengthMacro{SVG}{height}{\svg@param@height}{#1}%
+ \ifdim\svg@param@height<\z@\relax%
+ \FamilyKeyStateUnknownValue%
+ \fi%
+ }%
+}
+\newcommand*\svg@param@scale{1}
+\DefineFamilyKey{SVG}{scale}{%
+ \FamilyKeyStateUnknownValue%
+ \svg@ifvalueisrelax{#1}{%
+ \renewcommand*\svg@param@scale{1}%
+ \FamilyKeyStateProcessed%
+ }{%
+ \ifisdimension{#1\p@}{%
+ \ifdim\dimexpr#1\p@\relax>\z@\relax%
+ \renewcommand*\svg@param@scale{#1}%
+ \FamilyKeyStateProcessed%
+ \fi%
+ }{}%
+ }%
+}
+\newcommand*\svg@param@pretex{}
+\let\svg@param@pretex\relax
+\DefineFamilyKey{SVG}{pretex}{%
+ \svg@ifvalueisrelax{#1}{%
+ \let\svg@param@pretex\relax%
+ }{%
+ \def\svg@param@pretex{#1}%
+ }%
+ \FamilyKeyStateProcessed%
+}
+\newcommand*\svg@param@apptex{}
+\let\svg@param@apptex\relax
+\DefineFamilyKey{SVG}{apptex}{%
+ \svg@ifvalueisrelax{#1}{%
+ \let\svg@param@apptex\relax%
+ }{%
+ \def\svg@param@apptex{#1}%
+ }%
+ \FamilyKeyStateProcessed%
+}
+\DefineFamilyKey{SVG}{postex}{%
+ \svg@deprecated@key{postex=#1}{apptex=#1}%
+}
+\newcounter{svg@param@lastpage}
+\DefineFamilyKey{SVG}{lastpage}{%
+ \FamilySetNumerical{SVG}{lastpage}{svg@tempa}{%
+ {false}{0},{off}{0},{no}{0},{ignore}{0},%
+ {true}{1},{on}{1},{yes}{1},{auto}{1}%
+ }{#1}%
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed%
+ \ifcase\svg@tempa\relax% false
+ \FamilySetCounter{SVG}{lastpage}{svg@param@lastpage}{\m@ne}%
+ \or% true
+ \FamilySetCounter{SVG}{lastpage}{svg@param@lastpage}{\z@}%
+ \fi%
+ \fi%
+}
+\newif\if@svg@draft
+\FamilyBoolKey{SVG}{draft}{@svg@draft}
+\AtBeginDocument{\if@svg@draft\else\ifGin@draft\@svg@drafttrue\fi\fi}
+\newcommand*\svg@quotes@remove[1]{%
+ \begingroup%
+ \edef\svg@tempa{#1}%
+ \expandafter\svg@quotes@@remove\svg@tempa""\@nil%
+ \edef\svg@tempb{%
+ \endgroup%
+ \noexpand\def\noexpand#1{\unexpanded\expandafter{\svg@tempa}}%
+ }%
+ \svg@tempb%
+}
+\newcommand*\svg@quotes@@remove{}
+\def\svg@quotes@@remove#1"#2"#3\@nil{%
+ \IfArgIsEmpty{#2}{%
+ \edef\svg@tempa{#1}%
+ }{%
+ \svg@quotes@@remove#1#2#3""\@nil%
+ }%
+}
+\newif\if@svg@quotes@found
+\newcommand*\svg@quotes@check[1]{%
+ \expandafter\svg@quotes@@check#1"\@nil%
+}
+\newcommand*\svg@quotes@@check{}
+\def\svg@quotes@@check#1"#2\@nil{%
+ \IfArgIsEmpty{#2}{\@svg@quotes@foundfalse}{\@svg@quotes@foundtrue}%
+}
+\newcommand*\svg@normalize@path[1]{%
+ \begingroup%
+ \edef\svg@tempa{#1}%
+ \svg@quotes@check{\svg@tempa}%
+ \svg@quotes@remove{\svg@tempa}%
+ \ifx\svg@tempa\@empty\relax%
+ \def\svg@tempa{./}%
+ \fi%
+ \expandafter\svg@normalize@@path\svg@tempa//\@nil%
+ \edef\svg@tempb{%
+ \endgroup%
+ \if@svg@quotes@found%
+ \noexpand\def\noexpand#1{"\unexpanded\expandafter{\svg@tempa}"}%
+ \else%
+ \noexpand\def\noexpand#1{\unexpanded\expandafter{\svg@tempa}}%
+ \fi%
+ }%
+ \svg@tempb%
+}
+\newcommand*\svg@normalize@@path{}
+\def\svg@normalize@@path#1/#2/\@nil{%
+ \IfArgIsEmpty{#2}{%
+ \IfArgIsEmpty{#1}{\def\svg@tempa{}}{\def\svg@tempa{#1/}}%
+ }{%
+ \svg@normalize@@path#2/\@nil%
+ \edef\svg@tempa{#1/\unexpanded\expandafter{\svg@tempa}}%
+ }%
+}
+\newcommand*\svg@ifvalueisrelax[1]{%
+ \begingroup%
+ \def\svg@tempa{#1}%
+ \def\svg@tempb{\relax}%
+ \ifx\svg@tempa\svg@tempb\relax%
+ \aftergroup\@firstoftwo%
+ \else%
+ \aftergroup\@secondoftwo%
+ \fi%
+ \endgroup%
+}
+\DefineFamilyMember[.dummy]{SVG}
+\newcommand*\svg@dummy@key[2][]{%
+ \IfArgIsEmpty{#1}{%
+ \DefineFamilyKey[.dummy]{SVG}{#2}{%
+ \PackageWarning{svg}{%
+ The option key `#2' can only\MessageBreak%
+ be used with package `svg-extract', but\MessageBreak%
+ you didn't load it%
+ }%
+ \FamilyKeyStateProcessed%
+ }%
+ }{%
+ \DefineFamilyKey[.dummy]{SVG}{#2}[{#1}]{%
+ \PackageWarning{svg}{%
+ The option key `#2' can only\MessageBreak%
+ be used with package `svg-extract', but\MessageBreak%
+ you didn't load it%
+ }%
+ \FamilyKeyStateProcessed%
+ }%
+ }%
+ \BeforePackage{svg-extract}{\RelaxFamilyKey[.dummy]{SVG}{#2}}%
+}
+\svg@dummy@key[true]{extract}
+\svg@dummy@key{extractformat}
+\svg@dummy@key[true]{pdf}
+\svg@dummy@key[true]{eps}
+\svg@dummy@key{extractpreamble}
+\svg@dummy@key{preamble}
+\svg@dummy@key{extractpreambleend}
+\svg@dummy@key{end}
+\svg@dummy@key{extractruns}
+\svg@dummy@key{latexexe}
+\svg@dummy@key{pdflatex}
+\svg@dummy@key{latexext}
+\svg@dummy@key{latexopt}
+\svg@dummy@key{dvipsopt}
+\svg@dummy@key{pstoepsopt}
+\svg@dummy@key{pstopdfopt}
+\svg@dummy@key{pdftoepsopt}
+\svg@dummy@key{pdftopsopt}
+\svg@dummy@key{pdftops}
+\svg@dummy@key[true]{convert}
+\svg@dummy@key{convertformat}
+\svg@dummy@key[true]{png}
+\svg@dummy@key{convertdpi}
+\svg@dummy@key{convertdensity}
+\svg@dummy@key{magickexe}
+\svg@dummy@key{magicksetting}
+\svg@dummy@key{magickoperator}
+\svg@dummy@key{gsexe}
+\svg@dummy@key{gsopt}
+\svg@dummy@key{gsdevice}
+\svg@dummy@key{extractpath}
+\svg@dummy@key{path}
+\svg@dummy@key{extractname}
+\svg@dummy@key{name}
+\svg@dummy@key{extractwidth}
+\svg@dummy@key{extractheight}
+\svg@dummy@key{extractscale}
+\svg@dummy@key{extractpretex}
+\svg@dummy@key{extractapptex}
+\svg@dummy@key{extractpostex}
+\svg@dummy@key[true]{clean}
+\svg@dummy@key[true]{clear}
+\svg@dummy@key[true]{exclude}
+\FamilyExecuteOptions{SVG}{%
+ inkscape=true,inkscapepath=basesubdir,inkscapelatex=true,%
+ inkscapearea=drawing,usexcolor=true,usetransparent=true%
+}
+\FamilyProcessOptions{SVG}
+\newif\if@svg@file@found
+\newcommand*\svg@file@path{}
+\newcommand*\svg@file@name{}
+\newcommand*\svg@file@base{}
+\newcommand*\svg@file@suffix{}
+\newcommand*\svg@get@path[3][svg]{%
+ \begingroup%
+ \edef\svg@tempa{#2}%
+ \svg@quotes@check{\svg@tempa}%
+ \svg@quotes@remove{\svg@tempa}%
+ \expandafter\svg@filename@parse\expandafter{\svg@tempa}%
+ \IfArgIsEmpty{#1}{%
+ \edef\svg@tempa{\filename@area\filename@base.\filename@ext}%
+ }{%
+ \edef\svg@tempa{\filename@area\filename@base.#1}%
+ }%
+ \if@svg@quotes@found%
+ \edef\svg@tempa{"\svg@tempa"}%
+ \fi%
+ \@svg@file@foundfalse%
+ \let\input@path\svg@path%
+ \svg@get@@path{\svg@tempa}%
+ \if@svg@file@found\else%
+ \ifx\Ginput@path\@undefined\else%
+ \let\input@path\Ginput@path%
+ \svg@get@@path{\svg@tempa}%
+ \fi%
+ \fi%
+ \IfArgIsEmpty{#3}{}{%
+ \if@svg@file@found\else%
+ \ifx#3\@undefined\else%
+ \edef\svg@tempb{{#3}}%
+ \let\input@path\svg@tempb%
+ \svg@get@@path{\svg@tempa}%
+ \fi%
+ \fi%
+ }%
+ \edef\svg@tempa{%
+ \endgroup%
+ \if@svg@file@found%
+ \noexpand\@svg@file@foundtrue%
+ \noexpand\def\noexpand\svg@file@path{\filename@area}%
+ \noexpand\def\noexpand\svg@file@name{\filename@base}%
+ \noexpand\def\noexpand\svg@file@base{\filename@area\filename@base}%
+ \else%
+ \noexpand\@svg@file@foundfalse%
+ \noexpand\def\noexpand\svg@file@path{}%
+ \noexpand\def\noexpand\svg@file@name{#2}%
+ \noexpand\def\noexpand\svg@file@base{#2}%
+ \fi%
+ }%
+ \svg@tempa%
+}
+\newcommand*\svg@get@@path[1]{%
+ \expandafter\IfFileExists\expandafter{#1}{%
+ \@svg@file@foundtrue%
+ \expandafter\svg@filename@parse\expandafter{\@filef@und}%
+ }{}%
+}
+\newcommand*\svg@filename@parse[1]{%
+ \begingroup%
+ \def\svg@tempa##1{%
+ \def\svg@tempb####1####2\@nil{%
+ \ifstr{####1}{"}{\def\svg@tempb{####2}}{\def\svg@tempb{####1####2}}%
+ }%
+ \expandafter\svg@tempb##1\@nil%
+ \edef##1{\svg@tempb}%
+ }%
+ \filename@parse{#1}%
+ \ifx\filename@ext\relax\else%
+ \edef\filename@base{\filename@base.\filename@ext}%
+ \fi%
+ \svg@quotes@check{\filename@area}%
+ \if@svg@quotes@found%
+ \svg@quotes@remove{\filename@area}%
+ \edef\filename@area{"\filename@area"}%
+ \svg@tempa{\filename@base}%
+ \fi%
+ \svg@quotes@check{\filename@base}%
+ \if@svg@quotes@found%
+ \svg@quotes@remove{\filename@base}%
+ \fi%
+ \let\svg@tempa\filename@area%
+ \expandafter\filename@parse\expandafter{\filename@base}%
+ \let\filename@area\svg@tempa%
+ \if@svg@quotes@found%
+ \edef\filename@base{"\filename@base"}%
+ \fi%
+ \edef\svg@tempa{%
+ \noexpand\endgroup%
+ \noexpand\def\noexpand\filename@area{\filename@area}%
+ \noexpand\def\noexpand\filename@base{\filename@base}%
+ \ifx\filename@ext\relax%
+ \noexpand\let\noexpand\filename@ext\noexpand\relax%
+ \else%
+ \noexpand\def\noexpand\filename@ext{\filename@ext}%
+ \fi%
+ }%
+ \svg@tempa%
+}
+\newcommand*\svg@file@missing[3][]{%
+ \begingroup%
+ \edef\svg@tempa{#2}%
+ \expandafter\svg@filename@parse\expandafter{\svg@tempa}%
+ \svg@quotes@remove{\filename@area}%
+ \svg@quotes@remove{\filename@base}%
+ \ifx\filename@ext\relax\else%
+ \svg@quotes@remove{\filename@ext}%
+ \fi%
+ \IfArgIsEmpty{#1}{%
+ \def\svg@tempa{%
+ Did you run the export with Inkscape? There's no file\MessageBreak%
+ `\filename@area\filename@base.\filename@ext'%
+ }%
+ }{%
+ \edef\filename@ext{#1}%
+ \edef\svg@tempb{#3}%
+ \ifstr{\svg@tempb}{./}{\let\svg@tempb\@empty}{}%
+ \ifstr{\filename@area}{./}{\let\filename@area\@empty}{}%
+ \def\svg@tempa{%
+ There's no file `\filename@base.\filename@ext'\MessageBreak%
+ \ifx\filename@area\@empty%
+ neither in the current directory nor\MessageBreak%
+ any other searched path given by\MessageBreak%
+ \string\svgpath%
+ \ifx\svg@path\@undefined\space\else%
+ \space(\svg@path)\MessageBreak%
+ \fi%
+ or \string\graphicspath%
+ \ifx\Ginput@path\@undefined\else%
+ \space(\Ginput@path)%
+ \fi%
+ \ifx\svg@tempb\@empty\else%
+ \MessageBreak or even `inkscapepath' (`\svg@tempb')%
+ \fi.%
+ \else%
+ in folder `\filename@area'.%
+ \fi%
+ }%
+ }%
+ \PackageError{svg}{%
+ File `\filename@base.\filename@ext' is missing%
+ }{\svg@tempa}%
+ \endgroup%
+}
+\ifx\pdf@filemoddate\@undefined
+ \newcommand*\svg@iffilenewer[2]{\@gobbletwo}
+\else
+ \newcommand*\svg@iffilenewer[2]{%
+ \begingroup%
+ \edef\svg@tempa{\pdf@filemoddate{#1}}%
+ \edef\svg@tempb{\pdf@filemoddate{#2}}%
+ \ifnum\pdf@strcmp{\svg@tempa}{\svg@tempb}>\z@\relax%
+ \aftergroup\@firstoftwo%
+ \else%
+ \aftergroup\@secondoftwo%
+ \fi%
+ \endgroup%
+ }
+\fi
+\newcommand*\svg@local@param@set[1]{%
+ \svg@local@param@use%
+ \FamilyOptions{SVG}{#1}%
+ \ifstr{\svg@ink@format}{png}{\FamilyOptions{SVG}{inkscapelatex=false}}{}%
+}
+\newcommand*\svg@local@param@use{}
+\newcommand*\svg@local@param@def[1]{%
+ \edef\svg@local@param@use{%
+ \unexpanded\expandafter{\svg@local@param@use}\unexpanded{#1}%
+ }%
+}
+\DefineFamilyMember[.param]{SVG}
+\newcommand*\svgsetup{\FamilyOptions{SVG}}
+\newcommand*\setsvg{\FamilyOptions{SVG}}
+\newcommand*\svg@path{}
+\let\svg@path\input@path
+\newcommand*\svgpath[1]{%
+ \def\svg@tempb{}%
+ \@tfor\svg@tempa:=#1\do{%
+ \ifx\svg@tempa\@empty\else%
+ \svg@normalize@path{\svg@tempa}%
+ \edef\svg@tempb{\svg@tempb{\svg@tempa}}%
+ \fi%
+ }%
+ \ifx\svg@tempb\@empty\else%
+ \let\svg@path\svg@tempb%
+ \fi%
+}
+\newcommand*{\includesvg}[2][]{%
+ \begingroup%
+ \svg@deprecated@param%
+ \svg@local@param@set{#1}%
+ \if@svg@ink@latex%
+ \def\svg@file@suffix{_svg-tex}%
+ \else%
+ \def\svg@file@suffix{_svg-raw}%
+ \fi%
+ \@onelevel@sanitize\svg@file@suffix%
+ \svg@get@path{#2}{}%
+ \if@svg@file@found%
+ \svg@ink@run%
+ \IfFileExists{\svg@out@base}{}{%
+ \@svg@file@foundfalse%
+ \svg@file@missing{\svg@out@base}{}%
+ }%
+ \if@svg@ink@latex%
+ \IfFileExists{\svg@out@base_tex}{}{%
+ \@svg@file@foundfalse%
+ \svg@file@missing{\svg@out@base_tex}{}%
+ }%
+ \fi%
+ \if@svg@file@found%
+ \svg@input{\svg@out@base}%
+ \svg@extract{\svg@out@base}%
+ \fi%
+ \else%
+ \svg@file@missing[svg]{\svg@file@base}{}%
+ \fi%
+ \endgroup%
+}
+\svg@local@param@def{%
+ \FamilyCounterKey[.param]{SVG}{lastpage}{svg@param@lastpage}%
+}
+\newcommand*\svg@param@angle{0}
+\svg@local@param@def{%
+ \DefineFamilyKey[.param]{SVG}{angle}{%
+ \renewcommand*\svg@param@angle{#1}%
+ \FamilyKeyStateProcessed%
+ }%
+}
+\newcommand*\svg@param@origin{c}
+\svg@local@param@def{%
+ \DefineFamilyKey[.param]{SVG}{origin}[c]{%
+ \renewcommand*\svg@param@origin{#1}%
+ \FamilyKeyStateProcessed%
+ }%
+}
+\newcommand*{\includeinkscape}[2][]{%
+ \begingroup%
+ \svg@deprecated@param%
+ \filename@parse{#2}%
+ \ifx\filename@ext\relax\else%
+ \svg@quotes@remove{\filename@ext}%
+ \expandafter\lowercase\expandafter{%
+ \expandafter\def\expandafter\filename@ext\expandafter{\filename@ext}%
+ }%
+ \let\svg@tempb\filename@ext%
+ \def\svg@tempa##1_tex##2\@nil{\def\svg@tempb{##1}}%
+ \expandafter\svg@tempa\svg@tempb_tex\@nil%
+ \@for\svg@tempa:={pdf,eps,ps,png}\do{%
+ \ifstr{\svg@tempb}{\svg@tempa}{%
+ \edef\svg@tempa{%
+ \noexpand\FamilyOptions{SVG}{inkscapeformat=\svg@tempb}%
+ }%
+ \svg@tempa%
+ }{}%
+ }%
+ \ifstr{\filename@ext}{\svg@ink@format_tex}{%
+ \FamilyOptions{SVG}{inkscapelatex=true}%
+ }{}%
+ \fi%
+ \svg@local@param@set{#1}%
+ \expandafter\svg@get@path\expandafter[\svg@ink@format]{#2}{\svg@out@path}%
+ \if@svg@file@found%
+ \edef\svg@out@name{\svg@file@name}%
+ \edef\svg@out@base{\svg@file@path\svg@file@name.\svg@ink@format}%
+ \if@svg@ink@latex%
+ \IfFileExists{\svg@out@base_tex}{}{%
+ \@svg@file@foundfalse%
+ \svg@file@missing{\svg@out@base_tex}{}%
+ }%
+ \fi%
+ \if@svg@file@found%
+ \svg@input{\svg@out@base}%
+ \svg@extract{\svg@out@base}%
+ \fi%
+ \else%
+ \svg@file@missing[\svg@ink@format]{\svg@file@base}{\svg@out@path}%
+ \fi%
+ \endgroup%
+}
+\newcommand*\svg@deprecated@param{%
+ \@svg@tempswafalse%
+ \ifx\svgwidth\@undefined\else%
+ \edef\svg@tempa{\noexpand\FamilyOptions{SVG}{width=\svgwidth}}%
+ \svg@tempa%
+ \@svg@tempswatrue%
+ \fi%
+ \ifx\svgscale\@undefined\else%
+ \edef\svg@tempa{\noexpand\FamilyOptions{SVG}{scale=\svgscale}}%
+ \svg@tempa%
+ \@svg@tempswatrue%
+ \fi%
+ \if@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@svg@ink@run
+\newcommand*\svg@ink@run{%
+ \ifnum\svg@ink@mode>\z@\relax%
+ \begingroup%
+ \@svg@ink@runtrue%
+ \ifnum\svg@ink@mode=\tw@\relax\else%
+ \svg@iffilenewer{\svg@file@base.svg}{\svg@out@base}{}{%
+ \@svg@ink@runfalse%
+ }%
+ \if@svg@ink@latex%
+ \IfFileExists{\svg@out@base_tex}{%
+ \ifnum\pdf@shellescape=\@ne\relax\if@svg@ink@run%
+ \svg@iffilenewer{\svg@out@base_tex}{\svg@out@base}{%
+ \@svg@ink@runfalse%
+ \edef\svg@tempa{\svg@out@base}%
+ \svg@quotes@remove{\svg@tempa}%
+ \PackageWarning{svg}{%
+ Since the encountered filedate of file\MessageBreak%
+ `\svg@tempa_tex' is newer than \MessageBreak%
+ `\svg@tempa' it's supposed that\MessageBreak%
+ you customized this file. To avoid an accidental\MessageBreak%
+ overwriting of this file, the Inkscape export\MessageBreak%
+ won't be done. If you want to overwrite the\MessageBreak%
+ existing file please choose the parameter\MessageBreak%
+ `inkscape=force'%
+ }%
+ }{}%
+ \fi\fi%
+ }{\@svg@ink@runtrue}%
+ \fi%
+ \fi%
+ \if@svg@ink@run%
+ \ifnum\pdf@shellescape=\@ne\relax%
+ \ifx\svg@ink@dpi\relax%
+ \ifstr{\svg@ink@format}{png}{%
+ \FamilyOptions{SVG}{inkscapedpi=300}%
+ }{}%
+ \fi%
+ \PackageInfo{svg}{%
+ Calling Inkscape%
+ \ifx\svg@ink@opt\@empty\else%
+ \space with added options `\svg@ink@opt'%
+ \fi%
+ }%
+ \edef\svg@tempa{\svg@file@base}%
+ \edef\svg@tempb{\svg@out@name}%
+ \svg@quotes@remove{\svg@tempa}%
+ \svg@quotes@remove{\svg@tempb}%
+ \ShellEscape{\svg@ink@cmd{\svg@tempa}{\svg@tempb}}%
+ \IfFileExists{\svg@out@name.\svg@ink@format}{%
+ \edef\svg@tempb{\svg@tempb.\svg@ink@format}%
+ \svg@quotes@remove{\svg@out@base}%
+ \svg@shell@mkdir{\svg@out@path}%
+ \svg@shell@move{\svg@tempb}{\svg@out@base}%
+ \if@svg@ink@latex%
+ \svg@shell@move{\svg@tempb_tex}{\svg@out@base_tex}%
+ \fi%
+ }{%
+ \PackageWarning{svg}{%
+ The export with Inkscape failed for file\MessageBreak%
+ `\svg@tempa.svg'\MessageBreak%
+ Troubleshooting: Please check in the log file how\MessageBreak%
+ the invocation of Inkscape took place and try to\MessageBreak%
+ execute it yourself in the terminal%
+ }%
+ }%
+ \else%
+ \edef\svg@tempa{\svg@file@base}%
+ \svg@quotes@remove{\svg@tempa}%
+ \PackageWarning{svg}{%
+ You didn't enable `shell escape' (or `write18')\MessageBreak%
+ so it wasn't possible to launch the Inkscape export\MessageBreak%
+ for `\svg@tempa.svg'%
+ }%
+ \fi%
+ \fi%
+ \endgroup%
+ \fi%
+}
+\newcommand*\svg@ink@cmd[2]{%
+ \svg@ink@exe\space-z\space\svg@ink@area\space%
+ \ifx\svg@ink@dpi\relax\else--export-dpi=\svg@ink@dpi\space\fi%
+ \if@svg@ink@latex--export-latex\space\fi%
+ \svg@ink@opt\space%
+ --file="#1.svg"\space%
+ --export-\svg@ink@format="#2.\svg@ink@format"\space%
+}
+\newcommand*\svg@get@lastpage[1]{%
+ \ifstr{\svg@ink@format}{pdf}{%
+ \begingroup%
+ \svg@tempcnt=\m@ne\relax%
+ \ifx\XeTeXpdfpagecount\@undefined%
+ \ifpdf%
+ \ifx\pdfximage\@undefined%
+ \ifx\saveimageresource\@undefined\else%
+ \saveimageresource{#1}%
+ \svg@tempcnt=\lastsavedimageresourcepages\relax%
+ \fi%
+ \else%
+ \pdfximage{#1}%
+ \svg@tempcnt=\pdflastximagepages\relax%
+ \fi%
+ \fi%
+ \else%
+ \svg@tempcnt=\XeTeXpdfpagecount#1\relax%
+ \fi%
+ \ifnum\svg@tempcnt=\m@ne\relax%
+ \PackageWarning{svg}{%
+ It wasn't possible to detect the last page\MessageBreak%
+ of `#1'%
+ }%
+ \else%
+ \PackageInfo{svg}{Last page of `#1' is \the\svg@tempcnt}%
+ \fi%
+ \edef\svg@tempa{%
+ \noexpand\endgroup%
+ \noexpand\FamilyOptions{SVG}{lastpage=\the\svg@tempcnt}%
+ }%
+ \svg@tempa%
+ }{}%
+}
+\newcommand*\svg@wrn@scale{%
+ \ifdim\dimexpr\svg@param@scale\p@\relax=\p@\relax\else%
+ \@svg@tempswafalse%
+ \ifdim\svg@param@width>\z@\relax%
+ \@svg@tempswatrue%
+ \fi%
+ \ifdim\svg@param@height>\z@\relax%
+ \@svg@tempswatrue%
+ \fi%
+ \if@svg@tempswa%
+ \PackageWarning{svg}{%
+ The parameter `scale' is only considered if neither\MessageBreak%
+ `width' nor `height' are specified%
+ }%
+ \fi%
+ \fi%
+}
+\newcommand*\svg@input{\svg@@input}
+\newcommand*\svg@@input[2][]{%
+ \IfArgIsEmpty{#1}{}{\svg@local@param@set{#1}}%
+ \if@svg@draft%
+ \@svg@ink@latexfalse%
+ \fi%
+ \edef\svg@tempa{#2}%
+ \if@svg@ink@latex%
+ \svg@patches{\svg@tempa}%
+ \ifnum\value{svg@param@lastpage}=\z@\relax%
+ \expandafter\svg@get@lastpage\expandafter{\svg@tempa}%
+ \fi%
+ \edef\svg@tempa{%
+ \ifx\svg@param@pretex\relax\else%
+ \noexpand\svg@param@pretex%
+ \fi%
+ \noexpand\input{\svg@tempa_tex}%
+ \ifx\svg@param@apptex\relax\else%
+ \noexpand\svg@param@apptex%
+ \fi%
+ }%
+ \ifdim\dimexpr\svg@param@angle\p@\relax=\z@\relax%
+ \svg@tempa%
+ \else%
+ \edef\svg@tempb{origin=\svg@param@origin}%
+ \expandafter\rotatebox\expandafter[\svg@tempb]{\svg@param@angle}{%
+ \svg@tempa%
+ }%
+ \fi%
+ \else%
+ \svg@wrn@scale%
+ \edef\svg@tempb{keepaspectratio,scale=\svg@param@scale}%
+ \ifdim\svg@param@height>\z@\relax%
+ \edef\svg@tempb{\svg@tempb,height=\svg@param@height}%
+ \fi%
+ \ifdim\svg@param@width>\z@\relax%
+ \edef\svg@tempb{\svg@tempb,width=\svg@param@width}%
+ \fi%
+ \ifdim\dimexpr\svg@param@angle\p@\relax=\z@\relax\else%
+ \edef\svg@tempb{%
+ \svg@tempb,origin=\svg@param@origin,angle=\svg@param@angle%
+ }%
+ \fi%
+ \if@svg@draft%
+ \edef\svg@tempb{\svg@tempb,draft}%
+ \else%
+ \edef\svg@tempb{\svg@tempb,draft=false}%
+ \fi%
+ \expandafter\includegraphics\expandafter[\svg@tempb]{\svg@tempa}%
+ \fi%
+}
+\newcommand*\svg@patches[1]{%
+ \let\svg@picture@saved\picture%
+ \let\picture\svg@picture@patched%
+ \let\svg@includegraphics@saved\includegraphics%
+ \let\includegraphics\svg@includegraphics@patched%
+ \edef\svg@includegraphics@file{#1}%
+}
+\newcommand*\svg@picture@saved{}
+\newcommand*\svg@picture@patched{}
+\newcommand*\svg@pictur@patched{}
+\long\def\svg@picture@patched#1{\svg@pictur@patched@#1}
+\def\svg@pictur@patched@(#1,#2){%
+ \svg@wrn@scale%
+ \ifdim\svg@param@height>\z@\relax%
+ \Gscale@div\svg@tempa{#1\p@}{#2\p@}%
+ \setlength\unitlength{\svg@param@height}%
+ \setlength\unitlength{\svg@tempa\unitlength}%
+ \ifdim\svg@param@width>\z@\relax%
+ \ifdim\unitlength>\svg@param@width\relax%
+ \setlength\unitlength{\svg@param@width}%
+ \fi%
+ \fi%
+ \else%
+ \ifdim\svg@param@width>\z@\relax%
+ \setlength\unitlength{\svg@param@width}%
+ \else%
+ \setlength\unitlength{\svg@param@scale\unitlength}%
+ \fi%
+ \fi%
+ \svg@picture@saved(#1,#2)%
+}
+\DefineFamily{SVGpatch}
+\DefineFamilyMember{SVGpatch}
+\newcounter{svg@param@currpage}
+\setcounter{svg@param@currpage}{\m@ne}
+\FamilyCounterKey{SVGpatch}{page}{svg@param@currpage}
+\DefineFamilyKey{SVGpatch}{width}{\FamilyKeyStateProcessed}
+\newcommand*\svg@includegraphics@file{}
+\newcommand*\svg@includegraphics@saved{}
+\newcommand*\svg@includegraphics@patched[2][]{%
+ \FamilyOptions{SVGpatch}{#1}%
+ \ifnum\value{svg@param@lastpage}<\z@\relax%
+ \FamilySetCounter{SVGpatch}{page}{svg@param@currpage}{%
+ \the\value{svg@param@lastpage}%
+ }%
+ \fi%
+ \ifnum\value{svg@param@currpage}>\value{svg@param@lastpage}\relax\else%
+ \svg@includegraphics@saved[{#1}]{\svg@includegraphics@file}%
+ \fi%
+}
+\newcommand*\svghidepreamblestart{%
+ \PackageWarning{svg}{%
+ The macro `\string\svghidepreamblestart' is only meant\MessageBreak%
+ to be used together with package `svg-extract'.\MessageBreak%
+ Nevertheless, nothing will happen%
+ }%
+}
+\newcommand*\svghidepreambleend{%
+ \PackageWarning{svg}{%
+ The macro `\string\svghidepreambleend' is only meant\MessageBreak%
+ to be used together with package `svg-extract'.\MessageBreak%
+ Nevertheless, nothing will happen%
+ }%
+}
+\newcommand*\svg@extract[1]{}
+\ifnum\pdf@shellescape=\@ne\relax\else%
+ \expandafter\endinput%
+\fi
+\RequirePackage{ifplatform}[2010/10/22]
+\ifwindows
+ \newcommand*\svg@shell@@mkdir[1]{if not exist "#1" mkdir "#1"}
+ \newcommand*\svg@shell@@mv{move}
+ \newcommand*\svg@shell@@rm{del}
+\else
+ \newcommand*\svg@shell@@mkdir[1]{mkdir -p "#1"}
+ \newcommand*\svg@shell@@mv{mv}
+ \newcommand*\svg@shell@@rm{rm}
+\fi
+\newcommand*\svg@shell@mkdir[1]{%
+ \begingroup%
+ \edef\svg@tempa{#1}%
+ \svg@quotes@remove{\svg@tempa}%
+ \@svg@tempswatrue%
+ \ifstr{\svg@tempa}{}{\@svg@tempswafalse}{%
+ \ifstr{\svg@tempa}{./}{\@svg@tempswafalse}{%
+ }}%
+ \if@svg@tempswa%
+ \ShellEscape{\svg@shell@@mkdir{\svg@tempa}}%
+ \fi%
+ \endgroup%
+}
+\newcommand*\svg@shell@move[2]{%
+ \ShellEscape{\svg@shell@@mv\space"#1"\space"#2"}%
+}
+\newcommand*\svg@shell@rm[1]{%
+ \ShellEscape{\svg@shell@@rm\space"#1"}%
+}
\endinput
%%
%% End of file `svg.sty'.