texlive[74702] Master/texmf-dist: tikz-ext (19mar25)
commits+karl at tug.org
commits+karl at tug.org
Wed Mar 19 21:20:49 CET 2025
Revision: 74702
https://tug.org/svn/texlive?view=revision&revision=74702
Author: karl
Date: 2025-03-19 21:20:49 +0100 (Wed, 19 Mar 2025)
Log Message:
-----------
tikz-ext (19mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-layers.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-nodes.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-pgffor.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex
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-topaths.arcthrough.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex
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-en-pgf-arrows.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-uncentered.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.bib
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/generic/tikz-ext/pgfcalendar-ext.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgffor-ext.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfkeyslibraryext.pgfkeys-plus.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.arrows.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.layers.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.nodes.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.scalepicture.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex
trunk/Master/texmf-dist/tex/latex/tikz-ext/pgffor-ext.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-arrows-plus.tex
trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.autobend.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzext-util.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.arrows-plus.code.tex
trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.autobend.code.tex
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/README.md 2025-03-19 20:20:49 UTC (rev 74702)
@@ -12,7 +12,21 @@
This is not a LaTeX package but a collection of libraries for PGF and TikZ;
+ * `ext.arrows` provides additional arrow tips.
+ * Many of the standard `arrows.meta` library's get “Centered” and “Untipped” alternative.
+ * Furthermore, the arrow tips `ext_Hug Cap` for connecting circles neatly and `ext_Loop` are provided.
+ * `ext.arrows-plus` allows to place arrow tips along a path.
+
+ These can either be placed via pics *along* a path operation (`ext/arrow`, `ext/softpath arrows` and `ext/softpath arrow`)
+ or via keys ( `ext/arc arrows` and `ext/softpath arrows`) along a previous arc or any path segment.
+ All except the `ext/arrow` key support the bending of arrow tips.
+
+ The `\arrow` command of the `decorations.markings` library has alternatives `\arrow*` and `\arrow**` for shifting and shifting/bending.
+
* `ext.calendar-plus` extends the `calendar` library with more tests, week numbers and a few goodies.
+ * The already defined keys `day xshift`, `day yshift`, `month xshift` and `month yshift` are now proper value-keys and can be accessed wtithout having to use an `@`-riddled macro name.
+ * The `if` key is nestable.
+ * Via the `pgfcalendar-ext` package more conditionals are available, also week numbering according to ISO 8601 is supported.
* `ext.layers` allows to put nodes etc on a separate layer without having to use `pgfonlayer`.
* `ext.nodes` extends the functionalities around nodes.
* `ext.node-families` uses the AUX file to sync the sizes of nodes.
@@ -36,4 +50,4 @@
* `ext.shapes.superellipse`
* `ext.shapes.uncenteredrectangle`
- These were developed in response to questions on tex.stackexchange.com or texwelt.de.
\ No newline at end of file
+ These were developed in response to questions on tex.stackexchange.com or texwelt.de.
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -10,7 +10,7 @@
\section{Calendar: Weeknumbers and more conditionals}
\label{sec:calendar}
-\begin{texpackage}{calendar-ext}
+\begin{texpackage}{pgfcalendar-ext}
This package adds week numbers and more conditionals to the \pgfname\space package |pgfcalendar|.
% (Despite the code example above, this package is not set up to work with Con\TeX t.)
\inspiration{WeekNum-Q,CalCond-Q,CalFullWeek-Q}{WeekNum-A,CalCond-A,CalFullWeek-A}
@@ -23,36 +23,37 @@
\subsection{Extensions}
The following tests are added.
+In version pre~0.6, they're missing the prefix |ext/|.
\begin{itemize}
-\itemcalendaroption{Jan} This test is passed by all dates that are in the month of January.
-\itemcalendaroption{Feb} as above.
-\itemcalendaroption{Mar} as above.
-\itemcalendaroption{Apr} as above.
-\itemcalendaroption{May} as above.
-\itemcalendaroption{Jun} as above.
-\itemcalendaroption{Jul} as above.
-\itemcalendaroption{Aug} as above.
-\itemcalendaroption{Sep} as above.
-\itemcalendaroption{Oct} as above.
-\itemcalendaroption{Nov} as above.
-\itemcalendaroption{Dec} as above.
-\itemcalendaroption{leap year}\opt{|=|\meta{year}}
+\itemcalendaroption{ext/Jan} This test is passed by all dates that are in the month of January.
+\itemcalendaroption{ext/Feb} as above.
+\itemcalendaroption{ext/Mar} as above.
+\itemcalendaroption{ext/Apr} as above.
+\itemcalendaroption{ext/May} as above.
+\itemcalendaroption{ext/Jun} as above.
+\itemcalendaroption{ext/Jul} as above.
+\itemcalendaroption{ext/Aug} as above.
+\itemcalendaroption{ext/Sep} as above.
+\itemcalendaroption{ext/Oct} as above.
+\itemcalendaroption{ext/Nov} as above.
+\itemcalendaroption{ext/Dec} as above.
+\itemcalendaroption{ext/leap year}\opt{|=|\meta{year}}
This test checks whether the given year is a leap year. If
\meta{year} is omitted, it checks the year of the current date.
-\itemcalendaroption{and}|=|\marg{tests}
+\itemcalendaroption{ext/and}|=|\marg{tests}
This test passes when all \meta{tests} pass.
-\itemcalendaroption{not}|=|\marg{tests}
+\itemcalendaroption{ext/not}|=|\marg{tests}
This test passes when \meta{tests} do not pass.
-\itemcalendaroption{week of month}|=|\meta{num}
+\itemcalendaroption{ext/week of month}|=|\meta{num}
This test passes when the date is in \meta{num}th week of the month.
The first week of the month start at day~1 and ends with day~7.
-\itemcalendaroption{week of month'}|=|\meta{num}
+\itemcalendaroption{ext/week of month'}|=|\meta{num}
As above but counts from the last day of the month.
For a month with 31~days, this means the ``1st'' week starts at day~25 and ends with day~31.
-\itemcalendaroption{calendar week of month}|=|\meta{num}
+\itemcalendaroption{ext/calendar week of month}|=|\meta{num}
This test passes when the date is in \meta{num}th calendar week of the month.
The first week starts at the first day of the month and ends at the next Sunday.
-\itemcalendaroption{calendar week of month'}|=|\meta{num}
+\itemcalendaroption{ext/calendar week of month'}|=|\meta{num}
As above but counts from the last day of the month.
\begin{codeexample}[width=5cm,preamble=\usetikzlibrary{ext.calendar-plus}]
\tikz
@@ -59,13 +60,13 @@
\calendar[
dates=2022-10-01 to 2022-10-31,
week list]
- if (week of month=2) [red]
- if (calendar week of month'=2) [blue];
+ if (ext/week of month=2) [red]
+ if (ext/calendar week of month'=2) [blue];
\end{codeexample}
-\itemcalendaroption{yesterday}|=|\marg{tests}
+\itemcalendaroption{ext/yesterday}|=|\marg{tests}
This test passes when the previous day passes \meta{tests}.
-\itemcalendaroption{week}|=|\meta{num}
- This test passes when the current week of the year equals \marg{num}.
+\itemcalendaroption{ext/week}|=|\meta{num}
+ This test passes when the current week of the year equals \meta{num}.
\end{itemize}
The shorthands for |d-| and |m-| are slightly changed so that they are
expandable. This makes it possible to use these shorthands inside of \pgfname math.
@@ -79,7 +80,8 @@
\subsection{Week numbering (ISO~8601)}
\label{calendar:weeknumbering}
-\begin{command}{\pgfcalendarjulianyeartoweek\marg{Julian day}\marg{year}\marg{week count}}
+\begin{command}{\pgfextcalendarjulianyeartoweek\marg{Julian day}\marg{year}\marg{week count}}
+\cmdcompat{\pgfcalendarjulianyeartoweek}
This command calculates the week for the \meta{Julian day} of \meta{year}.
The \meta{week counter} must be a \TeX\space count.
@@ -87,14 +89,16 @@
year's first Thursday in it.
\end{command}
-Inside of |\pgfcalendar|\indexCommandO\pgfcalendar the command |\pgfcalendarcurrentweek| will be available.
-\begin{command}{\pgfcalendarcurrentweek}
+Inside of |\pgfcalendar|\indexCommandO\pgfcalendar the command |\pgfextcalendarcurrentweek| will be available.
+\begin{command}{\pgfextcalendarcurrentweek}
+\cmdcompat{\pgfcalendarcurrentweek}
This command returns the current week number (always two digits -- use shorthand |n.|
to strip the leading zero).
\end{command}
-Inside of |\ifdate|\indexCommandO\ifdate the command |\pgfcalendarifdateweek| will be available.
-\begin{command}{\pgfcalendarifdateweek}
+Inside of |\ifdate|\indexCommandO\ifdate the command |\pgfextcalendarifdateweek| will be available.
+\begin{command}{\pgfextcalendarifdateweek}
+\cmdcompat{\pgfcalendarifdateweek}
This command returns the week number (always two digits).
\end{command}
\end{multicols}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -12,7 +12,7 @@
\section{Usage}
This package is called |tikz-ext|, however,
one can't load it via |\usepackage|.%
-\footnote{Except for \texttt{calendar-ext} and \texttt{pgffor-ext}.}
+\footnote{Except for \texttt{pgfcalendar-ext} and \texttt{pgffor-ext}.}
Instead, this package consists mostly of
\pgfname\space and \tikzname\space libraries
which are loaded by either |\usepgflibrary| or |\usetikzlibrary|.
@@ -33,4 +33,112 @@
Don't hesitate to open an issue on GitHub.
You probably found a bug.
+
+\newcolumn
+\section{Namespaces and \tikzextname\ macros}
+Since some parts of this package have existed in some form since 2013,
+the choice for key names and in which \pgfname keys namespace they reside
+is not always optimal.
+They often reside in the main |/tikz| or |/pgf| path.
+Similar applies to macro names.
+
+Starting with version~0.6, the namespace for almost all keys is |/tikz/ext|
+or |/pgf/ext|. The same applies to macros that shall be starting with |\tikzext| or |\pgfext|.
+
+Starting with version~0.6,
+\tikzextname\ provides commands that return the current version for compatibility testing.
+The second simply increments with every release
+so that the first doesn't need to be parsed.
+\begin{command}{\tikzextversion}
+ Returns \texttt{\tikzextversion}.
+\end{command}
+\begin{command}{\tikzextversionnumber}
+ Returns \texttt{\tikzextversionnumber}.
+\end{command}
+%
+Also there's |\tikzextset| and |\pgfextset|.
+\begin{command}{\tikzextset\marg{options}}
+ This command will process the \meta{options} using the
+ |\pgfkeys| command with the default path set to |/tikz/ext|.
+\end{command}
+\begin{command}{\pgfextset\marg{options}}
+ This command will process the \meta{options} using the
+ |\pgfkeys| command with the default path set to |/pgf/ext|.
+\end{command}
+
+\newcolumn
+\section{Compatibility with older versions}
+As discussed in the previous section,
+keys and commands of extensions that existed before version~0.6
+that do not appear in this manual are considered deprecated.
+
+\begin{key}{/\tikzext/compat=\mchoice{pre 0.6, 0.6, warn, newest} (default pre 0.6)}
+ This sets the global compatibility setting for every extension of this package
+ (whether already loaded or not).
+
+ The choice |warn| gives out warning for deprecated keys or commands
+ but still executes them if they were not not in use when an extension was loaded.
+
+ For version 0.6 this is actually the default settings so that active documents
+ keep working -- for now.
+
+ The following table shows the compatibility settings for each extension.
+ \newcommand*\X{$\checkmark$}%
+ \newcommand*\Xdef{\X\kern-.65em\X}%
+ A \X\ denotes an available setting where \Xdef\ denotes the default compatibility setting.
+ A -- denotes that it is not different than the |newest| setting.
+ \begin{center}
+ \begin{tabular}{>{\ttfamily ext.}l ccc}
+ \toprule
+ \multicolumn{1}{l}{Extension} & warn & pre 0.6 & 0.6 \\ \midrule
+ \multicolumn{1}{l}{\ttfamily pgfcalendar-ext} & \Xdef & \X & -- \\
+ \multicolumn{1}{l}{\quad\ttfamily ext.calendar-plus} & & & \\ \midrule[.5\lightrulewidth]
+ arrows & \Xdef & \X & -- \\
+ layers & \Xdef & \X & -- \\
+ node-families & \Xdef & \X & -- \\
+ nodes & \Xdef & \X & -- \\
+ paths.arcto & \Xdef & \X & -- \\ \addlinespace
+ paths.ortho & \Xdef & \X & -- \\
+ paths.timer & \Xdef & \X & -- \\
+ patterns.images & \Xdef & \X & -- \\
+ pgffor-ext & \Xdef & \X & -- \\
+ pgfkeys-plus & \Xdef & \X & -- \\
+ positioning-plus & \Xdef & \X & -- \\ \addlinespace
+ scalepicture & \Xdef & \X & -- \\
+ shapes & \Xdef & \X & -- \\
+ transformations.mirror & \Xdef & \X & -- \\
+ topaths.arcthrough & \Xdef & \X & -- \\ \bottomrule
+ \end{tabular}
+ \end{center}
+
+ For future version, it is planned that the default compatibility setting will not be |warn|.
+\end{key}
+
+\newcolumn\noindent
+For each available extension the compatibility setting can be adjusted as well
+after the extension is loaded.
+\begin{keylist}[/\tikzext/compat]{%
+ pgfcalendar-ext=\meta{version} (default pre 0.6),
+ arrows=\meta{version} (default pre 0.6),
+ layers=\meta{version} (default pre 0.6),
+ nodes=\meta{version} (default pre 0.6),
+ node-families=\meta{version} (default pre 0.6),
+ paths.arcto=\meta{version} (default pre 0.6),
+ paths.ortho=\meta{version} (default pre 0.6),
+ paths.timer=\meta{version} (default pre 0.6),
+ patterns.images=\meta{version} (default pre 0.6),
+ pgffor-ext=\meta{version} (default pre 0.6),
+ pgfkeys-plus=\meta{version} (default pre 0.6),
+ positioning-plus=\meta{version} (default pre 0.6),
+ scalepicture=\meta{version} (default pre 0.6),
+ shapes=\meta{version} (default pre 0.6),
+ transformations.mirror=\meta{version} (default pre 0.6),
+ topaths.arcthrough=\meta{version} (default pre 0.6)%
+}
+ For \meta{version} the same choices are valid as for the main |compat| key.
+ It should be noted that at this point, a compatibility setting can't really be reversed
+ since they only forward arguments from an old key or command to the new version.
+
+ The old names are given as a subtitle to the new one in the sections that introduce them.
+\end{keylist}
\end{multicols}
\ No newline at end of file
Added: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-arrows-plus.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-arrows-plus.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-arrows-plus.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -0,0 +1,222 @@
+% !TeX TS-program = lualatex
+% !TeX spellcheck = en_US
+% !TeX root = tikz-ext-manual.tex
+% Copyright 2023 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.
+%
+
+\section{Arrow Pics}
+\label{tikzlibrary:arrows}
+\tikzset{external/export/.try=false}%
+\begin{tikzlibrary}{ext.arrows-plus}
+ This library defines pics and keys
+ that can be used to place (bended) arrow tips on paths.
+\end{tikzlibrary}
+
+\begin{multicols}{2}
+The \referenceDecorationandIndexO{markings} decoration
+already provides the functionality to place arrow tips along the path.
+The pics and keys provided by this library serve as an alternative.
+
+Many of the pics and keys share various keys that specify
+where and how the arrow tips are placed.
+\begin{key}{/\tikzext/pos <=\meta{value} (initially 0.0)}
+If the pic type supports it and a start arrow tip sequence is provided
+this specifies the position of that sequence.
+\end{key}
+\begin{key}{/\tikzext/pos >=\meta{value} (initially 0.5)}
+This is an alias for \referenceKeyandIndex{pos},
+if an end arrow tip sequence is provided, it is placed at this position.
+\end{key}
+
+\begin{key}{/\tikzext/arrow shift mode=\meta{shift mode} (initially total length)}
+This key is used to set the \meta{shift mode} for the arrow tip.
+It can be one of the following.
+\begin{description}
+\item[|arrow shift mode|=\declare{|off|}]
+
+ This disables the shifting.
+\item[|arrow shift mode|=\declare{|total length|}]
+
+ The total length of the whole arrow tip sequence will be used.
+\item[|arrow shift mode|=\declare{|total|}]
+
+ This is an alias for |total length|.
+\item[|arrow shift mode|=\declare{|length until line end|}]
+
+ The length of the whole arrow tip until the line end will be used --
+ as reported by \pgfname\ which might not always be the expected one.
+\item[|arrow shift mode|=\declare{|line end|}]
+
+ This is an alias for |length until line end|.
+\end{description}
+\begin{codeexample}[preamble=\usetikzlibrary{ext.arrows-plus}]
+\begin{tikzpicture}[>={Straight Barb[color=red]}, ultra thick]
+\ttfamily
+\foreach[count=\y] \shiftmode in {off, total length, length until line end}
+ \draw[ext/arrow shift mode=\shiftmode] (0, -\y )
+ -- pic {ext/arrow=>} ++(right:2)
+ -- pic {ext/arrow=>.>>} ++(right:2) node[below right] {\shiftmode}
+ ++(down:.4) -- pic {ext/arrow=>.>>} ++( left:2)
+ -- pic {ext/arrow=>} ++( left:2);
+\draw[thin, gray] (1,-.75) -- +(down:3) (3,-.75) -- +(down:3);
+\end{tikzpicture}
+\end{codeexample}
+
+For single arrow tips it might be better to use the Centered arrow tip variants
+of the \referenceLibraryandIndex{ext.arrows} library (see sec~\ref{pgflibrary:arrows})
+and disabled |arrow shift mode|.
+\end{key}
+
+When an arrow tip sequence is to be drawn depending on the shift mode
+its total length or its length until the line end will be determined
+and multiplied with the |arrow shift factor|.
+The result of this evaluation is used to shift the arrow tip sequence
+in the tip's direction.
+
+\begin{key}{/\tikzext/arrow shift factor=\meta{value} (initially 0.5)}
+ This determines the shift factor.
+
+ The default value is probably good for most cases.
+\end{key}
+
+\subsection{Arrow pic types}
+
+This library provides the following pics:
+\begin{description}
+\item[|ext/arrow|]
+ This is the simplest implementation to place an arrow tip along a path.
+ It uses the current timer that is also used to place nodes.
+
+ It can be used without any adjustment for every path operation that provides such a timer.
+ These do \emph{not} include
+ \referencePathOperationandIndexO{circle},
+ \referencePathOperationandIndexO{ellipse},
+ \referencePathOperationandIndexO{plot} and
+ \referencePathOperationandIndexO{grid}.
+ For \referencePathOperationandIndexO{rectangle},
+ \referencePathOperationandIndexO{parabola},
+ \referencePathOperationandIndexO{sin} and
+ \referencePathOperationandIndexO{cos},
+ the \referenceLibraryandIndex{ext.paths.timer} library is recommended or even necessary
+ (see section~\ref{library:timer}).
+
+ The arrow tips will never be bended. For this the following pic types
+ or the \referenceKeyandIndex[/\tikzext/]{arc arrows} key will be necessary.
+
+ Due to \cite{PgfIssueSloped} with an active transformation,
+ the arrow tips won't be placed correctly in many cases.
+ For this \emph{and} bended arrow tips the following pics are necessary.
+
+\item[|ext/softpath arrows|]
+ This pic type places a possible bended arrow tip on the last segment of the path.
+
+% For the path operators \referencePathOperationandIndexO{--},
+% {\catcode`\|=12 \referencePathOperationandIndexO{|-}
+% and \referencePathOperationandIndexO{-|}}
+% this works even with a non-identity transformation.
+% If possible, the current timer will be used to take more segments into account so
+% that the arrow tip can be placed along the recent path operation.
+
+ This won't work for \referencePathOperationandIndexO{arc}s,
+ for this the \referenceKeyandIndex[/\tikzext/]{arc arrows} key will be necessary.
+
+ This pic type can place two tip specification,
+ one at |pos >| and one at |pos <| in the reversed direction.
+
+\item[|ext/softpath arrow|]
+ This is an alias for |softpath arrows| with an empty start arrow tip specification.
+
+\end{description}
+\begin{pictype}{ext/arrow}{\opt{|=|\meta{\rmfamily arrow tip specification}}}
+ This pic draws the given \meta{arrow tip specification}
+ (defaults to the end tip specification of the path).
+
+
+ This obviously is best used as a pic along a path segment that supports it.
+ It \emph{does not} support bended arrow tips.
+\begin{codeexample}[preamble=\usetikzlibrary{bending, ext.arrows-plus}]
+\begin{tikzpicture}[>={Triangle[color=red]}, arrows={[bend]}, ultra thick]
+\ttfamily
+\foreach[count=\y] \shiftmode in {off, total length, length until line end}
+ \draw[ext/arrow shift mode=\shiftmode] (0, -\y )
+ to[bend left] pic {ext/arrow=>} ++(right:2)
+ to[bend left] pic {ext/arrow=>>.>} ++(right:2)
+ node[below right] {\shiftmode}
+ ++(down:.4) to[bend right] pic {ext/arrow=>>.>} ++( left:2)
+ to[bend right] pic {ext/arrow=>} ++( left:2);
+\draw[thin, gray] (1,-.5) -- +(down:3) (3,-.5) -- +(down:3);
+\end{tikzpicture}
+\end{codeexample}
+\end{pictype}
+
+\begin{pictype}{ext/softpath arrows}{\opt{|=|\meta{\rmfamily start tip specification}|-|\meta{\rmfamily end tip specification}}}
+ This pic draws the given arrow tip specification
+ (defaults to the already present tip specification of the path)
+ along the previous path segment (a curve or a line).
+ It supports the |pos <| key.
+
+ \paragraph{Note:} For arcs with an angle greater than 90${}^\circ$
+ this will not work as expected. Use the |arc arrows| key instead.
+\end{pictype}
+\begin{pictype}{ext/softpath arrow}{\opt{|=|\meta{\rmfamily end tip specification}}}
+ This pic type is an alias for |softpath arrows = -|\meta{end tip specification}.
+\end{pictype}
+
+\subsection{Arrow keys}
+The last pic type |softpath arrows| is also available as a key
+which is the preferred version.
+\begin{key}{/\tikzext/softpath arrows=\opt{\meta{options}} (default ->)}
+This key adds arrow tips to the previous path segment (a curve or a line).
+
+\begin{stylekey}{/\tikzext/every softpath arrows (initially \{\})}
+This style will be applied for every instance of |softpath arrows| (key version, not the pic).
+\end{stylekey}
+\end{key}
+
+For |arc|s the following key needs to be used directly after the |arc| path operation.
+\begin{key}{/\tikzext/arc arrows=\opt{\meta{options}} (default ->)}
+This key adds arrow tips to the previous arc segment.
+\begin{stylekey}{/\tikzext/every arc arrows (initially \{\})}
+This style will be applied for every instance of |arc arrows|.
+\end{stylekey}
+
+\paragraph{Tip:}
+Use an arc with the full 360${}^\circ$ to place bended arrow tips along a circle or an ellipse.
+\end{key}
+\subsection{Shifted and bended arrows for the \texttt{decorations.markings} library}
+Many paths are not properly accessible by the previous methods.
+If this library is loaded \emph{after}
+the \referenceLibraryandIndexO{decorations.markings} library,
+both the |\arrow| and
+the |\arrowreversed| macros are enhanced.
+
+\begin{command}{\arrow\opt{|**|\oarg{options}}\marg{arrow end tip}}
+ This macro works the same as before but the one-starred version
+ applies the shifting as specified
+ by |arrow shift mode| and |arrow shift factor|
+ where as the two-starred version also bends the arrow tip.
+\end{command}
+\begin{command}{\arrowreversed\opt{|**|\oarg{options}}\marg{arrow end tip}}
+ As above, only the arrow end tip is flipped and points in the other direction.
+\end{command}
+\begin{codeexample}[width=2cm,preamble=\usetikzlibrary{bending, decorations.markings, ext.arrows-plus}]
+\tikzset{
+ arr/.style={
+ postaction=decorate,
+ decoration={
+ name=markings,
+ mark={between positions .25 and 1 step .25 with
+ \arrow#1[red]{> _ < _ >}}}}}
+\tikz[y=1.5cm, >=Stealth, arrows={[round]}, nodes={circle, draw}]
+ \path node[arr= ]{Ti\emph kZ} % \arrow
+ (0,-1) node[arr=* ]{Ti\emph kZ} % \arrow*
+ (0,-2) node[arr=**]{Ti\emph kZ} % \arrow**
+ ;
+\end{codeexample}
+\end{multicols}
+\endinput
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-arrows-plus.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-library-calendar-plus.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -17,32 +17,28 @@
\begin{multicols}{2}
\subsection{Value-keys and nestable \texttt{if} key}
-
-The values of following keys are originally stored in some macros that are not
+\begin{keylist}[/tikz]{%
+ day xshift (initially 3ex),
+ day yshift (initially 3.5ex),
+ month xshift (initially 9ex),
+ month yshift (initially 9ex)}
+The values of these keys are originally stored in some macros that are not
accessible by the user. These are now simple value-keys.
The |@|-protected macros are still available, of course.
+\end{keylist}
-\begin{key}{/tikz/day xshift (initially 3ex)}
-\end{key}
-\begin{key}{/tikz/day yshift (initially 3.5ex)}
-\end{key}
-\begin{key}{/tikz/month xshift (initially 9ex)}
-\end{key}
-\begin{key}{/tikz/month yshift (initially 9ex)}
-\end{key}
-
-It is now also possible to nest |/tikz/if| occurrences.
\begin{key}{/tikz/if=|(|\meta{conditions}|)|\meta{code or options}\opt{|else|\meta{else code or options}}}
+ It is now also possible to nest |/tikz/if| occurrences.
\end{key}
\subsection{\pgfname math functions}
-\begin{math-function}{weeksinmonthofyear(\mvar{first weekday}, \mvar{month}, \mvar{year})}
-\mathcommand
+\begin{math-function}{ext\textunderscore weeksinmonthofyear(\mvar{first weekday}, \mvar{month}, \mvar{year})}
+\mathcommand[extweeksinmonthofyear(\mvar{first weekday}, \mvar{month}, \mvar{year})]
Returns the number of (partial) weeks in the month \mvar{month} of year \mvar{year}
when this month begins on a \mvar{first weekday}.
\end{math-function}
-\begin{math-function}{lastdayinmonthofyear(\mvar{month}, \mvar{year})}
-\mathcommand
+\begin{math-function}{ext\textunderscore lastdayinmonthofyear(\mvar{month}, \mvar{year})}
+\mathcommand[extlastdayinmonthofyear(\mvar{month}, \mvar{year})]
Returns the last day (28, 29, 30 or 31) of month \mvar{month} of year \mvar{year}.
\end{math-function}
@@ -49,19 +45,19 @@
\subsection{Week numbering (ISO~8601)}
The actual week number algorithm is implemented by the |pgfcalendar-ext| package/module in section~\ref{calendar:weeknumbering}.
-\begin{key}{/tikz/week code=\meta{code}}
+\begin{key}{/\tikzext/week code=\meta{code}}\keycompat{tikz}
Works like |/tikz/day code| or |/tikz/month code|, only for weeks.\indexKeyO{day code}\indexKeyO{month code}
\end{key}
-\begin{key}{/tikz/week text=\meta{text}}
+\begin{key}{/\tikzext/week text=\meta{text}}\keycompat{tikz}
Works like |/tikz/day text| or |/tikz/month text|, only for weeks.\indexKeyO{day text}\indexKeyO{month text}
\end{key}
-\begin{stylekey}{/tikz/every week}
+\begin{stylekey}{/\tikzext/every week}\keycompat{tikz}
Works like |/tikz/every day| or |/tikz/every month|, only for weeks.\indexKeyO{every day}\indexKeyO{every month}
\end{stylekey}
-\begin{stylekey}{/tikz/week label left}
+\begin{stylekey}{/\tikzext/week label left}\keycompat{tikz}
Places the week label to the left of the first day of the month. (For
|week list| and |month list| where a week does not start on a Monday, the
position is chosen ``as if'' the week had started on a Monday -- which is
@@ -72,8 +68,8 @@
\calendar[
week list, month label above centered,
dates=2022-07-01 to 2022-07-31,
- week label left,
- every week/.append style={
+ ext/week label left,
+ ext/every week/.append style={
gray!50!black, font=\sffamily}];
\end{codeexample}
%
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-layers.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-layers.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-layers.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -19,10 +19,11 @@
\end{tikzlibrary}
\begin{multicols}{2}
-\subsection{Internal keys}
-\begin{key}{/tikz-ext/patch=\meta{specification}}
+%\subsection{Internal keys}
+\begin{key}{/\tikzext/layers/patch=\mchoice{node, matrix, pic, edge, all}}
+\keycompat{tikz-ext/layers}
Since this library is experimental, its functionality needs to be activated explicitly.
-The \meta{specification} is one of
+Patches exist for
\begin{itemize}
\item |node|,
\item |matrix|,
@@ -36,33 +37,64 @@
\item |all| which applies all the patches at once.
\end{itemize}
\end{key}
+%
+%These keys only work when a patch is applied.
+%These will be used internally.
+%\begin{key}{/\tikzext/layers/on layer=\meta{layer}}
+%\keycompat{tikz-ext/layers}
+%Places an object on the \pgfname\ layer \meta{layer}.
+%\end{key}
+%\begin{key}{/\tikzext/layers/in box=\meta{box}}
+%\keycompat{tikz-ext/layers}
+%Places an object in the \TeX\ box \meta{box}.
+%\end{key}
-These keys only work when a patch is applied but don't need to be used
-since the patching activated specific
-\begin{key}{/tikz-ext/layers/in box=\meta{box}}
+%\subsection{User-level keys}
+\newcolumn
+\begin{key}{/\tikzext/node on layer=\meta{layer}}
+\keycompat{tikz}
+If the |node| patch is applied, this key places a node on layer \meta{layer}.
\end{key}
+%\begin{key}{/\tikzext/node in box=\meta{box}}
+%\keycompat{tikz}
+%If the |node| patch is applied, this key places a node in box \meta{box}.
+%\end{key}
-\begin{key}{/tikz-ext/layers/on layer=\meta{layer}}
+\begin{key}{/\tikzext/matrix on layer=\meta{layer}}
+\keycompat{tikz}
+If the |matrix| patch is applied, this key places the matrix on layer \meta{layer}.
\end{key}
+%\begin{key}{/\tikzext/matrix in box=\meta{box}}
+%\keycompat{tikz}
+%If the |matrix| patch is applied, this key places the matrix in box \meta{box}.
+%\end{key}
-\subsection{User-level keys}
-\begin{key}{/tikz/node on layer=\meta{layer}}
+\begin{key}{/\tikzext/edge on layer=\meta{layer}}
+\keycompat{tikz}
+If the |edge| patch is applied, this key places the edge on layer \meta{layer}.
\end{key}
-\begin{key}{/tikz/node in box=\meta{box}}
-\end{key}
+%\begin{key}{/\tikzext/edge in box=\meta{box}}
+%\keycompat{tikz}
+%If the |edge| patch is applied, this key places the edge in box \meta{box}.
+%\end{key}
-\begin{key}{/tikz/matrix on layer=\meta{layer}}
+\begin{key}{/\tikzext/pic on layer=\meta{layer}}
+\keycompat{tikz}
+If the |pic| patch is applied, this key places the main code of a pic on layer \meta{layer}.
\end{key}
-\begin{key}{/tikz/matrix in box=\meta{box}}
-\end{key}
-
-\begin{key}{/tikz/edge on layer=\meta{layer}}
-\end{key}
-\begin{key}{/tikz/edge in box=\meta{box}}
-\end{key}
-
-\begin{key}{/tikz/pic on layer=\meta{layer}}
-\end{key}
-\begin{key}{/tikz/pic in box=\meta{box}}
-\end{key}
-\end{multicols}
\ No newline at end of file
+%\begin{key}{/\tikzext/pic in box=\meta{box}}
+%\keycompat{tikz}
+%If the |pic| patch is applied, this key places the main code of a pic in box \meta{box}.
+%\end{key}
+\end{multicols}
+\begin{codeexample}[width=.5\linewidth,preamble=\usetikzlibrary{ext.layers}]
+\pgfdeclarelayer{front}
+\begin{tikzpicture}[ext/layers/patch=node]
+\pgfsetlayers{main,front}
+\draw (0, -1) -- node[
+ ext/node on layer=front,
+ draw, fill=white, sloped
+ ] {On Top} (2,1);
+\draw[red] (0, 1) -- (2, -1);
+\end{tikzpicture}
+\end{codeexample}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -23,7 +23,7 @@
Similar to |\segments[<num>]| in PSTricks, the postfix operator |R| allows the user
to use an arbitrary number of segments of a circle to be used instead of an angle.
-\begin{key}{/pgf/full arc=\meta{num} (default |\{\}|)}
+\begin{key}{/\pgfext/full arc=\meta{num} (default |\{\}|)}\keycompat{pgf}
The number \meta{num} of segments will be set up.
Using |full arc| with an empty value disables the segmentation and |1R| equals $1^\circ$.
@@ -31,59 +31,59 @@
\meta{num} contains variables that change.
\end{key}
The |R| operator can then be used.
-\begin{math-operator}{R}{postfix}{fullarc}
+\begin{math-operator}{R}{postfix}{extfullarc}
Multiplies \mvar{x} with $\frac{360}{\meta{num}}$.
\end{math-operator}
\subsubsection{Functions}
-\begin{math-function}{strrepeat("\mvar{Text}", \mvar{x})}
+\begin{math-function}{extstrrepeat("\mvar{Text}", \mvar{x})}\mathcompat{strrepeat}
\mathcommand
Returns a string with \mvar{Text} repeated \mvar{x} times.
\begin{codeexample}[]
-\pgfmathparse{strrepeat("foo", 5)}
+\pgfmathparse{extstrrepeat("foo", 5)}
\pgfmathresult
\end{codeexample}
\end{math-function}
-\begin{math-function}{isInString("\mvar{String}", "\mvar{Text}")}
+\begin{math-function}{extisInString("\mvar{String}", "\mvar{Text}")}\mathcompat{isInString}
\mathcommand
Returns |1| (true) if \mvar{Text} contains \mvar{String},
otherwise |0| (false).
\begin{codeexample}[]
-\pgfmathparse{isInString("foo", "bar")}
+\pgfmathparse{extisInString("foo", "bar")}
\pgfmathresult \ and\
-\pgfmathparse{isInString("foo", "foobar")}
+\pgfmathparse{extisInString("foo", "foobar")}
\pgfmathresult
\end{codeexample}
\end{math-function}
-\begin{math-function}{strcat("\mvar{Text A}", "\mvar{Text B}", …)}
+\begin{math-function}{extstrcat("\mvar{Text A}", "\mvar{Text B}", …)}\mathcompat{strcat}
\mathcommand
Returns the concatenation of all given parameters.
\begin{codeexample}[]
-\pgfmathparse{strcat("blue!", int(7*3), "!green")}
+\pgfmathparse{extstrcat("blue!", int(7*3), "!green")}
\pgfmathresult
\end{codeexample}
\end{math-function}
-\begin{math-function}{isEmpty("\mvar{Text}")}
+\begin{math-function}{extisEmpty("\mvar{Text}")}\mathcompat{isEmpty}
\mathcommand
Returns |1| (true) if \mvar{Text} is empty, otherwise |0| (false).
%
\begin{codeexample}[]
-\pgfmathparse{isEmpty("foo")} \pgfmathresult\ and\
-\pgfmathparse{isEmpty("")} \pgfmathresult\ and\
+\pgfmathparse{extisEmpty("foo")} \pgfmathresult\ and\
+\pgfmathparse{extisEmpty("")} \pgfmathresult\ and\
\def\emptyText{}
-\pgfmathparse{isEmpty("\emptyText")} \pgfmathresult
+\pgfmathparse{extisEmpty("\emptyText")} \pgfmathresult
\end{codeexample}
\end{math-function}
-\begin{math-function}{atanXY(\mvar{x},\mvar{y})}
+\begin{math-function}{extatanXY(\mvar{x},\mvar{y})}\mathcompat{atanXY}
\mathcommand
Arctangent of $\mvar y\div \mvar x$ in degrees. This also takes into account the quadrant.
This is just a argument-swapped version of |atan2|\indexMathFunctionO{atan2} which makes it easier to use
@@ -90,14 +90,14 @@
the |\p| commands of the |calc|\indexLibraryO{calc} library.
%
\begin{codeexample}[]
-\pgfmathparse{atanXY(3,4)} \pgfmathresult
+\pgfmathparse{extatanXY(3,4)} \pgfmathresult
\end{codeexample}
\end{math-function}
-\begin{math-function}{atanYX(\mvar{y},\mvar{x})}
+\begin{math-function}{extatanYX(\mvar{y},\mvar{x})}\mathcompat{atanYX}
\mathcommand
Arctangent of $y\div x$ in degrees. This also takes into account the quadrant.
\begin{codeexample}[]
-\pgfmathparse{atanYX(4,3)} \pgfmathresult
+\pgfmathparse{extatanYX(4,3)} \pgfmathresult
\end{codeexample}
\end{math-function}
@@ -105,16 +105,16 @@
The following functions can only be used with \pgfname\space and/or \tikzname.
Since the arguments are usually plain text (and not numbers) one has to wrap
them in |"|.
-\begin{math-function}{anglebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand
+\begin{math-function}{extanglebetween("\mvar{p1}", "\mvar{p2}")}\mathcompat{anglebetween}\mathcommand
Return the angle between the centers of the nodes \mvar{p1} and \mvar{p2}.
\end{math-function}
-\begin{math-function}{qanglebetween("\mvar{p}")}\mathcommand
+\begin{math-function}{extqanglebetween("\mvar{p}")}\mathcompat{qanglebetween}\mathcommand
Return the angle between the origin and the center of the node \mvar{p}.
\end{math-function}
-\begin{math-function}{distancebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand
+\begin{math-function}{extdistancebetween("\mvar{p1}", "\mvar{p2}")}\mathcompat{distancebetween}\mathcommand
Return the distance (in pt) between the centers of the nodes \mvar{p1} and \mvar{p2}.
\end{math-function}
-\begin{math-function}{qdistancebetween("\mvar{p}")}\mathcommand
+\begin{math-function}{extqdistancebetween("\mvar{p}")}\mathcompat{qdistancebetween}\mathcommand
Return the distance (in pt) between the origin and the center of the node \mvar{p}.
\end{math-function}
@@ -125,9 +125,9 @@
\path (0,0) coordinate (A) + (0:4) coordinate (B) +(75:4) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
\foreach \cnt in {1,...,4}{
- \pgfmathsetmacro\triA{distancebetween("B","C")}
- \pgfmathsetmacro\triB{distancebetween("C","A")}
- \pgfmathsetmacro\triC{distancebetween("A","B")}
+ \pgfmathsetmacro\triA{extdistancebetween("B","C")}
+ \pgfmathsetmacro\triB{extdistancebetween("C","A")}
+ \pgfmathsetmacro\triC{extdistancebetween("A","B")}
\path (barycentric cs:A=\triA,B=\triB,C=\triC) coordinate (M)
node [draw, circle through=($(A)!(M)!(C)$)] (M) {};
\draw ($(C)-(A)$) coordinate (vecB)
@@ -142,35 +142,17 @@
This library loads also most of the functions of the
\referencePackageandIndex{pgffor-ext} of section~\ref{pkg:pgffor-ext}
on page~\pageref{pkg:pgffor-ext}.
-%Instead of |\foreach \var in {start, start + delta, ..., end}| one can use
-%|\foreach \var[use int=start to end step delta]|.
-%
-%\begin{key}{/pgf/foreach/use int=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}}
-%The values \meta{start}, \meta{end} and \meta{delta} are evaluates by \pgfname math at initialization.
-%The part |step |\meta{delta} is optional (\meta{delta} = 1).
-%\end{key}
-%
-%\begin{key}{/pgf/foreach/use float=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}}
-%Same as above, however the results are not truncated.
-%\end{key}
-%TODO: edges to and edges through
-%\pagebreak
-
\subsection{\pgfname keys}
\begin{pgfkeyslibrary}{ext.pgfkeys-plus}
This extends \pgfname keys and adds helpful |/utils| keys as well as handlers.
- This library gets loaded by the |ext.misc| library.%
- \footnote{\texttt{\string\usepgfkeyslibrary} is an upcoming feature of \pgfname/\tikzname.
- For now, you need to load \texttt{ext.misc}
- or manually \texttt{\string\input} the file \texttt{pgfkeyslibraryext.pgfkeys-plus.code.tex}
- with \texttt{@} being a letter.}
+ This library gets loaded by the |ext.misc| library.
\end{pgfkeyslibrary}
\begin{multicols}{2}
\subsubsection{Conditionals}
-\begin{key}{/utils/if=\marg{cond}\marg{true}\opt{\marg{false}}}
+\begin{key}{/\utilsext/pgfmath if=\marg{cond}\marg{true}\opt{\marg{false}}}{\def\myname{if}\keycompat{utils}}
This key checks the conditional \meta{cond} and applies the styles \meta{true}
if \meta{cond} is true, otherwise \meta{false}.
\meta{cond} can be anything that \pgfname math understands.
@@ -182,7 +164,7 @@
The following keys use \TeX' macros |\if|, |\ifx|, |\ifnum| and |\ifdim| for faster
executions.
-\begin{key}{/utils/TeX/if=\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}
+\begin{key}{/\utilsext/if=\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}\keycompat{utils/TeX}
This key checks via |\if| if \meta{token A} matches \meta{token B}
and applies the styles \meta{true} if it does, otherwise \meta{false}.
@@ -190,11 +172,11 @@
actually optional.
\end{key}
-\begin{key}{/utils/TeX/ifx=\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}
+\begin{key}{/\utilsext/ifx=\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}\keycompat{utils/TeX}
As above but via |\ifx|.
\end{key}
-\begin{key}{/utils/TeX/ifnum=\marg{num cond}\marg{true}\opt{\marg{false}}}
+\begin{key}{/\utilsext/ifnum=\marg{num cond}\marg{true}\opt{\marg{false}}}\keycompat{utils/TeX}
This key checks |\ifnum|\meta{num cond}
and applies the styles \meta{true} if true, otherwise \meta{false}.
A delimiting |\relax| will be inserted after \meta{num cond}.
@@ -203,15 +185,15 @@
actually optional.
\end{key}
-\begin{key}{/utils/TeX/ifdim=\meta{dim cond}\meta{true}\opt{\meta{false}}}
+\begin{key}{/\utilsext/ifdim=\meta{dim cond}\meta{true}\opt{\meta{false}}}\keycompat{utils/TeX}
As above but with |\ifdim|.
\end{key}
-\begin{key}{/utils/TeX/ifempty=\meta{Text}\meta{true}\opt{\meta{false}}}
+\begin{key}{/\utilsext/ifempty=\meta{Text}\meta{true}\opt{\meta{false}}}\keycompat{utils/TeX}
This checks whether \meta{Text} is empty and applies styles \meta{true} if true,
otherwise \meta{false}.
\end{key}
-\begin{key}{/utils/TeX/ifxempty=\meta{Text}\meta{true}\opt{\meta{false}}}
+\begin{key}{/\utilsext/ifxempty=\meta{Text}\meta{true}\opt{\meta{false}}}\keycompat{utils/TeX}
This checks whether fully expanded \meta{Text} is empty and applies styles \meta{true} if true,
otherwise \meta{false}.
\end{key}
@@ -221,71 +203,71 @@
While already a lot of values given to keys are evaluated by \pgfname math at some point,
not all of them are.
-\begin{handler}{{.pgfmath}|=|\meta{eval}}
+\begin{ext_handler}{{pgfmath}|=|\meta{eval}}\handlercompat{.pgfmath}
This handler evaluates \meta{eval} before it is handed to the key.
This handler works almost the same as the |.evaluated|\indexHandlerO{.evaluated}
handler but it does its evaluation in a group so that the result will
not overwrite any other results.
-\end{handler}
+\end{ext_handler}
-\begin{handler}{{.pgfmath int}|=|\meta{eval}}
+\begin{ext_handler}{{pgfmath int}|=|\meta{eval}}\handlercompat{.pgfmath int}
As above but truncates the result.
-\end{handler}
+\end{ext_handler}
-\begin{handler}{{.pgfmath wrap}|=|\marg{wrapper}\marg{eval}}
+\begin{ext_handler}{{pgfmath wrap}|=|\marg{wrapper}\marg{eval}}\handlercompat{.pgfmath wrap}
This feeds the result of \meta{eval} as |#1| to \meta{wrapper}.
In the example below, one could have used the \referenceKeyandIndexO[/pgf/foreach/]{evaluate}
key from the |\foreach| loop.
-\begin{codeexample}[width=3.7cm,preamble=\usetikzlibrary{ext.pgfkeys-plus}]
+\begin{codeexample}[width=3.7cm,preamble=\usepgfkeyslibrary{ext.pgfkeys-plus}]
\tikz\foreach \i in {0,10,...,100}
\draw[
line width=+.25cm,
% needs ## because its inside the \foreach body
- color/.pgfmath wrap={red!##1!blue}{sqrt(\i)*10}
+ color/.ext_pgfmath wrap={red!##1!blue}{sqrt(\i)*10}
]
(0,\i/40) -- +(right:3);
\end{codeexample}
-\end{handler}
+\end{ext_handler}
-\begin{handler}{{.pgfmath if}|=|\marg{cond}\marg{true}\opt{\marg{false}}}
+\begin{ext_handler}{{pgfmath if}|=|\marg{cond}\marg{true}\opt{\marg{false}}}\handlercompat{.pgfmath if}
Evaluates \meta{cond} with \pgfname Math and returns \meta{true} or \meta{false} to the used key respectively.
-\end{handler}
-\begin{handler}{{.if}|=|\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}
+\end{ext_handler}
+\begin{ext_handler}{{if}|=|\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}\handlercompat{.if}
Checks via |\if| if \meta{token A} matches \meta{token B}
and applies the value \meta{true} if it does, otherwise \meta{false}.
-\end{handler}
-\begin{handler}{{.ifx}|=|\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}
+\end{ext_handler}
+\begin{ext_handler}{{ifx}|=|\meta{token A}\meta{token B}\marg{true}\opt{\marg{false}}}\handlercompat{.ifx}
As above but via |\ifx|.
-\end{handler}
-\begin{handler}{{.ifnum}|=|\marg{ifnum cond}\marg{true}\opt{\marg{false}}}
+\end{ext_handler}
+\begin{ext_handler}{{ifnum}|=|\marg{ifnum cond}\marg{true}\opt{\marg{false}}}\handlercompat{.ifnum}
Checks via |\ifnum| if \meta{ifnum cond}
and applies the value \meta{true} if it does, otherwise \meta{false}.
-\end{handler}
-\begin{handler}{{.ifdim}|=|\marg{ifdim cond}\marg{true}\opt{\marg{false}}}
+\end{ext_handler}
+\begin{ext_handler}{{ifdim}|=|\marg{ifdim cond}\marg{true}\opt{\marg{false}}}\handlercompat{.ifdim}
As above but via |\ifdim|.
-\end{handler}
-\begin{handler}{{.ifxempty}|=|\marg{Text}\marg{true}\opt{\marg{false}}}
+\end{ext_handler}
+\begin{ext_handler}{{ifxempty}|=|\marg{Text}\marg{true}\opt{\marg{false}}}\handlercompat{.ifxempty}
Checks whether a fully expanded \meta{Text} is empty
and applies the value \meta{true} if it does, otherwise \meta{false}.
-\end{handler}
-\begin{handler}{{.ifempty}|=|\marg{Text}\marg{true}\opt{\marg{false}}}
+\end{ext_handler}
+\begin{ext_handler}{{ifempty}|=|\marg{Text}\marg{true}\opt{\marg{false}}}
Checks whether \meta{Text} is empty
and applies the value \meta{true} if it does, otherwise \meta{false}.
-\end{handler}
-\begin{handler}{{.List}|=|\marg{\meta{e1}, \meta{e2}, \dots, \meta{en}}}
+\end{ext_handler}
+\begin{ext_handler}{{List}|=|\marg{\meta{e1}, \meta{e2}, \dots, \meta{en}}}\handlercompat{.List}
This handler evaluates the given list with |\foreach| and concatenates the element and
the result is then given to the used key.
-\end{handler}
+\end{ext_handler}
\end{multicols}
\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{fit,ext.misc}]
\begin{tikzpicture}[nodes={draw, dashed, inner sep=+10pt}]
\foreach \point [count=\cnt] in {(0,0), (0,2), (2,0), (2,2), (3,3), (-1,-1)}
\node[circle, fill, inner sep=1pt, text=white] (point-\cnt) at \point {\cnt};
- \node[gray, fit/.List={(point-1),(point-...),(point-4)}] {};
- \node[red, fit/.List={(point-1),(point-...),(point-5)}] {};
- \node[blue, fit/.List={(point-1),(point-...),(point-6)}] {};
+ \node[gray, fit/.ext_List={(point-1),(point-...),(point-4)}] {};
+ \node[red, fit/.ext_List={(point-1),(point-...),(point-5)}] {};
+ \node[blue, fit/.ext_List={(point-1),(point-...),(point-6)}] {};
\end{tikzpicture}
\end{codeexample}
@@ -292,12 +274,12 @@
\pagebreak
\subsection{\tikzname}
\begin{multicols}{2}
-\begin{key}{/tikz/reverse clip=\meta{direction} (default counter clockwise)}
+\begin{key}{/\tikzext/reverse clip=\meta{direction} (default counter clockwise)}\keycompat{tikz}
This key installs a very big rectangle which is either constructed
\texttt{counter clockwise} (like the \referencePathOperationandIndexO{circle}
path operation) or |clockwise|.
\end{key}
-\begin{key}{/tikz/clip rule=\meta{direction} (default even odd)}
+\begin{key}{/\tikzext/clip rule=\meta{direction} (default even odd)}\keycompat{tikz}
This key switches directly\footnote{%
Meaning, it directly executes
\referenceCommandandIndexO{\pgfseteorule}/%
@@ -310,16 +292,17 @@
\referenceKeyandIndexO{nonzero rule} keys.
\end{key}
\end{multicols}
+\begingroup\catcode`\&=\active
\begin{codeexample}[preamble=\usetikzlibrary{ext.misc},width=6cm]
\newcommand*\myDiagram[1]{
\fill[left color=blue, right color=green] (0, 0) rectangle (2, 1);
- \clip (1, .5) #1 [reverse clip];
+ \clip (1, .5) #1 [ext/reverse clip];
\fill[left color=green, right color=blue] (0, 0) rectangle (2, 1);
}
\begin{tikzpicture}[radius=.4, row sep=5mm, column sep=5mm]
\matrix[
- row 2/.append style={clip rule=even odd},
- column 1/.append style={reverse clip/.default=clockwise}
+ row 2/.append style={ext/clip rule=even odd},
+ column 1/.append style={ext/reverse clip/.default=clockwise}
]{
\myDiagram{circle[]} &
\myDiagram{+(0:.4) arc[start angle=0, delta angle=-360] -- cycle}
@@ -329,4 +312,5 @@
\\};
\end{tikzpicture}
\end{codeexample}
+\endgroup
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -14,41 +14,48 @@
This uses the hook \referenceKeyandIndexO{execute at end picture} to write the nodes'
measurements to the \filetype{aux} file.
- Unfortunately, this does not work with the |external| library.\indexLibraryO{external}%
- \footnote{First of all, I can't figure out how to use the \textsc{aux} file during externalization since it gets written to the \textsc{log} instead.
- And then there's the question about how \texttt{external} would notice the need to export the picture again until it's stable \dots}
-
\inspiration{NodeFam-Q}{NodeFam-A}
-
\end{tikzlibrary}
Before we get to the interesting keys, a common prefix can be set for the families' names.
Initially this is |\pgfpictureid-| so that families of different pictures don't interact.
-\begin{key}{/tikz/node family/prefix=\meta{prefix}(initially \string\pgfpictureid-)}
-The family names are prefixed with the value of |/tikz/node family/prefix|.
+\begin{key}{/\tikzext/node family/prefix=\meta{prefix}(initially \string\pgfpictureid-)}
+\keycompat{tikz/node family}
+The family names are prefixed with the value of |/tikz/ext/node family/prefix|.
\end{key}
+\subsection{Externalization}
+As this library usually needs multiple compilations
+to produce stable pictures it is incompatible
+with the \referenceLibraryandIndexO{external} library.
+
+However, the library provides support for the
+\referencePackageandIndexO{memoize} \cite{memoize} package.
\subsection{Text Box}
\label{ssec:nf-text}
The following keys~-- when setup, see below~-- work with every shape with one single node part.%
\footnote{Technically, it will also work with shapes with multiple node parts but it will only affect the main node part.}
Initially though, only \referenceShapeandIndexO{circle} and \referenceShapeandIndexO{rectangle} are set up that way.
-\begin{key}{/tikz/node family/text height=\meta{name} (initially \{\})}
+\begin{key}{/\tikzext/node family/text height=\meta{name} (initially \{\})}
+\keycompat{tikz/node family}
Nodes with the same \meta{name} will have the same text height.
An empty \meta{name} disables the evaluation by the library.
\end{key}
-\begin{key}{/tikz/node family/text depth=\meta{name} (initially \{\})}
+\begin{key}{/\tikzext/node family/text depth=\meta{name} (initially \{\})}
+\keycompat{tikz/node family}
Nodes with the same \meta{name} will have the same text depth.
An empty \meta{name} disables the evaluation by the library.
\end{key}
-\begin{key}{/tikz/node family/text width=\meta{name} (initially \{\})}
+\begin{key}{/\tikzext/node family/text width=\meta{name} (initially \{\})}
+\keycompat{tikz/node family}
Nodes with the same \meta{name} will have the same text width.
An empty \meta{name} disables the evaluation by the library.
\end{key}
-\begin{key}{/tikz/node family/text=\meta{name}}
+\begin{key}{/\tikzext/node family/text=\meta{name}}
+\keycompat{tikz/node family}
Sets |text height|, |text depth| and |text width|.
\end{key}
@@ -56,12 +63,12 @@
the previous key only extends the width of that box which would make the text
seem as if it where aligned to the left.
With |text width family align| this can changed.
-\begin{key}{/tikz/node family/text width align=\meta{alignment}(initially center)}
+\begin{key}{/\tikzext/node family/text width align=\meta{alignment}(initially center)}
\meta{alignment} is one of |left|, |center| or |right|.
\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm]
\tikzexternaldisable % ext.node-families does not work with active externalization
-\begin{tikzpicture}[nodes={rectangle, draw, node family={text width=manual, text width align=right}}]
+\begin{tikzpicture}[nodes={rectangle, draw, ext/node family={text width=manual, text width align=right}}]
\node (a) {Foo};
\node[below=of a] (b) {Foobar};
\end{tikzpicture}
@@ -68,7 +75,8 @@
\end{codeexample}
\end{key}
-\begin{key}{/tikz/node family/setup shape=\meta{shape}}
+\begin{key}{/\tikzext/node family/setup shape=\meta{shape}}
+\keycompat{tikz/node family}
This adds instructions to the \meta{shape}'s definition which
adjust the text box's dimensions according to the family.
@@ -81,23 +89,26 @@
differently for the node's total dimension.
For this, the following keys are necessary.
-When one of the keys are used the values of |minimum width| and/or |minimum height| are set to |nf_width| or |nf_height| respectively.
-\begin{key}{/tikz/node family/width=\meta{name} (initially \{\})}
+When one of the keys are used the values of |minimum width| and/or |minimum height| are set to |ext_nf_width| or |nf_height| respectively.
+\begin{key}{/\tikzext/node family/width=\meta{name} (initially \{\})}
+\keycompat{tikz/node family}
Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum width}.
An empty \meta{name} disables the evaluation by the library.
\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm]
\tikzexternaldisable % ext.node-families does not work with active externalization
-\begin{tikzpicture}[nodes={rectangle, draw, node family/width=manual}]
+\begin{tikzpicture}[nodes={rectangle, draw, ext/node family/width=manual}]
\node (a) {Foo};
\node[below=of a] (b) {Foobar};
\end{tikzpicture}
\end{codeexample}
\end{key}
-\begin{key}{/tikz/node family/height=\meta{name} (initially \{\})}
+\begin{key}{/\tikzext/node family/height=\meta{name} (initially \{\})}
+\keycompat{tikz/node family}
Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum height}.
An empty \meta{name} disables the evaluation by the library.
\end{key}
-\begin{key}{/tikz/node family/size=\meta{name}}
+\begin{key}{/\tikzext/node family/size=\meta{name}}
+\keycompat{tikz/node family}
Sets both |height| and |width|.
\end{key}
@@ -104,8 +115,8 @@
\clearpage
\subsection{More shapes that support the keys \texttt{width} and \texttt{height}}
\begin{tikzlibrary}{ext.node-families.shapes.geometric}
- This library adds support for the keys \referenceKeyandIndex[/tikz/node family/]{width} and
- \referenceKeyandIndex[/tikz/node family/]{height} for the shapes of
+ This library adds support for the keys \referenceKeyandIndex[/\tikzext/node family/]{width} and
+ \referenceKeyandIndex[/\tikzext/node family/]{height} for the shapes of
the \pgfname\space library \referenceLibraryandIndexO{shapes.geometric}.
\inspirationQ{NodeFam-Ellipse}
@@ -116,7 +127,7 @@
\tikzexternaldisable % ext.node-families does not work with active externalization
\begin{tikzpicture}
\foreach \cnt[count=\Cnt] in {a,...,h}
- \node[draw, diamond, node family/text=aTOh] (\cnt)
+ \node[draw, diamond, ext/node family/text=aTOh] (\cnt)
at (right:\Cnt) {\cnt};
\draw[help lines] (a.south) -- (h.south) (a.north) -- (h.north) (a.base-|a.west) -- (h.base-|h.east);
\end{tikzpicture}
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-nodes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-nodes.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-nodes.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -17,7 +17,8 @@
\begin{multicols}{2}
\subsection{Pic as a node}
-\begin{key}{/tikz/pic=\opt{\meta{boolean}} (default true, initially false)}
+\begin{key}{/\tikzext/pic=\opt{\meta{boolean}} (default true, initially false)}
+\keycompat{tikz}
This key allows one to use a pic where usually only nodes are accepted,
for example as a label.
\begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, ext.misc}]
@@ -26,10 +27,10 @@
( 2pt,-1.5pt)--(-2pt,-.5pt);}]
\node[
draw, minimum width=3cm, minimum height=1cm,
- label={[pic ] east:slsl},
- label={[pic, rotate= 90]north:slsl},
- label={[pic ] west:slsl},
- label={[pic, rotate=-90]south:slsl}]{};
+ label={[ext/pic ] east:slsl},
+ label={[ext/pic, rotate= 90]north:slsl},
+ label={[ext/pic ] west:slsl},
+ label={[ext/pic, rotate=-90]south:slsl}]{};
\end{tikzpicture}
\end{codeexample}
\end{key}
@@ -48,7 +49,8 @@
\subsubsection{Nodes on Lines}
-\begin{stylekey}{/tikz/node on line=\opt{\meta{anchor specification}} (default |\{\}|)}
+\begin{stylekey}{/\tikzext/node on line=\opt{\meta{anchor specification}} (default |\{\}|)}
+\keycompat{tikz}
This installs a \referenceKeyandIndexO{to path} that places \emph{one}
node along a straight line but connect the line with it.
@@ -61,7 +63,8 @@
It allows one or two anchors divided by | and | to be specified.
\end{stylekey}
-\begin{stylekey}{/tikz/nodes on line}
+\begin{stylekey}{/\tikzext/nodes on line}
+\keycompat{tikz}
This is similar to the previous key but allows
multiple nodes to be placed on a straight line
\emph{if} they are in the correct order (from start to target),
@@ -72,13 +75,13 @@
\begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, quotes}]
\tikz[inner sep=.15em, circle, nodes=draw, sloped]
- \draw[ultra thick, ->, node on line] (0,0) to["0"] (1,1)
- to["1"] (2,0)
- to[nodes on line, "2.1" near start, "2.2", "2.3" near end] (5,1);
+ \draw[ultra thick, ->, ext/node on line] (0,0) to["0"] (1,1)
+ to["1"] (2,0)
+ to[ext/nodes on line, "2.1" near start, "2.2", "2.3" near end] (5,1);
\end{codeexample}
\begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, quotes}]
\tikz[inner sep=.15em, nodes=draw]
- \draw[thick, ->, node on line=west and east]
+ \draw[thick, ->, ext/node on line=west and east]
(0,0) to["0"] (1,1)
to["1"] (2,0)
to["2"] (4,1);
@@ -95,14 +98,16 @@
If you can, use \texttt{fill=\meta{bg color}}
instead of these keys, it will be much faster and easier.
-\begin{stylekey}{/tikz/nodes on curve=\meta{to path} (default line to)}
-Similar to \referenceKeyandIndex{nodes on line}, this key allows
+\begin{stylekey}{/\tikzext/nodes on curve=\meta{to path} (default line to)}
+\keycompat{tikz}
+Similar to |nodes on line|, this key allows
to have nodes on arbitrary paths.
This is not suitable for paths connecting nodes.
\end{stylekey}
-\begin{stylekey}{/tikz/nodes on curve'=\meta{to path} (default line to)}
+\begin{stylekey}{/\tikzext/nodes on curve'=\meta{to path} (default line to)}
+\keycompat{tikz}
As above but suitable for connecting nodes.
\end{stylekey}
@@ -110,7 +115,7 @@
\begin{tikzpicture}[ultra thick]
\node (A) at (0, 0) {A} ;
\node (B) at (3, 0) {B} ;
- \draw [red, ->, nodes on curve'=bend left]
+ \draw [red, ->, ext/nodes on curve'=bend left]
(A) to node[blue,draw]{label} (B)
to ["X" {sloped, near start},
"Z" {sloped, near end},
@@ -119,9 +124,110 @@
\end{codeexample}
\begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, intersections, quotes, spath3}]
\tikz[inner sep=.15em, circle, nodes={draw, green}, sloped, ultra thick]
- \draw[->, nodes on curve=bend left] (0,0) to["0"] (1,1)
- to["1"] (2,0)
- to["2" near start, "3", "4" near end] (4,1)
- -- ++(down:1);
+ \draw[->, ext/nodes on curve=bend left] (0,0) to["0"] (1,1)
+ to["1"] (2,0)
+ to["2" near start, "3", "4" near end] (4,1)
+ -- ++(down:1);
\end{codeexample}
+
+\newcolumn
+\subsection{Automatic placement of nodes}
+The \referenceKeyandIndexO{auto} key allows automatic placement of
+nodes along a path segment.
+This library extends this in various ways.
+
+\subsubsection{More than left and right}
+Besides |left| and |right| that are provided by \tikzname\
+the following placement mechanism are provided:
+\begin{itemize}
+\item |ext/left| will place a node to the left of the direction of the line,
+\item |ext/right| will place a node to the right of the direction of the line,
+\item |ext/above| will place a node towards the direction of the line,
+\item |ext/below| will place a node against the direction of the line,
+\item |ext/west| will place a node towards the left side of the paper,
+\item |ext/east| will place a node towards the right side of the paper,
+\item |ext/north| will place a node towards the upper side of the paper and
+\item |ext/south| will place a node twoards the lower side of the paper.
+\end{itemize}
+The placement mechanisms |ext/left| and |ext/right| are like the original
+|left| and |right| mechanisms but don't swap sides when \referenceKeyandIndexO{sloped}
+is used.
+
+Certain cases exist for |ext/west|, |ext/east|, |ext/north| and |ext/south| placements
+where it is not clear how a node should be placed.
+These cases and their behavior can be seen in figure~\ref{fig:autoplacements}.
+%\begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, ext.arrows}]
+\begin{figure*}
+\begin{center}
+\small
+\newcommand*\tikzauto[3]{%
+ \path[{ext_Centered Circle[black]}-Latex, auto=ext/#1, passive/.style={gray, nodes=gray, behind path}]
+ (0,0) edge[#2] node {#1} (left:2) edge[#2] node {#1} (right:2)
+ edge[#3] node {#1} ( up:2) edge[#3] node {#1} ( down:2);}
+\tikz[x=+.75cm,y=+.75cm]\matrix[nodes=draw, row sep=5mm, column sep=5mm, ampersand replacement=\&]{
+ \tikzauto{west}{}{passive} \& \tikzauto{east}{}{passive} \\
+ \tikzauto{north}{passive}{} \& \tikzauto{south}{passive}{} \\};
+\end{center}
+\caption{Behavior of \texttt{ext/est}, \texttt{ext/east}, \texttt{ext/north} and \texttt{ext/south} in certain cases}
+\label{fig:autoplacements}
+\end{figure*}
+%\end{codeexample}
+
+\subsubsection{Offset}
+Nodes are usually placed with their border (including any |outer sep|)
+on the line.
+With the following option, a node will be shifted a certain offset distance.
+
+\begin{key}{/\tikzext/auto with offset=\opt{\meta{true or false}} (default true)}
+ This key activates the offset function.
+\end{key}
+\begin{key}{/\tikzext/auto offset (initially 1cm)}
+The offset distance itself.
+\end{key}
+
+For the \referenceDecorationandIndexO{brace} decoration,
+the following keys are provided which needs the
+\referenceLibraryandIndexO{decorations.pathreplacing} loaded before they
+can be used.
+\begin{key}{/\tikzext/nodes/install auto offset for brace decoration=\opt{\meta{distance}} (default 0pt)}
+This key installs the necessary customizations
+for the \referenceKeyandIndexO[/pgf/decoration/]{raise} key
+so that the given value is available as an offset.
+
+It also makes available the following keys.
+\begin{key}{/\tikzext/auto offset for brace decoration}
+This sets \referenceKeyandIndex[/\tikzext/]{auto offset} to
+\texttt{\textbackslash pgfdecorationsegmentamplitude+
+ (\textbackslash pgfkeysvalueof\{/pgf/decoration/raise\})}.
+\end{key}
+%\columnbreak
+\begin{stylekey}{/\tikzext/every brace node}
+Using this key on a node along a path that's decorated by the |brace| decoration
+will offset the node so that it will be placed at the tip of the brace.
+\end{stylekey}
+\end{key}
+
+\paragraph{Implementation note:}
+This redefines the keys \referenceKeyandIndexO{auto},
+\referenceKeyandIndexO{swap} and \referenceKeyandIndexO{sloped}.
+One can install custom auto placement rules by using the following key.
+\begin{key}{/\tikzext/nodes/install auto=\marg{left}\marg{right}}
+ This key defines \texttt{/tikz/auto/\meta{left}} which activates the auto placement
+ and installs the appropriate placement function.
+ Further more, the key \texttt{/tikz/swap/\meta{left}} will be defined
+ to active the \meta{right} placement function.
+
+ The key |/tikz/swap| has been defined to apply \texttt{/tikz/swap/\meta{dir}}
+ where \meta{dir} is the current placement function.
+\end{key}
+\subsubsection{Precise placement}
+The default behavior of the |auto| placement mechanism is
+to snap to one of the eight compass directions.
+\begin{key}{/\tikzext/precise auto angle=\opt{\meta{true or false}} (default true)}
+With this option set to |true|, the |auto| placement won't snap
+to one of the eight compass directions.
+
+This key disables the \referenceKeyandIndexO{sloped} option
+which in turn will disable this option.
+\end{key}
\end{multicols}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -14,7 +14,7 @@
\begin{tikzlibrary}{ext.paths.arcto}
This library adds the new path operation |arc to| that specifies an arc \emph{to} a point~--
without the user having to specify any angles.
-\end{tikzlibrary}
+\end{tikzlibrary}%\currentLibrary{paths.arcto}
\begin{codeexample}[width=.5\linewidth,preamble=\usetikzlibrary{ext.paths.arcto}]
\begin{tikzpicture}[ultra thick,dot/.style={label={#1}}]
@@ -46,6 +46,7 @@
\end{codeexample}
\begin{pathoperation}{arc to}{\opt{\oarg{options}}\meta{coordinate or cycle}}
+\begin{multicols}{2}
When this operation is used, the path gets extended by an arc that goes through
the current point and \meta{coordinate}.
@@ -53,45 +54,45 @@
these two points. Which one of these is constructed is determined by the following
options that can be used inside of \meta{options}.
-\begin{stylekey}{/tikz/arc to/clockwise}
+\begin{stylekey}{/\tikzext/arc to/clockwise}
This constructs an arc that goes clockwise.
\end{stylekey}
-\begin{stylekey}{/tikz/arc to/counter clockwise}
+\begin{stylekey}{/\tikzext/arc to/counter clockwise}
This constructs an arc that goes counter clockwise.
This is the default.
\end{stylekey}
-\begin{stylekey}{/tikz/arc to/large}
+\begin{stylekey}{/\tikzext/arc to/large}
This constructs an arc whose angle is larger than $180^\circ$.
\end{stylekey}
-\begin{stylekey}{/tikz/arc to/small}
+\begin{stylekey}{/\tikzext/arc to/small}
This constructs an arc whose angle is smaller than $180^\circ$.
\end{stylekey}
-\begin{key}{/tikz/arc to/rotate=\meta{degree}}
+\begin{key}{/\tikzext/arc to/rotate=\meta{degree}}
Rotates the arc by \meta{degree}.
This is only noticeable when |x radius| and |y radius| are different.
\end{key}
-\begin{key}{/tikz/arc to/x radius=\meta{value}}
+\begin{key}{/\tikzext/arc to/x radius=\meta{value}}
This forwards the \meta{value} to \referenceKeyandIndexO{x radius}.
Its \meta{value} is used for the radius of the arc.
\end{key}
-\begin{key}{/tikz/arc to/y radius=\meta{value}}
+\begin{key}{/\tikzext/arc to/y radius=\meta{value}}
This forwards the \meta{value} to \referenceKeyandIndexO{y radius}.
Its \meta{value} is used for the radius of the arc.
\end{key}
-\begin{key}{/tikz/arc to/radius=\meta{value}}
+\begin{key}{/\tikzext/arc to/radius=\meta{value}}
This forwards the \meta{value} to both |/tikz/x radius| and |/tikz/y radius|.
Its \meta{value} is used for radius of the arc.
\end{key}
-\begin{stylekey}{/tikz/every arc to}
+\begin{stylekey}{/\tikzext/every arc to}
After |/tikz/every arc| this will also be applied before any \meta{options} are set.
\end{stylekey}
@@ -107,4 +108,6 @@
The |arc to| path operation will also work only in the |canvas| coordinate system.
The lengths of the vectors $(1, 0)$ and $(0, 1)$ will be used for the calculation of the radii
but no further consideration is done.
-\end{pathoperation}
\ No newline at end of file
+\end{multicols}
+\end{pathoperation}
+%\noLibrary
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -33,12 +33,12 @@
This operation means ``first horizontal, then vertical and then horizontal again''.
\end{pathoperation}
}
-\begin{key}{/tikz/ortho/ratio=\meta{ratio} (initially 0.5)}
+\begin{key}{/\tikzext/ortho/ratio=\meta{ratio} (initially 0.5)}\keycompat{tikz/ortho}
This sets the ratio for the middle part of the Zig-Zag connection.
For values $\meta{ratio} < 0$ and $\meta{ratio} > 1$ the Zig-Zag lines will
look more like Zig-Zig lines.
-\begin{codeexample}[preamble=\usetikzlibrary{paths.ortho}]
+\begin{codeexample}[preamble=\usetikzlibrary{ext.paths.ortho}]
\begin{tikzpicture}[very thick, rounded corners]
\draw[help lines] (-.25, -1.25) grid (2.25, 1.25);
\draw (0, 0) -|- (2, 1) --
@@ -47,7 +47,7 @@
\end{codeexample}
\end{key}
%TODO: hvvh/distance needs fixing, maybe?
-\begin{key}{/tikz/ortho/distance=\meta{distance}}
+\begin{key}{/\tikzext/ortho/distance=\meta{distance}}\keycompat{tikz/ortho}
This sets the distance between the start point
and the middle part of the Zig-Zag connection.
@@ -64,7 +64,7 @@
\end{tikzpicture}
\end{codeexample}
\end{key}
-\begin{key}{/tikz/ortho/from center=\opt{\meta{true or false}} (default true)}
+\begin{key}{/\tikzext/ortho/from center=\opt{\meta{true or false}} (default true)}\keycompat{tikz/ortho}
When nodes get connected the placement of the middle part of the Zig-Zag
and the Zig-Zig (see below) connections will be calculated from the border
of these nodes.
@@ -74,12 +74,12 @@
New timers are setup for both the Zig-Zag and the Zig-Zig connections,
these can be configured through the following keys.
-\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{paths.ortho}]
+\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.paths.ortho}]
\tikz \draw (0,0) -|- (2,3)
foreach \p in {0.0, 0.25, 0.5, 0.75, 1.0}{
node [pos=\p] {\p}};
\end{codeexample}
-\begin{key}{/tikz/ortho/spacing=\meta{number} (initially 4)}
+\begin{key}{/\tikzext/ortho/spacing=\meta{number} (initially 4)}\keycompat{tikz/ortho}
Unless $\meta{number} = 0$ is set
\begin{itemize}
\item |pos = 0| will be at the start,\indexKeyO{pos}
@@ -98,7 +98,7 @@
\item |pos = .5| will still be in the middle of the middle part of the connection.
\end{itemize}
\end{key}
-\begin{key}{/tikz/ortho/middle 0 to 1}
+\begin{key}{/\tikzext/ortho/middle 0 to 1}\keycompat{tikz/ortho}
This is an alias for |spacing = 0|.
\end{key}
@@ -105,31 +105,31 @@
\subsection{Zig-Zig}
\begin{pathoperation}{r-ud}{\opt{\oarg{options}}\meta{coordinate or cycle}}
This operation means ``first up, then horizontal and then down''.
- \begin{key}{/tikz/ortho/ud distance=\meta{length} (initially .5cm)}
+ \begin{key}{/\tikzext/ortho/ud distance=\meta{length} (initially .5cm)}\keycompat{tikz/ortho}
This sets the distance between the start and the horizontal line to \meta{length}.
\end{key}
\end{pathoperation}
\begin{pathoperation}{r-du}{\opt{\oarg{options}}\meta{coordinate or cycle}}
This operation means ``first down, then horizontal and then up''.
- \begin{key}{/tikz/ortho/du distance=\meta{length} (initially .5cm)}
+ \begin{key}{/\tikzext/ortho/du distance=\meta{length} (initially .5cm)}\keycompat{tikz/ortho}
This sets the distance between the start and the horizontal line to \meta{length}.
\end{key}
\end{pathoperation}
\begin{pathoperation}{r-lr}{\opt{\oarg{options}}\meta{coordinate or cycle}}
This operation means ``left down, then vertical and then right''.
- \begin{key}{/tikz/ortho/lr distance=\meta{length} (initially .5cm)}
+ \begin{key}{/\tikzext/ortho/lr distance=\meta{length} (initially .5cm)}\keycompat{tikz/ortho}
This sets the distance between the start and the vertical line to \meta{length}.
\end{key}
\end{pathoperation}
\begin{pathoperation}{r-rl}{\opt{\oarg{options}}\meta{coordinate or cycle}}
This operation means ``first right, then vertical and then down''.
- \begin{key}{/tikz/ortho/rl distance=\meta{length} (initially .5cm)}
+ \begin{key}{/\tikzext/ortho/rl distance=\meta{length} (initially .5cm)}\keycompat{tikz/ortho}
This sets the distance between the start and the vertical line to \meta{length}.
\end{key}
\end{pathoperation}
All distances can be set with one key.
-\begin{key}{/tikz/ortho/udlr distance=\meta{length}}
+\begin{key}{/\tikzext/ortho/udlr distance=\meta{length}}\keycompat{tikz/ortho}
Sets all the previous distances to the same value \meta{length}.
\end{key}
@@ -136,44 +136,59 @@
\subsection{Even more Horizontal and Vertical Lines}
The following keys can be used to access vertical and horizontal line path operations.
-\begin{stylekey}{/tikz/horizontal vertical}
+\begin{stylekey}{/\tikzext/horizontal vertical}\keycompat{tikz}
This installs \verb!to path = -| (\tikztotarget) \tikztonodes!\indexKeyO{to path}
that can be used with the path operations |to| or |edge|.
\end{stylekey}
-\begin{stylekey}{/tikz/vertical horizontal}
+\begin{stylekey}{/\tikzext/vertical horizontal}\keycompat{tikz}
This installs \verb!to path = |- (\tikztotarget) \tikztonodes!
that can be used with the path operations |to| or |edge|.
\end{stylekey}
-\begin{stylekey}{/tikz/horizontal vertical horizontal}
+\begin{stylekey}{/\tikzext/horizontal vertical horizontal=\opt{\meta{options}}}\keycompat{tikz}
This installs \verb!to path = -|- (\tikztotarget) \tikztonodes!
that can be used with the path operations |to| or |edge|.
\end{stylekey}
-\begin{stylekey}{/tikz/vertical horizontal vertical}
+\begin{stylekey}{/\tikzext/vertical horizontal vertical=\opt{\meta{options}}}\keycompat{tikz}
This installs \verb!to path = |-| (\tikztotarget) \tikztonodes!
that can be used with the path operations |to| or |edge|.
\end{stylekey}
-
+\begin{stylekey}{/\tikzext/up horizontal down=\opt{\meta{options}}}\keycompat{tikz}
+ This installs \verb!to path = r-ud (\tikztotarget) \tikztonodes!
+ that can be used with the path operations |to| or |edge|.
+\end{stylekey}
+\begin{stylekey}{/\tikzext/down horizontal up=\opt{\meta{options}}}\keycompat{tikz}
+ This installs \verb!to path = r-du (\tikztotarget) \tikztonodes!
+ that can be used with the path operations |to| or |edge|.
+\end{stylekey}
+\begin{stylekey}{/\tikzext/left vertical right=\opt{\meta{options}}}\keycompat{tikz}
+ This installs \verb!to path = r-lr (\tikztotarget) \tikztonodes!
+ that can be used with the path operations |to| or |edge|.
+\end{stylekey}
+\begin{stylekey}{/\tikzext/right vertical left=\opt{\meta{options}}}\keycompat{tikz}
+ This installs \verb!to path = r-rl (\tikztotarget) \tikztonodes!
+ that can be used with the path operations |to| or |edge|.
+\end{stylekey}
When connecting rectangular nodes, these keys could be useful as well.
They all need to be given to a |to| or |edge| path operation.
-\begin{stylekey}{/tikz/only vertical second=\opt{\meta{length}} (default 0pt)}
+\begin{stylekey}{/\tikzext/only vertical second=\opt{\meta{length}} (default 0pt)}\keycompat{tikz}
This draws a vertical line from the start point to the target point so that
it connects to the target point in the center (or at its border in case it is a node).
The optional \meta{length} can be used to shift the line orthogonally to its direction.
\end{stylekey}
-\begin{stylekey}{/tikz/only horizontal second=\opt{\meta{length}} (default 0pt)}
+\begin{stylekey}{/\tikzext/only horizontal second=\opt{\meta{length}} (default 0pt)}\keycompat{tikz}
This draws a horizontal line from the start point to the target point so that
it connects to the target point in the center (or at its border in case it is a node).
The optional \meta{length} can be used to shift the line orthogonally to its direction.
\end{stylekey}
-\begin{stylekey}{/tikz/only vertical first=\opt{\meta{length}} (default 0pt)}
+\begin{stylekey}{/\tikzext/only vertical first=\opt{\meta{length}} (default 0pt)}\keycompat{tikz}
This draws a vertical line from the start point to the target point so that
it connects to the start point in the center (or at its border in case it is a node).
The optional \meta{length} can be used to shift the line orthogonally to its direction.
\end{stylekey}
-\begin{stylekey}{/tikz/only horizontal first=\opt{\meta{length}} (default 0pt)}
+\begin{stylekey}{/\tikzext/only horizontal first=\opt{\meta{length}} (default 0pt)}\keycompat{tikz}
This draws a horizontal line from the start point to the target point so that
it connects to the start point in the center (or at its border in case it is a node).
@@ -180,9 +195,9 @@
The optional \meta{length} can be used to shift the line orthogonally to its direction.
\end{stylekey}
-\pagebreak
+%\pagebreak
Since all previous key are rather cumbersome, one can install shortcuts for these.
-\begin{stylekey}{/tikz/ortho/install shortcuts}
+\begin{stylekey}{/\tikzext/ortho/install shortcuts}\keycompat{tikz/ortho}
Installs the following shortcuts:\\
{\ttfamily
\begin{tabular}{l@{\hspace{.5em}${}\to{}$\hspace{.5em}}l}
@@ -189,11 +204,15 @@
\pgfmanualbar- & vertical horizontal \\
-\pgfmanualbar & horizontal vertical \\
-\pgfmanualbar- & horizontal vertical horizontal \\
- \pgfmanualbar-\pgfmanualbar & vertical horizontal vertical \\
+ \pgfmanualbar-\pgfmanualbar & vertical horizontal vertical \\[.5em]
\pgfmanualbar* & only vertical first \\
*\pgfmanualbar & only vertical second \\
-* & only horizontal first \\
- *- & only horizontal second
+ *- & only horizontal second \\[.5em]
+ r-ud & up horizontal down \\
+ r-du & down horizontal up \\
+ r-lr & left vertical right \\
+ r-rl & right vertical left
\end{tabular}
}
\end{stylekey}
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -31,7 +31,8 @@
the starting coordinate in a counter-clockwise direction along the rectangle.
The corners will be at positions 0.0, 0.25, 0.5, 0.75 and 1.0.
-\begin{key}{/tikz/rectangle timer=|line| or |rectangle| (default |rectangle|)}
+\begin{key}{/\tikzext/rectangle timer=|line| or |rectangle|}
+\keycompat{tikz}
By default, the library activates the new (correct) timer for |rectangle|.
With |rectangle timer = line| the original line timer can be reinstated.
\end{key}
@@ -92,5 +93,4 @@
\draw[shift=(0:1)](-2,-2) cos (1,0) [mark nodes on line];
\end{tikzpicture}
\end{codeexample}
-
-\endinput
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -26,27 +26,27 @@
\item Using the ``image-pattern''.
\end{enumerate}
-\begin{command}{\pgfsetupimageaspattern\oarg{options}\marg{name}\marg{image}}
+\begin{command}{\tikzextsetupimageaspattern\oarg{options}\marg{name}\marg{image}}\cmdcompat{\pgfsetupimageaspattern}
\end{command}
-\begin{key}{/tikz/image as pattern=\meta{options} (default \{\})}
+\begin{key}{/\tikzext/image as pattern=\meta{options} (default \{\})}\keycompat{tikz}
\begin{codeexample}[preamble=\usetikzlibrary{ext.patterns.images,shapes.geometric}]
-\pgfsetupimageaspattern[width=.5cm]{grid}{example-image-1x1}
+\tikzextsetupimageaspattern[width=.5cm]{grid}{example-image-1x1}
\tikz \node[star, minimum size=3cm, draw,
- image as pattern={name=grid,options={left, bottom, y=-.5cm, rotate=45}}] {};
+ ext/image as pattern={name=grid, options={left, bottom, y=-.5cm, rotate=45}}] {};
\end{codeexample}
\end{key}
-\begin{key}{/tikz/image as pattern/name=\meta{name}}
+\begin{key}{/\tikzext/image as pattern/name=\meta{name}}\keycompat{tikz/image as pattern}
Specifies the name of the ``image-pattern'' to be used.
\end{key}
-\begin{stylekey}{/tikz/image as pattern/option}
+\begin{stylekey}{/\tikzext/image as pattern/option}\keycompat{tikz/image as pattern}
Options that will be used by the internal |\pgftext|,\indexCommandO{\pgftext}
only keys from |/pgf/text| should be used.\indexKeyO[/pgf/]{text}
\end{stylekey}
-\begin{stylekey}{/tikz/image as pattern/options=\meta{style}}
-Appends style |/tikz/image as pattern/option|.
-\end{stylekey}
\ No newline at end of file
+\begin{key}{/\tikzext/image as pattern/options=\meta{style}}\keycompat{tikz/image as pattern}
+Appends to style |/tikz/ext/image as pattern/option|.
+\end{key}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-pgffor.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-pgffor.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-pgffor.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -23,16 +23,16 @@
Instead of |\foreach \var in {start, start + delta, ..., end}| one can use
|\foreach \var[use int=start to end step delta]|.
-\begin{key}{/pgf/foreach/use int=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}}
+\begin{key}{/\pgfforeachext/use int=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}}\keycompat{pgf/foreach}
The values \meta{start}, \meta{end} and \meta{delta} are evaluates by \pgfname math at initialization.
The part |step |\meta{delta} is optional (\meta{delta} = 1).
\end{key}
-\begin{key}{/pgf/foreach/use float=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}}
+\begin{key}{/\pgfforeachext/use float=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}}\keycompat{pgf/foreach}
Same as above, however the results are not truncated.
\end{key}
-\begin{key}{/pgf/foreach/no separator}
+\begin{key}{/\pgfforeachext/no separator}\keycompat{pgf/foreach}
This key disables any separator between elements of the list.
Every token is its own element. This also means that Unicode characters
need to be grouped between |{| and |}| if Lua\TeX\space isn't used.
@@ -43,11 +43,11 @@
\begin{tikzpicture}[#1]
\foreach[
count=\i from 0,
- no separator,
+ ext/no separator,
evaluate=\i as \colX using {mod(\i,#2)},
evaluate=\i as \rowY using {int(\i/#2)}
] \elem in {#3} {
- \draw[black, board/\elem/.try, rectangle timer/.try=line]
+ \draw[black, board/\elem/.try, ext/rectangle timer/.try=line]
(\colX,\rowY) rectangle node {\elem} ++(1, 1);}
\end{tikzpicture}}
\board[
@@ -59,7 +59,7 @@
\end{codeexample}
\end{key}
-\begin{key}{/pgf/foreach/normal list}
+\begin{key}{/\pgfforeachext/normal list}\keycompat{pgf/foreach}
This key simply disables all other special parsers and returns to the original list parser.
\end{key}
@@ -66,7 +66,7 @@
The following keys only work with \LaTeX\ and cannot be used when only the \referenceLibraryandIndex{ext.misc}
library or the plain\TeX\space |pgffor-ext.tex| are loaded.
For this, you will need to use |\usepackage{pgffor-ext}|.
-\begin{key}{/pgf/foreach/xparser=\marg{argument specification}\marg{foreach value}}
+\begin{key}{/\pgfforeachext/xparser=\marg{argument specification}\marg{foreach value}}\keycompat{pgf/foreach}
This key can be used to specify a \referencePackageandIndeXExt{xparse}
specification for each element in the list.
@@ -80,14 +80,16 @@
\end{itemize}
\end{key}
-\begin{key}{/pgf/foreach/xparser Om}
-Sets up a list whose elements may contain an optional argment inside |[]| which correspond to
+\begin{key}{/\pgfforeachext/xparser Om=\opt{default} (default \{\})}\keycompat{pgf/foreach}
+Sets up a list whose elements may contain an optional argument inside |[]| which correspond to
two |\foreach| variables, say |\Options/\Text|.
+The \opt{default} value is the default value if the optional argument is missing.
\end{key}
-\begin{handler}{{.list xparse}|=|\marg{argument specification}\marg{comma-separated list of values}}
+\begin{ext_handler}{{list xparse}|=|\marg{argument specification}\marg{comma-separated list of values}}%
+\handlercompat{.list xparse}
This handler causes the key to be used repeatedly, namely
once for every element of the list of values.
The \meta{comma-separated list of values} is processed using |\foreach|
and the given |xparse| \meta{argument specification} with the aforementioned |xparser| key.
-\end{handler}
\ No newline at end of file
+\end{ext_handler}
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -16,168 +16,138 @@
\end{tikzlibrary}
\subsection{Useful corner anchors}
-The anchors |corner north east|, |corner north west|, |corner south west| and |corner south east|
+The anchors |ext_corner north east|, |ext_corner north west|, |ext_corner south west| and |ext_corner south east|
are defined as ``generic anchors'', i.\,e. they are defined for all shapes.
This is mostly useful for the placement of circular shapes.
-\begin{stylekey}{/tikz/corner above left=\opt{\meta{specification}} (default 0pt)}
- Similar as \referenceKeyandIndexO{above left} of the \tikzname\space library |positioning|
- but uses the |corner north west| anchor.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner below left=\opt{\meta{specification}} (default 0pt)}
- Similar as \referenceKeyandIndexO{below left} of the \tikzname\space library |positioning|
- but uses the |corner south west| anchor.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner above right=\opt{\meta{specification}} (default 0pt)}
- Similar as \referenceKeyandIndexO{above right} of the \tikzname\space library |positioning|
- but uses the |corner north east| anchor.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner below right=\opt{\meta{specification}} (default 0pt)}
- Similar as \referenceKeyandIndexO{below right} of the \tikzname\space library |positioning|
- but uses the |corner south east| anchor.
-\end{stylekey}
-
-\begin{codeexample}[width=.6\linewidth,preamble=\usetikzlibrary{ext.positioning-plus}]
+\begin{codeexample}[width=.45\linewidth,preamble=\usetikzlibrary{ext.positioning-plus}]
\Huge
\begin{tikzpicture}
-\node[name=s,shape=circle,shape example]
+\node[name=s,shape=circle,shape example,scale=.75,outer sep=auto]
{Circle\vrule width 1pt height 2cm};
\foreach \anchor/\placement in {
- north west/above left, north/above, north east/above right,
+ north west/below right, north/above, north east/below left,
west/left, center/above, east/right,
mid west/right, mid/above, mid east/left,
base west/left, base/below, base east/right,
- south west/below left, south/below, south east/below right,
+ south west/above right, south/below, south east/above left,
text/left, 10/right, 130/above}
- \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
- node[\placement] {\scriptsize\texttt{(s.\anchor)}};
-\draw (s.corner north west) rectangle (s.corner south east);
+ \draw[node font=\scriptsize, shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
+ node[\placement] {\texttt{(s.\anchor)}};
+\draw (s.ext_corner north west) rectangle (s.ext_corner south east);
\foreach \anchor/\placement in {
- corner north west/above left, corner north east/above right,
- corner south west/below left, corner south east/below right}
- \draw[red,shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
- node[\placement] {\scriptsize\texttt{(s.\anchor)}};
+ corner north west/above, corner north east/above,
+ corner south west/below, corner south east/below}
+ \draw[node font=\scriptsize, red, shift=(s.ext_\anchor)] plot[mark=x] coordinates{(0,0)}
+ node[\placement] {\texttt{(s.ext\textunderscore\anchor)}};
\end{tikzpicture}
\end{codeexample}
+\clearpage
\subsection{Useful placement keys for vertical and horizontal alignment}
-\begin{stylekey}{/tikz/north left=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{left} but aligns the nodes at their |north| border.
+\begin{multicols}{2}
+\begin{keylist}[/\tikzext]{%
+ left=\opt{\meta{specification}} (default 0pt),
+ right=\opt{\meta{specification}} (default 0pt),
+ above=\opt{\meta{specification}} (default 0pt),
+ below=\opt{\meta{specification}} (default 0pt),
+ above left=\opt{\meta{specification}} (default 0pt),
+ below left=\opt{\meta{specification}} (default 0pt),
+ above right=\opt{\meta{specification}} (default 0pt),
+ below right=\opt{\meta{specification}} (default 0pt),
+ mid left=\opt{\meta{specification}} (default 0pt),
+ mid right=\opt{\meta{specification}} (default 0pt),
+ base left=\opt{\meta{specification}} (default 0pt),
+ base right=\opt{\meta{specification}} (default 0pt)%
+}
+ While the \meta{specification} of all these keys still accept the same form as with \tikzname,
+ the |ext.positioning-plus| library extends this even more.
- This is basically the same as |left=of reference.north west, anchor=north east|.
- %
-\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}]
+ The specification after |of| can contain a list of coordinates (like the |fit| key of the |fit| library).
+ This means that the new node will be placed in relation to a rectangular bounding box
+ that fits around all this nodes in the list.
+
+ If this list is prefixed with \verb!|!, |-| or |+|,
+ the new node will also have the same height (\verb!|!),
+ the same width (|-|) or both as this bounding box.
+
+\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}, width=.3\linewidth]
\begin{tikzpicture}[nodes=draw]
-\node[minimum height=2cm] (a) {};
-\node[minimum height=3cm, north right=of a] {};
+\node (A) {A} node[below=of A] (BCD) {BCD};
+\node[ext/right= of |(A)(BCD)] (c) {};
+\node[ext/below=.5:of -(A)(BCD)] (d) {};
+\draw[help lines] (BCD.south west) -- (c.south east)
+ (BCD.north east) -- (d.south east);
\end{tikzpicture}
\end{codeexample}
-\end{stylekey}
-\begin{stylekey}{/tikz/north right=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{right} but aligns the nodes at their |north| border.
- This is basically the same as |left=of reference.north east, anchor=north west|.
-\end{stylekey}
-\begin{stylekey}{/tikz/south left=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{left} but aligns the nodes at their |south| border.
-
- This is basically the same as |left=of reference.south west, anchor=south east|.
-\end{stylekey}
-\begin{stylekey}{/tikz/south right=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{right} but aligns the nodes at their |south| border.
-
- This is basically the same as |left=of reference.south east, anchor=south west|.
-\end{stylekey}
-\begin{stylekey}{/tikz/west above=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{above} but aligns the nodes at their |west| border.
-
- This is basically the same as |left=of reference.north west, anchor=south west|.
-\end{stylekey}
-\begin{stylekey}{/tikz/west below=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{below} but aligns the nodes at their |west| border.
-
- This is basically the same as |left=of reference.south west, anchor=north west|.
-\end{stylekey}
-\begin{stylekey}{/tikz/east above=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{above} but aligns the nodes at their |east| border.
-
- This is basically the same as |left=of reference.north east, anchor=south east|.
-\end{stylekey}
-\begin{stylekey}{/tikz/east below=\opt{\meta{specification}} (default 0pt)}
- Like \referenceKeyandIndexO{below} but aligns the nodes at their |east| border.
-
- This is basically the same as |left=of reference.south east, anchor=north east|.
-\end{stylekey}
+ As you maybe noticed in the example above, the \meta{specification} also allows a prefix
+ delimited by |:| which the |node distance| will be multiplied to with for the placement.%
+ \footnote{This is probably more useful when \referenceKeyandIndexO{on grid} is used.}
+\end{keylist}
-The same exist for the recently introduces corner anchors, too.
-\begin{stylekey}{/tikz/corner north left=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/north left| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner north right=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/north right| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner south left=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/south left| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner south right=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/south right| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner west above=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/west above| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner west below=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/west below| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner east above=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/east above| but uses the new corner anchors.
-\end{stylekey}
-\begin{stylekey}{/tikz/corner east below=\opt{\meta{specification}} (default 0pt)}
- The same as |/tikz/east below| but uses the new corner anchors.
-\end{stylekey}
+\newcolumn
+The |fit|ting functionality is also available without the placement.
+\begin{keylist}[/\tikzext]{%
+ fit bounding box=\meta{list of coordinates},
+ span vertical=\meta{list of coordinates},
+ span horizontal=\meta{list of coordinates},
+ span=\meta{list of coordinates}}
+These all create a rectangular node with the name |ext_fit bounding box|
+that encompasses the \meta{list of coordinates}.
-While the \meta{specification} of all these keys still accept the same form as with \tikzname,
-the |ext.positioning-plus| library extends this even more.
+The |span vertical| key will also set \referenceKeyandIndexO[/pgf/]{minimum height}
+to the height of this bounding box
-The specification after |of| can contain a list of coordinates
-(like the |fit| key of the |fit| library).
-This means that the new node will be placed in relation to a rectangular bounding box
-that fits around all this nodes in the list.
+The |span horizontal| key will also set \referenceKeyandIndexO[/pgf/]{minimum width}
+to the width of this bounding box
-If this list is prefixed with \verb!|!, |-| or |+|,
-the new node will also have the same height (\verb!|!),
-the same width (|-|) or both as this bounding box.
+The last one combines |span vertical| and |span horizontal|.
+\end{keylist}
+\begin{keylist}[/\tikzext]{%
+ north left=\opt{\meta{specification}} (default 0pt),
+ south left=\opt{\meta{specification}} (default 0pt),
+ north right=\opt{\meta{specification}} (default 0pt),
+ south right=\opt{\meta{specification}} (default 0pt),
+ west above=\opt{\meta{specification}} (default 0pt),
+ west below=\opt{\meta{specification}} (default 0pt),
+ east above=\opt{\meta{specification}} (default 0pt),
+ east below=\opt{\meta{specification}} (default 0pt)%
+}
+ These work similarly to |left|, |right|, |above| and |below|
+ but they are north- or south-aligned.
+
\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}]
\begin{tikzpicture}[nodes=draw]
-\node (A) {A};
-\node[below=of A] (BCD) {BCD};
-\node[right=of |(A)(BCD)] (c) {};
-\node[below=.5:of -(A)(BCD)] (d) {};
-\draw[help lines] (BCD.south west) -- (c.south east)
- (BCD.north east) -- (d.south east);
+\node[minimum height=2cm] (a) {};
+\node[minimum height=3cm, ext/north right=of a] {};
\end{tikzpicture}
\end{codeexample}
+\end{keylist}
-This functionality is also available without the placement:
-\begin{stylekey}{/tikz/fit bounding box=\meta{list of coordinates}}
- Creates a rectangular node with the name |fit bounding box| that encompasses
- the \meta{list of coordinates}.
-\end{stylekey}
-\begin{stylekey}{/tikz/span vertical=\meta{list of coordinates}}
- Creates a rectangular node with the name |fit bounding box| that encompasses
- the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf/]{minimum height} to
- the height of this bounding box.
-\end{stylekey}
-\begin{stylekey}{/tikz/span horizontal=\meta{list of coordinates}}
- Creates a rectangular node with the name |fit bounding box| that encompasses
- the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf/]{minimum width} to
- the width of this bounding box.
-\end{stylekey}
-\begin{stylekey}{/tikz/span=\meta{list of coordinates}}
- Is a combination of |/tikz/span vertical| and |/tikz/span horizontal|.
-\end{stylekey}
+The same exist for the recently introduces corner anchors, too.
+\begin{keylist}[/\tikzext]{%
+ corner above left=\opt{\meta{specification}} (default 0pt),
+ corner below left=\opt{\meta{specification}} (default 0pt),
+ corner above right=\opt{\meta{specification}} (default 0pt),
+ corner below right=\opt{\meta{specification}} (default 0pt),
+ corner north left=\opt{\meta{specification}} (default 0pt),
+ corner south left=\opt{\meta{specification}} (default 0pt),
+ corner north right=\opt{\meta{specification}} (default 0pt),
+ corner south right=\opt{\meta{specification}} (default 0pt),
+ corner west above=\opt{\meta{specification}} (default 0pt),
+ corner west below=\opt{\meta{specification}} (default 0pt),
+ corner east above=\opt{\meta{specification}} (default 0pt),
+ corner east below=\opt{\meta{specification}} (default 0pt)%
+}
+ These work the same as |above left|, |below left|, \dots\
+ but they use the new generic corner anchors
+\end{keylist}
+\end{multicols}
+\endinput
-As you maybe noticed in the example above, the \meta{specification} also allows a prefix
-delimited by |:| which the |node distance| will be multiplied to with for the placement.%
-\footnote{This is probably more useful when \referenceKeyandIndexO{on grid} is used.}
-\endinput
\ No newline at end of file
+
+
+
+
Modified: 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 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-scalepicture.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -17,9 +17,10 @@
\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}.}
+If one of the keys below are used on a \tikzname\ picture, meaning
+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.
@@ -35,76 +36,99 @@
This will expand to |0pt| if the picture hasn't been measured before.
\end{command}
-\begin{stylekey}{/tikz/save picture size}
+\begin{stylekey}{/\tikzext/save picture size}\keycompat{tikz}
This key is usually used by the keys provided by this library.
Normally, this is not needed to be explicitly given.
\end{stylekey}
+
+\subsection{Externalization}
+As this library usually needs multiple compilations
+to produce stable pictures it is incompatible
+with the \referenceLibraryandIndexO{external} library.
+
+However, the library provides support for the
+\referencePackageandIndexO{memoize} \cite{memoize} package.
+When it is used the arguments to the keys below
+will be saved as the context of the memo.
+This means that the arguments need to be a valid
+\referenceCommandandIndexExt{\dimexpr} expression.
+
\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}}
+\begin{key}{/\tikzext/picture width=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/minimum picture width=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/maximum picture width=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/picture height=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/minimum picture height=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/maximum picture height=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/minimum picture size=\marg{width}\marg{height}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/maximum picture size=\marg{width}\marg{height}}\keycompat{tikz}
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.}
+\subsection{Changing the aspect ratio}
The following \emph{starred} keys do change the aspect ratio.
-\begin{key}{/tikz/picture width*=\meta{dimension}}
+\begin{key}{/\tikzext/picture width*=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/minimum picture width*=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/maximum picture width*=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/picture height*=\meta{dimension}}\keycompat{tikz}
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}}
+\begin{key}{/\tikzext/minimum picture height*=\meta{dimension}}\keycompat{tikz}
+ As above but will not change the size of the picture
+ if its height is greater than \meta{dimension}.
+\end{key}
+
+\begin{key}{/\tikzext/maximum picture height*=\meta{dimension}}\keycompat{tikz}
+ As above but will not change the size of the picture
+ if its height is less than \meta{dimension}.
+\end{key}
+
+\begin{key}{/\tikzext/picture size*=\marg{width}\marg{height}}\keycompat{tikz}
Scales the picture so that its width will be \meta{width}
and its height will be \meta{height}.
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -21,13 +21,14 @@
\coordinate[label=below left:$C$] (C) at (-2,-2);
\draw[ultra thick, draw=green, fill=green!50]
- (B) to[arc through={clockwise,(A)}] (C)
+ (B) to[ext/arc through={clockwise, (A)}] (C)
-- (arc through center) -- cycle;
\draw[ultra thick, draw=blue, fill=blue!50]
- (B) to[arc through=(A)] (C)
+ (B) to[ext/arc through=(A)] (C)
-- (arc through center) -- cycle;
-\foreach \p in {A,B,C, arc through center} \fill[red] (\p) circle[radius=2pt];
+\foreach \p in {A, B, C, arc through center}
+ \fill[red] (\p) circle[radius=2pt];
\end{tikzpicture}
\end{codeexample}
@@ -34,27 +35,27 @@
This can only by used for circles in the |canvas| coordinate system.
\begin{multicols}{2}
-\begin{key}{/tikz/arc through/through=\meta{coordinate} (initially {(0,0)})}
+\begin{key}{/\tikzext/arc through/through=\meta{coordinate} (initially {(0,0)})}\keycompat{tikz/arc through}
The coordinate on the circle that defines~-- together with the
starting and target point~-- a circle.
\end{key}
-\begin{key}{/tikz/arc through/center suffix=\meta{suffix} (initially {})}
+\begin{key}{/\tikzext/arc through/center suffix=\meta{suffix} (initially {})}\keycompat{tikz/arc trough}
The |arc through| will define a coordinate named |arc through center|\meta{suffix}
so that it can be referenced later.
\end{key}
-\begin{key}{/tikz/arc through/clockwise}
+\begin{key}{/\tikzext/arc through/clockwise}\keycompat{tikz/arc trough}
The resulting arc will go clockwise from the starting point to the target point.
This will not necessarily go through the |through| point.
\end{key}
-\begin{key}{/tikz/arc through/counter clockwise}
+\begin{key}{/\tikzext/arc through/counter clockwise}\keycompat{tikz/arc trough}
The resulting arc will go counter clockwise from the starting point to the target point.
This will not necessarily go through the |through| point.
\end{key}
-\begin{key}{/tikz/arc through=\meta{key-value}}
+\begin{key}{/\tikzext/arc through=\meta{key-value}}\keycompat{tikz/arc trough}
This key should be used with |to|\indexPathOperationO{to} or |edge|\indexPathOperationO{edge}.
A parameter other than |center suffix|, |clockwise| or |counter clockwise| will
be assumed to be the |through| coordinate.
Added: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.autobend.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.autobend.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.autobend.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -0,0 +1,82 @@
+% !TeX root = tikz-ext-manual.tex
+% !TeX spellcheck = en_US
+% Copyright 2023 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.
+%
+
+\section{Autobending}
+\label{library:topaths.autobend}
+\begin{tikzlibrary}{ext.topaths.autobend}
+ This library provides various bended |to| paths
+ that bend in the specified direction.
+
+ \inspiration{AutoBend-Q}{AutoBend-A}
+\end{tikzlibrary}
+
+The keys \referenceKeyandIndexO{bend left}
+and \referenceKeyandIndexO{bend left} from \tikzname\
+bend the requested curve in relation of the connecting
+coordinates/nodes.
+
+The keys provided by this library bend the curve in the direction relative
+to the paper (north, south, west and east) or relative to the current
+coordinate system (up, down, left and right).
+
+\begin{key}{/\tikzext/autobend north=\meta{angle} (default \normalfont last value)}
+ Works like the |bend left| and |bend right| options
+ but bends the curve to the top of the page (i.\,e. it ignores the current transformation).
+\end{key}
+\begin{key}{/\tikzext/autobend south=\meta{angle} (default \normalfont last value)}
+ Works like |autobend north| but bends the curve to the bottom of the page.
+\end{key}
+\begin{key}{/\tikzext/autobend west=\meta{angle} (default \normalfont last value)}
+ Works like |autobend north| but bends the curve to the left of the page.
+\end{key}
+\begin{key}{/\tikzext/autobend east=\meta{angle} (default \normalfont last value)}
+ Works like |autobend north| but bends the curve to the right of the page.
+\end{key}
+
+\begin{key}{/\tikzext/autobend up=\meta{angle} (default \normalfont last value)}
+ Works like the |bend left| and |bend right| options
+ but bends the curve upwards (i.\,e. it observes the current transformation).
+\end{key}
+\begin{key}{/\tikzext/autobend down=\meta{angle} (default \normalfont last value)}
+ Works like |autobend up| but bends the curve downwards.
+\end{key}
+\begin{key}{/\tikzext/autobend left=\meta{angle} (default \normalfont last value)}
+ Works like |autobend up| but bends the curve leftwards.
+\end{key}
+\begin{key}{/\tikzext/autobend right=\meta{angle} (default \normalfont last value)}
+ Works like |autobend up| but bends the curve rightwards.
+\end{key}
+
+\begin{codeexample}[preamble=\usetikzlibrary{arrows.meta, ext.topaths.autobend},width=6cm]
+\begin{tikzpicture}[
+ every path/.append style=-Latex,
+ pics/cs/.style={
+ /tikz/transform shape,
+ code={\draw[help lines, Latex-Latex] (up:1) |- (right:1);}
+ },
+ nodes={sloped, fill=white, inner ysep=+.1em, fill opacity=.8, text opacity=1, scale=.5}]
+\foreach[count=\i] \c/\d in {black/north, red/south,
+ green!50!black/west, yellow!50!black/east}
+ \draw[\c] (0,0) pic {cs} to[ext/autobend \d=\i0] node{\d} +(45:3);
+\foreach[count=\i] \c/\d in {black/north, red/south,
+ green!50!black/west, yellow!50!black/east}
+ \draw[shift=(right:2), rotate=180, \c]
+ (45:-3) pic {cs} to[ext/autobend \d=\i0] node{\d} (0,0);
+
+\tikzset{shift=(down:2.5)}
+\foreach[count=\i] \c/\d in {black/up, red/down,
+ green!50!black/left, yellow!50!black/right}
+ \draw[\c] (0,0) pic {cs} to[ext/autobend \d=\i0] node{\d} +(45:3);
+\foreach[count=\i] \c/\d in {black/up, red/down,
+ green!50!black/left, yellow!50!black/right}
+ \draw[shift=(right:2), rotate=180, \c]
+ (45:-3) pic {cs} to[ext/autobend \d=\i0] node{\d} (0,0);
+\end{tikzpicture}
+\end{codeexample}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.autobend.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-library-trans.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -7,7 +7,6 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-
\clearpage
\section{Mirror, Mirror on the Wall}
\label{library:mirror}
@@ -26,12 +25,12 @@
shape=regular polygon, regular polygon sides={#1}}]
\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {};
\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5}
- \node [mirror=(a.corner \i)--(a.side \i), transform shape,
+ \node [ext/mirror=(a.corner \i)--(a.side \i), transform shape,
reg poly=5, minimum size=+2cm, draw=red!\col!blue] {};
\end{tikzpicture}
\end{codeexample}
-\begin{key}{/tikz/xmirror=\meta{value or coordinate} (default 0pt)}
+\begin{key}{/\tikzext/xmirror=\meta{value or coordinate} (default 0pt)}\keycompat{tikz}
Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}.
\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}]
@@ -40,18 +39,18 @@
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25);
-\draw[xmirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1);
+\draw[ext/xmirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
\end{codeexample}
\end{key}
-\begin{key}{/tikz/ymirror=\meta{value or coordinate} (default 0pt)}
+\begin{key}{/\tikzext/ymirror=\meta{value or coordinate} (default 0pt)}\keycompat{tikz}
Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}.
\end{key}
-\begin{key}{/tikz/mirror x=\meta{coordinate} (default {(0,0)})}
- Similar to |/tikz/xmirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
+\begin{key}{/\tikzext/mirror x=\meta{coordinate} (default {(0,0)})}\keycompat{tikz}
+ Similar to |xmirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}]
\begin{tikzpicture}[x=.5cm, y=(45:1cm)]
@@ -59,18 +58,18 @@
\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25);
-\draw[ xmirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1);
-\draw[mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1);
+\draw[ ext/xmirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1);
+\draw[ext/mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
\end{codeexample}
\end{key}
-\begin{key}{/tikz/mirror y=\meta{coordinate} (default {(0,0)})}
- Similar to |/tikz/ymirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
+\begin{key}{/\tikzext/mirror y=\meta{coordinate} (default {(0,0)})}\keycompat{tikz}
+ Similar to |ymirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
\end{key}
-\begin{key}{/tikz/mirror=\meta{point A}|--|\meta{point B}}
+\begin{key}{/\tikzext/mirror=\meta{point A}|--|\meta{point B}}\keycompat{tikz}
Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}.
When only \meta{point A} is given that line goes through \meta{point A} and the origin.
@@ -83,12 +82,12 @@
shape=regular polygon, regular polygon sides={#1}}]
\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {};
\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5}
- \node [Mirror=(a.corner \i)--(a.side \i), transform shape,
+ \node [ext/Mirror=(a.corner \i)--(a.side \i), transform shape,
reg poly=5, minimum size=+2cm, draw=red!\col!blue] {};
\end{tikzpicture}
\end{codeexample}
-\begin{key}{/tikz/xMirror=\meta{value or coordinate} (default 0pt)}
+\begin{key}{/\tikzext/xMirror=\meta{value or coordinate} (default 0pt)}\keycompat{tikz}
Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}.
\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}]
@@ -97,18 +96,18 @@
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25);
-\draw[xMirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1);
+\draw[ext/xMirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
\end{codeexample}
\end{key}
-\begin{key}{/tikz/yMirror=\meta{value or coordinate} (default 0pt)}
+\begin{key}{/\tikzext/yMirror=\meta{value or coordinate} (default 0pt)}\keycompat{tikz}
Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}.
\end{key}
-\begin{key}{/tikz/Mirror x=\meta{coordinate} (default {(0,0)})}
- Similar to |/tikz/xMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
+\begin{key}{/\tikzext/Mirror x=\meta{coordinate} (default {(0,0)})}\keycompat{tikz}
+ Similar to |xMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}]
\begin{tikzpicture}[x=.5cm, y=(45:1cm)]
@@ -116,18 +115,18 @@
\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25);
-\draw[ xMirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1);
-\draw[Mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1);
+\draw[ ext/xMirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1);
+\draw[ext/Mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
\end{codeexample}
\end{key}
-\begin{key}{/tikz/Mirror y=\meta{coordinate} (default {(0,0)})}
- Similar to |/tikz/yMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
+\begin{key}{/\tikzext/Mirror y=\meta{coordinate} (default {(0,0)})}\keycompat{tikz}
+ Similar to |yMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system.
\end{key}
-\begin{key}{/tikz/Mirror=\meta{point A}\opt{|--|\meta{point B}}}
+\begin{key}{/\tikzext/Mirror=\meta{point A}\opt{|--|\meta{point B}}}\keycompat{tikz}
Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}.
When only \meta{point A} is given that line goes through \meta{point A} and the origin.
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 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -8,16 +8,38 @@
% 2. under the GNU Free Documentation License.
%
\newcommand*\tikzextname{Ti\textit kZ-Extensions}
-\newcommand*\tikzextversion{0.5.1}
%\includeonly{
-%% tikz-ext-manual-en-library-misc,
-%% tikz-ext-manual-en-library-nodes,
+% tikz-ext-manual-en-intro,
+% tikz-ext-manual-en-library-arrows-plus,
+% tikz-ext-manual-en-library-calendar-plus,
+% tikz-ext-manual-en-library-layers,
+% tikz-ext-manual-en-library-node-families,
+% tikz-ext-manual-en-library-nodes,
+% tikz-ext-manual-en-library-paths.arcto,
+% tikz-ext-manual-en-library-paths.ortho,
+% tikz-ext-manual-en-library-paths.timer,
+% tikz-ext-manual-en-library-patterns.images,
+% tikz-ext-manual-en-library-positioning-plus,
+% tikz-ext-manual-en-library-scalepicture,
+% tikz-ext-manual-en-library-topaths.arcthrough,
+% tikz-ext-manual-en-library-topaths.autobend,
+% tikz-ext-manual-en-library-trans,
% tikz-ext-manual-en-pgf-arrows,
+% tikz-ext-manual-en-pgf-trans,
+% tikz-ext-manual-en-pgf-shapes-circlearrow,
+% tikz-ext-manual-en-pgf-shapes-circlecrosssplit,
+% tikz-ext-manual-en-pgf-shapes-heatmark,
+% tikz-ext-manual-en-pgf-shapes-rectround,
+% tikz-ext-manual-en-pgf-shapes-superellipse,
+% tikz-ext-manual-en-pgf-shapes-uncentered,
+% tikz-ext-manual-en-calendar,
+% tikz-ext-manual-en-library-pgffor,
+% tikz-ext-manual-en-library-misc,
%}
\begin{document}
{\colorlet{blue}{black}% links shall be black
\title{\bfseries The \tikzextname\space Package\\
- \large Manual for version \tikzextversion\\[1mm]
+ \large Manual for version \tikzextversion\space (\tikzextversionnumber)\\[1mm]
\large\href{https://github.com/Qrrbrbirlbel/tikz-extensions}
{\texttt{https://github.com/Qrrbrbirlbel/tikz-extensions}}
\author{Qrrbrbirlbel}}
@@ -28,7 +50,7 @@
\tableofcontents
}
\include{tikz-ext-manual-en-intro}
-
+%
\part{\tikzname\space Libraries}
\label{part:tikz}
@@ -50,6 +72,7 @@
level 4/.style={sibling angle=45},
nodes={circle,draw,inner sep=+0pt, minimum size=+5pt},
]
+
\path[rotate=30]
node {}
child foreach \cntI in {1,...,3} {
@@ -68,6 +91,7 @@
\end{tikzpicture}
\end{center}
+\tikzsetfigurename{arrows-plus} \include{tikz-ext-manual-en-library-arrows-plus}
\tikzsetfigurename{calendar-plus} \include{tikz-ext-manual-en-library-calendar-plus}
\tikzsetfigurename{layers} \include{tikz-ext-manual-en-library-layers}
\tikzsetfigurename{node-families} \include{tikz-ext-manual-en-library-node-families}
@@ -80,11 +104,12 @@
\include{tikz-ext-manual-en-library-positioning-plus}
\tikzsetfigurename{scalepicture}
\include{tikz-ext-manual-en-library-scalepicture}
-\tikzsetfigurename{topaths.arcthrough}
+\tikzsetfigurename{topaths}
\include{tikz-ext-manual-en-library-topaths.arcthrough}
+\include{tikz-ext-manual-en-library-topaths.autobend}
\tikzsetfigurename{trans}
\include{tikz-ext-manual-en-library-trans}
-
+%
\part{\pgfname\space Libraries}
\label{part:pgf}
These libraries (should) work with both \pgfname\space and \tikzname.
@@ -97,9 +122,9 @@
circle, minimum size=10mm, draw, densely dashdotted, thick,
decide color/.expand once=#1},
decide color/.style 2 args={
- /utils/TeX/if=c#1
- {/utils/TeX/ifnum={#2<5}{bluelight}{bluedark}}
- {/utils/TeX/ifnum={#2<8}{light}{dark}}},
+ /utils/ext/if=c#1
+ {/utils/ext/ifnum={#2<5}{bluelight}{bluedark}}
+ {/utils/ext/ifnum={#2<8}{light}{dark}}},
light/.style={fill=gray!20}, bluelight/.style={fill=blue!10},
dark/.style ={fill=gray!60}, bluedark/.style ={fill=blue!30}}
\tikz\graph[
@@ -144,9 +169,9 @@
\begin{codeexample}[width=6cm, preamble=\usetikzlibrary{ext.misc}]
\begin{tikzpicture}[
declare function={bigR(\n)=smallR+.05*\n;},
- declare constant={smallR=1; segments=20;},
- full arc=segments]
-\foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1]
+ ext/declare constant={smallR=1; segments=20;},
+ ext/full arc=segments]
+\foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, ext/use int=0 to segments-1]
\filldraw[fill=gray!50] (\iN R:\endRadius)
arc [radius=\endRadius, start angle=\iN R, delta angle=+1R] -- (\iN R+1R:smallR)
arc [radius=smallR, end angle=\iN R, delta angle=-1R] -- cycle;
@@ -155,9 +180,9 @@
\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$};
\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$};
-\tikzset{yshift=-5cm, declare constant={segments=25;}, full arc=segments}
+\tikzset{yshift=-5cm, ext/declare constant={segments=25;}, ext/full arc=segments}
\filldraw[fill=gray!50] (right:smallR)
- \foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] {
+ \foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, ext/use int=0 to segments-1] {
-- (\iN R:\endRadius) arc[radius=\endRadius, start angle=\iN R, delta angle=1R]}
-- (right:smallR) arc[radius=smallR, start angle=0, delta angle=-360];
@@ -172,7 +197,7 @@
\tikzsetfigurename{misc.pgffor}\include{tikz-ext-manual-en-library-pgffor}
\tikzsetfigurename{misc.misc}\include{tikz-ext-manual-en-library-misc}
-%%% END
+%% END
\newcommand*{\addPackage}[1]{Added package \texttt{#1-ext}.}
\newcommand*{\addTikz}[1]{Added \tikzname\space library \texttt{ext.#1}.}
\newcommand*{\addPGF}[1]{Added \pgfname\space library \texttt{ext.#1}.}
@@ -182,12 +207,25 @@
\section*{Changelog}\addcontentsline{toc}{section}{Changelog}
\begin{multicols}{2}\raggedright
\noindent
-Version 0.5.1
+Version 0.6 (\the\year-\ifnum\month<10 0\fi\the\month-\ifnum\day<10 0\fi\the\day)
\begin{itemize}
+\item Added \texttt{\textbackslash tikzextset},
+ \texttt{\textbackslash tikzextversion} and
+ \texttt{\textbackslash tikzextversionnumber}
+\item Added six new |auto| placement mechanisms:
+ |ext/above|, |ext/below|, |ext/west|, |ext/east|, |ext/north| and |ext/south|.
+\item Added |ext/auto offset| for |auto| placement.
+\item Added |ext/precise auto angle|.
+\item \addTikz{arrows-plus}
+\item \addTikz{topaths.autobend}
+\item Made |ext.node-families| and |ext.scalepicture| memoizable.
+\end{itemize}
+Version 0.5.1 (2023-04-02)
+\begin{itemize}
\item \addPGF{arrows}
\item Bugfix to |ext.pgfkeys-plus|. \cite{GH6}
\end{itemize}
-Version 0.5
+Version 0.5 (2023-03-17)
\begin{itemize}
\item \addPackage{pgffor}
\item \addTikz{nodes}
@@ -195,12 +233,12 @@
\item Bugfixes to |ext.calendar-plus|.
\item Allow the original |rectangle| timer with |ext.paths.timer|.
\end{itemize}
-Version 0.4.2
+Version 0.4.2 (2022-10-30)
\begin{itemize}
\item \addTikz{scalepicture}
\item Bugfixes to |shapes.uncenteredrectangle|, |paths.ortho|, |positioning-plus| and |pgfcalender-ext|.
\end{itemize}
-Version 0.4.1
+Version 0.4.1 (2022-10-23)
\begin{itemize}
\item Cleaned up directory structure of documentary.
\item \addPGFkeys{pgfkeys-plus}
@@ -207,11 +245,11 @@
\item \addShape[uncentered rectangle]{uncenteredrectangle}
\item Fixed |ext.paths.arcto| -- again \cite{GH2}.
\end{itemize}
-Version 0.4
+Version 0.4 (2022-10-10)
\begin{itemize}
\item CTAN version of 0.3.1
\end{itemize}
-Version 0.3.1
+Version 0.3.1 (2022-10-09)
\begin{itemize}
\item Fixed |ext.paths.ortho| keys |only vertical first| and |only horizontal first|.
\item Moved all (except the |to path|s) to namespace |/tikz/ortho|.
@@ -220,7 +258,7 @@
\item Added more calendar tests.
\item Added directory structure.
\end{itemize}
-Version 0.3
+Version 0.3 (2022-09-24)
\begin{itemize}
\item \addShape[circle arrow]{circlearrow}
\item \addShape[circle cross split]{circlecrosssplit}
@@ -232,12 +270,12 @@
\item Renamed internal macros to use custom namespace starting with |\tikzext@|.
\item Added some references.
\end{itemize}
-Version 0.2
+Version 0.2 (2022-08-21)
\begin{itemize}
\item \addTikz{positioning-plus}
\item \addTikz{node-families}
\end{itemize}
-Version 0.1
+Version 0.1 (2022-08-16)
\begin{itemize}
\item \addTikz{calendar-plus}
\item \addTikz{misc}
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 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -1,3 +1,4 @@
+% !TeX TS-program = lualatex
% !TeX spellcheck = <none>
% !TeX root = tikz-ext-manual.tex
% Copyright 2022 by Qrrbrbirlbel
@@ -41,12 +42,13 @@
\tracinglostchars=3
\input{pgfmanual-en-macros}
-
-\usepackage{unicode-math}
-\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf}
+\usepackage[no-math]{fontspec}
+%\usepackage{unicode-math}
+%\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf}
\usepackage[ttscale=.85]{libertine}
\setmonofont[Scale=0.8]{Bitstream Vera Sans Mono}
-
+\let\arrowvert\relax
+\usepackage[libertine,liby]{newtxmath}
\makeatletter
\renewcommand*\l at section[2]{%
\ifnum \c at tocdepth >\z@
@@ -91,8 +93,11 @@
\makeatother
\usepgfkeyslibrary{ext.pgfkeys-plus}
\usetikzlibrary{
+ decorations.markings,
ext.arrows,
+ ext.arrows-plus,
ext.calendar-plus,
+ ext.layers,
ext.misc,
ext.node-families,
ext.node-families.shapes.geometric,
@@ -110,8 +115,10 @@
ext.shapes.superellipse,
ext.shapes.uncenteredrectangle,
ext.topaths.arcthrough,
+ ext.topaths.autobend,
ext.transformations.mirror,
%
+ bending,
calc,
cd,
fit,
@@ -122,6 +129,7 @@
through,
trees,
}
+\tikzextset{compat=0.6}
\usepackage{pgffor-ext}
%% needs Lua!
\usetikzlibrary{graphs,graphdrawing}
@@ -343,7 +351,7 @@
\index{#1@\originalprefix\protect\texttt{\original{#1}} key\originalsuffix}%
\index{\mypath#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
\gdef\myname{#1}%
- \pgfmanualpdflabel{#1}{}
+ \pgfmanualpdflabel{#1}{}%
\else%
\advance\pgfmanualdecomposecount by1\relax%
\ifnum\pgfmanualdecomposecount>2\relax%
@@ -416,6 +424,7 @@
\newcommand*{\referencePathOperationandIndexO}[1]{\texttt{#1}\indexPathOperationO{#1}}
\newcommand*{\referenceCommandandIndex}[1]{\texttt{\string#1}\indexCommand{#1}}
\newcommand*{\referenceCommandandIndexO}[1]{\texttt{\string#1}\indexCommandO{#1}}
+\newcommand*{\referenceCommandandIndexExt}[1]{\texttt{\string#1}\indexCommandExt{#1}}
\colorlet{originalindex}{gray}
\newcommand*{\original}[1]{\textcolor{originalindex}{#1}}%
\newcommand*{\originalsuffix}{}%\textsuperscript{\textdagger}}%\normalsize
@@ -424,14 +433,18 @@
\newcommand*{\indexPackageExt}[1]{%
\begingroup
% \originalExternals
- \index{#1@\originalExternals{\originalprefix\protect\texttt{\original{#1}} package\originalsuffix}}%
- \index{Packages and files!#1@\originalExternals{\originalprefix\protect\texttt{\original{#1}}\originalsuffix}}%
+ \index{#1@\originalExternals{\protect\texttt{\original{#1}} package}}%
+ \index{Packages and files!#1@\originalExternals{\protect\texttt{\original{#1}}}}%
\endgroup
}
\newcommand*{\indexLibraryExt}[1]{%
- \index{#1@\originalExternals{\originalprefix\protect\texttt{\original{#1}} library\originalsuffix}}%
- \index{Libraries!#1@\originalExternals{\originalprefix\protect\texttt{\original{#1}}\originalsuffix}}%
+ \index{#1@\originalExternals{\protect\texttt{\original{#1}} library}}%
+ \index{Libraries!#1@\originalExternals{\protect\texttt{\original{#1}}}}%
}
+\newcommand*{\indexCommandExt}[1]{%
+ \removeats{#1}%
+ \index{\strippedat @\originalExternals{\protect\texttt{\original{\protect\string\protect#1}}}}%
+}
\DeclareRobustCommand*{\originalExternals}[1]{%
\begingroup
\colorlet{originalindex}{blue!50!gray}%
@@ -527,8 +540,149 @@
\tikz [baseline,>={#1[#2]}] \draw [line
width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
}
+\def\manual at action@length#1/#2/#3\relax{%
+% \draw[help lines, overlay] (current bounding box.south west) rectangle (current bounding box.north east);
+ \draw [red,|<->|,semithick,xshift=#2]
+ ([yshift=4pt]current bounding box.north -| -#1,0) coordinate (last length)
+ -- node[above=-2pt] {|length|} ++(#1,0);
+}
\def\manual at action@radius#1/#2/#3\relax{%
- \draw [red,|<->|,semithick] ([xshift=-#1,yshift=#1]current bounding
- box.north east) -- node [above, overlay] {\texttt{radius}} ++(-#1,0);
+% \draw[red] (0,#2)
+% -- node[above, sloped]{\texttt{radius}}
+% +(30:#1);
+ \draw [red, ->|, semithick]
+ ([xshift=-#1, yshift=-#1]0,#2) %-- ++(left:#2) -- ++(down:#1);
+ -- node[below, sloped]{\texttt{inset}} +(30:#1);
+% \draw [red,|<->|,semithick] ([xshift=-#1,yshift=2*#1]current bounding
+% box.north east) -- node [above, overlay] {\texttt{radius}} ++(-#1,0);
}
+\makeatother
+\newcommand*\keycompat[2][pre 0.6]{%
+ \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily/#2/\myname}}\vspace{-2pt}\par
+ \pgfmanualpdflabel{/#2/\myname}{}%
+}
+\newcommand*\cmdcompat[2][pre 0.6]{%
+ \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily\string#2}}\vspace{-2pt}\par
+% \pgfmanualpdflabel{\string#2}{}%
+}
+\newcommand*\tipcompat[1][pre 0.6]{%
+ \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily\expandafter\tipcompatstrip\currentarrowtype\tipstop}}\vspace{-2pt}\par
+% \pgfmanualpdflabel{/#2/\myname}{}%
+}
+\newcommand*\tipCompat[2][pre 0.6]{
+ \vspace{-8pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily#2}}\vspace{2pt}\par
+% \pgfmanualpdflabel{/#2/\myname}{}%
+}
+\def\tipcompatstrip ext#1#2\tipstop{#2}%
+\newcommand*\handlercompat[2][pre 0.6]{%
+ \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily#2}}\vspace{-2pt}\par
+ \pgfmanualpdflabel{#2}{}%
+}
+\newcommand*\mathcompat[2][pre 0.6]{%
+ \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily#2}}\vspace{-2pt}\par
+% \pgfmanualpdflabel{/#2/\myname}{}%
+}
+\usepackage{array}
+\newcommand*\tikzext{tikz/ext}
+\newcommand*\pgfext{pgf/ext}
+\newcommand*\pgfforeachext{pgf/foreach/ext}
+\newcommand*\utilsext{utils/ext}
+
+\def\decomposetoodeep#1/#2/\nil{%
+ % avoid too-deep nesting in index
+ \ifx\CurrentLibrary\empty
+ \index{#1/#2@\protect\texttt{#1/#2}}%
+ \index{\mypath#1/#2@\protect\texttt{#1/#2}}%
+ \fi
+ \index{#1/#2@\protect\texttt{#1/#2} (\CurrentLibrary)}%
+ \index{\mypath#1/#2@\protect\texttt{#1/#2} (\CurrentLibrary)}%
+ \fi
+ \decomposefindlast/#1/#2/\nil%
+}
+\def\decompose/#1/#2\nil{%
+ \def\test{#2}%
+ \ifx\test\empty%
+ % aha.
+ \ifx\CurrentLibrary\empty
+ \index{#1@\protect\texttt{#1} key}%
+ \index{\mypath#1@\protect\texttt{#1}}%
+ \else
+ \index{#1@\protect\texttt{#1} key (\CurrentLibrary)}%
+ \index{\mypath#1@\protect\texttt{#1} (\CurrentLibrary)}%
+ \fi
+ \gdef\myname{#1}%
+ \pgfmanualpdflabel{#1}{}
+ \else%
+ \advance\pgfmanualdecomposecount by1\relax%
+ \ifnum\pgfmanualdecomposecount>2\relax%
+ \decomposetoodeep#1/#2\nil%
+ \else%
+ \iffirsttime%
+ \begingroup%
+ % also make a pdf link anchor with full key path.
+ \def\hyperlabelwithoutslash##1/\nil{%
+ \pgfmanualpdflabel{##1}{}%
+ }%
+ \hyperlabelwithoutslash/#1/#2\nil%
+ \endgroup%
+ \def\mypath{#1@\protect\texttt{/#1/}!}%
+ \firsttimefalse%
+ \else%
+ \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}%
+ \fi%
+ \def\firsttime{}%
+ \decompose/#2\nil%
+ \fi%
+ \fi%
+}
+\def\empty{}
+\newcommand*\noLibrary{\gdef\CurrentLibrary{}}
+\newcommand*\currentLibrary[1]{\gdef\CurrentLibrary{{\small ext.}#1}}
+\noLibrary
+
+\newenvironment{ext_shape}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{%
+ \pgfmanualpdflabel{ext_#1}{}%
+ \textbf{Shape} {\ttfamily\declare{ext\textunderscore#1}}%
+ }%
+ \index{ext\textunderscore#1@\protect\texttt{ext\textunderscore#1} shape}%
+ \index{Shapes!ext\textunderscore#1@\protect\texttt{ext\textunderscore#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+%\newenvironment{ext_math-function}[1]{
+% \def\mathdefaultname{ext\textunderscore#1}
+% \extractmathfunctionname{ext#1}
+% \edef\mathurl{{math:\mathname}}\expandafter\hypertarget\expandafter{\mathurl}{}%
+% \begin{pgfmanualentry}
+% \pgfmanualentryheadline{\texttt{#1}}%
+% \index{\mathname @\protect\texttt{\mathname} math function}%
+% \index{Math functions!\mathname @\protect\texttt\mathname}}%
+% \pgfmanualbody
+%}
+%{
+% \end{pgfmanualentry}
+%}
+
+\makeatletter
+\newenvironment{ext_handler}[1]{
+ \begin{pgfmanualentry}
+ \extextracthandler#1\@nil%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\extextracthandler#1#2\@nil{%
+ \pgfmanualentryheadline{%
+ \pgfmanualpdflabel{/handlers/.ext_#1}{}%
+ \textbf{Key handler} \meta{key}{\ttfamily/\declare{.ext\textunderscore#1}}#2}%
+ \index{ext\textunderscore#1@\protect\texttt{.ext\textunderscore#1} handler}%
+ \index{Key handlers!.ext\textunderscore#1@\protect\texttt{.ext\textunderscore#1}}
+}
\makeatother
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-arrows.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-arrows.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-arrows.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -39,7 +39,7 @@
\begin{center}
\newcommand*\tip[2][]{%
\tikzset{external/export/.try=false}%
- \tikz[arrows={#2 \arrowtiprow[reversed] - \arrowtiprow[sep] . #2 \arrowtiprow[]}, baseline=+-.5ex,
+ \tikz[arrows={ext_#2 \arrowtiprow[reversed] - \arrowtiprow[sep] . ext_#2 \arrowtiprow[]}, baseline=+-.5ex,
trim left=+-3mm, trim right=+13mm]
\draw[line width=+.5mm, postaction={draw, gray, thin,-}] (0,0) -- + (right:1);%
}%
@@ -82,41 +82,41 @@
\subsection{Centered}
\subsubsection{Barbed Arrow Tips}
-\begin{arrowtipsimple}{Centered Arc Barb}
+\begin{arrowtipsimple}{ext\textunderscore Centered Arc Barb}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Arc Barb} tip.
The center of the arc lies on the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Bar}
+\begin{arrowtipsimple}{ext\textunderscore Centered Bar}\tipcompat
A variant of the simple \referenceArrowtipandIndexO{Bar} tip.
- This is a simple instance of |Centered Tee Barb| for length zero.
+ This is a simple instance of |ext_Centered Tee Barb| for length zero.
The middle of the line will lie on original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Bracket}
+\begin{arrowtipsimple}{ext\textunderscore Centered Bracket}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Bracket} tip and
- therefore an instance of the |Centered Tee Barb| arrow tip that results in something
+ therefore an instance of the |ext_Centered Tee Barb| arrow tip that results in something
resembling a bracket.
The middle of the vertical part will lie on the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Hooks}
+\begin{arrowtipsimple}{ext\textunderscore Centered Hooks}\tipcompat
A variant of the \referenceArrowtipandIndexO{Hooks} tip.
The starting point of the hooks will lie on the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Parenthesis}
+\begin{arrowtipsimple}{ext\textunderscore Centered Parenthesis}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Parenthesis} tip and
- thus an instance of the |Centered Arc Barb| arrow tip.
+ thus an instance of the |ext_Centered Arc Barb| arrow tip.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Straight Barb}
+\begin{arrowtipsimple}{ext\textunderscore Centered Straight Barb}\tipcompat
A variant of the \referenceArrowtipandIndexO{Straight Barb} tip.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Tee Barb}
+\begin{arrowtipsimple}{ext\textunderscore Centered Tee Barb}\tipcompat
A variant of the \referenceArrowtipandIndexO{Tee Barb} tip.
The middle of the vertical part will lie on the original end of the path.
@@ -123,55 +123,55 @@
\end{arrowtipsimple}
\subsubsection{Geometric Arrow Tips}
-\begin{arrowtipsimple}{Centered Circle}
+\begin{arrowtipsimple}{ext\textunderscore Centered Circle}\tipcompat
A variant of the \referenceArrowtipandIndexO{Circle} tip.
The center of the circle will lie on the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Diamond}
+\begin{arrowtipsimple}{ext\textunderscore Centered Diamond}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Diamond} tip and
- thus an instance of |Centered Kite| where the length is larger than the width.
+ thus an instance of |ext_Centered Kite| where the length is larger than the width.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Ellipse}
+\begin{arrowtipsimple}{ext\textunderscore Centered Ellipse}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Ellipse} tip
- and thus another name for the |Centered Circle| tip
+ and thus another name for the |ext_Centered Circle| tip
that is twice as wide as high.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Kite}
+\begin{arrowtipsimple}{ext\textunderscore Centered Kite}\tipcompat
A variant of the \referenceArrowtipandIndexO{Kite} tip.
The widest part will lie on the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Rectangle}
+\begin{arrowtipsimple}{ext\textunderscore Centered Rectangle}\tipcompat
A variant of the \referenceArrowtipandIndexO{Rectangle} tip.
By default, it is twice as long as high.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Square}
+\begin{arrowtipsimple}{ext\textunderscore Centered Square}\tipcompat
A variant of the \referenceArrowtipandIndexO{Square} tip.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Stealth}
+\begin{arrowtipsimple}{ext\textunderscore Centered Stealth}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Stealth} tip.
The weighted center will lie at the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Triangle}
+\begin{arrowtipsimple}{ext\textunderscore Centered Triangle}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Triangle} tip and
- thus an instance of the |Centered Kite| tip with zero inset.
+ thus an instance of the |ext_Centered Kite| tip with zero inset.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Centered Turned Square}
+\begin{arrowtipsimple}{ext\textunderscore Centered Turned Square}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Turned Square} tip and
- thus an instance of the |Centered Kite| tip with identical width and height and mid-inset.
+ thus an instance of the |ext_Centered Kite| tip with identical width and height and mid-inset.
\end{arrowtipsimple}
\subsubsection{Special Arrow Tips}
-\begin{arrowtipsimple}{Centered Rays}
+\begin{arrowtipsimple}{ext\textunderscore Centered Rays}\tipcompat
A variant of the \referenceArrowtipandIndexO{Rays} tip.
The origin of the rays will lie on the original end of the path.
\end{arrowtipsimple}
@@ -178,32 +178,32 @@
\subsection{Untipped}
\subsubsection{Barbed Arrow Tips}
-\begin{arrowtipsimple}{Centered Arc Barb}
+\begin{arrowtipsimple}{ext\textunderscore Centered Arc Barb}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Arc Barb} tip.
The arrow tip will protrude half its line width over the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Untipped Bar}
+\begin{arrowtipsimple}{ext\textunderscore Untipped Bar}\tipcompat
A variant of the simple \referenceArrowtipandIndexO{Bar} tip.
- This is a simple instance of |Untipped Tee Barb| for length zero.
+ This is a simple instance of |ext_Untipped Tee Barb| for length zero.
The middle of the line will lie on original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Untipped Bracket}
+\begin{arrowtipsimple}{ext\textunderscore Untipped Bracket}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Bracket} tip and
- therefore an instance of the |Untipped Tee Barb| arrow tip that results in something
+ therefore an instance of the |ext_Untipped Tee Barb| arrow tip that results in something
resembling a bracket.
The arrow tip will protrude half its line width over the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Untipped Parenthesis}
+\begin{arrowtipsimple}{ext\textunderscore Untipped Parenthesis}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Parenthesis} tip and
- thus an instance of the |Untipped Arc Barb| arrow tip.
+ thus an instance of the |ext_Untipped Arc Barb| arrow tip.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Untipped Tee Barb}
+\begin{arrowtipsimple}{ext\textunderscore Untipped Tee Barb}\tipcompat
A variant of the \referenceArrowtipandIndexO{Tee Barb} tip.
The middle of the vertical part will lie on the original end of the path.
@@ -210,19 +210,20 @@
\end{arrowtipsimple}
\subsubsection{Geometric Arrow Tips}
-\begin{arrowtipsimple}{Untipped Circle}
+\begin{arrowtipsimple}{ext\textunderscore Untipped Circle}\tipcompat
A variant of the \referenceArrowtipandIndexO{Circle} tip.
This tip will protrude half its line width over the original end of the path.
\end{arrowtipsimple}
-\begin{arrowtipsimple}{Untipped Ellipse}
+\begin{arrowtipsimple}{ext\textunderscore Untipped Ellipse}\tipcompat
This is a variant of the \referenceArrowtipandIndexO{Ellipse} tip
- and thus another name for the |Untipped Circle| tip
+ and thus another name for the |ext_Untipped Circle| tip
that is twice as wide as high.
\end{arrowtipsimple}
+\newcolumn
\subsection{Original Arrow Tips}
-\begin{arrowtipsimple}{Hug Cap}
+\begin{arrowtipsimple}{ext\textunderscore Hug Cap}\tipcompat
This arrow tips will hug a circle that would touch the end of the path.
Use the \referenceKeyandIndexO[/pgf/arrow keys/]{length} key to set up the radius of that circle.
@@ -235,18 +236,27 @@
\node[dot={blue}{3cm}] (B) at (6,0) {};
\draw[
line width=1.5cm,
- arrows={Hug Cap[length=1cm]-Hug Cap[length=1.5cm]}
+ arrows={ext_Hug Cap[length=1cm]-ext_Hug Cap[length=1.5cm]}
] (A) to[out=45, in=180] (B);
\end{tikzpicture}
\end{codeexample}
\end{arrowtipsimple}
-\begin{arrowtip}{Loop}{
+\makeatletter
+\newcommand*\extus{%
+ \ifx\path\tikz at command@path
+ ext_%
+ \else
+ ext\textunderscore
+ \fi
+}
+\makeatother
+\begin{arrowtip}{\extus Loop}{\tipCompat{Loop}
This arrow tip attaches a one-sided loop to the end of the line.
- The |length| refers to the length of the whole tip while the |radius|
+ The |length| refers to the length of the whole tip while the |inset|
specifies the radius of the three rounded corners.
The width of the tip is twice the |length| (but can't specified independently).
-}{length=1.5cm,radius=3.5mm}{length=1.5cm,radius=3.5mm}
+}{length=1.5cm,inset=3.5mm}{length=1.5cm,radius=3.5mm/1.5cm}
\begin{arrowexamples}
\arrowexample[]
\arrowexampledup[sep]
@@ -253,7 +263,7 @@
\arrowexampledupdot[sep]
\arrowexample[open]
\arrowexample[open, swap]
- \arrowexample[length=5pt,radius=0pt]
+ \arrowexample[length=5pt,inset=0pt]
\arrowexample[reversed]
\arrowexample[slant=.3]
\arrowexample[red]
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -12,71 +12,73 @@
A circular shape named |circle arrow| that has an arc as its background path that can have an arrow tip.
\inspiration{ShapeCircleArrow-Q}{ShapeCircleArrow-A}
\end{pgflibrary}
-\begin{shape}{circle arrow}
+\begin{ext_shape}{circle arrow}
This shape is an arrow whose path is an arc -- defined very similar to the |arc|%
\indexPathOperationO{arc} path operation -- that can possibly be customized with
arrow tips.
- \begin{key}{/pgf/circle arrow start angle=\meta{start angle} (initially \{\})}
+ \begin{key}{/\pgfext/circle arrow start angle=\meta{start angle} (initially \{\})}\keycompat{pgf}
Sets the start angle.
\end{key}
- \begin{key}{/pgf/circle arrow end angle=\meta{end angle} (initially \{\})}
+ \begin{key}{/\pgfext/circle arrow end angle=\meta{end angle} (initially \{\})}\keycompat{pgf}
Sets the end angle.
\end{key}
- \begin{key}{/pgf/circle arrow delta angle=\meta{delta angle} (initially \{\})}
+ \begin{key}{/\pgfext/circle arrow delta angle=\meta{delta angle} (initially \{\})}\keycompat{pgf}
Sets the delta angle.
\end{key}
- \begin{key}{/pgf/circle arrow arrows=%
- \meta{start arrow tip specification}-\meta{end arrow tip specification} (initially -)}
+ \begin{key}{/\pgfext/circle arrow arrows=%
+ \meta{start arrow tip specification}-\meta{end arrow tip specification} (initially -)}\keycompat{pgf}
The specification will be forwarded to |\pgfsetarrows|\indexCommandO{\pgfsetarrows}.
\end{key}
A few handful styles are pre-defined.
- \begin{key}{/pgf/circle arrow turn left north}
+ \begin{key}{/\pgfext/circle arrow turn left north}\keycompat{pgf}
Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340|
and |circle arrow arrows = ->|.
\end{key}
- \begin{key}{/pgf/circle arrow turn left east}
+ \begin{key}{/\pgfext/circle arrow turn left east}\keycompat{pgf}
As above but |circle arrow start angle = 10|.
\end{key}
- \begin{key}{/pgf/circle arrow turn left west}
+ \begin{key}{/\pgfext/circle arrow turn left west}\keycompat{pgf}
As above but |circle arrow start angle = 280|.
\end{key}
- \begin{key}{/pgf/circle arrow turn left south}
+ \begin{key}{/\pgfext/circle arrow turn left south}\keycompat{pgf}
As above but |circle arrow start angle = 190|.
\end{key}
- \begin{key}{/pgf/circle arrow turn right north}
+ \begin{key}{/\pgfext/circle arrow turn right north}\keycompat{pgf}
Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340|
and |circle arrow arrows = <-|.
\end{key}
- \begin{key}{/pgf/circle arrow turn right east}
+ \begin{key}{/\pgfext/circle arrow turn right east}\keycompat{pgf}
As above but |circle arrow start angle = 10|.
\end{key}
- \begin{key}{/pgf/circle arrow turn right west}
+ \begin{key}{/\pgfext/circle arrow turn right west}\keycompat{pgf}
As above but |circle arrow start angle = 280|.
\end{key}
- \begin{key}{/pgf/circle arrow turn right south}
+ \begin{key}{/\pgfext/circle arrow turn right south}\keycompat{pgf}
As above but |circle arrow start angle = 190|.
\end{key}
-{\catcode`\|=12
+\begingroup
+\catcode`\|=12
+\catcode`\&=\active
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow,matrix}]
\begin{tikzpicture}
\matrix[matrix of nodes, draw=none, row sep=1em, column sep=1em,
- every node/.style={draw=gray, shape=circle arrow, ultra thick, inner sep=1em}
+ every node/.style={draw=gray, shape=ext_circle arrow, ultra thick, inner sep=1em}
] (m) {
- |[circle arrow turn left north]| & |[circle arrow turn left east]| \\
- |[circle arrow turn left west]| & |[circle arrow turn left south]| \\
- |[circle arrow turn right north]| & |[circle arrow turn right east]| \\
- |[circle arrow turn right west]| & |[circle arrow turn right south]| \\
+ |[ext/circle arrow turn left north]| & |[ext/circle arrow turn left east]| \\
+ |[ext/circle arrow turn left west]| & |[ext/circle arrow turn left south]| \\
+ |[ext/circle arrow turn right north]| & |[ext/circle arrow turn right east]| \\
+ |[ext/circle arrow turn right west]| & |[ext/circle arrow turn right south]| \\
};
\end{tikzpicture}
\end{codeexample}
-}
+\endgroup
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow},width=16cm]
\begin{tikzpicture}\Huge
-\node[name=s, shape=circle arrow,
- circle arrow turn left west, shape example]
+\node[name=s, shape=ext_circle arrow,
+ ext/circle arrow turn left west, shape example]
{Circle Arrow\vrule width 1pt height 2cm};
\foreach \anchor/\placement in
{north west/above left, north/above,
@@ -91,5 +93,5 @@
node[\placement] {\scriptsize\texttt{(s.\anchor)}};
\end{tikzpicture}
\end{codeexample}
-\end{shape}
+\end{ext_shape}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -12,10 +12,10 @@
A circular shape with four parts that can be individually filled.
\inspiration{ShapeSplitCircle-Q}{ShapeSplitCircle-A}
\end{pgflibrary}
-\begin{shape}{circle cross split}
+\begin{ext_shape}{circle cross split}
This shape has four node parts that are placed near the center of a circle.
-\begin{key}{/pgf/circle cross split part fill=\marg{list} (initially none)}
+\begin{key}{/\pgfext/circle cross split part fill=\marg{list} (initially none)}\keycompat{pgf}
Sets the custom fill color for each node part shape.
The items in \meta{list} should be separated by commas
(so if there is more than one item in \meta{list}, it must be surrounded by braces).
@@ -23,17 +23,17 @@
then the remaining node parts use the color from the last entry in the list.
This key will automatically set |/pgf/circle cross split uses custom fill|.
\end{key}
-\begin{key}{/pgf/circle cross split uses custom fill=\opt{\meta{boolean}} (default true)}
+\begin{key}{/\pgfext/circle cross split uses custom fill=\opt{\meta{boolean}} (default true)}\keycompat{pgf}
This enables the use of a custom fill for each of the node parts
(including the area covered by the |inner sep|).
The background path for the shape should not be filled (e.\,g., in \tikzname,
the |fill| option for the node must be implicitly or explicitly set to |none|).
-Internally, this key sets the \TeX-if |\ifpgfcirclecrosssplitcustomfill| appropriately.
+Internally, this key sets the \TeX-if |\ifextpgfcirclecrosssplitcustomfill| appropriately.
\end{key}
\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.circlecrosssplit}]
\begin{tikzpicture}\Huge
-\node[name=s, shape=circle cross split, shape example, inner xsep=1.5cm, fill=none,
- circle cross split part fill={green,blue,red,yellow!90!black}]
+\node[name=s, shape=ext_circle cross split, shape example, inner xsep=1.5cm, fill=none,
+ ext/circle cross split part fill={green,blue,red,yellow!90!black}]
{\nodepart{text}text\nodepart{two}two
\nodepart{three}three\nodepart{four}four};
\foreach \anchor/\placement in
@@ -49,5 +49,5 @@
node[\placement] {\scriptsize\texttt{(s.\anchor)}};
\end{tikzpicture}
\end{codeexample}
-\end{shape}
+\end{ext_shape}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -13,26 +13,26 @@
\inspiration{ShapeHeat-Q}{ShapeHeat-A}
\end{pgflibrary}
-\begin{shape}{heatmark}
- \begin{key}{/pgf/heatmark arcs=\meta{arcs num} (initially 3)}
+\begin{ext_shape}{heatmark}
+ \begin{key}{/\pgfext/heatmark arcs=\meta{arcs num} (initially 3)}\keycompat{pgf}
Sets the number of arc around the circle to \meta{arcs num}.
\end{key}
- \begin{key}{/pgf/heatmark arc width=\meta{arc width} (initially 4pt)}
+ \begin{key}{/\pgfext/heatmark arc width=\meta{arc width} (initially 4pt)}\keycompat{pgf}
Sets the width of the rings around the circle to \meta{arc width}.
\end{key}
- \begin{key}{/pgf/heatmark arc sep=\meta{sep length} (initially 1pt)}
+ \begin{key}{/\pgfext/heatmark arc sep=\meta{sep length} (initially 1pt)}\keycompat{pgf}
Sets the whitespace between the rings to \meta{sep length}.
\end{key}
- \begin{key}{/pgf/heatmark arc rings=\meta{rings num} (initially 3)}
+ \begin{key}{/\pgfext/heatmark arc rings=\meta{rings num} (initially 3)}\keycompat{pgf}
Sets the number of rings around the circle to \meta{rings num}
\end{key}
- \begin{key}{/pgf/heatmark arc sep angle=\meta{sep angle} (initially 20)}
+ \begin{key}{/\pgfext/heatmark arc sep angle=\meta{sep angle} (initially 20)}\keycompat{pgf}
Sets the whitespace angle between the arcs in one ring to \meta{sep angle}.
\end{key}
- \begin{key}{/pgf/heatmark inner opacity=\meta{inner opacity} (initially 0.8)}
+ \begin{key}{/\pgfext/heatmark inner opacity=\meta{inner opacity} (initially 0.8)}\keycompat{pgf}
Sets the opacity of the inner ring to \meta{inner opacity}.
\end{key}
- \begin{key}{/pgf/heatmark outer opacity=\meta{low opacity} (initially 0.2)}
+ \begin{key}{/\pgfext/heatmark outer opacity=\meta{low opacity} (initially 0.2)}\keycompat{pgf}
Sets the opacity of the outer ring to \meta{outer opacity}.
The opacity of the rings between the outer and the inner ring will be interpolated by these two opacities.
@@ -42,11 +42,11 @@
\indexKeyO[/pgf/]{shape border rotate} into consideration.
For every ring and for every arc the following styke keys are tried.
-\begin{stylekey}{/pgf/heatmark ring \meta{ring number}}
+\begin{stylekey}{/\pgfext/heatmark ring \meta{ring number}}
\end{stylekey}
-\begin{stylekey}{/pgf/heatmark arc \meta{arc number}}
+\begin{stylekey}{/\pgfext/heatmark arc \meta{arc number}}
\end{stylekey}
-\begin{stylekey}{/pgf/heatmark ring \meta{ring number} arc \meta{arc number}}
+\begin{stylekey}{/\pgfext/heatmark ring \meta{ring number} arc \meta{arc number}}
\end{stylekey}
The \pgfname shape is setup in a way that even \tikzname\space
@@ -54,16 +54,16 @@
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark}]
\tikz[
shape border rotate=90,
- /pgf/heatmark ring 1/.append style={/tikz/fill=green},
- /pgf/heatmark arc 1/.append style={/tikz/fill=blue},
- /pgf/heatmark ring 2 arc 2/.append style={/tikz/fill=yellow!70!black}
-] \node[heatmark, fill=red] (n) {100};
+ /pgf/ext/heatmark ring 1/.append style={/tikz/fill=green},
+ /pgf/ext/heatmark arc 1/.append style={/tikz/fill=blue},
+ /pgf/ext/heatmark ring 2 arc 2/.append style={/tikz/fill=yellow!70!black}
+] \node[ext_heatmark, fill=red] (n) {100};
\end{codeexample}
It is best to use this shape with no actual border (|draw = none|) and the |outer sep| set to zero.
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark},width=16cm]
\begin{tikzpicture}\Huge
-\node[name=s, shape=heatmark, shape example,
+\node[name=s, shape=ext_heatmark, shape example,
fill=blue!25, draw=none, outer sep=0pt]
{Heatmark\vrule width 1pt height 2cm};
\foreach \anchor/\placement in
@@ -79,5 +79,5 @@
node[\placement] {\scriptsize\texttt{(s.\anchor)}};
\end{tikzpicture}
\end{codeexample}
-\end{shape}
+\end{ext_shape}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -13,32 +13,32 @@
A rectangle with rounded corners.
\end{pgflibrary}
-\begin{shape}{rectangle with rounded corners}
+\begin{ext_shape}{rectangle with rounded corners}
This library provides a |rectangle with rounded corners| where every corner can have a different radius.
-\begin{key}{/pgf/rectangle with rounded corners north west radius=\meta{dimen} (initially .5\string\pgflinewidth)}
+\begin{key}{/\pgfext/rectangle with rounded corners north west radius=\meta{dimen} (initially .5\string\pgflinewidth)}\keycompat{pgf}
Sets the north west radius to \meta{dimen}.
\end{key}
-\begin{key}{/pgf/rectangle with rounded corners north east radius=\meta{dimen} (initially .5\string\pgflinewidth)}
+\begin{key}{/\pgfext/rectangle with rounded corners north east radius=\meta{dimen} (initially .5\string\pgflinewidth)}\keycompat{pgf}
Sets the north east radius to \meta{dimen}.
\end{key}
-\begin{key}{/pgf/rectangle with rounded corners south west radius=\meta{dimen} (initially .5\string\pgflinewidth)}
+\begin{key}{/\pgfext/rectangle with rounded corners south west radius=\meta{dimen} (initially .5\string\pgflinewidth)}\keycompat{pgf}
Sets the south west radius to \meta{dimen}.
\end{key}
-\begin{key}{/pgf/rectangle with rounded corners south east radius=\meta{dimen} (initially .5\string\pgflinewidth)}
+\begin{key}{/\pgfext/rectangle with rounded corners south east radius=\meta{dimen} (initially .5\string\pgflinewidth)}\keycompat{pgf}
Sets the south east radius to \meta{dimen}.
\end{key}
-\begin{key}{/pgf/rectangle with rounded corners radius=\meta{dimen}}
+\begin{key}{/\pgfext/rectangle with rounded corners radius=\meta{dimen}}\keycompat{pgf}
Sets all radii to \meta{dimen}.
\end{key}
\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.rectangleroundedcorners}]
\begin{tikzpicture}\Huge
-\node[name=s, shape=rectangle with rounded corners, shape example,
- rectangle with rounded corners north west radius=10pt,
- rectangle with rounded corners north east radius=20pt,
- rectangle with rounded corners south west radius=30pt,
- rectangle with rounded corners south east radius=40pt] {Rectangle with rounded corners\vrule width 1pt height 2cm};
+\node[name=s, shape=ext_rectangle with rounded corners, shape example,
+ ext/rectangle with rounded corners north west radius=10pt,
+ ext/rectangle with rounded corners north east radius=20pt,
+ ext/rectangle with rounded corners south west radius=30pt,
+ ext/rectangle with rounded corners south east radius=40pt] {Rectangle with rounded corners\vrule width 1pt height 2cm};
\foreach \anchor/\placement in
{north west/above left, north/above, north east/above right,
west/left, center/above, east/right,
@@ -54,5 +54,5 @@
node[\placement] {\scriptsize\texttt{(s.\anchor)}};
\end{tikzpicture}
\end{codeexample}
-\end{shape}
+\end{ext_shape}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -14,7 +14,7 @@
\inspiration{ShapeSuperEllipse-Q}{ShapeSuperEllipse-A}
\end{pgflibrary}
-\begin{shape}{superellipse}
+\begin{ext_shape}{superellipse}
This shape is defined by formula
\begin{equation*}
\biggl|\frac x{r_x}\biggr|^m + \biggl|\frac y{r_y}\biggr|^n = 1
@@ -26,13 +26,13 @@
\end{align*}
where $r_x$ is half the node's width and $r_y$ is half the node's height.
-\begin{key}{/pgf/superellipse x exponent=\meta{x exponent}(initially 2.5)}
+\begin{key}{/\pgfext/superellipse x exponent=\meta{x exponent}(initially 2.5)}\keycompat{pgf}
This sets $m$.
\end{key}
-\begin{key}{/pgf/superellipse y exponent=\meta{y exponent}(initially 2.5)}
+\begin{key}{/\pgfext/superellipse y exponent=\meta{y exponent}(initially 2.5)}\keycompat{pgf}
This sets $n$.
\end{key}
-\begin{key}{/pgf/superellipse step=\meta{step}(initially 5)}
+\begin{key}{/\pgfext/superellipse step=\meta{step}(initially 5)}
This specifies the step of the underlying plot handler.
The smaller \meta{step} is, the slower computation will be.
@@ -39,14 +39,14 @@
Sensible values for \meta{step} are integer dividers of 90, i.\,e.
2, 3, 5, 6, 9, 10, 15, 18, 30 and 45.
\end{key}
-\begin{key}{/pgf/superellipse exponent=\meta{exponent}}
+\begin{key}{/\pgfext/superellipse exponent=\meta{exponent}}\keycompat{pgf}
Sets both |superellipse x exponent| and |superellipse y exponent| to \meta{exponent}.
\end{key}
\paragraph{Notes on Implementation}
For implementing this shape, additional mathematical functions were declared.
-\begin{math-function}{superellipsex(\mvar{t}, \mvar{2/m}, \mvar{$r_x$})}
-\mathcommand
+\begin{math-function}{ext\textunderscore superellipsex(\mvar{t}, \mvar{2/m}, \mvar{$r_x$})}
+\mathcommand[extsuperellipsex(\mvar{t}, \mvar{2/m}, \mvar{$r_x$})]
Returns the $x$ value on a point of the superellipse with its center on the origin following
\begin{equation*}
x = r_x\cos^{2/m} t
@@ -53,8 +53,8 @@
\end{equation*}
for values of $0 \leq t \leq 90$.
\end{math-function}
-\begin{math-function}{superellipsey(\mvar{t}, \mvar{2/n}, \mvar{$r_y$})}
-\mathcommand
+\begin{math-function}{ext\textunderscore superellipsey(\mvar{t}, \mvar{2/n}, \mvar{$r_y$})}
+\mathcommand[extsuperellipsey(\mvar{t}, \mvar{2/m}, \mvar{$r_x$})]
Returns the $y$ value on a point of the superellipse with its center on the origin following
\begin{equation*}
y = r_y\cos^{2/n} t
@@ -63,7 +63,7 @@
\end{math-function}
Both \pgfname math functions can be used at once with the following macro.
-\begin{command}{\pgfmathsuperellipseXY\marg{t}\marg{2/m}\marg{2/n}\marg{a}\marg{b}}
+\begin{command}{\pgfextmathsuperellipseXY\marg{t}\marg{2/m}\marg{2/n}\marg{a}\marg{b}}
Returns the $x$ value (in |\pgfmathresultX|) and the $y$ value (in |\pgfmathresultY|) of the superellipse with its center on the origin following
\begin{align*}
x & = a\cos^{2/m} t \\
@@ -74,15 +74,9 @@
Note: all arguments must be a valid number since they will not be parsed by \pgfname math.
\end{command}
-And additional internal macro was defined following the original naming scheme.
-\def\temp{\begin{command}}%
-\expandafter\temp\expandafter{\csname pgfutil at prefix@macrotomacro\endcsname\marg{macro 1}\marg{macro 2}}
-Adds the once-expansion of \meta{macro 2} in front of \meta{macro 1}.
-\end{command}
-
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.superellipse}]
-\begin{tikzpicture}[superellipse step=1]\Huge
-\node[name=s,shape=superellipse,shape example] {Superellipse\vrule width 1pt height 2cm};
+\begin{tikzpicture}[ext/superellipse step=1]\Huge
+\node[name=s,shape=ext_superellipse,shape example] {Superellipse\vrule width 1pt height 2cm};
\foreach \anchor/\placement in
{north west/above left, north/above, north east/above right,
west/left, center/above, east/right,
@@ -98,8 +92,8 @@
\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.shapes.superellipse}]
\begin{tikzpicture}[minimum width=1cm, minimum height=3cm]
\foreach \xe/\ye[count=\i] in {.5/.5, 1/1, 2/2, 3/3, .5/5}
- \node[draw, superellipse, superellipse x exponent=\xe, superellipse y exponent=\ye] at (1.5*\i,0) {};
+ \node[draw, ext_superellipse, ext/superellipse x exponent=\xe, ext/superellipse y exponent=\ye] at (1.5*\i,0) {};
\end{tikzpicture}
\end{codeexample}
-\end{shape}
+\end{ext_shape}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-uncentered.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-uncentered.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-uncentered.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -13,7 +13,7 @@
A rectangle that has a variable horizontal center with three node parts.
\inspiration{UncRectCD-Q,UncRectForest-Q}{UncRectCD-A,UncRectForest-A}
\end{purepgflibrary}
-\begin{shape}{uncentered rectangle}
+\begin{ext_shape}{uncentered rectangle}
For some alignment problems, this shape could be useful.
@@ -24,7 +24,7 @@
When edges are to be connected with this shape, the
following key changes to which inner center this shape will
calculate the appropriate point on the border.
-\begin{key}{/pgf/uncentered rectangle center=\meta{left}\textrm{ or }\meta{text}\textrm{ or }\meta{right}\textrm{ or }\meta{real} (initially text)}
+\begin{key}{/\pgfext/uncentered rectangle center=\meta{left}\textrm{ or }\meta{text}\textrm{ or }\meta{right}\textrm{ or }\meta{real} (initially text)}\keycompat{pgf}
Sets the center that is to be used for connecting edges.
This will also move the anchors |north|, |mid|, |base| and |south| along.
@@ -31,7 +31,7 @@
In the picture below, this are marked red.
\end{key}
-\begin{key}{/pgf/uncentered rectangle use saved center=\meta{true}\textrm{ or }\meta{false} (default true)}
+\begin{key}{/\pgfext/uncentered rectangle use saved center=\meta{true}\textrm{ or }\meta{false} (default true)}\keycompat{pgf}
When this is set to true, the border anchors will use the horizontal center that was used when
the node was created.
\end{key}
@@ -38,7 +38,7 @@
For support of the \referenceLibraryandIndexO{cd} library of the |tikz-cd| package,
this shape also supports a dynamic $y$ value for its anchors |center|, |west| and |east|.
-\begin{key}{/pgf/uncentered rectangle center yshift=\meta{dimension} (initially \{\})}
+\begin{key}{/\pgfext/uncentered rectangle center yshift=\meta{dimension} (initially \{\})}\keycompat{pgf}
This determines the distance between the baseline and the |center| anchors.
If \meta{dimension} is empty, the real vertical center will be used.
@@ -49,7 +49,7 @@
\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.uncenteredrectangle}]
\begin{tikzpicture}[style north/.style=red, style south/.style=red, style center/.style=red, style base/.style=red, style mid/.style=red]
\Huge
-\node[shape example, name=n, uncentered rectangle]
+\node[shape example, name=n, ext_uncentered rectangle]
{centered \nodepart{left} Un \nodepart{right} \space Rectangle\vrule width 1pt height 2cm}
foreach \anchor/\pos in {
north west/above left, north/below, north east/above right, real north/above, left north/above, right north/above, text north/above,
@@ -62,7 +62,7 @@
node[inner sep=.1em, style \anchor/.try, style/.expand once=\pos] {\tiny\ttfamily\anchor}};
\end{tikzpicture}
\end{codeexample}
-\end{shape}
+\end{ext_shape}
\begin{tikzlibrary}{ext.shapes.uncenteredrectangle}
This library extends the \referenceLibraryandIndexO{cd} library (from the |tikz-cd| package)
@@ -72,7 +72,7 @@
\end{tikzlibrary}
This library provides only one key.
-\begin{stylekey}{/tikz-ext/tikz-cd fix}
+\begin{stylekey}{/\tikzext/tikz-cd fix}\keycompat{tikz-ext}
This key installs various \enquote{fixes} to the \referenceKeyandIndexO[/tikz/commutative diagrams/]{every diagram} style:
\begin{itemize}
@@ -82,19 +82,19 @@
with multipart nodes.}
\item The helpful macro |\uncrec| will be installed.
\begin{command}{\uncrec\marg{left}\marg{center}\marg{right}}
- When used as the content of |uncentered rectangle|,
+ When used as the content of a |ext_uncentered rectangle| shape,
the node parts will be setup so that \meta{left} is in the left part of the node part etc.
\end{command}
-\item Since math mode will be disabled with the |uncentered rectangle|, it is automatically enabled for each node part with |\uncrec| but it can be disabled with the following key.
+\item Since math mode will be disabled with the |ext_uncentered rectangle|, it is automatically enabled for each node part with |\uncrec| but it can be disabled with the following key.
\begin{key}{/tikz/uncrec math mode=\meta{true}\textrm{ or }\meta{false} (default true)}
When enabled the contents of |\uncrec| will be set in math mode.
\end{key}
\item For easy access to the |uncentered rectangle| shape, the following keys are available inside a Commutative Diagram.
\begin{stylekey}{/tikz/uncrec=\meta{left}\textrm{ or }\meta{text}\textrm{ or }\meta{right}\textrm{ or }\meta{real} (initially text)}
-This key sets the shape to |uncentered rectangle| and \referenceKeyandIndex[/pgf/]{uncentered rectangle center} to its argument.
+This key sets the shape to |ext_uncentered rectangle| and \referenceKeyandIndex[/\pgfext/]{uncentered rectangle center} to its argument.
\end{stylekey}
\begin{stylekey}{/tikz/commutative diagrams/install uncentered rectangle in columns=\meta{column}}
-All nodes in column \meta{column} will be set to the |uncentered rectangle| shape.
+All nodes in column \meta{column} will be set to the |ext_uncentered rectangle| shape.
\end{stylekey}
\end{itemize}
\end{stylekey}
@@ -103,7 +103,7 @@
\tikzexternaldisable
%\catcode`\|=12
\begin{codeexample}[leave comments, width=8cm, preamble=\usetikzlibrary{cd, ext.shapes.uncenteredrectangle}]
-\tikzcdset{/tikz-ext/tikz-cd fix}
+\tikzextset{tikz-cd fix}
\newcommand*\C[1]{C_{\%_{#1}}}
\begin{tikzcd}[
sep=tiny,
@@ -117,7 +117,7 @@
\end{tikzcd}
\end{codeexample}
\begin{codeexample}[leave comments, width=8cm, preamble=\usetikzlibrary{cd, ext.shapes.uncenteredrectangle}]
-\tikzset{/tikz-ext/tikz-cd fix}
+\tikzextset{tikz-cd fix}
\begin{tikzcd}[install uncentered rectangle in column/.list={1,2}]
\uncrec{S \supset {}}{U_\tau}{} \arrow[r, "\varphi_0"]
\arrow[d, "\tau", "\sim"']
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -56,16 +56,16 @@
\switchcolumn*% <
-\begin{command}{\pgftransformxmirror\marg{value}}
+\begin{command}{\pgfexttransformxmirror\marg{value}}\cmdcompat\pgftransformxmirror
Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$.
-\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}]
+\begin{codeexample}[preamble=\usepgflibrary{ext.transformations.mirror}]
\begin{tikzpicture}
\draw[help lines] (-.25, -.25) grid (3.25, 1.25);
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (1.5, -.25) -- (1.5, 1.25);
-\pgftransformxmirror{1.5}
+\pgfexttransformxmirror{1.5}
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
@@ -74,16 +74,16 @@
\switchcolumn% >
-\begin{command}{\pgftransformxMirror\marg{value}}
+\begin{command}{\pgfexttransformxMirror\marg{value}}\cmdcompat\pgftransformxMirror
Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$.
-\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}]
+\begin{codeexample}[preamble=\usepgflibrary{ext.transformations.mirror}]
\begin{tikzpicture}
\draw[help lines] (-.25, -.25) grid (3.25, 1.25);
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (1.5, -.25) -- (1.5, 1.25);
-\pgftransformxMirror{1.5}
+\pgfexttransformxMirror{1.5}
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
@@ -92,21 +92,21 @@
\switchcolumn*% <
-\begin{command}{\pgftransformymirror\marg{value}}
+\begin{command}{\pgfexttransformymirror\marg{value}}\cmdcompat\pgftransformymirror
Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$.
\end{command}
-\begin{command}{\pgftransformmirror\marg{point A}\marg{point B}}
+\begin{command}{\pgfexttransformmirror\marg{point A}\marg{point B}}\cmdcompat\pgftransformmirror
Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}.
-\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}]
+\begin{codeexample}[preamble=\usepgflibrary{ext.transformations.mirror}]
\begin{tikzpicture}
\draw[help lines] (-.25, -2.25) grid (2.5, 1.25);
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (0, -1) -- (2, 0);
-\pgftransformmirror{\pgfpointxy{0}{-1}}
- {\pgfpointxy{2}{ 0}}
+\pgfexttransformmirror{\pgfpointxy{0}{-1}}
+ {\pgfpointxy{2}{ 0}}
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
@@ -115,21 +115,21 @@
\switchcolumn% >
-\begin{command}{\pgftransformyMirror\marg{value}}
+\begin{command}{\pgfexttransformyMirror\marg{value}}\cmdcompat\pgftransformyMirror
Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$.
\end{command}
-\begin{command}{\pgftransformMirror\marg{point A}\marg{point B}}
+\begin{command}{\pgfexttransformMirror\marg{point A}\marg{point B}}\cmdcompat\pgftransformMirror
Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}.
-\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}]
+\begin{codeexample}[preamble=\usepgflibrary{ext.transformations.mirror}]
\begin{tikzpicture}
\draw[help lines] (-.25, -2.25) grid (2.5, 1.25);
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (0, -1) -- (2, 0);
-\pgftransformMirror{\pgfpointxy{0}{-1}}
- {\pgfpointxy{2}{ 0}}
+\pgfexttransformMirror{\pgfpointxy{0}{-1}}
+ {\pgfpointxy{2}{ 0}}
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
@@ -138,16 +138,16 @@
\switchcolumn*% <
-\begin{command}{\pgfqtransformmirror\marg{point A}}
+\begin{command}{\pgfextqtransformmirror\marg{point A}}\cmdcompat\pgfqtransformmirror
Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}.
-\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}]
+\begin{codeexample}[preamble=\usepgflibrary{ext.transformations.mirror}]
\begin{tikzpicture}
\draw[help lines] (-.25, -.25) grid (2.25, 1.25);
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (0, 0) -- (2, 1);
-\pgfqtransformmirror{\pgfpointxy{2}{1}}
+\pgfextqtransformmirror{\pgfpointxy{2}{1}}
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
@@ -156,16 +156,16 @@
\switchcolumn
-\begin{command}{\pgfqtransformMirror\marg{point A}}
+\begin{command}{\pgfextqtransformMirror\marg{point A}}\cmdcompat\pgfqtransformMirror
Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}.
-\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}]
+\begin{codeexample}[preamble=\usepgflibrary{ext.transformations.mirror}]
\begin{tikzpicture}
\draw[help lines] (-.25, -.25) grid (2.25, 1.25);
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\draw[dashed] (0, 0) -- (2, 1);
-\pgfqtransformMirror{\pgfpointxy{2}{1}}
+\pgfextqtransformMirror{\pgfpointxy{2}{1}}
\draw[-latex] (0,0) .. controls (.5,1) .. (1,1);
\end{tikzpicture}
Modified: trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.bib 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.bib 2025-03-19 20:20:49 UTC (rev 74702)
@@ -166,7 +166,7 @@
@Misc{FullArc-A,
author = {Qrrbrbirlbel},
month = nov,
- title = {Answer to "{A} rather difficult ring like picture to be drawn"},
+ title = {Answer to \enquote{{A} rather difficult ring like picture to be drawn}},
year = {2013},
file = {Snapshot:https\://tex.stackexchange.com/questions/144293/a-rather-difficult-ring-like-picture-to-be-drawn/144297#144297:text/html},
url = {https://tex.stackexchange.com/a/144297/16595},
@@ -597,4 +597,55 @@
year = {2022},
}
+ at Online{PgfIssueSloped,
+ abstract = {Brief outline of the proposed feature Inspired by this {SX} question and this older one, I would like to suggest that we should consider the current transformation when computing the slope of the slo...},
+ file = {Snapshot:https\://github.com/pgf-tikz/pgf/issues/1058:text/html},
+ langid = {english},
+ title = {`sloped` should consider the current transformation · Issue \#1058 · pgf-tikz/pgf},
+ url = {https://github.com/pgf-tikz/pgf/issues/1058},
+ urldate = {2023-10-21},
+}
+
+ at Online{AutoBend-Q,
+ author = {Munn, Alan},
+ file = {Snapshot:https\://tex.stackexchange.com/questions/699883/determine-tikz-bend-direction-automatically/699919?noredirect=1#comment1739897_699919:text/html},
+ month = oct,
+ title = {Determine {TikZ} bend direction automatically},
+ titleaddon = {{TeX} - {LaTeX} Stack Exchange},
+ url = {https://tex.stackexchange.com/q/699883/16595},
+ urldate = {2023-10-31},
+ year = {2023},
+}
+
+ at Online{AutoBend-A,
+ author = {Qrrbrbirlbel},
+ file = {Snapshot:https\://tex.stackexchange.com/questions/699883/determine-tikz-bend-direction-automatically/699919?noredirect=1#comment1739897_699919:text/html},
+ month = oct,
+ title = {Answer to \enquote{Determine {TikZ} bend direction automatically}},
+ titleaddon = {{TeX} - {LaTeX} Stack Exchange},
+ url = {https://tex.stackexchange.com/a/699919/16595},
+ urldate = {2023-10-31},
+ year = {2023},
+}
+
+ at Software{memoize,
+ abstract = {A cross-format package for externalization of graphics and memoization of compilation results in general},
+ author = {Živanović, Sašo},
+ keywords = {tex, latex, cache, externalization},
+ month = oct,
+ note = {original-date: 2020-05-19T09:58:52Z},
+ rights = {{LPPL}-1.3c},
+ title = {Memoize},
+ url = {https://github.com/sasozivanovic/memoize},
+ urldate = {2023-11-05},
+ year = {2023},
+}
+
+ at Article{pgfmanual,
+ author = {Till Tantau},
+ title = {The TikZ and PGF Packages: Manual for version 3.1.10},
+ year = {2023},
+ month = jan,
+}
+
@Comment{jabref-meta: databaseType:bibtex;}
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 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -9,24 +9,9 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-
\documentclass[a4paper,doc2,landscape]{ltxdoc}
-
\input{tikz-ext-manual-en-main-preamble.tex}
-\usetikzlibrary{external}
-%\newif\iftikzextmanualexternalize
-%\tikzextmanualexternalizetrue
-%\iftikzextmanualexternalize
- \tikzexternalize[
- prefix=tikz/,
-% mode=convert with system call,
- %mode=list and make,
- %mode=list only,export=true,% simply skips EVERY picture -> good for debugging the text.
- ]
- \tikzexternalenable
- \tikzifexternalizing{%
- \pgfkeys{/pdflinks/codeexample links=false}%
- }{}%
-%\fi
-
+\let\tikzexternaldisable\relax
+\def\tikzsetnextfilename#1{}
+\def\tikzsetfigurename#1{}
\input{tikz-ext-manual-en-main-body.tex}
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfcalendar-ext.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfcalendar-ext.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfcalendar-ext.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,7 +5,12 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\pgfqkeys{/pgf/calendar}{
+
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\pgfqkeys{/pgf/calendar/ext}{
style/.style={#1},
yesterday/.value required,
yesterday/.code={%
@@ -92,7 +97,7 @@
\fi
\fi},
week of month'/.code={%
- \pgfcalendar at getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil at tempcnta
+ \pgfextcalendar at getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil at tempcnta
\advance\pgfutil at tempcnta1
\pgfutil at tempcntb=#1\relax
\multiply\pgfutil at tempcntb7
@@ -104,11 +109,11 @@
\fi
\fi},
first/.code={\pgfutil at in@:{#1}\ifpgfutil at in@
- \pgfcalendar at ifdate@first{}#1\pgf at stop\else
- \pgfcalendar at ifdate@first{}1:#1\pgf at stop\fi},
+ \pgfextcalendar at ifdate@first{}#1\pgf at stop\else
+ \pgfextcalendar at ifdate@first{}1:#1\pgf at stop\fi},
last/.code={\pgfutil at in@:{#1}\ifpgfutil at in@
- \pgfcalendar at ifdate@first'#1\pgf at stop\else
- \pgfcalendar at ifdate@first'1:#1\pgf at stop\fi},
+ \pgfextcalendar at ifdate@first'#1\pgf at stop\else
+ \pgfextcalendar at ifdate@first'1:#1\pgf at stop\fi},
% logic
not/.value required,
not/.code=%
@@ -120,7 +125,7 @@
and/.code=% and = {<cond 1>, <cond 2>, <cond 3>, …}
\begingroup
\pgfcalendarmatchestrue
- \pgfqkeys{/pgf/calendar/and}{#1}%
+ \pgfqkeys{/pgf/calendar/ext/and}{#1}%
\ifpgfcalendarmatches % is it still true?
\expandafter\pgfutil at firstoftwo
\else
@@ -156,7 +161,7 @@
\fi},
calendar week of month'/.code={%
\begingroup
- \pgfcalendar at getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil at tempcnta
+ \pgfextcalendar at getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil at tempcnta
\advance\pgfutil at tempcnta by -\pgfcalendarifdateday\relax
\edef\pgfcalendarifdateday{\the\pgfutil at tempcnta}%
\pgfutil at tempcnta=-\pgfcalendarifdateweekday\relax
@@ -163,16 +168,16 @@
\advance\pgfutil at tempcnta by 5
\edef\pgfcalendarifdateweekday{\the\pgfutil at tempcnta}%
\let\pgf at cal@temp\pgfutil at empty
- \pgfcalendar at launch@ifdate{calendar week of month={#1}}{\def\pgf at cal@temp{\pgfcalendarmatchestrue}}{}%
+ \pgfcalendar at launch@ifdate{ext/calendar week of month={#1}}{\def\pgf at cal@temp{\pgfcalendarmatchestrue}}{}%
\expandafter\endgroup\pgf at cal@temp}}
-\def\pgfcalendar at ifdate@first#1#2:#3\pgf at stop{%
- \pgfqkeys{/pgf/calendar}{and={#3, week of month#1={#2}}}}
-\def\pgfcalendar at getlastYMX#1#2#3{% #1 = year, #2 = month, #3 := last day
+\def\pgfextcalendar at ifdate@first#1#2:#3\pgf at stop{%
+ \pgfqkeys{/pgf/calendar/ext}{and={#3, week of month#1={#2}}}}
+\def\pgfextcalendar at getlastYMX#1#2#3{% #1 = year, #2 = month, #3 := last day
\begingroup
\ifnum#2=2 % stupid February
\pgfcalendarmatchesfalse
- \pgfqkeys{/pgf/calendar}{leap year={#1}}%
+ \pgfqkeys{/pgf/calendar/ext}{leap year={#1}}%
\ifpgfcalendarmatches
#3=29
\else
@@ -189,8 +194,8 @@
%
% weeks
%
-\def\pgfcalendar at week@setup#1{%
- \pgfutil at IfUndefined{pgfcalendar at week@#1}{%
+\def\pgfextcalendar at week@setup#1{%
+ \pgfutil at IfUndefined{pgfextcalendar at week@#1}{%
\begingroup
\pgfcalendardatetojulian{#1-01-01}\pgfutil at tempcnta
\pgfcalendarjuliantoweekday\pgfutil at tempcnta\pgfutil at tempcntb
@@ -206,24 +211,24 @@
\advance\pgfutil at tempcnta by 7\relax
\fi
% setup macro for year with {Julian number for day of first week}{weekday of -01-01}
- \expandafter\xdef\csname pgfcalendar at week@#1\endcsname{{\the\pgfutil at tempcnta}{\the\pgfutil at tempcntb}}%
+ \expandafter\xdef\csname pgfextcalendar at week@#1\endcsname{{\the\pgfutil at tempcnta}{\the\pgfutil at tempcntb}}%
\endgroup
}{}%
}
-\def\pgfcalendarjulianyeartoweek#1#2#3{\pgfcalendarjulianyeartoweek@{#1}{#2}{#3}{\iftrue}}
-\def\pgfcalendarjulianyeartoweek@#1#2#3#4{%
+\def\pgfextcalendarjulianyeartoweek#1#2#3{\pgfextcalendarjulianyeartoweek@{#1}{#2}{#3}{\iftrue}}
+\def\pgfextcalendarjulianyeartoweek@#1#2#3#4{%
% #1 = julian date (count)
% #2 = year
% #3 = count that holds the week at the end
- % #4 = \iftrue or \iffalse: whether week 53 needs to be checked (\iffalse when determing week from next year)
+ % #4 = \iftrue or \iffalse: whether week 53 needs to be checked (\iffalse when determining week from next year)
\begingroup
- \pgfcalendar at week@setup{#2}%
+ \pgfextcalendar at week@setup{#2}%
#3=#1\relax
%
% calculate difference of days between current date and start of week 1
%
- \advance#3 by -\expandafter\expandafter\expandafter\pgfutil at firstoftwo\csname pgfcalendar at week@#2\endcsname\relax
+ \advance#3 by -\expandafter\expandafter\expandafter\pgfutil at firstoftwo\csname pgfextcalendar at week@#2\endcsname\relax
\ifnum#3<0\relax % whoops, we are in the week of the previous year
\expandafter\pgfutil at firstoftwo
\else
@@ -230,7 +235,7 @@
\expandafter\pgfutil at secondoftwo
\fi
{% if first day of the year is Fri, Sat or Sun
- \ifnum\expandafter\expandafter\expandafter\pgfutil at secondoftwo\csname pgfcalendar at week@#2\endcsname>3\relax
+ \ifnum\expandafter\expandafter\expandafter\pgfutil at secondoftwo\csname pgfextcalendar at week@#2\endcsname>3\relax
\expandafter\pgfutil at firstoftwo
\else
\expandafter\pgfutil at secondoftwo
@@ -238,11 +243,11 @@
{% we need to check the week of the previous year
#3=#2\relax
\advance#3 by -1
- \edef\pgf at cal@temp{\noexpand\pgfcalendarjulianyeartoweek@{#1}{\the#3}{#3}\noexpand\iffalse}%
+ \edef\pgf at cal@temp{\noexpand\pgfextcalendarjulianyeartoweek@{#1}{\the#3}{#3}\noexpand\iffalse}%
\pgf at cal@temp
}{% yeah, it's weird
\divide#3 by 7
- \advance#3 by 1
+ \advance#3 by 1
}%
}{%
\divide#3 by 7
@@ -263,8 +268,8 @@
% check whether we're already in week 1 of the next year
#3=#2\relax
\advance#3 by 1
- \expandafter\pgfcalendar at week@setup\expandafter{\the#3}%
- \ifnum#1<\expandafter\expandafter\expandafter\pgfutil at firstoftwo\csname pgfcalendar at week@\the#3\endcsname\relax
+ \expandafter\pgfextcalendar at week@setup\expandafter{\the#3}%
+ \ifnum#1<\expandafter\expandafter\expandafter\pgfutil at firstoftwo\csname pgfextcalendar at week@\the#3\endcsname\relax
#3=53
\else
#3=1
@@ -287,79 +292,40 @@
% n0: leading zero
%
\expandafter\def\csname pgfcalendar at shorthand@n-\endcsname{%
- \if0\pgfcalendarcurrentweek\else\pgfcalendarcurrentweek\fi}
+ \if0\pgfextcalendarcurrentweek\else\pgfextcalendarcurrentweek\fi}
\expandafter\def\csname pgfcalendar at shorthand@n=\endcsname{%
- {\pgfutil at tempcnta=\pgfcalendarcurrentweek\relax\ifnum\pgfutil at tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil at tempcnta}}
+ {\pgfutil at tempcnta=\pgfextcalendarcurrentweek\relax\ifnum\pgfutil at tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil at tempcnta}}
\expandafter\def\csname pgfcalendar at shorthand@n0\endcsname{%
- \pgfcalendarcurrentweek}
+ \pgfextcalendarcurrentweek}
-%
-% Overwriting original \pgfcalendar
-%
+\let\tikzextorig at pgfcalendar\pgfcalendar
\long\def\pgfcalendar#1#2#3#4{%
- \begingroup%
- % Setup local \ifdate
- \let\ifdate=\pgfcalendar at local@ifdate%
- % Let's start with computing start and end dates...
- \def\pgfcalendarprefix{#1}%
- \pgfcalendardatetojulian{#2}{\pgfcalendarcurrentjulian}%
- \edef\pgfcalendarbeginjulian{\the\pgfcalendarcurrentjulian}%
- \edef\pgfcalendarbeginiso{#2}%
- \pgfcalendardatetojulian{#3}{\pgfutil at tempcnta}%
- \edef\pgfcalendarendjulian{\the\pgfutil at tempcnta}%
- \advance\pgfutil at tempcnta by1\relax%
- \edef\pgfcalendarendjulianplus{\the\pgfutil at tempcnta}%
- \edef\pgfcalendarendiso{#3}%
- %
- % Start main loop
- %
- \loop%
- \ifnum\pgfcalendarcurrentjulian<\pgfcalendarendjulianplus\relax%
- % Setup information about current date
- \pgfcalendarjuliantodate{\pgfcalendarcurrentjulian}%
- {\pgfcalendarcurrentyear}{\pgfcalendarcurrentmonth}{\pgfcalendarcurrentday}%
- \pgfcalendarjuliantoweekday{\pgfcalendarcurrentjulian}{\pgfutil at tempcntb}%
- \edef\pgfcalendarcurrentweekday{\the\pgfutil at tempcntb}%
- \pgfcalendarjulianyeartoweek{\pgfcalendarcurrentjulian}{\pgfcalendarcurrentyear}{\pgfutil at tempcntb}%
- \edef\pgfcalendarcurrentweek{\ifnum\pgfutil at tempcntb<10 0\fi\the\pgfutil at tempcntb}%
- % Render:
- #4%
- % Advance day:
- \advance\pgfcalendarcurrentjulian by1\relax%
- \repeat%
- \endgroup%
+ \tikzextorig at pgfcalendar{#1}{#2}{#3}{%
+ \pgfextcalendarjulianyeartoweek{\pgfcalendarcurrentjulian}{\pgfcalendarcurrentyear}{\pgfutil at tempcntb}%
+ \edef\pgfextcalendarcurrentweek{\ifnum\pgfutil at tempcntb<10 0\fi\the\pgfutil at tempcntb}%
+ #4%
+ }%
}
%
-% Overwriting original \pgfcalendar at local@ifdate
+% Patching original \pgfcalendar at local@ifdate
%
-\def\pgfcalendar at local@ifdate{%
- \let\pgfcalendarifdatejulian=\pgfcalendarcurrentjulian
- \let\pgfcalendarifdateyear=\pgfcalendarcurrentyear
- \let\pgfcalendarifdatemonth=\pgfcalendarcurrentmonth
- \let\pgfcalendarifdateday=\pgfcalendarcurrentday
- \let\pgfcalendarifdateweekday=\pgfcalendarcurrentweekday
- \let\pgfcalendarifdateweek=\pgfcalendarcurrentweek
- \pgfcalendar at launch@ifdate%
+\tikzextutil at prefixtomacro\pgfcalendar at local@ifdate{%
+ \let\pgfextcalendarifdateweekday=\pgfextcalendarcurrentweekday
}
%
-% Overwritigin original \pgfcalendarifdate
+% Overwriting original \pgfcalendarifdate
%
-\def\pgfcalendarifdate#1#2#3#4{%
- \pgfcalendardatetojulian{#1}{\pgfutil at tempcnta}%
- \pgfcalendarjuliantodate{\pgfutil at tempcnta}
- {\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}%
- \edef\pgfcalendarifdatejulian{\the\pgfutil at tempcnta}%
- % Compute info about date
- \pgfcalendarjuliantoweekday{\pgfutil at tempcnta}{\pgfutil at tempcntb}%
- \edef\pgfcalendarifdateweekday{\the\pgfutil at tempcntb}%
- \pgfcalendarjulianyeartoweek{\pgfcalendarifdatejulian}{\pgfcalendarifdateyear}{\pgfutil at tempcntb}%
- \edef\pgfcalendarifdateweek{\ifnum\pgfutil at tempcntb<10 0\fi\the\pgfutil at tempcntb}%
+
+\let\tikzextorig at pgfcalendar@launch at ifdate\pgfcalendar at launch@ifdate
+\def\pgfcalendar at launch@ifdate{%
+ \pgfextcalendarjulianyeartoweek{\pgfcalendarifdatejulian}{\pgfcalendarifdateyear}{\pgfutil at tempcntb}%
+ \edef\pgfextcalendarifdateweek{\ifnum\pgfutil at tempcntb<10 0\fi\the\pgfutil at tempcntb}%
%
- \pgfcalendar at launch@ifdate{#2}{#3}{#4}%
+ \tikzextorig at pgfcalendar@launch at ifdate
}
-\pgfqkeys{/pgf/calendar/week}{.value required,.code={\ifnum#1=\pgfcalendarifdateweek\relax\expandafter\pgfcalendarmatchestrue\fi}}
+\pgfqkeys{/pgf/calendar/ext/week}{.value required,.code={\ifnum#1=\pgfcalendarifdateweek\relax\expandafter\pgfcalendarmatchestrue\fi}}
% Overwriting shorthands of pgfcalendar
\expandafter\def\csname pgfcalendar at shorthand@d-\endcsname{%
@@ -367,4 +333,37 @@
\expandafter\def\csname pgfcalendar at shorthand@m-\endcsname{%
\if0\pgfcalendarcurrentmonth\else\pgfcalendarcurrentmonth\fi}
-\endinput
\ No newline at end of file
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={pgfcalendar-ext}{pre 0.6},
+ compat/pgfcalendar-ext/warn/.append code={%
+ \pgfutil at for\tikzext at temp:=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,%
+ leap year,and,not,week of month,week of month',calendar week of month,%
+ calendar week of month',yesterday,week\do{%
+ \pgfkeys at expanded{\noexpand\tikzextutil at compatwarning@key
+ {pgfcalendar-ext}{pre 0.6}{/pgf/calendar/\tikzext at temp}{/pgf/calendar/ext/\tikzext at temp}%
+ }%
+ }%
+ \pgfkeyssetvalue{/pgf/calendar/leap year/. at def}{\pgfcalendarifdateyear}%
+ \pgfkeyssetvalue{/pgf/calendar/calendar week of month/. at def}{1}%
+ \pgfkeyssetvalue{/pgf/calendar/calendar week of month'/. at def}{1}%
+ \tikzextutil at compatwarning@cmd{pgfcalendar-ext}{pre 0.6}
+ {pgfcalendarjulianyeartoweek}\pgfextcalendarjulianyeartoweek\tikzextutil at gobblethree
+ \def\pgfcalendarcurrentweek{\pgfextcalendarcurrentweek}% no warning possible
+ \def\pgfcalendarifdateweek{\pgfextcalendarifdateweek}% no warning possible
+ },
+ compat/pgfcalendar-ext/pre 0.6/.append code={%
+ \pgfutil at for\tikzext at temp:=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,%
+ leap year,and,not,week of month,week of month',calendar week of month,%
+ calendar week of month',yesterday,week\do{%
+ \pgfkeysedef{/pgf/calendar/\tikzext at temp}{%
+ \noexpand\pgfkeysvalueof{/pgf/calendar/ext/\tikzext at temp/. at cmd}##1\noexpand\pgfeov
+ }%
+ \let\pgfcalendarjulianyeartoweek\pgfextcalendarjulianyeartoweek
+ \def\pgfcalendarcurrentweek{\pgfextcalendarcurrentweek}%
+ \def\pgfcalendarifdateweek{\pgfextcalendarifdateweek}%
+ }%
+ },
+ compat/pgfcalendar-ext/\pgfkeysvalueof{/tikz/ext/compat/pgfcalendar-ext}%
+}
+\endinput
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgffor-ext.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgffor-ext.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgffor-ext.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -12,62 +12,84 @@
%% this allows to use \foreach[use int={start to end step delta}] without(!) a list in {}
%% the values start, end and delta are evaluated by PGFmath at the start of the loop.
%% In addition to use int, there's also use float.
-\newif\iftikzext at pgf@foreach at no@list
-\pgfqkeys{/pgf/foreach}{
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\newif\iftikzext at pgffor@nolist
+\let\tikzextorig at pgffor@scan\pgffor at scan
+\pgfqkeys{/pgf/foreach/ext}{
normal list/.code={%
- \tikzext at pgf@foreach at no@listfalse
- \def\pgffor at scan{\pgfutil at ifnextchar({\pgffor at scanround}{\pgffor at scanone}}%
+ \tikzext at pgffor@nolistfalse
+ \let\pgffor at scan\tikzextorig at pgffor@scan
},
no separator/.code={% token for token
- \def\pgffor at scan@custom##1{%
+ \def\tikzext at pgffor@scan at custom##1{%
\def\pgffor at value{##1}%
\pgffor at scanned
}%
- \def\pgffor at scan@custom at comma,{%
+ \def\tikzext at pgffor@scan at custom@comma,{%
\pgfutil at ifnextchar\pgffor at stop
\pgffor at scanone
- {\pgffor at scan@custom,}%
+ {\tikzext at pgffor@scan at custom,}%
}%
\def\pgffor at scan{%
\pgfutil at ifnextchar,%
- \pgffor at scan@custom at comma
+ \tikzext at pgffor@scan at custom@comma
{%
\pgfutil at ifnextchar\pgffor at stop
\pgffor at scanone
- \pgffor at scan@custom
+ \tikzext at pgffor@scan at custom
}%
}%
},
use int/.code={%
- \tikzext at pgf@foreach at no@list at parse@to\pgfmathtruncatemacro#1\pgffor at stop
+ \tikzext at pgffor@nolist at parse\pgfmathtruncatemacro#1\pgffor at stop
},
use float/.code={%
- \tikzext at pgf@foreach at no@list at parse@to\pgfmathsetmacro#1\pgffor at stop
+ \tikzext at pgffor@nolist at parse\pgfmathsetmacro#1\pgffor at stop
}
}
-\def\tikzext at pgf@foreach at no@list at parse@to#1#2to#3\pgffor at stop{%
- \tikzext at pgf@foreach at no@listtrue
+\def\tikzext at pgffor@nolist at parse#1#2to#3\pgffor at stop{%
+ \tikzext at pgffor@nolisttrue
#1\foreachStart{#2}%
\pgfutil at in@{step}{#3}
\ifpgfutil at in@
- \tikzext at pgf@foreach at no@list at parse@step{#1}#3\pgffor at stop
+ \tikzext at pgffor@nolist at parse@step{#1}#3\pgffor at stop
\else
- \tikzext at pgf@foreach at no@list at parse@step{#1}#3step1\pgffor at stop
+ \tikzext at pgffor@nolist at parse@step{#1}#3step1\pgffor at stop
\fi
- \edef\tikzext at pgf@foreach at no@list at list{\foreachStart,\foreachSecond,...,\foreachEnd}%
+ \edef\tikzext at pgffor@nolist at list{\foreachStart,\foreachSecond,...,\foreachEnd}%
}
-\def\tikzext at pgf@foreach at no@list at parse@step#1#2step#3\pgffor at stop{%
+\def\tikzext at pgffor@nolist at parse@step#1#2step#3\pgffor at stop{%
#1\foreachEnd{#2}%
#1\foreachSecond{\foreachStart+#3}%
}
-\def\pgffor at vars{%
- \pgfutil at ifnextchar i{\pgffor@@vars at end}{%
- \pgfutil at ifnextchar[{\pgffor@@vars at opt}{%]
- \pgfutil at ifnextchar/{\pgffor@@vars at slash@gobble}{%
- \iftikzext at pgf@foreach at no@list\expandafter\pgfutil at firstoftwo\else
- \expandafter\pgfutil at secondoftwo\fi
- {\tikzext at pgf@foreach at no@listfalse\pgffor at macro@list\tikzext at pgf@foreach at no@list at list}
- {\pgffor@@vars}}}}}%
+\let\tikzextorig at pgffor@@vars\pgffor@@vars
+\def\pgffor@@vars{%
+ \iftikzext at pgffor@nolist\expandafter\pgfutil at firstoftwo\else
+ \expandafter\pgfutil at secondoftwo\fi
+ {\tikzext at pgffor@nolistfalse\pgffor at macro@list\tikzext at pgffor@nolist at list}
+ {\tikzextorig at pgffor@@vars}%
+}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={pgffor-ext}{pre 0.6},
+ compat/pgffor-ext/warn/.append code={%
+ \tikzextutil at compatwarning@key{pgffor-ext}{pre 0.6}{/pgf/foreach/normal list}{/pgf/foreach/ext/normal list}%
+ \tikzextutil at compatwarning@key{pgffor-ext}{pre 0.6}{/pgf/foreach/no separator}{/pgf/foreach/ext/no separator}%
+ \tikzextutil at compatwarning@key{pgffor-ext}{pre 0.6}{/pgf/foreach/use int}{/pgf/foreach/ext/use int}%
+ \tikzextutil at compatwarning@key{pgffor-ext}{pre 0.6}{/pgf/foreach/use float}{/pgf/foreach/ext/use float}%
+ },
+ compat/pgffor-ext/pre 0.6/.append code={%
+ \pgfkeysdef{/pgf/foreach/normal list}{\pgfkeysvalueof{/pgf/foreach/ext/normal list/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/foreach/no separator}{\pgfkeysvalueof{/pgf/foreach/ext/no separator/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/foreach/use int}{\pgfkeysvalueof{/pgf/foreach/ext/use int/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/foreach/use float}{\pgfkeysvalueof{/pgf/foreach/ext/use float/. at cmd}##1\pgfeov}%
+ },
+ compat/pgffor-ext/\pgfkeysvalueof{/tikz/ext/compat/pgffor-ext}%
+}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfkeyslibraryext.pgfkeys-plus.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfkeyslibraryext.pgfkeys-plus.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgfkeyslibraryext.pgfkeys-plus.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,6 +6,10 @@
% 2. under the GNU Free Documentation License.
%
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
\input pgfmath.tex
%% Handlers
@@ -13,17 +17,17 @@
%% .pgfmath int truncates the result
%% .pgfmath strcat concatenates the given values
\pgfqkeys{/handlers}{
- .pgfmath/.code=%
+ .ext_pgfmath/.code=%
\begingroup
\pgfmathparse{#1}%
\expandafter\endgroup\expandafter
\pgfkeys at exp@call\expandafter{\pgfmathresult},
- .pgfmath int/.code=%
+ .ext_pgfmath int/.code=%
\begingroup
\pgfmathint{#1}%
\expandafter\endgroup\expandafter
\pgfkeys at exp@call\expandafter{\pgfmathresult},
- .pgfmath wrap/.code 2 args={%
+ .ext_pgfmath wrap/.code 2 args={%
\def\pgfkeys at temp##1{\def\pgfkeys at temp{#1}}%
\begingroup
\pgfmathparse{#2}%
@@ -31,7 +35,7 @@
\expandafter\endgroup\expandafter
\pgfkeys at exp@call\expandafter{\pgfkeys at temp}%
},
- .pgfmath if/.code n args={3}{%
+ .ext_pgfmath if/.code n args={3}{%
\begingroup
\pgfmathifthenelse{#1}{"1"}{"0"}%
\expandafter\endgroup\expandafter
@@ -43,7 +47,7 @@
{\pgfkeys at exp@call{#3}}%
{\pgfkeys at exp@call{#2}}%
},
- .if/.code n args={4}{%
+ .ext_if/.code n args={4}{%
\if#1#2%
\expandafter\pgfutil at firstoftwo
\else
@@ -52,7 +56,7 @@
{\pgfkeys at exp@call{#3}}%
{\pgfkeys at exp@call{#4}}%
},
- .ifnum/.code n args={3}{%
+ .ext_ifnum/.code n args={3}{%
\ifnum#1\relax
\expandafter\pgfutil at firstoftwo
\else
@@ -61,7 +65,7 @@
{\pgfkeys at exp@call{#2}}%
{\pgfkeys at exp@call{#3}}%
},
- .ifdim/.code n args={3}{%
+ .ext_ifdim/.code n args={3}{%
\ifdim#1\relax
\expandafter\pgfutil at firstoftwo
\else
@@ -70,7 +74,7 @@
{\pgfkeys at exp@call{#2}}%
{\pgfkeys at exp@call{#3}}%
},
- .ifx/.code n args={4}{%
+ .ext_ifx/.code n args={4}{%
\ifx#1#2%
\expandafter\pgfutil at firstoftwo
\else
@@ -79,35 +83,36 @@
{\pgfkeys at exp@call{#3}}%
{\pgfkeys at exp@call{#4}}%
},
- .ifxempty/.code n args={3}{%
+ .ext_ifxempty/.code n args={3}{%
\edef\pgfkeys at temp{#1}%
\pgfutil at ifxempty\pgfkeys at temp{\pgfkeys at exp@call{#2}}{\pgfkeys at exp@call{#3}}%
},
- .ifempty/.code n args={3}{%
+ .ext_ifempty/.code n args={3}{%
\pgfutil at ifempty{#1}{\pgfkeys at exp@call{#2}}{\pgfkeys at exp@call{#3}}%
},
%% http://tex.stackexchange.com/a/144187/16595
%% key/.List={(point-1),(point-2),(point-...),(point-6)} will call
%% key=(point-1)(point-2)(point-3)(point-4)(point-5)(point-6)
- .List/.code=%
+ .ext_List/.code=%
\let\pgfkeys at global@temp\pgfutil at empty
\foreach\pgfkeys at temp in{#1}{%
\expandafter\pgfutil at g@addto at macro\expandafter\pgfkeys at global@temp\expandafter{\pgfkeys at temp}%
}%
\expandafter\pgfkeys at exp@call\expandafter{\pgfkeys at global@temp},
- .--/.code=% decrements a value (only TeX integers!)
+ .ext_--/.code=% decrements a value (only TeX integers!)
\pgfkeyssetevalue{\pgfkeyscurrentpath}
{\the\numexpr\pgfkeysvalueof{\pgfkeyscurrentpath}-1\relax},
- .++/.code=% increments a value (only TeX integers!)
+ .ext_++/.code=% increments a value (only TeX integers!)
\pgfkeyssetevalue{\pgfkeyscurrentpath}
{\the\numexpr\pgfkeysvalueof{\pgfkeyscurrentpath}+1\relax},
- .value/.code=% copies the value of one key to another w/o expanding it
+ .ext_value/.code=% copies the value of one key to another w/o expanding it
\pgfkeysgetvalue{#1}\pgfkeys at temp
\expandafter\pgfkeys at exp@call\expandafter{\pgfkeys at temp}%
}
-\pgfqkeys{/utils}{
- if/.code n args={3}{%
+\pgfqkeys{/utils/ext}{
+ .code=\pgfqkeys{/utils/ext}{#1},
+ pgfmath if/.code n args={3}{%
\begingroup
\pgfmathifthenelse{#1}{"1"}{"0"}%
\expandafter\endgroup\expandafter
@@ -119,31 +124,79 @@
{\pgfkeysalso{#3}}
{\pgfkeysalso{#2}}%
},
- TeX/if/.code n args={4}{%
+ if/.code n args={4}{%
\if#1#2\expandafter\pgfutil at firstoftwo\else\expandafter\pgfutil at secondoftwo\fi
{\pgfkeysalso{#3}}{\pgfkeysalso{#4}}%
},
- TeX/ifnum/.code n args={3}{%
+ ifnum/.code n args={3}{%
\ifnum#1\relax\expandafter\pgfutil at firstoftwo\else\expandafter\pgfutil at secondoftwo\fi
{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
},
- TeX/ifdim/.code n args={3}{%
+ ifdim/.code n args={3}{%
\ifdim#1\relax\expandafter\pgfutil at firstoftwo\else\expandafter\pgfutil at secondoftwo\fi
{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
},
- TeX/ifx/.code n args={4}{%
+ ifx/.code n args={4}{%
\ifx#1#2\relax\expandafter\pgfutil at firstoftwo\else\expandafter\pgfutil at secondoftwo\fi
{\pgfkeysalso{#3}}{\pgfkeysalso{#4}}%
},
- TeX/ifxempty/.code n args={3}{%
+ ifxempty/.code n args={3}{%
\edef\pgfkeys at temp{#1}%
\pgfutil at ifxempty\pgfkeys at temp{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
},
- TeX/ifempty/.code n args={3}{%
+ ifempty/.code n args={3}{%
\pgfutil at ifempty{#1}{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
},
- tex/.search also=/utils/TeX,
loops/do until/.code 2 args={\pgfutil at loop\pgfkeysalso{#1}#2\relax\pgfutil at repeat}%
}
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={pgfkeys-plus}{pre 0.6},
+ compat/pgfkeys-plus/warn/.append code={%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/if}{/utils/ext/pgfmath if}%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/TeX/if}{/utils/ext/if}%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/TeX/ifx}{/utils/ext/ifx}%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/TeX/ifnum}{/utils/ext/ifnum}%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/TeX/ifdim}{/utils/ext/ifdim}%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/TeX/ifempty}{/utils/ext/ifempty}%
+ \tikzextutil at compatwarning@key{pgfkeys-plus}{pre 0.6}{/utils/TeX/ifxempty}{/utils/ext/ifxempty}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.pgfmath}{.ext_pgfmath}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.pgfmath int}{.ext_pgfmath int}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.pgfmath wrap}{.ext_pgfmath wrap}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.pgfmath if}{.ext_pgfmath if}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.if}{.ext_if}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.ifx}{.ext_ifx}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.ifdim}{.ext_ifdim}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.ifxempty}{.ext_ifxempty}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.ifempty}{.ext_ifempty}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.List}{.ext_List}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.--}{.ext_--}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.++}{.ext_++}%
+ \tikzextutil at compatwarning@handler{pgfkeys-plus}{pre 0.6}{.value}{.ext_value}%
+ },
+ compat/pgfkeys-plus/pre 0.6/.append code={%
+ \pgfkeysdef{/utils/if}{\pgfkeysvalueof{/utils/ext/pgfmath if/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/utils/TeX/if}{\pgfkeysvalueof{/utils/ext/if/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/utils/TeX/ifx}{\pgfkeysvalueof{/utils/ext/ifx/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/utils/TeX/ifnum}{\pgfkeysvalueof{/utils/ext/ifnum/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/utils/TeX/ifdim}{\pgfkeysvalueof{/utils/ext/ifdim/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/utils/TeX/ifempty}{\pgfkeysvalueof{/utils/ext/ifempty/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/utils/TeX/ifxempty}{\pgfkeysvalueof{/utils/ext/ifxempty/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.pgfmath}{\pgfkeysvalueof{/handlers/.ext_pgfmath/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.pgfmath int}{\pgfkeysvalueof{/handlers/.ext_pgfmath int/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.pgfmath wrap}{\pgfkeysvalueof{/handlers/.ext_pgfmath wrap/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.pgfmath if}{\pgfkeysvalueof{/handlers/.ext_pgfmath if/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.if}{\pgfkeysvalueof{/handlers/.ext_if/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.ifx}{\pgfkeysvalueof{/handlers/.ext_ifx/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.ifdim}{\pgfkeysvalueof{/handlers/.ext_ifdim/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.ifxempty}{\pgfkeysvalueof{/handlers/.ext_ifxempty/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.ifempty}{\pgfkeysvalueof{/handlers/.ext_ifempty/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.List}{\pgfkeysvalueof{/handlers/.ext_List/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.--}{\pgfkeysvalueof{/handlers/.ext_--/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.++}{\pgfkeysvalueof{/handlers/.ext_++/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/handlers/.value}{\pgfkeysvalueof{/handlers/.ext_value/. at cmd}##1\pgfeov}%
+ },
+ compat/pgfkeys-plus/\pgfkeysvalueof{/tikz/ext/compat/pgfkeys-plus}%
+}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.arrows.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.arrows.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.arrows.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -7,9 +7,12 @@
%
\usepgflibrary{arrows.meta}
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
\pgfqkeys{/pgf/@arrows decl}{
- clone/.code={%
+ /tikz-ext/@arrows decl/clone/.code={%
\pgfutil at namelet{pgf at decl@arrow at code}{pgf at ar@code@#1}%
\pgfutil at namelet{pgf at decl@arrow at defaults}{pgf at ar@defaults@#1}%
\pgfutil at namelet{pgf at decl@arrow at setup}{pgf at ar@setup@#1}%
@@ -17,13 +20,13 @@
\pgfutil at namelet{pgf at decl@arrow at par}{pgf at ar@par@#1}%
\pgfutil at namelet{pgf at decl@arrow at cache}{pgf at ar@do at cache@#1}%
},
- append setup code/.code=
+ /tikz-ext/@arrows decl/append setup code/.code=
\begingroup
\pgfutil at toks@\expandafter{\pgf at decl@arrow at setup#1}%
\expandafter\endgroup
\expandafter\def\expandafter\pgf at decl@arrow at setup\expandafter
{\the\pgfutil at toks@ },
- % append parameters/.code=
+ % /tikz-ext/@arrows decl/append parameters/.code=
% \begingroup
% \show\pgf at decl@arrow at par
% \pgfutil at toks@\expandafter{\pgf at decl@arrow at par#1}%
@@ -31,14 +34,14 @@
% \expandafter\def\expandafter\pgf at decl@arrow at par\expandafter
% {\the\pgfutil at toks@ }
}
-% \pgfkeyssetvalue{/pgf/arrow keys/weight}{true}
+% \pgfkeyssetvalue{/pgf/arrow keys/ext/weight}{true}
%%% Barbed
% Arc Barb, Parenthesis
\pgfdeclarearrow{
- clone = Arc Barb,
- name = Centered Arc Barb,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Arc Barb,
+ name = ext_Centered Arc Barb,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{0pt}
\else
@@ -46,9 +49,9 @@
\fi
}
\pgfdeclarearrow{
- clone = Arc Barb,
- name = Untipped Arc Barb,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Arc Barb,
+ name = ext_Untipped Arc Barb,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{\pgfarrowlength}
\else
@@ -58,9 +61,9 @@
% Hooks
\pgfdeclarearrow{
- clone = Hooks,
- name = Centered Hooks,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Hooks,
+ name = ext_Centered Hooks,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{0pt}
\else
@@ -70,9 +73,9 @@
% Straight Barb
\pgfdeclarearrow{
- clone = Straight Barb,
- name = Centered Straight Barb,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Straight Barb,
+ name = ext_Centered Straight Barb,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{.5\pgfarrowlength}
\else
@@ -82,9 +85,9 @@
% Tee Barb, Bar, Bracket
\pgfdeclarearrow{
- clone = Tee Barb,
- name = Centered Tee Barb,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Tee Barb,
+ name = ext_Centered Tee Barb,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{0pt}
\else
@@ -92,9 +95,9 @@
\fi
}
\pgfdeclarearrow{
- clone = Tee Barb,
- name = Untipped Tee Barb,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Tee Barb,
+ name = ext_Untipped Tee Barb,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed\expandafter\pgfarrowssetbackend\else\expandafter\pgfarrowssettipend\fi
{\pgfutil at tempdima
\ifpgfutil at tempswa % does it not extend to the right?
@@ -118,9 +121,9 @@
%%% Geometric
% Circle, Ellipse
\pgfdeclarearrow{
- clone = Circle,
- name = Centered Circle,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Circle,
+ name = ext_Centered Circle,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{.5\pgfarrowlength}
\else
@@ -128,9 +131,9 @@
\fi
}
\pgfdeclarearrow{
- clone = Circle,
- name = Untipped Circle,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Circle,
+ name = ext_Untipped Circle,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{\pgfarrowlength \advance\pgf at x -.5\pgfarrowlinewidth}
\else
@@ -140,9 +143,9 @@
% Kite, Diamond, Turned Square
\pgfdeclarearrow{
- clone = Kite,
- name = Centered Kite,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Kite,
+ name = ext_Centered Kite,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{\pgfarrowinset}
\else
@@ -153,9 +156,9 @@
% LaTeX
% Square, Rectangle
\pgfdeclarearrow{
- clone = Square,
- name = Centered Square,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Square,
+ name = ext_Centered Square,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{.5\pgfarrowlength}
\else
@@ -165,9 +168,9 @@
% Stealth, Triangle
\pgfdeclarearrow{
- clone = Stealth,
- name = Centered Stealth,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Stealth,
+ name = ext_Centered Stealth,
+ /tikz-ext/@arrows decl/append setup code =
% \pgfkeysgetvalue{/pgf/arrow keys/weight}\pgf at temp
% \ifx\pgf at temp\pgf at truetext
\ifpgfarrowreversed
@@ -199,9 +202,9 @@
%%% Rays
\pgfdeclarearrow{
- clone = Rays,
- name = Centered Rays,
- append setup code =
+ /tikz-ext/@arrows decl/clone = Rays,
+ name = ext_Centered Rays,
+ /tikz-ext/@arrows decl/append setup code =
\ifpgfarrowreversed
\pgfarrowssetbackend{0pt}
\else
@@ -211,23 +214,23 @@
%%% Variants
\pgfkeys{
- Centered Ellipse /.tip = {Centered Circle[length=+3.3pt +4.95, width'=+0pt +0.5]},
- Centered Parenthesis /.tip = {Centered Arc Barb[arc=+120,length=+1.725pt +2.3]},
- Centered Bar /.tip = {Centered Tee Barb[length=+0pt]},
- Centered Bracket /.tip = {Centered Tee Barb[inset'=+0pt +1,length=+0.75pt +1]},
- Centered Diamond /.tip = {Centered Kite[inset'=+0pt .5]},
- Centered Turned Square /.tip = {Centered Kite[length=+3pt 4,width'= +0pt 1,inset'= +0pt 0.5]},
- Centered Rectangle /.tip = {Centered Square[length=+3pt +4.5,width'=+0pt +.5]},
- Centered Triangle /.tip = {Centered Stealth[inset=+0pt, angle=+60:+2.7pt +3.6]},
- Untipped Ellipse /.tip = {Untipped Circle[length=+3.3pt +4.95, width'=+0pt +0.5]},
- Untipped Parenthesis /.tip = {Untipped Arc Barb[arc=+120,length=+1.725pt +2.3]},
- Untipped Bar /.tip = {Untipped Tee Barb[length=+0pt]},
- Untipped Bracket /.tip = {Untipped Tee Barb[inset'=+0pt +1,length=+0.75pt +1]},
+ ext_Centered Ellipse /.tip = {ext_Centered Circle[length=+3.3pt +4.95, width'=+0pt +0.5]},
+ ext_Centered Parenthesis /.tip = {ext_Centered Arc Barb[arc=+120,length=+1.725pt +2.3]},
+ ext_Centered Bar /.tip = {ext_Centered Tee Barb[length=+0pt]},
+ ext_Centered Bracket /.tip = {ext_Centered Tee Barb[inset'=+0pt +1,length=+0.75pt +1]},
+ ext_Centered Diamond /.tip = {ext_Centered Kite[inset'=+0pt .5]},
+ ext_Centered Turned Square /.tip = {ext_Centered Kite[length=+3pt 4,width'= +0pt 1,inset'= +0pt 0.5]},
+ ext_Centered Rectangle /.tip = {ext_Centered Square[length=+3pt +4.5,width'=+0pt +.5]},
+ ext_Centered Triangle /.tip = {ext_Centered Stealth[inset=+0pt, angle=+60:+2.7pt +3.6]},
+ ext_Untipped Ellipse /.tip = {ext_Untipped Circle[length=+3.3pt +4.95, width'=+0pt +0.5]},
+ ext_Untipped Parenthesis /.tip = {ext_Untipped Arc Barb[arc=+120,length=+1.725pt +2.3]},
+ ext_Untipped Bar /.tip = {ext_Untipped Tee Barb[length=+0pt]},
+ ext_Untipped Bracket /.tip = {ext_Untipped Tee Barb[inset'=+0pt +1,length=+0.75pt +1]},
}
%%% New Arrows
\pgfdeclarearrow{
- name = Hug Cap,
+ name = ext_Hug Cap,
parameters = \the\pgfarrowlength,
defaults = {
length = +0pt +1
@@ -256,33 +259,102 @@
}
}
-\pgfqkeys{/pgf/arrow keys}{radius/.style={/pgf/arrow keys/inset={#1}}}
\pgfdeclarearrow{
- name = Loop,
+ name = ext_Loop,
parameters = {\the\pgfarrowlength,\the\pgfarrowinset,\ifpgfarrowopen o\fi},
defaults = {length = +3pt +1 +0, inset = +.75pt +1 +0},
- setup code =
+ setup code = {%
\ifdim\pgfarrowlength<\dimexpr2\pgfarrowinset+\pgflinewidth\relax
\pgfarrowlength\dimexpr2\pgfarrowinset+\pgflinewidth\relax
\fi
+ \ifdim\pgfarrowinset<.5\pgflinewidth
+ \pgfarrowinset=.5\pgflinewidth
+ \fi
\pgfarrowssettipend{\pgfarrowlength}%
\pgfarrowssetlineend{.5\pgflinewidth}%
+ \pgfarrowshullpoint{\pgfarrowlength}{\pgfarrowlength}%
+ \pgfarrowsupperhullpoint{0pt}{\pgfarrowlength}%
+ \pgfarrowshullpoint{\pgflinewidth}{-\pgfarrowlength}%
\pgfarrowssavethe\pgfarrowlength
- \pgfarrowssavethe\pgfarrowinset,
+ \pgfarrowssavethe\pgfarrowinset
+ },
drawing code={%
\pgfsetroundcap
\pgfpathmoveto{\pgfqpoint{.5\pgflinewidth}{0pt}}%
- \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowlength-.5\pgflinewidth-\pgfarrowinset}
+ \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowlength-\pgfarrowinset}
{0pt}}%
- \pgfpatharc{+-90}{+0}{+\pgfarrowinset}%
+ \pgfpatharc{+-90}{+0}{+\dimexpr\pgfarrowinset-.5\pgflinewidth}%
\pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowlength-.5\pgflinewidth}
- {\dimexpr\pgfarrowlength-.5\pgflinewidth-\pgfarrowinset}}%
- \pgfpatharc{+0}{+90}{+\pgfarrowinset}%
- \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowinset+.5\pgflinewidth}
- {\dimexpr\pgfarrowlength-.5\pgflinewidth}}%
- \pgfpatharc{+90}{+180}{+\pgfarrowinset}%
- \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowinset+.5\pgflinewidth-\pgfarrowinset}
+ {\dimexpr\pgfarrowlength-\pgfarrowinset}}%
+ \pgfpatharc{+0}{+90}{+\dimexpr\pgfarrowinset-.5\pgflinewidth}%
+ \pgfpathlineto{\pgfqpoint{\pgfarrowinset}{\dimexpr\pgfarrowlength-.5\pgflinewidth}}%
+ \pgfpatharc{+90}{+180}{+\dimexpr\pgfarrowinset-.5\pgflinewidth}%
+ \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}
{\dimexpr-\pgfarrowlength+.5\pgflinewidth}}%
\ifpgfarrowopen\pgfusepathqstroke\else\pgfusepathqfillstroke\fi
}
-}
\ No newline at end of file
+}
+
+%%% Compatibility
+\pgfqkeys{/pgf/arrow keys}{radius/.style={/pgf/arrow keys/inset={#1}}} % should be removed after v0.6
+\tikzextset{
+ /tikz-ext/compat/add library={arrows}{pre 0.6},
+ /tikz-ext/@arrows decl/new name/.code={% This is not a good idea.
+ \expandafter\let\csname pgf at ar@code@#1\endcsname\@undefined
+ \expandafter\let\csname pgf at ar@defaults@#1\endcsname\@undefined
+ \expandafter\let\csname pgf at ar@setup@#1\endcsname\@undefined
+ \expandafter\let\csname pgf at ar@bending at mode@#1\endcsname\@undefined
+ \expandafter\let\csname pgf at ar@par@#1\endcsname\@undefined
+ \expandafter\let\csname pgf at ar@do at cache@#1\endcsname\@undefined
+ \pgfset{@arrows decl/name={#1}}%
+ },
+ compat/arrows/warn/.append code={%
+ \tikzextutil at compatwarning@key{arrows}{pre 0.6}{/pgf/@arrows decl/clone}{/tikz-ext/@arrows decl/clone}%
+ \tikzextutil at compatwarning@key{arrows}{pre 0.6}{/pgf/@arrows decl/append setup code}{/tikz-ext/@arrows decl/append setup code}%
+ \pgfutil at for\tikzext at temp:=Centered Arc Barb,Untipped Arc Barb,Centered Hooks,%
+ Centered Straight Barb,Centered Tee Barb,Untipped Tee Barb,Centered Circle,%
+ Untipped Circle,Centered Kite,Centered Square,Centered Stealth,Centered Rays\do{%
+ \pgfutil at IfUndefined{pgf at ar@code@\tikzext at temp}{%
+ \pgfutil at IfUndefined{pgf at ar@means@\tikzext at temp}{%
+ \pgfdeclarearrow{%
+ /tikz-ext/@arrows decl/clone/.expanded = ext_\tikzext at temp,
+ name/.expanded = \tikzext at temp,
+ /tikz-ext/@arrows decl/append setup code/.expanded = {%
+ \noexpand\tikzextutil at compatmaybewarning
+ {arrow tip '\tikzext at temp'}{'ext_\tikzext at temp'}{arrows = pre 0.6}%
+ }%
+ }
+ }{}%
+ }{}%
+ }%
+ },
+ compat/arrows/pre 0.6/.append code=%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Arc Barb , means = ext_Centered Arc Barb}%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Arc Barb , means = ext_Untipped Arc Barb}%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Hooks , means = ext_Centered Hooks }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Straight Barb , means = ext_Centered Straight Barb}%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Tee Barb , means = ext_Centered Tee Barb}%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Tee Barb , means = ext_Untipped Tee Barb}%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Circle , means = ext_Centered Circle }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Circle , means = ext_Untipped Circle }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Kite , means = ext_Centered Kite }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Square , means = ext_Centered Square }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Stealth , means = ext_Centered Stealth }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Rays , means = ext_Centered Rays }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Ellipse , means = ext_Centered Ellipse }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Parenthesis , means = ext_Centered Parenthesis }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Bar , means = ext_Centered Bar }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Bracket , means = ext_Centered Bracket }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Diamond , means = ext_Centered Diamond }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Turned Square , means = ext_Centered Turned Square}%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Rectangle , means = ext_Centered Rectangle }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Centered Triangle , means = ext_Centered Triangle }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Ellipse , means = ext_Untipped Ellipse }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Parenthesis , means = ext_Untipped Parenthesis }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Bar , means = ext_Untipped Bar }%
+ \pgfdeclarearrow{/tikz-ext/@arrows decl/new name = Untipped Bracket , means = ext_Untipped Bracket }%
+ ,%
+ compat/arrows/\pgfkeysvalueof{/tikz/ext/compat/arrows}%
+}
+\endinput
+
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,23 +5,26 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\pgfset{
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
+\pgfextset{
circle arrow start angle/.initial=,
circle arrow end angle/.initial=,
circle arrow delta angle/.initial=,
circle arrow arrows/.initial=-,
- circle arrow/@turn left/.style={/pgf/circle arrow arrows=->,/pgf/circle arrow delta angle=340},
- circle arrow/@turn right/.style={/pgf/circle arrow arrows=<-,/pgf/circle arrow delta angle=340},
- circle arrow turn left north/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=100},
- circle arrow turn left east/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=10},
- circle arrow turn left south/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=280},
- circle arrow turn left west/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=190},
- circle arrow turn right north/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=100},
- circle arrow turn right east/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=10},
- circle arrow turn right south/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=280},
- circle arrow turn right west/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=190},
+ circle arrow/@turn left/.style={/pgf/ext/circle arrow arrows=->,/pgf/ext/circle arrow delta angle=340},
+ circle arrow/@turn right/.style={/pgf/ext/circle arrow arrows=<-,/pgf/ext/circle arrow delta angle=340},
+ circle arrow turn left north/.style = {/pgf/ext/circle arrow/@turn left, /pgf/ext/circle arrow start angle=100},
+ circle arrow turn left east/.style = {/pgf/ext/circle arrow/@turn left, /pgf/ext/circle arrow start angle=10},
+ circle arrow turn left south/.style = {/pgf/ext/circle arrow/@turn left, /pgf/ext/circle arrow start angle=280},
+ circle arrow turn left west/.style = {/pgf/ext/circle arrow/@turn left, /pgf/ext/circle arrow start angle=190},
+ circle arrow turn right north/.style = {/pgf/ext/circle arrow/@turn right, /pgf/ext/circle arrow start angle=100},
+ circle arrow turn right east/.style = {/pgf/ext/circle arrow/@turn right, /pgf/ext/circle arrow start angle=10},
+ circle arrow turn right south/.style = {/pgf/ext/circle arrow/@turn right, /pgf/ext/circle arrow start angle=280},
+ circle arrow turn right west/.style = {/pgf/ext/circle arrow/@turn right, /pgf/ext/circle arrow start angle=190},
}
-\pgfdeclareshape{circle arrow}{
+\pgfdeclareshape{ext_circle arrow}{
\inheritsavedanchors[from=circle]
\inheritanchorborder[from=circle]
\inheritanchor[from=circle]{north}
@@ -40,9 +43,9 @@
\inheritanchor[from=circle]{south west}
\inheritanchor[from=circle]{south east}
\backgroundpath{
- \pgfkeysgetvalue{/pgf/circle arrow start angle}\pgf at sh@circlearrow at s
- \pgfkeysgetvalue{/pgf/circle arrow end angle}\pgf at sh@circlearrow at e
- \pgfkeysgetvalue{/pgf/circle arrow delta angle}\pgf at sh@circlearrow at d
+ \pgfkeysgetvalue{/pgf/ext/circle arrow start angle}\pgf at sh@circlearrow at s
+ \pgfkeysgetvalue{/pgf/ext/circle arrow end angle}\pgf at sh@circlearrow at e
+ \pgfkeysgetvalue{/pgf/ext/circle arrow delta angle}\pgf at sh@circlearrow at d
\ifx\pgf at sh@circlearrow at s\pgfutil at empty%
\pgfmathsetmacro\pgf at sh@circlearrow at s{\pgf at sh@circlearrow at e-\pgf at sh@circlearrow at d}%
\else
@@ -60,7 +63,51 @@
\fi
\pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfpointpolar{\pgf at sh@circlearrow at s}{\pgfutil at tempdima}}}%
\pgfpatharc{\pgf at sh@circlearrow at s}{\pgf at sh@circlearrow at e}{\pgfutil at tempdima}%
- \pgfkeysgetvalue{/pgf/circle arrow arrows}\pgf at temp
+ \pgfkeysgetvalue{/pgf/ext/circle arrow arrows}\pgf at temp
\expandafter\pgfsetarrows\expandafter{\pgf at temp}%
}
+}
+
+%%% Compatibility
+\pgfkeysifdefined{/tikz/ext/compat/shapes/. at cmd}{}{\pgfextset{/tikz-ext/compat/add library={shapes}{pre 0.6}}}
+\tikzextset{
+ compat/shapes/warn/.append style=/tikz/ext/compat/shapes.circlearrow/warn,
+ compat/shapes/pre 0.6/.append style=/tikz/ext/compat/shapes.circlearrow/pre 0.6,
+ compat/shapes.circlearrow/warn/.code={%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn left north}{/pgf/ext/circle arrow turn left north}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn left east}{/pgf/ext/circle arrow turn left east}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn left west}{/pgf/ext/circle arrow turn left west}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn left south}{/pgf/ext/circle arrow turn left south}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn right north}{/pgf/ext/circle arrow turn right north}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn right east}{/pgf/ext/circle arrow turn right east}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn right west}{/pgf/ext/circle arrow turn right west}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle arrow turn right south}{/pgf/ext/circle arrow turn right south}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/circle arrow start angle}{/pgf/ext/circle arrow start angle}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/circle arrow delta angle}{/pgf/ext/circle arrow delta angle}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/circle arrow end angle}{/pgf/ext/circle arrow end angle}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/circle arrow arrows} {/pgf/ext/circle arrow arrows}%
+ \tikzextutil at compat@cloneshape{circle arrow}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center}%
+ \def\tikzext at temp{\tikzextutil at compatmaybewarning{shape 'circle arrow'}{'ext_circle arrow'}{shapes = pre 0.6}}%
+ \expandafter\tikzextutil at prefix@macrotomacro\csname pgf at sh@s at circle arrow\endcsname\tikzext at temp
+ },
+ compat/shapes.circlearrow/pre 0.6/.code={%
+ \pgfkeysdef{/pgf/circle arrow turn left north}{\pgfkeysvalueof{/pgf/ext/circle arrow turn left north/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn left east}{\pgfkeysvalueof{/pgf/ext/circle arrow turn left east/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn left west}{\pgfkeysvalueof{/pgf/ext/circle arrow turn left west/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn left south}{\pgfkeysvalueof{/pgf/ext/circle arrow turn left south/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn right north}{\pgfkeysvalueof{/pgf/ext/circle arrow turn right north/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn right east}{\pgfkeysvalueof{/pgf/ext/circle arrow turn right east/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn right west}{\pgfkeysvalueof{/pgf/ext/circle arrow turn right west/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow turn right south}{\pgfkeysvalueof{/pgf/ext/circle arrow turn right south/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle arrow start angle}{\pgfkeyssetvalue{/pgf/ext/circle arrow start angle}{##1}}%
+ \pgfkeysdef{/pgf/circle arrow delta angle}{\pgfkeyssetvalue{/pgf/ext/circle arrow delta angle}{##1}}%
+ \pgfkeysdef{/pgf/circle arrow end angle}{\pgfkeyssetvalue{/pgf/ext/circle arrow end angle}{##1}}%
+ \pgfkeysdef{/pgf/circle arrow arrows} {\pgfkeyssetvalue{/pgf/ext/circle arrow arrows}{##1}}%
+ \pgfkeyssetvalue{/pgf/circle arrow start angle}{\pgfkeysvalueof{/pgf/ext/circle arrow start angle}}%
+ \pgfkeyssetvalue{/pgf/circle arrow delta angle}{\pgfkeysvalueof{/pgf/ext/circle arrow delta angle}}%
+ \pgfkeyssetvalue{/pgf/circle arrow end angle}{\pgfkeysvalueof{/pgf/ext/circle arrow end angle}}%
+ \pgfkeyssetvalue{/pgf/circle arrow arrows} {\pgfkeysvalueof{/pgf/ext/circle arrow arrows}}%
+ \tikzextutil at compat@cloneshape{circle arrow}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center}%
+ },
+ compat/shapes.circlearrow/\pgfkeysvalueof{/tikz/ext/compat/shapes}%
}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,18 +6,22 @@
% 2. under the GNU Free Documentation License.
%
\usepgflibrary{shapes.multipart}
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
+
\let\pgfnodeparttrbox\pgfnodeparttwobox
\let\pgfnodepartblbox\pgfnodepartthreebox
\let\pgfnodepartbrbox\pgfnodepartfourbox
-\newif\ifpgfcirclecrosssplitcustomfill
-\pgfset{%
+\newif\ifpgfextcirclecrosssplitcustomfill
+\pgfextset{
circle cross split part fill/.code=%
\def\pgf at lib@sh at ccs@list at fill{#1}%
- \pgfcirclecrosssplitcustomfilltrue,%
- circle cross split uses custom fill/.is if=pgfcirclecrosssplitcustomfill
+ \pgfextcirclecrosssplitcustomfilltrue,%
+ circle cross split uses custom fill/.is if=pgfextcirclecrosssplitcustomfill
}
\def\pgf at lib@sh at ccs@list at fill{none}%
-\pgfdeclareshape{circle cross split}{%
+\pgfdeclareshape{ext_circle cross split}{%
\nodeparts{text,two,three,four}%
\savedanchor\centerpoint{%
\pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/inner xsep}}%
@@ -174,7 +178,7 @@
\inheritanchor[from=circle]{south east}%
\anchor{two}{\twoanchor}%
\anchor{three}{\threeanchor}%
- \anchor{four}{
+ \anchor{four}{%
\threeanchor
\pgf at ya=\pgf at y
\twoanchor
@@ -260,7 +264,7 @@
\advance\pgfutil at tempdima by-\pgf at xb
\fi
\advance\pgfutil at tempdima by-.5\pgflinewidth%
- \ifpgfcirclecrosssplitcustomfill%
+ \ifpgfextcirclecrosssplitcustomfill%
\pgf at lib@sh at rs@process at list{\pgf at lib@sh at ccs@list at fill}{4}%
{%
\pgfmathloop
@@ -289,4 +293,24 @@
}%
\fi
}%
+}
+%%% Compatibility
+\pgfkeysifdefined{/tikz/ext/compat/shapes/. at cmd}{}{\pgfextset{/tikz-ext/compat/add library={shapes}{pre 0.6}}}
+\tikzextset{
+ compat/shapes/warn/.append style=/tikz/ext/compat/shapes.circlecrosssplit/warn,
+ compat/shapes/pre 0.6/.append style=/tikz/ext/compat/shapes.circlecrosssplit/pre 0.6,
+ compat/shapes.circlecrosssplit/warn/.code={%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle cross split part fill}{/pgf/ext/circle cross split part fill}%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/circle cross split part custom fill}[true]{/pgf/ext/circle cross split part fill}%
+ \tikzextutil at compat@cloneshape{circle cross split}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center,two,three,four,lower mid,lower base,lower mid east,lower base east,lower mid west,lower base west}%
+ \def\tikzext at temp{\tikzextutil at compatmaybewarning{shape 'circle cross split'}{'ext_circle cross split'}{shapes = pre 0.6}}%
+ \expandafter\tikzextutil at prefix@macrotomacro\csname pgf at sh@s at circle cross split\endcsname\tikzext at temp
+ },
+ compat/shapes.circlecrosssplit/pre 0.6/.code={%
+ \pgfkeysdef{/pgf/circle cross split part fill}{\pgfkeysvalueof{/pgf/ext/circle cross split part fill/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/circle cross split part custom fill}{\pgfkeysvalueof{/pgf/circle cross split custom part fill/. at cmd}##1\pgfeov}%
+ \pgfkeyssetvalue{/pgf/circle cross split part custom flll/. at def}{true}%
+ \tikzextutil at compat@cloneshape{circle cross split}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center,two,three,four,lower mid,lower base,lower mid east,lower base east,lower mid west,lower base west}%
+ },
+ compat/shapes.circlecrosssplit/\pgfkeysvalueof{/tikz/ext/compat/shapes}%
}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,7 +5,11 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\pgfset{
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\pgfextset{
heatmark arc width/.initial=+4pt,
heatmark arc sep/.initial=+1pt,
heatmark arc rings/.initial=3,
@@ -14,7 +18,7 @@
heatmark inner opacity/.initial=.8,
heatmark outer opacity/.initial=.2
}
-\pgfdeclareshape{heatmark}
+\pgfdeclareshape{ext_heatmark}
%
% Draws a circle around the text
%
@@ -27,7 +31,7 @@
\saveddimen\innerradius{%
%
- % Caculate ``height radius''
+ % Calculate ``height radius''
%
\pgf at ya=.5\ht\pgfnodeparttextbox%
\advance\pgf at ya by.5\dp\pgfnodeparttextbox%
@@ -34,7 +38,7 @@
\pgfmathsetlength\pgf at yb{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf at ya by\pgf at yb%
%
- % Caculate ``width radius''
+ % Calculate ``width radius''
%
\pgf at xa=.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf at xb{\pgfkeysvalueof{/pgf/inner xsep}}%
@@ -85,8 +89,8 @@
\else%
\advance\pgf at x by\pgf at xb%
\fi%
- \pgfmathsetcount\c at pgf@counta{\pgfkeysvalueof{/pgf/heatmark arc rings}}%
- \pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/heatmark arc width}+\pgfkeysvalueof{/pgf/heatmark arc sep}}%
+ \pgfmathsetcount\c at pgf@counta{\pgfkeysvalueof{/pgf/ext/heatmark arc rings}}%
+ \pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/ext/heatmark arc width}+\pgfkeysvalueof{/pgf/ext/heatmark arc sep}}%
\multiply\pgf at xa\c at pgf@counta
\advance\pgf at x\pgf at xa
}%
@@ -120,26 +124,25 @@
%
%
\behindbackgroundpath{%
- \pgfmathsetcount\c at pgf@counta{\pgfkeysvalueof{/pgf/heatmark arc rings}}% heat arc rings
- \pgfmathsetcount\c at pgf@countb{\pgfkeysvalueof{/pgf/heatmark arcs}}% heat arcs
- \pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/heatmark arc width}}% heat arc width
- \pgfmathsetlength\pgf at xb{\pgfkeysvalueof{/pgf/heatmark arc sep}}% heat arc sep
- %\pgfmathsetmacro\pgf at tempa{\pgfkeysvalueof{/pgf/heat arc sep angle}}% heat arc sep angle
- \pgfmathsetmacro\pgf at tempb{360/\c at pgf@countb-(\pgfkeysvalueof{/pgf/heatmark arc sep angle})}% heat arc
+ \pgfmathsetcount\c at pgf@counta{\pgfkeysvalueof{/pgf/ext/heatmark arc rings}}% heat arc rings
+ \pgfmathsetcount\c at pgf@countb{\pgfkeysvalueof{/pgf/ext/heatmark arcs}}% heat arcs
+ \pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/ext/heatmark arc width}}% heat arc width
+ \pgfmathsetlength\pgf at xb{\pgfkeysvalueof{/pgf/ext/heatmark arc sep}}% heat arc sep
+ \pgfmathsetmacro\pgf at tempb{360/\c at pgf@countb-(\pgfkeysvalueof{/pgf/ext/heatmark arc sep angle})}% heat arc
\pgfmathsetmacro\pgf at tempc{\pgfkeysvalueof{/pgf/shape border rotate}}% heat rotate
%
- \pgfmathsetmacro\pgf at tempd{\pgfkeysvalueof{/pgf/heatmark inner opacity}}% heat opacity high
+ \pgfmathsetmacro\pgf at tempd{\pgfkeysvalueof{/pgf/ext/heatmark inner opacity}}% heat opacity high
\ifnum\c at pgf@counta=1
\def\tikzext at heatmark@opacity at seps{0}%
\else
\pgfmathsetmacro\tikzext at heatmark@opacity at seps
- {(\pgf at tempd-(\pgfkeysvalueof{/pgf/heatmark outer opacity}))%
+ {(\pgf at tempd-(\pgfkeysvalueof{/pgf/ext/heatmark outer opacity}))%
/(\c at pgf@counta-1)}%
\fi
\pgfutil at tempcnta=0
\pgfutil at tempcntb=0
\pgf at ya\innerradius\relax
- \pgftransformshift{\centerpoint}
+ \pgftransformshift{\centerpoint}%
\pgfutil at loop % ring loop
\advance\pgf at ya\pgf at xb % current radius + heat arc sep
\pgf at yb\pgf at ya
@@ -146,7 +149,7 @@
\advance\pgf at yb\pgf at xa % current radius + heat arc sep + heat arc width
\pgfsetfillopacity{\pgf at tempd}%
\begingroup
- \edef\pgf at marshal{\noexpand\pgfset{heatmark ring \the\numexpr\pgfutil at tempcnta+1\relax/.try}}%
+ \edef\pgf at marshal{\noexpand\pgfset{ext/heatmark ring \the\numexpr\pgfutil at tempcnta+1\relax/.try}}%
\pgf at marshal
\csname tikz at options\endcsname
{%
@@ -154,8 +157,8 @@
\pgfmathsetmacro\tikzext at heatmark@start at angle{\pgf at tempc-.5*\pgf at tempb+\pgfutil at tempcntb*(360/\c at pgf@countb)}%
% path
\begingroup
- \edef\pgf at marshal{\noexpand\pgfset{heatmark arc \the\numexpr\pgfutil at tempcntb+1\relax/.try}%
- \noexpand\pgfset{heatmark ring \the\numexpr\pgfutil at tempcnta+1\relax\space arc \the\numexpr\pgfutil at tempcntb+1\relax/.try}}%
+ \edef\pgf at marshal{\noexpand\pgfset{ext/heatmark arc \the\numexpr\pgfutil at tempcntb+1\relax/.try}%
+ \noexpand\pgfset{ext/heatmark ring \the\numexpr\pgfutil at tempcnta+1\relax\space arc \the\numexpr\pgfutil at tempcntb+1\relax/.try}}%
\pgf at marshal
\csname tikz at options\endcsname
\pgfpathmoveto{\pgfpointpolar{\tikzext at heatmark@start at angle}{\pgf at ya}}%
@@ -178,4 +181,40 @@
\pgftransformshift{\pgfqpointscale{-1}{\centerpoint}}%
}
}
-\endinput
+%%% Compatibility
+\pgfkeysifdefined{/tikz/ext/compat/shapes/. at cmd}{}{\pgfextset{/tikz-ext/compat/add library={shapes}{pre 0.6}}}
+\tikzextset{
+ compat/shapes/warn/.append style=/tikz/ext/compat/shapes.heatmark/warn,
+ compat/shapes/pre 0.6/.append style=/tikz/ext/compat/shapes.heatmark/pre 0.6,
+ compat/shapes.heatmark/warn/.code={%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark arc width}{/pgf/ext/heatmark arc width}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark arc sep}{/pgf/ext/heatmark arc sep}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark arc rings}{/pgf/ext/heatmark arc rings}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark arcs}{/pgf/ext/heatmark arcs}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark arc sep angle}{/pgf/ext/heatmark arc sep angle}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark inner opacity}{/pgf/ext/heatmark inner opacity}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/heatmark outer opacity}{/pgf/ext/heatmark outer opacity}%
+ \tikzextutil at compat@cloneshape{heatmark}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center}%
+ \def\tikzext at temp{\tikzextutil at compatmaybewarning{shape 'heatmark'}{'ext_heatmark'}{shapes = pre 0.6}}%
+ \tikzextutil at prefix@macrotomacro\pgf at sh@s at heatmark\tikzext at temp
+ },
+ compat/shapes.heatmark/pre 0.6/.code={%
+ \pgfkeysdef{/pgf/heatmark arc width}{\pgfkeyssetvalue{/pgf/ext/heatmark arc width{##1}}}%
+ \pgfkeysdef{/pgf/heatmark arc sep}{\pgfkeyssetvalue{/pgf/ext/heatmark arc sep{##1}}}%
+ \pgfkeysdef{/pgf/heatmark arc rings}{\pgfkeyssetvalue{/pgf/ext/heatmark arc rings{##1}}}%
+ \pgfkeysdef{/pgf/heatmark arcs}{\pgfkeyssetvalue{/pgf/ext/heatmark arcs{##1}}}%
+ \pgfkeysdef{/pgf/heatmark arc sep angle}{\pgfkeyssetvalue{/pgf/ext/heatmark arc sep angle{##1}}}%
+ \pgfkeysdef{/pgf/heatmark inner opacity}{\pgfkeyssetvalue{/pgf/ext/heatmark inner opacity{##1}}}%
+ \pgfkeysdef{/pgf/heatmark outer opacity}{\pgfkeyssetvalue{/pgf/ext/heatmark outer opacity{##1}}}%
+ \pgfkeyssetvalue{/pgf/heatmark arc width}{\pgfkeysvalueof{/pgf/ext/heatmark arc width}}%
+ \pgfkeyssetvalue{/pgf/heatmark arc sep}{\pgfkeysvalueof{/pgf/ext/heatmark arc sep}}%
+ \pgfkeyssetvalue{/pgf/heatmark arc rings}{\pgfkeysvalueof{/pgf/ext/heatmark arc rings}}%
+ \pgfkeyssetvalue{/pgf/heatmark arcs}{\pgfkeysvalueof{/pgf/ext/heatmark arcs}}%
+ \pgfkeyssetvalue{/pgf/heatmark arc sep angle}{\pgfkeysvalueof{/pgf/ext/heatmark arc sep angle}}%
+ \pgfkeyssetvalue{/pgf/heatmark inner opacity}{\pgfkeysvalueof{/pgf/ext/heatmark inner opacity}}%
+ \pgfkeyssetvalue{/pgf/heatmark outer opacity}{\pgfkeysvalueof{/pgf/ext/heatmark outer opacity}}%
+ \tikzextutil at compat@cloneshape{heatmark}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center}%
+ },
+ compat/shapes.heatmark/\pgfkeysvalueof{/tikz/ext/compat/shapes}%
+}
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -1,15 +1,26 @@
-\pgfset{
+% 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.
+%
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\pgfextset{
rectangle with rounded corners north west radius/.initial=.5\pgflinewidth,
rectangle with rounded corners north east radius/.initial=.5\pgflinewidth,
rectangle with rounded corners south west radius/.initial=.5\pgflinewidth,
rectangle with rounded corners south east radius/.initial=.5\pgflinewidth,
rectangle with rounded corners radius/.style={
- /pgf/rectangle with rounded corners north west radius={#1},
- /pgf/rectangle with rounded corners north east radius={#1},
- /pgf/rectangle with rounded corners south west radius={#1},
- /pgf/rectangle with rounded corners south east radius={#1}}
+ /pgf/ext/rectangle with rounded corners north west radius={#1},
+ /pgf/ext/rectangle with rounded corners north east radius={#1},
+ /pgf/ext/rectangle with rounded corners south west radius={#1},
+ /pgf/ext/rectangle with rounded corners south east radius={#1}}
}%
-\pgfdeclareshape{rectangle with rounded corners}{%
+\pgfdeclareshape{ext_rectangle with rounded corners}{%
\savedmacro\rectanglewithroundedcornersparameter{%
%
% width = max(text width + 2 * inner xseps, minimum width) + 2 * outer xseps
@@ -54,10 +65,10 @@
\pgfextract at process\centerpoint{}%
\addtosavedmacro\centerpoint
%
- \pgfmathsetlengthmacro\northwestradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners north west radius}}
- \pgfmathsetlengthmacro\northeastradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners north east radius}}
- \pgfmathsetlengthmacro\southwestradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners south west radius}}
- \pgfmathsetlengthmacro\southeastradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners south east radius}}
+ \pgfmathsetlengthmacro\northwestradius{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners north west radius}}
+ \pgfmathsetlengthmacro\northeastradius{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners north east radius}}
+ \pgfmathsetlengthmacro\southwestradius{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners south west radius}}
+ \pgfmathsetlengthmacro\southeastradius{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners south east radius}}
\addtosavedmacro\northwestradius
\addtosavedmacro\northeastradius
\addtosavedmacro\southwestradius
@@ -93,11 +104,11 @@
\pgfmathsetlength\pgf at y{+.5ex}%
}
\anchor{mid west}{%
- \csname pgf at anchor@rectangle with rounded corners at west\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at west\endcsname
\pgfmathsetlength\pgf at y{+.5ex}%
}
\anchor{mid east}{%
- \csname pgf at anchor@rectangle with rounded corners at east\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at east\endcsname
\pgfmathsetlength\pgf at y{+.5ex}%
}
\anchor{base}{%
@@ -106,15 +117,15 @@
\pgf at y=0pt
}
\anchor{base west}{%
- \csname pgf at anchor@rectangle with rounded corners at west\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at west\endcsname
\pgf at y=0pt
}
\anchor{base east}{%
- \csname pgf at anchor@rectangle with rounded corners at east\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at east\endcsname
\pgf at y=0pt
}
\anchor{north west}{%
- \csname pgf at anchor@rectangle with rounded corners at north west center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north west center\endcsname
\ifdim\northwestradius=0pt
\else
\pgf at process{\pgfpointadd{}{\pgfpointpolar{135}{\northwestradius+\outerxsep and \northwestradius+\outerysep}}}%
@@ -134,7 +145,7 @@
\pgf at process{\pgfpointadd{}{\centerpoint}}%
}
\anchor{north east}{%
- \csname pgf at anchor@rectangle with rounded corners at north east center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north east center\endcsname
\ifdim\northeastradius=0pt
\else
\pgf at process{\pgfpointadd{}{\pgfpointpolar{45}{\northeastradius+\outerxsep and \northeastradius+\outerysep}}}%
@@ -154,7 +165,7 @@
\pgf at process{\pgfpointadd{}{\centerpoint}}%
}
\anchor{south west}{%
- \csname pgf at anchor@rectangle with rounded corners at south west center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south west center\endcsname
\ifdim\southwestradius=0pt
\else
\pgf at process{\pgfpointadd{}{\pgfpointpolar{225}{\southwestradius+\outerxsep and \southwestradius+\outerysep}}}%
@@ -174,7 +185,7 @@
\pgf at process{\pgfpointadd{}{\centerpoint}}%
}
\anchor{south east}{%
- \csname pgf at anchor@rectangle with rounded corners at south east center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south east center\endcsname
\ifdim\southeastradius=0pt
\else
\pgf at process{\pgfpointadd{}{\pgfpointpolar{315}{\southeastradius+\outerxsep and \southeastradius+\outerysep}}}%
@@ -194,42 +205,42 @@
\pgf at process{\pgfpointadd{}{\centerpoint}}%
}
\anchor{below north west}{%
- \csname pgf at anchor@rectangle with rounded corners at north west center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north west center\endcsname
\advance\pgf at x by -\northwestradius
\advance\pgf at x by -\outerxsep
}
\anchor{above south west}{%
- \csname pgf at anchor@rectangle with rounded corners at south west center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south west center\endcsname
\advance\pgf at x by -\southwestradius
\advance\pgf at x by -\outerxsep
}
\anchor{below north east}{%
- \csname pgf at anchor@rectangle with rounded corners at north east center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north east center\endcsname
\advance\pgf at x by \northeastradius
\advance\pgf at x by \outerxsep
}
\anchor{above south east}{%
- \csname pgf at anchor@rectangle with rounded corners at south east center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south east center\endcsname
\advance\pgf at x by \southeastradius
\advance\pgf at x by \outerxsep
}
\anchor{right north west}{%
- \csname pgf at anchor@rectangle with rounded corners at north west center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north west center\endcsname
\advance\pgf at y by \northwestradius
\advance\pgf at y by \outerysep
}
\anchor{right south west}{%
- \csname pgf at anchor@rectangle with rounded corners at south west center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south west center\endcsname
\advance\pgf at y by -\southwestradius
\advance\pgf at y by -\outerysep
}
\anchor{left north east}{%
- \csname pgf at anchor@rectangle with rounded corners at north east center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north east center\endcsname
\advance\pgf at y by \northeastradius
\advance\pgf at y by \outerysep
}
\anchor{left south east}{%
- \csname pgf at anchor@rectangle with rounded corners at south east center\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south east center\endcsname
\advance\pgf at y by -\southeastradius
\advance\pgf at y by -\outerysep
}
@@ -262,16 +273,16 @@
\pgfextract at process\externalpoint{}%
\ifdim\pgf at x=0pt
\ifdim\pgf at y<0pt
- \csname pgf at anchor@rectangle with rounded corners at south\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at south\endcsname
\else
- \csname pgf at anchor@rectangle with rounded corners at north\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at north\endcsname
\fi
\else
\ifdim\pgf at y=0pt
\ifdim\pgf at x<0pt
- \csname pgf at anchor@rectangle with rounded corners at west\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at west\endcsname
\else
- \csname pgf at anchor@rectangle with rounded corners at east\endcsname
+ \csname pgf at anchor@ext_rectangle with rounded corners at east\endcsname
\fi
\else
\rectanglewithroundedcornersparameter
@@ -283,18 +294,18 @@
\ifdim\pgf at xa<0pt
\ifdim\pgf at ya<0pt
% south west
- \pgf at sh@rwrc at anchorborder{above south west}{right south west}{south west}{180}{270}{\southwestradius}%
+ \pgfext at sh@rwrc at anchorborder{above south west}{right south west}{south west}{180}{270}{\southwestradius}%
\else
% north west
- \pgf at sh@rwrc at anchorborder{right north west}{below north west}{north west}{90}{180}{\northwestradius}%
+ \pgfext at sh@rwrc at anchorborder{right north west}{below north west}{north west}{90}{180}{\northwestradius}%
\fi
\else
\ifdim\pgf at ya<0pt
% south east
- \pgf at sh@rwrc at anchorborder{left south east}{above south east}{south east}{270}{360}{\southeastradius}%
+ \pgfext at sh@rwrc at anchorborder{left south east}{above south east}{south east}{270}{360}{\southeastradius}%
\else
% north east
- \pgf at sh@rwrc at anchorborder{below north east}{left north east}{north east}{0}{90}{\northeastradius}%
+ \pgfext at sh@rwrc at anchorborder{below north east}{left north east}{north east}{0}{90}{\northeastradius}%
\fi
\fi
\fi
@@ -301,18 +312,46 @@
\fi
}
}
-\def\pgf at sh@rwrc at anchorborder#1#2#3#4#5#6{%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf at anchor@rectangle with rounded corners@#1\endcsname}%
+\def\pgfext at sh@rwrc at anchorborder#1#2#3#4#5#6{%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf at anchor@ext_rectangle with rounded corners@#1\endcsname}%
\let\angleA\pgfmathresult
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf at anchor@rectangle with rounded corners@#2\endcsname}%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf at anchor@ext_rectangle with rounded corners@#2\endcsname}%
\let\angleB\pgfmathresult
\if\ifdim\angle pt>\angleA pt 0\else1\fi\ifdim\angle pt<\angleB pt 0\else 2\fi
\pgfmathpointintersectionoflineandarc{\externalPoint}{\centerpoint}
- {\csname pgf at anchor@rectangle with rounded corners@#3 center\endcsname}
+ {\csname pgf at anchor@ext_rectangle with rounded corners@#3 center\endcsname}
{#4}{#5}{#6+\outerxsep and #6+\outerysep}%
\else
\pgf at process{\pgfpointadd{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\halfheight}}}{\centerpoint}}%
\fi
}
-
-\endinput
+%%% Compatibility
+\pgfkeysifdefined{/tikz/ext/compat/shapes/. at cmd}{}{\pgfextset{/tikz-ext/compat/add library={shapes}{pre 0.6}}}
+\tikzextset{
+ compat/shapes/warn/.append style=/tikz/ext/compat/shapes.rectangleroundedcorners/warn,
+ compat/shapes/pre 0.6/.append style=/tikz/ext/compat/shapes.rectangleroundedcorners/pre 0.6,
+ compat/shapes.rectangleroundedcorners/warn/.code={%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/rectangle with rounded corners radius}{/pgf/ext/rectangle with rounded corners radius}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/rectangle with rounded corners north west radius}{/pgf/ext/rectangle with rounded corners north west radius}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/rectangle with rounded corners north east radius}{/pgf/ext/rectangle with rounded corners north east radius}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/rectangle with rounded corners south west radius}{/pgf/ext/rectangle with rounded corners south west radius}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/rectangle with rounded corners south east radius}{/pgf/ext/rectangle with rounded corners south east radius}%
+ \tikzextutil at compat@cloneshape{rectangle with rounded corners}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center,below north west,right north west,left north east,below north east,above south east,left south east,right south west,above south west,north west center,north east center,south east center,south west center}%
+ \def\tikzext at temp{\tikzextutil at compatmaybewarning{shape 'rectangle with rounded corners'}{'ext_rectangle with rounded corners'}{shapes = pre 0.6}}%
+ \expandafter\tikzextutil at prefix@macrotomacro\csname pgf at sh@s at rectangle with rounded corners\endcsname\tikzext at temp
+ },
+ compat/shapes.rectangleroundedcorners/pre 0.6/.code={%
+ \pgfkeysdef{/pgf/rectangle with rounded corners radius}{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners radius/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/rectangle with rounded corners north west radius}{\pgfkeyssetvalue{/pgf/ext/rectangle with rounded corners north west radius}{##1}}%
+ \pgfkeysdef{/pgf/rectangle with rounded corners north east radius}{\pgfkeyssetvalue{/pgf/ext/rectangle with rounded corners north east radius}{##1}}%
+ \pgfkeysdef{/pgf/rectangle with rounded corners south west radius}{\pgfkeyssetvalue{/pgf/ext/rectangle with rounded corners south west radius}{##1}}%
+ \pgfkeysdef{/pgf/rectangle with rounded corners south east radius}{\pgfkeyssetvalue{/pgf/ext/rectangle with rounded corners south east radius}{##1}}%
+ \pgfkeyssetvalue{/pgf/rectangle with rounded corners north west radius}{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners north west radius}}%
+ \pgfkeyssetvalue{/pgf/rectangle with rounded corners north east radius}{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners north east radius}}%
+ \pgfkeyssetvalue{/pgf/rectangle with rounded corners south west radius}{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners south west radius}}%
+ \pgfkeyssetvalue{/pgf/rectangle with rounded corners south east radius}{\pgfkeysvalueof{/pgf/ext/rectangle with rounded corners south east radius}}%
+ \tikzextutil at compat@cloneshape{rectangle with rounded corners}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center,below north west,right north west,left north east,below north east,above south east,left south east,right south west,above south west,north west center,north east center,south east center,south west center}%
+ },
+ compat/shapes.rectangleroundedcorners/\pgfkeysvalueof{/tikz/ext/compat/shapes}%
+}
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,17 +6,21 @@
% 2. under the GNU Free Documentation License.
%
\usepgflibrary{shapes.geometric,intersections}
-\pgfset{
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\pgfextset{
superellipse x exponent/.initial=2.5,
superellipse y exponent/.initial=2.5,
superellipse step/.initial=4,
- superellipse exponent/.style={/pgf/superellipse x exponent={#1},/pgf/superellipse y exponent={#1}}}
+ superellipse exponent/.style={/pgf/ext/superellipse x exponent={#1},/pgf/ext/superellipse y exponent={#1}}}
% Evaluates the x-value of a superellipse around the center
% #1 = t (0≤t≤90)
% #2 = 2/m (x-exp)
% #3 = a (x-rad)
-\pgfmathdeclarefunction{superellipsex}{3}{%
+\pgfmathdeclarefunction{ext_superellipsex}{3}{%
\pgfmathcos@{#1}%
\pgfmathpow@{\pgfmathresult}{#2}%
\pgfmathmultiply@{\pgfmathresult}{#3}}
@@ -25,11 +29,16 @@
% #1 = t (0≤t≤90)
% #2 = 2/n (y-exp)
% #3 = a (y-rad)
-\pgfmathdeclarefunction{superellipsey}{3}{%
+\pgfmathdeclarefunction{ext_superellipsey}{3}{%
\pgfmathsin@{#1}%
\pgfmathpow@{\pgfmathresult}{#2}%
\pgfmathmultiply@{\pgfmathresult}{#3}}
+\expandafter\let\expandafter\pgfmathextsuperellipsex\csname pgfmathext_superellipsex\endcsname
+\expandafter\let\expandafter\pgfmathextsuperellipsex@\csname pgfmathext_superellipsex@\endcsname
+\expandafter\let\expandafter\pgfmathextsuperellipsey\csname pgfmathext_superellipsey\endcsname
+\expandafter\let\expandafter\pgfmathextsuperellipsey@\csname pgfmathext_superellipsey@\endcsname
+
% Evaluates the x- and y- value of superellipse around the center
% #1 = t (0≤t≤90)
% #2 = 2/m (x-exp)
@@ -36,17 +45,17 @@
% #3 = 2/n (y-exp)
% #4 = a (x-rad)
% #5 = b (y-rad)
-\def\pgfmathsuperellipseXY#1#2#3#4#5{%
+\def\pgfextmathsuperellipseXY#1#2#3#4#5{%
\begingroup
- \pgfmathsuperellipsex@{#1}{#2}{#4}%
+ \pgfmathextsuperellipsex@{#1}{#2}{#4}%
\let\pgfmath at temp\pgfmathresult
- \pgfmathsuperellipsey@{#1}{#3}{#5}%
+ \pgfmathextsuperellipsey@{#1}{#3}{#5}%
\edef\pgfmath at temp{\def\noexpand\pgfmathresultX{\pgfmath at temp}%
\def\noexpand\pgfmathresultY{\pgfmathresult}}%
\expandafter
\endgroup\pgfmath at temp}
-\pgfdeclareshape{superellipse}{%
+\pgfdeclareshape{ext_superellipse}{%
\inheritsavedanchors[from=ellipse]
\inheritanchor[from=ellipse]{text}\inheritanchor[from=ellipse]{center}
\inheritanchor[from=ellipse]{mid}\inheritanchor[from=ellipse]{base}
@@ -87,17 +96,17 @@
\pgfpointadd{}{\centerpoint}%
}
\savedmacro\xexponent{%
- \pgfmathreciprocal{\pgfkeysvalueof{/pgf/superellipse x exponent}}%
+ \pgfmathreciprocal{\pgfkeysvalueof{/pgf/ext/superellipse x exponent}}%
\pgfmathmultiply@{\pgfmathresult}{2}%
\let\xexponent\pgfmathresult
}
\savedmacro\yexponent{%
- \pgfmathreciprocal{\pgfkeysvalueof{/pgf/superellipse y exponent}}%
+ \pgfmathreciprocal{\pgfkeysvalueof{/pgf/ext/superellipse y exponent}}%
\pgfmathmultiply@{\pgfmathresult}{2}%
\let\yexponent\pgfmathresult
}
\savedmacro\step{%
- \pgfmathtruncatemacro\step{\pgfkeysvalueof{/pgf/superellipse step}}%
+ \pgfmathtruncatemacro\step{\pgfkeysvalueof{/pgf/ext/superellipse step}}%
}
\backgroundpath{%
\pgf at process{\radius}%
@@ -108,15 +117,15 @@
\c at pgf@counta=\step
\pgfutil at loop
\ifnum\c at pgf@counta<90
- \pgfmathsuperellipseXY{\the\c at pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}%
+ \pgfextmathsuperellipseXY{\the\c at pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}%
\edef\pgf at temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{\pgfmathresultY pt}}}%
\pgfutil at append@macrotomacro\pgf at tempa\pgf at temp
\edef\pgf at temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{-\pgfmathresultX pt}{\pgfmathresultY pt}}}%
- \pgfutil at prefix@macrotomacro\pgf at tempb\pgf at temp
+ \tikzextutil at prefix@macrotomacro\pgf at tempb\pgf at temp
\edef\pgf at temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{-\pgfmathresultX pt}{-\pgfmathresultY pt}}}%
\pgfutil at append@macrotomacro\pgf at tempc\pgf at temp
\edef\pgf at temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{-\pgfmathresultY pt}}}%
- \pgfutil at prefix@macrotomacro\pgf at tempd\pgf at temp
+ \tikzextutil at prefix@macrotomacro\pgf at tempd\pgf at temp
\advance\c at pgf@counta by\step
\pgfutil at repeat
\pgftransformshift{\centerpoint}%
@@ -136,10 +145,18 @@
\anchorborder{%
\pgfextract at process\externalpoint{}%
\ifdim\pgf at x=0pt % catch special case x = 0
- \ifdim\pgf at y<0pt \pgf at anchor@superellipse at south\else\pgf at anchor@superellipse at north\fi
+ \ifdim\pgf at y<0pt
+ \csname pgf at anchor@ext_superellipse at south\endcsname
+ \else
+ \csname pgf at anchor@ext_superellipse at north\endcsname
+ \fi
\else
\ifdim\pgf at y=0pt % catch special case y = 0
- \ifdim\pgf at x<0pt \pgf at anchor@superellipse at west\else\pgf at anchor@superellipse at east\fi
+ \ifdim\pgf at x<0pt
+ \csname pgf at anchor@ext_superellipse at west\endcsname
+ \else
+ \csname pgf at anchor@ext_superellipse at east\endcsname
+ \fi
\else % both are not zero
% save original direction
\pgf at xa=\pgf at x
@@ -166,7 +183,7 @@
\c at pgf@counta=\step
\pgfutil at loop
\ifnum\c at pgf@counta<90
- \pgfmathsuperellipseXY{\the\c at pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}%
+ \pgfextmathsuperellipseXY{\the\c at pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}%
\edef\pgf at temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{\pgfmathresultY pt}}}%
\pgfutil at append@macrotomacro\pgf at tempa\pgf at temp
\advance\c at pgf@counta by\step
@@ -192,7 +209,30 @@
\fi
}
}
-\def\pgfutil at prefix@macrotomacro#1#2{%
- \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter%
- #1\expandafter\expandafter\expandafter{\expandafter#2#1}}
-\endinput
+%%% Compatibility
+\pgfkeysifdefined{/tikz/ext/compat/shapes/. at cmd}{}{\pgfextset{/tikz-ext/compat/add library={shapes}{pre 0.6}}}
+\tikzextset{
+ compat/shapes/warn/.append style=/tikz/ext/compat/shapes.superellipse/warn,
+ compat/shapes/pre 0.6/.append style=/tikz/ext/compat/shapes.superellipse/pre 0.6,
+ compat/shapes.superellipse/warn/.code={%
+ \tikzextutil at compatwarning@key {shapes}{pre 0.6}{/pgf/superellipse exponent} {/pgf/ext/superellipse exponent}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/superellipse x exponent}{/pgf/ext/superellipse x exponent}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/superellipse y exponent}{/pgf/ext/superellipse y exponent}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/superellipse step} {/pgf/ext/superellipse step}%
+ \tikzextutil at compat@cloneshape{superellipse}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center}%
+ \def\tikzext at temp{\tikzextutil at compatmaybewarning{shape 'superellipse'}{'ext_superellipse'}{shapes = pre 0.6}}%
+ \tikzextutil at prefix@macrotomacro\pgf at sh@s at superellipse\tikzext at temp
+ },
+ compat/shapes.superellipse/pre 0.6/.code={%
+ \pgfkeysdef{/pgf/superellipse exponent}{\pgfkeysvalueof{/pgf/ext/superellipse exponent/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/superellipse x exponent}{\pgfkeyssetvalue{/pgf/ext/superellipse x exponent}{##1}}%
+ \pgfkeysdef{/pgf/superellipse y exponent}{\pgfkeyssetvalue{/pgf/ext/superellipse y exponent}{##1}}%
+ \pgfkeysdef{/pgf/superellipse steps}{\pgfkeyssetvalue{/pgf/ext/superellipse steps}{##1}}%
+ \pgfkeyssetvalue{/pgf/superellipse x exponent}{\pgfkeysvalueof{/pgf/ext/superellipse x exponent}}%
+ \pgfkeyssetvalue{/pgf/superellipse y exponent}{\pgfkeysvalueof{/pgf/ext/superellipse y exponent}}%
+ \pgfkeyssetvalue{/pgf/superellipse step} {\pgfkeysvalueof{/pgf/ext/superellipse step}}%
+ \tikzextutil at compat@cloneshape{superellipse}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center}%
+ },
+ compat/shapes.superellipse/\pgfkeysvalueof{/tikz/ext/compat/shapes}%
+}
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.shapes.uncenteredrectangle.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -12,20 +12,23 @@
\let\pgfnodepartleftbox\pgfnodeparttwobox
\let\pgfnodepartrightbox\pgfnodepartthreebox
}
+\unless\ifcsname pgfextset\endcsname
+ \input tikzext-util.tex
+\fi
\newif\iftikzext at uncenteredrectangle@usesavedcenter
-\pgfset{
+\pgfextset{
uncentered rectangle use saved center/.is if=tikzext at uncenteredrectangle@usesavedcenter,
uncentered rectangle center yshift/.initial=,
uncentered rectangle center/@center/.initial=2,
uncentered rectangle center/.is choice,
- uncentered rectangle center/real/.code=\pgfkeyssetvalue{/pgf/uncentered rectangle center/@center}{0},
- uncentered rectangle center/left/.code=\pgfkeyssetvalue{/pgf/uncentered rectangle center/@center}{1},
- uncentered rectangle center/text/.code=\pgfkeyssetvalue{/pgf/uncentered rectangle center/@center}{2},
- uncentered rectangle center/right/.code=\pgfkeyssetvalue{/pgf/uncentered rectangle center/@center}{3}}
+ uncentered rectangle center/real/.code=\pgfkeyssetvalue{/pgf/ext/uncentered rectangle center/@center}{0},
+ uncentered rectangle center/left/.code=\pgfkeyssetvalue{/pgf/ext/uncentered rectangle center/@center}{1},
+ uncentered rectangle center/text/.code=\pgfkeyssetvalue{/pgf/ext/uncentered rectangle center/@center}{2},
+ uncentered rectangle center/right/.code=\pgfkeyssetvalue{/pgf/ext/uncentered rectangle center/@center}{3}}
-\pgfdeclareshape{uncentered rectangle}{%
+\pgfdeclareshape{ext_uncentered rectangle}{%
\nodeparts{text,left,right}%
\savedanchor\middleCenter{%
\pgf at x=.5\wd\pgfnodeparttextbox
@@ -181,7 +184,7 @@
}%
%
\savedmacro\center{%
- \pgfkeysgetvalue{/pgf/uncentered rectangle center/@center}\center
+ \pgfkeysgetvalue{/pgf/ext/uncentered rectangle center/@center}\center
}
\anchor{center}{%
\ifcase
@@ -188,7 +191,7 @@
\iftikzext at uncenteredrectangle@usesavedcenter
\center
\else
- \pgfkeysvalueof{/pgf/uncentered rectangle center/@center}%
+ \pgfkeysvalueof{/pgf/ext/uncentered rectangle center/@center}%
\fi\relax
\realCenter\or
\leftCenter\or
@@ -196,7 +199,7 @@
\rightCenter\else
\realCenter
\fi
- \pgfkeysgetvalue{/pgf/uncentered rectangle center yshift}\pgf at temp
+ \pgfkeysgetvalue{/pgf/ext/uncentered rectangle center yshift}\pgf at temp
\pgfutil at ifxempty\pgf at temp{% real center used
}{% calculate center
\pgfmathsetlength\pgf at y{\pgf at temp}%
@@ -211,10 +214,10 @@
\anchor{south west} {\southwest}
\anchor{north east} {\northeast}
\anchor{mid}{%
- \csname pgf at anchor@uncentered rectangle at center\endcsname
+ \csname pgf at anchor@ext_uncentered rectangle at center\endcsname
\pgfmathsetlength\pgf at y{.5ex}}%
\anchor{base}{%
- \csname pgf at anchor@uncentered rectangle at center\endcsname
+ \csname pgf at anchor@ext_uncentered rectangle at center\endcsname
\pgf at y=0pt
}%
\anchor{left mid} {\leftCenter \pgfmathsetlength\pgf at y{+.5ex}}
@@ -236,13 +239,13 @@
\anchor{north}{%
\pgf at anchor@rectangle at north
\pgf at ya=\pgf at y
- \csname pgf at anchor@uncentered rectangle at center\endcsname
+ \csname pgf at anchor@ext_uncentered rectangle at center\endcsname
\pgf at y=\pgf at ya
}
\anchor{south}{%
\pgf at anchor@rectangle at south
\pgf at ya=\pgf at y
- \csname pgf at anchor@uncentered rectangle at center\endcsname
+ \csname pgf at anchor@ext_uncentered rectangle at center\endcsname
\pgf at y=\pgf at ya
}
%\anchor{base right}{\middleCenter\pgf at xa=2\pgf at x}% TODO
@@ -263,13 +266,13 @@
\anchor{west}{%
\pgf at process{\southwest}%
\pgf at xa=\pgf at x
- \pgf at process{\csname pgf at anchor@uncentered rectangle at center\endcsname}%
+ \pgf at process{\csname pgf at anchor@ext_uncentered rectangle at center\endcsname}%
\pgf at x=\pgf at xa
}%
\anchor{east}{%
\pgf at process{\northeast}%
\pgf at xa=\pgf at x
- \pgf at process{\csname pgf at anchor@uncentered rectangle at center\endcsname}%
+ \pgf at process{\csname pgf at anchor@ext_uncentered rectangle at center\endcsname}%
\pgf at x=\pgf at xa
}%
\inheritanchor[from=rectangle]{south west}
@@ -286,7 +289,7 @@
\pgf at xa=\pgf at x
\pgf at ya=\pgf at y
% xc/yc is "center"
- \pgf at process{\csname pgf at anchor@uncentered rectangle at center\endcsname}%
+ \pgf at process{\csname pgf at anchor@ext_uncentered rectangle at center\endcsname}%
\pgf at xc=\pgf at x
\pgf at yc=\pgf at y
\ifdim\pgf at xa<0pt
@@ -338,4 +341,27 @@
\advance\pgf at y by\pgf at yc
}%
}
+%%% Compatibility
+\pgfkeysifdefined{/tikz/ext/compat/shapes/. at cmd}{}{\pgfextset{/tikz-ext/compat/add library={shapes}{pre 0.6}}}
+\tikzextset{
+ compat/shapes/warn/.append style=/tikz/ext/compat/shapes.uncenteredrectangle/warn,
+ compat/shapes/pre 0.6/.append style=/tikz/ext/compat/shapes.uncenteredrectangle/pre 0.6,
+ compat/shapes.uncenteredrectangle/warn/.code={%
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/uncentered rectangle use saved center}[true]{/pgf/ext/uncentered rectangle use saved center}%
+ \tikzextutil at compatwarning@valuekey{shapes}{pre 0.6}{/pgf/uncentered rectangle center yshift}{/pgf/ext/uncentered rectangle center yshift}
+ \tikzextutil at compatwarning@key{shapes}{pre 0.6}{/pgf/uncentered rectangle center}{/pgf/ext/uncentered rectangle center}
+ \tikzextutil at compat@cloneshape{uncentered rectangle}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center,real center,real mid,real base,real south,left,left north,left center,left mid,left base,left south,text north,text center,text mid,text base,text south,right north,right center,right mid,right base,right south}%
+ \def\tikzext at temp{\tikzextutil at compatmaybewarning{shape 'uncentered rectangle'}{'ext_uncentered rectangle'}{shapes = pre 0.6}}%
+ \expandafter\tikzextutil at prefix@macrotomacro\csname pgf at sh@s at uncentered rectangle\endcsname\tikzext at temp
+ },
+ compat/shapes.uncenteredrectangle/pre 0.6/.code={%
+ \pgfkeysdef{/pgf/uncentered rectangle use saved center}{\pgfkeysvalueof{/pgf/ext/uncentered rectangle use saved center/. at cmd}##1\pgfeov}%
+ \pgfkeyssetvalue{/pgf/uncentered rectangle use saved center/. at def}{true}%
+ \pgfkeysdef{/pgf/uncentered rectangle center}{\pgfkeysvalueof{/pgf/ext/uncentered rectangle center/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/uncentered rectangle center yshift}{\pgfkeyssetvalue{/pgf/ext/uncentered rectangle center yshift}{##1}}%
+ \pgfkeyssetvalue{/pgf/uncentered rectangle center yshift}{\pgfkeysvalueof{/pgf/ext/uncentered rectangle center yshift}}%
+ \tikzextutil at compat@cloneshape{uncentered rectangle}{text,north,north west,north east,center,west,east,mid,mid west,mid east,base,base west,base east,south,south west,south east,center,real center,real mid,real base,real south,left,left north,left center,left mid,left base,left south,text north,text center,text mid,text base,text south,right north,right center,right mid,right base,right south}%
+ },
+ compat/shapes.uncenteredrectangle/\pgfkeysvalueof{/tikz/ext/compat/shapes}%
+}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,7 +5,8 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\def\pgftransformxmirror#1{
+
+\def\pgfexttransformxmirror#1{
\pgfmathparse{#1}%
\ifpgfmathunitsdeclared
\pgf at xa\pgfmathresult pt\relax
@@ -12,10 +13,13 @@
\multiply\pgf at xa2
\pgftransformcm{-1}{0}{0}{1}{\pgfqpoint{\pgf at xa}{0pt}}%
\else
- \pgftransformmirror{\pgfqpointxy{\pgfmathresult}{0}}{\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}%
+ \pgfexttransformmirror
+ {\pgfqpointxy{\pgfmathresult}{0}}
+ {\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}
+ {\pgfqpointxy{0}{1}}}%
\fi
}
-\def\pgftransformymirror#1{
+\def\pgfexttransformymirror#1{
\pgfmathparse{#1}%
\ifpgfmathunitsdeclared
\pgf at ya\pgfmathresult pt\relax
@@ -22,11 +26,13 @@
\multiply\pgf at ya2
\pgftransformcm{1}{0}{0}{-1}{\pgfqpoint{0pt}{\pgf at ya}}%
\else
- \edef\pgf at marshal{\noexpand\pgftransformmirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}%
- {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}{\noexpand\pgfqpointxy{1}{0}}}}%
+ \edef\pgf at marshal{%
+ \noexpand\pgfexttransformmirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}%
+ {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}
+ {\noexpand\pgfqpointxy{1}{0}}}}%
\pgf at marshal
\fi}
-\def\pgftransformmirror#1#2{%
+\def\pgfexttransformmirror#1#2{%
\pgfextract at process\pgf at tempa{#1}%
\pgfpointnormalised{\pgfpointdiff{\pgf at tempa}{#2}}%
\pgf at xa=\pgf at sys@tonumber\pgf at y\pgf at x
@@ -40,7 +46,7 @@
\pgftransformshift{\pgfpointscale{-1}{\pgf at tempa}}%
}
-\def\pgfqtransformmirror#1{%
+\def\pgfextqtransformmirror#1{%
\pgfpointnormalised{#1}%
\pgf at xa=\pgf at sys@tonumber\pgf at y\pgf at x
\pgf at xb=\pgf at sys@tonumber\pgf at x\pgf at x
@@ -52,8 +58,8 @@
\expandafter\pgf at transformcm\pgf at temp{\pgfpointorigin}%
}
-% Using existant transformation (shift, rotate, yscale=-1, rotate back, shift back)
-\def\pgftransformxMirror#1{
+% Using existent transformation (shift, rotate, yscale=-1, rotate back, shift back)
+\def\pgfexttransformxMirror#1{
\pgfmathparse{#1}%
\ifpgfmathunitsdeclared
\pgf at xa\pgfmathresult pt\relax
@@ -60,10 +66,12 @@
\multiply\pgf at xa2
\pgftransformcm{-1}{0}{0}{1}{\pgfqpoint{\pgf at xa}{0pt}}%
\else
- \pgftransformMirror{\pgfqpointxy{\pgfmathresult}{0}}{\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}%
+ \pgfexttransformMirror
+ {\pgfqpointxy{\pgfmathresult}{0}}
+ {\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}%
\fi
}
-\def\pgftransformyMirror#1{
+\def\pgfexttransformyMirror#1{
\pgfmathparse{#1}%
\ifpgfmathunitsdeclared
\pgf at ya\pgfmathresult pt\relax
@@ -70,12 +78,14 @@
\multiply\pgf at ya2
\pgftransformcm{1}{0}{0}{-1}{\pgfqpoint{0pt}{\pgf at ya}}%
\else
- \edef\pgf at marshal{\noexpand\pgftransformMirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}%
- {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}{\noexpand\pgfqpointxy{1}{0}}}}%
+ \edef\pgf at marshal{%
+ \noexpand\pgfexttransformMirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}%
+ {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}
+ {\noexpand\pgfqpointxy{1}{0}}}}%
\pgf at marshal
\fi}
-\def\pgftransformMirror#1#2{%
+\def\pgfexttransformMirror#1#2{%
\pgfextract at process\pgf at tempa{#1}%
\pgfmathanglebetweenpoints{\pgf at tempa}{#2}%
\let\pgf at temp\pgfmathresult
@@ -86,7 +96,7 @@
\pgftransformshift{\pgfqpointscale{-1}{\pgf at tempa}}%
}
-\def\pgfqtransformMirror#1{%
+\def\pgfextqtransformMirror#1{%
\pgfmathanglebetweenpoints{\pgfpointorigin}{#1}%
\let\pgf at temp\pgfmathresult
\pgftransformrotate{\pgf at temp}%
@@ -93,4 +103,32 @@
\pgftransformyscale{-1}%
\pgftransformrotate{-\pgf at temp}%
}
-\endinput
\ No newline at end of file
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={transformations.mirror}{pre 0.6},
+ compat/transformations.mirror/warn/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{3}%
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgftransformxmirror}\pgfexttransformxmirror\pgfutil at gobble
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgftransformymirror}\pgfexttransformymirror\pgfutil at gobble
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgftransformmirror} \pgfexttransformmirror\pgfutil at gobbletwo
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgfqtransformmirror}\pgfextqtransformmirror\pgfutil at gobble
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgftransformxMirror}\pgfexttransformxMirror\pgfutil at gobble
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgftransformyMirror}\pgfexttransformyMirror\pgfutil at gobble
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgftransformMirror} \pgfexttransformMirror\pgfutil at gobbletwo
+ \tikzextutil at compatwarning@cmd{transformations.mirror}{pre 0.6}{pgfqtransformMirror}\pgfextqtransformMirror\pgfutil at gobble,
+ compat/transformations.mirror/pre 0.6/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{2}%
+ \let\pgftransformxmirror\pgfexttransformxmirror
+ \let\pgftransformymirror\pgfexttransformymirror
+ \let\pgftransformmirror \pgfexttransformmirror
+ \let\pgfqtransformmirror\pgfextqtransformmirror
+ \let\pgftransformxMirror\pgfexttransformxMirror
+ \let\pgftransformyMirror\pgfexttransformyMirror
+ \let\pgftransformMirror \pgfexttransformMirror
+ \let\pgfqtransformMirror\pgfextqtransformMirror,
+ % compat/transformations.mirror/0.6/.append code=\pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{1},
+ % compat/transformations.mirror/newest/.append code=\pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{0},
+ compat/transformations.mirror/\pgfkeysvalueof{/tikz/ext/compat/transformations.mirror}%
+}
+\endinput
Added: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzext-util.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzext-util.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzext-util.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -0,0 +1,209 @@
+% Copyright 2024 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\tikzextversion{0.6}
+\def\tikzextversionnumber{8}
+\def\tikzextset{\pgfqkeys{/tikz/ext}}
+\def\pgfextset{\pgfqkeys{/pgf/ext}}
+\gdef\tikzextutil at compatwarning@counter{0}
+\def\tikzextutil at compatmaybewarning#1#2#3{%
+ \ifnum\tikzextutil at compatwarning@counter<25
+ \xdef\tikzextutil at compatwarning@counter{\the\numexpr\tikzextutil at compatwarning@counter+1\relax}%
+ \pgfutil at packagewarning{tikz-ext}{%
+ The deprecated #1 was used. It is now #2. Please use that instead.^^J%
+ To remove this warning use \string\tikzextset\string{compat/#3\string}.^^J%
+ This warning will be removed in the next version and the #1 will fail.^^J%
+ }%
+ \else\ifnum\tikzextutil at compatwarning@counter=25
+ \gdef\tikzextutil at compatwarning@counter{26}%
+ \pgfutil at packagewarning{tikz-ext}{Too many warnings generated. Remain silent.}%
+ \fi\fi
+}
+\def\tikzextutil at compatwarning@cmd#1#2#3#4#5{%
+ \pgfutil at IfUndefined{#3}{%
+ \pgfutil at namedef{#3}{%
+ \tikzextutil at compatmaybewarning
+ {command \expandafter\pgfutil at gobble\string\\#3}{\string#4}{#1 = #2}%
+ #4%
+ }%
+ }{}%
+}
+\def\tikzextutil at compatwarning@key#1#2#3{%
+ \pgfutil at ifnextchar[%
+ {\tikzextutil at compatwarning@key at opt{#1}{#2}{#3}}%
+ {\tikzextutil at compatwarning@key@ {#1}{#2}{#3}{}}%
+}
+\def\tikzextutil at compatwarning@key at opt#1#2#3[#4]{%
+ \tikzextutil at compatwarning@key@{#1}{#2}{#3}{\pgfkeyssetvalue{#3/. at def}{#4}}%
+}
+\def\tikzextutil at compatwarning@key@#1#2#3#4#5{%
+ \pgfkeys at pathtoks{#3}%
+ \pgfkeysifdefined{#3}{%
+ % The key is a value key. Do not overwrite or adjust.
+ % Old TikZ-Ext key simply will not work.
+ }{%
+ \pgfkeysifdefined{#3/. at cmd}{%
+ % The key is a code key. Do not overwrite or adjust.
+ % Old TikZ-Ext key simply will not work.
+ }{%
+ % The key is currently not used.
+ #4%
+ \pgfkeysdef{#3}{%
+ \tikzextutil at compatmaybewarning{key '#3'}{'#5'}{#1 = #2}%
+ \pgfkeysvalueof{#5/. at cmd}##1\pgfeov
+ }%
+ }
+ }
+}
+\def\tikzextutil at compatwarning@valuekey#1#2#3#4{%
+ \pgfkeys at pathtoks{#3}%
+ \pgfkeysifdefined{#3}{%
+ % The key is a value key. Do not overwrite or adjust.
+ % Old TikZ-Ext key simply will not work.
+ }{%
+ \pgfkeysifdefined{#3/. at cmd}{%
+ % The key is a code key. Do not overwrite or adjust.
+ % Old TikZ-Ext key simply will not work.
+ }{%
+ % The key is currently not used.
+ \pgfkeyssetvalue{#3}{\pgfkeysvalueof{#4}}%
+ \pgfkeysdef{#3}{%
+ \tikzextutil at compatmaybewarning{value-key '#3'}{'#4'}{#1 = #2}%
+ \pgfkeyssetvalue{#4}{##1}%
+ }%
+ }
+ }
+}
+\def\tikzextutil at compatwarning@mathcmdZ#1#2#3#4{%
+ \pgfutil at IfUndefined{pgfmath#3}{%
+ \pgfmathdeclarefunction*{#3}{0}{%
+ \tikzextutil at compatmaybewarning{PGFMath function '#3'}{'#4'}{#1 = #2}%
+ \csname pgfmath#4@\endcsname
+ }%
+ }{}%
+}
+\def\tikzextutil at compatwarning@mathcmdI#1#2#3#4{%
+ \pgfutil at IfUndefined{pgfmath#3}{%
+ \pgfmathdeclarefunction*{#3}{1}{%
+ \tikzextutil at compatmaybewarning{PGFMath function '#3'}{'#4'}{#1 = #2}%
+ \csname pgfmath#4@\endcsname{##1}%
+ }%
+ }{}%
+}
+\def\tikzextutil at compatwarning@mathcmdII#1#2#3#4{%
+ \pgfutil at IfUndefined{pgfmath#3}{%
+ \pgfmathdeclarefunction*{#3}{2}{%
+ \tikzextutil at compatmaybewarning{PGFMath function '#3'}{'#4'}{#1 = #2}%
+ \csname pgfmath#4@\endcsname{##1}{##2}%
+ }%
+ }{}%
+}
+\def\tikzextutil at compatwarning@mathcmdX#1#2#3#4{%
+ \pgfutil at IfUndefined{pgfmath#3}{%
+ \pgfmathdeclarefunction*{#3}{...}{%
+ \tikzextutil at compatmaybewarning{PGFMath function '#3'}{'#4'}{#1 = #2}%
+ \csname pgfmath#4@\endcsname##1%
+ }%
+ }{}%
+}
+\def\tikzextutil at compatwarning@handler#1#2#3#4{%
+ \pgfkeys at pathtoks{/handlers/#3}%
+ \pgfkeysifdefined{/handlers/#3}{%
+ % The key is a value key. Do not overwrite or adjust.
+ % Old TikZ-Ext key simply will not work.
+ }{%
+ \pgfkeysifdefined{/handlers/#3/. at cmd}{%
+ % The key is a code key. Do not overwrite or adjust.
+ % Old TikZ-Ext key simply will not work.
+ }{%
+ % The key is currently not used.
+ \pgfkeysdef{/handlers/#3}{%
+ \tikzextutil at compatmaybewarning{handler '#3'}{'#4'}{#1 = #2}%
+ \pgfkeysvalueof{/handlers/#4/. at cmd}##1\pgfeov
+ }%
+ }
+ }
+}
+\def\tikzextutil at compat@cloneshape#1#2{%
+ \pgfutil at namelet{pgf at sh@s@#1}{pgf at sh@s at ext_#1}%
+ \def\tikzext at temp{\edef\pgf at sm@shape at name{ext_#1}}%
+ \expandafter\tikzextutil at prefix@macrotomacro\csname pgf at sh@s@#1\endcsname\tikzext at temp
+ \pgfutil at namelet{pgf at anchor@#1 at border}{pgf at anchor@ext_#1 at border}%
+ \pgfutil at namelet{pgf at sh@boxes@#1}{pgf at sh@boxes at ext_#1}%
+ \pgfutil at for\tikzext at temp:=#2\do{%
+ \pgfutil at namelet{pgf at anchor@#1@\tikzext at temp}{pgf at anchor@ext_#1@\tikzext at temp}}%
+ \pgfutil at for\tikzext at temp:=bbg,bg,fbg,fg,ffg\do{%
+ \pgfutil at namelet{pgf at sh@\tikzext at temp @#1}{pgf at sh@\tikzext at temp @ext_#1}}}
+\pgfextset{
+ pgf/.code=\pgfset{#1},
+ .code=\pgfextset{#1}%
+}
+\tikzextset{
+ tikz/.code=\tikzset{#1},
+ .code=\tikzextset{#1},
+ .search also={/pgf/ext,/pgf},
+ %
+ compat/.is choice, compat/.default=warn,
+ /tikz-ext/compat/add library/.code 2 args={%
+ \tikzextset{compat/#1/.is choice, compat/#1/.default=#2}%
+ \pgfutil at for\tikzext at temp:=pre 0.6,0.6,newest,warn\do{%
+ \pgfkeys at expanded{%
+ \noexpand\tikzextset{%
+ compat/\tikzext at temp/.append style=%
+ /tikz/ext/compat/#1/\tikzext at temp}}%
+ \pgfkeysedef
+ {/tikz/ext/compat/#1/\tikzext at temp}
+ {\noexpand\pgfkeyssetvalue{/tikz/ext/compat/#1}{\tikzext at temp}}%
+ }%
+ },
+ % /handlers/.ext_compat to warn/.code={%
+ % \edef\tikz at temp{\expandafter\tikzext at compat@stripext\pgfkeyscurrentpath\tikzext at stop}%
+ % \tikzextset{compat/#1/warn/.append code/.expanded=\noexpand}
+ % },
+}
+% \def\tikzext at compat@stripext#1/ext/#2\tikzext at stop{#1/#2}
+\def\tikzext at temp#1{%
+ \pgfkeysedef{/tikz/ext/compat/#1}{%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/arrows} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/pgffor} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/misc} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/nodes} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/node-families} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/patterns.images} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/paths.arcto} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/paths.ortho} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/paths.timer} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/pgffor-ext} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/pgfkeys-plus} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/positioning-plus} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/pgfcalendar-ext} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/scalepicture} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/shapes} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/topaths.arcthrough} {#1}%
+ \noexpand\pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror}{#1}%
+ }}
+\tikzext at temp{pre 0.6}
+\tikzext at temp{0.6}
+\tikzext at temp{newest}
+\tikzext at temp{warn}
+\tikzextset{compat=warn}
+
+\long\def\tikzextutil at gobblethree#1#2#3{}
+\def\tikzextutil at addto@macro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} % calendar: if
+\def\tikzextutil at prefixtomacro#1#2{%
+ \def\tikzext at temp{#2}%
+ \tikzextutil at prefix@macrotomacro#1\tikzext at temp
+}
+\def\tikzextutil at prefix@macrotomacro#1#2{%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter#1%
+ \expandafter\expandafter\expandafter{\expandafter#2#1}}
+
+\def\tikzextutil at firstofmany#1#2\pgf at stop{#1}
+\def\tikzextutil at secondofmany#1#2\pgf at stop{#2}
+\endinput
Property changes on: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzext-util.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.arrows-plus.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.arrows-plus.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.arrows-plus.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -0,0 +1,323 @@
+% Copyright 2024 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.
+%
+
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+
+% \tikzext at arrow@evalshift
+%
+% Stores the shift amount into \tikzext at arrow@shift@
+%
+\def\tikzext at arrow@evalshift#1{%
+ \pgf at arrow@compute at shortening#1%
+ \ifcase\pgfkeysvalueof{/tikz/ext/arrow/shift mode}\relax
+ \def\tikzext at arrow@shift@{0pt}%
+ \or
+ \pgfmathsetlengthmacro\tikzext at arrow@shift@
+ {(\pgfkeysvalueof{/tikz/ext/arrow shift factor})*-\pgf at xb}%
+ \or
+ \pgfmathsetlengthmacro\tikzext at arrow@shift@
+ {(\pgfkeysvalueof{/tikz/ext/arrow shift factor})*-\pgf at xa}%
+ \fi
+}
+
+
+% For bended arrows the shifting can't simply be done by a transformation
+% it must be done by the arrow system itself via the sep key.
+% For this to work as expected, the sep will need to be sneaked into
+% the options of the first or last arrow tip.
+\def\tikzext at arrow@sneakstart#1\pgf at stop{%
+ \unless\ifdim\tikzext at arrow@shift@=0pt
+ \def\pgf at start@tip at sequence{\pgf at arrow@handle{_}{\pgfarrowsep=\tikzext at arrow@shift@\relax}#1}%
+ \fi
+}
+\def\tikzext at arrow@sneakend#1\pgf at stop{%
+ \unless\ifdim\tikzext at arrow@shift@=0pt
+ \def\pgf at end@tip at sequence{#1\pgf at arrow@handle{_}{\pgfarrowsep=\tikzext at arrow@shift@\relax}}%
+ \fi
+}
+
+%
+% Arrow keys
+%
+\tikzextset{%
+ every softpath arrows/.code=
+ \pgfkeysdef{/tikz/pos >}{\pgfkeysvalueof{/tikz/pos/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/pos <}{\pgfkeyssetvalue{/tikz/ext/pos <}{##1}},
+ every arc arrows/.code=
+ \pgfkeysdef{/tikz/pos >}{\pgfkeysvalueof{/tikz/pos/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/pos <}{\pgfkeyssetvalue{/tikz/ext/pos <}{##1}},
+ softpath arrows/.default=,
+ softpath arrows/.code={%
+ \begingroup
+ \tikzset{ext/every softpath arrows,#1}%
+ \pgfsyssoftpath at getcurrentpath\tikz at temp
+ \pgfprocesssplitsubpath\tikz at temp
+ \expandafter\pgf at parse@end\pgfprocessresultsubpathsuffix\pgf at stop\pgf at stop\pgf at stop
+ \tikzext at arrow@softpath at curve
+ \setbox\tikz at whichbox=\hbox\bgroup
+ \unhbox\tikz at whichbox
+ \hbox\bgroup\bgroup
+ \pgfinterruptpath
+ \pgfscope
+ \pgfutil at ifxempty\pgf at start@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at start@tip at sequence
+ \expandafter\tikzext at arrow@sneakstart\pgf at start@tip at sequence\pgf at stop
+ }%
+ \pgfutil at ifxempty\pgf at end@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at end@tip at sequence
+ \expandafter\tikzext at arrow@sneakend\pgf at end@tip at sequence\pgf at stop
+ }%
+ \pgfset{tips}%
+ \pgftransformreset
+ \tikzext at arrow@softpath
+ \pgfusepath{}%
+ \endpgfscope
+ \endpgfinterruptpath
+ \egroup\egroup
+ \egroup
+ \global\setbox\tikz at tempbox=\box\tikz at whichbox%
+ \expandafter\endgroup%
+ \expandafter\setbox\tikz at whichbox=\box\tikz at tempbox%
+ },
+ arc arrows/.default=,
+ arc arrows/.code={%
+ \ifx\tikz at timer\tikz at timer@arc
+ \begingroup
+ \tikzset{ext/every arc arrows,#1}%
+ \setbox\tikz at whichbox=\hbox\bgroup
+ \unhbox\tikz at whichbox
+ \hbox\bgroup\bgroup
+ \pgfinterruptpath
+ \pgfscope
+ \pgfutil at ifxempty\pgf at start@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at start@tip at sequence
+ \expandafter\tikzext at arrow@sneakstart\pgf at start@tip at sequence\pgf at stop
+ }%
+ \pgfutil at ifxempty\pgf at end@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at end@tip at sequence
+ \expandafter\tikzext at arrow@sneakend\pgf at end@tip at sequence\pgf at stop
+ }%
+ \pgfset{tips}%
+ \tikzext at arrow@arcpath
+ \pgfusepath{}%
+ \endpgfscope
+ \endpgfinterruptpath
+ \egroup\egroup
+ \egroup
+ \global\setbox\tikz at tempbox=\box\tikz at whichbox
+ \expandafter\endgroup
+ \expandafter\setbox\tikz at whichbox=\box\tikz at tempbox
+ \else
+ \pgfutil at packagewarning{tikz-ext}
+ {arc arrow used on non-arc path segment, using ``softpath arrows'' instead}%
+ \tikzset{ext/softpath arrows={#1}}%
+ \fi
+ },
+ pos </.initial=0.0,
+ pos >/.style={/tikz/pos={#1}},
+ arrow shift mode/.is choice,
+ arrow shift mode/off/.code =\pgfkeyssetvalue{/tikz/ext/arrow/shift mode}{0},
+ arrow shift mode/total length/.code =\pgfkeyssetvalue{/tikz/ext/arrow/shift mode}{1},
+ arrow shift mode/total/.code =\pgfkeyssetvalue{/tikz/ext/arrow/shift mode}{1},
+ arrow shift mode/length until line end/.code=\pgfkeyssetvalue{/tikz/ext/arrow/shift mode}{2},
+ arrow shift mode/line end/.code =\pgfkeyssetvalue{/tikz/ext/arrow/shift mode}{2},
+ arrow shift mode=total length,
+ arrow shift factor/.initial=.5,
+}
+%
+% Arrow pics
+%
+\tikzset{
+ pics/ext/arrow/.default=,
+ pics/ext/arrow/.style={
+ /tikz/sloped, /tikz/allow upside down,
+ foreground code=, background code=, setup code=,
+ code=%
+ \edef\tikzext at temp{#1}%
+ \pgfutil at ifxempty\tikzext at temp{}{%
+ \pgfsetarrowsend{#1}%
+ }%
+ \tikzext at arrow@evalshift\pgf at end@tip at sequence
+ \pgftransformxshift{+-\tikzext at arrow@shift@}%
+ \pgf at arrow@draw at arrow\pgf at end@tip at sequence\pgf at xb
+ },
+ pics/ext/softpath arrow/.default=,
+ pics/ext/softpath arrow/.code={%
+ \let\pgf at start@tip at sequence\pgfutil at empty
+ \edef\tikzext at temp{#1}%
+ \pgfutil at ifxempty\tikzext at temp{}{%
+ \pgfsetarrowsend{#1}%
+ }%
+ \pgfqkeys{/tikz/pics}{ext/softpath arrows}%
+ },
+ pics/ext/softpath arrows/.default=,
+ pics/ext/softpath arrows/.style={
+ foreground code=, background code=,
+ setup code={%
+ \edef\tikzext at temp{#1}%
+ \pgfutil at ifxempty\tikzext at temp{}{%
+ \pgfsetarrows{#1}%
+ }%
+ \pgfutil at ifxempty\pgf at start@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at start@tip at sequence
+ \expandafter\tikzext at arrow@sneakstart\pgf at start@tip at sequence\pgf at stop
+ }%
+ \pgfutil at ifxempty\pgf at end@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at end@tip at sequence
+ \expandafter\tikzext at arrow@sneakend\pgf at end@tip at sequence\pgf at stop
+ }%
+ \pgfsyssoftpath at getcurrentpath\tikz at temp
+ \pgfprocesssplitsubpath\tikz at temp
+ \expandafter\pgf at parse@end\pgfprocessresultsubpathsuffix\pgf at stop\pgf at stop\pgf at stop
+ \tikzext at arrow@softpath at curve
+ },
+ code=%
+ \pgfset{tips}%
+ \pgftransformreset
+ \tikzext at arrow@softpath
+ \pgfusepath{}%
+ }
+}
+
+% curve
+\def\tikzext at arrow@softpath at curve{%
+ \ifx\pgfpointthirdlastonpath\relax
+ \let\tikzext at arrow@softpath\tikzext at arrow@linepath
+ \else
+ \let\tikzext at arrow@softpath\tikzext at arrow@curvepath
+ \fi
+}
+%
+% Paths
+%
+% Line
+\def\tikzext at arrow@linepath{%
+ \pgfpathmoveto{%
+ \pgfpointlineattime
+ {\pgfkeysvalueof{/tikz/ext/pos <}}
+ {\pgfpointsecondlastonpath}
+ {\pgfpointlastonpath}%
+ }%
+ \pgfpathlineto{%
+ \pgfpointlineattime
+ {\tikz at time}
+ {\pgfpointsecondlastonpath}
+ {\pgfpointlastonpath}%
+ }%
+}
+% Curve
+\def\tikzext at arrow@curvepath{%
+ \pgfpathcurvebetweentime
+ {\pgfkeysvalueof{/tikz/ext/pos <}}
+ {\tikz at time}
+ {\pgfpointfourthlastonpath}
+ {\pgfpointthirdlastonpath}
+ {\pgfpointsecondlastonpath}
+ {\pgfpointlastonpath}%
+}
+
+\def\tikzext at arrow@arcpath{%
+ \pgfmathcos@{\tikz at timer@start at angle}%
+ \let\tikz at angle@cos\pgfmathresult
+ \pgfmathsin@{\tikz at timer@start at angle}%
+ \let\tikz at angle@sin\pgfmathresult
+ \pgfpathmoveto{%
+ \pgfpointarcaxesattime
+ {\pgfkeysvalueof{/tikz/ext/pos <}}
+ {\pgfpointdiff{%
+ \pgfpointadd{\pgfpointscale{\tikz at angle@cos}{\tikz at timer@zero at axis}}
+ {\pgfpointscale{\tikz at angle@sin}{\tikz at timer@ninety at axis}}}{\tikz at timer@start}}
+ {\tikz at timer@zero at axis}
+ {\tikz at timer@ninety at axis}
+ {\tikz at timer@start at angle}
+ {\tikz at timer@end at angle}%
+ }%
+ \pgfpatharcaxes
+ {(\tikz at timer@end at angle-\tikz at timer@start at angle)*%
+ (\pgfkeysvalueof{/tikz/ext/pos <})+\tikz at timer@start at angle}
+ {(\tikz at timer@end at angle-\tikz at timer@start at angle)*%
+ (\tikz at time)+\tikz at timer@start at angle}
+ {\tikz at timer@zero at axis}
+ {\tikz at timer@ninety at axis}%
+}
+%
+% \arrow(reversed)*(*) macro for decoration.markings
+%
+\def\pgf at lib@dec at doarrowhead{%
+ \pgfutil at ifnextchar*%
+ {\tikzext at lib@dec at doarrowhead{1}}
+ {\pgfutil at ifnextchar[%
+ {\tikz at lib@dec at doarrowhead}
+ {\tikz at lib@dec at doarrowhead[]}%
+ }%
+}
+\def\pgf at lib@dec at doarrowheadrev{%
+ \pgfutil at ifnextchar*%
+ {\tikzext at lib@dec at doarrowhead{-1}}
+ {\pgfutil at ifnextchar[%
+ {\tikz at lib@dec at doarrowheadrev}
+ {\tikz at lib@dec at doarrowheadrev[]}%
+ }%
+}
+
+\def\tikzext at lib@dec at doarrowhead#1*{%
+ \pgfutil at ifnextchar*%
+ {\tikzext at lib@dec at doarrowhead@@{#1}}
+ {\pgfutil at ifnextchar[%
+ {\tikzext at lib@dec at doarrowhead@{#1}}
+ {\tikzext at lib@dec at doarrowhead@{#1}[]}}%
+}
+\def\tikzext at lib@dec at doarrowhead@#1[#2]#3{%
+ \scope[{#2}]%
+ \pgfsetarrowsend{#3}%
+ \pgfutil at ifxempty\pgf at end@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at end@tip at sequence
+ \pgftransformxscale{#1}%
+ \pgftransformxshift{+-\tikzext at arrow@shift@}%
+ \pgf at arrow@draw at arrow\pgf at end@tip at sequence\pgf at xb
+ }%
+ \endscope
+}
+\def\tikzext at lib@dec at doarrowhead@@#1*{%
+ \pgfutil at ifnextchar[%]
+ {\tikzext at lib@dec at doarrowhead@@@{#1}}
+ {\tikzext at lib@dec at doarrowhead@@@{#1}[]}%
+}
+
+\def\tikzext at lib@dec at doarrowhead@@@#1[#2]#3{%
+ \ifx\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentcurveto
+ \pgftransformreset
+ \pgfset{tips}%
+ \ifnum#1<0
+ \pgfsetarrows{[reversed]}%
+ \fi
+ \scope[{#2}]%
+ \pgfsetarrowsend{#3}%
+ \pgfutil at ifxempty\pgf at end@tip at sequence{}{%
+ \tikzext at arrow@evalshift\pgf at end@tip at sequence
+ \expandafter\tikzext at arrow@sneakend\pgf at end@tip at sequence\pgf at stop
+ \ifdim\pgf at decorate@inputsegmenttime pt=1pt % something weird for 1.0
+ \def\pgf at decorate@inputsegmenttime{1}%
+ \fi
+ \ifdim\pgf at decorate@inputsegmenttime pt<0.05pt % zero is bad
+ \def\pgf at decorate@inputsegmenttime{0.05}%
+ \fi
+ \pgfpathcurvebetweentime{0}{\pgf at decorate@inputsegmenttime}%
+ {\pgf at decorate@inputsegment at first}{\pgf at decorate@inputsegment at supporta}%
+ {\pgf at decorate@inputsegment at supportb}{\pgf at decorate@inputsegment at last}%
+ \pgfusepath{}%
+ }%
+ \endscope
+ \else
+ \tikzext at lib@dec at doarrowhead@{#1}[{#2}]{#3}%
+ \fi
+}
+\endinput
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.arrows-plus.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -44,52 +44,34 @@
% Weeks
-\def\tikzweekcode{\pgfkeysvalueof{/tikz/week code}}
-\def\tikzweektext{\pgfkeysvalueof{/tikz/week text}}
+\def\tikzextweekcode{\pgfkeysvalueof{/tikz/ext/week code}}
+\def\tikzextweektext{\pgfkeysvalueof{/tikz/ext/week text}}
-\tikzset{
+\tikzextset{
week code/.initial={%
- \node[every week]{\pgfkeysvalueof{/tikz/week text}};},
+ \node[ext/every week]{\pgfkeysvalueof{/tikz/ext/week text}};},
week text/.initial={\%n=},
- every week/.style=,
+ every week/.code=,
week label left/.style={
- every week/.append style={
- anchor=base east,
- xshift=-1.25*\pgfkeysvalueof{/tikz/day xshift}},
- execute before day scope=%
- \ifdate{Monday, equals=\pgfcalendarbeginiso}{\tikzweekcode}{}}}
+ /tikz/ext/every week/.append style={
+ /tikz/anchor=base east,
+ /tikz/xshift=-1.25*\pgfkeysvalueof{/tikz/day xshift}},
+ /tikz/execute before day scope=%
+ \ifdate{Monday, equals=\pgfcalendarbeginiso}{\tikzextweekcode}{}}}
%
% Overwriting original \tikz at lib@cal at if@else at code
%
\def\tikz at lib@cal at if@else at code#1#2#3{%
- \pgfutil at addto@macro\tikz at lib@cal at ifs{\ifdate{#1}{#2}{#3}}%
+ \tikzext at cal@doif\tikz at lib@cal at ifs{\ifdate{#1}{#2}{#3}}%
\tikz at lib@cal at scanner%
}
-%
-% Overwriting original \tikz at lib@cal at stop
-%
-\def\tikz at lib@cal at stop{%
- \pgftransformshift{\tikz at node@at}%
- \expandafter\pgfcalendar\expandafter{\tikz at fig@name}{\tikz at lib@cal at start}{\tikz at lib@cal at end}%
- {%
- \tikz at before@day%
- \scope%
- \tikz at atbegin@day%
- \let\pgfutil at addto@macro\pgfutil at secondoftwo
- \tikz at lib@cal at ifs%
- \tikzdaycode%
- \tikz at atend@day%
- \endscope%
- \tikz at after@day%
- }%
- \endgroup%
-}
+\let\tikzext at cal@doif\tikzextutil at addto@macro
+\tikzset{execute at begin day scope=\let\tikzext at cal@doif\pgfutil at secondoftwo}
-\def\pgfutil at addto@macro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
-\pgfmathdeclarefunction{weeksinmonthofyear}{3}{% #1 = first weekday, #2 = month, #3 = year
+\pgfmathdeclarefunction{ext_weeksinmonthofyear}{3}{% #1 = first weekday, #2 = month, #3 = year
\begingroup
\pgfmathlastdayinmonthofyear@{#2}{#3}%
\pgfmathadd@{#1}{\pgfmathresult}%
@@ -99,10 +81,52 @@
\pgfmathsmuggle\pgfmathresult
\endgroup
}
-\pgfmathdeclarefunction{lastdayinmonthofyear}{2}{% #1 = month, #2 = year
+\pgfmathdeclarefunction{ext_lastdayinmonthofyear}{2}{% #1 = month, #2 = year
\begingroup
- \pgfcalendar at getlastYMX{#2}{#1}{\pgfutil at tempcnta}%
+ \pgfextcalendar at getlastYMX{#2}{#1}{\pgfutil at tempcnta}%
\edef\pgfmathresult{\the\pgfutil at tempcnta}%
\pgfmathsmuggle\pgfmathresult
\endgroup
-}
\ No newline at end of file
+}
+\expandafter\let\expandafter\pgfmathextweeksinmonthofyear\csname pgfmathext_weeksinmonthofyear\endcsname
+\expandafter\let\expandafter\pgfmathextweeksinmonthofyear@\csname pgfmathext_weeksinmonthofyear@\endcsname
+\expandafter\let\expandafter\pgfmathextlastdayinmonthofyear\csname pgfmathext_lastdayinmonthofyear\endcsname
+\expandafter\let\expandafter\pgfmathextlastdayinmonthofyear@\csname pgfmathext_lastdayinmonthofyear@\endcsname
+
+%%% Compatibility
+\tikzextset{
+ compat/pgfcalendar-ext/warn/.append code={%
+ \tikzextutil at compatwarning@cmd{calendar-plus}{pre 0.6}{pgfmathlastdayinmonthofyear}\pgfmathextlastdayinmonthofyear\tikzextutil at gobblethree
+ \tikzextutil at compatwarning@cmd{calendar-plus}{pre 0.6}{pgfmathweeksinmonthofyear}\pgfmathextweeksinmonthofyear\pgfutil at gobbletwo
+ \pgfutil at for\tikzext at temp:=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,%
+ leap year,and,not,week of month,week of month',calendar week of month,%
+ calendar week of month',yesterday,week\do{%
+ \pgfkeys at expanded{\noexpand\tikzextutil at compatwarning@key
+ {pgfcalendar-ext}{pre 0.6}{/pgf/calendar/\tikzext at temp}{/pgf/calendar/ext/\tikzext at temp}%
+ }%
+ }%
+ \pgfkeyssetvalue{/pgf/calendar/leap year/. at def}{\pgfcalendarifdateyear}%
+ \pgfkeyssetvalue{/pgf/calendar/calendar week of month/. at def}{1}%
+ \pgfkeyssetvalue{/pgf/calendar/calendar week of month'/. at def}{1}%
+ \tikzextutil at compatwarning@cmd{pgfcalendar-ext}{pre 0.6}
+ {pgfcalendarjulianyeartoweek}\pgfextcalendarjulianyeartoweek\tikzextutil at gobblethree
+ },
+ compat/pgfcalendar-ext/pre 0.6/.append code={%
+ \pgfutil at for\tikzext at temp:=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,%
+ leap year,and,not,week of month,week of month',calendar week of month,%
+ calendar week of month',yesterday,week\do{%
+ \pgfkeysedef{/pgf/calendar/\tikzext at temp}{%
+ \noexpand\pgfkeysvalueof{/pgf/calendar/ext/\tikzext at temp/. at cmd}##1\noexpand\pgfeov
+ }%
+ \let\pgfcalendarjulianyeartoweek\pgfextcalendarjulianyeartoweek
+ \let\pgfmathweeksinmonthofyear\pgfmathextweeksinmonthofyear
+ \let\pgfmathweeksinmonthofyear@\pgfmathextweeksinmonthofyear@
+ \let\pgfmathlastdayinmonthofyear\pgfmathextlastdayinmonthofyear
+ \let\pgfmathlastdayinmonthofyear@\pgfmathextlastdayinmonthofyear@
+ \def\pgfcalendarcurrentweek{\pgfextcalendarcurrentweek}%
+ \def\pgfcalendarifdateweek{\pgfextcalendarifdateweek}%
+ }%
+ },
+ compat/pgfcalendar-ext/\pgfkeysvalueof{/tikz/ext/compat/pgfcalendar-ext}%
+}
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.layers.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.layers.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.layers.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -11,15 +11,13 @@
\def\tikzext at layers@swapfirstsetbox#1\setbox#2\tikzext at stop{%
#1\tikzext at layers@setbox at which#2%
}
+\def\tikzext at layers@whichbox{\tikz at figbox}%
\let\tikzext at layers@setbox at which\setbox
-\def\tikzshowdiscardlayeranyway{\box\pgf at layerbox@discard}
-\tikzset{
+\def\tikzextshowdiscardlayeranyway{\box\pgf at layerbox@discard}
+\pgfqkeys{/tikz/ext/layers}{
discard layer/.code=\expandafter\let\csname pgf at layerbox@#1\endcsname\pgfutil at voidb@x,
discard layer global/.code=\expandafter\global\expandafter\let\csname pgf at layerbox@#1\endcsname\pgfutil at voidb@x,
-}
-\def\tikzext at layers@whichbox{\tikz at figbox}%
-\pgfqkeys{/tikz-ext/layers}{
in box/.code={%
\expandafter\ifx\tikzext at layers@whichbox#1%
\pgfutil at packagewarning{tikz-ext}{Layer is already set. Setting will be skipped.}%
@@ -30,34 +28,34 @@
\fi
},
on layer/.style={
- /tikz-ext/layers/in box/.expand once=\csname pgf at layerbox@#1\endcsname
+ /tikz/ext/layers/in box/.expand once=\csname pgf at layerbox@#1\endcsname
},
discard/.style={
- /tikz-ext/layers/on layer=discard
+ /tikz/ext/layers/on layer=discard
},
- @common patch/.style={
+ patch/.is choice,
+ patch/all/.style={
+ /tikz/ext/layers/patch/@common patch,
+ /tikz/ext/layers/patch/node,
+ /tikz/ext/layers/patch/matrix,
+ /tikz/ext/layers/patch/pic,
+ /tikz/ext/layers/patch/edge,
+ },
+ patch/@common patch/.style={
/tikz/behind path/.append code =\let\tikzext at layers@setbox at which\setbox,
/tikz/in front of path/.append code =\let\tikzext at layers@setbox at which\setbox,
- /tikz-ext/layers/@common patch/.code=%
+ /tikz/ext/layers/patch/@common patch/.code=%
},
- patch/.is choice,
- patch/all/.style={
- /tikz-ext/layers/@common patch,
- /tikz-ext/layers/patch/node,
- /tikz-ext/layers/patch/matrix,
- /tikz-ext/layers/patch/pic,
- /tikz-ext/layers/patch/edge,
- },
patch/node/.style={%
/utils/exec=%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\tikz at fig@continue
\expandafter\expandafter\expandafter{\expandafter\tikzext at layers@swapfirstsetbox\tikz at fig@continue\tikzext at stop},%
- /tikz-ext/layers/@common patch,
- /tikz-ext/layers/patch/node/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
- /tikz/discard node/.style ={/tikz-ext/layers/discard},
- /tikz/node on layer/.style={/tikz-ext/layers/on layer={##1}},
- /tikz/node in box/.style ={/tikz-ext/layers/in box={##1}},
+ /tikz/ext/layers/patch/@common patch,
+ /tikz/ext/layers/patch/node/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
+ /tikz/ext/discard node/.style ={/tikz/ext/layers/discard},
+ /tikz/ext/node on layer/.style={/tikz/ext/layers/on layer={##1}},
+ /tikz/ext/node in box/.style ={/tikz/ext/layers/in box={##1}},
},
patch/matrix/.style={%
/utils/exec=%
@@ -64,34 +62,34 @@
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\tikz at do@matrix
\expandafter\expandafter\expandafter{\expandafter\tikzext at layers@swapfirstsetbox\tikz at do@matrix\tikzext at stop},%
- /tikz-ext/layers/@common patch,
- /tikz-ext/layers/patch/matrix/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
+ /tikz/ext/layers/patch/@common patch,
+ /tikz/ext/layers/patch/matrix/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
/tikz/execute at begin matrix={% in case patched node/edge/pic is used inside matrix
\let\tikzext at layers@setbox at which\setbox
\def\tikz at whichbox{\tikz at figbox}%
- \pgfkeys{/tikz-ext/layers/in box/.code=\pgfutil at packageerror{tikz-ext}{Layers inside a matrix can't be used.}}%
+ \tikzextset{layers/in box/.code=\pgfutil at packageerror{tikz-ext}{Layers inside a matrix can't be used.}}%
},
- /tikz/discard matrix/.style ={/tikz-ext/layers/discard},
- /tikz/matrix on layer/.style={/tikz-ext/layers/on layer={##1}},
- /tikz/matrix in box/.style ={/tikz-ext/layers/in box={##1}},
+ /tikz/ext/discard matrix/.style ={/tikz/ext/layers/discard},
+ /tikz/ext/matrix on layer/.style={/tikz/ext/layers/on layer={##1}},
+ /tikz/ext/matrix in box/.style ={/tikz/ext/layers/in box={##1}},
},
patch/edge/.style={%
/utils/exec=\let\tikz at do@edge\tikzext at layers@tikz at do@edge,
- /tikz-ext/layers/@common patch,
- /tikz-ext/layers/patch/edge/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
- /tikz/discard edge/.style={/tikz-ext/layers/discard},
- /tikz/edge on layer/.style={
- /tikz-ext/layers/on layer={##1}
+ /tikz/ext/layers/patch/@common patch,
+ /tikz/ext/layers/patch/edge/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
+ /tikz/ext/discard edge/.style={/tikz-ext/layers/discard},
+ /tikz/ext/edge on layer/.style={
+ /tikz/ext/layers/on layer={##1}
},
- /tikz/edge in box/.style={/tikz-ext/layers/in box={##1}},
+ /tikz/ext/edge in box/.style={/tikz/ext/layers/in box={##1}},
},
patch/pic/.style={%
/utils/exec=\let\tikz at subpicture@handle@\tikzext at layers@tikz at subpicture@handle@,
- /tikz-ext/layers/@common patch,
- /tikz-ext/layers/patch/pic/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
- /tikz/discard pic/.style={/tikz-ext/layers/discard},
- /tikz/pic on layer/.style={/tikz-ext/layers/on layer={##1}},
- /tikz/pic in box/.style={/tikz-ext/layers/in box={##1}},
+ /tikz/ext/layers/patch/@common patch,
+ /tikz/ext/layers/patch/pic/.code=\pgfutil at packagewarning{tikz-ext}{You can't apply the layers patch twice.},
+ /tikz/ext/discard pic/.style={/tikz/ext/layers/discard},
+ /tikz/ext/pic on layer/.style={/tikz/ext/layers/on layer={##1}},
+ /tikz/ext/pic in box/.style={/tikz/ext/layers/in box={##1}},
}
}
\def\tikzext at layers@tikz at do@edge{%
@@ -232,4 +230,27 @@
\fi%
\tikz at node@finish%
}%
+\endinput
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={layers}{pre 0.6},
+ compat/layers/warn/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/layers@}{3}%
+ \tikzextutil at compatwarning@key{layers}{pre 0.6}{/tikz-ext/patch} {/tikz/ext/layers/patch}%
+ \tikzextutil at compatwarning@key{layers}{pre 0.6}{/tikz/node on layer} {/tikz/ext/node on layer}%
+ \tikzextutil at compatwarning@key{layers}{pre 0.6}{/tikz/matrix on layer}{/tikz/ext/matrix on layer}%
+ \tikzextutil at compatwarning@key{layers}{pre 0.6}{/tikz/edge on layer} {/tikz/ext/edge on layer}%
+ \tikzextutil at compatwarning@key{layers}{pre 0.6}{/tikz/pic on layer} {/tikz/ext/pic on layer},
+ compat/layers/pre 0.6/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/layers@}{2}%
+ \pgfkeysdef{/tikz-ext/patch} {\pgfkeysvalueof{/tikz/ext/layers/patch/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node on layer} {\pgfkeysvalueof{/tikz/ext/node on layer/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/matrix on layer}{\pgfkeysvalueof{/tikz/ext/matrix on layer/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/edge on layer} {\pgfkeysvalueof{/tikz/ext/edge on layer/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/pic on layer} {\pgfkeysvalueof{/tikz/ext/pic on layer/. at cmd}##1\pgfeov},
+ % compat/layers/0.6/.append code=\pgfkeyssetvalue{/tikz/ext/compat/layers@}{1},
+ % compat/layers/newest/.append code=\pgfkeyssetvalue{/tikz/ext/compat/layers@}{0},
+ compat/layers/\pgfkeysvalueof{/tikz/ext/compat/layers}%
+}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -18,22 +18,28 @@
%% 10R = 360°
%% Calling the full arc key with an empty value
%% makes 1R = 1°
-\pgfset{full arc/.code=%
- \def\pgf at temp{#1}%
- \ifx\pgfutil at empty\pgf at temp
- \let\pgfmath at fullarc@factor\pgfutil at empty
- \else
- \pgfmathsetmacro\pgfmath at fullarc@factor{360/(#1)}%
- \fi,full arc=}
-\pgfmathdeclareoperator{R}{full arc}{1}{postfix}{950}
-\pgfmathdeclarefunction{full arc}{1}{%
+\pgfkeyslet{/pgf/ext/full arc}\pgfutil at empty
+\pgfextset{
+ full arc/.code=%
+ \edef\pgf at temp{#1}%
+ \ifx\pgfutil at empty\pgf at temp
+ \pgfkeyslet{/pgf/ext/full arc}\pgfutil at empty
+ \else
+ \pgfmathdivide{360}{#1}%
+ \pgfkeyslet{/pgf/ext/full arc}\pgfmathresult
+ \fi
+}
+\pgfmathdeclareoperator{R}{extfullarc}{1}{postfix}{950}
+\pgfmathdeclarefunction{extfullarc}{1}{%
\begingroup
\pgfmath at x=#1pt\relax
- \ifx\pgfmath at fullarc@factor\pgfutil at empty\else
- \pgfmath at x\pgfmath at fullarc@factor\pgfmath at x
+ \expandafter\ifx\csname pgfk@/pgf/ext/full arc\endcsname\pgfutil at empty
+ \else
+ \pgfmath at x\csname pgfk@/pgf/ext/full arc\endcsname\pgfmath at x
\fi
\pgfmath at returnone\pgfmath at x
- \endgroup}
+ \endgroup
+}
\pgfutil at IfUndefined{tikzext at pgf@foreach at no@list at parse@to}{% stupid test
\input pgffor-ext.code.tex
@@ -41,7 +47,7 @@
%% PGFmath
%% strrepeat("x", 5) = "xxxxx"
-\pgfmathdeclarefunction{strrepeat}{2}{%
+\pgfmathdeclarefunction{extstrrepeat}{2}{%
\begingroup\pgfmathint{#2}\pgfmath at count\pgfmathresult
\let\pgfmathresult\pgfutil at empty
\pgfutil at loop\ifnum\pgfmath at count>0\relax
@@ -48,55 +54,33 @@
\expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}%
\advance\pgfmath at count-1\relax
\pgfutil at repeat\pgfmath at smuggleone\pgfmathresult\endgroup}
-
%% isInString("foo", "foobar") = true (= 1)
%% isInString("boo", "foobar") = false (= 0)
-\pgfmathdeclarefunction{isInString}{2}{%
+\pgfmathdeclarefunction{extisInString}{2}{%
\pgfutil at in@{#1}{#2}%
\ifpgfutil at in@\def\pgfmathresult{1}\else\def\pgfmathresult{0}\fi}
%% strcat("foo", "bar") = "foobar" (can have more than two parameters)
-\pgfutil at IfUndefined{pgfmathstrcat@}{
- \pgfmathdeclarefunction{strcat}{...}{%
- \begingroup
- \let\pgfmathresult\pgfutil at empty
- \pgfmathstrcat@@#1\pgfmath at stop}
- \def\pgfmathstrcat@@#1{%
- \ifx\pgfmath at stop#1%
- \def\pgfmath at next{\pgfmath at smuggleone\pgfmathresult\endgroup}
- \else
- \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}%
- \let\pgfmath at next\pgfmathstrcat@@
- \fi
- \pgfmath at next}
-}{}
+\pgfmathdeclarefunction{extstrcat}{...}{%
+ \begingroup
+ \let\pgfmathresult\pgfutil at empty
+ \pgfextmathstrcat@@#1\pgfmath at stop
+}
+\def\pgfextmathstrcat@@#1{%
+ \ifx\pgfmath at stop#1%
+ \def\pgfmath at next{\pgfmath at smuggleone\pgfmathresult\endgroup}%
+ \else
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}%
+ \let\pgfmath at next\pgfextmathstrcat@@
+ \fi
+ \pgfmath at next
+}
% http://tex.stackexchange.com/questions/244569/bounding-lines-around-tax-nodes/244619#244619
-\pgfmathdeclarefunction{atanXY}{2}{\pgfmathatantwo@{#2}{#1}}
-\pgfmathdeclarefunction{atanYX}{2}{\pgfmathatantwo@{#1}{#2}}
+\pgfmathdeclarefunction{extatanXY}{2}{\pgfmathatantwo@{#2}{#1}}
+\pgfmathdeclarefunction{extatanYX}{2}{\pgfmathatantwo@{#1}{#2}}
-%% http://tex.stackexchange.com/a/132939/16595
-\tikzset{
- @edges through/.code={{{% three braces to protect \pgfeov
- \pgfutil at ifnextchar[{\pgfkeysvalueof{/tikz/@@edges through/. at cmd}}
- {\pgfkeysvalueof{/tikz/@@edges through/. at cmd}[]}#1\pgfeov}}},
- @@edges through/.style args={[#1]#2}{/tikz/insert path={edge[#1] (#2) (#2)}},
- edges through/.style={/tikz/@edges through/.list={#1}}}
-\tikzset{
- @edges to/.code={{{% three braces to protect \pgfeov
- \pgfutil at ifnextchar[{\pgfkeysvalueof{/tikz/@@edges to/. at cmd}}
- {\pgfkeysvalueof{/tikz/@@edges to/. at cmd}[]}#1\pgfeov}}},
- @@edges to/.style args={[#1]#2}{/tikz/insert path={edge[#1] (#2)}},
- edges to/.style={/tikz/@edges to/.list={#1}}}
-\tikzset{
- @tos to/.code={{{% three braces to protect \pgfeov
- \pgfutil at ifnextchar[{\pgfkeysvalueof{/tikz/@@tos to/. at cmd}}
- {\pgfkeysvalueof{/tikz/@@tos to/. at cmd}[]}#1\pgfeov}}},
- @@tos to/.style args={[#1]#2}{/tikz/insert path={to[#1] (#2)}},
- tos to/.style={/tikz/@tos to/.list={#1}}}
-
-
-\pgfmathdeclarefunction{distancebetween}{2}{% only coordinates/nodes
+\pgfmathdeclarefunction{extdistancebetween}{2}{% only coordinates/nodes
\begingroup
\nullfont
\pgfpointdiff{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}%
@@ -104,7 +88,7 @@
\expandafter\pgfmathveclen@\pgfmath at temp
\pgfmath at smuggleone\pgfmathresult
\endgroup}
-\pgfmathdeclarefunction{qdistancebetween}{1}{% only coordinates/nodes
+\pgfmathdeclarefunction{extqdistancebetween}{1}{% only coordinates/nodes
\begingroup
\nullfont
\pgfpointdiff{\pgfpointorigin}{\pgfpointanchor{#1}{center}}%
@@ -113,7 +97,7 @@
\pgfmath at smuggleone\pgfmathresult
\endgroup}
-\pgfmathdeclarefunction{qanglebetween}{1}{%
+\pgfmathdeclarefunction{extqanglebetween}{1}{%
\begingroup
\nullfont
\pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfpointanchor{#1}{center}}%
@@ -121,7 +105,7 @@
\endgroup
}
-\pgfmathdeclarefunction{anglebetween}{2}{%
+\pgfmathdeclarefunction{extanglebetween}{2}{%
\begingroup
\nullfont
\pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}%
@@ -129,14 +113,16 @@
\endgroup
}
-\pgfmathdeclarefunction{isEmpty}{1}{%
+\pgfmathdeclarefunction{extisEmpty}{1}{%
\begingroup
\def\pgfmath at temp{#1}%
\pgfutil at ifxempty\pgfmath at temp{\def\pgfmathresult{1}}{\def\pgfmathresult{0}}%
\pgfmath at smuggleone\pgfmathresult
- \endgroup}
+ \endgroup
+}
-\pgfset{
+
+\pgfextset{
declare constant/.code={%
\let\pgfmathdeclareconstant@@@\pgfutil at empty
\pgfkeysvalueof{/pgf/declare function/execute at begin function}%
@@ -157,7 +143,7 @@
%%% Some shape
-\tikzset{% quick versions of reverse clips
+\tikzextset{% quick versions of reverse clips
reverse clip/.is choice,
reverse clip/clockwise/.code={%
\begingroup
@@ -183,27 +169,45 @@
clip rule/even odd/.code=\pgfseteorule,
clip rule/nonzero/.code=\pgfsetnonzerorule,
reverse clip/.default=counter clockwise,
- remember path/.code={%
- \tikz at addmode{%
- \expandafter\pgfsyssoftpath at getcurrentpath\csname tikz at intersect@path at name@remember path-#1\endcsname
- \immediate\write\pgfutil at auxout{%
- \noexpand\expandafter\gdef\noexpand\csname tikz at intersect@path at name@remember path-#1\endcsname{%
- \expandafter\expandafter\expandafter\unexpanded
- \expandafter\expandafter\expandafter{%
- \csname tikz at intersect@path at name@remember path-#1\endcsname
- }%
- }%
- }%
- }%
+}
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={misc}{pre 0.6},
+ compat/misc/warn/.append code={%
+ \tikzextutil at compatwarning@key{misc}{pre 0.6}{/pgf/full arc}{/pgf/ext/full arc}%
+ \tikzextutil at compatwarning@mathcmdII{misc}{pre 0.6}{strrepeat}{extstrrepeat}%
+ \tikzextutil at compatwarning@mathcmdII{misc}{pre 0.6}{isInString}{extisInString}%
+ \ifcsname pgfmathstrcat@\endcsname\else
+ \let\pgfmathextstrcat at noforest\relax
+ \tikzextutil at compatwarning@mathcmdX{misc}{pre 0.6}{strcat}{extstrcat}%
+ \fi
+ \tikzextutil at compatwarning@mathcmdI{misc}{pre 0.6}{isEmpty}{extisEmpty}%
+ \tikzextutil at compatwarning@mathcmdII{misc}{pre 0.6}{atanXY}{extatanXY}%
+ \tikzextutil at compatwarning@mathcmdII{misc}{pre 0.6}{atanYX}{extatanYX}%
+ \tikzextutil at compatwarning@mathcmdII{misc}{pre 0.6}{anglebetween}{extanglebetween}%
+ \tikzextutil at compatwarning@mathcmdII{misc}{pre 0.6}{distancebetween}{extdistancebetween}%
+ \tikzextutil at compatwarning@mathcmdI{misc}{pre 0.6}{qanglebetween}{extqanglebetween}%
+ \tikzextutil at compatwarning@mathcmdI{misc}{pre 0.6}{qdistancebetween}{extqdistancebetween}%
},
- remembered path/.code={%
- \pgfutil at IfUndefined{tikz at intersect@path at name@remember path-#1}{}{%
- \tikz at addmode{%
- \expandafter\pgfsyssoftpath at setcurrentpath
- \expandafter{%
- \csname tikz at intersect@path at name@remember path-#1\endcsname
- }%
- }%
- }%
- },%
-}
\ No newline at end of file
+ compat/misc/pre 0.6/.append code={%
+ \pgfkeysdef{/pgf/full arc}{\pgfkeysvalueof{/pgf/ext/full arc/. at cmd}##1\pgfeov}%
+ \pgfmathdeclarefunction*{strrepeat}{2}{\pgfmathextstrrepeat@{##1}{##2}}%
+ \pgfmathdeclarefunction*{isInString}{2}{\pgfmathextisInString@{##1}{##2}}%
+ \pgfmathdeclarefunction*{isEmpty}{1}{\pgfmathextisEmpty@{##1}}%
+ \pgfmathdeclarefunction*{anglebetween}{2}{\pgfmathextanglebetween@{##1}{##2}}%
+ \pgfmathdeclarefunction*{qanglebetween}{1}{\pgfmathextqanglebetween@{##1}}%
+ \pgfmathdeclarefunction*{distancebetween}{2}{\pgfmathextdistancebetween@{##1}{##2}}%
+ \pgfmathdeclarefunction*{qdistancebetween}{1}{\pgfmathextqdistancebetween@{##1}}%
+ \pgfmathdeclarefunction*{atanXY}{2}{\pgfmathextatantwo@{##2}{##1}}%
+ \pgfmathdeclarefunction*{atanYX}{2}{\pgfmathextatantwo@{##2}{##1}}%
+ \ifcsname pgfmathstrcat@\endcsname
+ \ifcsname pgfmathextstrcat at noforest\endcsname
+ \pgfmathdeclarefunction*{strcat}{...}{\pgfmathextstrcat##1}%
+ \fi
+ \else
+ \let\pgfmathextstrcat at noforest\relax
+ \pgfmathdeclarefunction{strcat}{...}{\pgfmathextstrcat##1}%
+ \fi
+ },
+ compat/misc/\pgfkeysvalueof{/tikz/ext/compat/misc}%
+}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,16 +6,59 @@
% 2. under the GNU Free Documentation License.
%
-\def\tikzext at nf@align at left#1{}
-\def\tikzext at nf@align at center#1{\kern.5#1}
-\def\tikzext at nf@align at right#1{\kern#1}
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
-\pgfqkeys{/tikz/node family}{
+\def\tikzext at nf@write#1{%
+ \immediate\write\pgfutil at auxout{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname tikzext at nf@#1 at previous\endcsname
+ {\csname tikzext at nf@#1 at next\endcsname}%
+ }%
+}
+\pgfkeyssetvalue{/tikz/ext/node family/prefix}{\pgfpictureid-}% no md5
+\pgfutil at IfUndefined{mmz at mode}{% \mmz at mode is only defined with memoizable, not with memoizable or nomemoize
+ \let\tikzext at nf@save\tikzext at nf@write
+}{%
+ % #1 = family type + name
+ \def\tikzext at nf@save#1{%
+ \pgfutil at IfUndefined{tikzext at nf@#1 at previous}{%
+ \mmzAbort
+ \ifmemoize
+ \mmzset{after memoization=\tikzext at nf@write{#1}}%
+ \else
+ \tikzext at nf@write{#1}%
+ \fi
+ }{%
+ \ifdim\csname tikzext at nf@#1 at previous\expandafter\endcsname=%
+ \csname tikzext at nf@#1 at next\endcsname
+ \ifmemoize
+ \mmzset{after memoization=\tikzext at nf@write{#1}}%
+ \else
+ \tikzext at nf@write{#1}%
+ \fi
+ \else
+ \mmzAbort
+ \ifmemoize
+ \mmzset{after memoization=\tikzext at nf@write{#1}}%
+ \else
+ \tikzext at nf@write{#1}%
+ \fi
+ \fi
+ }%
+ }%
+}
+
+\def\tikzext at nf@align at left#1{\unhbox#1\hfil}
+\def\tikzext at nf@align at center#1{\hfil\unhbox#1\hfil}
+\def\tikzext at nf@align at right#1{\hfil\unhbox#1}
+
+\pgfqkeys{/tikz/ext/node family}{
width/.initial=,
- width/.append style={/pgf/minimum width=nf_width},
+ width/.append style={/pgf/minimum width=ext_nf_width},
height/.initial=,
- height/.append style={/pgf/minimum height=nf_height},
- size/.code=\pgfqkeys{/tikz/node family}{width={#1},height={#1}},
+ height/.append style={/pgf/minimum height=ext_nf_height},
+ size/.code=\pgfqkeys{/tikz/ext/node family}{width={#1},height={#1}},
text depth/.initial=,
text height/.initial=,
text width align/.is choice,
@@ -24,20 +67,10 @@
text width align/right/.code=\let\tikzext at nf@align at action\tikzext at nf@align at right,
text width align=center,
text width/.initial=,
- text/.code=\pgfqkeys{/tikz/node family}{text depth={#1},text height={#1},text width={#1}},
- prefix/.initial=\pgfpictureid-,
+ text/.code=\pgfqkeys{/tikz/ext/node family}{text depth={#1},text height={#1},text width={#1}},
}
-\tikzset{node family/.code=\pgfqkeys{/tikz/node family}{#1}}
+\tikzextset{node family/.code=\pgfqkeys{/tikz/ext/node family}{#1}}
-% #1 = family type + name
-\def\tikzext at nf@save#1{%
- %\errmessage{#1}%
- \immediate\write\pgfutil at auxout{%
- \noexpand\expandafter\noexpand\gdef\noexpand\csname tikzext at nf@#1 at previous\endcsname
- {\csname tikzext at nf@#1 at next\endcsname}%
- }%
-}
-
% #1 = value to set
% #2 = family type
% #3 = return dimen
@@ -44,10 +77,10 @@
\def\tikzext at nf@getandset#1#2#3{%
% what's our family's name?
#3=0pt\relax
- \pgfkeysgetvalue{/tikz/node family/#2}\tikzext at nf@familyname
+ \pgfkeysgetvalue{/tikz/ext/node family/#2}\tikzext at nf@familyname
\pgfutil at ifxempty\tikzext at nf@familyname{% no family to deal with
}{%
- \edef\tikzext at nf@familyname{\pgfkeysvalueof{/tikz/node family/prefix}\tikzext at nf@familyname}%
+ \edef\tikzext at nf@familyname{\pgfkeysvalueof{/tikz/ext/node family/prefix}\tikzext at nf@familyname}%
% we need to save the value for the next run
\pgfutil at IfUndefined{tikzext at nf@#2@\tikzext at nf@familyname @next}{%
% first time: define first value and install hook at end of picture
@@ -70,9 +103,9 @@
% #1 = family type
% #2 = family
\def\tikzext at nf@get#1#2{%
- \pgfutil at IfUndefined{tikzext at nf@#1@\pgfkeysvalueof{/tikz/node family/prefix}#2 at previous}
+ \pgfutil at IfUndefined{tikzext at nf@#1@\pgfkeysvalueof{/tikz/ext/node family/prefix}#2 at previous}
{0pt}
- {\csname tikzext at nf@#1@\pgfkeysvalueof{/tikz/node family/prefix}#2 at previous\endcsname}%
+ {\csname tikzext at nf@#1@\pgfkeysvalueof{/tikz/ext/node family/prefix}#2 at previous\endcsname}%
}
\def\tikzextnodefamiliesgetwidth{\tikzext at nf@get{width}}
\def\tikzextnodefamiliesgetheight{\tikzext at nf@get{height}}
@@ -296,14 +329,12 @@
\expandafter\expandafter\expandafter{\expandafter\pgf at temp#1}%
}
-\pgfqkeys{/tikz/node family}{
+\pgfqkeys{/tikz/ext/node family}{
setup shape/.code={%
\expandafter\pgfutil at prefixto@macro\csname pgf at sh@s@#1\endcsname{%
\tikzext at nf@getandset{\the\wd\pgfnodeparttextbox}{text width}{\pgfutil at tempdima}%
\ifdim\wd\pgfnodeparttextbox<\pgfutil at tempdima
- \pgfutil at tempdimb=\pgfutil at tempdima
- \advance\pgfutil at tempdimb-\wd\pgfnodeparttextbox
- \setbox\pgfnodeparttextbox=\hbox to \pgfutil at tempdima{\tikzext at nf@align at action\pgfutil at tempdimb\unhbox\pgfnodeparttextbox}%
+ \setbox\pgfnodeparttextbox=\hbox to \pgfutil at tempdima{\tikzext at nf@align at action\pgfnodeparttextbox}%
\fi
\tikzext at nf@getandset{\the\dp\pgfnodeparttextbox}{text depth}{\pgfutil at tempdima}%
\ifdim\dp\pgfnodeparttextbox<\pgfutil at tempdima
@@ -324,7 +355,7 @@
\def\tikzext at nf@function at circle{{\the\pgf at x}{\the\pgf at x}}
\def\tikzext at nf@function at circle@double{{\the\dimexpr2\pgf at x\relax}{\the\dimexpr2\pgf at x\relax}}
-\pgfmathdeclarefunction{nf_width}{0}{%
+\pgfmathdeclarefunction{ext_nf_width}{0}{%
\begingroup
\pgfutil at IfUndefined{tikzext at nf@function@\pgf at sm@shape at name}{%
\let\tikzext at nf@function\tikzext at nf@function at default
@@ -337,7 +368,7 @@
\pgfmath at smuggleone\pgfmathresult
\endgroup
}
-\pgfmathdeclarefunction{nf_height}{0}{%
+\pgfmathdeclarefunction{ext_nf_height}{0}{%
\begingroup
\pgfutil at IfUndefined{tikzext at nf@function@\pgf at sm@shape at name}{%
\let\tikzext at nf@function\tikzext at nf@function at default
@@ -349,4 +380,32 @@
\edef\pgfmathresult{\pgf at sys@tonumber\pgfutil at tempdima}%
\pgfmath at smuggleone\pgfmathresult
\endgroup
+}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={node-families}{pre 0.6},
+ compat/node-families/warn/.append code=%
+ \tikzextutil at compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/prefix} {/tikz/ext/node family/prefix}%
+ \tikzextutil at compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/text height} {/tikz/ext/node family/text height}%
+ \tikzextutil at compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/text depth} {/tikz/ext/node family/text depth}%
+ \tikzextutil at compatwarning@valuekey{node-families}{pre 0.6}{/tikz/node family/text width} {/tikz/ext/node family/text width}%
+ \tikzextutil at compatwarning@key {node-families}{pre 0.6}{/tikz/node family/text} {/tikz/ext/node family/text}%
+ \tikzextutil at compatwarning@key {node-families}{pre 0.6}{/tikz/node family/text width align}{/tikz/ext/node family/text width align}%
+ \tikzextutil at compatwarning@key {node-families}{pre 0.6}{/tikz/node family/setup shape} {/tikz/ext/node family/setup shape}%
+ \tikzextutil at compatwarning@key {node-families}{pre 0.6}{/tikz/node family/width} {/tikz/ext/node family/width}%
+ \tikzextutil at compatwarning@key {node-families}{pre 0.6}{/tikz/node family/height} {/tikz/ext/node family/height}%
+ \tikzextutil at compatwarning@key {node-families}{pre 0.6}{/tikz/node family/size} {/tikz/ext/node family/size},
+ compat/node-families/pre 0.6/.append code=%
+ \pgfkeysdef{/tikz/node family/prefix} {\pgfkeyssetvalue{/tikz/ext/node family/prefix}{##1}}%
+ \pgfkeysdef{/tikz/node family/text height} {\pgfkeyssetvalue{/tikz/ext/node family/text height}{##1}}%
+ \pgfkeysdef{/tikz/node family/text depth} {\pgfkeyssetvalue{/tikz/ext/node family/text depth}{##1}}%
+ \pgfkeysdef{/tikz/node family/text width} {\pgfkeyssetvalue{/tikz/ext/node family/text width}{##1}}%
+ \pgfkeysdef{/tikz/node family/text} {\pgfkeysvalueof{/tikz/ext/node family/text/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node family/text width align}{\pgfkeysvalueof{/tikz/ext/node family/text width align/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node family/setup shape} {\pgfkeysvalueof{/tikz/ext/node family/setup shape/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node family/width} {\pgfkeysvalueof{/tikz/ext/node family/width/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node family/height} {\pgfkeysvalueof{/tikz/ext/node family/height/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node family/size} {\pgfkeysvalueof{/tikz/ext/node family/size/. at cmd}##1\pgfeov},
+ compat/node-families/\pgfkeysvalueof{/tikz/ext/compat/node-families}%
}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -23,7 +23,7 @@
\expandafter\def\csname tikzext at nf@function at circular sector\endcsname{{\the\pgf at xc}{\the\pgf at xa}}
\def\tikzext at nf@function at cylinder{{\the\dimexpr2\pgfutil at tempdimb\relax}{\the\pgf at x}}
-\tikzset{node family/setup shape/.list={
+\tikzextset{node family/setup shape/.list={
ellipse,
star,
diamond,
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.nodes.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.nodes.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.nodes.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,9 +5,12 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
\newcount\tikzext at nodesonpath
-\tikzset{
+\tikzextset{
pic/.is if=tikz at node@is at pic,
/tikz-ext/nodes/node on line/.style 2 args={
/tikz/to path={
@@ -19,7 +22,7 @@
every edge quotes/.append style={auto=false},% node *on* the line
nodes={alias=tikzext-node on line}]
coordinate(tikzext-node on line)% fallback coordinate
- \unexpanded\expandafter{\tikz at tonodes}(\tikztotarget)
+ \pgfutil at unexpanded\expandafter{\tikz at tonodes}(\tikztotarget)
}\expandafter
}\tikz at temp
-- (tikzext-node on line#1)
@@ -64,7 +67,7 @@
\else
-- (tikzext-node on line-1)
\unless\ifnum\tikzext at nodesonpath=1
- foreach[expand list] \tikzext at counter in {2, ..., \the\tikzext at nodesonpath} {
+ foreach[expand list] \tikzext at counter in {2, ..., \the\tikzext at nodesonpath}{
(tikzext-node on line-\pgfinteval{\tikzext at counter-1})
-- (tikzext-node on line-\tikzext at counter)
}
@@ -135,6 +138,649 @@
]%
#3%
}}%
- }
- }
-}
\ No newline at end of file
+ }%
+ }%
+}
+% auto extensions
+\newif\iftikzext at auto@offset
+\newif\iftikzext at auto@precise
+\pgfkeysdef{/tikz/auto/}{\let\tikz at do@auto at anchor\tikz at auto@anchor at on}
+\tikzset{
+ swap/.style={% overwriting
+ /tikz/swap/\tikz at auto@anchor at direction
+ },
+ auto/.is choice, % overwriting
+ auto/.default=,
+ auto/false/.code=\let\tikz at do@auto at anchor\relax,
+ /tikz/ext/nodes/install auto/.style 2 args={
+ /tikz/swap/#1/.code=\def\tikz at auto@anchor at direction{#2\iftikzext at auto@precise @precise\fi},
+ /tikz/auto/#1/.code=\let\tikz at do@auto at anchor\tikz at auto@anchor at on\def\tikz at auto@anchor at direction{#1\iftikzext at auto@precise @precise\fi}%
+ },
+ /tikz/ext/nodes/install auto={left}{right},
+ /tikz/ext/nodes/install auto={right}{left},
+ /tikz/ext/nodes/install auto={ext/left}{ext/light},
+ /tikz/ext/nodes/install auto={ext/right}{ext/left},
+ /tikz/ext/nodes/install auto={ext/above}{ext/below},
+ /tikz/ext/nodes/install auto={ext/below}{ext/above},
+ /tikz/ext/nodes/install auto={ext/north}{ext/south},
+ /tikz/ext/nodes/install auto={ext/south}{ext/north},
+ /tikz/ext/nodes/install auto={ext/west}{ext/east},
+ /tikz/ext/nodes/install auto={ext/east}{ext/west},
+ sloped/.default=true,
+ sloped/.is choice, % overwriting
+ sloped/true/.code=\pgfslopedattimetrue\tikzext at auto@precisefalse,
+ sloped/false/.code=\pgfslopedattimefalse
+}
+\tikzextset{
+ precise auto angle/.default=true,
+ precise auto angle/.is choice,
+ precise auto angle/true/.code=\tikzext at auto@precisetrue\pgfslopedattimefalse,
+ precise auto angle/false/.code=\tikzext at auto@precisefalse,
+ auto offset/.initial=1cm,
+ auto with offset/.is if=tikzext at auto@offset,
+ % next four keys needs decorations
+ nodes/install auto offset for brace decoration/.default=0pt,
+ nodes/install auto offset for brace decoration/.style={%
+ /pgf/decoration/raise/.append code=\pgfkeyssetvalue{/pgf/decoration/raise}{##1},
+ /pgf/decoration/raise={#1},
+ /tikz/ext/auto offset for brace decoration/.style={
+ /tikz/ext/auto offset=\pgfdecorationsegmentamplitude+(\pgfkeysvalueof{/pgf/decoration/raise})%
+ },
+ /tikz/ext/every brace node/.style={
+ /tikz/auto=% Ugh?
+ \ifx\tikz at dec@mirror\relax
+ \ifpgf at decorate@inputsegmentobjects at reverse right\else left\fi
+ \else
+ \ifpgf at decorate@inputsegmentobjects at reverse left\else right\fi
+ \fi,
+ /tikz/ext/auto with offset=true,
+ /tikz/pos=\ifpgf at decorate@inputsegmentobjects at reverse1-\fi(\pgfdecorationsegmentaspect)
+ },
+ /tikz/ext/nodes/install auto offset for brace decoration/.code=% don't apply twice
+ },
+}
+\def\tikzext at auto@pre{%
+ \begingroup
+ \let\iftikzext at slopedattime\ifpgfslopedattime
+ \let\iftikzext at allowupsidedownattime\ifpgfallowupsidedownattime
+ \begingroup
+ \pgfresetnontranslationattimefalse
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \tikz at timer
+ \pgf at x=\pgf at pt@aa pt%
+ \pgf at y=\pgf at pt@ab pt%
+ \pgfpointnormalised{}%
+ \endgroup
+ \edef\tikzext at unslopedx{\the\pgf at x}%
+ \edef\tikzext at unslopedy{\the\pgf at y}%
+ \pgfresetnontranslationattimefalse
+ \ifpgfslopedattime
+ \pgfslopedattimefalse%
+ \else
+ \pgfslopedattimetrue%
+ \fi
+ \pgfallowupsidedownattimetrue%
+ \tikz at timer%
+ \pgf at x=\pgf at pt@aa pt%
+ \pgf at y=\pgf at pt@ab pt%
+ \pgfpointnormalised{}%
+}
+\def\tikzext at auto@post{%
+ \edef\tikz at temp{%
+ \def\noexpand\tikz at anchor{\tikz at anchor}%
+ \def\noexpand\tikzext at autooffset@angle{\tikzext at autooffset@angle}}%
+ \expandafter\endgroup\tikz at temp
+}
+\def\tikzext at auto@offset at A#1{%
+ \iftikzext at auto@offset
+ \xdef\tikz at marshal{%
+ \pgf at process{%
+ \noexpand\pgftransformreset
+ \noexpand\pgftransformrotate{#1}%
+ \noexpand\pgfpointtransformed{%
+ \noexpand\pgfpointscale{\noexpand\pgfkeysvalueof{/tikz/ext/auto offset}}
+ {\noexpand\pgfqpoint{\the\pgf at x}{\the\pgf at y}}}}%
+ \advance\pgf at pt@x\pgf at x
+ \advance\pgf at pt@y\pgf at y
+ }%
+ \fi
+}
+\def\tikzext at auto@offset at B#1{%
+ \iftikzext at auto@offset
+ \ifpgfslopedattime
+ \pgf at xb=\pgf at x
+ \pgf at yb=\pgf at y
+ \pgf at process{%
+ \pgftransformreset
+ \pgftransformrotate{#1}%
+ \pgfpointtransformed{%
+ \pgf at process{%
+ \tikz at timer%
+ \pgf at x=\pgf at pt@aa pt
+ \pgf at y=\pgf at pt@ab pt
+ \pgfpointnormalised{}%
+ \pgfpointscale{\pgfkeysvalueof{/tikz/ext/auto offset}}{}}}}%
+ \advance\pgf at pt@x\pgf at x
+ \advance\pgf at pt@y\pgf at y
+ \pgf at x=\pgf at xb
+ \pgf at y=\pgf at yb
+ \else
+ \tikz at marshal
+ \fi
+ \fi
+}
+\def\tikzext at auto@offset at B@precise{%
+ \iftikzext at auto@offset
+ \ifpgfslopedattime
+ \else
+ \tikz at marshal
+ \fi
+ \fi
+}
+
+% direction: left
+\def\tikz at auto@anchor at left{% overwriting
+ \tikz at auto@pre
+ \tikz at auto@anchor
+ \tikzext at auto@offset at A{90}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B{90}%
+}
+\def\tikz at auto@anchor at left@precise{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \pgfmathadd@{\pgfmathresult}{-90}%
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{90}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% direction: right
+\def\tikz at auto@anchor at right{% overwriting
+ \tikz at auto@pre
+ \tikz at auto@anchor at prime
+ \tikzext at auto@offset at A{-90}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B{-90}%
+}
+\def\tikz at auto@anchor at right@precise{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \pgfmathadd@{\pgfmathresult}{90}%
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{-90}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% direction: Left
+\pgfutil at namedef{tikz at auto@anchor at ext/left}{%
+ \tikzext at auto@pre
+ \def\tikzext at autooffset@angle{90}%
+ \iftikzext at allowupsidedownattime
+ \tikz at auto@anchor
+ \else
+ \iftikzext at slopedattime
+ \ifdim\tikzext at unslopedx<0pt
+ \def\tikz at anchor{north}%
+ \def\tikzext at autooffset@angle{-90}%
+ \else
+ \def\tikz at anchor{south}%
+ \fi
+ \else
+ \tikz at auto@anchor
+ \fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/left at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \pgfmathadd@{\pgfmathresult}{-90}%
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{90}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% direction: Right
+\pgfutil at namedef{tikz at auto@anchor at ext/right}{%
+ \tikzext at auto@pre
+ \def\tikzext at autooffset@angle{-90}%
+ \iftikzext at allowupsidedownattime
+ \tikz at auto@anchor at prime
+ \else
+ \iftikzext at slopedattime
+ \ifdim\tikzext at unslopedx<0pt
+ \def\tikz at anchor{south}%
+ \def\tikzext at autooffset@angle{90}%
+ \else
+ \def\tikz at anchor{north}%
+ \fi
+ \else
+ \tikz at auto@anchor at prime
+ \fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/right at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \pgfmathadd@{\pgfmathresult}{90}%
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{-90}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% direction: North (always above the line)
+\pgfutil at namedef{tikz at auto@anchor at ext/north}{%
+ \tikzext at auto@pre
+ \def\tikz at anchor{south}%
+ \def\tikzext at autooffset@angle{90}%
+ \iftikzext at allowupsidedownattime
+ \ifdim\tikzext at unslopedx<0pt
+ \def\tikzext at autooffset@angle{-90}%
+ \def\tikz at anchor{north}%
+ \fi
+ \else
+ \ifdim\pgf at x>0.05pt
+ \ifdim\pgf at y>0.05pt
+ \def\tikz at anchor{south east}%
+ \else\ifdim\pgf at y<-0.05pt
+ \def\tikz at anchor{south west}%
+ \fi\fi
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikzext at autooffset@angle{-90}%
+ \ifdim\pgf at y>0.05pt
+ \def\tikz at anchor{south west}%
+ \else\ifdim\pgf at y<-0.05pt
+ \def\tikz at anchor{south east}%
+ \fi\fi
+ \else
+ \ifdim\pgf at y>0pt
+ \def\tikz at anchor{east}%
+ \else
+ \def\tikz at anchor{west}%
+ \fi
+ \fi\fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/north at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \ifdim\pgf at x<0pt
+ \pgfmathadd@{\pgfmathresult}{90}%
+ \def\tikzext at autooffset@angle{-90}%
+ \else
+ \pgfmathadd@{\pgfmathresult}{-90}%
+ \def\tikzext at autooffset@angle{90}%
+ \fi
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% auto: South (always below the line)
+\pgfutil at namedef{tikz at auto@anchor at ext/south}{%
+ \tikzext at auto@pre
+ \def\tikz at anchor{north}%
+ \def\tikzext at autooffset@angle{-90}%
+ \iftikzext at allowupsidedownattime
+ \ifdim\tikzext at unslopedx<0pt
+ \def\tikzext at autooffset@angle{90}%
+ \def\tikz at anchor{south}%
+ \fi
+ \else
+ \ifdim\pgf at x>0.05pt
+ \ifdim\pgf at y>0.05pt
+ \def\tikz at anchor{north west}%
+ \else\ifdim\pgf at y<-0.05pt
+ \def\tikz at anchor{north east}%
+ \fi\fi
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikzext at autooffset@angle{90}%
+ \ifdim\pgf at y>0.05pt
+ \def\tikz at anchor{north east}%
+ \else\ifdim\pgf at y<-0.05pt
+ \def\tikz at anchor{north west}%
+ \fi\fi
+ \else
+ \ifdim\pgf at y>0pt
+ \def\tikz at anchor{west}%
+ \else
+ \def\tikz at anchor{east}%
+ \fi
+ \fi\fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/south at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \ifdim\pgf at x<0pt
+ \pgfmathadd@{\pgfmathresult}{-90}%
+ \def\tikzext at autooffset@angle{90}%
+ \else
+ \pgfmathadd@{\pgfmathresult}{90}%
+ \def\tikzext at autooffset@angle{-90}%
+ \fi
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% auto: West (always to the left of the line)
+\pgfutil at namedef{tikz at auto@anchor at ext/west}{%
+ \tikzext at auto@pre
+ \def\tikz at anchor{east}%
+ \def\tikzext at autooffset@angle{90}%
+ \iftikzext at slopedattime
+ \def\tikz at anchor{south}%
+ \iftikzext at allowupsidedownattime
+ \ifdim\tikzext at unslopedy<-0.05pt
+ \def\tikz at anchor{north}%
+ \def\tikzext at autooffset@angle{-90}%
+ \fi
+ \else
+ \ifdim\tikzext at unslopedy>0.05pt
+ \ifdim\tikzext at unslopedx<-0.05pt
+ \def\tikz at anchor{north}%
+ \def\tikzext at autooffset@angle{-90}%
+ \fi
+ \else
+ \ifdim\tikzext at unslopedy<-0.05pt
+ \ifdim\tikzext at unslopedx<-0.05pt
+ \else
+ \def\tikz at anchor{north}%
+ \def\tikzext at autooffset@angle{-90}%
+ \fi
+ \else
+ \ifdim\tikzext at unslopedx>0pt
+ \else
+ \def\tikz at anchor{north}%
+ \def\tikzext at autooffset@angle{-90}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifdim\pgf at y>0.05pt
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{south east}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{north east}%
+ \fi\fi
+ \else
+ \ifdim\pgf at y<-0.05pt
+ \def\tikzext at autooffset@angle{-90}%
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{north east}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{south east}%
+ \fi\fi
+ \else
+ \ifdim\pgf at x>0pt
+ \def\tikz at anchor{south}%
+ \else
+ \def\tikz at anchor{north}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+
+\pgfutil at namedef{tikz at auto@anchor at ext/west at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \ifdim\pgf at y<0pt
+ \pgfmathadd@{\pgfmathresult}{90}%
+ \def\tikzext at autooffset@angle{-90}%
+ \else
+ \pgfmathadd@{\pgfmathresult}{-90}%
+ \def\tikzext at autooffset@angle{90}%
+ \fi
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% auto: East (always to the right of the line)
+\pgfutil at namedef{tikz at auto@anchor at ext/east}{%
+ \tikzext at auto@pre
+ \def\tikz at anchor{west}%
+ \def\tikzext at autooffset@angle{-90}%
+ \iftikzext at slopedattime
+ \def\tikz at anchor{north}%
+ \iftikzext at allowupsidedownattime
+ \ifdim\tikzext at unslopedy<-0.05pt
+ \def\tikz at anchor{south}%
+ \def\tikzext at autooffset@angle{90}%
+ \fi
+ \else
+ \ifdim\tikzext at unslopedy>0.05pt
+ \ifdim\tikzext at unslopedx<-0.05pt
+ \def\tikz at anchor{south}%
+ \def\tikzext at autooffset@angle{90}%
+ \fi
+ \else
+ \ifdim\tikzext at unslopedy<-0.05pt
+ \ifdim\tikzext at unslopedx<-0.05pt
+ \else
+ \def\tikz at anchor{south}%
+ \def\tikzext at autooffset@angle{90}%
+ \fi
+ \else
+ \ifdim\tikzext at unslopedx>0pt
+ \else
+ \def\tikz at anchor{south}%
+ \def\tikzext at autooffset@angle{90}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifdim\pgf at y>0.05pt
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{north west}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{south west}%
+ \fi\fi
+ \else
+ \ifdim\pgf at y<-0.05pt
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{south west}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{north west}%
+ \fi\fi
+ \else
+ \ifdim\pgf at x>0pt
+ \def\tikz at anchor{north}%
+ \else
+ \def\tikz at anchor{south}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/east at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \ifdim\pgf at y<0pt
+ \pgfmathadd@{\pgfmathresult}{-90}%
+ \def\tikzext at autooffset@angle{90}%
+ \else
+ \pgfmathadd@{\pgfmathresult}{90}%
+ \def\tikzext at autooffset@angle{-90}%
+ \fi
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% auto: above (always towards end of line)
+\pgfutil at namedef{tikz at auto@anchor at ext/above}{%
+ \tikzext at auto@pre
+ \def\tikzext at autooffset@angle{0}%
+ \ifdim\pgf at y>0.05pt
+ \def\tikz at anchor{south}%
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{south west}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{south east}%
+ \fi\fi
+ \else
+ \ifdim\pgf at y<-0.05pt
+ \def\tikz at anchor{north}%
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{north west}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{north east}%
+ \fi\fi
+ \else
+ \ifdim\pgf at x>0pt
+ \def\tikz at anchor{west}%
+ \else
+ \def\tikz at anchor{east}%
+ \fi
+ \fi
+ \fi
+ \iftikzext at allowupsidedownattime
+ \else
+ \iftikzext at slopedattime
+ \ifdim\tikzext at unslopedx<-0.05pt
+ \def\tikz at anchor{east}%
+ \def\tikzext at autooffset@angle{180}%
+ \fi
+ \fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/above at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \pgfmathadd@{\pgfmathresult}{180}%
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{0}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+% auto: below (always towards the start of the line)
+\pgfutil at namedef{tikz at auto@anchor at ext/below}{%
+ \tikzext at auto@pre
+ \def\tikzext at autooffset@angle{180}%
+ \ifdim\pgf at y>0.05pt
+ \def\tikz at anchor{north}%
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{north east}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{north west}%
+ \fi\fi
+ \else
+ \ifdim\pgf at y<-0.05pt
+ \def\tikz at anchor{south}%
+ \ifdim\pgf at x>0.05pt
+ \def\tikz at anchor{south east}%
+ \else\ifdim\pgf at x<-0.05pt
+ \def\tikz at anchor{south west}%
+ \fi\fi
+ \else
+ \ifdim\pgf at x>0pt
+ \def\tikz at anchor{east}%
+ \else
+ \def\tikz at anchor{west}%
+ \fi
+ \fi
+ \fi
+ \iftikzext at allowupsidedownattime
+ \else
+ \iftikzext at slopedattime
+ \ifdim\tikzext at unslopedx<-0.05pt
+ \def\tikz at anchor{west}%
+ \def\tikzext at autooffset@angle{0}%
+ \fi
+ \fi
+ \fi
+ \tikzext at auto@offset at A{\tikzext at autooffset@angle}%
+ \tikzext at auto@post
+ \tikzext at auto@offset at B{\tikzext at autooffset@angle}%
+}
+\pgfutil at namedef{tikz at auto@anchor at ext/below at precise}{%
+ \tikz at auto@pre
+ \edef\tikz at temp{%
+ \noexpand\pgfmathatantwo@{\pgf at sys@tonumber\pgf at y}{\pgf at sys@tonumber\pgf at x}}%
+ \tikz at temp
+ \let\tikz at anchor\pgfmathresult
+ \tikzext at auto@offset at A{180}%
+ \tikz at auto@post
+ \tikzext at auto@offset at B@precise
+}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={nodes}{pre 0.6},
+ compat/nodes/warn/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/nodes@}{3}%
+ \tikzextutil at compatwarning@key{nodes}{pre 0.6}{/tikz/pic} [true]{/tikz/ext/pic}%
+ \tikzextutil at compatwarning@key{nodes}{pre 0.6}{/tikz/node on line} [] {/tikz/ext/node on line}%
+ \tikzextutil at compatwarning@key{nodes}{pre 0.6}{/tikz/nodes on line} {/tikz/ext/nodes on line}%
+ \tikzextutil at compatwarning@key{nodes}{pre 0.6}{/tikz/nodes on curve} [] {/tikz/ext/nodes on curve}%
+ \tikzextutil at compatwarning@key{nodes}{pre 0.6}{/tikz/nodes on curve'}[] {/tikz/ext/nodes on curve'},
+ compat/nodes/pre 0.6/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/nodes@}{2}%
+ \pgfkeysdef{/tikz/pic} {\pgfkeysvalueof{/tikz/ext/pic/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/node on line} {\pgfkeysvalueof{/tikz/ext/node on line/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/nodes on line} {\pgfkeysvalueof{/tikz/ext/nodes on line/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/nodes on curve} {\pgfkeysvalueof{/tikz/ext/nodes on curve/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/nodes on curve'}{\pgfkeysvalueof{/tikz/ext/nodes on curve'/. at cmd}##1\pgfeov}%
+ \pgfkeyssetvalue{/tikz/pic/. at def}{true}%
+ \pgfkeyssetvalue{/tikz/node on line/. at def}{}%
+ \pgfkeyssetvalue{/tikz/nodes on curve/. at def}{}%
+ \pgfkeyssetvalue{/tikz/nodes on curve'/. at def}{},
+ % compat/nodes/0.6/.append code=\pgfkeyssetvalue{/tikz/ext/compat/nodes@}{1},
+ % compat/nodes/newest/.append code=\pgfkeyssetvalue{/tikz/ext/compat/nodes@}{0},
+ compat/nodes/\pgfkeysvalueof{/tikz/ext/compat/nodes}%
+}
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,16 +5,20 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\tikzset{
- arc to/.code=\pgfqkeys{/tikz/arc to}{#1},
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\tikzextset{
+ arc to/.code=\pgfqkeys{/tikz/ext/arc to}{#1},
arc to={
- counter clockwise/.code=\pgfkeyssetvalue{/tikz/arc to/ccw flag}{1},
- clockwise/.code=\pgfkeyssetvalue{/tikz/arc to/ccw flag}{0},
+ counter clockwise/.code=\pgfkeyssetvalue{/tikz/ext/arc to/ccw flag}{1},
+ clockwise/.code=\pgfkeyssetvalue{/tikz/ext/arc to/ccw flag}{0},
x radius/.code=\pgfkeyssetvalue{/tikz/x radius}{#1},
y radius/.code=\pgfkeyssetvalue{/tikz/y radius}{#1},
radius/.code=\pgfkeyssetvalue{/tikz/x radius}{#1}\pgfkeyssetvalue{/tikz/y radius}{#1},
- large/.code=\pgfkeyssetvalue{/tikz/arc to/large flag}{1},
- small/.code=\pgfkeyssetvalue{/tikz/arc to/large flag}{0},
+ large/.code=\pgfkeyssetvalue{/tikz/ext/arc to/large flag}{1},
+ small/.code=\pgfkeyssetvalue{/tikz/ext/arc to/large flag}{0},
% defaults
rotate/.initial=0, counter clockwise, small,
counter clockwise/.value forbidden,
@@ -21,28 +25,29 @@
clockwise/.value forbidden,
large/.value forbidden,
small/.value forbidden}}
+\let\tikzext at orig@tikz at arcA\tikz at arcA
\def\tikz at arcA rc{\pgfutil at ifnextchar t%
- {\tikz at flush@moveto\expandafter\expandafter\expandafter\tikz at arcB@cont\expandafter\pgfutil at gobble\pgfutil at gobble}
- {\tikz at flush@moveto\tikz at arc@cont}}
-\def\tikz at arcB@cont{%
- \pgfutil at ifnextchar[\tikz@@do at arcB{
+ {\tikz at flush@moveto\expandafter\tikzext at arcto@cont\pgfutil at gobbletwo}
+ {\tikzext at orig@tikz at arcA rc}}
+\def\tikzext at arcto@cont{%\tikzext at arcto@do
+ \pgfutil at ifnextchar[\tikzext at arcto@options{
\advance\tikz at expandcount by -10\relax% go down quickly
\ifnum\tikz at expandcount<0\relax%
- \def\@next{\tikz@@do at arcB[]}%
+ \def\tikzext at next{\tikzext at arcto@options[]}%
\else%
- \def\@next{\expandafter\tikz at arcB@cont}%
+ \def\tikzext at next{\expandafter\tikzext at arcto@cont}%
\fi%
- \@next}}%
-\def\tikz@@do at arcB[#1]{%
- \def\tikz at arcB@options{#1}%
- \tikz at do@@arcB}
-\def\tikz at do@@arcB{%
- \pgfutil at ifnextchar n{\tikz at collect@label at onpath\tikz at do@@arcB}
- {\pgfutil at ifnextchar c{\tikz at collect@coordinate at onpath\tikz at do@@arcB}
- {\pgfutil at ifnextchar p{\tikz at collect@pic at onpath\tikz at do@@arcB}
- {\tikz at scan@one at point\tikz at do@arcB}}}}
+ \tikzext at next}}%
+\def\tikzext at arcto@options[#1]{%
+ \def\tikzext at arcto@options@{#1}%
+ \tikzext at arcto@collect}
+\def\tikzext at arcto@collect{%
+ \pgfutil at ifnextchar n{\tikz at collect@label at onpath\tikzext at arcto@collect}
+ {\pgfutil at ifnextchar c{\tikz at collect@coordinate at onpath\tikzext at arcto@collect}
+ {\pgfutil at ifnextchar p{\tikz at collect@pic at onpath\tikzext at arcto@collect}
+ {\tikz at scan@one at point\tikzext at arcto@do}}}}
-\def\tikz at do@arcB#1{%
+\def\tikzext at arcto@do#1{%
\edef\tikz at timer@start{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}
\tikz at make@last at position{#1}%
\edef\tikz at timer@end{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
@@ -50,14 +55,14 @@
\edef\tikz at moveto@waiting{\tikz at shapeborder@name}%
\fi
\begingroup
- \tikzset{every arc/.try,every arc to/.try,arc to/.expand once=\tikz at arcB@options}%
+ \tikzset{every arc/.try,ext/every arc to/.try,ext/arc to/.expand once=\tikzext at arcto@options@}%
\pgfmathsetmacro\tikz at arc@x{\pgfkeysvalueof{/tikz/x radius}}%
\ifpgfmathunitsdeclared
\pgfmathsetmacro\tikz at arc@y{\pgfkeysvalueof{/tikz/y radius}}%
\ifpgfmathunitsdeclared
\tikzext at pgfpatharcto{\tikz at arc@x pt}{\tikz at arc@y pt}
- {\pgfkeysvalueof{/tikz/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}}
- {\pgfkeysvalueof{/tikz/arc to/ccw flag}}{#1}%
+ {\pgfkeysvalueof{/tikz/ext/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}}
+ {\pgfkeysvalueof{/tikz/ext/arc to/ccw flag}}{#1}%
\else
\tikzerror{You cannot mix dimensions and dimension values in an arc}%
\fi
@@ -73,14 +78,14 @@
\pgfmathveclen@{\pgf at sys@tonumber\pgf at x}{\pgf at sys@tonumber\pgf at y}%
\let\tikz at arc@y\pgfmathresult
\tikzext at pgfpatharcto{+\tikz at arc@x pt}{+\tikz at arc@y pt}
- {\pgfkeysvalueof{/tikz/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}}
- {\pgfkeysvalueof{/tikz/arc to/ccw flag}}{#1}%
+ {\pgfkeysvalueof{/tikz/ext/arc to/rotate}}{\pgfkeysvalueof{/tikz/ext/arc to/large flag}}
+ {\pgfkeysvalueof{/tikz/ext/arc to/ccw flag}}{#1}%
\fi
\fi
\endgroup
% check whether \pgf at marshall starts with \pgfpathlineto
\pgfutil at ifxempty\pgf at marshal{}{%
- \edef\tikz at temp{\expandafter\expandafter\expandafter\noexpand\expandafter\pgfutil at firstgobblerest\pgf at marshal\relax}%
+ \edef\tikz at temp{\expandafter\expandafter\expandafter\noexpand\expandafter\tikzextutil at firstgobblerest\pgf at marshal\relax}%
\expandafter\let\expandafter\tikz at temp\tikz at temp
\pgfutil at ifx\tikz at temp\pgfpathlineto{}{%
% getting rid of \pgfpatharcaxes inside \pgf at marshal
@@ -87,10 +92,10 @@
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf at marshal
\expandafter\expandafter\expandafter{\expandafter\pgfutil at gobble\pgf at marshal}%
% extracting the other four values needed for the timer
- \edef\tikz at timer@start at angle{\expandafter\pgfutil at firstoffour\pgf at marshal}%
- \edef\tikz at timer@end at angle{\expandafter\pgfutil at secondoffour\pgf at marshal}%
- \pgfextract at process\tikz at timer@zero at axis{\expandafter\pgfutil at thirdoffour\pgf at marshal}%
- \pgfextract at process\tikz at timer@ninety at axis{\expandafter\pgfutil at fourthoffour\pgf at marshal}%
+ \edef\tikz at timer@start at angle{\expandafter\tikzextutil at firstoffour\pgf at marshal}%
+ \edef\tikz at timer@end at angle{\expandafter\tikzextutil at secondoffour\pgf at marshal}%
+ \pgfextract at process\tikz at timer@zero at axis{\expandafter\tikzextutil at thirdoffour\pgf at marshal}%
+ \pgfextract at process\tikz at timer@ninety at axis{\expandafter\tikzextutil at fourthoffour\pgf at marshal}%
%
\let\tikz at timer=\tikz at timer@arc
}%
@@ -97,11 +102,11 @@
}%
\tikz at scan@next at command
}
-\def\pgfutil at firstoffour#1#2#3#4{#1}
-\def\pgfutil at secondoffour#1#2#3#4{#2}
-\def\pgfutil at thirdoffour#1#2#3#4{#3}
-\def\pgfutil at fourthoffour#1#2#3#4{#4}
-\def\pgfutil at firstgobblerest#1#2\relax{#1}
+\def\tikzextutil at firstoffour#1#2#3#4{#1}
+\def\tikzextutil at secondoffour#1#2#3#4{#2}
+\def\tikzextutil at thirdoffour#1#2#3#4{#3}
+\def\tikzextutil at fourthoffour#1#2#3#4{#4}
+\def\tikzextutil at firstgobblerest#1#2\relax{#1}
% original from pgfcorepathconstruct.code.tex
\def\tikzext at pgfpatharcto#1#2#3#4#5#6{%
@@ -124,12 +129,12 @@
\pgfmathsetmacro\pgf at arcto@fA{#4}%
\ifdim\pgf at arcto@fA pt=0pt
\else
- \pgfmathsetmacro\pgf at arcto@fA{1.0}% Special rule: every non-zero value is 1.
+ \pgfmathsetmacro\pgf at arcto@fA{0.6}% Special rule: every non-zero value is 1.
\fi
\pgfmathsetmacro\pgf at arcto@fS{#5}%
\ifdim\pgf at arcto@fS pt=0pt
\else
- \pgfmathsetmacro\pgf at arcto@fS{1.0}% Special rule: every non-zero value is 1.
+ \pgfmathsetmacro\pgf at arcto@fS{0.6}% Special rule: every non-zero value is 1.
\fi
\pgf at process{#6}%
\edef\pgf at arcto@xb{\the\pgf at x}%
@@ -323,4 +328,28 @@
\fi\fi\fi
}%
\pgf at marshal
+}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={paths.arcto}{pre 0.6},
+ compat/paths.arcto/warn/.append code=%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/clockwise} {/tikz/ext/arc to/clockwise}%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/counter clockwise}{/tikz/ext/arc to/counter clockwise}%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/large} {/tikz/ext/arc to/large}%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/small} {/tikz/ext/arc to/small}%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/radius} {/tikz/ext/arc to/radius}%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/x radius} {/tikz/ext/arc to/x radius}%
+ \tikzextutil at compatwarning@key {paths.arcto}{pre 0.6}{/tikz/arc to/y radius} {/tikz/ext/arc to/y radius}%
+ \tikzextutil at compatwarning@valuekey{paths.arcto}{pre 0.6}{/tikz/arc to/rotate} {/tikz/ext/arc to/rotate},
+ compat/paths.arcto/pre 0.6/.append code=%
+ \pgfkeysdef{/tikz/arc to/clockwise} {\pgfkeysvalueof{/tikz/ext/arc to/clockwise/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/arc to/counter clockwise}{\pgfkeysvalueof{/tikz/ext/arc to/counter clockwise/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/arc to/large} {\pgfkeysvalueof{/tikz/ext/arc to/large/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/arc to/small} {\pgfkeysvalueof{/tikz/ext/arc to/small/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/arc to/rotate} {\pgfkeyssetvalue{/tikz/ext/arc to/rotate}{##1}\pgfkeyssetvalue{/tikz/arc to/rotate}{##1}}%
+ \pgfkeysdef{/tikz/arc to/radius} {\pgfkeysvalueof{/tikz/ext/arc to/radius/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/arc to/x radius} {\pgfkeysvalueof{/tikz/ext/arc to/x radius/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/arc to/y radius} {\pgfkeysvalueof{/tikz/ext/arc to/y radius/. at cmd}##1\pgfeov},
+ compat/paths.arcto/\pgfkeysvalueof{/tikz/ext/compat/paths.arcto}%
}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,9 +6,13 @@
% 2. under the GNU Free Documentation License.
%
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
%% For the operators r-lr, r-rl, r-ud and r-du we need to check after TikZ found r
-\let\tikz at orig@rect\tikz at rect
-\def\tikz at rect{\pgfutil at ifnextchar e\tikz at orig@rect\tikzext at tikz@r}
+\let\tikzextorig at tikz@rect\tikz at rect
+\def\tikz at rect{\pgfutil at ifnextchar e\tikzextorig at tikz@rect\tikzext at tikz@r}
\def\tikzext at tikz@r -{%
\pgfutil at ifnextchar l\tikzext at tikz@lr at lineto{%
\pgfutil at ifnextchar r\tikzext at tikz@rl at lineto{%
@@ -19,16 +23,16 @@
}%
}
%% For the operator |-| we need to check after TikZ found |-
-\let\tikz at orig@vh at lineto@next\tikz at vh@lineto at next
+\let\tikzextorig at tikz@vh at lineto@next\tikz at vh@lineto at next
\def\tikz at vh@lineto at next{%
\pgfutil at ifnextchar|{\expandafter\tikzext at tikz@vhv at lineto\pgfutil at gobble}%
{\pgfutil at ifnextchar\tikz at activebar{\expandafter\tikzext at tikz@vhv at lineto\pgfutil at gobble}%
- {\tikz at orig@vh at lineto@next}}}
+ {\tikzextorig at tikz@vh at lineto@next}}}
%% For the operator -|- we need to check after TikZ found -|
-\let\tikz at orig@hv at lineto\tikz at hv@lineto
+\let\tikzextorig at tikz@hv at lineto\tikz at hv@lineto
\def\tikz at hv@lineto{%
\pgfutil at ifnextchar-{\expandafter\tikzext at tikz@hvh at lineto\pgfutil at gobble}%
- {\tikz at orig@hv at lineto}}
+ {\tikzextorig at tikz@hv at lineto}}
%% |-|[<opts>] and -|-[<opts>] are allowed
\def\tikzext at tikz@vhv at lineto{\pgfutil at ifnextchar[{\tikzext at tikz@collect at hvvh@options\tikzext at tikz@vhv at lineto@next}{\tikzext at tikz@collect at hvvh@options\tikzext at tikz@vhv at lineto@next[]}}
@@ -51,12 +55,12 @@
\tikzext at ortho@preflushtrue
%%% HVVH/UDLR
-\tikzset{%
- ortho/.code=\pgfqkeys{/tikz/ortho}{#1},
- hvvh/.code=\pgfqkeys{/tikz/ortho}{#1},%
- udlr/.code=\pgfqkeys{/tikz/ortho}{#1},%
+\tikzextset{%
+ ortho/.code=\pgfqkeys{/tikz/ext/ortho}{#1},
+ hvvh/.code=\pgfqkeys{/tikz/ext/ortho}{#1},%
+ udlr/.code=\pgfqkeys{/tikz/ext/ortho}{#1},%
ortho/.search also=/tikz,
- ortho/middle 0 to 1/.style={/tikz/ortho/spacing=0},%
+ ortho/middle 0 to 1/.style={/tikz/ext/ortho/spacing=0},%
ortho/from center/.is if=tikzext at tikz@hvvh at fromcenter,%
ortho/spacing/.code=% spacing = 0 means that the middle part are the pos-itions 0 to 1,
% the first part is -1 to 0, the last part is to 2
@@ -80,10 +84,10 @@
% TODO: not possible to do distance in TikZ coordinate system
ortho/distance/.code=\pgfmathsetlength\tikzext at tikz@hvvh at distance{#1}\let\tikzext at tikz@hvvh at ratio\pgfutil at empty,%
ortho/udlr distance/.style={%
- /tikz/ortho/ud distance={#1},%
- /tikz/ortho/du distance={#1},%
- /tikz/ortho/lr distance={#1},%
- /tikz/ortho/rl distance={#1}},%
+ /tikz/ext/ortho/ud distance={#1},%
+ /tikz/ext/ortho/du distance={#1},%
+ /tikz/ext/ortho/lr distance={#1},%
+ /tikz/ext/ortho/rl distance={#1}},%
ortho/ud distance/.initial=+.5cm,%
ortho/du distance/.initial=+.5cm,%
ortho/lr distance/.initial=+.5cm,%
@@ -93,7 +97,7 @@
}%
%BEGIN_FOLD Timer
-\def\tikz at timer@hvhline{%
+\def\tikzext at timer@hvhline{%
\pgf at process{\tikz at timer@start}\pgf at ya\pgf at y
\pgf at process{\tikz at timer@end}\pgf at yc\pgf at y
\pgf at process{\tikz at timer@middle}\pgf at xb\tikz at time pt%
@@ -121,7 +125,7 @@
\edef\tikz at marshal{\noexpand\pgftransformlineattime{\pgf at sys@tonumber{\pgf at xb}}%
{\noexpand\pgfqpoint{\the\pgf at x}{\the\pgf at ya}}{\noexpand\tikz at timer@middle}}%
\fi\fi\tikz at marshal}
-\def\tikz at timer@vhvline{%
+\def\tikzext at timer@vhvline{%
\pgf at process{\tikz at timer@start}\pgf at xa\pgf at x
\pgf at process{\tikz at timer@end}\pgf at xc\pgf at x
\pgf at process{\tikz at timer@middle}\pgf at xb\tikz at time pt%
@@ -152,7 +156,7 @@
%% collect options and nodes, coordinates and pics onpath
\let\tikz at hvvh@currentoption\pgfutil at empty
-\def\tikzext at tikz@collect at hvvh@options#1[#2]{\edef\tikz at hvvh@currentoption{#2}#1}
+\def\tikzext at tikz@collect at hvvh@options#1[#2]{\def\tikz at hvvh@currentoption{#2}#1}
\def\tikzext at tikz@hvh at lineto@next{%
\pgfutil at ifnextchar n{\tikz at collect@label at onpath\tikzext at tikz@hvh at lineto@next}
{\pgfutil at ifnextchar c{\tikz at collect@coordinate at onpath\tikzext at tikz@hvh at lineto@next}%
@@ -178,7 +182,7 @@
{\pgfutil at ifnextchar c{\tikz at collect@coordinate at onpath\tikzext at tikz@rl at lineto@next}
{\pgfutil at ifnextchar p{\tikz at collect@pic at onpath\tikzext at tikz@rl at lineto@next}{\tikz at scan@one at point\tikzext at tikz@@rl at lineto}}}}%
-\def\tikz at do@hvvh#1#2#3#4#5{%
+\def\tikzext at do@hvvh#1#2#3#4#5{%
% #1 = first kink
% #2 = second kink
% #3 = end
@@ -207,7 +211,7 @@
\tikz at make@last at position{#1}%
\tikz at flush@moveto at toward{\pgfqpoint{\tikz at lastx}{\pgf at yc}}\pgf at xc\pgf at yc
\begingroup
- \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz at hvvh@currentoption}%
+ \tikzextset{ortho/.expand once=\tikz at hvvh@currentoption}%
\iftikz at shapeborder
\pgf at process{\pgfpointshapeborder{\tikz at shapeborder@name}{\pgfqpoint{\pgf at xb}{\tikz at lasty}}}%
\iftikzext at tikz@hvvh at fromcenter
@@ -260,11 +264,11 @@
\edef\pgf at temp{\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
\fi%
\xdef\pgf at marshal{%
- \noexpand\tikz at do@hvvh
+ \noexpand\tikzext at do@hvvh
{\expandafter\noexpand\pgf at tempa}%
{\expandafter\noexpand\pgf at tempb}%
{\expandafter\noexpand\pgf at temp}%
- {\noexpand\tikz at timer@hvhline}{\tikz at shapeborder@name}}%
+ {\noexpand\tikzext at timer@hvhline}{\tikz at shapeborder@name}}%
\endgroup
\pgf at marshal}%
@@ -277,7 +281,7 @@
\tikz at make@last at position{#1}%
\tikz at flush@moveto at toward{\pgfqpoint{\pgf at xc}{\tikz at lasty}}\pgf at xc\pgf at yc
\begingroup
- \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz at hvvh@currentoption}%
+ \tikzextset{ortho/.expand once=\tikz at hvvh@currentoption}%
\iftikz at shapeborder
\pgf at process{\pgfpointshapeborder{\tikz at shapeborder@name}{\pgfqpoint{\tikz at lastx}{\pgf at yb}}}%
\iftikzext at tikz@hvvh at fromcenter
@@ -330,11 +334,11 @@
\edef\pgf at temp{\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
\fi%
\xdef\pgf at marshal{%
- \noexpand\tikz at do@hvvh
+ \noexpand\tikzext at do@hvvh
{\expandafter\noexpand\pgf at tempa}%
{\expandafter\noexpand\pgf at tempb}%
{\expandafter\noexpand\pgf at temp}%
- {\noexpand\tikz at timer@vhvline}{\tikz at shapeborder@name}}%
+ {\noexpand\tikzext at timer@vhvline}{\tikz at shapeborder@name}}%
\endgroup
\pgf at marshal}%
@@ -348,8 +352,8 @@
\tikz at flush@moveto at toward{\pgfqpoint{\tikz at lastx}{\tikz at lasty}}\pgf at xc\pgf at yc
\tikz at make@last at position{#1}%
\begingroup
- \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz at hvvh@currentoption}%
- \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ortho/ud distance}}%
+ \tikzextset{ortho/.expand once=\tikz at hvvh@currentoption}%
+ \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ext/ortho/ud distance}}%
\iftikz at shapeborder
\advance\pgf at y1pt%
\pgf at process{\pgfpointshapeborder{\tikz at shapeborder@name}{\pgfqpoint{\pgf at x}{\pgf at y}}}%
@@ -381,11 +385,11 @@
\edef\pgf at temp{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
\fi
\xdef\pgf at marshal{%
- \noexpand\tikz at do@hvvh
+ \noexpand\tikzext at do@hvvh
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\pgf at yc}}%
{\expandafter\noexpand\pgf at temp}%
- {\noexpand\tikz at timer@vhvline}{\tikz at shapeborder@name}}%
+ {\noexpand\tikzext at timer@vhvline}{\tikz at shapeborder@name}}%
\endgroup
\pgf at marshal}%
@@ -399,8 +403,8 @@
\tikz at flush@moveto at toward{\pgfqpoint{\tikz at lastx}{\tikz at lasty}}\pgf at xc\pgf at yc
\tikz at make@last at position{#1}%
\begingroup
- \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz at hvvh@currentoption}%
- \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ortho/du distance}}%
+ \tikzextset{ortho/.expand once=\tikz at hvvh@currentoption}%
+ \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ext/ortho/du distance}}%
\iftikz at shapeborder
\advance\pgf at y-1pt%
\pgf at process{\pgfpointshapeborder{\tikz at shapeborder@name}{\pgfqpoint{\pgf at x}{\pgf at y}}}%
@@ -432,11 +436,11 @@
\edef\pgf at temp{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
\fi
\xdef\pgf at marshal{%
- \noexpand\tikz at do@hvvh
+ \noexpand\tikzext at do@hvvh
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\pgf at yc}}%
{\expandafter\noexpand\pgf at temp}%
- {\noexpand\tikz at timer@vhvline}{\tikz at shapeborder@name}}%
+ {\noexpand\tikzext at timer@vhvline}{\tikz at shapeborder@name}}%
\endgroup
\pgf at marshal}%
@@ -450,8 +454,8 @@
\tikz at flush@moveto at toward{\pgfqpoint{\tikz at lastx}{\tikz at lasty}}\pgf at xc\pgf at yc
\tikz at make@last at position{#1}%
\begingroup
- \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz at hvvh@currentoption}%
- \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ortho/lr distance}}%
+ \tikzextset{ortho/.expand once=\tikz at hvvh@currentoption}%
+ \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ext/ortho/lr distance}}%
\iftikz at shapeborder
\advance\pgf at x-1pt%
\pgf at process{\pgfpointshapeborder{\tikz at shapeborder@name}{\pgfqpoint{\pgf at x}{\pgf at y}}}%
@@ -483,11 +487,11 @@
\edef\pgf at temp{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
\fi
\xdef\pgf at marshal{%
- \noexpand\tikz at do@hvvh
+ \noexpand\tikzext at do@hvvh
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\tikz at lasty}}%
{\expandafter\noexpand\pgf at temp}%
- {\noexpand\tikz at timer@hvhline}{\tikz at shapeborder@name}}%
+ {\noexpand\tikzext at timer@hvhline}{\tikz at shapeborder@name}}%
\endgroup
\pgf at marshal}%
@@ -501,8 +505,8 @@
\tikz at flush@moveto at toward{\pgfqpoint{\tikz at lastx}{\tikz at lasty}}\pgf at xc\pgf at yc
\tikz at make@last at position{#1}%
\begingroup
- \pgfqkeys{/tikz/udlr}{/tikz/ortho/.expand once=\tikz at hvvh@currentoption}%
- \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ortho/rl distance}}%
+ \tikzextset{ortho/.expand once=\tikz at hvvh@currentoption}%
+ \pgfmathsetlength\tikzext at tikz@udlr at distance{\pgfkeysvalueof{/tikz/ext/ortho/rl distance}}%
\iftikz at shapeborder%
\advance\pgf at x1pt%
\pgf at process{\pgfpointshapeborder{\tikz at shapeborder@name}{\pgfqpoint{\pgf at x}{\pgf at y}}}%
@@ -534,33 +538,47 @@
\edef\pgf at temp{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
\fi
\xdef\pgf at marshal{%
- \noexpand\tikz at do@hvvh
+ \noexpand\tikzext at do@hvvh
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\tikz at lasty}}%
{\expandafter\noexpand\pgf at temp}%
- {\noexpand\tikz at timer@hvhline}{\tikz at shapeborder@name}}%
+ {\noexpand\tikzext at timer@hvhline}{\tikz at shapeborder@name}}%
\endgroup
\pgf at marshal}%
%% a few nice to haves, use with to or edge operator
-\tikzset{
+\tikzextset{
node as new start/.is if=tikzext at ortho@preflush,
node as new start,
ortho/install shortcuts/.style={
- *|/.style={only vertical second={#1}}, *|/.default=,
- |*/.style={only vertical first={#1}}, |*/.default=,
- *-/.style={only horizontal second={#1}}, *-/.default=,
- -*/.style={only horizontal first={#1}}, -*/.default=,
- |-/.style={to path={|-(\tikztotarget)\tikztonodes}},
- -|/.style={to path={-|(\tikztotarget)\tikztonodes}},
- -|-/.style=/tikz/horizontal vertical horizontal,
- |-|/.style=/tikz/vertical horizontal vertical,
+ *|/.style={/tikz/ext/only vertical second={##1}}, *|/.default=,
+ |*/.style={/tikz/ext/only vertical first={##1}}, |*/.default=,
+ *-/.style={/tikz/ext/only horizontal second={##1}}, *-/.default=,
+ -*/.style={/tikz/ext/only horizontal first={##1}}, -*/.default=,
+ |-/.style={/tikz/to path={|-(\tikztotarget)\tikztonodes}},
+ -|/.style={/tikz/to path={-|(\tikztotarget)\tikztonodes}},
+ -|-/.style={/tikz/ext/horizontal vertical horizontal={##1}}, -|-/.default=,
+ |-|/.style={/tikz/ext/vertical horizontal vertical={##1}}, |-|/.default=,
+ r-du/.style={/tikz/ext/down horizontal up={##1}}, r-du/.default=,
+ r-ud/.style={/tikz/ext/up horizontal down={##1}}, r-ud/.default=,
+ r-rl/.style={/tikz/ext/right vertical left={##1}}, r-rl/.default=,
+ r-lr/.style={/tikz/ext/left vertical right={##1}}, r-lr/.default=%
},
- horizontal vertical/.style={to path={-| (\tikztotarget) \tikztonodes}},
- vertical horizontal/.style={to path={|- (\tikztotarget) \tikztonodes}},
- horizontal vertical horizontal/.style={to path={-|- (\tikztotarget) \tikztonodes}},
- vertical horizontal vertical/.style={to path={|-| (\tikztotarget) \tikztonodes}},
- only vertical second/.style={to path={
+ horizontal vertical/.style={/tikz/to path={-|(\tikztotarget)\tikztonodes}},
+ vertical horizontal/.style={/tikz/to path={|-(\tikztotarget)\tikztonodes}},
+ horizontal vertical horizontal/.default=,
+ horizontal vertical horizontal/.style={/tikz/to path={-|-[{#1}](\tikztotarget)\tikztonodes}},
+ vertical horizontal vertical/.default=,
+ vertical horizontal vertical/.style={/tikz/to path={|-|[{#1}](\tikztotarget)\tikztonodes}},
+ right vertical left/.default=,
+ right vertical left/.style={/tikz/to path={r-rl[{#1}](\tikztotarget)\tikztonodes]}},
+ left vertical right/.default=,
+ left vertical right/.style={/tikz/to path={r-lr[{#1}](\tikztotarget)\tikztonodes]}},
+ up horizontal down/.default=,
+ up horizontal down/.style={/tikz/to path={r-ud[{#1}](\tikztotarget)\tikztonodes]}},
+ down horizontal up/.default=,
+ down horizontal up/.style={/tikz/to path={r-du[{#1}](\tikztotarget)\tikztonodes]}},
+ only vertical second/.style={/tikz/to path={
\pgfextra
\let\tikzext at ortho@anchor\pgfutil at empty
\let\tikzext at origtotarget\pgfutil at empty
@@ -581,14 +599,14 @@
\edef\tikztotarget{[xshift={#1}]\tikztotarget\tikzext at ortho@anchor}%
\fi
\endpgfextra
- [insert path/.expanded={
+ \pgfkeys at expanded{%
(perpendicular cs: horizontal line through={(\tikztostart)},
- vertical line through={(\tikztotarget)}) -- (\tikztotarget)}] \tikztonodes
+ vertical line through={(\tikztotarget)}) -- (\tikztotarget)}\tikztonodes
\pgfextra
\ifx\tikzext at origtotarget\pgfutil at empty\else
\iftikzext at ortho@preflush(\tikzext at origtotarget)\fi\fi\endpgfextra}},
only vertical second/.default=,
- only horizontal second/.style={to path={
+ only horizontal second/.style={/tikz/to path={
\pgfextra
\let\tikzext at ortho@anchor\pgfutil at empty
\let\tikzext at origtotarget\pgfutil at empty
@@ -609,14 +627,14 @@
\edef\tikztotarget{[yshift={#1}]\tikztotarget\tikzext at ortho@anchor}%
\fi
\endpgfextra
- [insert path/.expanded={
+ \pgfkeys at expanded{%
(perpendicular cs: vertical line through={(\tikztostart)},
- horizontal line through={(\tikztotarget)}) -- (\tikztotarget)}] \tikztonodes
+ horizontal line through={(\tikztotarget)}) -- (\tikztotarget)}\tikztonodes
\pgfextra
\ifx\tikzext at origtotarget\pgfutil at empty\else
\iftikzext at ortho@preflush(\tikzext at origtotarget)\fi\fi\endpgfextra}},
only horizontal second/.default=,
- only vertical first/.style={to path={
+ only vertical first/.style={/tikz/to path={
\pgfextra
\let\tikzext at ortho@anchor\pgfutil at empty
\let\tikzext at origtotarget\pgfutil at empty
@@ -638,7 +656,7 @@
\edef\tikztostart{[xshift={#1}]\tikztostart\tikzext at ortho@anchor}%
\fi
\endpgfextra
- [insert path/.expanded={(\tikztostart)}]
+ expandafter(\tikztostart)
-- (perpendicular cs: vertical line through/.expanded={(\tikztostart)},
horizontal line through={(\tikztotarget)})
\tikztonodes
@@ -646,7 +664,7 @@
\ifx\tikzext at origtotarget\pgfutil at empty\else
\iftikzext at ortho@preflush(\tikzext at origtotarget)\fi\fi\endpgfextra}},
only vertical first/.default=,
- only horizontal first/.style={to path={
+ only horizontal first/.style={/tikz/to path={
\pgfextra
\let\tikzext at ortho@anchor\pgfutil at empty
\let\tikzext at origtotarget\pgfutil at empty
@@ -668,7 +686,7 @@
\edef\tikztostart{[yshift={#1}]\tikztostart\tikzext at ortho@anchor}%
\fi
\endpgfextra
- [insert path/.expanded={(\tikztostart)}]
+ \expandafter(\tikztostart)
-- (perpendicular cs: horizontal line through/.expanded={(\tikztostart)},
vertical line through={(\tikztotarget)})
\tikztonodes \pgfextra
@@ -675,19 +693,51 @@
\ifx\tikzext at origtotarget\pgfutil at empty\else
\iftikzext at ortho@preflush(\tikzext at origtotarget)\fi\fi\endpgfextra}},
only horizontal first/.default=,
- only vertical first to center/.style={to path={
- \pgfextra
- \let\tikzext at origtotarget\tikztotarget
- \endpgfextra
+ only vertical first to center/.style={/tikz/to path={
+ \pgfextra
+ \let\tikzext at origtotarget\tikztotarget
+ \endpgfextra
(\tikztostart) -- (perpendicular cs: vertical line through={(\tikztostart)},
horizontal line through={(\tikztotarget)})
\tikztonodes \ifx\tikzext at origtotarget\pgfutil at empty\else\iftikzext at ortho@preflush(\tikzext at origtotarget)\fi\fi}},
- only horizontal first to center/.style={to path={
- \pgfextra
- \let\tikzext at origtotarget\tikztotarget
- \endpgfextra
+ only horizontal first to center/.style={/tikz/to path={
+ \pgfextra
+ \let\tikzext at origtotarget\tikztotarget
+ \endpgfextra
(\tikztostart) -- (perpendicular cs: horizontal line through={(\tikztostart)},
vertical line through={(\tikztotarget)})
\tikztonodes \ifx\tikzext at origtotarget\pgfutil at empty\else\iftikzext at ortho@preflush(\tikzext at origtotarget)\fi\fi}}%
}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={paths.ortho}{pre 0.6},
+ compat/paths.ortho/warn/.append code={%
+ \pgfutil at for\tikzext at temp:=ortho/ratio,ortho/distance,ortho/from center,ortho/spacing,ortho/middle 0 to 1,%
+ ortho/ud distance,ortho/du distance,ortho/lr distance,ortho/rl distance,ortho/udlr distance,%
+ horizontal vertical,vertical horizontal,horizontal vertical horizontal,%
+ vertical horizontal vertical,up horizontal down,down horizontal up,%
+ left vertical right,right vertical left,only vertical second,%
+ only horizontal second,only vertical first,only horizontal first,%
+ ortho/install shortcuts\do{%
+ \pgfkeys at expanded{\noexpand\tikzextutil at compatwarning@key
+ {paths.ortho}{pre 0.6}{/tikz/\tikzext at temp}{/tikz/ext/\tikzext at temp}%
+ }%
+ }%
+ },
+ compat/paths.ortho/pre 0.6/.append code={%
+ \pgfutil at for\tikzext at temp:=ortho/ratio,ortho/distance,ortho/from center,ortho/spacing,ortho/middle 0 to 1,%
+ ortho/ud distance,ortho/du distance,ortho/lr distance,ortho/rl distance,ortho/udlr distance,%
+ horizontal vertical,vertical horizontal,horizontal vertical horizontal,%
+ vertical horizontal vertical,up horizontal down,down horizontal up,%
+ left vertical right,right vertical left,only vertical second,%
+ only horizontal second,only vertical first,only horizontal first,%
+ ortho/install shortcuts\do{%
+ \pgfkeysedef{/tikz/\tikzext at temp}{%
+ \noexpand\pgfkeysvalueof{/tikz/ext/\tikzext at temp/. at cmd}##1\noexpand\pgfeov
+ }%
+ }%
+ },
+ compat/paths.ortho/\pgfkeysvalueof{/tikz/ext/compat/paths.ortho}%
+}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,6 +6,10 @@
% 2. under the GNU Free Documentation License.
%
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
\def\tikz at rectB#1{% originally from tikz.code.tex
\tikz at make@last at position{#1}%
\edef\tikz at timer@end{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}%
@@ -73,44 +77,44 @@
\let\tikz at timer@end\pgf at tempa
\fi
\multiply\pgfutil at tempdima2
- \edef\tikz at time{\strip at pt\pgfutil at tempdima}%
+ \edef\tikz at time{\pgf at sys@tonumber\pgfutil at tempdima}%
\tikz at timer@hvline}%
\def\tikz at parabola@semifinal#1{%
- \tikz at flush@moveto
- % Save original start:
- \edef\tikz at timer@start{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}% %% Timer: save start position
- \pgf at xb=\tikz at lastx
- \pgf at yb=\tikz at lasty
- \tikz at make@last at position{#1}%
- \edef\tikz at timer@end{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}% %% Timer: save target position
- \pgf at xc=\tikz at lastx
- \pgf at yc=\tikz at lasty
- \begingroup% now calculate bend:
- \let\tikz at after@path\pgfutil at empty
- \expandafter\tikzset\expandafter{\tikz at parabola@option}%
- \tikz at lastxsaved=\tikz at parabola@bend at factor\tikz at lastx
- \tikz at lastysaved=\tikz at parabola@bend at factor\tikz at lasty
- \advance\tikz at lastxsaved by\pgf at xb
- \advance\tikz at lastysaved by\pgf at yb
- \advance\tikz at lastxsaved by-\tikz at parabola@bend at factor\pgf at xb
- \advance\tikz at lastysaved by-\tikz at parabola@bend at factor\pgf at yb
- \expandafter\tikz at make@last at position\expandafter{\tikz at parabola@bend}%
- \edef\tikz at timer@middle{{\the\tikz at lastx}{\the\tikz at lasty}}% %% Timer: save bend postion
- % Calculate delta from bend
- \advance\pgf at xc by-\tikz at lastx
- \advance\pgf at yc by-\tikz at lasty
- % Ok, now calculate delta to bend
- \advance\tikz at lastx by-\pgf at xb
- \advance\tikz at lasty by-\pgf at yb
- \edef\tikz at marshall{%
- \noexpand\let\noexpand\tikz at timer\noexpand\tikz at timer@parabola
- \noexpand\edef\noexpand\tikz at timer@middle{\noexpand\pgfqpoint\tikz at timer@middle}%
- \noexpand\pgfpathparabola{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
- }%
- \expandafter\endgroup%
- \tikz at marshall
- \expandafter\tikz at scan@next at command\tikz at after@path%
+ \tikz at flush@moveto
+ % Save original start:
+ \edef\tikz at timer@start{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}% %% Timer: save start position
+ \pgf at xb=\tikz at lastx
+ \pgf at yb=\tikz at lasty
+ \tikz at make@last at position{#1}%
+ \edef\tikz at timer@end{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}% %% Timer: save target position
+ \pgf at xc=\tikz at lastx
+ \pgf at yc=\tikz at lasty
+ \begingroup% now calculate bend:
+ \let\tikz at after@path\pgfutil at empty
+ \expandafter\tikzset\expandafter{\tikz at parabola@option}%
+ \tikz at lastxsaved=\tikz at parabola@bend at factor\tikz at lastx
+ \tikz at lastysaved=\tikz at parabola@bend at factor\tikz at lasty
+ \advance\tikz at lastxsaved by\pgf at xb
+ \advance\tikz at lastysaved by\pgf at yb
+ \advance\tikz at lastxsaved by-\tikz at parabola@bend at factor\pgf at xb
+ \advance\tikz at lastysaved by-\tikz at parabola@bend at factor\pgf at yb
+ \expandafter\tikz at make@last at position\expandafter{\tikz at parabola@bend}%
+ \edef\tikz at timer@middle{{\the\tikz at lastx}{\the\tikz at lasty}}% %% Timer: save bend position
+ % Calculate delta from bend
+ \advance\pgf at xc by-\tikz at lastx
+ \advance\pgf at yc by-\tikz at lasty
+ % Ok, now calculate delta to bend
+ \advance\tikz at lastx by-\pgf at xb
+ \advance\tikz at lasty by-\pgf at yb
+ \edef\tikz at marshal{%
+ \noexpand\let\noexpand\tikz at timer\noexpand\tikz at timer@parabola
+ \noexpand\edef\noexpand\tikz at timer@middle{\noexpand\pgfqpoint\tikz at timer@middle}%
+ \noexpand\pgfpathparabola{\noexpand\pgfqpoint{\the\tikz at lastx}{\the\tikz at lasty}}{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
+ }%
+ \expandafter\endgroup%
+ \tikz at marshal
+ \expandafter\tikz at scan@next at command\tikz at after@path%
}%
\def\tikz at timer@parabola{% following calculations, see \def of \pgfpathparabola in pgfcorepathconstruct.code.tex (l. 1261)
@@ -126,7 +130,7 @@
\advance\pgf at xb\pgf at x\pgf at xb.5\pgf at xb % = .5 (middle_x + start_x) = start_x + .5 (middle_x - start_x)
\pgf at xa=\tikz at time pt%
\pgf at xa=2\pgf at xa % = 2 * \tikz at time
- \edef\tikz at marshall{\noexpand\pgftransformcurveattime{\strip at pt\pgf at xa}{\noexpand\tikz at timer@start}%
+ \edef\tikz at marshal{\noexpand\pgftransformcurveattime{\pgf at sys@tonumber\pgf at xa}{\noexpand\tikz at timer@start}%
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at yc}}%
{\noexpand\pgfqpoint{\the\pgf at xb}{\the\pgf at yb}}%
{\noexpand\tikz at timer@middle}}%
@@ -144,12 +148,12 @@
\pgf at xa=\tikz at time pt%
\advance\pgf at xa-.5pt%
\pgf at xa=2\pgf at xa % = 2 (\tikz at zime - .5)
- \edef\tikz at marshall{\noexpand\pgftransformcurveattime{\strip at pt\pgf at xa}{\noexpand\tikz at timer@middle}%
+ \edef\tikz at marshal{\noexpand\pgftransformcurveattime{\pgf at sys@tonumber\pgf at xa}{\noexpand\tikz at timer@middle}%
{\noexpand\pgfqpoint{\the\pgf at xc}{\the\pgf at y}}%
{\noexpand\pgfqpoint{\the\pgf at xb}{\the\pgf at yb}}%
{\noexpand\tikz at timer@end}}%
\fi
- \tikz at marshall
+ \tikz at marshal
}
\def\tikz at timer@sine{% following calculations, see \def of \pgfpathsine in pgfcorepathconstruct.code.tex (l. 1315)
@@ -187,10 +191,16 @@
\tikz at marshall
}
-\tikzset{
+\tikzextset{
rectangle timer/.is choice,
rectangle timer/line/.code=\let\tikz at timer@rectangle\tikz at timer@line,
rectangle timer/rectangle/.code=\let\tikz at timer@rectangle\tikzext at timer@rectangle,
- rectangle timer=rectangle
+ rectangle timer=rectangle,
+ /tikz-ext/compat/add library={paths.timer}{pre 0.6},
+ compat/paths.timer/warn/.append code=%
+ \tikzextutil at compatwarning@key{paths.timer}{pre 0.6}{/tikz/rectangle timer}{/tikz/ext/rectangle timer},
+ compat/paths.timer/pre 0.6/.append code=%
+ \pgfkeysdef{/tikz/rectangle timer}{\pgfkeysvalueof{/tikz/ext/rectangle timer/. at cmd}##1\pgfeov},
+ compat/paths.timer/\pgfkeysvalueof{/tikz/ext/compat/paths.timer}%
}
-\endinput
\ No newline at end of file
+\endinput
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -6,31 +6,35 @@
% 2. under the GNU Free Documentation License.
%
% This is the TikZ library patterns.images
-% Load with \usetikzlibrary{patterns.images}
+% Load with \usetikzlibrary{ext.patterns.images}
%
% Macro:
-% - \pgfSetupImageAsPattern[<opt arguments for \pgfdeclareimage>]{<name>}{<path/file>}
+% - \pgfextsetupimageaspattern[<opt arguments for \pgfdeclareimage>]{<name>}{<path/file>}
%
% Keys are:
% - use image as pattern=<name>
% - image as pattern=<opt arguments for \pgftext>
-\def\pgfsetupimageaspattern{\pgfutil at ifnextchar[\tikzext at pgfsetupimageaspattern{\tikzext at pgfsetupimageaspattern[]}}
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\def\tikzextsetupimageaspattern{\pgfutil at ifnextchar[\tikzext at pgfsetupimageaspattern{\tikzext at pgfsetupimageaspattern[]}}
\def\tikzext at pgfsetupimageaspattern[#1]#2#3{% #1 = options
- % #2 = image name
- % #3 = file name
+ % #2 = image name
+ % #3 = file name
\pgfdeclareimage[#1]{tikzext at pgf@iap@#2}{#3}%
- \sbox\pgfutil at tempboxa{\pgfuseimage{tikzext at pgf@iap@#2}}%
+ \setbox\pgfutil at tempboxa\hbox{\pgfuseimage{tikzext at pgf@iap@#2}}%
\expandafter\edef\csname tikzext at pgf@iap@#2@\endcsname{{\the\wd\pgfutil at tempboxa}{\the\ht\pgfutil at tempboxa}}%
}
-\tikzset{
+\tikzextset{
image as pattern/name/.initial=,
image as pattern/option/.style=,
- image as pattern/options/.style={/tikz/image as pattern/option/.append style={#1}},
+ image as pattern/options/.style={/tikz/ext/image as pattern/option/.append style={#1}},
image as pattern/.default=,
image as pattern/.code={
- \pgfqkeys{/tikz/image as pattern}{#1}%
- \pgfkeysgetvalue{/tikz/image as pattern/name}\tikz at temp
+ \pgfqkeys{/tikz/ext/image as pattern}{#1}%
+ \pgfkeysgetvalue{/tikz/ext/image as pattern/name}\tikz at temp
\pgfutil at ifxempty\tikz at temp{%
\tikzerror{You need to specify a name for the ``image-pattern'' to be used.}%
}{%
@@ -44,7 +48,7 @@
\pgfutil at loop
{%
\pgfutil at loop
- \expandafter\pgftext\expandafter[/tikz/image as pattern/option,at=\pgfqpoint{\pgf at xb}{\pgf at yb}]{\pgfuseimage{tikzext at pgf@iap@\tikz at temp}}%
+ \pgftext[/tikz/ext/image as pattern/option,at=\pgfqpoint{\pgf at xb}{\pgf at yb}]{\pgfuseimage{tikzext at pgf@iap@\tikz at temp}}%
\ifdim\pgf at yb<\pgf at ya
\advance\pgf at yb\tikz at tempb
\pgfutil at repeat
@@ -57,4 +61,24 @@
}
}
}
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={patterns.images}{pre 0.6},
+ compat/patterns.images/warn/.append code={%
+ \tikzextutil at compatwarning@key{patterns.images}{pre 0.6}{/tikz/image as pattern}{/pgf/ext/image as pattern}%
+ \tikzextutil at compatwarning@key{patterns.images}{pre 0.6}{/tikz/image as pattern/options}{/pgf/ext/image as pattern/options}%
+ \tikzextutil at compatwarning@valuekey{patterns.images}{pre 0.6}{/tikz/image as pattern/name}{/tikz/ext/image as pattern/name}%
+ \tikzextutil at compatwarning@cmd{patterns.images}{pre 0.6}{pgfsetupimageaspattern}{\tikzextsetupimageaspattern}{}%
+ \pgfkeysaddvalue{/tikz/ext/image as pattern/option}{\pgfkeysalso{/tikz/image as pattern/option}}{}%
+ },
+ compat/patterns.images/pre 0.6/.append code={%
+ \pgfkeysdef{/tikz/image as pattern}{\pgfkeysvalueof{/tikz/ext/image as pattern/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/image as pattern/options}{\pgfkeysvalueof{/tikz/ext/image as pattern/options/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/image as pattern/name}{\pgfkeyssetvalue{/tikz/ext/image as pattern/name/. at cmd}##1\pgfeov}%
+ \pgfkeyssetvalue{/tikz/image as pattern/name}{\pgfkeysvalueof{/tikz/ext/image as pattern/name}}%
+ \pgfkeysaddvalue{/tikz/ext/image as pattern/option}{\pgfkeysalso{/tikz/image as pattern/option}}{}%
+ \let\pgfsetupimageaspattern\tikzextsetupimageaspattern
+ },
+ compat/patterns.images/\pgfkeysvalueof{/tikz/ext/compat/patterns.images}%
+}
\endinput
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -1,8 +1,15 @@
+% Copyright 2024 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.
+%
% This is the TikZ library positioning-plus
% Load with \usetikzlibrary{positioning-plus}
%
% This small library extends TikZ options like 'above', 'left' or 'below right'
-% so that they can be used with an optional prefixed factor seperated by ':' (colon)
+% so that they can be used with an optional prefixed factor separated by ':' (colon)
%
% The option 'left=.5:of somenode' will place
% a new node .5cm (default 'node distance' is '1cm and 1cm') left to (somenode).
@@ -13,74 +20,95 @@
% as a factor of 'node distance'
% Inspired by http://tex.stackexchange.com/a/117610/16595
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
-\pgfdeclaregenericanchor{corner south east}{%
+\pgfdeclaregenericanchor{ext_corner south east}{%
\pgf at sh@reanchor{#1}{south}%
\pgf at ya\pgf at y
\pgf at process{\pgf at sh@reanchor{#1}{east}}%
\pgf at y\pgf at ya
}
-\pgfdeclaregenericanchor{corner north east}{%
+\pgfdeclaregenericanchor{ext_corner north east}{%
\pgf at sh@reanchor{#1}{north}%
\pgf at ya\pgf at y
\pgf at process{\pgf at sh@reanchor{#1}{east}}%
\pgf at y\pgf at ya
}
-\pgfdeclaregenericanchor{corner south west}{%
+\pgfdeclaregenericanchor{ext_corner south west}{%
\pgf at sh@reanchor{#1}{south}%
\pgf at ya\pgf at y
\pgf at process{\pgf at sh@reanchor{#1}{west}}%
\pgf at y\pgf at ya
}
-\pgfdeclaregenericanchor{corner north west}{%
+\pgfdeclaregenericanchor{ext_corner north west}{%
\pgf at sh@reanchor{#1}{north}%
\pgf at ya\pgf at y
\pgf at process{\pgf at sh@reanchor{#1}{west}}%
\pgf at y\pgf at ya
}
-
-\tikzset{corner above left/.code=\tikz at lib@place at handle@{#1}{corner south east}{-1}{1}{corner north west}{0.707106781}}
-\tikzset{corner above right/.code=\tikz at lib@place at handle@{#1}{corner south west}{1}{1}{corner north east}{0.707106781}}
-\tikzset{corner below left/.code=\tikz at lib@place at handle@{#1}{corner north east}{-1}{-1}{corner south west}{0.707106781}}
-\tikzset{corner below right/.code=\tikz at lib@place at handle@{#1}{corner north west}{1}{-1}{corner south east}{0.707106781}}
-
-\tikzset{corner north left/.code =\tikz at lib@place at handle@{#1}{corner north east}{-1}{0}{corner north west}{1}}
-\tikzset{corner north right/.code=\tikz at lib@place at handle@{#1}{corner north west}{1}{0}{corner north east}{1}}
-\tikzset{corner south left/.code =\tikz at lib@place at handle@{#1}{corner south east}{-1}{0}{corner south west}{1}}
-\tikzset{corner south right/.code=\tikz at lib@place at handle@{#1}{corner south west}{1}{0}{corner south east}{1}}
-
-\tikzset{corner west above/.code =\tikz at lib@place at handle@{#1}{corner south west}{0}{1}{corner north west}{1}}
-\tikzset{corner west below/.code=\tikz at lib@place at handle@{#1}{corner north west}{0}{-1}{corner south west}{1}}
-\tikzset{corner east above/.code =\tikz at lib@place at handle@{#1}{corner south east}{0}{1}{corner north east}{1}}
-\tikzset{corner east below/.code=\tikz at lib@place at handle@{#1}{corner north east}{0}{-1}{corner south east}{1}}
-
-\tikzset{north left/.code =\tikz at lib@place at handle@{#1}{north east}{-1}{0}{north west}{1}}
-\tikzset{north right/.code=\tikz at lib@place at handle@{#1}{north west}{1}{0}{north east}{1}}
-\tikzset{south left/.code =\tikz at lib@place at handle@{#1}{south east}{-1}{0}{south west}{1}}
-\tikzset{south right/.code=\tikz at lib@place at handle@{#1}{south west}{1}{0}{south east}{1}}
-
-\tikzset{west above/.code =\tikz at lib@place at handle@{#1}{south west}{0}{1}{north west}{1}}
-\tikzset{west below/.code=\tikz at lib@place at handle@{#1}{north west}{0}{-1}{south west}{1}}
-\tikzset{east above/.code =\tikz at lib@place at handle@{#1}{south east}{0}{1}{north east}{1}}
-\tikzset{east below/.code=\tikz at lib@place at handle@{#1}{north east}{0}{-1}{south east}{1}}
-
+\pgfdeclaregenericanchor{ext_text right}{%
+ \pgf at sh@reanchor{#1}{base}%
+ \multiply\pgf at x by 2
+}
\newif\iftikzext 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{%
+\tikzextset{
+ corner above left/.code=\tikzext at posp@handle{#1}{ext_corner south east}{-1}{1}{ext_corner north west}{0.707106781},
+ corner above right/.code=\tikzext at posp@handle{#1}{ext_corner south west}{1}{1}{ext_corner north east}{0.707106781},
+ corner below left/.code=\tikzext at posp@handle{#1}{ext_corner north east}{-1}{-1}{ext_corner south west}{0.707106781},
+ corner below right/.code=\tikzext at posp@handle{#1}{ext_corner north west}{1}{-1}{ext_corner south east}{0.707106781},
+ corner north left/.code=\tikzext at posp@handle{#1}{ext_corner north east}{-1}{0}{ext_corner north west}{1},
+ corner north right/.code=\tikzext at posp@handle{#1}{ext_corner north west}{1}{0}{ext_corner north east}{1},
+ corner south left/.code=\tikzext at posp@handle{#1}{ext_corner south east}{-1}{0}{ext_corner south west}{1},
+ corner south right/.code=\tikzext at posp@handle{#1}{ext_corner south west}{1}{0}{ext_corner south east}{1},
+ corner west above/.code=\tikzext at posp@handle{#1}{ext_corner south west}{0}{1}{ext_corner north west}{1},
+ corner west below/.code=\tikzext at posp@handle{#1}{ext_corner north west}{0}{-1}{ext_corner south west}{1},
+ corner east above/.code=\tikzext at posp@handle{#1}{ext_corner south east}{0}{1}{ext_corner north east}{1},
+ corner east below/.code=\tikzext at posp@handle{#1}{ext_corner north east}{0}{-1}{ext_corner south east}{1},
+ north left/.code=\tikzext at posp@handle{#1}{north east}{-1}{0}{north west}{1},
+ north right/.code=\tikzext at posp@handle{#1}{north west}{1}{0}{north east}{1},
+ south left/.code=\tikzext at posp@handle{#1}{south east}{-1}{0}{south west}{1},
+ south right/.code=\tikzext at posp@handle{#1}{south west}{1}{0}{south east}{1},
+ west above/.code=\tikzext at posp@handle{#1}{south west}{0}{1}{north west}{1},
+ west below/.code=\tikzext at posp@handle{#1}{north west}{0}{-1}{south west}{1},
+ east above/.code=\tikzext at posp@handle{#1}{south east}{0}{1}{north east}{1},
+ east below/.code=\tikzext at posp@handle{#1}{north east}{0}{-1}{south east}{1},
+ above left/.code=\tikzext at posp@handle{#1}{south east}{-1}{1}{north west}{0.707106781},
+ above right/.code=\tikzext at posp@handle{#1}{south west}{1}{1}{north east}{0.707106781},
+ base left/.code=\tikzext at posp@handle{#1}{base east}{-1}{0}{base west}{1},
+ base right/.code=\tikzext at posp@handle{#1}{base west}{1}{0}{base east}{1},
+ below left/.code=\tikzext at posp@handle{#1}{north east}{-1}{-1}{south west}{0.707106781},
+ below right/.code=\tikzext at posp@handle{#1}{north west}{1}{-1}{south east}{0.707106781},
+ mid left/.code=\tikzext at posp@handle{#1}{mid east}{-1}{0}{mid west}{1},
+ mid right/.code=\tikzext at posp@handle{#1}{mid west}{1}{0}{mid east}{1},
+ above/.code=\tikzext at posp@handle{#1}{south}{0}{1}{north}{1},
+ below/.code=\tikzext at posp@handle{#1}{north}{0}{-1}{south}{1},
+ left/.code=\tikzext at posp@handle{#1}{east}{-1}{0}{west}{1},
+ right/.code=\tikzext at posp@handle{#1}{west}{1}{0}{east}{1},
+ node distance transformation/.is if=tikzext at tikz@lib at place@postransform%
+}
+\def\tikzext at posp@handle#1#2#3#4#5#6{%
+ \def\tikz at anchor{#2}%
+ \let\tikz at do@auto at anchor\relax
+ \edef\tikz at temp{#1}%
+ \def\tikz at lib@place at single@factor{#6}%
\pgfutil at in@{of }{#1}%
\ifpgfutil at in@
- \tikz at lib@place at of#1\tikz at stop{#4}%
+ \tikzext at posp@of#1\tikz at stop{#3}{#4}{#5}%
\else
+ \def\tikzext at posp@xfactor{#3}%
+ \def\tikzext at posp@yfactor{#4}%
\edef\tikz at lib@place at nums{#1}%
\fi
- \ifx\tikz at lib@place at nums\pgfutil at empty
- % Ok, nothing to do, we have set the anchor and we are happy...
- \else
+ %
+ \unless\ifx\tikz at lib@place at nums\pgfutil at empty
\expandafter\tikz at lib@place at parse@nums\expandafter{\tikz at lib@place at nums}%
- \pgf at x=#2\pgf at x
- \pgf at y=#3\pgf at y
+ \pgf at x=\tikzext at posp@xfactor\pgf at x
+ \pgf at y=\tikzext at posp@yfactor\pgf at y
\iftikzext at tikz@lib at place@postransform
\pgf at pos@transform{\pgf at x}{\pgf at y}% change from original
\fi
@@ -87,44 +115,70 @@
\edef\tikz at lib@pos at call{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf at x}{\the\pgf at y}}}%
\fi
}
-
-\def\tikz at lib@place at handle@#1#2#3#4#5#6{%
+\def\tikzext at posp@of#1of #2\tikz at stop#3#4#5{%
\pgfutil at in@{:}{#1}%
\ifpgfutil at in@
- \tikzext at lib@place at handle@#1\tikz at stop
- \ifx\pgf at temp\pgfutil at empty
- \let\pgf at temp\tikz at node@distance
- \fi
- \pgfmathsetmacro\pgf at tempa{(\pgf at tempa)*#4}%
- \pgfmathsetmacro\pgf at tempb{(\pgf at tempb)*#3}%
- \edef\pgf at marshal{\noexpand\tikz at lib@place at handle@{\pgf at temp}{#2}{\pgf at tempb}{\pgf at tempa}{#5}{#6}}%
- \pgf at marshal
+ \tikzext at posp@colon#1\tikz at stop{#3}{#4}%
\else
- \def\tikz at anchor{#2}%
- \let\tikz at do@auto at anchor=\relax
- \edef\tikz at temp{#1}%
- \def\tikz at lib@place at single@factor{#6}%
- \expandafter\tikz at lib@place at handle@@\expandafter{\tikz at temp}{#3}{#4}{#5}%
+ \tikzext at posp@colon1and1:#1\tikz at stop{#3}{#4}
\fi
+ \tikzext at posp@of@{#2}{#5}%
}
-\def\tikzext at lib@place at handle@#1:#2\tikz at stop{%
+\def\tikzext at posp@colon#1:#2\tikz at stop#3#4{%
\pgfutil at in@{and}{#1}%
\ifpgfutil at in@
- \tikzext at lib@place at handle@@#1\tikz at stop
+ \tikzext at posp@colon@#1\tikz at stop{#3}{#4}%
\else
- \tikzext at lib@place at handle@@#1and#1\tikz at stop
+ \tikzext at posp@colon@#1and#1\tikz at stop{#3}{#4}%
\fi
- \def\pgf at temp{#2}%
+ \def\tikz at lib@place at nums{#2}%
+ \ifx\tikz at lib@place at nums\pgfutil at empty
+ \let\tikz at lib@place at nums\tikz at node@distance
+ \fi
}
-\def\tikzext at lib@place at handle@@#1and#2\tikz at stop{%
- \def\pgf at tempa{#1}%
- \def\pgf at tempb{#2}%
+\def\tikzext at posp@colon@#1and#2\tikz at stop#3#4{%
+ \pgfmathmultiply{#1}{#3}\let\tikzext at posp@xfactor\pgfmathresult
+ \pgfmathmultiply{#2}{#4}\let\tikzext at posp@yfactor\pgfmathresult
}
-\def\tikzext at xyshift@starred#1#2#3{%
+\def\tikzext at posp@of@#1#2{%
+ % #1: of part
+ % #2: other anchor
+ \def\tikzext at posp@scan{ext_fit bounding box}%
+ \edef\tikzext at temp{\expandafter\tikzextutil at firstofmany#1\pgf at stop}%
+ \if\tikzext at temp(%
+ \tikzext at posp@fit{#1}{0}%
+ \else\if\tikzext at temp|%
+ \expandafter\tikzext at posp@fit\expandafter{\tikzextutil at secondofmany#1\pgf at stop}{1}%
+ \else\ifx\tikzext at temp\tikz at activebar
+ \expandafter\tikzext at posp@fit\expandafter{\tikzextutil at secondofmany#1\pgf at stop}{1}%
+ \else\if\tikzext at temp-%
+ \expandafter\tikzext at posp@fit\expandafter{\tikzextutil at secondofmany#1\pgf at stop}{2}%
+ \else\if\tikzext at temp+%
+ \expandafter\tikzext at posp@fit\expandafter{\tikzextutil at secondofmany#1\pgf at stop}{3}%
+ \else
+ \def\tikzext at posp@scan{#1}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \expandafter\tikz at scan@one at point\expandafter\tikz at lib@place at remember\expandafter(\tikzext at posp@scan)% TODO: expandafters
+ \iftikz at shapeborder%
+ % Ok, this is relative to a border.
+ \iftikz at lib@ignore at size%
+ \edef\tikz at node@at{\noexpand\pgfpointanchor{\tikz at shapeborder@name}{center}}%
+ \def\tikz at anchor{center}%
+ \else%
+ \edef\tikz at node@at{\noexpand\pgfpointanchor{\tikz at shapeborder@name}{#2}}%
+ \fi%
+ \fi%
+}
+
+\def\tikzext at posp@xyshift#1#2#3{%
\edef\tikz at marshal{\noexpand\pgfutil at in@{and}{\tikz at node@distance}}%
\tikz at marshal
\ifpgfutil at in@
- \expandafter\tikzext at lib@place at handle@@\tikz at node@distance\tikz at stop
+ \expandafter\tikzext at posp@handle@\tikz at node@distance\tikz at stop
\else
\let#3\tikz at node@distance
\fi
@@ -142,52 +196,22 @@
\pgf at process{\pgfqpointxy{0}{\pgfmathresult}}%
\fi
\pgftransformshift{\pgfqpoint{\pgf at x}{\pgf at y}}%
- \fi}
-\tikzset{
- xshift*/.code=\tikzext at xyshift@starred{#1}x\pgf at tempb,
- yshift*/.code=\tikzext at xyshift@starred{#1}y\pgf at tempa
-}
-
-\def\pgfutil at firstofmany#1#2\pgf at stop{#1}
-\def\pgfutil at secondofmany#1#2\pgf at stop{#2}
-\def\tikz at lib@place at of@#1#2#3{%
- \def\pgf at tempa{fit bounding box}%
- \edef\pgf at temp{\expandafter\pgfutil at firstofmany#2\pgf at stop}
- \if\pgf at temp(%
- \tikz at lib@place at fit@scan{#2}{0}%
- \else\if\pgf at temp|%
- \expandafter\tikz at lib@place at fit@scan\expandafter{\pgfutil at secondofmany#2\pgf at stop}{1}%
- \else\ifx\pgf at temp\tikz at activebar
- \expandafter\tikz at lib@place at fit@scan\expandafter{\pgfutil at secondofmany#2\pgf at stop}{1}%
- \else\if\pgf at temp-%
- \expandafter\tikz at lib@place at fit@scan\expandafter{\pgfutil at secondofmany#2\pgf at stop}{2}%
- \else\if\pgf at temp+%
- \expandafter\tikz at lib@place at fit@scan\expandafter{\pgfutil at secondofmany#2\pgf at stop}{3}%
- \else
- \def\pgf at tempa{#2}%
- \fi
- \fi
- \fi
- \fi
\fi
- \expandafter\tikz at scan@one at point\expandafter\tikz at lib@place at remember\expandafter(\pgf at tempa)%
- \iftikz at shapeborder%
- % Ok, this is relative to a border.
- \iftikz at lib@ignore at size%
- \edef\tikz at node@at{\noexpand\pgfpointanchor{\tikz at shapeborder@name}{center}}%
- \def\tikz at anchor{center}%
- \else%
- \edef\tikz at node@at{\noexpand\pgfpointanchor{\tikz at shapeborder@name}{#3}}%
- \fi%
- \fi%
- \edef\tikz at lib@place at nums{#1}%
}
-\def\tikz at lib@place at fit@scan#1#2{%
+\def\tikzext at posp@xyshift@#1and#2\tikz at stop{%
+ \def\pgf at tempb{#1}%
+ \def\pgf at tempa{#2}%
+}
+\tikzextset{
+ xshift*/.code=\tikzext at posp@xyshift{#1}x\pgf at tempb,
+ yshift*/.code=\tikzext at posp@xyshift{#1}y\pgf at tempa
+}
+\def\tikzext at posp@fit#1#2{%
\pgf at xb=-16000pt\relax%
\pgf at xa=16000pt\relax%
\pgf at yb=-16000pt\relax%
\pgf at ya=16000pt\relax%
- \if\pgfutil at firstofmany#1\pgf at stop(%
+ \if\tikzextutil at firstofmany#1\pgf at stop(%
\tikz at lib@fit at scan#1\pgf at stop%
\else
\tikz at lib@fit at scan(#1)\pgf at stop
@@ -195,13 +219,13 @@
\ifdim\pgf at xa>\pgf at xa
% shouldn't happen
\else
- \expandafter\def\csname pgf at sh@ns at fit bounding box\endcsname{rectangle}%
- \expandafter\edef\csname pgf at sh@np at fit bounding box\endcsname{%
+ \expandafter\gdef\csname pgf at sh@ns at ext_fit bounding box\endcsname{rectangle}%
+ \expandafter\xdef\csname pgf at sh@np at ext_fit bounding box\endcsname{%
\def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf at xa}{\the\pgf at ya}}%
\def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf at xb}{\the\pgf at yb}}%
}%
- \expandafter\def\csname pgf at sh@nt at fit bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}%
- \expandafter\def\csname pgf at sh@pi at fit bounding box\expandafter\endcsname\expandafter{\pgfpictureid}%
+ \expandafter\gdef\csname pgf at sh@nt at ext_fit bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}%
+ \expandafter\xdef\csname pgf at sh@pi at ext_fit bounding box\expandafter\endcsname\expandafter{\pgfpictureid}%
\ifcase#2\relax
\or % 1 = vertical
\pgf at y=\pgf at yb%
@@ -223,17 +247,17 @@
\fi
\fi
}
-\tikzset{
- fit bounding box/.code={\tikz at lib@place at fit@scan{#1}{0}},
- span vertical/.code={\tikz at lib@place at fit@scan{#1}{1}},
- span horizontal/.code={\tikz at lib@place at fit@scan{#1}{2}},
- span/.code={\tikz at lib@place at fit@scan{#1}{3}}}
+\tikzextset{
+ fit bounding box/.code=\tikz at lib@place at fit@scan{#1}{0},
+ span vertical/.code=\tikz at lib@place at fit@scan{#1}{1},
+ span horizontal/.code=\tikz at lib@place at fit@scan{#1}{2},
+ span/.code=\tikz at lib@place at fit@scan{#1}{3}}
-\pgfmathdeclarefunction{x_node_dist}{0}{%
+\pgfmathdeclarefunction{ext_x_node_dist}{0}{%
\begingroup
\edef\pgfmath at temp{\noexpand\pgfutil at in@{and}{\tikz at node@distance}}%
\pgfmath at temp\ifpgfutil at in@
- \expandafter\tikzext at lib@place at handle@@\tikz at node@distance\tikz at stop
+ \expandafter\tikzext at posp@xyshift@\tikz at node@distance\tikz at stop
\else
\let\pgf at tempb\tikz at node@distance
\fi
@@ -241,11 +265,11 @@
\pgfmath at smuggleone\pgfmathresult
\endgroup
}
-\pgfmathdeclarefunction{y_node_dist}{0}{%
+\pgfmathdeclarefunction{ext_y_node_dist}{0}{%
\begingroup
\edef\pgfmath at temp{\noexpand\pgfutil at in@{and}{\tikz at node@distance}}%
\pgfmath at temp\ifpgfutil at in@
- \expandafter\tikzext at lib@place at handle@@\tikz at node@distance\tikz at stop
+ \expandafter\tikzext at posp@xyshift@\tikz at node@distance\tikz at stop
\else
\let\pgf at tempa\tikz at node@distance
\fi
@@ -253,10 +277,101 @@
\pgfmath at smuggleone\pgfmathresult
\endgroup
}
-%\tikzdeclarecoordinatesystem{node distance}{%
-% \tikz at cs@nd#1\tikz at stop}
-%\def\tikz at cs@nd#1,#2\tikz at stop{%
-% \def\tikzext at xyshift@starred at action##1{\pgftransformshift{##1}}%
-% \tikzext at xyshift@starred{#1}x\pgf at tempb
-% \tikzext at xyshift@starred{#2}y\pgf at tempa}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={positioning-plus}{pre 0.6},
+ compat/positioning-plus/warn/.append code=%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/xshift*}{/tikz/ext/xshift*}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/yshift*}{/tikz/ext/yshift*}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/corner above left}{/tikz/ext/corner above left}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/corner below left}{/tikz/ext/corner below left}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/corner above right}{/tikz/ext/corner above right}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/corner below right}{/tikz/ext/corner below right}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/north left}{/tikz/ext/north left}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/south left}{/tikz/ext/south left}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/north right}{/tikz/ext/north right}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/south right}{/tikz/ext/south right}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/west above}{/tikz/ext/west above}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/west below}{/tikz/ext/west below}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/east above}{/tikz/ext/east above}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/east below}{/tikz/ext/east below}%
+ \pgfkeysdef{/tikz/above}{\pgfkeysvalueof{/tikz/ext/above/. at cmd}##1\pgfeov}% no compat warning possible
+ \pgfkeysdef{/tikz/below}{\pgfkeysvalueof{/tikz/ext/below/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/left}{\pgfkeysvalueof{/tikz/ext/left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/right}{\pgfkeysvalueof{/tikz/ext/right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/above left}{\pgfkeysvalueof{/tikz/ext/above left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/below left}{\pgfkeysvalueof{/tikz/ext/below left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/above right}{\pgfkeysvalueof{/tikz/ext/above right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/below right}{\pgfkeysvalueof{/tikz/ext/below right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/base left}{\pgfkeysvalueof{/tikz/ext/base left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/base right}{\pgfkeysvalueof{/tikz/ext/base right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mid left}{\pgfkeysvalueof{/tikz/ext/mid left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mid right}{\pgfkeysvalueof{/tikz/ext/mid right/. at cmd}##1\pgfeov}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/span}{/tikz/ext/span}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/span horizontal}{/tikz/ext/span horizontal}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/span vertical}{/tikz/ext/span vertical}%
+ \tikzextutil at compatwarning@key{positioning-plus}{pre 0.6}{/tikz/fit bounding box}{/tikz/ext/fit bounding box}%
+ \pgfdeclaregenericanchor{corner south east}{\tikzextutil at compatmaybewarning{anchor 'corner south east'}{'ext_corner south east'}{positioning-plus = pre 0.6}\csname pgf at anchor@generic at ext_corner south east\endcsname{##1}}%
+ \pgfdeclaregenericanchor{corner south west}{\tikzextutil at compatmaybewarning{anchor 'corner south west'}{'ext_corner south west'}{positioning-plus = pre 0.6}\csname pgf at anchor@generic at ext_corner south west\endcsname{##1}}%
+ \pgfdeclaregenericanchor{corner north east}{\tikzextutil at compatmaybewarning{anchor 'corner north east'}{'ext_corner north east'}{positioning-plus = pre 0.6}\csname pgf at anchor@generic at ext_corner north east\endcsname{##1}}%
+ \pgfdeclaregenericanchor{corner north west}{\tikzextutil at compatmaybewarning{anchor 'corner north west'}{'ext_corner north west'}{positioning-plus = pre 0.6}\csname pgf at anchor@generic at ext_corner north west\endcsname{##1}}%
+ \tikzextutil at compatwarning@mathcmdZ{positioning-plus}{pre 0.6}{x_node_dist}{ext_x_node_dist}%
+ \tikzextutil at compatwarning@mathcmdZ{positioning-plus}{pre 0.6}{y_node_dist}{ext_y_node_dist}%
+ ,%
+ compat/positioning-plus/pre 0.6/.append code=%
+ \pgfkeysdef{/tikz/xshift*}{\pgfkeysvalueof{/tikz/ext/xshift*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/yshift*}{\pgfkeysvalueof{/tikz/ext/yshift*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/corner above left}{\pgfkeysvalueof{/tikz/ext/corner above left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/corner below left}{\pgfkeysvalueof{/tikz/ext/corner below left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/corner above right}{\pgfkeysvalueof{/tikz/ext/corner above right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/corner below right}{\pgfkeysvalueof{/tikz/ext/corner below right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/north left}{\pgfkeysvalueof{/tikz/ext/north left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/south left}{\pgfkeysvalueof{/tikz/ext/south left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/north right}{\pgfkeysvalueof{/tikz/ext/north right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/south right}{\pgfkeysvalueof{/tikz/ext/south right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/west above}{\pgfkeysvalueof{/tikz/ext/west above/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/west below}{\pgfkeysvalueof{/tikz/ext/west below/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/east above}{\pgfkeysvalueof{/tikz/ext/east above/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/east below}{\pgfkeysvalueof{/tikz/ext/east below/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/above}{\pgfkeysvalueof{/tikz/ext/above/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/below}{\pgfkeysvalueof{/tikz/ext/below/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/left}{\pgfkeysvalueof{/tikz/ext/left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/right}{\pgfkeysvalueof{/tikz/ext/right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/above left}{\pgfkeysvalueof{/tikz/ext/above left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/below left}{\pgfkeysvalueof{/tikz/ext/below left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/above right}{\pgfkeysvalueof{/tikz/ext/above right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/below right}{\pgfkeysvalueof{/tikz/ext/below right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/base left}{\pgfkeysvalueof{/tikz/ext/base left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/base right}{\pgfkeysvalueof{/tikz/ext/base right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mid left}{\pgfkeysvalueof{/tikz/ext/mid left/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mid right}{\pgfkeysvalueof{/tikz/ext/mid right/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/span}{\pgfkeysvalueof{/tikz/ext/span/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/span vertical}{\pgfkeysvalueof{/tikz/ext/span vertical/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/span horizontal}{\pgfkeysvalueof{/tikz/ext/span horizontal/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/fit bounding box}{\pgfkeysvalueof{/tikz/ext/fit bounding box/. at cmd}##1\pgfeov}%
+ \pgfdeclaregenericanchor{corner south east}{\csname pgf at anchor@generic at ext_corner south east\endcsname}%
+ \pgfdeclaregenericanchor{corner south west}{\csname pgf at anchor@generic at ext_corner south west\endcsname}%
+ \pgfdeclaregenericanchor{corner north east}{\csname pgf at anchor@generic at ext_corner north east\endcsname}%
+ \pgfdeclaregenericanchor{corner north west}{\csname pgf at anchor@generic at ext_corner north west\endcsname}%
+ \pgfmathdeclarefunction*{x_node_dist}{0}{\csname pgfmathext_x_node_dist\encsname}%
+ \pgfmathdeclarefunction*{y_node_dist}{0}{\csname pgfmathext_y_node_dist\encsname}%
+ ,
+ compat/positioning-plus/0.6/.append code=
+ \pgfkeysdef{above}{\tikz at lib@place at handle@{#1}{south}{0}{1}{north}{1}}%
+ \pgfkeysdef{above left}{\tikz at lib@place at handle@{#1}{south east}{-1}{1}{north west}{0.707106781}}%
+ \pgfkeysdef{above right}{\tikz at lib@place at handle@{#1}{south west}{1}{1}{north east}{0.707106781}}%
+ \pgfkeysdef{base left}{\tikz at lib@place at handle@{#1}{base east}{-1}{0}{base west}{1}}%
+ \pgfkeysdef{base right}{\tikz at lib@place at handle@{#1}{base west}{1}{0}{base east}{1}}%
+ \pgfkeysdef{below}{\tikz at lib@place at handle@{#1}{north}{0}{-1}{south}{1}}%
+ \pgfkeysdef{below left}{\tikz at lib@place at handle@{#1}{north east}{-1}{-1}{south west}{0.707106781}}%
+ \pgfkeysdef{below right}{\tikz at lib@place at handle@{#1}{north west}{1}{-1}{south east}{0.707106781}}%
+ \pgfkeysdef{left}{\tikz at lib@place at handle@{#1}{east}{-1}{0}{west}{1}}%
+ \pgfkeysdef{mid left/}{\tikz at lib@place at handle@{#1}{mid east}{-1}{0}{mid west}{1}}%
+ \pgfkeysdef{mid right}{\tikz at lib@place at handle@{#1}{mid west}{1}{0}{mid east}{1}}%
+ \pgfkeysdef{right}{\tikz at lib@place at handle@{#1}{west}{1}{0}{east}{1}}%
+ ,
+ compat/positioning-plus/newest/.append style=/tikz/ext/compat/positioning-plus/0.6,
+ compat/positioning-plus/\pgfkeysvalueof{/tikz/ext/compat/positioning-plus}%
+}
\endinput
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.scalepicture.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.scalepicture.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.scalepicture.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,48 +5,109 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\def\tikzext at scalepicture@savepicturesize{%
+
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\unless\ifcsname ifmemoizing\endcsname
+ \expandafter\newif\csname ifmemoizing\endcsname
+\fi
+
+\def\tikzextspwrite#1#2#3{%
+ \immediate\write\pgfutil at auxout{%
+ \noexpand\expandafter\gdef
+ \noexpand\csname tikzext at sp@#1\endcsname{{#2}{#3}}%
+ }%
+}
+\def\tikzext at sp@savepicturesize{%
\pgf at process{%
\pgfpointdiff
- {\pgfpointanchor{current bounding box}{south west}}
+ {\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}}%
+ \pgfutil at tempswafalse % is this the final size adjustment?
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
+ \tikzext at sp@ifapproxequalto{\pgf at x}{\tikzext at sp@width}{%
+ \tikzext at sp@ifapproxequalto{\pgf at y}{\tikzext at sp@height}{%
+ % This freezes the picture size when the target is reached (Memoize or no).
+ \pgf at x=\tikzext at sp@width\relax
+ \pgf at y=\tikzext at sp@height\relax
+ \pgfutil at tempswatrue
+ }{}%
+ }{}%
}%
- \let\tikzext at scalepicture@savepicturesize\relax
+ \tikzextspwrite{\pgfpictureid}{\the\pgf at x}{\the\pgf at y}%
+ \ifmemoizing
+ \ifpgfutil at tempswa % the final adjustment, we won't abort
+ % Let Memoize broadcast the picture size to .aux, so that we immediately
+ % get the correct picture size if we don't load it anymore.
+ \xtoksapp\mmzCCMemo{%
+ \noexpand\tikzextspwrite{\pgfpictureid}{\the\pgf at x}{\the\pgf at y}%
+ }%
+ \else % we'll adjust the size some more, abort
+ \mmzAbort
+ \fi
+ \fi
}
+%
+% pgfmathapproxequalto checks against 0.0001, too precise for this
+%
+% SZ: I rewrote this (copying from pgfmathapproxequalto), so that the macro
+% doesn't destroy the given arguments.
+\def\tikzext at sp@ifapproxequalto#1#2{%
+ \begingroup
+ \pgfmathsetlength\pgfutil at tempdima{\pgfkeysvalueof{/tikz/ext/scale picture diff}}%
+ \pgfmath at x=#1\relax
+ \pgfmath at y=#2\relax
+ \advance\pgfmath at x by-\pgfmath at y
+ \ifdim\pgfmath at x<0pt\relax
+ \multiply\pgfmath at x by-1\relax
+ \fi
+ \expandafter\endgroup
+ \ifdim\pgfmath at x<\pgfutil at tempdima\relax
+ \expandafter\pgfutil at firstoftwo
+ \else
+ \expandafter\pgfutil at secondoftwo
+ \fi
+}
-\def\tikzext at scalepicture@width{%
+\def\tikzext at sp@width{%
\expandafter\expandafter\expandafter\pgfutil at firstoftwo
- \csname tikzext at scalepicture@\pgfpictureid\endcsname
+ \csname tikzext at sp@\pgfpictureid\endcsname
}
-\def\tikzext at scalepicture@height{%
+\def\tikzext at sp@height{%
\expandafter\expandafter\expandafter\pgfutil at secondoftwo
- \csname tikzext at scalepicture@\pgfpictureid\endcsname
+ \csname tikzext at sp@\pgfpictureid\endcsname
}
\def\tikzextpicturewidth{%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{0pt}{\tikzext at scalepicture@width}}
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{0pt}{\tikzext at sp@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,
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{0pt}{\tikzext at sp@height}}
+
+\def\tikzext at sp@init#1{%
+ \pgfkeysvalueof{/tikz/execute at end picture/. at cmd}\tikzext at sp@savepicturesize\pgfeov
+ \ifmemoizing
+ \pgfkeysvalueof{/mmz/context/. at cmd}/tikz/ext/#1\pgfeov
+ \fi
+}
+\tikzextset{
+ scale picture diff/.initial=+0.05pt,
+ scale picture diff/.value to context/.try,
%%% keep aspect ratio
%% width and height
minimum picture size/.code 2 args={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{minimum picture size=\the\dimexpr#1\relax\the\dimexpr#2\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\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}%
+ \ifdim\tikzext at sp@width<\pgf at xa
+ \pgfmathsetmacro\tikz at tempa{\pgf at xa/\tikzext at sp@width}%
\fi
- \ifdim\tikzext at scalepicture@height<\pgf at ya
- \pgfmathsetmacro\tikz at temp{\pgf at ya/\tikzext at scalepicture@height}%
+ \ifdim\tikzext at sp@height<\pgf at ya
+ \pgfmathsetmacro\tikz at temp{\pgf at ya/\tikzext at sp@height}%
\fi
\ifdim\tikz at tempa pt>\tikz at temp pt
\let\tikz at temp\tikz at tempa
@@ -57,17 +118,17 @@
}%
},
maximum picture size/.code 2 args={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{maximum picture size=\the\dimexpr#1\relax\the\dimexpr#2\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\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}%
+ \ifdim\tikzext at sp@width>\pgf at xa
+ \pgfmathsetmacro\tikz at tempa{\pgf at xa/\tikzext at sp@width}%
\fi
- \ifdim\tikzext at scalepicture@height>\pgf at ya
- \pgfmathsetmacro\tikz at temp{\pgf at ya/\tikzext at scalepicture@height}%
+ \ifdim\tikzext at sp@height>\pgf at ya
+ \pgfmathsetmacro\tikz at temp{\pgf at ya/\tikzext at sp@height}%
\fi
\ifdim\tikz at tempa pt<\tikz at temp pt
\let\tikz at temp\tikz at tempa
@@ -80,26 +141,26 @@
%%% 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}}%
+ \tikzext at sp@init{picture width=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
+ \tikzset{scale={(#1)/\tikzext at sp@width}}%
}%
},
minimum picture width/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{minimum picture width=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at xa{#1}%
- \ifdim\tikzext at scalepicture@width<\pgf at xa
- \tikzset{scale={\pgf at xa/\tikzext at scalepicture@width}}
+ \ifdim\tikzext at sp@width<\pgf at xa
+ \tikzset{scale={\pgf at xa/\tikzext at sp@width}}
\fi
}%
},
maximum picture width/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{maximum picture width=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at xa{#1}%
- \ifdim\tikzext at scalepicture@width>\pgf at xa
- \tikzset{scale={\pgf at xa/\tikzext at scalepicture@width}}
+ \ifdim\tikzext at sp@width>\pgf at xa
+ \tikzset{scale={\pgf at xa/\tikzext at sp@width}}
\fi
}%
},
@@ -106,26 +167,26 @@
%%% xscale only
%% width
picture width*/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
- \tikzset{xscale={(#1)/\tikzext at scalepicture@width}}%
+ \tikzext at sp@init{picture width*=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
+ \tikzset{xscale={(#1)/\tikzext at sp@width}}%
}%
},
minimum picture width*/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{minimum picture width*=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at xa{#1}%
- \ifdim\tikzext at scalepicture@width<\pgf at xa
- \tikzset{xscale={\pgf at xa/\tikzext at scalepicture@width}}
+ \ifdim\tikzext at sp@width<\pgf at xa
+ \tikzset{xscale={\pgf at xa/\tikzext at sp@width}}
\fi
}%
},
maximum picture width*/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{maximum picture width*=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at xa{#1}%
- \ifdim\tikzext at scalepicture@width>\pgf at xa
- \tikzset{xscale={\pgf at xa/\tikzext at scalepicture@width}}
+ \ifdim\tikzext at sp@width>\pgf at xa
+ \tikzset{xscale={\pgf at xa/\tikzext at sp@width}}
\fi
}%
},
@@ -132,26 +193,26 @@
%%% 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}}%
+ \tikzext at sp@init{picture height=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
+ \tikzset{scale={(#1)/\tikzext at sp@height}}%
}%
},
minimum picture height/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{minimum picture height=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at ya{#1}%
- \ifdim\tikzext at scalepicture@height<\pgf at ya
- \tikzset{scale={\pgf at ya/\tikzext at scalepicture@height}}
+ \ifdim\tikzext at sp@height<\pgf at ya
+ \tikzset{scale={\pgf at ya/\tikzext at sp@height}}
\fi
}%
},
maximum picture height/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{maximum picture height=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at ya{#1}%
- \ifdim\tikzext at scalepicture@height<\pgf at ya
- \tikzset{scale={\pgf at ya/\tikzext at scalepicture@height}}
+ \ifdim\tikzext at sp@height>\pgf at ya
+ \tikzset{scale={\pgf at ya/\tikzext at sp@height}}
\fi
}%
},
@@ -158,37 +219,81 @@
%%% yscale only
%% height
picture height*/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
- \tikzset{yscale={(#1)/\tikzext at scalepicture@height}}%
+ \tikzext at sp@init{picture height*=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
+ \tikzset{yscale={(#1)/\tikzext at sp@height}}%
}%
},
minimum picture height*/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{minimum picture height*=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at ya{#1}%
- \ifdim\tikzext at scalepicture@height<\pgf at ya
- \tikzset{yscale={\pgf at ya/\tikzext at scalepicture@height}}
+ \ifdim\tikzext at sp@height<\pgf at ya
+ \tikzset{yscale={\pgf at ya/\tikzext at sp@height}}
\fi
}%
},
maximum picture height*/.code={%
- \tikzset{save picture size}%
- \pgfutil at IfUndefined{tikzext at scalepicture@\pgfpictureid}{}{%
+ \tikzext at sp@init{maximum picture height*=\the\dimexpr#1\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\pgfmathsetlength\pgf at ya{#1}%
- \ifdim\tikzext at scalepicture@height<\pgf at ya
- \tikzset{yscale={\pgf at ya/\tikzext at scalepicture@height}}
+ \ifdim\tikzext at sp@height>\pgf at ya
+ \tikzset{yscale={\pgf at ya/\tikzext at sp@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}{}{%
+ \tikzext at sp@init{picture size*=\the\dimexpr#1\relax\the\dimexpr#2\relax}%
+ \pgfutil at IfUndefined{tikzext at sp@\pgfpictureid}{}{%
\tikzset{
- xscale={(#1)/\tikzext at scalepicture@width},
- yscale={(#2)/\tikzext at scalepicture@height}}%
+ xscale={(#1)/\tikzext at sp@width},
+ yscale={(#2)/\tikzext at sp@height}}%
}%
- },
+ }
}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={scalepicture}{pre 0.6},
+ compat/scalepicture/warn/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/scalepicture@}{3}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/picture width} {/tikz/ext/picture width}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/minimum picture width} {/tikz/ext/minimum picture width}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/maximum picture width} {/tikz/ext/maximum picture width}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/picture height} {/tikz/ext/picture height}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/minimum picture height} {/tikz/ext/minimum picture height}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/maximum picture height} {/tikz/ext/maximum picture height}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/picture size} {/tikz/ext/picture size}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/minimum picture size} {/tikz/ext/minimum picture size}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/maximum picture size} {/tikz/ext/maximum picture size}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/picture width*} {/tikz/ext/picture width*}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/minimum picture width*} {/tikz/ext/minimum picture width*}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/maximum picture width*} {/tikz/ext/maximum picture width*}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/picture height*} {/tikz/ext/picture height*}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/minimum picture height*}{/tikz/ext/minimum picture height*}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/maximum picture height*}{/tikz/ext/maximum picture height*}%
+ \tikzextutil at compatwarning@key{scalepicture}{pre 0.6}{/tikz/picture size*} {/tikz/ext/picture size*},%
+ compat/scalepicture/pre 0.6/.append code=%
+ % \pgfkeyssetvalue{/tikz/ext/compat/scalepicture@}{2}%
+ \pgfkeysdef{/tikz/picture width} {\pgfkeysvalueof{/tikz/ext/picture width/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/minimum picture width} {\pgfkeysvalueof{/tikz/ext/minimum picture width/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/maximum picture width} {\pgfkeysvalueof{/tikz/ext/maximum picture width/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/picture height} {\pgfkeysvalueof{/tikz/ext/picture height/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/minimum picture height} {\pgfkeysvalueof{/tikz/ext/minimum picture height/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/maximum picture height} {\pgfkeysvalueof{/tikz/ext/maximum picture height/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/picture size} {\pgfkeysvalueof{/tikz/ext/picture size/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/minimum picture size} {\pgfkeysvalueof{/tikz/ext/minimum picture size/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/maximum picture size} {\pgfkeysvalueof{/tikz/ext/maximum picture size/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/picture width*} {\pgfkeysvalueof{/tikz/ext/picture width*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/minimum picture width*} {\pgfkeysvalueof{/tikz/ext/minimum picture width*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/maximum picture width*} {\pgfkeysvalueof{/tikz/ext/maximum picture width*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/picture height*} {\pgfkeysvalueof{/tikz/ext/picture height*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/minimum picture height*}{\pgfkeysvalueof{/tikz/ext/minimum picture height*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/maximum picture height*}{\pgfkeysvalueof{/tikz/ext/maximum picture height*/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/picture size*} {\pgfkeysvalueof{/tikz/ext/picture size*/. at cmd}##1\pgfeov},
+ % compat/scalepicture/0.6/.append code=\pgfkeyssetvalue{/tikz/ext/compat/scalepicture@}{1},
+ % compat/scalepicture/newest/.append code=\pgfkeyssetvalue{/tikz/ext/compat/scalepicture@}{0},
+ compat/scalepicture/\pgfkeysvalueof{/tikz/ext/compat/scalepicture}%
+}
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -7,15 +7,15 @@
%
\usepgflibrary{ext.shapes.uncenteredrectangle}
\newif\iftikzext at uncrec@mathmode
-\pgfqkeys{/tikz-ext}{
+\tikzextset{
tikz-cd fix/.code={% #1
\tikzcdset{
- /tikz-ext/tikz-cd fix/.code=,
- urc/.style={/pgf/uncentered rectangle center={##1}},
+ /tikz/ext/tikz-cd fix/.code=,
+ urc/.style={/pgf/ext/uncentered rectangle center={##1}},
every diagram/.append style={% ##1
- /pgf/uncentered rectangle center yshift=axis_height,
+ /pgf/ext/uncentered rectangle center yshift=axis_height,
/tikz/uncentered rectangle/.style={
- /tikz/shape=uncentered rectangle,
+ /tikz/shape=ext_uncentered rectangle,
/tikz/commutative diagrams/math mode=false,
},
/tikz/matrix of math nodes/.style={
@@ -35,7 +35,7 @@
/tikz/uncrec math mode=true,
/tikz/uncrec/.style={% ####1
/tikz/uncentered rectangle,
- /pgf/uncentered rectangle center={####1}
+ /pgf/ext/uncentered rectangle center={####1}
},
install uncentered rectangle in column/.style={
/tikz/column ####1/.append style={/tikz/uncentered rectangle}
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,22 +5,26 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
-\pgfqkeys{/tikz/arc through}{
- .unknown/.code=\pgfkeyssetevalue{/tikz/arc through/through}{\pgfkeyscurrentname},
- through/.initial={(0,0)},
- center suffix/.initial=,
- clockwise/.code=%
+\tikzextset{
+ arc through/.unknown/.code=\pgfkeyssetevalue{/tikz/ext/arc through/through}{\pgfkeyscurrentname},
+ arc through/through/.initial={(0,0)},
+ arc through/center suffix/.initial=,
+ arc through/clockwise/.code=%
\def\tikz at arcthrough@clockwise{%
\pgfmathsubtract@{\pgfkeysvalueof{/tikz/end angle}}{360}%
\pgfkeyssetevalue{/tikz/end angle}{+\pgfmathresult}},
- counter clockwise/.code=\let\tikz at arcthrough@clockwise\relax,
- clockwise/.value forbidden, counter clockwise/.value forbidden, counter clockwise}
-\tikzset{
- arc through/.code={%
- \tikzset{every arc through/.try}%
- \pgfqkeys{/tikz/arc through}{#1}%
- \pgfkeysgetvalue{/tikz/arc through/through}\tikz at temp
+ arc through/counter clockwise/.code=\let\tikz at arcthrough@clockwise\relax,
+ arc through/clockwise/.value forbidden,
+ arc through/counter clockwise/.value forbidden,
+ arc through/counter clockwise,
+ arc through/.code={% \tikzset{every arc/.try,ext/every arc to/.try,ext/arc to/.expand once=\tikzext at arcto@options@}%
+ \tikzset{ext/every arc through/.try}%
+ \pgfqkeys{/tikz/ext/arc through}{#1}%
+ \pgfkeysgetvalue{/tikz/ext/arc through/through}\tikz at temp
\pgfextract at process\pgf at tostart{\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)\relax}%
\expandafter\pgfextract at process\expandafter\pgf at tothrough\expandafter
{\expandafter\tikz at scan@one at point\expandafter\pgfutil at firstofone\tikz at temp\relax}%
@@ -31,7 +35,7 @@
\pgfpointintersectionoflines
{\pgf at topointMidA}{\pgfmathrotatepointaround{\pgf at tothrough}{\pgf at topointMidA}{90}}%
{\pgf at topointMidB}{\pgfmathrotatepointaround{\pgf at tothrough}{\pgf at topointMidB}{90}}}%
- \pgfcoordinate{arc through center\pgfkeysvalueof{/tikz/arc through/center suffix}}{\pgf at tocenter}%
+ \pgfcoordinate{arc through center\pgfkeysvalueof{/tikz/ext/arc through/center suffix}}{\pgf at tocenter}%
\pgfpointdiff{\pgf at tocenter}{\pgf at tostart}%
\pgfmathveclen@{\pgfmath at tonumber\pgf at x}{\pgfmath at tonumber\pgf at y}%
\pgfkeyssetevalue{/tikz/x radius}{+\pgfmathresult pt}%
@@ -48,3 +52,14 @@
\def\tikz at to@path{arc[]\tikztonodes}%
}%
}
+
+%%% Compatibility
+\tikzextset{
+ /tikz-ext/compat/add library={topaths.arcthrough}{pre 0.6},
+ compat/topaths.arcthrough/warn/.append code=%
+ \tikzextutil at compatwarning@key{topaths.arcthrough}{pre 0.6}{/tikz/arc through}{/tikz/ext/arc through},
+ compat/topaths.arcthrough/pre 0.6/.append code=%
+ \pgfkeysdef{/tikz/arc through}{\pgfkeysvalueof{/tikz/ext/arc through/. at cmd}##1\pgfeov},
+ compat/topaths.arcthrough/\pgfkeysvalueof{/tikz/ext/compat/topaths.arcthrough}%
+}
+\endinput
\ No newline at end of file
Added: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.autobend.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.autobend.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.autobend.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -0,0 +1,114 @@
+% Copyright 2024 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.
+%
+
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
+
+\tikzextset{
+ autobend north/.default=\tikz at to@bend,
+ autobend south/.default=\tikz at to@bend,
+ autobend west/.default=\tikz at to@bend,
+ autobend east/.default=\tikz at to@bend,
+ autobend up/.default=\tikz at to@bend,
+ autobend down/.default=\tikz at to@bend,
+ autobend left/.default=\tikz at to@bend,
+ autobend right/.default=\tikz at to@bend,
+ autobend north/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ \pgf at pos@transform at glob
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at x>0pt right\else left\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend south/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ \pgf at pos@transform at glob
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at x>0pt left\else right\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend west/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ \pgf at pos@transform at glob
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at y>0pt right\else left\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend east/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ \pgf at pos@transform at glob
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at y>0pt left\else right\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend up/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at x>0pt right\else left\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend down/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at x>0pt left\else right\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend left/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at y>0pt right\else left\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ },
+ autobend right/.style={
+ /tikz/to path={
+ \pgfextra{%
+ \pgf at process{%
+ \pgfpointdiff{\tikz at scan@one at point\pgfutil at firstofone(\tikztotarget)}
+ {\tikz at scan@one at point\pgfutil at firstofone(\tikztostart)}%
+ }%
+ \pgfkeysvalueof{/tikz/bend \ifdim\pgf at y>0pt left\else right\fi/. at cmd}#1\pgfeov}
+ \tikz at to@curve at path
+ }%
+ }%
+}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.topaths.autobend.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex 2025-03-19 20:20:49 UTC (rev 74702)
@@ -5,8 +5,11 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
+\unless\ifcsname tikzextset\endcsname
+ \input tikzext-util.tex
+\fi
\usepgflibrary{ext.transformations.mirror}
-\tikzset{
+\tikzextset{
mirror/.code={%
\pgfutil at in@{--}{#1}%
\ifpgfutil at in@
@@ -20,7 +23,7 @@
\pgfextract at process\tikz at temp{\tikz at scan@one at point\pgfutil at firstofone#1\relax}%
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformmirror
+ \noexpand\pgfexttransformmirror
{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfpointadd{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfqpointxy{0}{1}}}}}%
@@ -30,7 +33,7 @@
\pgfextract at process\tikz at temp{\tikz at scan@one at point\pgfutil at firstofone#1\relax}%
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformmirror
+ \noexpand\pgfexttransformmirror
{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfpointadd{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfqpointxy{1}{0}}}}}%
@@ -44,15 +47,15 @@
}
\def\tikzext at trans@mirror#1--#2\tikz at stop{%
\tikz at addtransform{%
- \pgftransformmirror{\tikz at scan@one at point\pgfutil at firstofone#1\relax}
- {\tikz at scan@one at point\pgfutil at firstofone#2\relax}}}
-\def\tikzext at trans@xmirror at simple#1\tikz at stop{\tikz at addtransform{\pgftransformxmirror{#1}}}
-\def\tikzext at trans@ymirror at simple#1\tikz at stop{\tikz at addtransform{\pgftransformymirror{#1}}}
+ \pgfexttransformmirror{\tikz at scan@one at point\pgfutil at firstofone#1\relax}
+ {\tikz at scan@one at point\pgfutil at firstofone#2\relax}}}
+\def\tikzext at trans@xmirror at simple#1\tikz at stop{\tikz at addtransform{\pgfexttransformxmirror{#1}}}
+\def\tikzext at trans@ymirror at simple#1\tikz at stop{\tikz at addtransform{\pgfexttransformymirror{#1}}}
\def\tikzext at trans@xmirror at coordinate#1\tikz at stop{%
\tikz at scan@one at point\pgfutil at firstofone#1\relax
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformxmirror{+\the\pgf at x}%
+ \noexpand\pgfexttransformxmirror{+\the\pgf at x}%
}%
}%
\tikz at marshal
@@ -61,13 +64,13 @@
\tikz at scan@one at point\pgfutil at firstofone#1\relax
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformymirror{+\the\pgf at y}%
+ \noexpand\pgfexttransformymirror{+\the\pgf at y}%
}%
}%
\tikz at marshal
}
-\tikzset{
+\tikzextset{
Mirror/.code={%
\pgfutil at in@{--}{#1}%
\ifpgfutil at in@
@@ -81,7 +84,7 @@
\pgfextract at process\tikz at temp{\tikz at scan@one at point\pgfutil at firstofone#1\relax}%
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformMirror
+ \noexpand\pgfexttransformMirror
{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfpointadd{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfqpointxy{0}{1}}}}}%
@@ -91,7 +94,7 @@
\pgfextract at process\tikz at temp{\tikz at scan@one at point\pgfutil at firstofone#1\relax}%
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformMirror
+ \noexpand\pgfexttransformMirror
{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfpointadd{\expandafter\noexpand\tikz at temp}
{\noexpand\pgfqpointxy{1}{0}}}}}%
@@ -105,15 +108,15 @@
}
\def\tikzext at trans@Mirror#1--#2\tikz at stop{%
\tikz at addtransform{%
- \pgftransformMirror{\tikz at scan@one at point\pgfutil at firstofone#1\relax}
- {\tikz at scan@one at point\pgfutil at firstofone#2\relax}}}
-\def\tikzext at trans@xMirror at simple#1\tikz at stop{\tikz at addtransform{\pgftransformxMirror{#1}}}
-\def\tikzext at trans@yMirror at simple#1\tikz at stop{\tikz at addtransform{\pgftransformyMirror{#1}}}
+ \pgfexttransformMirror{\tikz at scan@one at point\pgfutil at firstofone#1\relax}
+ {\tikz at scan@one at point\pgfutil at firstofone#2\relax}}}
+\def\tikzext at trans@xMirror at simple#1\tikz at stop{\tikz at addtransform{\pgfexttransformxMirror{#1}}}
+\def\tikzext at trans@yMirror at simple#1\tikz at stop{\tikz at addtransform{\pgfexttransformyMirror{#1}}}
\def\tikzext at trans@xMirror at coordinate#1\tikz at stop{%
\tikz at scan@one at point\pgfutil at firstofone#1\relax
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformxMirror{+\the\pgf at x}%
+ \noexpand\pgfexttransformxMirror{+\the\pgf at x}%
}%
}%
\tikz at marshal
@@ -122,9 +125,40 @@
\tikz at scan@one at point\pgfutil at firstofone#1\relax
\edef\tikz at marshal{%
\noexpand\tikz at addtransform{%
- \noexpand\pgftransformyMirror{+\the\pgf at y}%
+ \noexpand\pgfexttransformyMirror{+\the\pgf at y}%
}%
}%
\tikz at marshal
}
-\endinput
+
+%%% Compatibility
+\tikzextset{
+ compat/transformations.mirror/warn/.append code=%
+ \pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{3}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/xmirror} {/tikz/ext/xmirror}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/ymirror} {/tikz/ext/ymirror}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/mirror x}{/tikz/ext/mirror x}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/mirror y}{/tikz/ext/mirror y}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/mirror} {/tikz/ext/mirror}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/xMirror} {/tikz/ext/xMirror}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/yMirror} {/tikz/ext/yMirror}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/Mirror x}{/tikz/ext/Mirror x}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/Mirror y}{/tikz/ext/Mirror y}%
+ \tikzextutil at compatwarning@key{transformations.mirror}{pre 0.6}{/tikz/Mirror} {/tikz/ext/Mirror},
+ compat/transformations.mirror/pre 0.6/.append code=%
+ \pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{2}%
+ \pgfkeysdef{/tikz/xmirror} {\pgfkeysvalueof{/tikz/ext/xmirror/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/ymirror} {\pgfkeysvalueof{/tikz/ext/ymirror/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mirror x}{\pgfkeysvalueof{/tikz/ext/mirror x/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mirror y}{\pgfkeysvalueof{/tikz/ext/mirror y/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/mirror} {\pgfkeysvalueof{/tikz/ext/mirror/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/xMirror} {\pgfkeysvalueof{/tikz/ext/xMirror/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/yMirror} {\pgfkeysvalueof{/tikz/ext/yMirror/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/Mirror x}{\pgfkeysvalueof{/tikz/ext/Mirror x/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/Mirror y}{\pgfkeysvalueof{/tikz/ext/Mirror y/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/tikz/Mirror} {\pgfkeysvalueof{/tikz/ext/Mirror/. at cmd}##1\pgfeov},
+ compat/transformations.mirror/0.6/.append code=\pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{1},
+ compat/transformations.mirror/newest/.append code=\pgfkeyssetvalue{/tikz/ext/compat/transformations.mirror@}{0},
+ compat/transformations.mirror/\pgfkeysvalueof{/tikz/ext/compat/transformations.mirror}
+}
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tikz-ext/pgffor-ext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ext/pgffor-ext.sty 2025-03-19 20:20:22 UTC (rev 74701)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ext/pgffor-ext.sty 2025-03-19 20:20:49 UTC (rev 74702)
@@ -7,7 +7,7 @@
%
\RequirePackage{pgffor}
-\ifcsname tikzext at pgf@foreach at no@list at parse@to\endcsname
+\ifcsname tikzext at pgffor@nolist at parse\endcsname
\expandafter\@gobble
\else
\expandafter\@firstofone
@@ -16,7 +16,8 @@
\input{pgffor-ext.code.tex}
}
-\pgfqkeys{/pgf/foreach}{
+\pgfqkeys{/pgf/foreach/ext}{
+ .code=\pgfqkeys{/pgf/foreach/ext}{#1},
xparser/.code 2 args={%
\DeclareDocumentCommand\pgffor at scan@custom{ #1 u, }{%
\def\pgffor at value{#2}%
@@ -26,12 +27,11 @@
\pgfutil at ifnextchar\pgffor at stop\pgffor at scanone\pgffor at scan@custom
}%
},
- xparser Om/.style={
- xparser={ O{} }{{##1}/{##2}}
- },
+ xparser Om/.default=,
+ xparser Om/.style={/pgf/foreach/ext/xparser={ O{#1} }{{##1}/{##2}}},
}
\pgfqkeys{/handlers}{
- .list xparse/.code n args={3}{%
+ .ext_list xparse/.code n args={3}{%
\def\pgf at keys@temp{}%
\foreach[xparser={#1}{#2}]\pgf at keys@key in{#3}{%
\expandafter\pgfutil at g@addto at macro\expandafter\pgf at keys@temp\expandafter{\expandafter{\pgf at keys@key}}}%
@@ -41,4 +41,20 @@
\expandafter\pgf at keys@list at path\expandafter}%
\pgf at keys@temp\pgf at stop}%
}
+
+%%% Compatibility
+\tikzextset{
+ compat/pgffor-ext/warn/.append code={%
+ \tikzextutil at compatwarning@key{pgffor-ext}{pre 0.6}{/pgf/foreach/xparser}{/pgf/foreach/ext/xparser}%
+ \tikzextutil at compatwarning@key{pgffor-ext}{pre 0.6}{/pgf/foreach/xparser Om}[]{/pgf/foreach/ext/xparser Om}%
+ \tikzextutil at compatwarning@handler{pgffor-ext}{pre 0.6}{.list xparse}{.ext list xparse}%
+ },
+ compat/pgffor-ext/pre 0.6/.append code={%
+ \pgfkeysdef{/pgf/foreach/xparser}{\pgfkeysvalueof{/pgf/foreach/ext/normal list/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/foreach/xparser Om}{\pgfkeysvalueof{/pgf/foreach/ext/xparser Om/. at cmd}##1\pgfeov}%
+ \pgfkeysdef{/pgf/foreach/xparser Om/. at def}{}%
+ \pgfkeysdef{/handlers/.list xparse}{\pgfkeysvalueof{/handlers/.ext list xparse/. at cmd}##1\pgfeov}%
+ },
+ compat/pgffor-ext/\pgfkeysvalueof{/tikz/ext/compat/pgffor-ext}%
+}
\endinput
More information about the tex-live-commits
mailing list.