From cc14f05300604ee3a793fc3d489bfe31048a342d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 4 Nov 2012 22:58:15 +0000 Subject: tikzscale (4nov12) git-svn-id: svn://tug.org/texlive/trunk@28170 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/tikzscale/test-tikzscale.pdf | Bin 127846 -> 127846 bytes .../texmf-dist/doc/latex/tikzscale/tikzscale.pdf | Bin 349577 -> 350047 bytes .../source/latex/tikzscale/tikzscale.dtx | 26 +++++++++++++++++---- .../texmf-dist/tex/latex/tikzscale/tikzscale.sty | 8 +++++-- Master/tlpkg/bin/tlpkginfo | 2 +- 5 files changed, 28 insertions(+), 8 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf index 9aceb627943..16cd3643485 100644 Binary files a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf and b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf differ diff --git a/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf b/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf index b90069c09b7..adfa36e300f 100644 Binary files a/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf and b/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf differ diff --git a/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx b/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx index d5f7a29bb9e..86edfbf42d4 100644 --- a/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx +++ b/Master/texmf-dist/source/latex/tikzscale/tikzscale.dtx @@ -95,7 +95,7 @@ and the derived files tikzscale.ins, % %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tikzscale}[2012/11/02 v0.1.2 tikzscale LaTeX package] +\ProvidesPackage{tikzscale}[2012/11/03 v0.1.3 tikzscale LaTeX package] \RequirePackage{graphicx} \RequirePackage{etoolbox} \RequirePackage{pgfkeys} @@ -186,6 +186,7 @@ and the derived files tikzscale.ins, %\changes{v0.1}{2012/10/31}{First public release} %\changes{v0.1.1}{2012/11/02}{Fix some bugs, increase robustness, regenerate externalized files less often} %\changes{v0.1.2}{2012/11/02}{Fix whitespace issues} +%\changes{v0.1.3}{2012/11/02}{Fix error when loading TikZ but not PGFPlots; Fix error when scaling complicated TikZ graphics} % \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} @@ -386,6 +387,11 @@ and the derived files tikzscale.ins, % \begin{itemize} % \item Created the \cmd{\xcmd} macro for this package, which is used in the documentation. % \end{itemize} +% \item Prof. Kai Arzheimer +% \begin{itemize} +% \item Reported a bug when not using TikZ without PGFPlots, which lead to a fix. +% \item Reported a bug that a non-existent macro is used, which lead to a fix. +% \end{itemize} % \end{itemize} % % @@ -767,10 +773,20 @@ and the derived files tikzscale.ins, \tikzscale@includeAxisRatio{#2}% }{test {\ifundef{\requestedAxisRatio}}}{% % \end{macrocode} - % If only either width or height is given it can be a normal tikzpicture or a plot with axisratio=1. Let's guess that it is a plot with default axisratio. If the guess is wrong, the called function detects that scaling the plot does not work and automatically calls \cmd{\tikzscale@includeNormalTikzpicture}. + % Use this test as a check if PGFPlots has been loaded. % \begin{macrocode} - \def\requestedAxisRatio{1}% - \tikzscale@includeAxisRatio{#2}% + \ifdef{\pgfplotsset}{% +% \end{macrocode} + % If only either width or height is given it can be a normal tikzpicture or a plot with axisratio=1. Let's guess that it is a plot with default axisratio. If the guess is wrong, the called function detects that scaling the plot does not work and automatically calls \cmd{\tikzscale@includeNormalTikzpicture}. +% \begin{macrocode} + \def\requestedAxisRatio{1}% + \tikzscale@includeAxisRatio{#2}% + }{% +% \end{macrocode} + % If PGFPlots has not been loaded, it can only be a TikZPicture. +% \begin{macrocode} + \tikzscale@includeNormalTikzpicture{#2}% + }% }{% % Everything else results in an error. \tikzscale@invalidKeyError{#2}% @@ -899,7 +915,7 @@ and the derived files tikzscale.ins, % \end{macrocode} % First divide before multiply to avoid overflowing (at 16384). % \begin{macrocode} - \pgfmathparsemacro{\errorRatio}{\measuredIntermediate/\requestedSize}% + \pgfmathsetmacro{\errorRatio}{\measuredIntermediate/\requestedSize}% \pgfmathsetglobalmacro{\tikzscale@scale}{\tikzscale@scale/\errorRatio}% }{% \breakforeach% diff --git a/Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty b/Master/texmf-dist/tex/latex/tikzscale/tikzscale.sty index db61273c40e..9213aff24eb 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}[2012/11/02 v0.1.2 tikzscale LaTeX package] +\ProvidesPackage{tikzscale}[2012/11/03 v0.1.3 tikzscale LaTeX package] \RequirePackage{graphicx} \RequirePackage{etoolbox} \RequirePackage{pgfkeys} @@ -206,9 +206,13 @@ axisratio/.value required }{test {\ifdef{\requestedAxisRatio}}}{% \tikzscale@includeAxisRatio{#2}% }{test {\ifundef{\requestedAxisRatio}}}{% +\ifdef{\pgfplotsset}{% \def\requestedAxisRatio{1}% \tikzscale@includeAxisRatio{#2}% }{% +\tikzscale@includeNormalTikzpicture{#2}% +}% +}{% \tikzscale@invalidKeyError{#2}% }% } @@ -265,7 +269,7 @@ axisratio/.value required \foreach \l in {1,...,\maxTestIterations}{% \tikzscale@measureSize{\measuredIntermediate}{#1}{#2}% \tikzscale@ifSizeDifference{\measuredIntermediate-\requestedSize}{% -\pgfmathparsemacro{\errorRatio}{\measuredIntermediate/\requestedSize}% +\pgfmathsetmacro{\errorRatio}{\measuredIntermediate/\requestedSize}% \pgfmathsetglobalmacro{\tikzscale@scale}{\tikzscale@scale/\errorRatio}% }{% \breakforeach% diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index fa9198d2468..8efc1d78f56 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -17,7 +17,7 @@ sub main { # erroneous or problematic tds files (when new, tell RobinF and author) $erroneous_tds = join ("|", - qw(countriesofeurope engpron gost hacm he-she imtekda sourcesanspro spanish + qw(countriesofeurope engpron gost hacm he-she imtekda spanish sttools titleps), ); -- cgit v1.2.3