From 07b20138841bb0e4c45e74a2a1d06cc91fe5a861 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 28 Dec 2020 03:03:19 +0000 Subject: CTAN sync 202012280303 --- graphics/pgf/contrib/circuitikz/doc/changelog.tex | 12 +++++++ .../contrib/circuitikz/doc/circuitikz-context.pdf | Bin 17743 -> 17743 bytes .../contrib/circuitikz/doc/circuitikzmanual.pdf | Bin 1122091 -> 1123157 bytes .../contrib/circuitikz/doc/circuitikzmanual.tex | 10 +++++- graphics/pgf/contrib/circuitikz/tex/circuitikz.sty | 4 +-- .../pgf/contrib/circuitikz/tex/pgfcircpath.tex | 35 ++++++++++++++++++--- .../pgf/contrib/circuitikz/tex/t-circuitikz.tex | 4 +-- 7 files changed, 55 insertions(+), 10 deletions(-) (limited to 'graphics/pgf/contrib/circuitikz') 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 @@ -4,6 +4,18 @@ here. See \url{https://github.com/circuitikz/circuitikz/commits} for a 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) diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf index 677fe48f10..fb5257a31c 100644 Binary files a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf and b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf differ diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf index 47469edf2c..a610f2da9f 100644 Binary files a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf and b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf 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] -- cgit v1.2.3