diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/svg/svg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/svg/svg.dtx | 87 |
1 files changed, 28 insertions, 59 deletions
diff --git a/Master/texmf-dist/source/latex/svg/svg.dtx b/Master/texmf-dist/source/latex/svg/svg.dtx index 1af6928b98f..aa30fbab719 100644 --- a/Master/texmf-dist/source/latex/svg/svg.dtx +++ b/Master/texmf-dist/source/latex/svg/svg.dtx @@ -111,7 +111,7 @@ svg-extract -- Extract independent graphic files from SVG pictures %</dtx> %<package&identify&main> {svg}{include SVG pictures}% %<package&identify&extract> {svg-extract}{extract graphics from SVG pictures}% - [2020/10/23 v2.02j]% + [2020/11/26 v2.02k]% \@tempb %</dtx|package&identify> % \fi @@ -282,6 +282,7 @@ svg-extract -- Extract independent graphic files from SVG pictures % kernel (2020/10/01)}^^A % \changes{v2.02j}{2020/10/23}{bug fix for automatic version detection of % \app{Inkscape} with MiK\TeX}^^A +% \changes{v2.02k}{2020/11/26}{MiK\TeX was updated, bug fix removed}^^A % % % @@ -364,7 +365,7 @@ svg-extract -- Extract independent graphic files from SVG pictures % \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 +% exported graphic~file afterwards. The usage and the syntax is quite similar % to the command \cs{includegraphics} from the \pkg{graphicx} package. In fact, % the inclusion of the exported graphic~file is done with \cs{includegraphics}. % @@ -726,7 +727,7 @@ svg-extract -- Extract independent graphic files from SVG pictures % % 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 \LaTeX~distributions. In additon, the command~line~interfaces of +% of the \LaTeX~distributions. In addition, 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 @@ -1653,7 +1654,7 @@ svg-extract -- Extract independent graphic files from SVG pictures \svg@sanitize@dq\svg@tempa{#2}% \expandafter\filename@parse\expandafter{\svg@tempa}% % If there are quotes in the file path, the closing one will be found as first -% character in \cs{filename@base} as \cs{filename@area} is splitted at the last +% character in \cs{filename@base} as \cs{filename@area} is split at the last % slash. This leading quote is removed from \cs{filename@base} with % \cs{svg@remove@leadingchar}. % \begin{macrocode} @@ -3462,8 +3463,9 @@ svg-extract -- Extract independent graphic files from SVG pictures % \end{macrocode} % If the switch \cs{if@svg@ink@ver@detect} was set by \cs{svg@ink@ver@detect} % during the evaluation of \cs{svg@ink@settings}, which holds the settings of -% the last run. The call of \app{Inkscape} stored in \cs{svg@ink@exe} is done -% with \cs{@@input\textbar"'\dots'" -V} in order to read from \val{stdout}. +% the last run, this macro is invoked. The call of \app{Inkscape} stored in +% \cs{svg@ink@exe} is done with \cs{@@input\textbar"'\dots' -V" } in order to +% read from \val{stdout}. % \begin{macrocode} \newcommand*\svg@@ink@ver@detect{% \begingroup% @@ -3472,66 +3474,33 @@ svg-extract -- Extract independent graphic files from SVG pictures \everyeof{\noexpand}% \svg@quotes@remove{\svg@ink@exe}% % \end{macrocode} -% Here |stderr| is redirected to |stdout| in order to fetch all information -% from \app{Inkscape} (some are passed via |stderr| [sic]) as well as pass any -% found error message to the user. +% Keep in mind, that \app{Inkscape} uses |stderr| [sic] to report the used +% version of Pango, but as MiK\TeX{} has been fixed by now, \pkg{svg} does not +% have to consider anymore. % \begin{macrocode} \edef\svg@tempa{% - \edef\noexpand\svg@tempa{\noexpand\@@input|"'\svg@ink@exe' -V 2>&1" }% + \edef\noexpand\svg@tempa{\noexpand\@@input|"'\svg@ink@exe' -V " }% }% \svg@tempa% \trim@spaces@in\svg@tempa% % \end{macrocode} -% \ToDo{remove workaround when fixed}[MiKTeX] -% The invocation of commands through a pipe is buggy for MiK\TeX{} especially -% for Xe\LaTeX{} (\url{https://github.com/MiKTeX/miktex/issues/648}). Either -% |stdout| or |stderr| if former not present gets swallowed and |stderr| or -% \cs{par} is returned\dots +% The found version is stored in \cs{svg@tempa} and parsed afterwards. % \begin{macrocode} - \def\svg@tempb{\par}% - \ifx\svg@tempa\svg@tempb - \let\svg@tempa\relax% - \fi% -% \end{macrocode} -% The found version is stored in \cs{svg@tempa} and parsed afterwards. Any -% other output than the expected format is considered as error message, which -% is picked up with |##1|. -% \begin{macrocode} - \def\svg@tempb ##1Inkscape ##2.##3\@nil{% + \long\def\svg@tempb ##1Inkscape ##2.##3\@nil{% \gdef\svg@ink@ver{##2}% - \IfArgIsEmpty{##1}{}{% -% \end{macrocode} -% \ToDo{replace workaround with simple warning}[MiKTeX] -% With \app{Inkscape}\,1.0 the additional version information for \app{Pango} -% is passed via |stderr| but |stdout| is gobbled, so this can be used to -% indetify the version. -% \begin{macrocode} -%^^A \PackageWarning{svg}{% -%^^A `\svg@ink@exe\space-V' failed with:\MessageBreak% -%^^A \detokenize{##1}% -%^^A }% - \def\svg@tempc ####1Pango version:####2\@nil{% - \@svg@tempswafalse% - \IfArgIsEmpty{####2}{}{\IfArgIsEmpty{####1}{\@svg@tempswatrue}{}}% - }% - \svg@tempc ##1 Pango version:\@nil% - \if@svg@tempswa% - \gdef\svg@ink@ver{1}% - \else% % \end{macrocode} -% No messages can be passed for MiKTeX/XeLaTeX. +% If no version was detected, a warning is written. % \begin{macrocode} - \ifx\svg@tempa\relax% - \def\svg@tempa{MiKTeX/XeLaTeX did not return an error message}% - \else% - \def\svg@tempa{##1}% - \fi% - \PackageWarning{svg}{% - `\svg@ink@exe\space-V' failed with:\MessageBreak% - \detokenize\expandafter{\svg@tempa}% - }% - \fi% - }% + \ifnum\svg@ink@ver=\m@ne\relax% + \PackageWarning{svg}{% + No version of Inkscape was detected by invoking\MessageBreak% + `\svg@ink@exe\space-V'\MessageBreak% + so the Inkscape export will fail quite sure as the\MessageBreak% + command is probably unknown to your OS. You could set\MessageBreak% + `inkscapeversion=<version>' manually but this is very\MessageBreak% + unlikely to work% + }% + \fi% }% \expandafter\svg@tempb\svg@tempa Inkscape \m@ne.\@nil% \endgroup% @@ -5131,7 +5100,7 @@ svg-extract -- Extract independent graphic files from SVG pictures % \begin{parameter}{gsdevice} % \begin{parameter}{clean} % \begin{parameter}{exclude} -% The parameters \prm{angle} and \prm{origin} are definied as pendants to the +% The parameters \prm{angle} and \prm{origin} are defined as pendants to the % keys provided by \cs{includegraphics}. % \begin{macrocode} %<*extract> @@ -5562,7 +5531,7 @@ svg-extract -- Extract independent graphic files from SVG pictures }% \fi% % \end{macrocode} -% As we are now at the end of the preamble and just before the beginning of the +% As this is now the end of the preamble and just before the beginning of the % document, the paper dimension are set again to make sure, that these settings % are active at the end of the preamble. Additionally, it is executed again at % the very end of \cs{AtBeginDocument} to ensure, that no other package used @@ -5967,7 +5936,7 @@ svg-extract -- Extract independent graphic files from SVG pictures % if package \pkg{etoolbox} was loaded. % % The switch \cs{if@svgx@standalone} is defined for enabling classes to -% implement a different behavoiur for \pkg{svg-extract} in standalone mode. +% implement a different behaviour for \pkg{svg-extract} in standalone mode. % for example, \TUDScript-classes are using this switch. % \begin{macrocode} \newif\if@svgx@standalone |