summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-11 23:21:02 +0000
committerKarl Berry <karl@freefriends.org>2013-03-11 23:21:02 +0000
commit43501b14c11da09f8e269e70521b541c3a606848 (patch)
treeec54994aaed1f59f1fae45aa3d5254ce8b2518fa /Master/texmf-dist/tex
parentaddae3c15506f8e396751640ac25d85e19a601b4 (diff)
tikzscale (11mar13)
git-svn-id: svn://tug.org/texlive/trunk@29342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty50
1 files changed, 45 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty b/Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty
index f3b881ec1f6..e68d9595bbe 100644
--- a/Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty
+++ b/Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty
@@ -13,7 +13,7 @@
%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tikzscale}[2013/01/23 v0.2.3 tikzscale LaTeX package]
+\ProvidesPackage{tikzscale}[2013/03/10 v0.2.4 tikzscale LaTeX package]
\RequirePackage{graphicx}
\RequirePackage{etoolbox}
\RequirePackage{pgfkeys}
@@ -43,9 +43,36 @@
\edef\tikzscale@eforcsvlist{#2}%
\expandafter\forcsvlist\expandafter{\expandafter#1\expandafter}\expandafter{\tikzscale@eforcsvlist}%
}
+\def\forgrouplist#1#2{%
+\def\grouplistbreak{\def\breakFor{}}%
+\tikzscale@forGroupListElement{#1}#2\tikzscale@endList%
+\undef\breakFor
+}
+\NewDocumentCommand{\tikzscale@forGroupListElement}{mgu{\tikzscale@endList}}{%
+\ifundef{\breakFor}{%
+\IfValueTF{#2}{%
+#1{#2}%
+\tikzscale@forGroupListElement{#1}#3\tikzscale@endList%
+}{%
+#1{#3}%
+}%
+}{}%
+}
+\def\eforgrouplist#1#2{%
+\edef\tikzscale@grouplist{#2}%
+\expandafter\forgrouplist\expandafter{\expandafter#1\expandafter}\expandafter{\tikzscale@grouplist}%
+}
\def\tikzscale@trim#1{%
\ignorespaces#1\unskip
}%
+\def\tikzscale@trimMacro#1{%
+\expandafter\IfBeginWith\expandafter{#1}{ }{%
+\expandafter\StrGobbleLeft\expandafter{#1}{1}[#1]%
+}{}%
+\expandafter\IfEndWith\expandafter{#1}{ }{%
+\expandafter\StrGobbleRight\expandafter{#1}{1}[#1]%
+}{}%
+}
\NewDocumentCommand{\elseif}{mm}{%
\ifboolexpr{#1}{%
#2%
@@ -188,23 +215,29 @@
}{}%
}%
\eforcsvlist{\tikzscale@checkExtension}{{},\Gin@extensions}%
+\ifcsdef{#1}{%
+\grouplistbreak
+}{}%
}%
\tikzscale@setGraphicsPath
-\eforcsvlist{\tikzscale@checkDirectory}{\tikzscale@graphicspath}%
+\eforgrouplist{\tikzscale@checkDirectory}{\tikzscale@graphicspath}%
\ifcsundef{#1}{%
\csdef{#1}{#2}%
}{}%
}
\NewDocumentCommand{\tikzscale@setGraphicsPath}{}{%
+\ifdef{\Ginput@path}{%
+\tikzscale@trimMacro{\Ginput@path}%
+}{}%
\ifdef{\currfiledir}{%
\ifdef{\Ginput@path}{%
-\def\tikzscale@graphicspath{\currfiledir,\Ginput@path,{}}%
+\def\tikzscale@graphicspath{{\currfiledir}\Ginput@path{}}%
}{%
-\def\tikzscale@graphicspath{\currfiledir,{}}%
+\def\tikzscale@graphicspath{{\currfiledir}{}}%
}%
}{%
\ifdef{\Ginput@path}{%
-\def\tikzscale@graphicspath{\Ginput@path,{}}%
+\def\tikzscale@graphicspath{\Ginput@path{}}%
}{%
\def\tikzscale@graphicspath{{}}%
}%
@@ -455,12 +488,19 @@ axisratio/.value required
\ifExternalizationLoaded{%
\tikzscale@addRestoreEndLineCharToTikzpicture
}{}%
+\ifdef{\pause}{%
+\LetLtxMacro{\tikzscale@oldpause}{\pause}%
+\RenewDocumentCommand{\pause}{o}{}%
+}{}%
}
\NewDocumentCommand{\tikzscale@conditionalEnableExternalization}{m}{%
\tikzexternalenable
\ifExternalizationLoaded{%
\tikzscale@addRestoreEndLineCharToTikzpicture
}{}%
+\ifdef{\pause}{%
+\LetLtxMacro{\pause}{\tikzscale@oldpause}%
+}{}%
}
%%
%% Copyright (C) 2012 by Patrick Häcker <pat_h@web.de>