texlive[44503] Master/texmf-dist: svg (24may17)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 6 23:53:11 CEST 2017


Revision: 44503
          http://tug.org/svn/texlive?view=revision&revision=44503
Author:   karl
Date:     2017-06-06 23:53:10 +0200 (Tue, 06 Jun 2017)
Log Message:
-----------
svg (24may17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/svg/README.md
    trunk/Master/texmf-dist/doc/latex/svg/svg-preamble.tex
    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	2017-06-06 21:52:09 UTC (rev 44502)
+++ trunk/Master/texmf-dist/doc/latex/svg/README.md	2017-06-06 21:53:10 UTC (rev 44503)
@@ -5,7 +5,7 @@
  Copyright (C) Philip Ilten <philten at cern.ch>, 2012-2016  
  Copyright (C) Falk Hanisch <hanisch.latex at outlook.com>, 2017-
 
- svg 2017/03/28 v2.00a
+ svg 2017/05/23 v2.00b
 
 ----------------------------------------------------------------------------
 
@@ -34,6 +34,9 @@
 Versions
 --------
 
+**v2.00b** (2017/05/23)
++ improved warnings, if package **svg** is loaded by package **svg-extract**
+
 **v2.00a** (2017/03/28)
 + Bug fix for checking stock- and mediasizes
 

Modified: trunk/Master/texmf-dist/doc/latex/svg/svg-preamble.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/svg/svg-preamble.tex	2017-06-06 21:52:09 UTC (rev 44502)
+++ trunk/Master/texmf-dist/doc/latex/svg/svg-preamble.tex	2017-06-06 21:53:10 UTC (rev 44503)
@@ -2,8 +2,8 @@
 \usepackage{ifxetex}
 \usepackage{ifluatex}
 \ifxetex\else\ifluatex\else
+\usepackage[T1]{fontenc}
 \usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
-\usepackage[T1]{fontenc}
 \fi\fi
 \usepackage{svg}
 \usepackage{relsize}

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	2017-06-06 21:52:09 UTC (rev 44502)
+++ trunk/Master/texmf-dist/source/latex/svg/svg.dtx	2017-06-06 21:53:10 UTC (rev 44503)
@@ -1,4 +1,4 @@
-% \CheckSum{3456}
+% \CheckSum{3465}
 % \iffalse meta-comment
 %
 %  svg and svg-extract -- Include and extract SVG pictures in LaTeX documents
@@ -115,7 +115,7 @@
 %<package&option&base>\ProvidesPackage{svg}[%
 %<package&option&extract>\ProvidesPackage{svg-extract}[%
 %<*driver|package&option>
-  2017/03/28 v2.00a\space%
+  2017/05/23 v2.00b\space%
 %<package&option&base>  (include SVG pictures)%
 %<package&option&extract>  (extract independent graphics from SVG pictures)%
 ]
@@ -122,8 +122,8 @@
 %</driver|package&option>
 %<*driver>
 \documentclass[english,xindy]{tudscrdoc}[2017/03/27]
+\usepackage[T1]{fontenc}
 \usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
-\usepackage[T1]{fontenc}
 \usepackage{babel}
 \KOMAoptions{parskip=half-}
 \usepackage{marginnote}
@@ -308,7 +308,7 @@
 % \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 necessarry steps for
+% 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
@@ -809,7 +809,7 @@
 %
 % \DescribeOption{extractruns}
 % When extracting independent grahic~files by compiling the generated auxiliary 
-% \LaTeX~file, it's maybe necessarry to do multiple \LaTeX~runs on this file. 
+% \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.
 %
@@ -993,8 +993,8 @@
 % } take the following lines of code:
 % \begin{svgexample}
 %   \documentclass{article}
+%   \usepackage[T1]{fontenc}
 %   \usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
-%   \usepackage[T1]{fontenc}
 %   \usepackage{svg}
 %   \usepackage[off]{svg-extract}
 %   \svgsetup{clean=true}
@@ -1353,7 +1353,7 @@
 % \begin{macro}{\svg at ink@mode}
 % The intension of option \opt{inkscape} is to control the running behaviour of 
 % \app{Inkscape}. It can be switched off at all (\opt{inkscape}|=|\val{false}) 
-% or invoked only if necessarry (\opt{inkscape}|=|\val{true}) or the command
+% or invoked only if necessary (\opt{inkscape}|=|\val{true}) or the command
 % line call can be forced with every \LaTeX~run (\opt{inkscape}|=|\val{forced}).
 % Additionally, option \opt{inkscape} can be used as wrapper for options
 % \opt{inkscapeformat}, \opt{inkscapelatex}, \opt{inkscapearea} and
@@ -1501,6 +1501,10 @@
 % \end{option}^^A inkscapeformat
 % \begin{option}{inkscapelatex}
 % \changes{v2.00}{2017/02/17}{new}^^A
+% \begin{option}{latex}
+% \changes{v2.00b}{2017/02/28}{new, alternative key for \opt{inkscapelatex}}^^A
+% \begin{option}{tex}
+% \changes{v2.00b}{2017/03/28}{new, alternative key for \opt{inkscapelatex}}^^A
 % \begin{macro}{\svg at ink@latex}
 % This options controls whether the \app{Inkscape} export will be invoked with 
 % or without the generation of a seperate \LaTeX~file.
@@ -1507,8 +1511,12 @@
 %    \begin{macrocode}
 \newif\if at svg@ink at latex
 \FamilyBoolKey{SVG}{inkscapelatex}{@svg at ink@latex}
+\FamilyBoolKey{SVG}{latex}{@svg at ink@latex}
+\FamilyBoolKey{SVG}{tex}{@svg at ink@latex}
 %    \end{macrocode}
 % \end{macro}^^A \svg at ink@latex
+% \end{option}^^A tex
+% \end{option}^^A latex
 % \end{option}^^A inkscapelatex
 % \begin{option}{inkscapearea}
 % \changes{v2.00}{2017/02/17}{new}^^A
@@ -2141,7 +2149,7 @@
 % \end{macro}^^A \svg at file@missing
 % \begin{macro}{\svg at iffilenewer}
 % The macro \cs{svg at iffilenewer} is used to decide, whether the export with 
-% \app{Inkscape} is necessarry due to an updated SVG~file. This can only be
+% \app{Inkscape} is necessary due to an updated SVG~file. This can only be
 % done, if \cs{pdf at filemoddate} is definied. Unfortunately this functionality
 % isn't provided by Xe\TeX.
 %    \begin{macrocode}
@@ -2344,7 +2352,7 @@
     \svg at get@path{#2}{}%
     \if at svg@file at found%
 %    \end{macrocode}
-% Running the export with \app{Inkscape} (if necessarry) and checking the 
+% Running the export with \app{Inkscape} (if necessary) and checking the 
 % required files for graphic inclusion.
 %    \begin{macrocode}
       \svg at ink@run%
@@ -2591,7 +2599,7 @@
 %    \end{macrocode}
 % If the mode for \opt{inkscape} was set to \val{forced}, \app{Inkscape} will 
 % be called in any case. Otherwise, some checks are performed to detect, if a
-% run of \app{Inkscape} is actually necessarry.
+% run of \app{Inkscape} is actually necessary.
 %    \begin{macrocode}
       \@svg at ink@runtrue%
       \ifnum\svg at ink@mode=\tw@\relax\else%
@@ -2852,7 +2860,7 @@
 %
 % \begin{macro}{\svg at patches}
 % For including the export results from \app{Inkscape} with \LaTeX~support 
-% enabled, there are some patches necessarry for environment \env{picture} and 
+% enabled, there are some patches necessary for environment \env{picture} and 
 % \cs{includegraphics}. Those patches are done with \cs{svg at patches}.
 %    \begin{macrocode}
 \newcommand*\svg at patches[1]{%
@@ -2982,30 +2990,32 @@
 %<*base>
 \DefineFamilyMember[.dummy]{SVG}
 \newcommand*\svg at 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%
+  \@ifpackageloaded{svg-extract}{}{%
+    \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%
       }%
-      \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%
+    }{%
+      \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%
       }%
-      \FamilyKeyStateProcessed%
     }%
-  }%
 %    \end{macrocode}
 % Before package \pkg{svg-extract} the given key |#2| of family member |.dummy| 
 % is relaxed.
 %    \begin{macrocode}
-  \BeforePackage{svg-extract}{\RelaxFamilyKey[.dummy]{SVG}{#2}}%
+    \AfterPackage{svg-extract}{\RelaxFamilyKey[.dummy]{SVG}{#2}}%
+  }%
 }
 %</base>
 %    \end{macrocode}
@@ -3133,7 +3143,7 @@
 % \begin{option}{end}
 % \changes{v2.00}{2017/02/24}{deprecated}^^A
 % \begin{macro}{\svgx at endpreamble}
-% For the extraction process, a preamble is necessarry for a separate auxiliary 
+% For the extraction process, a preamble is necessary for a separate auxiliary 
 % \LaTeX~file. By default, the preamble of the main document is used, which end
 % is detected at \cs{begin}|{document}|.
 %    \begin{macrocode}
@@ -4280,7 +4290,7 @@
         }{}%
       \fi%
       \immediate\write\svgx at stream@out{%
-        \string\AtBeginDocument{\@percentchar^^J%
+        \string\svgxdelayed{\@percentchar^^J%
           \space\space\svg at tempa\@percentchar^^J%
         }^^J^^J%
         \string\begin{document}^^J%
@@ -4302,7 +4312,7 @@
     }{%
 %    \end{macrocode}
 % As the extraction maybe needs to include the main~auxiliary~file with 
-% \cs{externaldocument} provided by package \pkg{xr} it is necessarry to do all 
+% \cs{externaldocument} provided by package \pkg{xr} it is necessary to do all 
 % related stuff after the main~auxiliary~file was written. This is done with
 % \cs{AfterReadingMainAux} provided by package \pkg{scrlfile}.
 %    \begin{macrocode}
@@ -4342,7 +4352,7 @@
       \repeat%
 %    \end{macrocode}
 % All files requested with option \opt{extractformat} are created with internal 
-% conversion tools supplied by most \LaTeXe~distributions if necessarry.
+% conversion tools supplied by most \LaTeXe~distributions if necessary.
 %    \begin{macrocode}
       \def\svg at tempa##1##2##3{%
         \edef\svg at tempb{%
@@ -4871,6 +4881,20 @@
 % needed. Within this file, the following commands are used to include the 
 % desired graphic.
 %
+% \begin{macro}{\svgxdelayed}
+% \changes{v2.00b}{2017/05/23}{new}^^A
+% This macro executes its argument at the very end of \cs{AtBeginDocument} if 
+% package \pkg{etoolbox} was loaded.
+%    \begin{macrocode}
+\newcommand*\svgxdelayed[1]{
+  \scr at ifundefinedorrelax{AtEndPreamble}{%
+    \AtBeginDocument{#1}%
+  }{%
+    \AtEndPreamble{\AtBeginDocument{#1}}%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}^^A \svgxdelayed
 % \begin{macro}{\svgxsetbox}
 % \begin{macro}{\svgx at box}
 % Within the preamble of the auxiliary \LaTeX~file, the desired grahic is used 

Modified: trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty	2017-06-06 21:52:09 UTC (rev 44502)
+++ trunk/Master/texmf-dist/tex/latex/svg/svg-extract.sty	2017-06-06 21:53:10 UTC (rev 44503)
@@ -33,7 +33,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{svg-extract}[%
-  2017/03/28 v2.00a\space%
+  2017/05/23 v2.00b\space%
   (extract independent graphics from SVG pictures)%
 ]
 \RequirePackage{svg}[2017/03/27]
@@ -611,6 +611,13 @@
     \fi%
   }%
 }
+\newcommand*\svgxdelayed[1]{
+  \scr at ifundefinedorrelax{AtEndPreamble}{%
+    \AtBeginDocument{#1}%
+  }{%
+    \AtEndPreamble{\AtBeginDocument{#1}}%
+  }%
+}
 \newbox\svgx at box
 \newcommand*\svgxsetbox[2][]{%
   \csname @tud at x@standalone at croptrue\endcsname%
@@ -872,7 +879,7 @@
         }{}%
       \fi%
       \immediate\write\svgx at stream@out{%
-        \string\AtBeginDocument{\@percentchar^^J%
+        \string\svgxdelayed{\@percentchar^^J%
           \space\space\svg at tempa\@percentchar^^J%
         }^^J^^J%
         \string\begin{document}^^J%

Modified: trunk/Master/texmf-dist/tex/latex/svg/svg.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/svg/svg.sty	2017-06-06 21:52:09 UTC (rev 44502)
+++ trunk/Master/texmf-dist/tex/latex/svg/svg.sty	2017-06-06 21:53:10 UTC (rev 44503)
@@ -33,7 +33,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{svg}[%
-  2017/03/28 v2.00a\space%
+  2017/05/23 v2.00b\space%
   (include SVG pictures)%
 ]
 \RequirePackage{scrbase}[2016/06/14]
@@ -178,6 +178,8 @@
 }
 \newif\if at svg@ink at latex
 \FamilyBoolKey{SVG}{inkscapelatex}{@svg at ink@latex}
+\FamilyBoolKey{SVG}{latex}{@svg at ink@latex}
+\FamilyBoolKey{SVG}{tex}{@svg at ink@latex}
 \newcommand*\svg at ink@area{}
 \DefineFamilyKey{SVG}{inkscapearea}{%
   \FamilySetNumerical{SVG}{inkscapearea}{svg at tempa}{%
@@ -409,26 +411,28 @@
 }
 \DefineFamilyMember[.dummy]{SVG}
 \newcommand*\svg at 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%
+  \@ifpackageloaded{svg-extract}{}{%
+    \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%
       }%
-      \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%
+    }{%
+      \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%
       }%
-      \FamilyKeyStateProcessed%
     }%
+    \AfterPackage{svg-extract}{\RelaxFamilyKey[.dummy]{SVG}{#2}}%
   }%
-  \BeforePackage{svg-extract}{\RelaxFamilyKey[.dummy]{SVG}{#2}}%
 }
 \svg at dummy@key[true]{extract}
 \svg at dummy@key{extractformat}



More information about the tex-live-commits mailing list