summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-06 21:53:10 +0000
committerKarl Berry <karl@freefriends.org>2017-06-06 21:53:10 +0000
commitd036e1b1dc4d59e9ce15b37af93ae0b55a50520c (patch)
treefed1cb3844410d28a9137ef55dc762443ccfb433
parentf9a711de58ce886e55f254d2a876714624dcdfb4 (diff)
svg (24may17)
git-svn-id: svn://tug.org/texlive/trunk@44503 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/svg/README.md5
-rw-r--r--Master/texmf-dist/doc/latex/svg/svg-preamble.tex2
-rw-r--r--Master/texmf-dist/doc/latex/svg/svg.pdfbin965694 -> 967462 bytes
-rw-r--r--Master/texmf-dist/source/latex/svg/svg.dtx88
-rw-r--r--Master/texmf-dist/tex/latex/svg/svg-extract.sty11
-rw-r--r--Master/texmf-dist/tex/latex/svg/svg.sty38
6 files changed, 91 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/latex/svg/README.md b/Master/texmf-dist/doc/latex/svg/README.md
index aeccb27c6d4..af334225cd8 100644
--- a/Master/texmf-dist/doc/latex/svg/README.md
+++ b/Master/texmf-dist/doc/latex/svg/README.md
@@ -5,7 +5,7 @@
Copyright (C) Philip Ilten <philten@cern.ch>, 2012-2016
Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2017-
- svg 2017/03/28 v2.00a
+ svg 2017/05/23 v2.00b
----------------------------------------------------------------------------
@@ -34,6 +34,9 @@ it is rendered within the LaTeX document using either ***ImageMagick*** or
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
diff --git a/Master/texmf-dist/doc/latex/svg/svg-preamble.tex b/Master/texmf-dist/doc/latex/svg/svg-preamble.tex
index ca93825142d..45885a1340c 100644
--- a/Master/texmf-dist/doc/latex/svg/svg-preamble.tex
+++ b/Master/texmf-dist/doc/latex/svg/svg-preamble.tex
@@ -2,8 +2,8 @@
\usepackage{ifxetex}
\usepackage{ifluatex}
\ifxetex\else\ifluatex\else
-\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage[T1]{fontenc}
+\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\fi\fi
\usepackage{svg}
\usepackage{relsize}
diff --git a/Master/texmf-dist/doc/latex/svg/svg.pdf b/Master/texmf-dist/doc/latex/svg/svg.pdf
index 837f04bba19..d60ae8fcbe0 100644
--- a/Master/texmf-dist/doc/latex/svg/svg.pdf
+++ b/Master/texmf-dist/doc/latex/svg/svg.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/svg/svg.dtx b/Master/texmf-dist/source/latex/svg/svg.dtx
index 419614228b2..7577c0e84a0 100644
--- a/Master/texmf-dist/source/latex/svg/svg.dtx
+++ b/Master/texmf-dist/source/latex/svg/svg.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{3456}
+% \CheckSum{3465}
% \iffalse meta-comment
%
% svg and svg-extract -- Include and extract SVG pictures in LaTeX documents
@@ -115,15 +115,15 @@ svg-extract -- Extract independent graphic files from SVG pictures
%<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)%
]
%</driver|package&option>
%<*driver>
\documentclass[english,xindy]{tudscrdoc}[2017/03/27]
-\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage[T1]{fontenc}
+\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage{babel}
\KOMAoptions{parskip=half-}
\usepackage{marginnote}
@@ -308,7 +308,7 @@ svg-extract -- Extract independent graphic files from SVG pictures
% \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 @@ svg-extract -- Extract independent graphic files from SVG pictures
%
% \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 @@ svg-extract -- Extract independent graphic files from SVG pictures
% } take the following lines of code:
% \begin{svgexample}
% \documentclass{article}
-% \usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
% \usepackage[T1]{fontenc}
+% \usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
% \usepackage{svg}
% \usepackage[off]{svg-extract}
% \svgsetup{clean=true}
@@ -1353,7 +1353,7 @@ svg-extract -- Extract independent graphic files from SVG pictures
% \begin{macro}{\svg@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,14 +1501,22 @@ svg-extract -- Extract independent graphic files from SVG pictures
% \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@ink@latex}
% This options controls whether the \app{Inkscape} export will be invoked with
% or without the generation of a seperate \LaTeX~file.
% \begin{macrocode}
\newif\if@svg@ink@latex
\FamilyBoolKey{SVG}{inkscapelatex}{@svg@ink@latex}
+\FamilyBoolKey{SVG}{latex}{@svg@ink@latex}
+\FamilyBoolKey{SVG}{tex}{@svg@ink@latex}
% \end{macrocode}
% \end{macro}^^A \svg@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 @@ svg-extract -- Extract independent graphic files from SVG pictures
% \end{macro}^^A \svg@file@missing
% \begin{macro}{\svg@iffilenewer}
% The macro \cs{svg@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@filemoddate} is definied. Unfortunately this functionality
% isn't provided by Xe\TeX.
% \begin{macrocode}
@@ -2344,7 +2352,7 @@ svg-extract -- Extract independent graphic files from SVG pictures
\svg@get@path{#2}{}%
\if@svg@file@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@ink@run%
@@ -2591,7 +2599,7 @@ svg-extract -- Extract independent graphic files from SVG pictures
% \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@ink@runtrue%
\ifnum\svg@ink@mode=\tw@\relax\else%
@@ -2852,7 +2860,7 @@ svg-extract -- Extract independent graphic files from SVG pictures
%
% \begin{macro}{\svg@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@patches}.
% \begin{macrocode}
\newcommand*\svg@patches[1]{%
@@ -2982,30 +2990,32 @@ svg-extract -- Extract independent graphic files from SVG pictures
%<*base>
\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%
+ \@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 @@ svg-extract -- Extract independent graphic files from SVG pictures
% \begin{option}{end}
% \changes{v2.00}{2017/02/24}{deprecated}^^A
% \begin{macro}{\svgx@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 @@ svg-extract -- Extract independent graphic files from SVG pictures
}{}%
\fi%
\immediate\write\svgx@stream@out{%
- \string\AtBeginDocument{\@percentchar^^J%
+ \string\svgxdelayed{\@percentchar^^J%
\space\space\svg@tempa\@percentchar^^J%
}^^J^^J%
\string\begin{document}^^J%
@@ -4302,7 +4312,7 @@ svg-extract -- Extract independent graphic files from SVG pictures
}{%
% \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 @@ svg-extract -- Extract independent graphic files from SVG pictures
\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@tempa##1##2##3{%
\edef\svg@tempb{%
@@ -4871,6 +4881,20 @@ svg-extract -- Extract independent graphic files from SVG pictures
% 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@ifundefinedorrelax{AtEndPreamble}{%
+ \AtBeginDocument{#1}%
+ }{%
+ \AtEndPreamble{\AtBeginDocument{#1}}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}^^A \svgxdelayed
% \begin{macro}{\svgxsetbox}
% \begin{macro}{\svgx@box}
% Within the preamble of the auxiliary \LaTeX~file, the desired grahic is used
diff --git a/Master/texmf-dist/tex/latex/svg/svg-extract.sty b/Master/texmf-dist/tex/latex/svg/svg-extract.sty
index 5f9a6812971..fb2a247af56 100644
--- a/Master/texmf-dist/tex/latex/svg/svg-extract.sty
+++ b/Master/texmf-dist/tex/latex/svg/svg-extract.sty
@@ -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@ifundefinedorrelax{AtEndPreamble}{%
+ \AtBeginDocument{#1}%
+ }{%
+ \AtEndPreamble{\AtBeginDocument{#1}}%
+ }%
+}
\newbox\svgx@box
\newcommand*\svgxsetbox[2][]{%
\csname @tud@x@standalone@croptrue\endcsname%
@@ -872,7 +879,7 @@
}{}%
\fi%
\immediate\write\svgx@stream@out{%
- \string\AtBeginDocument{\@percentchar^^J%
+ \string\svgxdelayed{\@percentchar^^J%
\space\space\svg@tempa\@percentchar^^J%
}^^J^^J%
\string\begin{document}^^J%
diff --git a/Master/texmf-dist/tex/latex/svg/svg.sty b/Master/texmf-dist/tex/latex/svg/svg.sty
index b56cd97d76f..9fa4dadd0c4 100644
--- a/Master/texmf-dist/tex/latex/svg/svg.sty
+++ b/Master/texmf-dist/tex/latex/svg/svg.sty
@@ -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@svg@ink@latex
\FamilyBoolKey{SVG}{inkscapelatex}{@svg@ink@latex}
+\FamilyBoolKey{SVG}{latex}{@svg@ink@latex}
+\FamilyBoolKey{SVG}{tex}{@svg@ink@latex}
\newcommand*\svg@ink@area{}
\DefineFamilyKey{SVG}{inkscapearea}{%
\FamilySetNumerical{SVG}{inkscapearea}{svg@tempa}{%
@@ -409,26 +411,28 @@
}
\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%
+ \@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@dummy@key[true]{extract}
\svg@dummy@key{extractformat}