summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/base/doc/AUTHORS3
-rw-r--r--graphics/pgf/base/doc/CTAN_NOTES.md1
-rw-r--r--graphics/pgf/base/doc/ChangeLog112
-rw-r--r--graphics/pgf/base/doc/FILES3
-rw-r--r--graphics/pgf/base/doc/README10
-rw-r--r--graphics/pgf/base/doc/RELEASE_NOTES.md31
-rw-r--r--graphics/pgf/base/doc/pgfmanual.pdfbin10578098 -> 10580776 bytes
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-base-plots.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-base-transformations.tex10
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-library-patterns.tex8
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-math-commands.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex24
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-arrows.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-matrices.tex8
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-paths.tex7
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-pics.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-plots.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-shapes.tex10
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgf-asymptotic-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgf-exp.gnuplot2
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgf-parametric-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgf-sin.gnuplot2
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgf-x.gnuplot2
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/text-en/plots/pgfplotgnuplot-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-dvipdfm/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/version-for-dvipdfmx/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/version-for-dvips/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/version-for-pdftex/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-asymptotic-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-exp.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-parametric-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-sin.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-x.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfplotgnuplot-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-asymptotic-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-exp.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-parametric-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-sin.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-x.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/doc/version-for-vtex/en/plots/pgfplotgnuplot-example.gnuplot2
-rw-r--r--graphics/pgf/base/doc/version-for-xetex/en/plots/pgfmanual-sine.gnuplot3
-rw-r--r--graphics/pgf/base/lua/graphdrawing/pgf/gd/force/ControlSprings.lua4
-rw-r--r--graphics/pgf/base/tex/pgf.revision.tex8
-rw-r--r--graphics/pgf/base/tex/pgflibraryfpu.code.tex2
-rw-r--r--graphics/pgf/base/tex/pgfmathfunctions.random.code.tex11
-rw-r--r--graphics/pgf/base/tex/tikz.code.tex50
-rw-r--r--graphics/pgf/base/tex/tikzlibrarycalendar.code.tex2
-rw-r--r--graphics/pgf/base/tex/tikzlibrarytopaths.code.tex4
-rw-r--r--graphics/pgf/contrib/puyotikz/LICENSE21
-rw-r--r--graphics/pgf/contrib/puyotikz/README.md21
-rw-r--r--graphics/pgf/contrib/puyotikz/puyotikz.pdfbin0 -> 217870 bytes
-rw-r--r--graphics/pgf/contrib/puyotikz/puyotikz.py294
-rw-r--r--graphics/pgf/contrib/puyotikz/puyotikz.sty64
-rw-r--r--graphics/pgf/contrib/puyotikz/puyotikz.tex206
57 files changed, 886 insertions, 98 deletions
diff --git a/graphics/pgf/base/doc/AUTHORS b/graphics/pgf/base/doc/AUTHORS
deleted file mode 100644
index 8bd3d5bde9..0000000000
--- a/graphics/pgf/base/doc/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-Till Tantau <tantau@users.sourceforge.net>
-Mark Wibrow
-Christian Feuersaenger <ludewich@users.sourceforge.net>
diff --git a/graphics/pgf/base/doc/CTAN_NOTES.md b/graphics/pgf/base/doc/CTAN_NOTES.md
deleted file mode 100644
index 8b13789179..0000000000
--- a/graphics/pgf/base/doc/CTAN_NOTES.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/graphics/pgf/base/doc/ChangeLog b/graphics/pgf/base/doc/ChangeLog
index e34428fced..2e12f9a86e 100644
--- a/graphics/pgf/base/doc/ChangeLog
+++ b/graphics/pgf/base/doc/ChangeLog
@@ -1,3 +1,115 @@
+2020-12-25 Henri Menke
+
+ - Release 3.1.8
+
+2020-12-03 Henri Menke
+
+ - CI: Use GitHub Actions from pgf-tikz/actions
+
+2020-12-01 Henri Menke
+
+ - Remove empty or outdated files
+
+2020-12-25 Henri Menke
+
+ - Preserve coordinate relativity across ..
+
+2020-12-22 Henri Menke
+
+ - Merge pull request #967 from muzimuzhi/handle-relax
+
+2020-12-22 Henri Menke
+
+ - fixup! doc: Add note on expandsion of path operations #966
+
+2020-12-22 muzimuzhi
+
+ - Remove spurious spaces, terminate \advance in time
+
+2020-12-22 muzimuzhi
+
+ - tikz: handle \relax and frozen \relax on path #966
+
+2020-12-21 Henri Menke
+
+ - doc: Add note on expandsion of path operations #966
+
+2020-12-17 Henri Menke
+
+ - Merge pull request #961 from muzimuzhi/improve-doc
+
+2020-12-18 muzimuzhi
+
+ - doc: relation of /.code & /.initial will remain
+
+2020-12-17 Henri Menke
+
+ - Only force signed releases #962
+
+2020-12-18 muzimuzhi
+
+ - doc: clarify /.code keys don't respect /.initial #654
+
+2020-12-18 muzimuzhi
+
+ - Added doc for \pgfpointtransformed #844
+
+2020-12-17 Henri Menke
+
+ - Merge pull request #959 from muzimuzhi/improve-doc
+
+2020-12-15 muzimuzhi
+
+ - doc: clarify path or full key start with slash #904
+
+2020-12-17 Henri Menke
+
+ - Merge pull request #956 from muzimuzhi/improve-doc
+
+2020-12-15 muzimuzhi
+
+ - pgfmathdeclarerandomlist: improve doc and code comment
+
+2020-12-14 Henri Menke
+
+ - Merge pull request #955 from Ordoviz/master
+
+2020-12-14 Henri Menke
+
+ - pgfmathrandominteger: reordering of arguments incomplete #954
+
+2020-12-12 Henri Menke
+
+ - fpu: mark /pgf/fpu/install only as not experimental
+
+2020-11-30 Lennard Hofmann
+
+ - Fix typos in manual
+
+2020-12-11 Henri Menke
+
+ - Merge branch 'PimpLuaExamples' of https://github.com/Mo-Gul/pgf
+
+2020-12-11 Henri Menke
+
+ - docs: set terminal table -> set table #952
+
+2020-06-21 Stefan Pinnow
+
+ - correct codeexample preamble entries in Lua file
+
+2020-06-21 Stefan Pinnow
+
+ - made some "normal" `codeexample`s compile again (when extracted)
+
+2020-06-21 Stefan Pinnow
+
+ - just added end line commata at the end of values/styles
+
+2020-06-18 Stefan Pinnow
+
+ - added hints which libraries need to be loaded as well to make the example in `pgfmanual-en-tikz-graphs.tex` work closes issue #755)
+
2020-12-01 Henri Menke
- Release 3.1.7a
diff --git a/graphics/pgf/base/doc/FILES b/graphics/pgf/base/doc/FILES
index 66e8e55a11..98478c08d6 100644
--- a/graphics/pgf/base/doc/FILES
+++ b/graphics/pgf/base/doc/FILES
@@ -1,9 +1,6 @@
-doc/generic/pgf/AUTHORS
-doc/generic/pgf/CTAN_NOTES.md
doc/generic/pgf/ChangeLog
doc/generic/pgf/FILES
doc/generic/pgf/INSTALL
-doc/generic/pgf/README
doc/generic/pgf/RELEASE_NOTES.md
doc/generic/pgf/description.html
doc/generic/pgf/extract.lua
diff --git a/graphics/pgf/base/doc/README b/graphics/pgf/base/doc/README
deleted file mode 100644
index 73e99b884a..0000000000
--- a/graphics/pgf/base/doc/README
+++ /dev/null
@@ -1,10 +0,0 @@
-pgf -- A Portable Graphic Format for TeX
-
-See the directory doc/generic/pgf for more information. See the file
-doc/generic/pgf/pgfmanual.pdf for a manual. This
-documentation also explains the installation. See the file
-doc/generic/pgf/license/LICENSE for license details.
-
-Please go to the official repository at https://github.com/pgf-tikz/pgf
-or the official mailing list at https://tug.org/mailman/listinfo/pgf-tikz
-to submit bug reports, request new features, etc.
diff --git a/graphics/pgf/base/doc/RELEASE_NOTES.md b/graphics/pgf/base/doc/RELEASE_NOTES.md
index 677c2d0408..22437f3da7 100644
--- a/graphics/pgf/base/doc/RELEASE_NOTES.md
+++ b/graphics/pgf/base/doc/RELEASE_NOTES.md
@@ -1,9 +1,34 @@
+# BREAKING CHANGES
+
+If a topath is bent by any of the in=, out=, bend=, etc. options, a Bezier
+curve is constructed in the background. To infer the positions of the control
+points the start and end coordinate are converted to absolute coordinates.
+However, this has the effect that subsequent points on the path think that the
+endpoint of the topath was absolute which can lead to counter-intuitive path
+construction, e.g.
+```latex
+\draw (2,0) to[out=0,in=180] +(1,0) -- ++(0,-1) -- +(1,0);
+```
+If old code relies on this behavior, this drawing will silently break! Please
+open an issue if you rely on this.
+
# Bug fixes
-Another issue with the new LaTeX hook mechanism surfaced in the external
-library which is being worked around now.
+This release introduces a fix for path handling which concerns expansion of
+tokens on the path in particular with respect to conditional. Previously when
+the expansion of a conditonal resulted in a frozen \relax the parser would just
+give up. Now the parser will skip over the frozen \relax and continue to
+expand tokens. Whether this will result in a meaningful expansion is up to the
+user.
This release also includes other bug fixes. On GitHub you can click the commit
hashes and the issue numbers to get to the fix and the ticket, respectively.
-3c46a6974 #947
+a4c275704 #952
+8a997bbc1 #954
+8f37bca84 #962
+3cbe5a192 #844
+49e5f0a08 #654
+17a95e4c5 #966
+ad06895a6 #966
+79e613ae1 #966
diff --git a/graphics/pgf/base/doc/pgfmanual.pdf b/graphics/pgf/base/doc/pgfmanual.pdf
index 63f7afd712..38c731f0fa 100644
--- a/graphics/pgf/base/doc/pgfmanual.pdf
+++ b/graphics/pgf/base/doc/pgfmanual.pdf
Binary files differ
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-plots.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-plots.tex
index 4f9ce6098e..d11922a09b 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-plots.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-plots.tex
@@ -320,7 +320,7 @@ reader'' that parses coordinate files a bit more intelligently.
file it writes
%
\begin{codeexample}[code only, tikz syntax=false]
-set terminal table; set output "#1.table"; set format "%.5f"
+set table "#1.table"; set format "%.5f"
\end{codeexample}
%
where |#1| is replaced by \meta{prefix}. Then, in a second line, it writes
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transformations.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transformations.tex
index 8b7e137335..afc5ed3d1d 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transformations.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transformations.tex
@@ -522,6 +522,16 @@ matrices.
\end{command}
+\subsubsection{Applying Coordinate Transformation to Points}
+
+\begin{command}{\pgfpointtransformed\marg{point}}
+ Applies current transformation matrix to \marg{point} $(x,y)$ and returns a
+ transformed point $(ax+cy+s,bx+dy+t)$. Normally, this is done automatically
+ by commands like |\pgfpathlineto| or |\pgfpathmoveto|, but sometimes you
+ may wish to access a transformed point yourself.
+\end{command}
+
+
\subsubsection{Computing Adjustments for Coordinate Transformations}
\label{section-adjustment-transformations}
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-library-patterns.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-library-patterns.tex
index c9810eb225..40a370d3fc 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-library-patterns.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-library-patterns.tex
@@ -258,7 +258,7 @@ just rotate in the drawing code.
The following settings can be used to reproduce the other |... lines|
patterns.
%
-\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
+\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={horizontal lines},pattern color=orange]
(0,0) rectangle +(1,1);
@@ -316,7 +316,7 @@ just rotate in the drawing code.
The following settings can be used to reproduce the |grid| and
|crosshatch| patterns.
%
-\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
+\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={grid},pattern color=orange]
(0,0) rectangle +(1,1);
@@ -364,7 +364,7 @@ just rotate in the drawing code.
The following settings can be used to reproduce the |dots| and
|crosshatch dots| patterns.
%
-\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
+\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={dots},pattern color=orange]
(0,0) rectangle +(1,1);
@@ -414,7 +414,7 @@ just rotate in the drawing code.
Number of pointy ends of the stars.
\end{key}
%
-\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
+\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={fivepointed stars},pattern color=orange]
(0,0) rectangle +(1,1);
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-math-commands.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-math-commands.tex
index 54a890b070..393c0842d0 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-math-commands.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-math-commands.tex
@@ -74,7 +74,7 @@ Section~\ref{pgfmath-functions-random}, the following commands are provided:
%
\end{command}
-\begin{command}{\pgfmathdeclarerandomlist\marg{list name}\{\marg{item-1}\marg{item 2}...\}}
+\begin{command}{\pgfmathdeclarerandomlist\marg{list name}{\ttfamily\{}\marg{item-1}\marg{item-2}...{\ttfamily\}}}
This creates a list of items with the name \meta{list name}.
\end{command}
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex
index 8241da2c7e..641bae58f2 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex
@@ -185,6 +185,11 @@ partial key or a full key: If it starts with a slash, then it is a full key and
it is not modified; if it does not start with a slash, then the default path is
automatically prefixed.
+\emph{Remark:} The above rule is actually a definition, hence the corresponding
+sufficiency conditions hold. That is, if it is a full key, then it starts with
+a slash; if it is a partial key, then it does not start with a slash. Moreover,
+a path always starts with a slash.
+
Note that the default path is not the same as a search path. In particular, the
default path is just a single path. When a partial key is given, only this
single default path is prefixed; |pgfkeys| does not try to look up the key in
@@ -1248,6 +1253,25 @@ directly stored in a key.
and, thus, |\pgfkeysnovalue| will be stored in |/my key|.
To retrieve the value stored in a key, the handler |/.get| is used.
+
+ \medskip
+ \emph{Remark:} A key can both store a value and execute commands%
+ \footnote{This behavior was partially changed in \pgfname{} 3.1.6 and then
+ restored in 3.1.7. For compatibility reasons, this behavior will not be
+ changed in future releases anymore.}.
+ If so, using \meta{key} will \emph{always} execute commands with the passed
+ value, or the default value |\pgfkeysnovalue| if no value is provided.
+ Note that the stored value is never used. To update the stored value, the
+ handler |/.initial| or command |\pgfkeyssetvalue| is used.
+ %
+\begin{codeexample}[]
+\pgfkeys{/my key/.initial=red}
+\pgfkeys{/my key/.code=#1}
+% "/my key" now both stores the value "red" and executes commands
+\pgfkeys{/my key=blue}
+% "/my key" now still stores the value "red"
+\end{codeexample}
+ %
\end{handler}
\begin{handler}{{.get}|=|\meta{macro}}
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-arrows.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-arrows.tex
index ced3a827fe..91bf2477da 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-arrows.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-arrows.tex
@@ -329,7 +329,7 @@ context:
As an example, when you write |length=0pt 5|, the length of the arrow will
be exactly five times the current line width. As another example, the
default length of a |Latex| arrow is |length=3pt 4.5 0.8|. Let us ignore
- the 0.8 for a moment; the |4pt 4.5| then means that for the standard line
+ the 0.8 for a moment; the |3pt 4.5| then means that for the standard line
width of |0.4pt|, the length of a |Latex| arrow will be exactly 4.8pt (3pt
plus 4.5 times |0.4pt|).
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-matrices.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-matrices.tex
index 19adb8db0f..f46ad79b7b 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-matrices.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-matrices.tex
@@ -557,8 +557,8 @@ However, it is not recommended to override these.
even odd column,
row,
even odd row,
- cell
- }
+ cell,
+ },
}
\end{codeexample}
%
@@ -581,8 +581,8 @@ However, it is not recommended to override these.
column,
row,
cell,
- /tikz/my style
- }
+ /tikz/my style,
+ },
}
\end{codeexample}
%
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-paths.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-paths.tex
index 3a3f524eed..7e0cae5108 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-paths.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-paths.tex
@@ -94,6 +94,11 @@ which is described in the subsections of the present section.
the path options (like filling and drawing the path due to a |fill| and a
|draw| option somewhere in the \meta{specification}), the nodes are added
in a post-processing step.
+
+ \emph{Note:} When scanning for path operations \tikzname\ expands tokens
+ looking for valid path operations. This however implies that these tokens
+ has to be fully expandable up to the point where it results in a valid path
+ operation.
\end{command}
\begin{key}{/tikz/name=\meta{path name}}
@@ -599,7 +604,7 @@ You can add a grid to the current path using the |grid| path operation.
This operations adds a grid filling a rectangle whose two corners are given
by \meta{corner} and by the previous coordinate. (Instead of a coordinate
you can also say |cycle| to use the position of the last move-to as the
- corner coordinate, but it not very natural to do so.) corner Thus, the
+ corner coordinate, but it not very natural to do so.) Thus, the
typical way in which a grid is drawn is |\draw (1,1) grid (3,3);|, which
yields a grid filling the rectangle whose corners are at $(1,1)$ and
$(3,3)$. All coordinate transformations apply to the grid.
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-pics.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-pics.tex
index 8710e6dc48..1e3645ab73 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-pics.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-pics.tex
@@ -613,7 +613,7 @@ handler that allows us to write even simpler code, namely:
\end{codeexample}
\begin{handler}{{.pic}|=|\meta{some code}}
- This handler can only be used with a key with the prefix |/tikz/|, so just
+ This handler can only be used with a key with the prefix |/tikz/|, so you
should normally use it only as an option to a \tikzname\ command or to the
|\tikzset| command. It takes the \meta{key}'s path and, inside that path,
it replaces |/tikz/| by |/tikz/pics/| (so, basically, it adds the
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-plots.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-plots.tex
index a757b394a2..c069c1a44b 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-plots.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-plots.tex
@@ -140,7 +140,7 @@ if it is |o| or |u|. In the first case, the point is considered to be an
second case, the point is considered to be \emph{undefined}, which also results
in a new subpath being started. Again, see Section~\ref{section-plot-jumps} on
how to change this, if necessary. (This is exactly the format that
-\textsc{gnuplot} produces when you say |set terminal table|.)
+\textsc{gnuplot} produces when you say |set table|.)
%
\begin{codeexample}[]
\tikz \draw plot[mark=x,smooth] file {plots/pgfmanual-sine.table};
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-shapes.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-shapes.tex
index a712c1a4c9..eb23cd90d8 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-shapes.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-shapes.tex
@@ -313,7 +313,7 @@ The syntax for specifying nodes is the following:
\end{codeexample}
%
As the example shows, a \meta{list} can contain ellipses (three dots) to
- indicated that a larger number of numbers is meant. Indeed, you can use the
+ indicate that a larger number of numbers is meant. Indeed, you can use the
full power of the |\foreach| command here, including multiple parameters
and options, see Section~\ref{section-foreach}.
@@ -1853,7 +1853,7 @@ force:
\subsection{Placing Nodes on a Line or Curve Explicitly}
\label{section-nodes-placing-1}
-Until now, we always placed node on a coordinate that is mentioned in the path.
+Until now, we always placed nodes on a coordinate that is mentioned in the path.
Often, however, we wish to place nodes on ``the middle'' of a line and we do
not wish to compute these coordinates ``by hand''. To facilitate such
placements, \tikzname\ allows you to specify that a certain node should be
@@ -1928,7 +1928,7 @@ explicitly by using the |pos| option or implicitly by placing the node
\end{key}
\begin{key}{/tikz/auto=\opt{\meta{direction}} (default \normalfont is scope's setting)}
- This option causes an anchor positions to be calculated automatically
+ This option causes an anchor position to be calculated automatically
according to the following rule. Consider a line between two points. If the
\meta{direction} is |left|, then the anchor is chosen such that the node is
to the left of this line. If the \meta{direction} is |right|, then the node
@@ -2387,7 +2387,7 @@ following library, you get access to an even more concise syntax:
Let us start with the basics of what this library does: Once loaded, inside the
options of a |node| command, instead of the usual \meta{key}|=|\meta{value}
-pairs, you may also provide strings of the following form (the actual syntax
+pairs, you may also provide strings of the following form (the actual syntax is
slightly more general, see the detailed descriptions later on):
%
\begin{quote}
@@ -2435,7 +2435,7 @@ options in curly braces:
\end{tikzpicture}
\end{codeexample}
-Let us now have a more detailed look at what which commands this library
+Let us now have a more detailed look at what commands this library
provides:
\begin{key}{/tikz/quotes mean label}
diff --git a/graphics/pgf/base/doc/text-en/plots/pgf-asymptotic-example.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgf-asymptotic-example.gnuplot
index 4c854afda9..fca2b3fd23 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgf-asymptotic-example.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgf-asymptotic-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-asymptotic-example.table"; set format "%.5f"
+set table "plots/pgf-asymptotic-example.table"; set format "%.5f"
set samples 200; set parametric; plot [t=0.4:1.5] (t*t*t)*sin(1/(t*t*t)),(t*t*t)*cos(1/(t*t*t))
diff --git a/graphics/pgf/base/doc/text-en/plots/pgf-exp.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgf-exp.gnuplot
index 1d34e313af..8109ea408c 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgf-exp.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgf-exp.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-exp.table"; set format "%.5f"
+set table "plots/pgf-exp.table"; set format "%.5f"
set samples 25; plot [x=0:4] 0.05*exp(x)
diff --git a/graphics/pgf/base/doc/text-en/plots/pgf-parametric-example.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgf-parametric-example.gnuplot
index e1c3f3b52f..2c366fe529 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgf-parametric-example.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgf-parametric-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-parametric-example.table"; set format "%.5f"
+set table "plots/pgf-parametric-example.table"; set format "%.5f"
set samples 25; set parametric; plot [t=-3.141:3.141] t*sin(t),t*cos(t)
diff --git a/graphics/pgf/base/doc/text-en/plots/pgf-sin.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgf-sin.gnuplot
index 884d534bf4..48df575630 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgf-sin.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgf-sin.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-sin.table"; set format "%.5f"
+set table "plots/pgf-sin.table"; set format "%.5f"
set samples 25; plot [x=0:4] sin(x)
diff --git a/graphics/pgf/base/doc/text-en/plots/pgf-x.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgf-x.gnuplot
index bb95994cd8..0e57c0571a 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgf-x.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgf-x.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-x.table"; set format "%.5f"
+set table "plots/pgf-x.table"; set format "%.5f"
set samples 25; plot [x=0:4] x
diff --git a/graphics/pgf/base/doc/text-en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/text-en/plots/pgfplotgnuplot-example.gnuplot b/graphics/pgf/base/doc/text-en/plots/pgfplotgnuplot-example.gnuplot
index 3bd81ae92d..ebac36dd23 100644
--- a/graphics/pgf/base/doc/text-en/plots/pgfplotgnuplot-example.gnuplot
+++ b/graphics/pgf/base/doc/text-en/plots/pgfplotgnuplot-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgfplotgnuplot-example.table"; set format "%.5f"
+set table "plots/pgfplotgnuplot-example.table"; set format "%.5f"
plot [x=0:3.5] x*sin(x)
diff --git a/graphics/pgf/base/doc/version-for-dvipdfm/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-dvipdfm/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-dvipdfm/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-dvipdfm/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-dvipdfmx/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-dvipdfmx/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-dvipdfmx/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-dvipdfmx/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-dvips/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-dvips/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-dvips/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-dvips/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-pdftex/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-pdftex/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-pdftex/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-pdftex/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-asymptotic-example.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-asymptotic-example.gnuplot
index 4c854afda9..fca2b3fd23 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-asymptotic-example.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-asymptotic-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-asymptotic-example.table"; set format "%.5f"
+set table "plots/pgf-asymptotic-example.table"; set format "%.5f"
set samples 200; set parametric; plot [t=0.4:1.5] (t*t*t)*sin(1/(t*t*t)),(t*t*t)*cos(1/(t*t*t))
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-exp.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-exp.gnuplot
index 1d34e313af..8109ea408c 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-exp.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-exp.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-exp.table"; set format "%.5f"
+set table "plots/pgf-exp.table"; set format "%.5f"
set samples 25; plot [x=0:4] 0.05*exp(x)
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-parametric-example.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-parametric-example.gnuplot
index e1c3f3b52f..2c366fe529 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-parametric-example.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-parametric-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-parametric-example.table"; set format "%.5f"
+set table "plots/pgf-parametric-example.table"; set format "%.5f"
set samples 25; set parametric; plot [t=-3.141:3.141] t*sin(t),t*cos(t)
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-sin.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-sin.gnuplot
index 884d534bf4..48df575630 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-sin.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-sin.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-sin.table"; set format "%.5f"
+set table "plots/pgf-sin.table"; set format "%.5f"
set samples 25; plot [x=0:4] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-x.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-x.gnuplot
index bb95994cd8..0e57c0571a 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-x.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgf-x.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-x.table"; set format "%.5f"
+set table "plots/pgf-x.table"; set format "%.5f"
set samples 25; plot [x=0:4] x
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfplotgnuplot-example.gnuplot b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfplotgnuplot-example.gnuplot
index 3bd81ae92d..ebac36dd23 100644
--- a/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfplotgnuplot-example.gnuplot
+++ b/graphics/pgf/base/doc/version-for-tex4ht/en/plots/pgfplotgnuplot-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgfplotgnuplot-example.table"; set format "%.5f"
+set table "plots/pgfplotgnuplot-example.table"; set format "%.5f"
plot [x=0:3.5] x*sin(x)
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-asymptotic-example.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-asymptotic-example.gnuplot
index 4c854afda9..fca2b3fd23 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-asymptotic-example.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-asymptotic-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-asymptotic-example.table"; set format "%.5f"
+set table "plots/pgf-asymptotic-example.table"; set format "%.5f"
set samples 200; set parametric; plot [t=0.4:1.5] (t*t*t)*sin(1/(t*t*t)),(t*t*t)*cos(1/(t*t*t))
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-exp.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-exp.gnuplot
index 1d34e313af..8109ea408c 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-exp.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-exp.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-exp.table"; set format "%.5f"
+set table "plots/pgf-exp.table"; set format "%.5f"
set samples 25; plot [x=0:4] 0.05*exp(x)
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-parametric-example.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-parametric-example.gnuplot
index e1c3f3b52f..2c366fe529 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-parametric-example.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-parametric-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-parametric-example.table"; set format "%.5f"
+set table "plots/pgf-parametric-example.table"; set format "%.5f"
set samples 25; set parametric; plot [t=-3.141:3.141] t*sin(t),t*cos(t)
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-sin.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-sin.gnuplot
index 884d534bf4..48df575630 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-sin.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-sin.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-sin.table"; set format "%.5f"
+set table "plots/pgf-sin.table"; set format "%.5f"
set samples 25; plot [x=0:4] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-x.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-x.gnuplot
index bb95994cd8..0e57c0571a 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-x.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgf-x.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgf-x.table"; set format "%.5f"
+set table "plots/pgf-x.table"; set format "%.5f"
set samples 25; plot [x=0:4] x
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfplotgnuplot-example.gnuplot b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfplotgnuplot-example.gnuplot
index 3bd81ae92d..ebac36dd23 100644
--- a/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfplotgnuplot-example.gnuplot
+++ b/graphics/pgf/base/doc/version-for-vtex/en/plots/pgfplotgnuplot-example.gnuplot
@@ -1,2 +1,2 @@
-set terminal table; set output "plots/pgfplotgnuplot-example.table"; set format "%.5f"
+set table "plots/pgfplotgnuplot-example.table"; set format "%.5f"
plot [x=0:3.5] x*sin(x)
diff --git a/graphics/pgf/base/doc/version-for-xetex/en/plots/pgfmanual-sine.gnuplot b/graphics/pgf/base/doc/version-for-xetex/en/plots/pgfmanual-sine.gnuplot
index 8e3f24b917..cff802be0a 100644
--- a/graphics/pgf/base/doc/version-for-xetex/en/plots/pgfmanual-sine.gnuplot
+++ b/graphics/pgf/base/doc/version-for-xetex/en/plots/pgfmanual-sine.gnuplot
@@ -1,5 +1,4 @@
-set terminal table
-set output "pgfmanual-sine.table"
+set table "pgfmanual-sine.table"
set format "%.5f"
set samples 20
plot [x=0:10] sin(x)
diff --git a/graphics/pgf/base/lua/graphdrawing/pgf/gd/force/ControlSprings.lua b/graphics/pgf/base/lua/graphdrawing/pgf/gd/force/ControlSprings.lua
index 71005d8527..9b0c1071e3 100644
--- a/graphics/pgf/base/lua/graphdrawing/pgf/gd/force/ControlSprings.lua
+++ b/graphics/pgf/base/lua/graphdrawing/pgf/gd/force/ControlSprings.lua
@@ -26,14 +26,14 @@ local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
-- The following examples shows how a simple graph can be scaled by
-- changing the |node distance|:
-- %
--- \begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing}
+-- \begin{codeexample}[preamble={\usetikzlibrary{graphs.standard,graphdrawing}
-- \usegdlibrary{force}}]
-- \tikz \graph [spring layout, node distance=7mm] { subgraph C_n[n=3] };
-- \tikz \graph [spring layout] { subgraph C_n[n=3] };
-- \tikz \graph [spring layout, node distance=15mm]{ subgraph C_n[n=3] };
-- \end{codeexample}
-- %
--- \begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing}
+-- \begin{codeexample}[preamble={\usetikzlibrary{graphs.standard,graphdrawing}
-- \usegdlibrary{force}}]
-- \tikz \graph [spring electrical layout, node distance=0.7cm] { subgraph C_n[n=3] };
-- \tikz \graph [spring electrical layout] { subgraph C_n[n=3] };
diff --git a/graphics/pgf/base/tex/pgf.revision.tex b/graphics/pgf/base/tex/pgf.revision.tex
index 081613923a..a03cfbb945 100644
--- a/graphics/pgf/base/tex/pgf.revision.tex
+++ b/graphics/pgf/base/tex/pgf.revision.tex
@@ -5,10 +5,10 @@
\catcode`\:=12
\catcode`\+=12
\catcode`\-=12
-\gdef\pgfrevision{3.1.7a}
-\gdef\pgfversion{3.1.7a}
-\gdef\pgfversiondatetime{2020-12-01 12:12:01 +0100}
-\gdef\pgfrevisiondatetime{2020-12-01 12:12:01 +0100}
+\gdef\pgfrevision{3.1.8}
+\gdef\pgfversion{3.1.8}
+\gdef\pgfversiondatetime{2020-12-25 18:12:40 +0100}
+\gdef\pgfrevisiondatetime{2020-12-25 18:12:40 +0100}
\gdef\pgf@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3}
\xdef\pgfversiondate{\expandafter\pgf@glob@TMPa\pgfversiondatetime\relax}
\xdef\pgfrevisiondate{\expandafter\pgf@glob@TMPa\pgfrevisiondatetime\relax}
diff --git a/graphics/pgf/base/tex/pgflibraryfpu.code.tex b/graphics/pgf/base/tex/pgflibraryfpu.code.tex
index 01cbab40f9..a93fa7f90a 100644
--- a/graphics/pgf/base/tex/pgflibraryfpu.code.tex
+++ b/graphics/pgf/base/tex/pgflibraryfpu.code.tex
@@ -89,8 +89,6 @@
},
fpu/rel thresh=1e-4,
fpu/install only/.code={
- \pgfmath@warning{The key `/pgf/fpu/install only' is experimental and might %
- change or disappear at any point!}%
\edef\pgf@list{#1}%
\pgfutil@for\pgf@temp:=\pgf@list\do{%
\expandafter\pgfmath@float@install@singlefunction\expandafter{%
diff --git a/graphics/pgf/base/tex/pgfmathfunctions.random.code.tex b/graphics/pgf/base/tex/pgfmathfunctions.random.code.tex
index 66bdd72b71..da20ce024f 100644
--- a/graphics/pgf/base/tex/pgfmathfunctions.random.code.tex
+++ b/graphics/pgf/base/tex/pgfmathfunctions.random.code.tex
@@ -185,10 +185,11 @@
\c@pgfmath@countc\c@pgfmath@countb%
% OK. Maybe #2 > #3.
\ifnum\c@pgfmath@counta>\c@pgfmath@countb\relax%
- \c@pgfmath@countc\c@pgfmath@countb%
- \c@pgfmath@countb\c@pgfmath@counta%
- \c@pgfmath@counta\c@pgfmath@countc%
+ \c@pgfmath@countc\c@pgfmath@counta%
+ \c@pgfmath@counta\c@pgfmath@countb%
+ \c@pgfmath@countb\c@pgfmath@countc%
\fi%
+ \c@pgfmath@countd\c@pgfmath@counta
\advance\c@pgfmath@countc1\relax%
\advance\c@pgfmath@countc-\c@pgfmath@counta%
\pgfmathgeneratepseudorandomnumber%
@@ -197,7 +198,7 @@
\divide\c@pgfmath@countb\c@pgfmath@countc%
\multiply\c@pgfmath@countb-\c@pgfmath@countc%
\advance\c@pgfmath@counta\c@pgfmath@countb%
- \pgfmathaddtocount\c@pgfmath@counta{#2}%
+ \advance\c@pgfmath@counta\c@pgfmath@countd
\edef\pgfmathresult{\the\c@pgfmath@counta}%
\pgfmath@smuggleone{\pgfmathresult}%
\endgroup%
@@ -209,7 +210,7 @@
% Create a list to be used with \pgfmathrandomelement.
%
% #1 - the name of the list
-% #2 - a list of comma separated elements.
+% #2 - a list of elements (e.g., {item-1}{item-2}...{item-n}).
%
\def\pgfmathdeclarerandomlist#1#2{%
\def\pgfmath@randomlistname{#1}%
diff --git a/graphics/pgf/base/tex/tikz.code.tex b/graphics/pgf/base/tex/tikz.code.tex
index 70f8da088e..477418b716 100644
--- a/graphics/pgf/base/tex/tikz.code.tex
+++ b/graphics/pgf/base/tex/tikz.code.tex
@@ -2120,10 +2120,15 @@
\else%
\tikz@invoke@collected@onpath%
\fi%
- \afterassignment\tikz@handle\let\pgf@let@token=%
+ \tikz@scan@@next@command
}%
+\def\tikz@scan@@next@command{%
+ \afterassignment\tikz@handle\let\pgf@let@token=%
+}
+
\newcount\tikz@expandcount
\let\tikz@collected@onpath=\pgfutil@empty%
+\edef\tikz@frozen@relax@token{\ifnum0=0\fi}
% Central dispatcher for commands
\def\tikz@handle{%
@@ -2224,7 +2229,7 @@
\ifx\pgf@let@token:%
\let\pgfutil@next=\tikz@colon@char%
\else%
- \let\pgfutil@next=\tikz@expand%
+ \let\pgfutil@next=\tikz@handle@evenmore
\fi%
\fi%
\fi%
@@ -2240,10 +2245,26 @@
\fi%
\fi%
\fi%
- \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi%
\pgfutil@next%
}%
+% Continued...
+\def\tikz@handle@evenmore{%
+ % if \pgf@let@token is \relax or frozen \relax, skip it and
+ % scan from the next token
+ \ifx\pgf@let@token\relax
+ \let\pgfutil@next=\tikz@scan@@next@command
+ \else
+ \ifx\pgf@let@token\tikz@frozen@relax@token
+ \let\pgfutil@next=\tikz@scan@@next@command
+ \else
+ \let\pgfutil@next=\tikz@expand
+ \fi
+ \fi
+ \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi
+ \pgfutil@next
+}
+
\def\tikz@l@char{%
\pgfutil@ifnextchar e{\tikz@let@command}{%
\pgfutil@ifnextchar i{\tikz@lsystem}{%
@@ -2566,7 +2587,7 @@
\def\tikz@skip#1{\tikz@scan@next@command#1}%
\def\tikz@expand{%
- \advance\tikz@expandcount by -1%
+ \advance\tikz@expandcount by -1
\ifnum\tikz@expandcount<0\relax%
\tikzerror{Giving up on this path. Did you forget a semicolon?}%
\let\pgfutil@next=\tikz@finish%
@@ -2939,7 +2960,7 @@
% -| <point>
\def\tikz@hv@lineto{%
- \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{
+ \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{%
\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@hv@lineto}%
{\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@hv@lineto}%
{\tikz@scan@one@point{\tikz@@hv@lineto}}}}}%
@@ -3159,6 +3180,7 @@
\pgf@stop%
\expandafter\tikz@scan@next@command\expandafter%
}\tikz@after@path%
+ \pgfextra{\tikz@updatenexttrue\tikz@updatecurrenttrue}%
}%
@@ -3204,13 +3226,13 @@
\let\tikz@collected@onpath=\pgfutil@empty%
\tikz@edgetoparentcollect%
}%
-\def\tikz@edgetoparentcollect{
+\def\tikz@edgetoparentcollect{%
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@edgetoparentcollect}%
{%
\expandafter%
\endgroup%
\expandafter\tikz@edgetoparent@rollout\expandafter{\tikz@collected@onpath}%
- }
+ }%
}%
\def\tikz@edgetoparent@rollout#1{%
@@ -3262,7 +3284,9 @@
\else%
\tikzerror{Dot expected}%
\fi%
- \tikz@updatecurrenttrue%
+ \iftikz@updatenext
+ \tikz@updatecurrenttrue%
+ \fi
\tikz@curveCcheck%
}%
\def\tikz@curveCcheck{%
@@ -3840,7 +3864,7 @@
% A label text always ``ends'' the node.
%
\def\tikz@fig ode{%
- \pgfutil@ifnextchar a\tikz@test@also{
+ \pgfutil@ifnextchar a\tikz@test@also{%
\pgfutil@ifnextchar f{\tikz@nodes@start}\tikz@normal@fig}}%
\def\tikz@test@also a{\pgfutil@ifnextchar l\tikz@node@also{\tikz@normal@fig a}}%
\def\tikz@normal@fig{%
@@ -5221,11 +5245,15 @@
\tikz@lastxsaved=\pgf@x\relax%
\tikz@lastysaved=\pgf@y\relax%
\fi%
- \tikz@updatecurrenttrue%
+ \iftikz@updatenext
+ \tikz@updatecurrenttrue%
+ \fi
}%
\newif\iftikz@updatecurrent
\tikz@updatecurrenttrue
+\newif\iftikz@updatenext
+\tikz@updatenexttrue
@@ -5240,7 +5268,7 @@
\def\tikz@scan@absolute#1{%
\pgfutil@ifnextchar({\tikz@scan@@absolute#1}%)
{%
- \advance\tikz@expandcount by -1%
+ \advance\tikz@expandcount by -1
\ifnum\tikz@expandcount<0\relax%
\let\pgfutil@next=\tikz@@scangiveup%
\else%
diff --git a/graphics/pgf/base/tex/tikzlibrarycalendar.code.tex b/graphics/pgf/base/tex/tikzlibrarycalendar.code.tex
index 3ade8fa1cc..73a47f6574 100644
--- a/graphics/pgf/base/tex/tikzlibrarycalendar.code.tex
+++ b/graphics/pgf/base/tex/tikzlibrarycalendar.code.tex
@@ -393,7 +393,7 @@ execute before day scope={\ifdate{day of month=1}{%
\pgfutil@next%
}
\def\tikz@lib@cal@expand{%
- \advance\tikz@expandcount by -1%
+ \advance\tikz@expandcount by -1
\ifnum\tikz@expandcount<0\relax%
\tikzerror{Giving up on this calendar}%
\let\pgfutil@next=\tikz@lib@cal@end%
diff --git a/graphics/pgf/base/tex/tikzlibrarytopaths.code.tex b/graphics/pgf/base/tex/tikzlibrarytopaths.code.tex
index 36df6b69ef..ecf850ab40 100644
--- a/graphics/pgf/base/tex/tikzlibrarytopaths.code.tex
+++ b/graphics/pgf/base/tex/tikzlibrarytopaths.code.tex
@@ -135,6 +135,7 @@
[every curve to]
\pgfextra{\iftikz@to@relative\tikz@to@compute@relative\else\tikz@to@compute\fi}
\tikz@computed@path
+ \pgfextra{\tikz@updatenexttrue\tikz@updatecurrenttrue}%
\tikztonodes%
}
@@ -166,6 +167,9 @@
\def\tikz@first@point{#1}%
\tikz@scan@one@point\tikz@@@to@compute@distance(\tikz@toto)}
\def\tikz@@@to@compute@distance#1{%
+ \iftikz@updatecurrent\else
+ \tikz@updatenextfalse
+ \fi
\def\tikz@second@point{#1}%
\tikz@to@compute@distance@main%
}
diff --git a/graphics/pgf/contrib/puyotikz/LICENSE b/graphics/pgf/contrib/puyotikz/LICENSE
new file mode 100644
index 0000000000..9b34d0a63e
--- /dev/null
+++ b/graphics/pgf/contrib/puyotikz/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 amosborne
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/graphics/pgf/contrib/puyotikz/README.md b/graphics/pgf/contrib/puyotikz/README.md
new file mode 100644
index 0000000000..70097df553
--- /dev/null
+++ b/graphics/pgf/contrib/puyotikz/README.md
@@ -0,0 +1,21 @@
+# PuyoTikZ
+
+A LaTeX package for quickly typesetting board states of Puyo Puyo games.
+
+Supports large and small boards with arbitrary shape, hidden rows, current and next puyos, labels and move planning markers. Source code available for download on [GitHub](https://github.com/amosborne/puyotikz) or your favorite TeX repository. Package requires [Python3](https://www.python.org/) in support of scripts driven by [PythonTeX](https://github.com/gpoore/pythontex).
+
+Please see the PuyoTikZ documentation for more details on usage, installation, and known limitations.
+
+Created by [terramyst](https://twitter.com/terramyst1).
+
+MIT License.
+
+```tex
+% Example usage.
+\begin{puyotikz}[\puyosmallscale]
+ \puyoboard{rg/rgr/br/g}{rr/rb/gg}
+ \puyomarker{e1rA/e2rA/f1bB/f2rB}
+\end{puyotikz}
+
+\puyogrid[nrows=4, ncols=4]{bbb/rrrb/gggr/yyyg}
+```
diff --git a/graphics/pgf/contrib/puyotikz/puyotikz.pdf b/graphics/pgf/contrib/puyotikz/puyotikz.pdf
new file mode 100644
index 0000000000..fa85e61007
--- /dev/null
+++ b/graphics/pgf/contrib/puyotikz/puyotikz.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/puyotikz/puyotikz.py b/graphics/pgf/contrib/puyotikz/puyotikz.py
new file mode 100644
index 0000000000..66f536b4ca
--- /dev/null
+++ b/graphics/pgf/contrib/puyotikz/puyotikz.py
@@ -0,0 +1,294 @@
+# PuyoTikZ package for LaTeX.
+# Created by amosborne (GitHub) / terramyst (Twitter).
+# MIT License
+
+import numpy as np
+import itertools
+import string
+import re
+
+
+# Wraps a function which returns a string. Prints the result with a ";".
+def print_tikz(func):
+ def wrapper(*args, **kwargs):
+ print(func(*args, **kwargs) + ";")
+
+ return wrapper
+
+
+PUYO_RADIUS, PUYO_JOIN = 0.45, 0.25
+COLORS = {
+ "r": "red",
+ "y": "yellow",
+ "g": "green",
+ "b": "blue",
+ "p": "purple",
+ "n": "gray",
+}
+for key, value in COLORS.items():
+ COLORS[key] = value + "puyo"
+
+
+def puyoboard(cols, rows, hrows, boardpuyos, nextpuyos, label):
+ if not cols > 0:
+ raise UserWarning("{0} columns must be atleast 1.".format(cols))
+ if not rows > 0:
+ raise UserWarning("{0} rows must be atleast 1.".format(rows))
+ if hrows < 0:
+ raise UserWarning("{0} hidden rows must be atleast 0.".format(hrows))
+
+ draw_board(cols, rows, hrows, boardpuyos)
+ draw_nextpuyos(cols, rows, nextpuyos)
+ if label:
+ draw_labels(cols, rows, hrows, nextpuyos)
+
+
+def puyomarker(config):
+ pattern = "^([a-z]+)(\d+)([rygbpn])([A-Z])$"
+
+ @print_tikz
+ def singlemark(subconfig):
+ match = re.search(pattern, subconfig)
+ if match is None:
+ raise UserWarning("Bad puyo marker format string.")
+ else:
+ colid, rowid, puyo, lid = match.groups()
+
+ rowidx = int(rowid) - 1
+ colidx = next(
+ idx for idx, x in enumerate(excel_cols(upper=False)) if x == colid
+ )
+ pos = colidx + 0.5, rowidx + 0.5
+
+ tikz = "\\draw[{0},thick]".format("dark" + COLORS[puyo])
+ tikz += " ({0},{1}) circle ({2});".format(*pos, PUYO_RADIUS)
+ tikz += " \\node[anchor=center, font=\sffamily]"
+ tikz += " at ({0},{1}) {{\\small {2}}}".format(*pos, lid)
+ return tikz
+
+ subconfigs = config.split("/")
+ if subconfigs == [""]:
+ return
+ else:
+ for subconfig in subconfigs:
+ singlemark(subconfig)
+
+
+def draw_board(cols, rows, hrows, boardpuyos):
+ # draw the board grid
+ draw_grid(params=["gray", "ultra thin"], size=(cols, rows))
+ draw_grid(
+ params=["gray", "ultra thin", "line cap=round"],
+ origin=(0, rows),
+ size=(cols, hrows),
+ )
+ draw_grid(
+ params=["black", "line cap=round"], stepsize=(cols, rows), size=(cols, rows)
+ )
+
+ # draw the puyos on the board
+ draw_puyos(puyos=boardpuyos.split("/"), size=(cols, rows), nhidden=hrows)
+
+
+def draw_nextpuyos(cols, rows, nextpuyos):
+ nextpuyos = nextpuyos.split("/")
+ if nextpuyos == [""]:
+ return
+ for idx, puyos in enumerate(nextpuyos):
+ if not len(puyos) == 2:
+ raise UserWarning("Next puyos must be of length 2.")
+ draw_puyos(
+ puyos=[puyos], origin=(cols + 0.75, rows - 1.5 - 3 * idx), size=(1, 2)
+ )
+
+
+def draw_labels(cols, rows, hrows, nextpuyos):
+ @print_tikz
+ def draw_label(pos, text, size="\\normalsize", style="\\rmfamily"):
+ return "\\node[anchor=mid, font={4}] at ({0},{1}) {{{3} {2}}}".format(
+ *pos, text, size, style
+ )
+
+ for idx in range(0, rows + hrows):
+ draw_label((-0.5, 0.5 + idx), idx + 1)
+
+ for idx, label in zip(range(0, cols), excel_cols(upper=False)):
+ draw_label((0.5 + idx, -0.5), label)
+
+ nextpuyoscount = len(nextpuyos.split("/"))
+ if nextpuyos.split("/") == [""]:
+ return
+ for idx, label in zip(range(0, nextpuyoscount), excel_cols(upper=True)):
+ draw_label((cols + 0.75, rows - 1.5 - 3 * idx), label, "\\small", "\\sffamily")
+
+
+@print_tikz
+def draw_grid(params=[], origin=(0, 0), stepsize=(1, 1), size=(6, 12)):
+ extent = tuple([x + y for x, y in zip(origin, size)])
+ tikz = "\\draw"
+ tikz += "[" + ",".join(params) + "]"
+ tikz += " ({0},{1})".format(*origin)
+ tikz += " grid [xstep={0},ystep={1}]".format(*stepsize)
+ tikz += " ({0},{1})".format(*extent)
+ return tikz
+
+
+def draw_puyos(puyos=[], origin=(0, 0), size=(6, 12), nhidden=0):
+ # construct a 2D matrix of strings (representing puyos)
+ board = np.full((size[0], size[1] + nhidden), "")
+ for ridx, col in enumerate(puyos):
+ for cidx, puyo in enumerate(list(col)):
+ if puyo not in COLORS.keys():
+ raise UserWarning(
+ "{0} is not a valid puyo identifier (rygbpn).".format(puyo)
+ )
+ try:
+ board[ridx, cidx] = puyo
+ except IndexError:
+ raise UserWarning("Puyo layout string has too many rows or columns.")
+
+ # helper function for converting true position
+ def true_pos(pos):
+ return tuple([x + y + 0.5 for x, y in zip(pos, origin)])
+
+ # draw all the puyo circles
+ for pos, puyo in np.ndenumerate(board):
+ if puyo:
+ draw_puyo(true_pos(pos), puyo)
+
+ # connect to adjacent puyos (except nuisance and hidden row)
+ for pos, puyo in np.ndenumerate(board):
+ for direc in {(1, 0), (-1, 0), (0, 1), (0, -1)}:
+ if not 0 <= pos[0] + direc[0] < board.shape[0]:
+ continue
+ elif not 0 <= pos[1] + direc[1] < board.shape[1] - nhidden:
+ continue
+ elif not 0 <= pos[1] < board.shape[1] - nhidden:
+ continue
+
+ other = board[pos[0] + direc[0], pos[1] + direc[1]]
+ if puyo and other == puyo and puyo != "n":
+ connect_puyo(true_pos(pos), direc, puyo)
+
+ # draw all the puyo faces
+ for pos, puyo in np.ndenumerate(board):
+ if puyo:
+ draw_face(true_pos(pos), puyo)
+
+ # outline the puyos with a darker color
+ for pos, puyo in np.ndenumerate(board):
+ for direc in {(1, 0), (-1, 0), (0, 1), (0, -1)}:
+ if not 0 <= pos[0] + direc[0] < board.shape[0]:
+ if puyo:
+ outline_puyo(true_pos(pos), direc, puyo, join=False)
+ continue
+ elif not 0 <= pos[1] + direc[1] < board.shape[1] - nhidden:
+ if puyo:
+ outline_puyo(true_pos(pos), direc, puyo, join=False)
+ continue
+ elif not 0 <= pos[1] < board.shape[1] - nhidden:
+ if puyo:
+ outline_puyo(true_pos(pos), direc, puyo, join=False)
+ continue
+
+ other = board[pos[0] + direc[0], pos[1] + direc[1]]
+ if puyo and other == puyo and puyo != "n":
+ outline_puyo(true_pos(pos), direc, puyo, join=True)
+ elif puyo:
+ outline_puyo(true_pos(pos), direc, puyo, join=False)
+
+
+@print_tikz
+def draw_face(pos=(0, 0), puyo="r"):
+ def tikz_shift(shift=(0, 0)):
+ total_shift = pos[0] + shift[0], pos[1] + shift[1]
+ return "[xshift={0}cm,yshift={1}cm]".format(*total_shift)
+
+ tikz = "\\draw[white,semithick]"
+ if puyo == "p":
+ tikz += " ({0}150:{1}) -- ({0}-30:{1});".format(tikz_shift(), PUYO_RADIUS)
+ elif puyo == "r":
+ tikz += " ({0}150:{1}) -- ({0}0,0) -- ({0}30:{1});".format(
+ tikz_shift(), PUYO_RADIUS
+ )
+ elif puyo == "g":
+ tikz += " ({0}-90:{1}) arc (-90:0:{1})".format(
+ tikz_shift((-PUYO_RADIUS, PUYO_RADIUS)), PUYO_RADIUS
+ )
+ tikz += " ({0}-90:{1}) arc (-90:-180:{1});".format(
+ tikz_shift((PUYO_RADIUS, PUYO_RADIUS)), PUYO_RADIUS
+ )
+ elif puyo == "b":
+ tikz += " ({0}180:{1}) -- ({0}90:{2}) -- ({0}0:{1});".format(
+ tikz_shift(), PUYO_RADIUS, PUYO_RADIUS * np.sin(np.deg2rad(30))
+ )
+ elif puyo == "y":
+ tikz += " ({0}150:{1}) -- ({0}30:{1});".format(tikz_shift(), PUYO_RADIUS)
+ elif puyo == "n":
+ tikz += " ({0}210:{1}) -- ({0}-30:{1});".format(tikz_shift(), PUYO_RADIUS)
+ else:
+ tikz = ""
+
+ return tikz
+
+
+@print_tikz
+def draw_puyo(pos=(0, 0), puyo="r"):
+ tikz = "\\draw[{0},fill={0}]".format(COLORS[puyo])
+ tikz += " ({0},{1}) circle ({2})".format(*pos, PUYO_RADIUS)
+ return tikz
+
+
+@print_tikz
+def connect_puyo(pos=(0, 0), direc=(1, 0), puyo="r"):
+ phi, join1, join2 = connect_puyo_params(pos, direc)
+ tikz = "\\draw[{0},fill={0}]".format(COLORS[puyo])
+ tikz += " ([xshift={0}cm,yshift={1}cm]".format(*pos)
+ tikz += "{0}:{2}) arc ({0}:{1}:{2})".format(phi - 45, phi + 45, PUYO_RADIUS)
+ tikz += " to[out={0},in={1}] ({2},{3})".format(phi - 45, phi - 180, *join1)
+ tikz += " -- ({0},{1})".format(*join2)
+ tikz += " to[out={0},in={1}] cycle".format(phi - 180, phi + 45)
+ return tikz
+
+
+@print_tikz
+def outline_puyo(pos=(0, 0), direc=(1, 0), puyo="r", join=False):
+ phi, join1, join2 = connect_puyo_params(pos, direc)
+ tikz = "\\draw[{0}]".format("dark" + COLORS[puyo])
+
+ if join:
+ tikz += " ([xshift={0}cm,yshift={1}cm]".format(*pos)
+ tikz += "{0}:{1})".format(phi + 45, PUYO_RADIUS)
+ tikz += " to[out={0},in={1}] ({2},{3})".format(phi - 45, phi - 180, *join1)
+ tikz += " ({0},{1})".format(*join2)
+ tikz += " to[out={0},in={1}]".format(phi - 180, phi + 45)
+ tikz += " ([xshift={0}cm,yshift={1}cm]".format(*pos)
+ tikz += "{0}:{1})".format(phi - 45, PUYO_RADIUS)
+ else:
+ tikz += " ([xshift={0}cm,yshift={1}cm]".format(*pos)
+ tikz += "{0}:{2}) arc ({0}:{1}:{2})".format(phi - 45, phi + 45, PUYO_RADIUS)
+
+ return tikz
+
+
+def connect_puyo_params(pos, direc):
+ """Determine the path angle and midpoint locations."""
+ phi = np.rad2deg(np.arctan2(direc[1], direc[0])) % 360
+ x, y1, y2 = 0.5, PUYO_JOIN, -PUYO_JOIN
+
+ c, s = np.cos(np.deg2rad(phi)), np.sin(np.deg2rad(-phi))
+ j = np.matrix([[c, s], [-s, c]])
+
+ def rotate_point(y):
+ m = np.dot(j, [x, y])
+ return float(m.T[0]) + pos[0], float(m.T[1]) + pos[1]
+
+ return phi, rotate_point(y1), rotate_point(y2)
+
+
+def excel_cols(upper=True):
+ n = 1
+ letters = string.ascii_uppercase if upper else string.ascii_lowercase
+ while True:
+ yield from ("".join(group) for group in itertools.product(letters, repeat=n))
+ n += 1
diff --git a/graphics/pgf/contrib/puyotikz/puyotikz.sty b/graphics/pgf/contrib/puyotikz/puyotikz.sty
new file mode 100644
index 0000000000..4a5c4dd200
--- /dev/null
+++ b/graphics/pgf/contrib/puyotikz/puyotikz.sty
@@ -0,0 +1,64 @@
+% PuyoTikZ package for LaTeX.
+% Created by amosborne (GitHub) / terramyst (Twitter).
+% MIT License
+
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{puyotikz}[2020/12/23 v1.0.0 PuyoTikZ]
+
+\RequirePackage{pythontex}
+\RequirePackage{tikz}
+\RequirePackage{keyval}
+
+\pyc{import puyotikz as puyo}
+
+\def\puyosmallscale{0.34}
+\def\puyobigscale{0.65}
+
+\newenvironment{puyotikz}[1][\puyobigscale]
+ {\begin{tikzpicture}[scale=#1, every node/.style={transform shape}]}
+ {\end{tikzpicture}}
+
+\define@key{puyoboard}{ncols}{\def\puyo@ncols{#1}}
+\define@key{puyoboard}{nrows}{\def\puyo@nrows{#1}}
+\define@key{puyoboard}{nhidrows}{\def\puyo@nhidrows{#1}}
+\define@key{puyoboard}{showlabels}{\def\puyo@showlabels{#1}}
+\setkeys{puyoboard}{ncols=6, nrows=12, nhidrows=1, showlabels=True}
+
+\setpythontexcontext{
+ ncols=\puyo@ncols,
+ nrows=\puyo@nrows,
+ nhidrows=\puyo@nhidrows,
+ showlabels=\puyo@showlabels
+}
+
+\newcommand{\puyoboard}[3][]{
+ \setkeys{puyoboard}{#1}
+ \pyc{puyo.puyoboard(cols=int(pytex.context.ncols), %
+ rows=int(pytex.context.nrows), %
+ hrows=int(pytex.context.nhidrows), %
+ boardpuyos="#2", %
+ nextpuyos="#3", %
+ label=pytex.context.showlabels=="True")}
+}
+
+\newcommand{\puyomarker}[1]{\pyc{puyo.puyomarker("#1")}}
+
+\newcommand{\puyogrid}[2][]{
+ \setkeys{puyoboard}{nhidrows=0, showlabels=False}
+ \begin{puyotikz}[\puyosmallscale]
+ \puyoboard[#1]{#2}{}
+ \end{puyotikz}
+}
+
+\newcommand{\puyocolor}[2]{
+ \definecolor{#1puyo}{RGB}{#2}
+ \colorlet{dark#1puyo}{#1puyo!80!black}
+}
+\puyocolor{red}{255,82,98}
+\puyocolor{green}{82,213,98}
+\puyocolor{blue}{32,115,213}
+\puyocolor{yellow}{255,220,24}
+\puyocolor{purple}{131,90,213}
+\puyocolor{gray}{180,172,189}
+
+\endinput
diff --git a/graphics/pgf/contrib/puyotikz/puyotikz.tex b/graphics/pgf/contrib/puyotikz/puyotikz.tex
new file mode 100644
index 0000000000..cb776a8c0b
--- /dev/null
+++ b/graphics/pgf/contrib/puyotikz/puyotikz.tex
@@ -0,0 +1,206 @@
+% PuyoTikZ package for LaTeX.
+% Created by amosborne (GitHub) / terramyst (Twitter).
+% MIT License
+
+\documentclass{article}
+\usepackage{puyotikz}
+\usepackage[hidelinks]{hyperref}
+\usepackage{xspace}
+\usepackage{ifmtarg}
+\usepackage{listings}
+\usepackage{graphicx}
+
+\lstset{basicstyle=\footnotesize\ttfamily,%
+ language=[LaTeX]{TeX},%
+ commentstyle=\color{darkpurplepuyo},%
+ tabsize=4
+}
+
+\newcommand{\latex}{\LaTeX\xspace}
+\newcommand{\tex}{\TeX\xspace}
+\newcommand{\parline}{\vspace{\baselineskip}}
+\newcommand{\parlineskip}{\par \parline}
+\newcommand{\link}[2]{\href{#1}{\color{darkbluepuyo}#2}}
+
+\newcommand{\code}[1]{{\small\texttt{#1}}}
+\newcommand{\cmd}[1]{{\small\textbackslash\texttt{#1}}}
+\newcommand{\codepar}[2]{\paragraph{\color{darkgreenpuyo}\code{#1} #2.}\mbox{}\par}
+
+\newcommand{\github}{\link{https://github.com/amosborne/puyotikz}{GitHub}\xspace}
+\newcommand{\python}{\link{https://www.python.org/download/releases/3.0/}{Python3}\xspace}
+\newcommand{\anaconda}{\link{https://www.anaconda.com/products/individual}{Anaconda}\xspace}
+\newcommand{\pypygments}{\link{https://pygments.org/}{Pygments}\xspace}
+\newcommand{\pynumpy}{\link{https://numpy.org/}{Numpy}\xspace}
+\newcommand{\pythontex}{\link{https://ctan.org/pkg/pythontex?lang=en}{Python\tex}\xspace}
+\newcommand{\tikzpgf}{\link{https://ctan.org/pkg/pgf?lang=en}{TikZ}\xspace}
+
+\makeatletter
+\newenvironment{halfpage}[1][]
+ {\noindent\begin{minipage}{0.5\textwidth}\@ifmtarg{#1}{}{\begin{center}\Huge#1\end{center}}}
+ {\end{minipage}}
+\makeatother
+
+\lstnewenvironment{puyolisting}{\parline}{\parline}
+
+\begin{document}
+
+\begin{halfpage}
+ \begin{puyotikz}
+ \puyoboard{rbbggppbgggbr/rbrngbpn/yrynbb/yybrrn/bbpryyn/pbppryn}{rr/gg/yr}
+ \puyomarker{f8rA/f9rA/d7gB/d8gB/e8yC/e9rC}
+ \end{puyotikz}
+\end{halfpage}%
+\begin{halfpage}[PuyoTikZ]
+ A \latex package for quickly typesetting board states of Puyo Puyo games.\parlineskip
+ Supports large and small boards with arbitrary shape, hidden rows, current and next puyos, labels and move planning markers.\parlineskip
+ Source code available for download on \github or your favorite \tex repository. Package requires \python in support of scripts driven by \pythontex.\parlineskip
+ Move planning markers shown at left. Tailing variations on the Great Tanaka Rensa (GTR) shown below.\parlineskip
+ Created by \link{https://twitter.com/terramyst1}{terramyst}.
+\end{halfpage}\\ \\
+
+\noindent\makebox[\textwidth][c]{%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/pbprg/prrgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrgg/pbrg/rrppg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbgg/pbprg/rrrpg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/pbrpg/rrgpg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/pbrgp/rggrp}%
+}\\
+
+\noindent\makebox[\textwidth][c]{%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/pbprg/rprgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/rbrpg/rppgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbgg/pbgrp/rrrpg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/rbpg/pbprg/rprgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/gbrg/pbrpg/rrppg}%
+}\\
+
+\noindent\makebox[\textwidth][c]{%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbpg/rbprg/rprgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbgg/pbrrg/rrppg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/gbpg/pbprg/rrrgp}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbbg/rggrp/rgrpp}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/rgb/pbgr/pbgrr/gbgpp}%
+}\\
+
+\noindent\makebox[\textwidth][c]{%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbpg/rbrpg/rrpgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/rbrpg/rppgg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/pbrg/pbprg/prggr}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/bbpg/ppgrg/rprrg}%
+ \puyogrid[nrows=6, ncols=6]{grr/grg/bgb/brgp/brrgp/rgppg}%
+}
+
+\section{Installation}
+\subsection{Python3 and PythonTeX}
+Installing this package should be straightforward through the user's \tex package manager. \python will additionally need to be installed; it is recommended to use a virtual environment management tool such as \anaconda. The Python environment will need packages \pypygments and \pynumpy installed.\par
+Compiling the document requires inserting a new command into the build sequence. \pythontex must run \code{pythontex.py} in between two separate runs of the \tex engine (see documentation for more detail).
+
+\section{Usage}
+This package provides an environment and three macros for typesetting Puyo Puyo boards for inclusion in \latex documents.
+
+\codepar{puyotikz}{environment}
+The \code{puyotikz} environment is simply a wrapper for the \code{tikzpicture} environment. The user is therefore able to use additional \tikzpgf macros inside this environment if they wish to augment whatever graphics are already provided by this package.\par
+The \code{puyotikz} environment takes a single numeric argument which is passed to the \code{tikzpicture} environment as the scaling parameter. This package provides two scaling parameter definitions for convenience, \cmd{puyosmallscale} and \cmd{puyobigscale} (the default).
+
+\begin{puyolisting}
+ % example usage
+ \begin{puyotikz}[\puyosmallscale]
+ % content...
+ \end{puyotikz}
+\end{puyolisting}
+
+For the traditional colors of red, yellow, green, blue, purple, and gray this package also provides new color definitions such as \code{bluepuyo} and \code{darkredpuyo}.
+
+\pagebreak
+\codepar{puyoboard}{macro}
+The \cmd{puyoboard} macro takes 2 arguments and 4 optional parameters and must be used inside the \code{puyotikz} environment.\par
+Puyos are specified in format strings by column (bottom-up, left-to-right). Each puyo is identified by a single letter (\code{r}, \code{y}, \code{g}, \code{b}, \code{p}, \code{n}). Columns (or next puyos) are separated by \code{/}. Columns are labeled numerically and rows and next puyos are labeled alphabetically (lowercase and uppercase, respectively).
+
+\begin{puyolisting}
+ % parameters
+ % - ncols: number of columns (default 6)
+ % - nrows: number of visible rows (default 12)
+ % - nhidrows: number of hidden rows (default 1)
+ % - showlabels: display coordinate labels (default True)
+
+ % arguments
+ % - #1: board format string
+ % - #2: next puyos format string
+
+ % example usage (see image below)
+ \begin{puyotikz}
+ \puyoboard[ncols=12, nrows=6, nhidrows=0]
+ {/rr/brbb/ggbg/rrg//yb/ggy}
+ {yy/yr}
+ \end{puyotikz}
+\end{puyolisting}
+
+\begin{center}
+ \begin{puyotikz}
+ \puyoboard[ncols=12, nrows=6, nhidrows=0]
+ {/rr/brbb/ggbg/rrg//yb/ggy}
+ {yy/yr}
+ \end{puyotikz}
+\end{center}
+
+\pagebreak
+\codepar{puyomarker}{macro}
+The \cmd{puyomarker} macro takes 1 argument and must be used inside the \code{puyotikz} environment following a \cmd{puyoboard} macro.
+
+Puyo markers are specified in a single format string, separated by \code{/}. A single marker is a concatenation of the row label (lowercase letter), column label (number), puyo color (lowercase letter) and puyo label (uppercase letter).
+
+\begin{puyolisting}
+ % arguments
+ % - #1: marker format string
+
+ % example usage (see image below)
+ \begin{puyotikz}
+ \puyoboard[ncols=12, nrows=6, nhidrows=0]
+ {/rr/brbb/ggbg/rrg//yb/ggy}
+ {yy/yr}
+ \puyomarker{a1yA/a2yA/b3yB/b4rB}
+ \end{puyotikz}
+\end{puyolisting}
+
+\begin{center}
+ \begin{puyotikz}
+ \puyoboard[ncols=12, nrows=6, nhidrows=0]
+ {/rr/brbb/ggbg/rrg//yb/ggy}
+ {yy/yr}
+ \puyomarker{a1yA/a2yA/b3yB/b4rB}
+ \end{puyotikz}
+\end{center}
+
+\pagebreak
+\codepar{puyogrid}{macro}
+The \cmd{puyogrid} macro is provided as an example derived from \cmd{puyoboard}. It assumes a \cmd{puyosmallscale} \code{puyotikz} environment and only provides a single argument for the board format string (assuming no next puyos and no markers). It also assumes zero hidden rows and turns off labeling, however any parameters available to set in \cmd{puyoboard} are also available in \cmd{puyogrid}.\par
+The user is encouraged to construct their own derived macros in similar fashion for their intended purpose.
+
+\begin{puyolisting}
+ % source code \puyogrid definition from puyotikz.sty
+ \newcommand{\puyogrid}[2][]{
+ \setkeys{puyoboard}{nhidrows=0, showlabels=False}
+ \begin{puyotikz}[\puyosmallscale]
+ \puyoboard[#1]{#2}{}
+ \end{puyotikz}
+ }
+
+ % example usage (see image below)
+ \puyogrid[nrows=4, ncols=10]
+ {rrr/yyyr/gggy/bbbg/pppb/rrrp/yyyr/gggy/bbbg/pppb}
+\end{puyolisting}
+
+\begin{center}
+ \puyogrid[nrows=4, ncols=10]{rrr/yyyr/gggy/bbbg/pppb/rrrp/yyyr/gggy/bbbg/pppb}
+\end{center}
+
+\section{Limitations}
+
+\subsection{TikZ}
+The graphics provided in this package are created using \tikzpgf. Having many graphics compiled in a single document will result in a long compilation time.\par
+It is recommended in this case to generate images in separately compiled standalone documents and include them in the main document via \cmd{includegraphics}. \pythontex is not compatible with \cmd{tikzexternalize}.
+
+\subsection{PythonTeX}
+The \pythontex documentation gives a warning which bears repeating: compiling a document that uses \pythontex involves executing Python code on your computer therefore you should only compile documents from sources you trust.
+
+\end{document}