diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-11 23:21:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-11 23:21:02 +0000 |
commit | 43501b14c11da09f8e269e70521b541c3a606848 (patch) | |
tree | ec54994aaed1f59f1fae45aa3d5254ce8b2518fa /Master/texmf-dist | |
parent | addae3c15506f8e396751640ac25d85e19a601b4 (diff) |
tikzscale (11mar13)
git-svn-id: svn://tug.org/texlive/trunk@29342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/alt.tikz | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/invisible.tikz | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/only.tikz | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/onslide.tikz | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/pause.tikz | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/temporal.tikz | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf | bin | 149560 -> 158365 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/tikzscale-beamer.tex | 56 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf | bin | 360971 -> 365247 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/uncover.tikz | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/visible.tikz | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx | 115 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty | 50 |
14 files changed, 246 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/tikzscale/alt.tikz b/Master/texmf-dist/doc/latex/tikzscale/alt.tikz new file mode 100644 index 00000000000..73974caef72 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/alt.tikz @@ -0,0 +1,5 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \alt<2> {\draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0);} + {\draw (0,0) -- ++(5,5) ++(-5, 0) -- ++(5,-5);} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/invisible.tikz b/Master/texmf-dist/doc/latex/tikzscale/invisible.tikz new file mode 100644 index 00000000000..0b35bd217f7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/invisible.tikz @@ -0,0 +1,4 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \invisible<1>{\draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0);} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/only.tikz b/Master/texmf-dist/doc/latex/tikzscale/only.tikz new file mode 100644 index 00000000000..df09c1c86c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/only.tikz @@ -0,0 +1,4 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \only<2>{\draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0);} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/onslide.tikz b/Master/texmf-dist/doc/latex/tikzscale/onslide.tikz new file mode 100644 index 00000000000..0471aac8b61 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/onslide.tikz @@ -0,0 +1,4 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \onslide<2>{\draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0);} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/pause.tikz b/Master/texmf-dist/doc/latex/tikzscale/pause.tikz new file mode 100644 index 00000000000..6b3d4dd8e09 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/pause.tikz @@ -0,0 +1,5 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \pause + \draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0); +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/temporal.tikz b/Master/texmf-dist/doc/latex/tikzscale/temporal.tikz new file mode 100644 index 00000000000..299bb62dcc0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/temporal.tikz @@ -0,0 +1,5 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \node at (2.5,2.5) {\temporal<2>{before}{now}{after}}; + \onslide<3> {}; % just a small trick to create 3 subframes +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf Binary files differindex 1bf5791656c..ead9f9337e3 100644 --- a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf +++ b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf diff --git a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex index df683a957f8..ee136a80261 100644 --- a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex +++ b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex @@ -86,5 +86,7 @@ \fi \item Use includegraphics with a histogram of a normal distribution\\% \includegraphics[width=\linewidth,height=0.5\linewidth]{histogramNormal}% + \item {Use \texttt{\textbackslash graphicspath} with superfluous space\graphicspath{{somefolder} } + \includegraphics{testRectangle.tikz}}% \end{itemize} \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/tikzscale-beamer.tex b/Master/texmf-dist/doc/latex/tikzscale/tikzscale-beamer.tex new file mode 100644 index 00000000000..d764dcc6dcd --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/tikzscale-beamer.tex @@ -0,0 +1,56 @@ +\documentclass{beamer} + +\usepackage{tikz} +\usepackage{tikzscale} + +\begin{document} + + \begin{frame} + \frametitle{\textbackslash only} + \framesubtitle{\alt<2>{shown}{hidden}} + \includegraphics[width=0.4\linewidth]{only.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash visible} + \framesubtitle{\alt<2>{shown}{hidden}} + \includegraphics[width=0.4\linewidth]{visible.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash invisible} + \framesubtitle{\alt<2>{shown}{hidden}} + \includegraphics[width=0.4\linewidth]{invisible.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash alt} + \framesubtitle{variant \alt<2>{2}{1}} + \includegraphics[width=0.4\linewidth]{alt.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash onslide} + \framesubtitle{\alt<2>{shown}{hidden}} + \includegraphics[width=0.4\linewidth]{onslide.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash uncover} + \framesubtitle{\alt<2>{shown}{hidden}} + \includegraphics[width=0.4\linewidth]{uncover.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash temporal} + \framesubtitle{\temporal<2>{before}{now}{after}} + \includegraphics[width=0.4\linewidth]{temporal.tikz} + \end{frame} + + \begin{frame} + \frametitle{\textbackslash pause} + \framesubtitle{\alt<2->{shown}{hidden}} + \includegraphics[width=0.4\linewidth]{pause.tikz} + \end{frame} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf b/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf Binary files differindex fa04ce34c80..652094aa901 100644 --- a/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf +++ b/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf diff --git a/Master/texmf-dist/doc/latex/tikzscale/uncover.tikz b/Master/texmf-dist/doc/latex/tikzscale/uncover.tikz new file mode 100644 index 00000000000..0a0e4464bef --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/uncover.tikz @@ -0,0 +1,4 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \uncover<2>{\draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0);} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/visible.tikz b/Master/texmf-dist/doc/latex/tikzscale/visible.tikz new file mode 100644 index 00000000000..a0845d00706 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/visible.tikz @@ -0,0 +1,4 @@ +\begin{tikzpicture} + \draw (0,0) rectangle (5,5); + \visible<2>{\draw (0,0) -- ++(5,5) -- ++(-2.5, 2.5) -- ++(-2.5, -2.5) -- (5,0);} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx b/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx index b42266ccbaa..0793f6c2e77 100644 --- a/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx +++ b/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx @@ -94,7 +94,7 @@ and the derived files tikzscale.ins, %</internal> %<*package> \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} @@ -190,6 +190,7 @@ and the derived files tikzscale.ins, %\changes{v0.2.1}{2013/01/09}{Fix graphics with data from text file due to wrong line breaks; fix plain old \LaTeX support} %\changes{v0.2.2}{2013/01/13}{Fully support plain (dvi) \LaTeX; mind graphicspath} %\changes{v0.2.3}{2013/01/23}{Fix graphicspath bug; fix endlinechar bug, improve compatibility with beamer} +%\changes{v0.2.4}{2013/03/10}{Fix another graphicspath bug; support Beamer's \cmd{\pause} command} % \section{Introduction} % When dealing with graphics, there are different scaling demands. For \emph{absolute} scaling, a width and/or height is given. Opposed to that, for relativ scaling, a horizontal and/or vertical scaling factor is needed. This package only is about absolute scaling of tikzpicture environments. The different absolute scaling demands and their solutions are shown in table \ref{scalingDemands}. % \begin{table} @@ -371,6 +372,9 @@ and the derived files tikzscale.ins, % \subsection{Externalization library} % TikZ' externalization library is supported. Its use is highly recommended, as tikzscale renders some graphics multiple times to get the correct size. The savings by using the externalization library can thus be huge. % +% \subsection{Fitting library} +% Due to a \href{http://sourceforge.net/tracker/index.php?func=detail&aid=2991312&group_id=142562&atid=752792}{known bug in the fitting library}, nodes with a \texttt{fit} option also need a \texttt{transform shape} option in order to be scalable. If they are not scalable, they normally do not contain the nodes as specified when tikzscale is used. +% % \section{Further Ideas} % \begin{itemize} % \item It might be a good idea to use the file names as figure names, but probably only if the name was not already set by the user. Additionally, there must be taken care to not try to write into a directory where there is no write access (e.g. reading a graphic from a system wide TeX installation) @@ -418,11 +422,21 @@ and the derived files tikzscale.ins, % \item Andreas Tharang % \begin{itemize} % \item Reported that the beamer class is incompatible with tikzscale, which lead to a change in tikzscale to fix this incompatibility. +% \item Reported that the fitting library is incompatible with tikzscale due to a bug in the fitting library, which lead to a note in the documentation. +% \item Created tests to improve the compatibility between beamer and tikzscale, which lead to support of Beamer's \cmd{\pause} command. % \end{itemize} % \item Klaus Pribil % \begin{itemize} % \item Reported an incompatibility with the pdfpages package, which lead to a fix in tikzscale. % \end{itemize} +% \item Christoph Schmidpeter +% \begin{itemize} +% \item Reported a problem when accidently adding a superfluous space into the graphics path, which lead to a detection and fix of that case in tikzscale. +% \end{itemize} +% \item Jose Hissa Ferreira +% \begin{itemize} +% \item Reported a bug when using a graphics path with multiple path entries, which lead to a fix. +% \end{itemize} % \end{itemize} % % @@ -482,7 +496,7 @@ and the derived files tikzscale.ins, %\end{macro} % %\begin{macro}{\eforcsvlist} -% These is a general command, which might be useful for inclusion into the etoolbox package. It works similar to \cmd{\forcsvlist} but expands its argument similar to \cmd{\def} vs.\ \cmd{\edef}, which is useful if the list is stored in a macro/variable. +% This is a general command, which might be useful for inclusion into the etoolbox package. It works similar to \cmd{\forcsvlist} but expands its argument similar to \cmd{\def} vs.\ \cmd{\edef}, which is useful if the list is stored in a macro/variable. % \begin{macrocode} \def\eforcsvlist#1#2{% \edef\tikzscale@eforcsvlist{#2}% @@ -491,6 +505,51 @@ and the derived files tikzscale.ins, % \end{macrocode} %\end{macro} % +%\begin{macro}{\forgrouplist} +% This is a general command, which might be useful for inclusion into the etoolbox package. It works similar to \cmd{\forcsvlist} but uses TeX groups to separate elements instead of a comma separated list. +% \begin{macrocode} +\def\forgrouplist#1#2{% +% \end{macrocode} + % Use \cmd{\grouplistbreak} instead of \cmd{\forcsvlist}'s \cmd{\listbreak}, because the function given in the first argument can contain a call to \forcsvlist. In this case \cmd{\listbreak} is executed, although no break has been called, which lead to an error in the program, if \cmd{\listbreak} were used. +% \begin{macrocode} + \def\grouplistbreak{\def\breakFor{}}% + \tikzscale@forGroupListElement{#1}#2\tikzscale@endList% +% \end{macrocode} + % Delete \cmd{\breakFor} in case it has been set. +% \begin{macrocode} + \undef\breakFor +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\tikzscale@forGroupListElement} +% \begin{macrocode} +\NewDocumentCommand{\tikzscale@forGroupListElement}{mgu{\tikzscale@endList}}{% +% \end{macrocode} + % Only do list processing if \cmd{\listbreak} has not been called. +% \begin{macrocode} + \ifundef{\breakFor}{% + \IfValueTF{#2}{% + #1{#2}% + \tikzscale@forGroupListElement{#1}#3\tikzscale@endList% + }{% + #1{#3}% + }% + }{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\eforgrouplist} +% This is a general command, which might be useful for inclusion into the etoolbox package. It works similar to \cmd{\forgrouplist} but expands its argument similar to \cmd{\def} vs.\ \cmd{\edef}, which is useful if the list is stored in a macro/variable. +% \begin{macrocode} +\def\eforgrouplist#1#2{% + \edef\tikzscale@grouplist{#2}% + \expandafter\forgrouplist\expandafter{\expandafter#1\expandafter}\expandafter{\tikzscale@grouplist}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\tikzscale@trim} % These is a general command to trim leading and trailing spaces, which might be useful for inclusion into another package taken from the following \href{http://www.matijs.net/blog/2006/07/20/how-to-trim-spaces-in-tex}{homepage}. % \begin{macrocode} @@ -500,6 +559,20 @@ and the derived files tikzscale.ins, % \end{macrocode} %\end{macro} % +% \begin{macro}{\tikzscale@trimMacro} + % A possible present leading or trailing space in the macro's content is removed from the macro. +% \begin{macrocode} +\def\tikzscale@trimMacro#1{% + \expandafter\IfBeginWith\expandafter{#1}{ }{% + \expandafter\StrGobbleLeft\expandafter{#1}{1}[#1]% + }{}% + \expandafter\IfEndWith\expandafter{#1}{ }{% + \expandafter\StrGobbleRight\expandafter{#1}{1}[#1]% + }{}% +} +% \end{macrocode} +%\end{macro} +% % \begin{macro}{\elseif} % This macro provides a conditional which supports an if with an arbitrary amount of elseif (none is also ok) and an optional else. With a simplified syntax (remove the tests and the grouping) this would be worth a separate package. % \begin{macrocode} @@ -801,6 +874,9 @@ and the derived files tikzscale.ins, % Use \cmd{\csedef} instead of \cmd{\csdef} here, to be completely sure to only have a string left. This avoids problems when using tikzscale together with the pdfpages package and should generally be the right thing. % \begin{macrocode} \csedef{#1}{##1#2####1}% +% \end{macrocode} + % Break the inner (\cmd{\forcsvlist}) loop over file extensions. +% \begin{macrocode} \listbreak }{}% }% @@ -808,12 +884,18 @@ and the derived files tikzscale.ins, % Test all possible file extensions and do not forget that the extension might already be given. \cmd{\Gin@extensions} returns the \href{http://tex.stackexchange.com/a/45502}{current content} set by \cmd{\DeclareGraphicsExtensions}. % \begin{macrocode} \eforcsvlist{\tikzscale@checkExtension}{{},\Gin@extensions}% + \ifcsdef{#1}{% +% \end{macrocode} + % Break the outer (\cmd{\forgrouplist}) loop over directories. +% \begin{macrocode} + \grouplistbreak + }{}% }% % \end{macrocode} % Set the graphics path, to also find graphics in the last (current) input directory or in completely separate paths. Set it here to get updates if the user uses the \cmd{graphicspath} command inside of the document body. % \begin{macrocode} \tikzscale@setGraphicsPath - \eforcsvlist{\tikzscale@checkDirectory}{\tikzscale@graphicspath}% + \eforgrouplist{\tikzscale@checkDirectory}{\tikzscale@graphicspath}% % \end{macrocode} % If no file has been found, return the given file name, as includegraphics should try its best. % \begin{macrocode} @@ -825,18 +907,24 @@ and the derived files tikzscale.ins, %\end{macro} % % \begin{macro}{\tikzscale@setGraphicsPath} - % The \cmd{graphicspath} command is used to set additional directories, which are searched for graphics. \cmd{\Ginput@path} is used to get the \href{http://tex.stackexchange.com/a/58404}{current content}. + % The \cmd{\graphicspath} command is used to set additional directories, which are searched for graphics. \cmd{\Ginput@path} is used to get the \href{http://tex.stackexchange.com/a/58404}{current content}. % \begin{macrocode} \NewDocumentCommand{\tikzscale@setGraphicsPath}{}{% +% \end{macrocode} + % Remove possible leading or trailing spaces in the graphics path, as they lead to ugly string output before printing the graphic. Inserting such a space in the graphics path is a user's error, but it can happen easily as not all users are aware of TeX's newline issues. Fix the original path variable and not only tikzscale's variable, as this seems to be a general problem. +% \begin{macrocode} + \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{{}}% }% @@ -1351,6 +1439,13 @@ and the derived files tikzscale.ins, \ifExternalizationLoaded{% \tikzscale@addRestoreEndLineCharToTikzpicture }{}% +% \end{macrocode} + % The pause command defined by the Beamer class creates additional slides when called multiple times due to tikzscale's scaling. Thus, deactivate it during the scaling tests, if it is defined. +% \begin{macrocode} + \ifdef{\pause}{% + \LetLtxMacro{\tikzscale@oldpause}{\pause}% + \RenewDocumentCommand{\pause}{o}{}% + }{}% } % \end{macrocode} %\end{macro} @@ -1375,6 +1470,12 @@ and the derived files tikzscale.ins, \ifExternalizationLoaded{% \tikzscale@addRestoreEndLineCharToTikzpicture }{}% +% \end{macrocode} + % Reactivate Beamer's pause command if defined. +% \begin{macrocode} + \ifdef{\pause}{% + \LetLtxMacro{\pause}{\tikzscale@oldpause}% + }{}% } % \end{macrocode} %\end{macro} 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> |