summaryrefslogtreecommitdiff
path: root/graphics/pgf/base
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/base')
-rw-r--r--graphics/pgf/base/doc/ChangeLog108
-rw-r--r--graphics/pgf/base/doc/pgfmanual.pdfbin10571767 -> 10576905 bytes
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-base-arrows.tex8
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-base-nodes.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-dv-formats.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-dv-stylesheets.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-module-parser.tex55
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-pgffor.tex21
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex4
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-actions.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-arrows.tex4
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-graphs.tex4
-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-plots.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-shapes.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transformations.tex2
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex2
-rw-r--r--graphics/pgf/base/tex/pgf.revision.tex8
-rw-r--r--graphics/pgf/base/tex/pgffor.code.tex8
-rw-r--r--graphics/pgf/base/tex/pgfkeys.code.tex54
-rw-r--r--graphics/pgf/base/tex/pgflibraryshapes.geometric.code.tex2
-rw-r--r--graphics/pgf/base/tex/pgfmoduleshapes.code.tex2
-rw-r--r--graphics/pgf/base/tex/pgfsys-dvips.def20
-rw-r--r--graphics/pgf/base/tex/pgfsys-luatex.def8
-rw-r--r--graphics/pgf/base/tex/pgfutil-latex.def8
25 files changed, 252 insertions, 85 deletions
diff --git a/graphics/pgf/base/doc/ChangeLog b/graphics/pgf/base/doc/ChangeLog
index e609f0ec7d..58e8b3c429 100644
--- a/graphics/pgf/base/doc/ChangeLog
+++ b/graphics/pgf/base/doc/ChangeLog
@@ -1,3 +1,111 @@
+2020-11-21 Henri Menke
+
+ - Release 3.1.7
+
+2020-11-21 Henri Menke
+
+ - CI: Create release from tag
+
+2020-11-21 Henri Menke
+
+ - pgffor: new expand list option
+
+2020-11-06 Henri Menke
+
+ - Fix spurious spaces #946
+
+2020-11-03 Henri Menke
+
+ - Merge pull request #943 from agrahn/offpagefading
+
+2020-10-29 Alexander Grahn
+
+ - hiding smask in the PS viewer
+
+2020-10-24 Henri Menke
+
+ - Merge pull request #940 from Ordoviz/patch-1
+
+2020-10-24 Henri Menke
+
+ - Merge pull request #941 from Skillmon/improve-parser-doc
+
+2020-10-23 Jonathan Spratte
+
+ - macros are 'letters' for pgfparser as well
+
+2020-10-23 Jonathan Spratte
+
+ - fix comment in example code
+
+2020-10-23 Jonathan Spratte
+
+ - minor change to pgfparserletter
+
+2020-10-23 Jonathan Spratte
+
+ - minor change to pgfparserdefunknown
+
+2020-10-23 Jonathan Spratte
+
+ - minor change to pgfparserlet
+
+2020-10-23 Jonathan Spratte
+
+ - more info for pgfparserdef
+
+2020-10-23 Jonathan Spratte
+
+ - typos
+
+2020-10-19 Jonathan Spratte
+
+ - more precise pgfparserreinsert description
+
+2020-10-23 Lennard Hofmann
+
+ - [doc] Fix typo
+
+2020-10-12 Henri Menke
+
+ - Fix trailing else problem in pgfkeys
+
+2020-10-12 Henri Menke
+
+ - Merge branch 'pgfkeys-small-fixing' of https://github.com/muzimuzhi/pgf
+
+2020-10-12 Henri Menke
+
+ - Always place shadings in TLT in LuaTeX #934
+
+2020-10-11 Andras Deak
+
+ - DOC: typo fix in en-tikz-actions
+
+2020-10-11 muzimuzhi
+
+ - pgfkeys: fix spurious spaces in "/errors" keys
+
+2020-10-11 muzimuzhi
+
+ - pgfkeys: in "/.add code", ensure `/.@cmd` is long
+
+2020-10-04 Henri Menke
+
+ - Random shifts to fix output routine shenenigans #928
+
+2020-10-04 Henri Menke
+
+ - Revert "pgfkeys: make `.initial` compatible with `.code`, fix #654"
+
+2020-10-03 muzimuzhi
+
+ - doc: various minor fix
+
+2020-10-03 muzimuzhi
+
+ - doc: minor fix, #930
+
2020-10-01 Henri Menke
- Release 3.1.6a
diff --git a/graphics/pgf/base/doc/pgfmanual.pdf b/graphics/pgf/base/doc/pgfmanual.pdf
index e6d119603d..5e6f2a0212 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-arrows.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-arrows.tex
index daa5a45e79..5d81abf79d 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-arrows.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-arrows.tex
@@ -142,7 +142,7 @@ We will use the following terminology:
\item There is also a \emph{visual tip end}, the counterpart of the visual
back end for the front. In our case, the visual tip end and the tip end
obviously coincide, but if we were to reverse the arrow tip, the visual
- tip end would be different form the tip end (while the visual back end
+ tip end would be different from the tip end (while the visual back end
would then coincide with the new back end).
\item There are four points that make up the \emph{convex hull} of the
arrow tip: $(1,0)$, $(-3,2)$, and $(-3,-2)$.
@@ -258,7 +258,7 @@ fast arrow tip management.
This defines the name of the arrow tip. It is legal to define an
arrow tip a second time, in this case the previous definition will
be overwritten in the current \TeX\ scope. It is customary to use a
- name with an uppercase fist letter for a ``complete'' arrow tip
+ name with an uppercase first letter for a ``complete'' arrow tip
kind. Short names and lower case names should be used for
shorthands that change their meaning inside a document, while arrow
tips with uppercase first letters should not be redefined.
@@ -917,7 +917,7 @@ you need to make \pgfname\ ``aware'' of this using the following key:
\end{command}
\begin{command}{\pgfarrowslinewidthdependent\marg{dimension}\marg{line width factor}\marg{outer factor}}
- This command take three parameters and does the ``line width dependent
+ This command takes three parameters and does the ``line width dependent
computation'' described on page~\pageref{length-arrow-key} for the |length|
key. The result is returned in |\pgf@x|.
@@ -937,7 +937,7 @@ you need to make \pgfname\ ``aware'' of this using the following key:
\end{command}
\begin{command}{\pgfarrowslengthdependent\marg{dimension}\marg{length factor}\marg{dummy}}
- This command take three parameters, of which the last one is ignored, and
+ This command takes three parameters, of which the last one is ignored, and
does the ``length dependent computation'' described for the |width'| and
|inset'| keys. The result is returned in |\pgf@x|.
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-nodes.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-nodes.tex
index b1dfe59edb..29034d17cb 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-nodes.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-nodes.tex
@@ -171,7 +171,7 @@ must set up the box |\pgfnodepartXYZbox|. The box will be placed at the anchor
As can be seen, all coordinate transformations are also applied to the text
of the shape. Sometimes, it is desirable that the transformations are
applied to the point where the shape will be anchored, but you do not wish
- the shape itself to the transformed. In this case, you should call
+ the shape itself to be transformed. In this case, you should call
|\pgftransformresetnontranslations| prior to calling the |\pgfnode|
command.
%
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-formats.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-formats.tex
index ad7ddc0ad6..69468800d0 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-formats.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-formats.tex
@@ -71,7 +71,7 @@ point may span several lines, but deviating from this ``one data point per
line'' rule makes parsers harder to program.
-\subsection{Reference: Build-In Formats}
+\subsection{Reference: Built-In Formats}
The following format is the default format, when no |format=...| is specified.
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-stylesheets.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-stylesheets.tex
index 88d5f2bba6..98680aa335 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-stylesheets.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-dv-stylesheets.tex
@@ -781,7 +781,7 @@ data group {sin functions};
visualizer.
\end{stylesheet}
-\begin{stylesheet}{vary dashing and thickness}
+\begin{stylesheet}{vary thickness and dashing}
This style alternates between varying the thickness and the dashing of
lines. The difference to just using both the |vary thickness| and
|vary dashing| is that too thick lines are avoided. Instead, this style
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-module-parser.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-module-parser.tex
index 44bc571c4a..143bc16851 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-module-parser.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-module-parser.tex
@@ -39,7 +39,7 @@ optionally some code is executed afterwards.
The parser works as follows: At any moment, it is in a certain
\emph{state}, initially this state is called |initial|. Then, the first
- letter of the \meta{text} is examined (using the |\futurlet| command). For
+ letter of the \meta{text} is examined (using the |\futurelet| command). For
each possible state and each possible letter, some action code is stored in
the parser in a table. This code is then executed. This code may, but need
not, trigger a \emph{state switch}, causing a new state to be set. The
@@ -72,19 +72,27 @@ There are \the\mycount\ a's.
}%
This command should be used repeatedly to define a parser named
\meta{parser name}. With a call to this command you specify that the
- \meta{parser name} should do the following: When it is in state \meta{state}%
- and reads the letter \meta{symbol meaning}, perform the code stored in
- \meta{action}.
+ \meta{parser name} should do the following: When it is in state
+ \meta{state} and reads the letter \meta{symbol meaning}, perform the code
+ stored in \meta{action}.
The \meta{symbol meaning} must be the text that results from applying the
\TeX\ command |\meaning| to the given character. For instance, |\meaning a|
yields |the letter a|, while |\meaning 1| yields |the character 1|. A space
- yields |blank space|. Alternatively you can give the symbol you want without
+ yields |blank space |. Alternatively you can give the symbol you want without
surrounding it in braces. So both
|\pgfparserdef{myparser}{initial}{the letter a}{foo}|
and
|\pgfparserdef{myparser}{initial}a{foo}|
- define an \meta{action} for |the letter a|.
+ define an \meta{action} for |the letter a|. This short form works for most
+ tokens, but not for a space (in which case you can use
+ |\pgfparserdef{myparser}{initial}{blank space}{foo}|), and opening braces
+ (in which case you can use
+ |\pgfparserdef{myparser}{initial}{\meaning\bgroup}{foo}|, and one might prefer
+ to use |\pgfparserdef{myparser}{initial}{\meaning\egroup}{foo}| for closing
+ braces as well). You can as well define an action for a macro's meaning (note
+ that macros with different names can have the same meaning), so things like
+ |\pgfparserdef{myparser}{initial}\texttt{foo}| are possible as well.
The \meta{action} might require arguments which you can specify in the
optional \meta{arguments} string. The argument string can contain up to nine
@@ -142,7 +150,7 @@ There are \the\mycount\ a's.
goes back to the parser. You should not launch a parser inside the
\meta{action} code, unless you put it in a scope.
- When you set the \meta{state} to |all|, the state \meta{action} is performed
+ When you use |all| as the \meta{state}, the \meta{action} is performed
in all states as a fallback, whenever \meta{symbol meaning} is encountered.
This means that when you do not specify anything explicitly for a state and a
letter, but you do specify something for |all| and this letter, then the
@@ -151,7 +159,9 @@ There are \the\mycount\ a's.
When the parser encounters a letter for which nothing is specified in the
current state (neither directly nor indirectly via |all|), an error occurs.
Additionally you can specify an action that is executed after the error is
- thrown using |\pgfparserdefunknown|.
+ thrown using |\pgfparserdefunknown|. To suppress these errors (but not the
+ action specified with |\pgfparserdefunknown|) you can use the
+ |/pgfparser/silent| key or the |silent| key of the current \meta{parser name}.
\end{command}%
\begin{command}%
@@ -160,11 +170,11 @@ There are \the\mycount\ a's.
\marg{parser name 1}\marg{state 1}\meta{symbol meaning 1}%
\oarg{opt 1}\oarg{opt 2}\meta{symbol meaning 2}%
}%
- If none of the optional arguments are given in the following \meta{parser
- name 2} and \meta{state 2} are the same as \meta{parser name 1} and
- \meta{state 1}. If only the first is given \meta{state 2} equals
- \meta{opt 1}. If both are given \meta{parser name 2} equals \meta{opt 1} and
- \meta{state 2} equals \meta{opt 2}.
+ If none of the optional arguments are given in the following explanation
+ \meta{parser name 2} and \meta{state 2} are the same as
+ \meta{parser name 1} and \meta{state 1}. If only the first is given
+ \meta{state 2} equals \meta{opt 1}. If both are given \meta{parser name 2}
+ equals \meta{opt 1} and \meta{state 2} equals \meta{opt 2}.
Defines an action for \meta{parser name 1} in \meta{state 1} for the
\meta{symbol meaning 1} to do the same as the action of \meta{parser name 2}
@@ -176,7 +186,8 @@ There are \the\mycount\ a's.
\begin{command}{\pgfparserdefunknown\marg{parser name}\marg{state}\marg{action}}%
With this macro you can define an \meta{action} for the \meta{parser name}
- parser in \meta{state} if the letter which was encountered was undefined.
+ parser in \meta{state} if no action was defined for the letter which was
+ encountered.
\end{command}%
\begin{command}{\pgfparserdeffinal\marg{parser name}\marg{action}}%
@@ -200,9 +211,11 @@ There are \the\mycount\ a's.
\begin{command}{\pgfparserreinsert}%
You can use this as the final macro in an action of |\pgfparserdef| or
- |\pgfparserdefunknown|. This has the effect that the letter which was parsed
- in this action will be parsed again after this action (and after any arguments
- were read).
+ |\pgfparserdefunknown|. This has the effect that the contents of
+ |\pgfparserletter| will be parsed next. Without any redefinition the result
+ will be that the last token will be parsed again. You can change the
+ definition of |\pgfparserletter| just before |\pgfparserreinsert| as well to
+ parse some specific tokens next.
\end{command}%
\begin{command}{\pgfparserstate}%
@@ -220,9 +233,9 @@ There are \the\mycount\ a's.
|\def\pgfparserletter{a}|. This definition is done before any action code is
executed. There are four special cases: If the next token is of category code
1, 2, 6, or 10, so with standard category codes the tokens |{|, |}|, |#|, and
- \textvisiblespace\ (a space) would be treated differently. In those cases this
- macro expands to |\bgroup|, |\egroup|, |##|, and \textvisiblespace\ for the
- categories 1, 2, 6, and 10, respectively.
+ \textvisiblespace\ (a space), it would be treated differently. In those cases
+ this macro expands to |\bgroup|, |\egroup|, |##|, and \textvisiblespace\ for
+ the categories 1, 2, 6, and 10, respectively.
\end{command}%
\begin{command}{\pgfparserset\marg{key list}}%
@@ -285,7 +298,7 @@ Next we want to try something that uses some of the different argument types
available.
%
\begin{codeexample}[preamble={\usepgfmodule{parser}}]
-% using the same syntax as \pgfparserdef
+% using the long syntax of \pgfparserdef
\pgfparserdef{arguments}{initial}{the letter a}[d()]
{\pgfparserifmark{#1}{\textcolor{red}{\textit{use}}}{\textbf{#1}} }%
% using the shortcut syntax
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-pgffor.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-pgffor.tex
index 34f3aab738..94a41fbfe2 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-pgffor.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-pgffor.tex
@@ -372,6 +372,27 @@ This section describes the package |pgffor|, which is loaded automatically by
\end{codeexample}
%
\end{key}
+
+ \begin{key}{/pgf/foreach/expand list=\marg{boolean} (default false)}
+ If this key is set to true the contents of the list are fully expanded
+ with |\edef| before further processing. This allows using complex
+ macros which generate a list upon expansion without having to use an
+ intermediate macro.
+ %
+\begin{codeexample}[]
+\def\Iota#1#2{%
+ \ifnum\numexpr#1\relax<\numexpr#2\relax
+ \the\numexpr#1\relax,%
+ \expandafter\Iota\expandafter{\the\numexpr(#1)+1\relax}{#2}%
+ \else
+ \the\numexpr#2\relax
+ \fi}
+\foreach [expand list=true] \x in {\Iota{1}{5}} {
+ \x
+}
+\end{codeexample}
+ %
+ \end{key}
\end{command}
\begin{command}{\breakforeach}
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 2c22c1a952..8241da2c7e 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-pgfkeys.tex
@@ -402,7 +402,7 @@ In order to setup a special syntax handling for \meta{strings} that begin with
a certain character, two things need to be done:
%
\begin{enumerate}
- \item First, the whole first char syntax detection must be ``switched on'',
+ \item First, the whole |first char syntax| detection must be ``switched on'',
since, by default, it is turned off for efficiency reasons (the
overhead is rather small, however). This is done by setting the
following key:
@@ -1264,7 +1264,7 @@ directly stored in a key.
\end{handler}
\begin{handler}{{.add}|=|\marg{prefix value}\marg{append value}}
- Adds the \meta{prefix value} and the beginning and the \meta{append value}
+ Adds the \meta{prefix value} at the beginning and the \meta{append value}
at the end of the value stored in \meta{key}.
\end{handler}
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-actions.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-actions.tex
index 74c7882e51..2cd528bfa2 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-actions.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-actions.tex
@@ -620,7 +620,7 @@ For this to happen, a number of different things need to be specified:
Section~\ref{section-tikz-arrows}, to setup which kinds of arrow tips
you would like.
\item The path may not be closed (like a circle or a rectangle) and, if
- it consists of several subpath, further restrictions apply as
+ it consists of several subpaths, further restrictions apply as
explained in Section~\ref{section-tikz-arrows}.
\item The |tips| key must be set to an appropriate value, see
Section~\ref{section-tikz-arrows} once more.
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 e8da9f3b13..ced3a827fe 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
@@ -398,7 +398,7 @@ context:
to select this), the size of the arrow should still be the same
as in the first case (that is, as if a miter join were used).
This creates some ``visual consistency'' if the two modes are
- mixed or if you later one change the mode.
+ mixed or if you later want to change the mode.
%
\begin{codeexample}[preamble={\usetikzlibrary{arrows.meta}}]
\tikz{
@@ -417,7 +417,7 @@ context:
\begin{key}{/pgf/arrow keys/width=\meta{dimension}| |\opt{\meta{line width factor}}%
| |\opt{\meta{outer factor}}}
- This key works line the |length| key, only it specifies the ``width'' of
+ This key works like the |length| key, only it specifies the ``width'' of
the arrow tip; so if width and length are identical, the arrow will just
touch the borders of a square. (An exception to this rule are ``halved''
arrow tips, see Section~\ref{section-arrow-key-harpoon}.) The meaning of
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-graphs.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-graphs.tex
index 2f9d95af92..bfe669c724 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-graphs.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-graphs.tex
@@ -160,7 +160,7 @@ the following example:
\graph { foo -> bar -> blub };
\end{codeexample}
-As can be seen, the text |foo -> bar -> my node| creates three nodes, one with
+As can be seen, the text |foo -> bar -> blub| creates three nodes, one with
the text |foo|, one with |bar| and one with the text |blub|. These nodes are
connected by arrows, which are caused by the |->| between the node texts. Such
a sequence of node texts and arrows between them is called a \emph{chain} in
@@ -296,7 +296,7 @@ going from |b| to |c| and the edge going from |b| to |d|. To achieve this
effect, we can no longer specify the label as part of the options of |--|.
Rather, we must pass the desired label to the nodes |c| and |d|, but we must
somehow also indicate that these options actually ``belong'' to the edge
-``leading to'' to nodes. This is achieved by preceding the options with a
+``leading'' to nodes. This is achieved by preceding the options with a
greater-than sign:
%
\begin{codeexample}[preamble={\usetikzlibrary{graphs,quotes}}]
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 968628d5c5..3a3f524eed 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
@@ -69,8 +69,8 @@ which is described in the subsections of the present section.
%
\begin{codeexample}[]
\tikz{\draw (0,0) -- (1,1);
- \draw [color=red] (2,0) -- (3,1);
- \draw [color=blue] (3,0) -- (2,1);}
+ \draw [color=red] (1,1) -- (2,0) -- (3,1);
+ \draw [color=blue] (3,1) -- (3,0) -- (2,1);}
\end{codeexample}
\end{enumerate}
@@ -1134,6 +1134,7 @@ for a reference.
The \emph{let operation} is the first of a number of path operations that do
not actually extend that path, but have different, mostly local, effects.
+It requires the |calc| library, see Section~\ref{tikz-lib-calc}.
\begin{pathoperation}{let}{\meta{assignment}
\opt{|,|\meta{assignment}}%
@@ -1178,7 +1179,7 @@ not actually extend that path, but have different, mostly local, effects.
The second kind of \meta{assignments} have the following form:
%
\begin{quote}
- |\p|\meta{point register}|={|\meta{formula}|}|
+ |\p|\meta{point register}|=|\meta{coordinate}
\end{quote}
%
Point position registers store a single point, consisting of an $x$-part
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 203689729f..a757b394a2 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
@@ -198,7 +198,7 @@ namely whenever you use an expression involving a parenthesis.
The following options influence how the \meta{coordinate expression} is
evaluated:
%
-\begin{key}{/tikz/variable=\meta{macro} (initially x)}
+\begin{key}{/tikz/variable=\meta{macro} (initially \string\x)}
Sets the macro whose value is set to the different values when
\meta{coordinate expression} is evaluated.
\end{key}
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 72cd794c9f..a712c1a4c9 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
@@ -3033,7 +3033,7 @@ The following macro may be useful there:
Expands to the last node on the path.
\end{command}
-Instead of the |node also| syntax, you can also the following option:
+Instead of the |node also| syntax, you can also use the following option:
\begin{key}{/tikz/late options=\meta{options}}
This option can be given on a path (but not as an argument to a |node| path
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transformations.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transformations.tex
index ef049f3cf3..baa38cb438 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transformations.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transformations.tex
@@ -97,7 +97,7 @@ To change the $x$-, $y$-, and $z$-vectors, you can use the following options:
corner of the grid.
If \meta{value} is a coordinate, the $x$-vector of \pgfname's
- $xyz$-coordinate system to the specified coordinate. If \meta{value}
+ $xyz$-coordinate system is set to the specified coordinate. If \meta{value}
contains a comma, it must be put in braces.
%
\begin{codeexample}[]
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
index 0a35440fd1..7f334ddc7f 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
@@ -822,7 +822,7 @@ By comparison, when using a single |+|, the coordinates are different:
Naturally, all of this could have been written more clearly and more
-economically like this (either with a single of a double |+|):
+economically like this (either with a single or a double |+|):
%
\begin{codeexample}[]
\tikz \draw (0,0) rectangle +(1,1) (1.5,0) rectangle +(1,1);
diff --git a/graphics/pgf/base/tex/pgf.revision.tex b/graphics/pgf/base/tex/pgf.revision.tex
index 8b87951e3b..1c04a7bfd7 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.6a}
-\gdef\pgfversion{3.1.6a}
-\gdef\pgfversiondatetime{2020-10-01 21:02:59 +0200}
-\gdef\pgfrevisiondatetime{2020-10-01 21:02:59 +0200}
+\gdef\pgfrevision{3.1.7}
+\gdef\pgfversion{3.1.7}
+\gdef\pgfversiondatetime{2020-11-23 12:12:00 +0100}
+\gdef\pgfrevisiondatetime{2020-11-23 12:12:00 +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/pgffor.code.tex b/graphics/pgf/base/tex/pgffor.code.tex
index cdb77b3137..65b62b8cf9 100644
--- a/graphics/pgf/base/tex/pgffor.code.tex
+++ b/graphics/pgf/base/tex/pgffor.code.tex
@@ -79,10 +79,13 @@
\fi%
}
+\def\pgffor@expand@list@true{\let\pgffor@expand@list\edef}
+\def\pgffor@expand@list@false{\let\pgffor@expand@list\def}
\def\pgffor@macro@list#1{%
\expandafter\pgffor@normal@list\expandafter{#1}}
\def\pgffor@normal@list#1{%
- \def\pgffor@values{#1, \pgffor@stop,}%
+ \pgffor@expand@list\pgffor@values{#1}%
+ \expandafter\def\expandafter\pgffor@values\expandafter{\pgffor@values, \pgffor@stop,}%
\ifx\pgffor@values\pgffor@emptyvalues
\def\pgffor@values{\pgffor@stop,}%
\fi%
@@ -619,6 +622,9 @@
count/.code=\pgffor@count@parse#1\pgffor@stop,
parse/.is if=pgffor@assign@parse,
parse/.default=false,
+ expand list/.is if=pgffor@expand@list@,
+ expand list/.default=true,
+ expand list=false,
}
\def\pgffor@assign@parse#1{%
diff --git a/graphics/pgf/base/tex/pgfkeys.code.tex b/graphics/pgf/base/tex/pgfkeys.code.tex
index e32745317c..db89141aca 100644
--- a/graphics/pgf/base/tex/pgfkeys.code.tex
+++ b/graphics/pgf/base/tex/pgfkeys.code.tex
@@ -178,7 +178,13 @@
%
% \pgfkeysifdefined{/tikz/length}{key exists}{does not exist}
-\long\def\pgfkeysifdefined#1#2#3{\ifcsname pgfk@#1\endcsname#2\else#3\fi}
+\long\def\pgfkeysifdefined#1{%
+ \ifcsname pgfk@#1\endcsname
+ \expandafter\pgfkeys@firstoftwo
+ \else
+ \expandafter\pgfkeys@secondoftwo
+ \fi
+}
% Tests whether a key is assignable. For standard keys which just
% store their value, this is identical to \pgfkeysifdefined.
@@ -749,7 +755,7 @@
{%
\pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}%
\pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}%
- \def\pgfkeys@marshal{\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}%
+ \def\pgfkeys@marshal{\expandafter\long\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}%
\expandafter\pgfkeys@marshal\expandafter{\pgfkeys@tempbody}%
}%
\pgfkeysifdefined{\pgfkeyscurrentpath/.@@body}{%
@@ -799,11 +805,7 @@
% Defining a value
-\pgfkeys{/handlers/.initial/.code=%
- \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}\undefined
- \pgfkeyslet{\pgfkeyscurrentpath/.@args}\undefined
- \pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}%
-}
+\pgfkeys{/handlers/.initial/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}}
\pgfkeys{/handlers/.add/.code 2 args=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{#2}}
\pgfkeys{/handlers/.prefix/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{}}
\pgfkeys{/handlers/.append/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{}{#1}}
@@ -1039,50 +1041,50 @@
\pgfkeys{
/errors/boolean expected/.code 2 args=%
- {
- \toks1={#1}
- \toks2={#2}
+ {%
+ \toks1={#1}%
+ \toks2={#2}%
\pgfkeys@error{%
Boolean parameter of key '\the\toks1' must be 'true' or 'false', not
'\the\toks2'. I am going to ignore it%
- }
+ }%
},
/errors/value required/.code 2 args=%
- {
- \toks1={#1}
+ {%
+ \toks1={#1}%
\pgfkeys@error{%
The key '\the\toks1' requires a value. I am going to ignore this
key%
- }
+ }%
},
/errors/value forbidden/.code 2 args=%
- {
- \toks1={#1}
- \toks2={#2}
+ {%
+ \toks1={#1}%
+ \toks2={#2}%
\pgfkeys@error{%
You may not specify a value for the key '\the\toks1'. I am going to ignore
the value '\the\toks2' that you provided%
- }
+ }%
},
/errors/unknown choice value/.code 2 args=%
- {
- \toks1={#1}
- \toks2={#2}
+ {%
+ \toks1={#1}%
+ \toks2={#2}%
\pgfkeys@error{%
Choice '\the\toks2' unknown in choice key '\the\toks1'. I am
going to ignore this key%
- }
+ }%
},
/errors/unknown key/.code 2 args=%
- {
- \toks1={#1}
- \toks2={#2}
+ {%
+ \toks1={#1}%
+ \toks2={#2}%
\def\pgf@temp{#2}%
\pgfkeys@error{%
I do not know the key '\the\toks1'\ifx\pgf@temp\pgfkeysnovalue@text\space\else, to which you passed
'\the\toks2', \fi and I am going to ignore it. Perhaps you
misspelled it%
- }
+ }%
}
}
diff --git a/graphics/pgf/base/tex/pgflibraryshapes.geometric.code.tex b/graphics/pgf/base/tex/pgflibraryshapes.geometric.code.tex
index 6bc4286323..8ed52a5187 100644
--- a/graphics/pgf/base/tex/pgflibraryshapes.geometric.code.tex
+++ b/graphics/pgf/base/tex/pgflibraryshapes.geometric.code.tex
@@ -163,7 +163,7 @@
\advance\pgf@x by0.707107\pgf@xa
\advance\pgf@y by-0.707107\pgf@ya
}%
- \anchorborder{
+ \anchorborder{%
\edef\pgf@marshal{%
\noexpand\pgfpointborderellipse
{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
diff --git a/graphics/pgf/base/tex/pgfmoduleshapes.code.tex b/graphics/pgf/base/tex/pgfmoduleshapes.code.tex
index 4e8cce59a4..a22aca4757 100644
--- a/graphics/pgf/base/tex/pgfmoduleshapes.code.tex
+++ b/graphics/pgf/base/tex/pgfmoduleshapes.code.tex
@@ -1260,7 +1260,7 @@
\advance\pgf@x by0.707107\pgf@xa
\advance\pgf@y by-0.707107\pgf@xa
}%
- \anchorborder{
+ \anchorborder{%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\edef\pgf@marshal{%
diff --git a/graphics/pgf/base/tex/pgfsys-dvips.def b/graphics/pgf/base/tex/pgfsys-dvips.def
index 70f5ba2887..678fdd4d0b 100644
--- a/graphics/pgf/base/tex/pgfsys-dvips.def
+++ b/graphics/pgf/base/tex/pgfsys-dvips.def
@@ -474,15 +474,27 @@
\expandafter\xdef\csname pgfsmasktrans@#1\endcsname{%
\noexpand\pgftransformcm{1}{0}{0}{1}{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
\edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{%
- % box coordinates (reference point and top) needed for distilling
+ % box coordinates (reference point and top) needed for ps2pdf
\pgfsys@outerinvoke{currentpoint /pgf@refy exch def /pgf@refx exch def}%
\hbox to 0pt {\hbox to \ifdim\ht#2>\ht\strutbox\ht#2\else\ht\strutbox\fi{\hss\pgfsys@outerinvoke{%
/pgf@top pgf@refy currentpoint pop pgf@refx sub VResolution Resolution div mul sub def%
}}\hss}%
+ % lower-right box corner coordinates for viewing
+ \hbox to 0pt {\hbox to \wd#2{\hss\pgfsys@outerinvoke{/pgf@right currentpoint pop def}}\hss}%
+ \hbox to 0pt {\hbox to \ifdim\dp#2>\dp\strutbox\dp#2\else\dp\strutbox\fi{\hss\pgfsys@outerinvoke{%
+ /pgf@bot pgf@refy currentpoint pop pgf@refx sub VResolution Resolution div mul add def%
+ }}\hss}%
\pgfsys@outerinvoke{gsave
- % translate box to upper left page corner, so we have the whole clipping path (i. e.
- % page area) available for distilling, as outlying parts get clipped
- clippath pathbbox newpath pop pop translate pgf@refx neg pgf@top neg translate
+ clippath pathbbox newpath pop pop translate
+ systemdict /pdfmark known {%
+ % for ps2pdf, translate box to upper-left page corner, so we have the whole clipping
+ % path (i. e. page area) available, as outlying parts get clipped
+ pgf@refx neg pgf@top neg translate%
+ } {%
+ % for viewing, however, we want to hide the box by moving it off-page; we do so by aligning
+ % the lower-right box corner with the upper-left page corner
+ pgf@right neg pgf@bot neg translate%
+ } ifelse
% translate origin (0,0) to the reference point
gsave pgf@refx pgf@refy translate
mark /_objdef {pgfsmaskxform@\the\pgf@objectcount}
diff --git a/graphics/pgf/base/tex/pgfsys-luatex.def b/graphics/pgf/base/tex/pgfsys-luatex.def
index 88adfd42d9..b87edd0e6a 100644
--- a/graphics/pgf/base/tex/pgfsys-luatex.def
+++ b/graphics/pgf/base/tex/pgfsys-luatex.def
@@ -84,7 +84,7 @@
{%
\pgf@parsefunc{#3}%
\pgfmathparse{#2}%
- \setbox\pgfutil@tempboxa=\hbox to\pgf@max{\vbox to\pgfmathresult pt{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \setbox\pgfutil@tempboxa=\hbox dir TLT to\pgf@max{\vbox to\pgfmathresult pt{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
\pgf@process{\pgfpoint{\pgf@max}{#2}}%
\immediate\saveboxresource resources {%
/Shading << /Sh << /ShadingType 2
@@ -101,7 +101,7 @@
{%
\pgf@parsefunc{#3}%
\pgfmathparse{#2}%
- \setbox\pgfutil@tempboxa=\hbox to\pgfmathresult pt{\vbox to\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \setbox\pgfutil@tempboxa=\hbox dir TLT to\pgfmathresult pt{\vbox to\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
\pgf@process{\pgfpoint{#2}{\pgf@max}}%
\immediate\saveboxresource resources {%
/Shading << /Sh << /ShadingType 2
@@ -117,7 +117,7 @@
\def\pgfsys@radialshading#1#2#3{%
{%
\pgf@parsefunc{#3}%
- \setbox\pgfutil@tempboxa=\hbox to2\pgf@max{\vbox to2\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \setbox\pgfutil@tempboxa=\hbox dir TLT to2\pgf@max{\vbox to2\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
\pgf@process{#2}%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
@@ -149,7 +149,7 @@
\pgf@yb=\pgf@y%
\advance\pgf@x by-\pgf@xa%
\advance\pgf@y by-\pgf@ya%
- \setbox\pgfutil@tempboxa=\hbox to\pgf@x{\vbox to\pgf@y{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \setbox\pgfutil@tempboxa=\hbox dir TLT to\pgf@x{\vbox to\pgf@y{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
\pgf@sys@bp@correct{\pgf@xa}%
\pgf@sys@bp@correct{\pgf@ya}%
\pgf@sys@bp@correct{\pgf@xb}%
diff --git a/graphics/pgf/base/tex/pgfutil-latex.def b/graphics/pgf/base/tex/pgfutil-latex.def
index e2ed750368..a21f3b4d63 100644
--- a/graphics/pgf/base/tex/pgfutil-latex.def
+++ b/graphics/pgf/base/tex/pgfutil-latex.def
@@ -92,6 +92,9 @@
\AtBeginDocument{\AtEndDocument{\clearpage\the\pgfutil@everybye}}
+% \@ifl@t@r is defined \@onlypremable so we have to save it here
+\let\pgfutil@ifl@t@r=\@ifl@t@r
+
\def\pgfutil@insertatbegincurrentpagefrombox#1{%
\edef\pgf@temp{\the\wd\pgfutil@abb}%
\global\setbox\pgfutil@abb\hbox{%
@@ -105,8 +108,9 @@
%
% CF observed problems when placing patterns in XObjects without
% this skip (dvipdfmx driver for pgfplots shader=interp)
- \hskip-\pgf@temp\relax%
+ \hskip\dimexpr\pgfutil@ifl@t@r\fmtversion{2020/10/01}{2in-2\hoffset}{}-\pgf@temp\relax%
#1%
+ \pgfutil@ifl@t@r\fmtversion{2020/10/01}{\hskip\dimexpr-2in-2\hoffset\relax}{}%
}%
}
\newbox\pgfutil@abb%
@@ -119,7 +123,7 @@
}
\let\pgfutil@abe\pgfutil@empty%
-\@ifl@t@r\fmtversion{2020/10/01}{%
+\pgfutil@ifl@t@r\fmtversion{2020/10/01}{%
\AddToHook{shipout/background}{%
\put(\hoffset-1in,\voffset-1in){%
\pgfutil@abe\unhbox\pgfutil@abb\pgfutil@abc\global\let\pgfutil@abc\pgfutil@empty