summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/base/doc/ChangeLog16
-rw-r--r--graphics/pgf/base/doc/RELEASE_NOTES.md37
-rw-r--r--graphics/pgf/base/doc/pgfmanual.pdfbin10580776 -> 10580316 bytes
-rw-r--r--graphics/pgf/base/tex/pgf.revision.tex8
-rw-r--r--graphics/pgf/base/tex/tikz.code.tex30
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex12
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin17743 -> 17743 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1122091 -> 1123157 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex10
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex35
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
12 files changed, 85 insertions, 71 deletions
diff --git a/graphics/pgf/base/doc/ChangeLog b/graphics/pgf/base/doc/ChangeLog
index 2e12f9a86e..4e3c19950c 100644
--- a/graphics/pgf/base/doc/ChangeLog
+++ b/graphics/pgf/base/doc/ChangeLog
@@ -1,3 +1,19 @@
+2020-12-27 Henri Menke
+
+ - Release 3.1.8b
+
+2020-12-27 Henri Menke
+
+ - Revert "tikz: handle \relax and frozen \relax on path #966"
+
+2020-12-27 Henri Menke
+
+ - Release 3.1.8a
+
+2020-12-25 Henri Menke
+
+ - fixup! Preserve coordinate relativity across ..
+
2020-12-25 Henri Menke
- Release 3.1.8
diff --git a/graphics/pgf/base/doc/RELEASE_NOTES.md b/graphics/pgf/base/doc/RELEASE_NOTES.md
index 22437f3da7..6fc188431c 100644
--- a/graphics/pgf/base/doc/RELEASE_NOTES.md
+++ b/graphics/pgf/base/doc/RELEASE_NOTES.md
@@ -1,34 +1,5 @@
-# BREAKING CHANGES
+Hotfix for handling of TeX conditionals on a path. We can't forward \relax and
+frozen \relax through the parser because there is existing code that relies on
+this.
-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
-
-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.
-
-a4c275704 #952
-8a997bbc1 #954
-8f37bca84 #962
-3cbe5a192 #844
-49e5f0a08 #654
-17a95e4c5 #966
-ad06895a6 #966
-79e613ae1 #966
+The recommendation is to use expandable conditionals where possible.
diff --git a/graphics/pgf/base/doc/pgfmanual.pdf b/graphics/pgf/base/doc/pgfmanual.pdf
index 38c731f0fa..47b3273441 100644
--- a/graphics/pgf/base/doc/pgfmanual.pdf
+++ b/graphics/pgf/base/doc/pgfmanual.pdf
Binary files differ
diff --git a/graphics/pgf/base/tex/pgf.revision.tex b/graphics/pgf/base/tex/pgf.revision.tex
index a03cfbb945..796c7fbe8a 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.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\pgfrevision{3.1.8b}
+\gdef\pgfversion{3.1.8b}
+\gdef\pgfversiondatetime{2020-12-27 19:52:45 +0100}
+\gdef\pgfrevisiondatetime{2020-12-27 19:52:45 +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/tikz.code.tex b/graphics/pgf/base/tex/tikz.code.tex
index 477418b716..f848487e70 100644
--- a/graphics/pgf/base/tex/tikz.code.tex
+++ b/graphics/pgf/base/tex/tikz.code.tex
@@ -2120,15 +2120,10 @@
\else%
\tikz@invoke@collected@onpath%
\fi%
- \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{%
@@ -2229,7 +2224,7 @@
\ifx\pgf@let@token:%
\let\pgfutil@next=\tikz@colon@char%
\else%
- \let\pgfutil@next=\tikz@handle@evenmore
+ \let\pgfutil@next=\tikz@expand%
\fi%
\fi%
\fi%
@@ -2245,26 +2240,10 @@
\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}{%
@@ -3112,6 +3091,9 @@
}%
\def\tikz@@to@or@edge@math#1{%
\pgf@process{#1}%
+ \iftikz@updatecurrent\else
+ \tikz@updatenextfalse
+ \fi
\edef\tikztotarget{\the\pgf@x,\the\pgf@y}%
\tikz@to@or@edge@function%
}%
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index 2cefce381b..c03605dee9 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,18 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.2.7 (2020-12-27)
+
+ Bugfix release.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ The recent temporary changes to TikZ to v3.1.8a revealed a problem
+ in corner cases with \texttt{circuitikz} that should be fixed
+ (thanks to Henri Menke)
+ \end{itemize}
+\item
Version 1.2.6 (2020-12-16)
The highlight of this release is the option to draw circles around
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index 677fe48f10..fb5257a31c 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index 47469edf2c..a610f2da9f 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index 1ac826ac75..45de64ab48 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -280,6 +280,7 @@ The \texttt{use fpu reciprocal} key seems to have no side effects, but given tha
Here, we will provide a list of incompabilitys between different version of circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers.
You can check the used version at your local installation using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
+ \item Due to a bug fix in \TikZ{} that revealed a problem in \Circuitikz, you \textbf{must} upgrade to v1.2.7 or newer if you use a \TikZ{} 3.1.8 or 3.1.8a (the change in \TikZ{} has been reverted later).
\item After v1.2.1: \textbf{Important:} the routine that implement the \texttt{to[...]} component positioning has been rewritten. That should enhance the line joins in path, and it's safer, but it can potentially change behavior.
One of the changes is that the previous routine did the wrong thing if you used \texttt{(node) to[...]} (you should use an anchor or a coordinate, not a node there --- like \texttt{(node.anchor) to[...]}).
@@ -1123,9 +1124,16 @@ The above diagram has been obtained with the code:
As \href{https://github.com/circuitikz/circuitikz/issues/460}{noticed by user \texttt{septatrix}}, although relative coordinates after a component work as expected when using \texttt{++(x,y)}-style coordinates,
that is not true for the \texttt{+(x,y)}-style coordinates (which are supposed to set a temporary relative coordinate and then going back to the starting point).
-This behavior, although not optimal, is shared with complex \texttt{to} operation in plain \TikZ{}, as you can see from the example below (notice the blue curve using a spline line). In the last (green) example, you can see a workaround using local path and the key \texttt{current point is local}.
+This behavior, although not optimal, was standard in \texttt{to} operation in plain \TikZ{} before version 3.1.18; it was changed by Henri Menke in later versions. Notice that the change revealed a problem in \Circuitikz{} that should hopefully fixed in \texttt{v1.2.7}.
+
+You can see from the example below (notice the blue curve using a spline line). If all the vertical lines are at the left, the manual has been compiled with a new \Circuitikz{} and \TikZ. Otherwise, the red and/or blue curve will have the vertical line at the right (which in principle is wrong).
+
+In the last (green) example, you can see a workaround using local path and the key \texttt{current point is local} that will work for older (and do not create problem in newer) versions.
+
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily, pos=t]
+Plotted using Ti\emph{k}Z version \pgfversion{} and CircuitTi\emph{k}Z version \pgfcircversion{}.
+
\begin{tikzpicture}
\draw[color=red] (0,0) to[R] +(2,0) +(0,0) -- ++(0,-1);
\end{tikzpicture}
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index bc1581cb54..cd1637a3f7 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -12,8 +12,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{1.2.6}
-\def\pgfcircversiondate{2020/12/16}
+\def\pgfcircversion{1.2.7}
+\def\pgfcircversiondate{2020/12/27}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
index 0b15f0f160..0c2df7cd70 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
@@ -59,6 +59,30 @@
}
}
+%
+% expandable IF for the extra nodes (thanks to Henri Menke)
+% see https://chat.stackexchange.com/transcript/message/56560808#56560808
+%
+\def\pgfcirc@if@has@i{%
+ \ifpgfcirc@has@i
+ \expandafter\pgfutil@firstoftwo
+ \else
+ \expandafter\pgfutil@secondoftwo
+ \fi}
+\def\pgfcirc@if@has@v{%
+ \ifpgfcirc@has@v
+ \expandafter\pgfutil@firstoftwo
+ \else
+ \expandafter\pgfutil@secondoftwo
+ \fi}
+\def\pgfcirc@if@has@f{%
+ \ifpgfcirc@has@f
+ \expandafter\pgfutil@firstoftwo
+ \else
+ \expandafter\pgfutil@secondoftwo
+ \fi}
+
+
%% Generic bipole path
\def\pgf@circ@bipole@path#1#2{
@@ -158,11 +182,12 @@
\drawpoles
\pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabels{label}\fi
\pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi
- \ifpgfcirc@has@v\pgf@circ@drawvoltage\fi
- % \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
- \ifpgfcirc@has@i\pgf@circ@drawcurrent\fi
- % \pgf@circ@ifkeyempty{bipole/flow/label/name}\else\pgf@circ@drawflow\fi
- \ifpgfcirc@has@f\pgf@circ@drawflow\fi
+ % the following must be made in their own path scope to avoid crash in TikZ 3.1.8/3.1.8a
+ % it should be logically safe for older version too --- even if TikZ reverted the change
+ % use explandable ifs too, thanks to Henri Menke
+ {\pgfcirc@if@has@v{\pgf@circ@drawvoltage}{}}%
+ {\pgfcirc@if@has@i{\pgf@circ@drawcurrent}{}}%
+ {\pgfcirc@if@has@f{\pgf@circ@drawflow}{}}%
% finish the path from the component to the final target
% you never know --- re-set \pgf@temp to detect open
\pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#3}}
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index 39a332e0f6..6af1ae4ed5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.2.6}
-\def\pgfcircversiondate{2020/12/16}
+\def\pgfcircversion{1.2.7}
+\def\pgfcircversiondate{2020/12/27}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]