texlive[64877] Master/texmf-dist: tikz-ext (31oct22)
commits+karl at tug.org
commits+karl at tug.org
Mon Oct 31 20:42:12 CET 2022
Revision: 64877
http://tug.org/svn/texlive?view=revision&revision=64877
Author: karl
Date: 2022-10-31 20:42:12 +0100 (Mon, 31 Oct 2022)
Log Message:
-----------
tikz-ext (31oct22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.pdf
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex
trunk/Master/texmf-dist/tex/latex/tikz-ext/pgfcalendar-ext.tex
trunk/Master/texmf-dist/tex/latex/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex
trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.paths.ortho.code.tex
trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.positioning-plus.code.tex
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-scalepicture.tex
trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.scalepicture.code.tex
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md 2022-10-31 19:42:12 UTC (rev 64877)
@@ -31,7 +31,6 @@
* `ext.shapes.heatmark`
* `ext.shapes.rectangleroundedcorners`
* `ext.shapes.superellipse`
- * `ext.shapes.uncenteredrectangle`
These were developed in response to questions on tex.stackexchange.com.
Some of these can be find by searching for my [user id](https://tex.stackexchange.com/search?q=user%3A16595+%22my+library%22).
\ No newline at end of file
Added: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-scalepicture.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-scalepicture.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-scalepicture.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -0,0 +1,113 @@
+% !TeX spellcheck = en_US
+% !TeX root = tikz-ext-manual.tex
+% Copyright 2022 by Qrrbrbirlbel
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+\clearpage
+\section{Scaling Pictures to a Specific Size}
+\label{library:scalepicture}
+
+\begin{tikzlibrary}{ext.scalepicture}
+ This library scales \tikzname\ pictures to a specific width or height
+ by scaling the whole picture.
+\end{tikzlibrary}
+
+\begin{multicols}{2}
+If one of the keys below are used on a \tikzname\ picture, i.\,e.
+as an option to |\tikzpicture| or \texttt{\textbackslash begin\{tikzpicture\}}
+the size of the picture\footnote{This is the size of the pseudo-node \texttt{current bounding box}.}
+will be measured and written to the \filetype{aux} file
+so that it will be available at the next compilation run
+and an appropriate scaling for the picture can be installed.
+
+\begin{command}{\tikzextpicturewidth}
+ Returns the last measured width of the picture.
+
+ This will expand to |0pt| if the picture hasn't been measured before.
+\end{command}
+\begin{command}{\tikzextpictureheight}
+ Returns the last measured height of the picture.
+
+ This will expand to |0pt| if the picture hasn't been measured before.
+\end{command}
+
+\begin{stylekey}{/tikz/save picture size}
+ This key is usually used by the keys provided by this library.
+ Normally, this is not needed to be explicitly given.
+\end{stylekey}
+\subsection{Keeping the aspect ratio}
+The following \emph{unstarred} keys do not change the aspect ratio of the picture.
+
+\begin{key}{/tikz/picture width=\meta{dimension}}
+ Scales the picture so that the width of the picture will be \meta{dimension}.
+ This will keep the aspect ratio the same.
+\end{key}
+
+\begin{key}{/tikz/minimum picture width=\meta{dimension}}
+ As above but will not change the size of the picture
+ if its width is greater than \meta{dimension}.
+\end{key}
+
+\begin{key}{/tikz/maximum picture width=\meta{dimension}}
+ As above but will not change the size of the picture
+ if its width is less than \meta{dimension}.
+\end{key}
+
+\begin{key}{/tikz/picture height=\meta{dimension}}
+ Scales the picture so that the height of the picture will be \meta{dimension}.
+ This will keep the aspect ratio the same.
+\end{key}
+
+\begin{key}{/tikz/minimum picture height=\meta{dimension}}
+ As above but will not change the size of the picture
+ if its height is greater than \meta{dimension}.
+\end{key}
+
+\begin{key}{/tikz/maximum picture height=\meta{dimension}}
+ As above but will not change the size of the picture
+ if its height is less than \meta{dimension}.
+\end{key}
+
+\begin{key}{/tikz/minimum picture size=\marg{width}\marg{height}}
+ Scales the picture so that its height will be at least \meta{width}
+ and its height will be at least \meta{height}.
+\end{key}
+
+\begin{key}{/tikz/maximum picture size=\marg{width}\marg{height}}
+ Scales the picture so that its height will be at most \meta{width}
+ and its height will be at most \meta{height}.
+\end{key}
+
+\subsection{Changing the aspect ratio.}
+The following \emph{starred} keys do change the aspect ratio.
+\begin{key}{/tikz/picture width*=\meta{dimension}}
+ Scales the picture so that the width of the picture will be \meta{dimension}.
+ This will only scale the $x$ axis.
+\end{key}
+
+\begin{key}{/tikz/minimum picture width*=\meta{dimension}}
+ As above but will not change the size of the picture
+ if its width is greater than \meta{dimension}.
+\end{key}
+
+\begin{key}{/tikz/maximum picture width*=\meta{dimension}}
+ As above but will not change the size of the picture
+ if its width is less than \meta{dimension}.
+\end{key}
+
+\begin{key}{/tikz/picture height*=\meta{dimension}}
+ Scales the picture so that the height of the picture will be \meta{dimension}.
+ This will only scale the $y$ axis.
+\end{key}
+
+\begin{key}{/tikz/picture size*=\marg{width}\marg{height}}
+ Scales the picture so that its width will be \meta{width}
+ and its height will be \meta{height}.
+
+ This will scale both axes but independent from each other.
+\end{key}
+\end{multicols}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-scalepicture.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -8,7 +8,7 @@
% 2. under the GNU Free Documentation License.
%
\newcommand*\tikzextname{Ti\textit kZ-Extensions}
-\newcommand*\tikzextversion{0.4.1}
+\newcommand*\tikzextversion{0.4.2}
\begin{document}
{\colorlet{blue}{black}% links shall be black
\title{\bfseries The \tikzextname\space Package\\
@@ -71,6 +71,8 @@
\tikzsetfigurename{patterns.images} \include{tikz-ext-manual-en-library-patterns.images}
\tikzsetfigurename{positioning-plus}
\include{tikz-ext-manual-en-library-positioning-plus}
+\tikzsetfigurename{scalepicture}
+\include{tikz-ext-manual-en-library-scalepicture}
\tikzsetfigurename{topaths.arcthrough}
\include{tikz-ext-manual-en-library-topaths.arcthrough}
\tikzsetfigurename{trans}
@@ -170,6 +172,11 @@
\section*{Changelog}\addcontentsline{toc}{section}{Changelog}
\begin{multicols}{2}\raggedright
\noindent
+Version 0.4.2
+\begin{itemize}
+\item \addTikz{scalepicture}
+\item Bugfixes to |shapes.uncenteredrectangle|, |paths.ortho|, |positioning-plus| and |pgfcalender-ext|.
+\end{itemize}
Version 0.4.1
\begin{itemize}
\item Cleaned up directory structure of documentary.
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -115,6 +115,7 @@
ext.paths.timer,
ext.patterns.images,
ext.positioning-plus,
+ ext.scalepicture,
ext.shapes.heatmark,
ext.shapes.circlearrow,
ext.shapes.circlecrosssplit,
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -19,8 +19,8 @@
%mode=list and make,
%mode=list only,export=true,% simply skips EVERY picture -> good for debugging the text.
]
- \tikzexternalenable
-% \tikzexternaldisable
+% \tikzexternalenable
+ \tikzexternaldisable
\tikzifexternalizing{
\pgfkeys{/pdflinks/codeexample links=false}
}{}
Modified: trunk/Master/texmf-dist/tex/latex/tikz-ext/pgfcalendar-ext.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ext/pgfcalendar-ext.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ext/pgfcalendar-ext.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -6,7 +6,7 @@
% 2. under the GNU Free Documentation License.
%
-\input pgfcalendar.text
+\input pgfcalendar.tex
\catcode`\@=11
\input pgfcalendar-ext.code.tex
\catcode`\@=\pgfcalendaratcode
Modified: trunk/Master/texmf-dist/tex/latex/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -6,8 +6,8 @@
% 2. under the GNU Free Documentation License.
%
\pgfutil at IfUndefined{pgfnodepartthreebox}{%
- \newbox\pgfnodepartleftbox
- \newbox\pgfnodepartrightbox
+ \csname newbox\endcsname\pgfnodepartleftbox
+ \csname newbox\endcsname\pgfnodepartrightbox
}{%
\let\pgfnodepartleftbox\pgfnodeparttwobox
\let\pgfnodepartrightbox\pgfnodepartthreebox
Modified: trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.paths.ortho.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.paths.ortho.code.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.paths.ortho.code.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -42,8 +42,9 @@
%% TikZ interjects are done, the rest is independent:
-\newlength\tikzext at tikz@udlr at distance
-\newlength\tikzext at tikz@hvvh at distance
+
+\newdimen\tikzext at tikz@udlr at distance
+\newdimen\tikzext at tikz@hvvh at distance
\newif\iftikzext at tikz@hvvh at middle % checks whether spacing = 0 was selected
\newif\iftikzext at tikz@hvvh at fromcenter
\newif\iftikzext at ortho@preflush
Modified: trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.positioning-plus.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.positioning-plus.code.tex 2022-10-31 00:49:36 UTC (rev 64876)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.positioning-plus.code.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -67,7 +67,7 @@
\tikzset{east below/.code=\tikz at lib@place at handle@{#1}{north east}{0}{-1}{south east}{1}}
\newif\iftikzext at tikz@lib at place@postransform
-\tikzset{node distance transformation/.is if=qrr at tikz@lib at place@postransform}
+\tikzset{node distance transformation/.is if=tikzext at tikz@lib at place@postransform}
\def\tikz at lib@place at handle@@#1#2#3#4{%
\pgfutil at in@{of }{#1}%
\ifpgfutil at in@
Added: trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.scalepicture.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.scalepicture.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.scalepicture.code.tex 2022-10-31 19:42:12 UTC (rev 64877)
@@ -0,0 +1,194 @@
+% Copyright 2022 by Qrrbrbirlbel
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+\def\tikzext at scalepicture@savepicturesize{%
+ \pgf at process{%
+ \pgfpointdiff
+ {\pgfpointanchor{current bounding box}{south west}}
+ {\pgfpointanchor{current bounding box}{north east}}}%
+ \immediate\write\pgfutil at auxout{%
+ \noexpand\expandafter\gdef
+ \noexpand\csname tikzext at scalepicture@\pgfpictureid\endcsname{{\the\pgf at x}{\the\pgf at y}}%
+ }%
+ \let\tikzext at scalepicture@savepicturesize\relax
+}
+
+\def\tikzext at scalepicture@width{%
+ \expandafter\expandafter\expandafter\pgfutil at firstoftwo
+ \csname tikzext at scalepicture@\pgfpictureid\endcsname
+}
+\def\tikzext at scalepicture@height{%
+ \expandafter\expandafter\expandafter\pgfutil at secondoftwo
+ \csname tikzext at scalepicture@\pgfpictureid\endcsname
+}
+
+\def\tikzextpicturewidth{%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{0pt}{\tikzext at scalepicture@width}}
+\def\tikzextpictureheight{%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{0pt}{\tikzext at scalepicture@height}}
+\tikzset{
+ save picture size/.style={execute at end picture=\tikzext at scalepicture@savepicturesize},
+ save picture size/.value forbidden,
+ %%% keep aspect ratio
+ %% width and height
+ minimum picture size/.code 2 args={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at xa{#1}%
+ \pgfmathsetlength\pgf at ya{#2}%
+ \def\tikz at tempa{0}%
+ \def\tikz at temp{0}%
+ \ifdim\tikzext at scalepicture@width<\pgf at xa
+ \pgfmathsetmacro\tikz at tempa{\pgf at xa/\tikzext at scalepicture@width}%
+ \fi
+ \ifdim\tikzext at scalepicture@height<\pgf at ya
+ \pgfmathsetmacro\tikz at temp{\pgf at ya/\tikzext at scalepicture@height}%
+ \fi
+ \ifdim\tikz at tempa pt>\tikz at temp pt
+ \let\tikz at temp\tikz at tempa
+ \fi
+ \ifdim\tikz at temp pt>0pt
+ \tikzset{scale/.expand once=\tikz at temp}%
+ \fi
+ }%
+ },
+ maximum picture size/.code 2 args={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at xa{#1}%
+ \pgfmathsetlength\pgf at ya{#2}%
+ \def\tikz at tempa{0}%
+ \def\tikz at temp{0}%
+ \ifdim\tikzext at scalepicture@width>\pgf at xa
+ \pgfmathsetmacro\tikz at tempa{\pgf at xa/\tikzext at scalepicture@width}%
+ \fi
+ \ifdim\tikzext at scalepicture@height>\pgf at ya
+ \pgfmathsetmacro\tikz at temp{\pgf at ya/\tikzext at scalepicture@height}%
+ \fi
+ \ifdim\tikz at tempa pt<\tikz at temp pt
+ \let\tikz at temp\tikz at tempa
+ \fi
+ \ifdim\tikz at temp pt>0pt
+ \tikzset{scale/.expand once=\tikz at temp}%
+ \fi
+ }%
+ },
+ %%% keep aspect ratio
+ %% width
+ picture width/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzset{scale={(#1)/\tikzext at scalepicture@width}}%
+ }%
+ },
+ minimum picture width/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at xa{#1}%
+ \ifdim\tikzext at scalepicture@width<\pgf at xa
+ \tikzset{scale={\pgf at xa/\tikzext at scalepicture@width}}
+ \fi
+ }%
+ },
+ maximum picture width/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at xa{#1}%
+ \ifdim\tikzext at scalepicture@width>\pgf at xa
+ \tikzset{scale={\pgf at xa/\tikzext at scalepicture@width}}
+ \fi
+ }%
+ },
+ %%% xscale only
+ %% width
+ picture width*/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzset{xscale={(#1)/\tikzext at scalepicture@width}}%
+ }%
+ },
+ minimum picture width*/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at xa{#1}%
+ \ifdim\tikzext at scalepicture@width<\pgf at xa
+ \tikzset{xscale={\pgf at xa/\tikzext at scalepicture@width}}
+ \fi
+ }%
+ },
+ maximum picture width*/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at xa{#1}%
+ \ifdim\tikzext at scalepicture@width>\pgf at xa
+ \tikzset{xscale={\pgf at xa/\tikzext at scalepicture@width}}
+ \fi
+ }%
+ },
+ %%% keep aspect ratio
+ %% height
+ picture height/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzset{yscale={(#1)/\tikzext at scalepicture@height}}%
+ }%
+ },
+ minimum picture height/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at ya{#1}%
+ \ifdim\tikzext at scalepicture@height<\pgf at ya
+ \tikzset{scale={\pgf at ya/\tikzext at scalepicture@height}}
+ \fi
+ }%
+ },
+ maximum picture height/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at ya{#1}%
+ \ifdim\tikzext at scalepicture@height<\pgf at ya
+ \tikzset{scale={\pgf at ya/\tikzext at scalepicture@height}}
+ \fi
+ }%
+ },
+ %%% yscale only
+ %% height
+ picture height*/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzset{yscale={(#1)/\tikzext at scalepicture@height}}%
+ }%
+ },
+ minimum picture height*/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at ya{#1}%
+ \ifdim\tikzext at scalepicture@height<\pgf at ya
+ \tikzset{yscale={\pgf at ya/\tikzext at scalepicture@height}}
+ \fi
+ }%
+ },
+ maximum picture height*/.code={%
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \pgfmathsetlength\pgf at ya{#1}%
+ \ifdim\tikzext at scalepicture@height<\pgf at ya
+ \tikzset{yscale={\pgf at ya/\tikzext at scalepicture@height}}
+ \fi
+ }%
+ },
+ %%% xscale or yscale
+ picture size*/.code 2 args={% #1 = width, #2 = height
+ \tikzset{save picture size}%
+ \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzset{
+ xscale={(#1)/\tikzext at scalepicture@width},
+ yscale={(#2)/\tikzext at scalepicture@height}}%
+ }%
+ },
+}
+\endinput
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/latex/tikz-ext/tikzlibraryext.scalepicture.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list.