texlive[57245] Master/texmf-dist: circuitikz (28dec20)

commits+karl at tug.org commits+karl at tug.org
Mon Dec 28 23:32:07 CET 2020


Revision: 57245
          http://tug.org/svn/texlive?view=revision&revision=57245
Author:   karl
Date:     2020-12-28 23:32:07 +0100 (Mon, 28 Dec 2020)
Log Message:
-----------
circuitikz (28dec20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
    trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
    trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty

Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2020-12-28 04:28:22 UTC (rev 57244)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2020-12-28 22:32:07 UTC (rev 57245)
@@ -1,6 +1,12 @@
 <!--- CircuiTikz - Changelog --->
 The major changes among the different circuitikz versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
 
+* Version 1.2.7 (2020-12-27)
+
+    Bugfix release.
+
+    - The recent temporary changes to TikZ to v3.1.8a revealed a problem in corner cases with `circuitikz` that should be fixed (thanks to Henri Menke)
+
 * Version 1.2.6 (2020-12-16)
 
     The highlight of this release is the option to draw circles around transistors; moreover, a handful of new component and several bug fixes.

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2020-12-28 04:28:22 UTC (rev 57244)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2020-12-28 22:32:07 UTC (rev 57245)
@@ -5,6 +5,18 @@
 
 \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

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2020-12-28 04:28:22 UTC (rev 57244)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2020-12-28 22:32:07 UTC (rev 57245)
@@ -280,6 +280,7 @@
 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 @@
 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}

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2020-12-28 04:28:22 UTC (rev 57244)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2020-12-28 22:32:07 UTC (rev 57245)
@@ -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]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2020-12-28 04:28:22 UTC (rev 57244)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2020-12-28 22:32:07 UTC (rev 57245)
@@ -59,7 +59,31 @@
     }
 }
 
+%
+% expandable IF for the extra nodes (thanks to Henri Menke)
+% see https://chat.stackexchange.com/transcript/message/56560808#56560808
+%
+\def\pgfcirc at if@has at i{%
+    \ifpgfcirc at has@i
+        \expandafter\pgfutil at firstoftwo
+    \else
+        \expandafter\pgfutil at secondoftwo
+    \fi}
+\def\pgfcirc at if@has at v{%
+    \ifpgfcirc at has@v
+        \expandafter\pgfutil at firstoftwo
+    \else
+        \expandafter\pgfutil at secondoftwo
+    \fi}
+\def\pgfcirc at if@has at f{%
+    \ifpgfcirc at has@f
+        \expandafter\pgfutil at firstoftwo
+    \else
+        \expandafter\pgfutil at secondoftwo
+    \fi}
 
+
+
 %% Generic bipole path
 \def\pgf at circ@bipole at path#1#2{
     % Create a bipole path from the shapes defined with \pgfcircdeclarebipole
@@ -158,11 +182,12 @@
     \drawpoles
     \pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabels{label}\fi
     \pgf at circ@ifkeyempty{bipole/annotation/name}\else\pgf at circ@drawlabels{annotation}\fi
-    \ifpgfcirc at has@v\pgf at circ@drawvoltage\fi
-    % \pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
-    \ifpgfcirc at has@i\pgf at circ@drawcurrent\fi
-    % \pgf at circ@ifkeyempty{bipole/flow/label/name}\else\pgf at circ@drawflow\fi
-    \ifpgfcirc at has@f\pgf at 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 at if@has at v{\pgf at circ@drawvoltage}{}}%
+    {\pgfcirc at if@has at i{\pgf at circ@drawcurrent}{}}%
+    {\pgfcirc at if@has at f{\pgf at circ@drawflow}{}}%
     % finish the path from the component to the final target
     % you never know --- re-set \pgf at temp to detect open
     \pgfextra{\def\pgf at temp{open}\def\pgf at circ@temp{#3}}

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2020-12-28 04:28:22 UTC (rev 57244)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2020-12-28 22:32:07 UTC (rev 57245)
@@ -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]



More information about the tex-live-commits mailing list.