texlive[59147] Master/texmf-dist: circuitikz (9may21)

commits+karl at tug.org commits+karl at tug.org
Sun May 9 22:50:14 CEST 2021


Revision: 59147
          http://tug.org/svn/texlive?view=revision&revision=59147
Author:   karl
Date:     2021-05-09 22:50:14 +0200 (Sun, 09 May 2021)
Log Message:
-----------
circuitikz (9may21)

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/pgfcirclabel.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.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	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-05-09 20:50:14 UTC (rev 59147)
@@ -1,6 +1,15 @@
 <!--- 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.3.6 (2021-05-09)
+
+    Mainly a bugfix release; fixing a bug in the `l2` stacked labels means that old constructs that were failing silently can give an error now. Sorry.
+    To compensate, I added stacked annotation (for symmetry).
+
+    - Added stacked annotations for symmetry with stacked labels.
+    - Fixed a bug in the plotting of `inst amp ra` terminals.
+    - Fixed a bug in managing stacked labels (`l2=...`); possibly it will be mildly backward-incompatible (please see the manual about incompatible changes)
+
 * Version 1.3.5 (2021-05-02)
 
     Power electronics devices are the main characters in this release: PUT, GTOs, a new style for thyristors, and a photovoltaic module.

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-05-09 20:50:14 UTC (rev 59147)
@@ -5,6 +5,25 @@
 
 \begin{itemize}
 \item
+  version 1.3.6 (2021-05-09)
+
+  Mainly a bugfix release; fixing a bug in the \texttt{l2} stacked
+  labels means that old constructs that were failing silently can give
+  an error now. Sorry. To compensate, I added stacked annotation (for
+  symmetry).
+
+  \begin{itemize}
+  \tightlist
+  \item
+    Added stacked annotations for symmetry with stacked labels.
+  \item
+    Fixed a bug in the plotting of \texttt{inst\ amp\ ra} terminals.
+  \item
+    Fixed a bug in managing stacked labels (\texttt{l2=...}); possibly
+    it will be mildly backward-incompatible (please see the manual about
+    incompatible changes)
+  \end{itemize}
+\item
   Version 1.3.5 (2021-05-02)
 
   Power electronics devices are the main characters in this release:

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	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-05-09 20:50:14 UTC (rev 59147)
@@ -219,8 +219,10 @@
 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. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
 If unsure, you can check the version at your local installation using the macro \verb!\pgfcircversion{}!.
 \begin{itemize}
+    \item Version 1.3.6 fixes several problems with the stacked labels; the most important change is that now the bracing of arguments is respected as in version 1.3.0 for the other labels. The special treatment in stacked labels (and only in stacked labels!) for the (still experimental\footnote{and, really, not advised\dots}) \texttt{siunitx} compact syntax \texttt{<...>} has been removed: it was completely buggy before, and silently ignored, now will throw an error.
     \item Version 1.3.3 fixes the direction of the arrows in tunable elements; before this version, they were more or less random, now the arrow goes from bottom left to top right. You have the option to go back to the old behavior with \texttt{\textbackslash ctikzset\{bipoles/fix tunable direction=false\}}. As a compensation for the fuss, now the arrows are configurable. To learn more, see the FAQ:~\ref{faq:tunable-arrow}.
     \item Version 1.3.1 removes the warning if you do not specify a voltage direction.
+    \item Version 1.3.0 fixes the buggy stripping of braces from labels and annotations (see~\ref{sec:bracing-of-labels}.
     \item After 1.2.7 a big code reorganization (which had the collateral effect of fixing some bug) has been made; no changes should be visible, but a fallback point at 1.2.7 has been added.
     \item You \textbf{must} upgrade to v1.2.7 or newer if you use a \TikZ{} 3.1.8 or 3.1.8a (but better upgrade both packages to the current version). You can check the \TikZ{} version installed using the macro \verb|\pgfversion|.
     \item After v1.2.1: \textbf{Important:} the routine that implements the \texttt{to[...]} component positioning has been rewritten. That should enhance the line joins in paths, and it's safer, but it can potentially change some old behavior.
@@ -6240,7 +6242,7 @@
 \end{circuitikz}
 \end{LTXexample}
 
-\subsubsection{Special symbols in labels and annotations.}
+\subsubsection{Special symbols in labels and annotations.}\label{sec:bracing-of-labels}
 When \TikZ{} processes the options, there will be problems if the label (or annotation, voltage, or current) contains one of the characters $=$ (equal) or $,$ (comma) --- because the parser search for those two characters to delimit the arguments, giving unexpected errors and wrong output.
 These two characters can be protected from the option parser using an extra set of braces.
 
@@ -6302,30 +6304,40 @@
 \end{circuitikz}
 \end{LTXexample}
 
-You also can use stacked (two lines) labels.  The example should be self-explanatory: the two lines are specified as \texttt{l2=}\emph{line1}\texttt{ and }\emph{line2}. You can use the keys \texttt{l2 halign} to control horizontal position (\texttt{l}eft, \texttt{c}enter, \texttt{r}ight) and \texttt{l2 valign} to control the vertical one (\texttt{b}ottom, \texttt{c}center, \texttt{t}op).
+\subsubsection{Stacked (two lines) labels.}
+You also can use stacked (two lines) labels.  The example should be self-explanatory: the two lines are specified as \texttt{l2=}\emph{line1}\texttt{ and }\emph{line2}. You can use the keys \texttt{l2 halign} to control horizontal position (\texttt{l}eft, \texttt{c}enter, \texttt{r}ight) and \texttt{l2 valign} to control the vertical one (\texttt{b}ottom, \texttt{c}enter, \texttt{t}op). The default values for alignement are thought for vertical components (where the stacke labels are more natural), in other positions you have to force them.
 
+Notice that you \textbf{can't use} the compact \texttt{<...>} notation for \texttt{siunitx} with stacked labels. Before \texttt{v1.3.6} the label was ignored, but that has been converted into an error.
 
-\begin{LTXexample}[varwidth=true]
-    \begin{circuitikz}[ american, ]
-        %
-        % default is l2 halign=l, l2 valign=c
-        %
-        \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm},            , l2 valign=t] (2,0);
-        \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm},            ,            ] (0,2);
-        \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] (-2,0);
-        \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=r, l2 valign=c] (0, -2);
-    \end{circuitikz}
-\end{LTXexample}
+Since \texttt{v1.3.6} you have the same possibility with the \texttt{annotation} (just use \texttt{a2=...}, \verb|a2_=...|, \texttt{a2 valign} and so on. Notice that the default position for stacked annotation is \texttt{v2 halign=l}.
 
-\begin{LTXexample}[varwidth=true]
-    \begin{circuitikz}[ american, ]
-        \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] (2,0);
-        \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c,            ] (0,2);
-        \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm},            , l2 valign=t] (-2,0);
-        \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=t](0, -3);
-    \end{circuitikz}
+%
+% This is hacky --- better not to publish it for now
+%
+% \begin{circuitikz}[]
+%     \draw (0,2) to [R, l2= {A=B} and X, l2 valign=b, l2 halign=c] ++(2,0) to[L, l2=A and X \\ {C=Z}] ++(0,-2);
+% \end{circuitikz}
+
+\begin{LTXexample}[varwidth=true, pos=t, keepspaces, basicstyle=\footnotesize\ttfamily]
+\begin{circuitikz}[american]
+    %
+    % default for l2 is: l2 halign=l, l2 valign=c. DO NOT USE the <...> notation
+    %
+    \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm},            , l2 valign=t] ++(2,0);
+    \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm},            ,            ] ++(0,2);
+    \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] ++(-2,0);
+    \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=r, l2 valign=c] ++(0,-2);
+    \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] ++(2,0);
+    \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c,            ] ++(0,2);
+    \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm},            , l2 valign=t] ++(-2,0);
+    \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=t] ++(0,-2);
+    \draw (10,2) to[R, l2={A=B} and X, a2={C=D} and Y] ++(0,-4);
+\end{circuitikz}
 \end{LTXexample}
 
+For extra options about labels and annotations, please refer to section~\ref{sec:ornament-style}
+
+
 \subsection{Currents and voltages}\label{curr-and-volt}
 
 The default direction/sign for currents and voltages in the components is, unfortunately, not standard, and can change across country and sometime across different authors.
@@ -6971,7 +6983,7 @@
 
 
 
-\subsection{Changing the style of labels and text ornaments}
+\subsection{Changing the style of labels, voltages, and other text ornaments}\label{sec:ornament-style}
 
 Since version \texttt{0.9.5}, it is possible to change the style of bipole text ornaments (labels, annotations, voltages etc) by using the appropriate styles or keys.
 The basic style applied to the text are defined in the \texttt{/tikz/circuitikz} key directory and applied to every node that contains the text; you can also change them locally by using the \texttt{tikz} direct keys in local scopes.

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-05-09 20:50:14 UTC (rev 59147)
@@ -10,8 +10,8 @@
 %
 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
-\def\pgfcircversion{1.3.5}
-\def\pgfcircversiondate{2021/05/02}
+\def\pgfcircversion{1.3.6}
+\def\pgfcircversiondate{2021/05/09}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex	2021-05-09 20:50:14 UTC (rev 59147)
@@ -322,51 +322,77 @@
 % syntax is l2_ = line1 and line2 (same for l2^)
 %
 \ctikzset{%
-    l2 valign/.store in=\ltwo at valign, l2 valign=c,
-    l2 halign/.store in=\ltwo at halign, l2 halign=l,
+    l2 valign/.store in=\pgfcirc at ltwo@valign, l2 valign=c,
+    l2 halign/.store in=\pgfcirc at ltwo@halign, l2 halign=l,
 }
 \ctikzset{l2base/.code n args={2}{
   \pgfkeys{/tikz/circuitikz/bipole/label/name=%
         \bgroup
         \setlength{\tabcolsep}{2pt}%
-        \def\ltwo at tabu{\tabular[\ltwo at valign]}%
-        \expandafter\ltwo at tabu\expandafter{\ltwo at halign}%
+        \def\pgfcirc at ltwo@tabu{\tabular[\pgfcirc at ltwo@valign]}%
+        \expandafter\pgfcirc at ltwo@tabu\expandafter{\pgfcirc at ltwo@halign}%
         #1\\ #2%
         \endtabular
         \egroup
     }%
-    \ctikzsetvalof{bipole/label/unit}{}
-    \ifpgf at circ@siunitx
-        \pgf at circ@handleSI{#2}
-        \ifpgf at circ@siunitx at res
-            \edef\pgf at temp{\pgf at circ@handleSI at val}
-            \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf at temp}
-            \edef\pgf at temp{\pgf at circ@handleSI at unit}
-            \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf at temp}
-        \else
-        \fi
-    \else
-    \fi
 }}
-\ctikzset{l2/.style args={#1 and #2}{
+\ctikzset{l2/.style args={#1and#2}{
         l2base={#1}{#2},
     \circuitikzbasekey/bipole/label/position=90 }
 }
-\ctikzset{l2 above/.style args={#1 and #2}{
+\ctikzset{l2 above/.style args={#1and#2}{
         l2base={#1}{#2},
     \circuitikzbasekey/bipole/label/position=90 }
 }
-\ctikzset{l2^/.style args={#1 and #2}{
+\ctikzset{l2^/.style args={#1and#2}{
         l2base={#1}{#2},
     \circuitikzbasekey/bipole/label/position=90 }
 }
-\ctikzset{l2 below/.style args={#1 and #2}{
+\ctikzset{l2 below/.style args={#1and#2}{
         l2base={#1}{#2},
     \circuitikzbasekey/bipole/label/position=-90 }
 }
-\ctikzset{l2_/.style args={#1 and #2}{
+\ctikzset{l2_/.style args={#1and#2}{
         l2base={#1}{#2},
     \circuitikzbasekey/bipole/label/position=-90 }
 }
+%
+% the same for annotations
+%
+\ctikzset{%
+    a2 valign/.store in=\pgfcirc at atwo@valign, a2 valign=c,
+    a2 halign/.store in=\pgfcirc at atwo@halign, a2 halign=r,
+}
+\ctikzset{a2base/.code n args={2}{
+  \pgfkeys{/tikz/circuitikz/bipole/annotation/name=%
+        \bgroup
+        \setlength{\tabcolsep}{2pt}%
+        \def\pgfcirc at atwo@tabu{\tabular[\pgfcirc at atwo@valign]}%
+        \expandafter\pgfcirc at atwo@tabu\expandafter{\pgfcirc at atwo@halign}%
+        #1\\ #2%
+        \endtabular
+        \egroup
+    }%
+}}
+\ctikzset{a2/.style args={#1and#2}{
+        a2base={#1}{#2},
+    \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2 above/.style args={#1and#2}{
+        a2base={#1}{#2},
+    \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2^/.style args={#1and#2}{
+        a2base={#1}{#2},
+    \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2 below/.style args={#1and#2}{
+        a2base={#1}{#2},
+    \circuitikzbasekey/bipole/annotation/position=90 }
+}
+\ctikzset{a2_/.style args={#1and#2}{
+        a2base={#1}{#2},
+    \circuitikzbasekey/bipole/annotation/position=90 }
+}
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2021-05-09 20:50:14 UTC (rev 59147)
@@ -7513,19 +7513,19 @@
         % ra terminal -
         \pgfpathmoveto{\pgfpoint
             {\pgf at circ@res at left}
-        {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@Rlen}}
+        {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@scaled at Rlen}}
         %
         \pgfpathlineto{\pgfpoint
             {\ctikzvalof{tripoles/inst amp ra/port width}\pgf at circ@res at left}
-        {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@Rlen}}
+        {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@scaled at Rlen}}
         % ra terminal +
         \pgfpathmoveto{\pgfpoint
             {\pgf at circ@res at left}
-        {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@Rlen}}
+        {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@scaled at Rlen}}
         %
         \pgfpathlineto{\pgfpoint
             {\ctikzvalof{tripoles/inst amp ra/port width}\pgf at circ@res at left}
-        {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@Rlen}}
+        {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf at circ@scaled at Rlen}}
 
         % Negative input terminal
         \pgfpathmoveto{\pgfpoint

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2021-05-09 20:49:49 UTC (rev 59146)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2021-05-09 20:50:14 UTC (rev 59147)
@@ -12,8 +12,8 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\pgfcircversion{1.3.5}
-\def\pgfcircversiondate{2021/05/02}
+\def\pgfcircversion{1.3.6}
+\def\pgfcircversiondate{2021/05/09}
 
 \ProvidesPackage{circuitikz}%
 [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]



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