From ae7b85d3ff2a814b8c735c12031dd075b58bedac Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 28 Dec 2020 22:32:07 +0000 Subject: circuitikz (28dec20) git-svn-id: svn://tug.org/texlive/trunk@57245 c570f23f-e606-0410-a88d-b1316a301751 --- .../third/circuitikz/circuitikz-context.pdf | Bin 17743 -> 17743 bytes .../texmf-dist/doc/generic/circuitikz/CHANGELOG.md | 6 ++++ .../texmf-dist/doc/latex/circuitikz/changelog.tex | 12 +++++++ .../doc/latex/circuitikz/circuitikzmanual.pdf | Bin 1122091 -> 1123157 bytes .../doc/latex/circuitikz/circuitikzmanual.tex | 10 +++++- .../tex/context/third/circuitikz/t-circuitikz.tex | 4 +-- .../tex/generic/circuitikz/pgfcircpath.tex | 35 ++++++++++++++++++--- .../texmf-dist/tex/latex/circuitikz/circuitikz.sty | 4 +-- 8 files changed, 61 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf index 677fe48f108..fb5257a31cf 100644 Binary files a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf and b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf differ diff --git a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md index 2d9bbf531c9..0be3e9b6898 100644 --- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md +++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md @@ -1,6 +1,12 @@ The major changes among the different circuitikz versions are listed here. See 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. diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex index 2cefce381be..c03605dee9e 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex +++ b/Master/texmf-dist/doc/latex/circuitikz/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/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf index 47469edf2c2..a610f2da9fa 100644 Binary files a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf and b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf differ diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex index 1ac826ac757..45de64ab483 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex +++ b/Master/texmf-dist/doc/latex/circuitikz/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/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex index 39a332e0f6d..6af1ae4ed5b 100644 --- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex +++ b/Master/texmf-dist/tex/context/third/circuitikz/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] diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex index 0b15f0f160e..0c2df7cd700 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/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/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty index bc1581cb541..cd1637a3f72 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/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] -- cgit v1.2.3