texlive[57160] Master/texmf-dist: circuitikz (17dec20)

commits+karl at tug.org commits+karl at tug.org
Thu Dec 17 23:17:40 CET 2020


Revision: 57160
          http://tug.org/svn/texlive?view=revision&revision=57160
Author:   karl
Date:     2020-12-17 23:17:39 +0100 (Thu, 17 Dec 2020)
Log Message:
-----------
circuitikz (17dec20)

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/ctikzstyle-legacy.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.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	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2020-12-17 22:17:39 UTC (rev 57160)
@@ -1,9 +1,23 @@
 <!--- 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.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.
+
+    - added option to have transistors with circles, suggested by user `@myzinsky`
+    - added closed position for normally open button and the other way around (suggested by user `@septatrix`)
+    - added a `tip` anchor for push buttons
+    - added text anchor for legacy `linestub` component
+    - added an option for a different style of european logic xnor port (suggested by user `@Schlepptop`)
+    - added dynode tubes electrodes (suggested by user `@ferdymercury`)
+    - fixed a bug in style-files (thanks to user `@Alex` on `tex.stackexchange.com`)
+    - added a comment about relative coords (thanks to user `@septatrix`)
+    - several fixes to the manual
+
 * Version 1.2.5 (2020-10-14)
 
-    Mainly a bugfix release fir `raised` voltage style.
+    Mainly a bugfix release for `raised` voltage style.
 
     - added macro to access labels and annotations anchors and direction
     - fixed a bug in "raised" voltages' positions with `invert` and/or `mirror`

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -5,9 +5,43 @@
 
 \begin{itemize}
 \item
+  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.
+
+  \begin{itemize}
+  \tightlist
+  \item
+    added option to have transistors with circles, suggested by user
+    \texttt{@myzinsky}
+  \item
+    added closed position for normally open button and the other way
+    around (suggested by user \texttt{@septatrix})
+  \item
+    added a \texttt{tip} anchor for push buttons
+  \item
+    added text anchor for legacy \texttt{linestub} component
+  \item
+    added an option for a different style of european logic xnor port
+    (suggested by user \texttt{@Schlepptop})
+  \item
+    added dynode tubes electrodes (suggested by user
+    \texttt{@ferdymercury})
+  \item
+    fixed a bug in style-files (thanks to user \texttt{@Alex} on
+    \texttt{tex.stackexchange.com})
+  \item
+    added a comment about relative coords (thanks to user
+    \texttt{@septatrix})
+  \item
+    several fixes to the manual
+  \end{itemize}
+\item
   Version 1.2.5 (2020-10-14)
 
-  Mainly a bugfix release fir \texttt{raised} voltage style.
+  Mainly a bugfix release for \texttt{raised} voltage style.
 
   \begin{itemize}
   \tightlist

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-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -1118,7 +1118,32 @@
 \showbordersfornode{capacitivesens}
 \end{lstlisting}
 
+\subsubsection{Relative coordinates}\label{sec:path-relative-coordinates}
 
+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}.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily, pos=t]
+\begin{tikzpicture}
+    \draw[color=red] (0,0) to[R] +(2,0) +(0,0) -- ++(0,-1);
+\end{tikzpicture}
+\qquad
+\begin{tikzpicture}
+    \draw[color=blue] (0,0) to[out=30, in=120] +(2,0) +(0,0) -- ++(0,-1);
+\end{tikzpicture}
+\qquad
+\begin{tikzpicture}
+    \draw[color=purple] (0,0) to[] +(2,0) +(0,0) -- ++(0,-1);
+\end{tikzpicture}
+\qquad
+\begin{tikzpicture}
+    \draw[color=green!50!black] (0,0)
+        {[current point is local] to[R] +(2,0)} +(0,0) -- ++(0,-1);
+\end{tikzpicture}
+\end{LTXexample}
+
 \endgroup
 
 \subsubsection{Customization}
@@ -2878,6 +2903,23 @@
 You can go back to the no-arrows mos with \texttt{noarrowmos} locally or with
 \texttt{\textbackslash ctikzset\{tripoles/mos style/no arrows\}}.
 
+
+\paragraph{Circles.} Since \texttt{1.2.6}, you can add a circle\footnote{Suggested by Matthias Jung \href{https://github.com/circuitikz/circuitikz/issues/442}{on GitHub}} to most of the transistor shapes --- with the exception of multi-terminal ones (\texttt{bjtnpn} and \texttt{bjtpnp}, where it would be awkward anyway). The circle is intended in some case as the component's housing, and used to distinguish discrete components from integrated ones.
+
+To add the circle to a single transistor, you use the \texttt{tr circle} keys in the node; if you want all of your transistors with a circle, you can set the property \texttt{tr circle} with a \verb|\ctikzset| command (it will respect normal grouping, of course); in that case, you can use \texttt{tr circle=false} to locally disable them.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[]
+    \draw (0,2) node[npn]{} (2,2) node[npn, tr circle](Q){};
+    % collector connected to housing
+    \node [circ] at (Q.circle C){};
+    \ctikzset{tr circle=true} % or \ctikzset{tr circle} alone
+    \draw (0,0) node[nigfete]{}
+        (2,0) node[nigfete, tr circle=false]{};
+\end{circuitikz}
+\end{LTXexample}
+
+
 \paragraph{Body diodes and similar things.}\label{sec:bodydiodes-anchor} For all transistors (minus \texttt{bjtnpn} and \texttt{bjtpnp})  a body diode (or freewheeling or flyback diode) can automatically be drawn. Just use the global option \texttt{bodydiode}, or for single transistors, the tikz-option \texttt{bodydiode}.
 As you can see in the next example, the text for the diode is moved if a bodydiode is present (but beware, if you change a lot the relative dimension of components, it may become misplaced):
 
@@ -2915,7 +2957,7 @@
 
 \paragraph{Schottky transistors.}
 The Schottky transistors are generated by adding the \texttt{schottky base} key (there is also a \texttt{no schottky base} key that can be used if you use the other one as a default).
-You can change the size of the Schottky ``hook'' changing the parameter \texttt{tripoles/schottky base size} with \verb|\ctikzset{}| (default \texttt{0.07}; the unit is the standard resistor length, scaled if needed.)
+You can change the size of the Schottky ``hook'' changing the parameter \texttt{tripoles/schottky base size} with \verb|\ctikzset{}| (default \texttt{\ctikzvalof{tripoles/schottky base size}}; the unit is the standard resistor length, scaled if needed.)
 
 \begin{LTXexample}[varwidth=true]
     \begin{circuitikz}
@@ -2930,8 +2972,7 @@
     \end{circuitikz}
 \end{LTXexample}
 
-\paragraph{IGBT outer base}
-
+\paragraph{IGBT outer base.}
 Normally, in bipolar IGBTs the outer base is the same size (height) of the inner one, and of the same thickness (which will depend on the class thickness value). You can change this by setting (via \verb|\ctikzset`|) the keys \texttt{tripoles/igbt/outer base height} (default \texttt{0.4}, the same as \texttt{base height}), and \texttt{tripoles/igbt/outer base thickness} (default \texttt{1.0}), which will be relative to the class thickness.
 
 \begin{LTXexample}[varwidth=true, pos=t, basicstyle=\small\ttfamily]
@@ -3048,6 +3089,67 @@
 \end{groupdesc}
 
 
+\subsubsection{Transistor circle customization}
+
+\paragraph{Position and size.} You can see in the following diagram where the circle is positioned --- when there is no bodydiode, it will pass through the anchors for the body diode and near the base connection. The dimension of the circle is bigger when the bodydiode is in, to encompass it.
+The anchors are present even there is no circle, so you can use them to draw different kind of circles (say, encompassing two transistors) in a coherent way.
+
+\circuitdesc{npn, tr circle}{npn with a circle}{}(circle base/90/0.5, circle C/30/0.2, circle E/-30/0.2, circle center/0/0.5)
+\circuitdesc{npn, tr circle, bodydiode}{npn with a circle}{}(circle base/90/0.6, circle C/30/0.2, circle E/-30/0.2, circle center/0/0.5 )
+
+The position of the circle on collector and emitter by default is the one shown above; the position along the base can be adjusted in most transistors using the \verb|\ctikzset| parameter \texttt{transistor circle/default base in} (by default \texttt{\ctikzvalof{transistor circle/default base in}}); \texttt{njfet} and \texttt{pjfet} use \texttt{transistor circle/njfet base in} (default \texttt{\ctikzvalof{transistor circle/njfet base in}}; the same for \texttt{pjfet}) and, finally, \texttt{isfet} uses \texttt{transistor circle/isfet base in} (default \texttt{\ctikzvalof{transistor circle/isfet base in}}). You can change the resulting size of the circle by setting to something different to \texttt{1.0} the parameter \texttt{transistor circle/scale circle radius} --- that will move the anchors too; for example:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[scale=1.5, transform shape]
+    \draw (0,0) node[npn, tr circle](Q1){};
+    \node [circ] at (Q1.circle C){};
+    \ctikzset{transistor circle/scale circle radius=1.2}
+    \draw[color=red] (0,0) node[npn, tr circle](Q2){};
+    \node [circ, color=red] at (Q2.circle C){};
+\end{circuitikz}
+\end{LTXexample}
+
+\paragraph{Line and color.} Normally the circle follows the style of the component --- the line thickness is fixed by the class element \texttt{transistors/thickness} and the color is the same as the component color. You can change, if you need, all of these things using the parameters of the following table (the parameters are under the \verb|\ctikzset| category root \texttt{transistor circle/}.
+
+\begin{center}
+    \begin{tabular}{>{\ttfamily}l>{\ttfamily}ll}
+        \toprule
+     parameter &  default & description  \\
+     \midrule
+     relative thickness & 1.0 & multiply the class thickness \\
+     color & default & stroke color: \texttt{default} is the same as the component \\
+     dash & none & dash pattern: none means unbroken line\footnotemark \\
+        \bottomrule
+    \end{tabular}
+    \footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
+\end{center}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[]
+    \draw (0,2) node[npn, tr circle](Q1){};
+    \ctikzset{transistor circle/relative thickness=2}
+    \draw (2,2) node[npn, tr circle](Q1){};
+    \ctikzset{transistor circle/color=red}
+    \draw (0,0) node[npn, tr circle](Q1){};
+    \ctikzset{transistor circle/color=default}
+    \ctikzset{transistor circle/dash={{4pt}{4pt}{1pt}{4pt}}}
+    \draw[color=blue] (2,0) node[npn, tr circle](Q1){};
+\end{circuitikz}
+\end{LTXexample}
+
+Finally, using the class style you can do quite interesting things.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[]
+    \ctikzset{transistors/thickness=4, transistors/fill=cyan!30,
+        transistor circle/relative thickness=0.25,}
+    \draw (0,0) node[npn, tr circle](Q1){};
+    \ctikzset{transistor circle/dash={{2pt}{2pt}}}
+    \draw (1.5,0) node[npn, tr circle, xscale=-1](Q2){};
+\end{circuitikz}
+\end{LTXexample}
+
+
 \subsubsection{Transistors anchors}
 
 For \textsc{nmos}, \textsc{pmos}, \textsc{nfet}, \textsc{nigfete}, \textsc{nigfetd}, \textsc{pfet}, \textsc{pigfete}, and \textsc{pigfetd}  transistors  one has \texttt{base}, \texttt{gate}, \texttt{source} and \texttt{drain} anchors (which can be abbreviated with \texttt{B}, \texttt{G}, \texttt{S} and \texttt{D}):
@@ -3338,11 +3440,15 @@
 \draw (Tri.east) node[right] {12AX7};
 \end{circuitikz}
 
-The \texttt{magnetron} shape will also scale with \texttt{tubes/scale}.
+\subsubsection{Other tubes-like components}
 
+The \texttt{magnetron} and \texttt{dynode} shapes will also scale with \texttt{tubes/scale}.
+
 \begin{groupdesc}
     \circuitdesc*{magnetron}{Magnetron}{}( anode/-90/0.2, cathode1/135/0.2,
     cathode2/45/0.2, left/180/0.2, right/0/0.2, top/90/0.4 )
+    \circuitdesc{dynode}{Dynode\footnotemark}{D}( top/90/0.1, bottom/180/0.3, left/180/0.3, right/0/0.3, center/0/0.3, arc/-30/0.4, top right/30/0.2, top left/150/0.2 )
+    \footnotetext{Suggested by the user \texttt{ferdymercury} on \href{https://github.com/circuitikz/circuitikz/issues/469}{GitHub}.}
 \end{groupdesc}
 
 \begin{LTXexample}[varwidth=true]
@@ -3358,6 +3464,50 @@
 \end{circuitikz}
 \end{LTXexample}
 
+
+\paragraph{Dynode customization.}
+The dynode element can be heavily customized. The parameters are the following (all of them under the \verb|\ctikzset| family \texttt{monopoles/dynode}):
+
+\begin{center}
+\begin{tabular}{>{\ttfamily}l>{\ttfamily}rp{0.75\linewidth}}
+    \toprule
+    parameter & default & description \\
+    \midrule
+    width & \ctikzvalof{monopoles/dynode/width} &  Total width (relative to the base length) measured at the arc width.\\
+    height & \ctikzvalof{monopoles/dynode/height} &  Total height (same units as width).\\
+    arc angle & \ctikzvalof{monopoles/dynode/arc angle} &  Angle (from the horizontal, going down) where the arc starts. A value of \texttt{90} don't plot any arc, \texttt{0} plots a semicircle. To avoid artifacts, use a value between \texttt{-60} and \texttt{90}; the arc horizontal size is always equal to the \texttt{width}.\\
+    arc pos & \ctikzvalof{monopoles/dynode/arc pos} &  Vertical position (relative to the height) of the arc center. \\
+    top width & \ctikzvalof{monopoles/dynode/top width} &  Relative width of the top bar; a value of \texttt{1} means full width, \texttt{0} means no bar.\\
+    \bottomrule
+\end{tabular}
+\end{center}
+
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[american] \ctikzset{tubes/thickness=4}
+    \draw (0,0) to[R] (2,0) node[dynode]{} to[R,-*] (4,0);
+    \ctikzset{monopoles/dynode/.cd,
+        arc angle=0, arc pos=0.7, top width=0.5}
+    \draw (4,0) node[dynode]{};
+\end{circuitikz}
+\end{LTXexample}
+
+You can use styles and the parameters to create different types of electrodes:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[american] \ctikzset{tubes/thickness=4}
+    \tikzset{anode/.style={dynode,
+            circuitikz/monopoles/dynode/arc angle=90},
+        photocatode/.style={dynode,
+            circuitikz/monopoles/dynode/arc pos=1,
+            circuitikz/monopoles/dynode/top width=0},
+    }
+    \draw (0,0) node[dynode]{} (1,0) node[anode]{}
+           (2,0) node[photocatode]{};
+\end{circuitikz}
+\end{LTXexample}
+
+
 \subsection{RF components}\label{sec:RF}
 
 For the RF components, similarly to the grounds and supply rails, the \texttt{center} anchor is put on the connecting point of the symbol, so that you can use them directly in a \texttt{path} specification.
@@ -4026,8 +4176,10 @@
     \circuitdescbip[ospst]{opening switch}{Opening switch}{ospst}
     \circuitdescbip[nos]{normal open switch}{Normally open switch}{nos}
     \circuitdescbip[ncs]{normal closed switch}{Normally closed switch}{ncs}
-    \circuitdescbip[pushbutton]{push button}{Normally open push button}{normally open push button, nopb}
-    \circuitdescbip[ncpushbutton]{normally closed push button}{Normally closed push button}{ncpb}
+    \circuitdescbip[pushbutton]{push button}{Normally open push button}{normally open push button, nopb}(tip/0/0.2)
+    \circuitdescbip[ncpushbutton]{normally closed push button}{Normally closed push button}{ncpb}(tip/0/0.2)
+    \circuitdescbip[pushbuttonc]{normally open push button closed}{Normally open push button}{nopbc}(tip/0/0.2)
+    \circuitdescbip[ncpushbuttono]{normally closed push button open}{Normally closed push button}{ncpbo}(tip/0/0.2)
     \circuitdescbip[toggleswitch]{toggle switch}{Toggle switch}{}
     \circuitdescbip*{reed}{Reed switch}{}
 \end{groupdesc}
@@ -4927,6 +5079,17 @@
 \end{circuitikz}
 \end{LTXexample}
 
+In some standard, the \texttt{xnor} port is different --- without the negation at the end and with just an $=$ sign.\footnote{Suggested by user \texttt{Schlepptop} on GitHub.}
+You can switch to this if you like, with the key \texttt{european xnor style} that can be \texttt{default} or \texttt{direct}.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[european]
+    \draw (0,0) node[xnor port]{};
+    \ctikzset{european xnor style=direct}
+    \draw (3,0) node[xnor port]{};
+\end{circuitikz}
+\end{LTXexample}
+
 \paragraph{European logic port anchors} The anchors are basically the same as in the american-style ports.
 
 \bigskip
@@ -6413,7 +6576,7 @@
 \end{LTXexample}
 
 
-If you want to have more access to the label positioning algorithm, since \texttt{1.2.5} you can access the label  rotation using with the command \texttt{\textbackslash ctikzgetrotation\{\emph{nodename}\}} (where node name is for example \texttt{L1label} or \texttt{L2annotation}), and the anchor used for positioning the node as \texttt{\textbackslash ctikzgetanchor\{\emph{component label}\}\{\emph{type}\}}, where \emph{component label} is, for example, \texttt{L1} and type is either \texttt{label} or \texttt{annotation} (notice that the syntax is slightly different, for implementation reasons).
+If you want to have more access to the label positioning algorithm, since \texttt{1.2.5} you can access the label  rotation using the command \texttt{\textbackslash ctikzgetdirection\{\emph{nodename}\}} (where node name is for example \texttt{L1label} or \texttt{L2annotation}), and the anchor used for positioning the node as \texttt{\textbackslash ctikzgetanchor\{\emph{component label}\}\{\emph{type}\}}, where \emph{component label} is, for example, \texttt{L1} and type is either \texttt{label} or \texttt{annotation} (notice that the syntax is slightly different, for implementation reasons).
 Those values are available only if the dipole declares a \texttt{l} or \texttt{a} keys; if you want them without any label you need to declare a blank one (like for example \texttt{l=\textasciitilde}).
 The following example gives an idea of the values of those macro for the three types of label positioning strategies.
 
@@ -6643,9 +6806,105 @@
 \end{circuitikz}
 \end{LTXexample}
 
+
+\subsubsection{Fixed voltage arrows: an example of advanced voltage usage}
+
+\begingroup % to contain example definitions
+An interesting application of the advanced voltage is to have fixed length straight voltage arrows.\footnote{This was suggested by users  \texttt{Franklin} and \texttt{Zarko} in \href{https://tex.stackexchange.com/questions/574576/circuitikz-straight-voltage-arrows-with-fixed-length}{a question on \texttt{tex.stackexchange.com}}}
+The normal voltage arrows length depends not on the component length but on the node distance (this is the behavior since when the voltages were first introduced, so it can't be changed).
+
+\begin{LTXexample}[varwidth=true, basicstyle=\scriptsize\ttfamily, pos=t]
+\begin{circuitikz}[european,]
+    \ctikzset{voltage=straight}
+    \draw (0,0) to[R,v=$v_1$,*-*] ++(2,0) to[R, v<=$v_2$] ++(4,0) to[C, *-*, v=$v_3$] ++(1,0);
+\end{circuitikz}
+\end{LTXexample}
+
+Using the advanced voltage interface mechanism, you can for example design voltages that are of fixed lengths; in the example below the new \texttt{xparse} method for defining commands is used, so that we can have a couple of different optional arguments:
+
+
+\begin{lstlisting}[basicstyle=\scriptsize\ttfamily]
+\NewDocumentCommand{\fixedvlen}{O{0.5cm} m m O{}}{% [semilength]{node}{label}[extra options]
+    % get the center of the standard arrow
+    \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
+    % draw an arrow of a fixed size around that center and on the same line
+    \draw[-Triangle, #4] ($(#2-Vcenter)!#1!(#2-Vfrom)$) -- ($(#2-Vcenter)!#1!(#2-Vto)$);
+    % position the label as in the normal voltages
+    \node[anchor=\ctikzgetanchor{#2}{Vlab}, #4] at (#2-Vlab) {#3};
+}
+\end{lstlisting}
+\NewDocumentCommand{\fixedvlen}{O{0.5cm} m m O{}}{% [semilength]{node}{label}[extra options]
+    % get the center of the standard arrow
+    \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
+    % draw an arrow of a fixed size around that center and on the same line
+    \draw[-Triangle, #4] ($(#2-Vcenter)!#1!(#2-Vfrom)$) -- ($(#2-Vcenter)!#1!(#2-Vto)$);
+    % position the label as in the normal voltages
+    \node[anchor=\ctikzgetanchor{#2}{Vlab}, #4] at (#2-Vlab) {#3};
+}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\scriptsize\ttfamily, pos=t]
+\begin{circuitikz}[european,]
+    \ctikzset{voltage=straight}
+    \draw (0,2) to[R,v=$v_1$,*-*] ++(2,0) to[R, v<=$v_2$] ++(4,0) to[C, *-*, v=$v_3$] ++(1,0);
+    \draw (0,0) to[R,v=,name=v1,*-*] ++(2,0) to[R, v<=, name=v2] ++(4,0) to[C, *-*, v, name=v3] ++(1,0);
+    \fixedvlen{v1}{$V_1$}
+    \fixedvlen{v2}{$V_2$}
+    \fixedvlen{v3}{$V_3$}[red]
+\end{circuitikz}
+\end{LTXexample}
+
+Notice that with a coherent naming you can use a \verb|\foreach| loop for the last three lines.
+
+You can also notice that the arrow is not exactly the same as other arrows in the circuit; if you want them to be exactly the same, you can use a trick to get the default \Circuitikz{} arrow size --- please look at \href{https://tex.stackexchange.com/questions/549347/circuitikz-arrowhead/549354#549354}{this answer by Romano on \texttt{tex.stackexchange.com}}.
+
+Another possibility is to have the arrow length based on the length of the component; for example you can use this code:
+
+\begin{lstlisting}[basicstyle=\scriptsize\ttfamily]
+\NewDocumentCommand{\compvlen}{O{1.5} m m O{}}{% [relative length]{node}{label}[extra options]
+    % get the center of the standard arrow
+    \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
+    % draw an arrow of a size proportional to the component length
+    % around that center and on the same line
+    % the component length is calculated using the let...in with the left and right anchors
+    % and multiplied by the relative length
+    \draw[-Triangle, #4] let \p1=(#2.left), \p2=(#2.right), \n1={0.5*#1*veclen(\x2-\x1,\y2-\y1)}
+        in ($(#2-Vcenter)!\n1!(#2-Vfrom)$) -- ($(#2-Vcenter)!\n1!(#2-Vto)$);
+    % position the label as in the normal voltages
+    \node[anchor=\ctikzgetanchor{#2}{Vlab}, #4] at (#2-Vlab) {#3};
+}
+\end{lstlisting}
+\NewDocumentCommand{\compvlen}{O{1.5} m m O{}}{% [relative length]{node}{label}[extra options]
+    % get the center of the standard arrow
+    \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
+    % draw an arrow of a size proportional to the component length
+    % around that center and on the same line
+    % the component length is calculated using the let...in with the left and right anchors
+    % and multiplied by the relative length
+    \draw[-Triangle, #4] let \p1=(#2.left), \p2=(#2.right), \n1={0.5*#1*veclen(\x2-\x1,\y2-\y1)}
+        in ($(#2-Vcenter)!\n1!(#2-Vfrom)$) -- ($(#2-Vcenter)!\n1!(#2-Vto)$);
+    % position the label as in the normal voltages
+    \node[anchor=\ctikzgetanchor{#2}{Vlab}, #4] at (#2-Vlab) {#3};
+}
+
+
+\begin{LTXexample}[varwidth=true, basicstyle=\scriptsize\ttfamily, pos=t]
+\begin{circuitikz}[european,]
+    \ctikzset{voltage=straight}
+    \draw (0,2) to[R,v=$v_1$,*-*] ++(2,0) to[R, v<=$v_2$] ++(4,0) to[C, *-*, v=$v_3$] ++(1,0);
+    \draw (0,0) to[R,v=,name=v1,*-*] ++(2,0) to[R, v<=, name=v2] ++(4,0) to[C, *-*, v, name=v3] ++(1,0);
+    \compvlen{v1}{$V_1$}
+    \compvlen{v2}{$V_2$}
+    \compvlen{v3}{$V_3$}[red]
+\end{circuitikz}
+\end{LTXexample}
+
+
+\endgroup
+
+
 \subsection{Integration with {\ttfamily siunitx}}
 
-If the option {\ttfamily siunitx} is active (and \emph{not} in \ConTeXt), then the following are equivalent:
+If the option {\ttfamily siunitx} is active\footnote{This option is still experimental --- personally (Romano) I would advise using the normal \texttt{\textbackslash SI\{\}\{\}} syntax.}  (and \emph{not} in \ConTeXt), then the following are equivalent:
 
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}

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-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -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.5}
-\def\pgfcircversiondate{2020/10/14}
+\def\pgfcircversion{1.2.6}
+\def\pgfcircversiondate{2020/12/16}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -113,9 +113,9 @@
 american or shape=roundy,% could be pointy
 %
 % flip-flops
-flipflops/scale=1.0
-flipflops/fill=none
-flipflops/thickness=none
+flipflops/scale=1.0,
+flipflops/fill=none,
+flipflops/thickness=none,
 %
 % Integrated circuits
 chips/scale=1.0,

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -59,8 +59,8 @@
 american or shape=pointy,
 %
 % flip-flops
-flipflops/scale=1.0
-flipflops/thickness=2.0
+flipflops/scale=1.0,
+flipflops/thickness=2.0,
 %
 % Switches
 bipoles/cuteswitch/thickness=0.5,

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -897,7 +897,7 @@
 \ctikzset{bipoles/bulb/height/.initial=.8}
 \ctikzset{bipoles/bulb/width/.initial=.8}
 \ctikzset{bipoles/tline/height/.initial=.3}
-\ctikzset{bipoles/tline/width/.initial=.8}
+\ctikzset{bipoles/tline/width/.initial=.6}
 \ctikzset{bipoles/squid/height/.initial=.60}
 \ctikzset{bipoles/squid/width/.initial=.60}
 \ctikzset{bipoles/barrier/height/.initial=.60}
@@ -1067,7 +1067,7 @@
 \ctikzset{schottky base/.add code={}{\pgf at circuit@bpt at schottkytrue}}
 \pgfkeys{/tikz/no schottky base/.add code={}{\pgf at circuit@bpt at schottkyfalse}}
 \ctikzset{no schottky base/.add code={}{\pgf at circuit@bpt at schottkyfalse}}
-\ctikzset{tripoles/schottky base size/.initial=0.07}
+\ctikzset{tripoles/schottky base size/.initial=0.05}
 
 % Option draw bpt without base connection
 \newif\ifpgf at circuit@bpt at drawbase
@@ -1592,6 +1592,17 @@
 \tikzset{all leads/.code={\pgfcirc at draw@output at leadstrue\pgfcirc at draw@input at leadstrue}}
 \tikzset{no leads/.code={\pgfcirc at draw@output at leadsfalse\pgfcirc at draw@input at leadsfalse}}
 
+% adding a different style of xnor port
+% see https://github.com/circuitikz/circuitikz/issues/467
+\ctikzset{european xnor style/.is choice}
+\ctikzset{european xnor style/default/.code={%
+    \pgfcircdeclareeurologicport{xnor}{$=1$}{\pgf at circ@res at count}{not}}%
+}
+\ctikzset{european xnor style/direct/.code={%
+    \pgfcircdeclareeurologicport{xnor}{$=$}{\pgf at circ@res at count}{}}%
+}
+
+
 % old, legacy keys that should be killed over
 \ctikzset{bipoles/buffer/height/.initial=1}
 \ctikzset{bipoles/buffer/width/.initial=1}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -3242,7 +3242,9 @@
 
 %% Push Button
 \pgfcircdeclarebipolescaled{switches}
-{}
+{
+    \anchor{tip}{\northeast\pgf at x=0pt\relax}
+}
 {\ctikzvalof{bipoles/pushbutton/height 2}}
 {pushbutton}
 {\ctikzvalof{bipoles/pushbutton/height}}
@@ -3263,7 +3265,9 @@
 
 %% Normally closed Push Button
 \pgfcircdeclarebipolescaled{switches}
-{}
+{
+    \anchor{tip}{\northeast\pgf at x=0pt\relax}
+}
 {\ctikzvalof{bipoles/pushbutton/height 2}}
 {ncpushbutton}
 {\ctikzvalof{bipoles/pushbutton/height}}
@@ -3284,6 +3288,64 @@
     \pgftransformshift{\pgfpoint{2\pgf at circ@res at right}{0pt}}
     \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
 }
+%% Push Button (normally closed but now open :-) see
+%% https://github.com/circuitikz/circuitikz/issues/128#issuecomment-731771299
+\pgfcircdeclarebipolescaled{switches}
+{
+    \anchor{tip}{
+        \pgf at circ@res at temp=\ctikzvalof{nodes width}\pgf at circ@Rlen
+        \northeast\divide\pgf at y by 2\advance\pgf at y by \pgf at circ@res at temp
+        \pgf at x=0pt\relax
+    }
+}
+{\ctikzvalof{bipoles/pushbutton/height 2}}
+{pushbuttonc}
+{\ctikzvalof{bipoles/pushbutton/height}}
+{\ctikzvalof{bipoles/pushbutton/width}}
+{
+    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+    \pgf at circ@res at temp=\ctikzvalof{nodes width}\pgf at circ@Rlen
+    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at temp}}
+    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at temp}}
+    \pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at temp}}
+    \pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at up/2+\pgf at circ@res at temp}}
+    \pgfusepath{draw}
+
+    \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+    \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+    \pgftransformshift{\pgfpoint{2\pgf at circ@res at right}{0pt}}
+    \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+}
+
+%% Normally closed Push Button now open
+\pgfcircdeclarebipolescaled{switches}
+{
+    \anchor{tip}{
+        \pgf at circ@res at temp=\ctikzvalof{nodes width}\pgf at circ@Rlen
+        \northeast\divide\pgf at y by 2\advance\pgf at y by \pgf at circ@res at temp
+        \pgf at x=0pt\relax
+    }
+}
+{\ctikzvalof{bipoles/pushbutton/height 2}}
+{ncpushbuttono}
+{\ctikzvalof{bipoles/pushbutton/height}}
+{\ctikzvalof{bipoles/pushbutton/width}}
+{
+    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+    % This is the radius of the "ocirc" shape (see pgfcircshapes.tex)
+    % Warning, if the nodes will have a class, we have to touch this.
+    \pgf at circ@res at temp=\ctikzvalof{nodes width}\pgf at circ@Rlen
+    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up/2}}
+    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-\pgf at circ@res at up/2}}
+    \pgfpathmoveto{\pgfpoint{0}{-\pgf at circ@res at up/2}}
+    \pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at up/2+\pgf at circ@res at temp}}
+    \pgfusepath{draw}
+    %
+    \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+    \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+    \pgftransformshift{\pgfpoint{2\pgf at circ@res at right}{0pt}}
+    \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+}
 %%% reed switches
 \pgfcircdeclarebipolescaled{switches}
 {}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -380,12 +380,15 @@
     \anchor{south east}{\northeast\pgf at y=-\pgf at y}
     \anchor{south west}{\northeast\pgf at x=0cm\pgf at y=-\pgf at y}
     \anchor{center}{\pgfpointorigin}
+    % this is not exact, but it's better than nothing
+    \anchor{text}{\northeast\pgf at xa=\pgf at x\pgf at ya=\pgf at y
+        \pgfpoint{\dimexpr-.5\wd\pgfnodeparttextbox+.8\pgf at xa}
+        {\dimexpr-.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf at ya}}
     \behindforegroundpath{
         \pgfstartlinewidth=\pgflinewidth
 
         \pgf at circ@scaled at Rlen=\scaledRlen
-        \pgf at circ@res at step=\ctikzvalof{bipoles/tline/width} \pgf at circ@scaled at Rlen
-        \pgf at circ@res at step=0.6\pgf at circ@scaled at Rlen
+        \pgf at circ@res at step=\ctikzvalof{bipoles/tline/width}\pgf at circ@scaled at Rlen
 
         \pgfscope\begin{pgftransparencygroup}
             \pgfpathellipse{\pgfpoint{0.5\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0.125\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
@@ -618,6 +621,89 @@
     }
 }
 
+%%% dynodes (see https://github.com/circuitikz/circuitikz/issues/469)
+\ctikzset{monopoles/dynode/width/.initial=0.4}
+\ctikzset{monopoles/dynode/height/.initial=0.8}
+\ctikzset{monopoles/dynode/arc pos/.initial=0.5}
+\ctikzset{monopoles/dynode/arc angle/.initial=30}
+\ctikzset{monopoles/dynode/top width/.initial=1.0}
+
+\pgfdeclareshape{dynode}{
+    \savedmacro{\ctikzclass}{\edef\ctikzclass{tubes}}
+    \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
+    \anchor{center}{\pgfpointorigin}
+    \savedanchor{\northeast}{
+        \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+        \pgf at x=\ctikzvalof{monopoles/dynode/width}\pgf at circ@scaled at Rlen
+        \pgf at x=0.5\pgf at x
+        \pgf at y=\ctikzvalof{monopoles/dynode/height}\pgf at circ@scaled at Rlen
+    }
+    \savedanchor{\arcpos}{% bottom part of the arc pos
+        \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+        \pgf at x=0pt
+        \pgf at y=\ctikzvalof{monopoles/dynode/height}\pgf at circ@scaled at Rlen
+        \pgf at y=\ctikzvalof{monopoles/dynode/arc pos}\pgf at y
+    }
+    \savedanchor{\topright}{%
+        \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+        \pgf at x=\ctikzvalof{monopoles/dynode/width}\pgf at circ@scaled at Rlen
+        \pgf at x=\ctikzvalof{monopoles/dynode/top width}\pgf at x
+        \pgf at x=0.5\pgf at x
+        \pgf at y=\ctikzvalof{monopoles/dynode/height}\pgf at circ@scaled at Rlen
+    }
+    \anchor{arc}{\arcpos}
+    \anchor{top right}{\topright}
+    \anchor{top left}{\topright\pgf at x=-\pgf at x}
+    \anchor{text}{
+        \northeast
+        \advance\pgf at x by 4pt\relax
+        \pgf at y=\dimexpr0.5\pgf at y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax
+    }
+    \anchor{top}{\northeast\pgf at x=0pt}
+    \anchor{right}{\northeast\pgf at y=0.5\pgf at y}
+    \anchor{left}{\northeast\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{bottom}{\pgfpointorigin}
+    \anchor{north}{\northeast\pgf at x=0pt}
+    \anchor{east}{\northeast\pgf at y=0.5\pgf at y}
+    \anchor{west}{\northeast\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{south}{\pgfpointorigin}
+    \anchor{north east}{\northeast}
+    \anchor{north west}{\northeast\pgf at x=-\pgf at x}
+    \anchor{south east}{\northeast\pgf at y=0pt\relax}
+    \anchor{south west}{\northeast\pgf at y=0pt\pgf at x=-\pgf at x}
+    \behindforegroundpath{
+        \pgfstartlinewidth=\pgflinewidth
+        \pgf at circ@scaled at Rlen=\scaledRlen
+        \pgfsetcolor{\ctikzvalof{color}}
+        \northeast
+        \pgf at circ@res at right=\pgf at x
+        \pgf at circ@res at up=\pgf at y
+        \arcpos
+        \pgf at circ@res at step=\pgf at y
+        % top
+        \pgfscope
+            \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+            \pgfpathmoveto{\pgfpoint{-\ctikzvalof{monopoles/dynode/top width}*\pgf at circ@res at right}{\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint{\ctikzvalof{monopoles/dynode/top width}*\pgf at circ@res at right}{\pgf at circ@res at up}}
+            \pgfusepath{draw}
+        \endpgfscope
+        % arc
+        \edef\@@angle{\ctikzvalof{monopoles/dynode/arc angle}}
+        \ifnum90=\@@angle\else % avoid divisions by zero
+            % radius
+            \pgfmathsetlength{\pgf at circ@res at other}{\pgf at circ@res at right/cos(\@@angle)}
+            % start angle y position
+            \pgfmathsetlength{\pgf at circ@res at step}{\pgf at circ@res at step+\pgf at circ@res at other*(1-sin(\@@angle))}
+            \pgfsetlinewidth{\pgfstartlinewidth}
+            \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at right}{\pgf at circ@res at step}}
+            \pgfpatharc{-180+\@@angle}{-\@@angle}{\pgf at circ@res at other}
+        \fi
+        % tail
+        \pgfpathmoveto{\pgfpointorigin}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+        \pgfusepath{draw}
+    }
+}
 % Microstrip monopoles
 
 \pgfdeclareshape{mslstub}{

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -337,6 +337,8 @@
 \def\pgf at circ@ncs at path#1{\pgf at circ@bipole at path{ncs}{#1}}
 \def\pgf at circ@pushbutton at path#1{\pgf at circ@bipole at path{pushbutton}{#1}}
 \def\pgf at circ@ncpushbutton at path#1{\pgf at circ@bipole at path{ncpushbutton}{#1}}
+\def\pgf at circ@pushbuttonc at path#1{\pgf at circ@bipole at path{pushbuttonc}{#1}}
+\def\pgf at circ@ncpushbuttono at path#1{\pgf at circ@bipole at path{ncpushbuttono}{#1}}
 \def\pgf at circ@open at path#1{\pgf at circ@bipole at path{open}{#1}}
 \def\pgf at circ@generic at path#1{\pgf at circ@bipole at path{generic}{#1}}
 \def\pgf at circ@ageneric at path#1{\pgf at circ@bipole at path{ageneric}{#1}}
@@ -668,6 +670,10 @@
 \compattikzset{normally open push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbutton at path, l=#1}}
 \compattikzset{ncpb/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ncpushbutton at path, l=#1}}
 \compattikzset{normally closed push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ncpushbutton at path, l=#1}}
+\compattikzset{nopbc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbuttonc at path, l=#1}}
+\compattikzset{normally open push button closed/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbuttonc at path, l=#1}}
+\compattikzset{ncpbo/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ncpushbuttono at path, l=#1}}
+\compattikzset{normally closed push button open/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ncpushbuttono at path, l=#1}}
 \compattikzset{toggle switch/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@toggleswitch at path}}
 
 \compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path}}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2020-12-17 22:17:39 UTC (rev 57160)
@@ -1571,12 +1571,112 @@
 %% Transistors
 %%%%%%%%%%%%%%%%%%%%%%%%
 
+%
+% definitions for transistor circles
+%
+\ctikzset{transistor circle/.is family}
+\ctikzset{transistor circle/relative thickness/.initial=1}
+\ctikzset{transistor circle/color/.initial=default}
+\ctikzset{transistor circle/dash/.initial=none}
+\ctikzset{transistor circle/scale circle radius/.initial=1}
+\ctikzset{transistor circle/default base in/.initial=0.9}
+\ctikzset{transistor circle/njfet base in/.initial=1.05}
+\ctikzset{transistor circle/pjfet base in/.initial=1.05}
+\ctikzset{transistor circle/isfet base in/.initial=0.65}
 
+\newif\ifpgf at circ@trcircle\pgf at circ@trcirclefalse
+\ctikzset{tr circle/.is if=pgf at circ@trcircle}
+\tikzset{tr circle/.is if=pgf at circ@trcircle}
+%
+% add a circle to the transistor:
+%
+\def\pgfcirc at transistorcircle{
+    \ifpgf at circ@trcircle
+    \pgfscope
+        \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+        \pgfsetlinewidth{\ctikzvalof{transistor circle/relative thickness}\pgflinewidth}
+        \edef\@@none{none}\edef\@@default{default}
+        \edef\@@tmp{\ctikzvalof{transistor circle/color}}
+        \ifx\@@tmp\@@default\else
+            \pgfsetcolor{\@@tmp}
+        \fi
+        \edef\@@tmp{\ctikzvalof{transistor circle/dash}}
+        \ifx\@@tmp\@@none\else
+            \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
+        \fi
+        % radius of the circle
+        % \pgfmathsetlength{\pgf at circ@res at temp}{((#2+\extrabodydiodelen)-(#1)+(#3)*(#3)/((#2+\extrabodydiodelen)-(#1)))/2}
+        % \pgfpathcircle{\pgfpoint{#1+\pgf at circ@res at temp}{0pt}}{\pgf at circ@res at temp}
+        \pgfpathcircle{\pgfpoint{\circleleft+\circleradius}{0pt}}{\circleradius}
+        \pgf at circ@draworfill
+    \endpgfscope
+    \fi
+}
+
 \long\def\pgfcircdeclaretransistor#1#2#3{
     \pgfdeclareshape{#1}
     {
         \savedmacro{\ctikzclass}{\edef\ctikzclass{transistors}}
         \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
+        \savedmacro{\circlebase}{
+            \pgfkeysifdefined{\circuitikzbasekey/transistor circle/#1 base in}%
+            {% yes, we have it
+                \edef\circlebase{\ctikzvalof{transistor circle/#1 base in}}%
+            }{% no, use default
+                \edef\circlebase{\ctikzvalof{transistor circle/default base in}}
+            }}
+        % \savedmacro{\thistypeoftr}{\edef\thistypeoftr{#1}}
+        \saveddimen{\extrabodydiodelen}{
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \ifpgf at circuit@fet at bodydiode
+                % try to put the text to the right of the flyback diode
+                \pgfmathsetlength{\pgf at x}{(
+                    \ctikzvalof{tripoles/#1/bodydiode distance}*
+                    \ctikzvalof{tripoles/#1/width} +
+                    \ctikzvalof{tripoles/#1/bodydiode scale}*
+                    \ctikzvalof{bipoles/diode/height}/2
+                )*\pgf at circ@scaled at Rlen}
+            \else
+                \pgf at x=0pt\relax
+            \fi
+        }
+        \savedmacro{\scaecircleradius}{
+            \edef\scalecircleradius{\ctikzvalof{transistor circle/scale circle radius}}
+        }
+        \saveddimen{\circleradius}{
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            % repeat the extrabodydiodelen (grrr)
+            \ifpgf at circuit@fet at bodydiode
+                % try to put the text to the right of the flyback diode
+                \pgfmathsetlength{\pgf at circ@res at other}{(
+                    \ctikzvalof{tripoles/#1/bodydiode distance}*
+                    \ctikzvalof{tripoles/#1/width} +
+                    \ctikzvalof{tripoles/#1/bodydiode scale}*
+                    \ctikzvalof{bipoles/diode/height}/2
+                )*\pgf at circ@scaled at Rlen}
+            \else
+                \pgf at circ@res at other=0pt\relax
+            \fi
+            % left
+            \pgf at xa=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen
+            \pgf at xa=\circlebase\pgf at xa % this is the base point of the circle
+            % northeast
+            \pgf at yb=\ctikzvalof{tripoles/#1/height}\pgf at circ@scaled at Rlen % y of the left point of circle
+            \pgf at yb=.5\pgf at yb
+            \pgf at xb=\pgf at circ@res at other % this is the x of the right points of the circle
+            %
+            \pgf at yb=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at yb %this is #3 of the circle
+            % find the radius of the circle
+            \pgfmathsetlength{\pgf at x}{((\pgf at xb)-(\pgf at xa)+(\pgf at yb)*(\pgf at yb)/((\pgf at xb)-(\pgf at xa)))/2*\scalecircleradius}
+        }
+        \saveddimen{\circleleft}{
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \pgf at xa=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen
+            \pgf at x=\circlebase\pgf at xa
+        }
+        \anchor{circle center}{
+            \pgf at y=0pt\pgf at x=\circleleft\advance\pgf at x by\circleradius
+        }
         \anchor{center}{
             \pgfpointorigin
         }
@@ -1600,15 +1700,13 @@
             \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
             \ifpgf at circuit@transisors at fixlabels
                 \ifpgf at circuit@fet at bodydiode
-                    % try to put the text to the right of the flyback diode
-                    \pgfmathsetlength{\pgf at circ@res at other}{(
-                        \ctikzvalof{tripoles/#1/bodydiode distance}*
-                        \ctikzvalof{tripoles/#1/width} +
-                        \ctikzvalof{tripoles/#1/bodydiode scale}*
-                        \ctikzvalof{bipoles/diode/height}/2
-                        )*\pgf at circ@scaled at Rlen}
-                    \advance\pgf at x by \pgf at circ@res at other
+                    \advance \pgf at x by \extrabodydiodelen
                 \fi
+                \ifpgf at circ@trcircle
+                    \left\pgf at xa=\pgf at x
+                    \pgfmathsetlength{\pgf at x}{\circleleft+2*\circleradius}
+                    % \advance \pgf at x by \circleradius
+                \fi
                 % add a bit of space to avoid central (substrate) terminal if drawn
                 \advance\pgf at x by 0.05\pgf at circ@scaled at Rlen\relax
                 \pgf at y=\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax
@@ -1703,6 +1801,10 @@
             \left
             \pgf at x=\ctikzvalof{tripoles/#1/base width}\pgf at x
         }
+        \anchor{circle base}{
+            \left
+            \pgf at x=\circlebase\pgf at x
+        }
         \anchor{nogate}{
             \left
             \pgf at x=\ctikzvalof{tripoles/#1/gate width}\pgf at x
@@ -1744,6 +1846,33 @@
             \pgf at y=\ctikzvalof{tripoles/#1/curr direction}\pgf at y
             \pgf at y=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at y
         }
+        \anchor{circle C}{
+            \left
+            \pgf at xa=\circlebase\pgf at x % this is #1 of the circle
+            \northeast
+            \pgf at xb=\pgf at x %this is #2 of the circle
+            \pgf at yb=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at y %this is #3 of the circle
+            % the base of the triangle is x_2 - x_1 - r
+            \pgfmathsetlength{\pgf at circ@res at other}{\pgf at xb-\pgf at xa-\circleradius}
+            % so let's go with the height
+            \pgfmathsetlength{\pgf at ya}{sqrt(abs(\circleradius*\circleradius-\pgf at circ@res at other*\pgf at circ@res at other))}
+            % finally, direction
+            \pgf at y=\ctikzvalof{tripoles/#1/curr direction}\pgf at ya
+        }
+        \anchor{circle E}{
+            \left
+            \pgf at xa=\circlebase\pgf at x % this is #1 of the circle
+            \northeast
+            \pgf at xb=\pgf at x %this is #2 of the circle
+            \pgf at yb=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at y %this is #3 of the circle
+            % the base of the triangle is x_2 - x_1 - r
+            \pgfmathsetlength{\pgf at circ@res at other}{\pgf at xb-\pgf at xa-\circleradius}
+            % so let's go with the height
+            \pgfmathsetlength{\pgf at ya}{sqrt(abs(\circleradius*\circleradius-\pgf at circ@res at other*\pgf at circ@res at other))}
+            % finally, direction
+            % finally, direction
+            \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at ya
+        }
         \anchor{body E in}{
             \northeast
             \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at y
@@ -1853,6 +1982,10 @@
             \pgf at y=-\ctikzvalof{tripoles/#1/base height}\pgf at y
         }
         }{
+
+        % add the circle if requested (before everything else, so we can fill it)
+        \pgfcirc at transistorcircle
+
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
         \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
         {\ctikzvalof{tripoles/#1/base height}\pgf at circ@res at up}}
@@ -2360,6 +2493,8 @@
         }
     }
     {
+        % add the circle if requested (before everything else, so we can fill it)
+        \pgfcirc at transistorcircle
         %draw upper connection
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
         \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
@@ -2468,6 +2603,9 @@
             \pgf at y=-\ctikzvalof{tripoles/nmos/gate height}\pgf at y
         }
     }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
+
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
     {\ctikzvalof{tripoles/nmos/gate height}\pgf at circ@res at up}}
@@ -2552,6 +2690,8 @@
             \pgf at y=-\ctikzvalof{tripoles/pmos/gate height}\pgf at y
         }
     }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
     {\ctikzvalof{tripoles/pmos/gate height}\pgf at circ@res at up}}
@@ -2682,6 +2822,8 @@
         }
     }{%
     % draw depletion channel
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     \pgfscope
         \pgfpathrectanglecorners
         {\pgfpoint
@@ -2782,6 +2924,8 @@
             \advance\pgf at x by -\pgf at circ@res at temp
         }
     }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     % draw depletion channel
     \pgfscope
         \pgfpathrectanglecorners
@@ -2893,6 +3037,8 @@
             \pgf at y=-\ctikzvalof{tripoles/hemt/gate height}\pgf at y
         }
     }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
     {\ctikzvalof{tripoles/hemt/gate height}\pgf at circ@res at up}}
@@ -2928,6 +3074,9 @@
 
 \long\def\drawfetcore#1{
     \pgftransformationadjustments
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
+
     %top connection
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
@@ -3192,6 +3341,8 @@
             \pgf at y=-\ctikzvalof{tripoles/njfet/gate height 2}\pgf at y
         }
     }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
     {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at up}}
@@ -3257,6 +3408,8 @@
             \pgf at y=-\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at y
         }
     }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
     {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
@@ -3311,7 +3464,10 @@
     \pgfusepath{draw}
 }
 
-\pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
+\pgfdeclaretransistorwrapperaddbulk{isfet}{
+    }{%
+    % add the circle if requested (before everything else, so we can fill it)
+    \pgfcirc at transistorcircle
     \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
     % DRAIN CONNECTION
     \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2020-12-17 22:16:56 UTC (rev 57159)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2020-12-17 22:17:39 UTC (rev 57160)
@@ -12,8 +12,8 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\pgfcircversion{1.2.5}
-\def\pgfcircversiondate{2020/10/14}
+\def\pgfcircversion{1.2.6}
+\def\pgfcircversiondate{2020/12/16}
 
 \ProvidesPackage{circuitikz}%
 [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]



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