texlive[52709] Master/texmf-dist: circuitikz (9nov19)

commits+karl at tug.org commits+karl at tug.org
Sat Nov 9 23:01:48 CET 2019


Revision: 52709
          http://tug.org/svn/texlive?view=revision&revision=52709
Author:   karl
Date:     2019-11-09 23:01:48 +0100 (Sat, 09 Nov 2019)
Log Message:
-----------
circuitikz (9nov19)

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/pgfcirc.defines.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.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	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2019-11-09 22:01:48 UTC (rev 52709)
@@ -1,6 +1,21 @@
 <!--- 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 0.9.6 (2019-11-09)
+
+    The highlights of this release are the new multiple terminals BJTs and several stylistic addition and fixes; if you like to pixel-peep, you will like the fixed transistors arrows. Additionally, the transforms are much more configurable now, the "pmos" and "nmos" elements have grown an optional bulk connection, and you can use the "flow" arrows outside of a path.
+
+    Several small and less small bugs have been fixed.
+
+    - Added multi-collectors and multi-emitter bipolar transistors
+    - Added the possibility to style each one of the two coils in a transformer independently
+    - Added bulk connection to normal MOSFETs and the respective anchors
+    - Added "text" anchor to the flow arrows, to use them alone in a consistent way
+    - Fixed flow, voltage, and current arrow positioning when "auto" is active on the path
+    - Fixed transistors arrows overshooting the connection point, added a couple of anchors
+    - Fixed a spelling error on op-amp key "noinv input down"
+    - Fixed a problem with "quadpoles style=inner" and "transformer core" having the core lines running too near
+
 * Version 0.9.5 (2019-10-12)
 
     This release basically add features to better control labels, voltages and similar text "ornaments" on bipoles, plus some other minor things.

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -5,6 +5,42 @@
 
 \begin{itemize}
 \item
+  Version 0.9.6 (2019-11-09)
+
+  The highlights of this release are the new multiple terminals BJTs and
+  several stylistic addition and fixes; if you like to pixel-peep, you
+  will like the fixed transistors arrows. Additionally, the transforms
+  are much more configurable now, the ``pmos'' and ``nmos'' elements
+  have grown an optional bulk connection, and you can use the ``flow''
+  arrows outside of a path.
+
+  Several small and less small bugs have been fixed.
+
+  \begin{itemize}
+  \tightlist
+  \item
+    Added multi-collectors and multi-emitter bipolar transistors
+  \item
+    Added the possibility to style each one of the two coils in a
+    transformer independently
+  \item
+    Added bulk connection to normal MOSFETs and the respective anchors
+  \item
+    Added ``text'' anchor to the flow arrows, to use them alone in a
+    consistent way
+  \item
+    Fixed flow, voltage, and current arrow positioning when ``auto'' is
+    active on the path
+  \item
+    Fixed transistors arrows overshooting the connection point, added a
+    couple of anchors
+  \item
+    Fixed a spelling error on op-amp key ``noinv input down''
+  \item
+    Fixed a problem with ``quadpoles style=inner'' and ``transformer
+    core'' having the core lines running too near
+  \end{itemize}
+\item
   Version 0.9.5 (2019-10-12)
 
   This release basically add features to better control labels, voltages

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	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -138,7 +138,7 @@
             (a2-|GND);
             \draw (C.pin 3) to[D, fill=green] ++(0,-5)-- ++(0.5,0) to[R] ++(2,0)
             coordinate(a3) to[short, -*]
-            node[above left, blue]{Stefan Erhart}
+            node[above left, blue]{Stefan Erhardt}
             node[below left,]{\email{stefan.erhardt at fau.de}}
             (a3-|GND);
             \draw (C.pin 1) to[D, fill=yellow] ++(0,-7)-- ++(0.5,0) to[R] ++(2,0)
@@ -358,7 +358,7 @@
 
 Let's say we want to prepare a circuit to teach how a current shunt works; the idea is to draw a current generator, a couple of resistors in parallel, and the indication of currents and voltages for the discussion.
 
-A circuit in \Circuitikz is drawn into a \texttt{circuitikz} environment (which is really an alias for \texttt{tikzpicture}). In this first example we will use absolute coordinates.
+A circuit in \Circuitikz{} is drawn into a \texttt{circuitikz} environment (which is really an alias for \texttt{tikzpicture}). In this first example we will use absolute coordinates.
 The electrical components can be divided in two main categories: the one that are bipoles and are placed along a path (also known as \texttt{to}-style component, for their usage), and components that are nodes and can have any number of poles or connections.
 
 Let's start with the first type of component, and build a basic mesh:
@@ -1362,7 +1362,7 @@
 You can change the width of these components (all the inductors together, unless you use style or scoping) by setting the key \texttt{inductors/width}  to something different from the default, which is  \texttt{0.8} for american and european inductors, and \texttt{0.6} for cute inductors.
 
 Moreover, you can change the number of ``coils'' drawn by setting the key
-\texttt{inductors/coils} (default value \texttt{5} for cute inductors and \texttt{4} for american ones).
+\texttt{inductors/coils} (default value \texttt{5} for cute inductors and \texttt{4} for american ones). \textbf{Notice} that the minimum number of \texttt{coils} is \texttt{1} for american inductors, and \texttt{2} for cute ones.
 
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}[
@@ -1942,11 +1942,13 @@
 
 \subsection{Arrows}\label{sec:arrows}
 
-These are pseudo-arrows used in lot of places in the packages (for transistors, flows, currents, and so on).
+These are pseudo-arrows used in lot of places in the packages (for transistors, flows, currents, and so on). The first three arrows are magnified by a factor~3 in the boxes below; for the \texttt{trarrow}, the anchor \texttt{tip} is exactly on the tip and \texttt{btip} is slightly receded.
 
 \begin{groupdesc}
-    \circuitdesc{currarrow}{Arrows (current and voltage)}{}(center/0/0.2)
-    \circuitdesc{inputarrow}{Arrow to draw at its tip, useful for block diagrams.}{}(center/0/0.2)
+    \circuitdesc[3]{currarrow}{Arrow for current and voltage}{}(center/0/0.2)
+    \circuitdesc[3]{inputarrow}{Arrow that is anchored at its tip, useful for block diagrams.}{}(center/0/0.2)
+    \circuitdesc[3]{trarrow}{Arrow the same size of \texttt{currarrow} but only filled.}{}(center/90/0.2, tip/0/0.2, btip/-90/0.2)
+    \circuitdesc{flowarrow}{Arrow used for the flows, with a \texttt{text} anchor}{$I_p$}(center/-90/0.2, east/0/0.2, west/180/0.2, text/45/0.2)
 \end{groupdesc}
 
 \subsubsection{Arrows size}\label{sec:currarrow-size}
@@ -2193,10 +2195,9 @@
 
 \subsection{Transistors}
 
+\subsubsection{Standard bipolar transistors}
+
 \begin{groupdesc}
-    \circuitdesc{nmos}{nmos}{}( G/180/0.2,D/0/0.2,S/0/0.2 )
-    \circuitdesc{pmos}{pmos}{}
-    \circuitdesc{hemt}{hemt}{}
     \circuitdesc{npn}{npn}{}( B/180/0.2,C/0/0.2,E/0/0.2 )
     \circuitdesc{pnp}{pnp}{}
     \circuitdesc{npn,photo}{npn}{}( nobase/0/0.4 )
@@ -2207,10 +2208,72 @@
     \circuitdesc{Lpigbt}{Lpigbt}{}
 \end{groupdesc}
 
-For all transistors a body diode (or freewheeling diode) can automatically be drawn. Just use the global option bodydiode, or for single transistors, the tikz-option bodydiode:
+\subsubsection{Multi-terminal bipolar transistors}
 
+In addition to the standard BJTs transistors, since version~\texttt{0.9.6} the \texttt{bjtnpn} and \texttt{bjtpnp} are also available; these are devices where you can have more collectors and emitters (on the other hand, they have no \texttt{photo} nor \texttt{bodydiode} options --- they are silently ignored).
+
+Basically they are the same as the normal \texttt{npn} and \texttt{pnp}, and they (by default) have similar sizes; the options \texttt{collectors} and \texttt{emitters} will change the number of the relative terminals. The base terminal is connected midway from the collector and the emitter, \emph{not} on the center of the base; a \texttt{cbase} anchor is available if you prefer to use it. The label of the component (the text) is set on the right side, vertically centered around the base terminal.
+
+\begin{groupdesc}
+    \circuitdesc{bjtnpn, collectors=1, emitters=2}{bjt npn}{Q}(B/180/0.2, C/45/0.2, E/-45/0.2, C1/0/0.4, E1/0/0.4, E2/0/0.4, nobase/135/0.4, cbase/-135/0.4, center/0/0.6)
+    \circuitdesc{bjtpnp, collectors=3, emitters=2}{bjt pnp}{Q}(B/180/0.2, C/-45/0.2, E/45/0.2, C1/0/0.4, C2/0/0.4, C3/0/0.4, E1/0/0.4, E2/0/0.4, nobase/135/0.4, cbase/-135/0.4)
+\end{groupdesc}
+
+\subsubsection{Field-effect transistors}
+
+\begin{groupdesc}
+    \circuitdesc{nmos}{nmos}{}( G/180/0.2,D/0/0.2,S/0/0.2 )
+    \circuitdesc{pmos}{pmos}{}
+    \circuitdesc{hemt}{hemt}{}
+\end{groupdesc}
+
+\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option "solderdot" and "nosolderdot", respectm ively.
+
+\begin{groupdesc}
+    \circuitdesc{nfet}{nfet}{}
+    \circuitdesc{nigfete}{nigfete}{}
+    \circuitdesc{nigfete,solderdot}{nigfete}{}
+    \circuitdesc{nigfetebulk}{nigfetebulk}{}
+    \circuitdesc{nigfetd}{nigfetd}{}
+    \circuitdesc{pfet}{pfet}{}
+    \circuitdesc{pigfete}{pigfete}{}
+    \circuitdesc{pigfetebulk}{pigfetebulk}{}
+    \circuitdesc{pigfetd}{pigfetd}{}
+\end{groupdesc}
+
+\textsc{njfet} and \textsc{pjfet} have been incorporated based on code provided by Danilo Piazzalunga:
+\begin{groupdesc}
+    \circuitdesc{njfet}{njfet}{}
+    \circuitdesc{pjfet}{pjfet}{}
+\end{groupdesc}
+
+\textsc{isfet}
+\begin{groupdesc}
+    \circuitdesc{isfet}{isfet}{}
+\end{groupdesc}
+
+\subsubsection{Transistors customization}\label{sec:styling-transistors}
+
+The default position of the arrows in transistors is somewhat in the middle of the terminal; if you prefer you can move them to the end with the style key \texttt{transistors/arrow pos=end} (the default value is \texttt{legacy}).
+
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}
+   \ctikzset{tripoles/mos style=arrows}
+   \ctikzset{transistors/arrow pos=end}
+   \draw (0,0) node[npn, ](npn){};
+   \draw (2,0) node[pnp, ](npn){};
+   \draw (0,-2) node[nmos, ](npn){};
+   \draw (2,-2) node[pmos, ](npn){};
+\end{circuitikz}
+\end{LTXexample}
+
+You can change the scale of all the transistors by setting the key \texttt{transistors/scale} (default \texttt{1.0}).
+The size of the arrows (if any) is controlled by the same parameters as \texttt{currarrow} (see section~\ref{sec:currarrow-size}) and the dots on P-type transistors (if any) are the same as the nodes/poles (see section~\ref{sec:bipole-nodes}).
+
+For all transistors (minus \texttt{bjtnpn} and \texttt{bjtpnp})  a body diode (or freewheeling diode) can automatically be drawn. Just use the global option bodydiode, or for single transistors, the tikz-option bodydiode:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
    \draw (0,0) node[npn,bodydiode](npn){}++(2,0)node[pnp,bodydiode](npn){};
    \draw (0,-2) node[nigbt,bodydiode](npn){}++(2,0)node[pigbt,bodydiode](npn){};
    \draw (0,-4) node[nfet,bodydiode](npn){}++(2,0)node[pfet,bodydiode](npn){};
@@ -2246,6 +2309,14 @@
     \circuitdesc{pmos,nocircle,arrowmos}{pmos}{}
 \end{groupdesc}
 
+You can add a bulk terminal\footnote{Thanks to Burak Kelleci <kellecib at hotmail.com>.} to \texttt{nmos} and \texttt{pmos} using the key \texttt{bulk} in the node (and \texttt{nobulk} if you set the bulk terminal by default); additional anchors \texttt{bulk} and \texttt{nobulk} are added (in the next example, \texttt{tripoles/mos style/arrows} is enacted, too):
+
+\begin{groupdesc}
+    \ctikzset{tripoles/mos style/arrows}
+    \circuitdesc{nmos, bulk}{pmos}{}(bulk/45/0.3, nobulk/-30/.4)
+    \circuitdesc{pmos, bulk}{pmos}{}
+\end{groupdesc}
+
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}[
     info/.style={left=1cm, blue, text width=5em, align=right},]
@@ -2262,30 +2333,14 @@
           node[pmos]{} (2,-8) node[nmos]{};
 \end{circuitikz}\end{LTXexample}
 
-\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option "solderdot" and "nosolderdot", respectm ively.
+\subsubsection{Multiple terminal transistors customization}
 
-\begin{groupdesc}
-    \circuitdesc{nfet}{nfet}{}
-    \circuitdesc{nigfete}{nigfete}{}
-    \circuitdesc{nigfete,solderdot}{nigfete}{}
-    \circuitdesc{nigfetebulk}{nigfetebulk}{}
-    \circuitdesc{nigfetd}{nigfetd}{}
-    \circuitdesc{pfet}{pfet}{}
-    \circuitdesc{pigfete}{pigfete}{}
-    \circuitdesc{pigfetebulk}{pigfetebulk}{}
-    \circuitdesc{pigfetd}{pigfetd}{}
-\end{groupdesc}
+You can create completely ``bare'' transistors (without the connection leads to the \texttt{B}, \texttt{C} y \texttt{E} terminals), by changing the parameter \texttt{tripoles/bjt/pins width} (default \texttt{0.3}; it is expressed as a fraction of the basic (scaled) length) or using the style \texttt{bjt pins width}; and you can change the distance between multiple collectors/emitters setting with \verb|\ctikzset{}|  the parameter \texttt{tripoles/bjt/multi height/}  (default \texttt{0.5}) or the style \texttt{bjt multi height}.
 
-\textsc{njfet} and \textsc{pjfet} have been incorporated based on code provided by Danilo Piazzalunga:
 \begin{groupdesc}
-    \circuitdesc{njfet}{njfet}{}
-    \circuitdesc{pjfet}{pjfet}{}
+    \circuitdesc{bjtnpn, collectors=2, emitters=2, bjt pins width=0, bjt multi height=0.8}{bjt npn with parameters}{Q}(B/180/0.2, C/45/0.2, E/-45/0.2, C1/0/0.4, C2/0/0.4, E1/0/0.4, E2/0/0.4, nobase/-135/0.4, cbase/135/0.4)
 \end{groupdesc}
 
-\textsc{isfet}
-\begin{groupdesc}
-    \circuitdesc{isfet}{isfet}{}
-\end{groupdesc}
 
 \subsubsection{Transistors anchors}
 
@@ -2341,6 +2396,55 @@
 ;\end{circuitikz}
 \end{LTXexample}
 
+Finally, all transistors, except the multi-terminal \texttt{bjtnpn} and \texttt{bjtpnp}, (since \texttt{0.9.6}) have internal nodes on the terminal corners, called \texttt{inner up}  and \texttt{inner down}; you do not normally need them, but they are here for special applications:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+    \node [npn](A) at(0,2) {};
+    \node [pmos](B) at(0,0) {};
+    \foreach \e in {A, B}
+        \foreach \a in {inner up, inner down} {
+            \node[red, circle, inner sep=1pt, draw]
+            at (\e.\a) {};
+            \node [right, font=\tiny, blue]
+            at (\e.\a) {\a};
+        }
+\end{circuitikz}
+\end{LTXexample}
+
+
+The multi-terminal transistors have all the geographical anchors; note though that the \texttt{center} anchor is not the geometrical center of the component, but the logical one (at the same height than the base).
+The additional anchors \texttt{vcenter} (vertical geometric center of the collector--emitter zone) and \texttt{gcenter} (graphical center) are provided, as shown in the following picture.
+
+\begin{quote}
+\geocoord{bjtnpn, collectors=1, emitters=2}
+\showanchors{bjtpnp, collectors=4, emitters=1, bjt pins width=0.6}{}(north/90/0.4,  east/0/0.4, south/-90/0.4, west/180/0.4, center/120/0.3, vcenter/0/0.4, gcenter/-120/0.4, cbase/-60/0.6)
+\end{quote}
+
+A complete example of multiple terminal transistor application is the following PNP double current mirror circuit.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+    \ctikzset{transistors/arrow pos=end}
+    \draw (0,0) node[bjtpnp, xscale=-1](Q1){%
+        \scalebox{-1}[1]{Q1}};
+    \draw (Q1.B) node[bjtpnp, anchor=B, collectors=2]
+        (Q2){Q2} (Q1.B) node[circ]{};
+    \draw (Q1.E) node[circ]{} node[vcc]{} (Q2.E)
+        node[vcc]{} (Q1.E) -| (Q1.B);
+    \draw (Q1.C) to[R, l_=$R_0$, f=$I_0$] ++(0,-3.5)
+        node[ground](GND){};
+    \draw (Q2.C) -- ++(0,-0.5) coordinate(a);
+    \draw (Q2.C1) -- ++(1,0) coordinate(b) -- (b|-a);
+    \draw (a) ++(0,-0.1) node[flowarrow, rotate=-90,
+        anchor=west]{\rotatebox{90}{$I_0$}};
+    \draw (b|-a) ++(0,-0.1) node[flowarrow, rotate=-90,
+        anchor=west]{\rotatebox{90}{$I_0$}};
+    \path (b) ++(0.5,0); % bounding box adjust
+\end{circuitikz}
+\end{LTXexample}
+
+
 Here is one composite example (please notice that the \texttt{xscale=-1} style would also reflect the label of the transistors, so here a new node is added and its text is used, instead of that of \texttt{pnp1}):
 
 \begin{LTXexample}[varwidth=true]
@@ -2397,23 +2501,7 @@
 
 The \texttt{name} property is available also for bipoles; this is useful mostly for triac, potentiometer and thyristor (see~\ref{sec:othertrip}).
 
-\subsubsection{Transistors customization}\label{sec:styling-transistors}
 
-The default position of the arrows in transistors is somewhat in the middle of the terminal; if you prefer you can move them to the end with the style key \texttt{transistors/arrow pos=end} (the default value is \texttt{legacy}).
-
-\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
-   \ctikzset{transistors/arrow pos=end}
-   \draw (0,0) node[npn, ](npn){};
-   \draw (2,0) node[pnp, ](npn){};
-   \draw (0,-2) node[nmos, ](npn){};
-   \draw (2,-2) node[pmos, ](npn){};
-\end{circuitikz}
-\end{LTXexample}
-
-You can change the scale of all the transistors by setting the key \texttt{transistors/scale} (default \texttt{1.0}).
-The size of the arrows (if any) is controlled by the same parameters as \texttt{currarrow} (see section~\ref{sec:currarrow-size}) and the dots on P-type transistors (if any) are the same as the nodes/poles (see section~\ref{sec:bipole-nodes}).
-
 \subsection{Electronic Tubes}
 
 Electronic tubes, also known as vacuum tubes, control current flow between electrodes.  They come in many different flavours.
@@ -2801,6 +2889,8 @@
 
 Transformers also inherits the \texttt{inductors/scale} (see~\ref{sec:tweak-l}) and similar parameters. It's your responsibility to set the aforementioned parameters if you change the scale or width of inductors.
 
+Transformers core line distance is specified by the parameter \texttt{quadpoles/transformer core/core width} (default \texttt{0.05}) and the thickness of the lines follows the choke one; in other words, you can set it changing \texttt{bipoles/cutechoke/cthick}.
+
 Another very useful parameter is \texttt{quadpoles/*/inner} (default \texttt{0.4}) that determine which part of the component is the ``vertical'' one. So, setting that parameter to 1 will eliminate the horizontal part of the component (obviously, to maintain the general aspect ratio you need to change the width also):
 
 
@@ -2837,6 +2927,66 @@
 \end{LTXexample}
 
 
+\subsubsection{Styling transformer's coils independently}
+
+Since \texttt{0.9.6}, you can tweak the style of each of the coils of the transformers by
+changing the value of the two styles \texttt{transformer L1} and \texttt{transformer L2};
+the default for both are \texttt{\{\}}, that means inherit the inductors style in force.
+
+\begin{LTXexample}[pos=t, basicstyle=\small\ttfamily]
+\begin{circuitikz}[american]
+    \begin{scope}
+        \ctikzset{transformer L1/.style={inductors/coils=1, inductors/width=0.2}}
+        \draw (0,0) node[transformer core](T1){};
+    \end{scope}
+    \draw (3,0) node[transformer](T2){};
+    \ctikzset{cute inductors, quadpoles style=inline}
+    \ctikzset{transformer L1/.style={inductors/coils=2, inductors/width=0.2}}
+    \draw (6,0) node[transformer core](T3){};
+    \ctikzset{transformer L1/.style={american inductors, inductors/coils=1, inductors/width=0.2}}
+    \ctikzset{transformer L2/.style={inductors/coils=7, inductors/width=1.0}}
+    \draw (9,0) node[transformer ](T4){};
+    \foreach \t in {T1, T2, T3, T4} {
+        \foreach \l in {L1, L2} {
+            \foreach \a/\c in {a/blue, b/red}
+            \node [circle, fill=\c, inner sep=1pt] at (\t-\l.\a) {};
+        }
+    }
+\end{circuitikz}
+\end{LTXexample}
+
+\textbf{Caveat:} the size of the transformer is independent from the styles for \texttt{L1} and \texttt{L2}, so they follow whatever the parameters for the inductances were before applying  them. In other words, the size of the transformer  could result too small if you are not careful.
+
+\begin{LTXexample}[varwidth, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+    \ctikzset{transformer L1/.style={inductors/width=1.8, inductors/coils=13}}
+    % too small!
+    \draw (0,0) node[transformer core](T1){};
+    % adjust it
+    \ctikzset{quadpoles/transformer core/height=2.4}
+    \draw (2.5,0) node[transformer core](T1){};
+\end{circuitikz}
+\end{LTXexample}
+
+You can obviously define a style for a ``non-standard'' transformer. For example, you can have a current transformer\footnote{Suggested by Alex Pacini on \href{https://github.com/circuitikz/circuitikz/issues/297}{GitHub}} defined like this:
+
+\begin{LTXexample}[varwidth, basicstyle=\small\ttfamily]
+\begin{circuitikz}[
+    TA core/.style={transformer core,
+        % at tikz level, you have to use circuitikz/ explicitly
+        circuitikz/quadpoles style=inline,
+        circuitikz/transformer L1/.style={
+            american inductors, inductors/coils=1,
+            inductors/width=0.3},
+    } ]
+    \draw (0,0) node[TA core](T1){};
+    % changes are local
+    \draw (0,-3) node[transformer]{};
+\end{circuitikz}
+\end{LTXexample}
+
+Remember that the default \texttt{pgfkeys} directory is \texttt{/tikz} for nodes and for the options of the environment, so you \emph{have} to use the full path (with \texttt{circuitikz/}) there.
+
 \subsection{Amplifiers}
 
 \begin{groupdesc}
@@ -3373,8 +3523,8 @@
 There is no ``european''  version of these symbols.
 
 \begin{groupdesc}
-    \circuitdesc*{schmitt}{Non-Inverting \textsc{Schmitttrigger}}{}
-    \circuitdesc*{invschmitt}{Inverting \textsc{Schmitttrigger}}{}
+    \circuitdesc*{schmitt}{Non-Inverting Schmitt trigger}{}
+    \circuitdesc*{invschmitt}{Inverting Schmitt trigger}{}
 \end{groupdesc}
 
 \subsubsection{Logic port customization}

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.9.5}
-\def\pgfcircversiondate{2019/10/12}
+\def\pgfcircversion{0.9.6}
+\def\pgfcircversiondate{2019/11/09}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -743,6 +743,13 @@
 \pgfkeys{/tikz/photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
 \ctikzset{photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
 
+% Option draw fet without bulk connection -- Added by Burak Kelleci
+\newif\ifpgf at circuit@bpt at drawbulk
+\pgfkeys{/tikz/bulk/.add code={}{\pgf at circuit@bpt at drawbulktrue}}
+\ctikzset{bulk/.add code={}{\pgf at circuit@bpt at drawbulktrue}}
+\pgfkeys{/tikz/nobulk/.add code={}{\pgf at circuit@bpt at drawbulkfalse}}
+\ctikzset{nobulk/.add code={}{\pgf at circuit@bpt at drawbulkfalse}}
+
 % Option draw pmos with empty circle
 \newif\ifpgf at circuit@pmos at emptycircle
 \pgf at circuit@pmos at emptycirclefalse
@@ -1017,7 +1024,32 @@
 \ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
 \ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
 \ctikzset{tripoles/isfet/curr direction/.initial=1}
+%
+% multi-emitter and multi-collector BJTs by Romano Giannetti
+%
+\ctikzset{tripoles/bjt/emitters/.initial=1}
+\ctikzset{tripoles/bjt/collectors/.initial=1}
+\pgfkeys{/tikz/emitters/.add code={}{\ctikzset{tripoles/bjt/emitters=#1}}}
+\pgfkeys{/tikz/collectors/.add code={}{\ctikzset{tripoles/bjt/collectors=#1}}}
+\ctikzset{tripoles/bjt/pins width/.initial=0.3}
+\pgfkeys{/tikz/bjt pins width/.add code={}{\ctikzset{tripoles/bjt/pins width=#1}}}
+\ctikzset{tripoles/bjt/multi height/.initial=.5}
+\pgfkeys{/tikz/bjt multi height/.add code={}{\ctikzset{tripoles/bjt/multi height/.initial=#1}}}
+%
+\ctikzset{tripoles/bjt/width/.initial=.3}
+\ctikzset{tripoles/bjt/base height 2/.initial=.4}
+\ctikzset{tripoles/bjt/base height/.initial=1.1}
+\ctikzset{tripoles/bjt/height/.initial=.4}
+\ctikzset{tripoles/bjt/base width/.initial=1}
+\ctikzset{tripoles/bjt/arrow pos/.initial=.5}
+% do NOT touch these two!
+\ctikzset{tripoles/bjt/npn/curr direction/.initial=1}
+\ctikzset{tripoles/bjt/pnp/curr direction/.initial=-1}
 
+%% transistors stop here
+
+%% Logic ports
+
 \newif\ifpgf at circuit@europeanlogicport
 \ctikzset{logic ports/.is choice}
 \ctikzset{logic ports/european/.code= {\pgf at circuit@europeanlogicporttrue
@@ -1221,8 +1253,8 @@
 \newif\ifpgf at circuit@oa at iplusup\pgf at circuit@oa at iplusupfalse
 \pgfkeys{/tikz/noinv input up/.add code={}{\pgf at circuit@oa at iplusuptrue}}
 \ctikzset{noinv input up/.add code={}{\pgf at circuit@oa at iplusuptrue}}
-\pgfkeys{/tikz/input noinv down/.add code={}{\pgf at circuit@oa at iplusupfalse}}
-\ctikzset{input noinv down/.add code={}{\pgf at circuit@oa at iplusupfalse}}
+\pgfkeys{/tikz/noinv input down/.add code={}{\pgf at circuit@oa at iplusupfalse}}
+\ctikzset{noinv input down/.add code={}{\pgf at circuit@oa at iplusupfalse}}
 %
 % changing output polarity (for fully diff objects)
 %

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -200,7 +200,8 @@
             \edef\pgf at circ@ffffff{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
         }
     \fi
-    coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf at circ@ffffff](Iarrow)
+    coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf at circ@ffffff,
+    anchor=center](Iarrow)
     (Iarrow.\pgf at circ@bipole at current@label at where)
     node[anchor=\pgf at circ@dir, \circuitikzbasekey/bipole current style]
     (\ctikzvalof{bipole/name}current){\pgf at circ@finallabels{current/label}}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -195,7 +195,7 @@
             \fi
         \fi
     }
-    coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf at circ@ffffff,yshift=\flow at offset](Farrowpos)
+    coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf at circ@ffffff,yshift=\flow at offset, anchor=center](Farrowpos)
     (Farrowpos.\pgf at circ@bipole at flow@label at where) node[anchor=\pgf at circ@dir, \circuitikzbasekey/bipole flow style]
     (\ctikzvalof{bipole/name}flow){\pgf at circ@finallabels{flow/label}}
 }

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -180,6 +180,12 @@
     }
 }
 
+%% Null styles that can be used to change individually the L1 and L2
+%% inductors of the transformer.
+
+\ctikzset{transformer L1/.style={}}
+\ctikzset{transformer L2/.style={}}
+
 \def\pgf at circ@drawtransformerbasicbody{
     \pgfscope
         \pgfslopedattimetrue
@@ -194,6 +200,7 @@
             {\pgf at circ@res at down}%
         }
 
+        \pgfkeys{\circuitikzbasekey/.cd, transformer L1}
         \edef\pgf at circ@temp{\ctikzvalof{inductor}}%
         \def\pgf at temp{european}%
         \ifx\pgf at temp\pgf at circ@temp%
@@ -222,6 +229,7 @@
             {\pgf at circ@res at up}%
         }
 
+        \pgfkeys{\circuitikzbasekey/.cd, transformer L2}
         \edef\pgf at circ@temp{\ctikzvalof{inductor}}%
         \def\pgf at temp{european}%
         \ifx\pgf at temp\pgf at circ@temp%
@@ -266,23 +274,34 @@
 
     \pgf at circ@drawtransformerbasicbody
 
+    % use the chocke line thickness
+    \pgfsetlinewidth{\ctikzvalof{bipoles/cutechoke/cthick}\pgflinewidth}
+
+    % Find the distance from center for the lines representing the core
+    % the 2.5 is for backward compatibility --- the distance was calculated as a fraction
+    % of the whole component, now as a fraction of the distance between coils, to be
+    % compatible with the quadpoles "inner" style.
+    \pgfmathsetlength{\pgf at circ@res at other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf at circ@res at right}
+
     \pgfmoveto{\pgfpoint%
-        {\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+        {\pgf at circ@res at other}%
         {\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
     }
     \pgflineto{
-        \pgfpoint
-        {\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+        \pgfpoint%
+        {\pgf at circ@res at other}%
         {\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
     }
 
+    %% this should be just -\pgf at circ@res at other, but in case someone define an asymmetric trafo someday...
+    \pgfmathsetlength{\pgf at circ@res at other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf at circ@res at left}
     \pgfmoveto{\pgfpoint%
-        {\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+        {\pgf at circ@res at other}%
         {\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
     }
     \pgflineto{
-        \pgfpoint
-        {\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+        \pgfpoint%
+        {\pgf at circ@res at other}%
         {\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
     }
 

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -443,7 +443,97 @@
     }
 }
 
+%% transistor arrow
 
+\def\pgf at circ@find at linescale{
+    % find the scale inverse of the scale factor: line width do not scale
+    % with scale=..., transform shape so we have to counteract it.
+    \iftikz at fullytransformed % this is true if `transform shape` is active
+        % from @Circumscribe https://tex.stackexchange.com/a/474035/38080
+        % Note that this trick is not working inside a `spy` environment...
+        \pgfgettransformentries{\scaleA}{\scaleB}{\scaleC}{\scaleD}{\whatevs}{\whatevs}%
+        \pgfmathsetmacro{\@@factor}{1.0/sqrt(abs(\scaleA*\scaleD-\scaleB*\scaleC))}%
+    \else
+        \pgfmathsetmacro{\@@factor}{1.0}
+    \fi
+}
+
+\pgfdeclareshape{trarrow}{%
+    % this arrow is only filled but grows with the linewidth, more or less
+    % like currarrow do
+    \savedanchor{\northeast}{%
+        \pgf at circ@res at step = \pgf at circ@Rlen
+        \pgf at circ@find at linescale
+        \divide \pgf at circ@res at step by \ctikzvalof{current arrow scale}
+        \pgfpoint{0.7*\pgf at circ@res at step +0.5*\@@factor*\pgflinewidth}
+            {0.8*\pgf at circ@res at step+0.7593*\@@factor*\pgflinewidth}
+    }
+    % The arrow size should be more or less the same of a currarrow, which is
+    % both filled and stroke, for backward output compatibility (more or less)
+    %
+    %      angle \beta       W is \pgf at circ@Rlen/\ctikzvalof{current arrow scale}
+    %    |-\__               currarrow as the tip at (W,0)
+    %    |    |              and the upper tail at (-0.7*W, 0.8*W)
+    %    |    \__            it then "overshoot" do to the linew width L
+    %    |       \__ xangle \alpha
+    %    ---0------->
+    %
+    %   \beta = atan(0.7/0.8)  \alpha=atan(0.8/1.7)
+    %   tip overshoot is (L/2)/sin(\alpha) = 1.743*L only in x direction
+    %   tail overshoot is -(L/2) in x, and (L/2)/sin(\beta) = 0.7539*L in y
+    %
+    \savedanchor{\northwest}{%
+        \pgf at circ@res at step = \pgf at circ@Rlen
+        \divide \pgf at circ@res at step by \ctikzvalof{current arrow scale}
+        \pgf at circ@find at linescale
+        \pgfpoint{-0.7*\pgf at circ@res at step -0.5*\@@factor*\pgflinewidth}
+            {0.8*\pgf at circ@res at step+0.7593*\@@factor*\pgflinewidth}
+    }
+    \savedanchor{\tip}{%
+        \pgf at circ@res at step = \pgf at circ@Rlen
+        \divide \pgf at circ@res at step by \ctikzvalof{current arrow scale}
+        \pgf at circ@find at linescale
+        \pgfpoint{\pgf at circ@res at step + 1.743*\@@factor*\pgflinewidth}{0pt}
+    }
+    \anchor{north}{\northeast\pgf at x=0cm\relax}
+    \anchor{east}{\northeast\pgf at y=0cm\relax}
+    \anchor{south}{\northeast\pgf at y=-\pgf at y \pgf at x=0cm\relax}
+    \anchor{west}{\northeast\pgf at y=0cm\pgf at x=-\pgf at x}
+    \anchor{north east}{\northeast}
+    \anchor{north west}{\northeast\pgf at x=-\pgf at x}
+    \anchor{south east}{\northeast\pgf at y=-\pgf at y}
+    \anchor{south west}{\northeast\pgf at y=-\pgf at y\pgf at x=-\pgf at x}
+    \anchor{center}{
+        \pgfpointorigin
+    }
+    \anchor{tip}{
+        \tip
+    }
+    \anchor{btip}{% this anchor is behind the tip of half a linewidth
+        \tip
+        \pgf at circ@find at linescale
+        \pgf at circ@res at temp=\@@factor\pgflinewidth
+        \advance\pgf at x by -.5\pgf at circ@res at temp
+    }
+    \behindforegroundpath{
+        \pgfscope
+            \northwest
+            \pgf at circ@res at up=\pgf at y
+            \pgf at circ@res at left=\pgf at x
+            \tip
+            \pgf at circ@res at step = \pgf at x
+            %
+            \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint{1\pgf at circ@res at step}{0pt}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
+            \pgfpathclose
+            \pgfsetcolor{\ctikzvalof{color}}
+            \pgfusepath{fill} % just fill
+        \endpgfscope
+    }
+}
+
 %% Current arrow
 
 \pgfdeclareshape{currarrow}{
@@ -506,6 +596,10 @@
     \anchor{north west}{\northeast\pgf at x=-\pgf at x}
     \anchor{south east}{\northeast\pgf at y=-\pgf at y}
     \anchor{south west}{\northeast\pgf at y=-\pgf at y\pgf at x=-\pgf at x}
+    \anchor{text}{% text centered above
+        \pgfpointorigin
+        \pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox}
+    }
     \anchor{center}{
         \pgfpointorigin
     }

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -1343,6 +1343,10 @@
             \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
             \pgf at x=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen
         }
+        \savedanchor\right{%center right -- added by Burak Kelleci % this is really 0,0
+            \pgf at y=0pt
+            \pgf at x=0pt
+        }
         \anchor{text}{
             \northeast
             \pgf at y=.7\pgf at y
@@ -1409,6 +1413,16 @@
             \left
             \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
         }
+        \anchor{bulk}{ %added by Burak Kelleci
+            \northeast
+            \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
+            \right
+            \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
+        }
+        \anchor{nobulk}{ %added by Burak Kelleci
+            \left
+            \pgf at x=\ctikzvalof{tripoles/#1/base width}\pgf at x
+        }
         \anchor{G}{
             \northeast
             \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
@@ -1537,7 +1551,16 @@
 }
 
 \long\def\declarebpt#1{
-    \pgfcircdeclaretransistor{#1}{}{
+    \pgfcircdeclaretransistor{#1}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/base height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/#1/base height}\pgf at y
+        }
+        }{
         \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}}
@@ -1572,7 +1595,7 @@
             \edef\@@anchor{center}
             \ifpgf at circuit@trans at ntype
                 \ifpgf at circuit@trans at arrowatend
-                    \edef\@@anchor{tip}
+                    \edef\@@anchor{btip}
                     \pgftransformlineattime{1.0}{%
                         \pgfpoint%
                         {\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}%
@@ -1591,7 +1614,7 @@
                         {\ctikzvalof{tripoles/#1/base height}\pgf at circ@res at down}%
                     }
                 \fi
-            \else
+            \else % p-type
                 \ifpgf at circuit@trans at arrowatend
                     \edef\@@anchor{tip}
                     \pgftransformlineattime{1.0}{%
@@ -1611,7 +1634,7 @@
                     }
                 \fi
             \fi
-            \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+            \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
         \endpgfscope
 
         \ifpgf at circuit@bpt at drawphoto
@@ -1650,9 +1673,327 @@
 
 \declarebpt{npn}
 \declarebpt{pnp}
+%
+% multi-emitter and multi-collector BJTs by Romano Giannetti
+%
+\def\pgf at circ@bjt at C@anchor#1{% #1: collector number
+    \pgfextractx{\pgf at circ@res at temp}{\basedimension}
+    \pgfextracty{\pgf at circ@res at other}{\basedimension}
+    \ifnum\cdir>0 % NPN, above
+        \pgfpoint{\pgf at circ@res at temp}{%
+        \pgf at circ@res at other+\pgfverticaltransformationadjustment*.5*\pgflinewidth+(#1-1)*\multistep}
+    \else % PNP, below
+        \pgfpoint{\pgf at circ@res at temp}{%
+        -\pgf at circ@res at other-\pgfverticaltransformationadjustment*.5*\pgflinewidth-(#1-1)*\multistep}
+    \fi
+}
+\def\pgf at circ@bjt at E@anchor#1{% #1: collector number
+    \pgfextractx{\pgf at circ@res at temp}{\basedimension}
+    \pgfextracty{\pgf at circ@res at other}{\basedimension}
+    \ifnum\cdir<0 % PNP, above
+        \pgfpoint{\pgf at circ@res at temp}{%
+        \pgf at circ@res at other+\pgfverticaltransformationadjustment*.5*\pgflinewidth+(#1-1)*\multistep}
+    \else % PNP, below
+        \pgfpoint{\pgf at circ@res at temp}{%
+        -\pgf at circ@res at other-\pgfverticaltransformationadjustment*.5*\pgflinewidth-(#1-1)*\multistep}
+    \fi
+}
 
+\long\def\declarebjt#1{
+    \pgfdeclareshape{bjt#1}{
+        \savedmacro{\ctikzclass}{\edef\ctikzclass{transistors}}
+        \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
+        % \cdir is 1 for npn, -1 for pnp
+        \savedmacro{\cdir}{\edef\cdir{\ctikzvalof{tripoles/bjt/#1/curr direction}}}
+        \savedmacro{\numE}{\edef\numE{\ctikzvalof{tripoles/bjt/emitters}}}
+        \savedmacro{\numC}{\edef\numC{\ctikzvalof{tripoles/bjt/collectors}}}
+        % step up or down for the additional C/Es
+        \saveddimen{\multistep}{\pgfmathsetlength{\pgf at x}{%
+            \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+            \ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}}
+        \saveddimen{\external}{\pgfmathsetlength{\pgf at x}{%
+            \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}}
+        \savedanchor\basedimension{% these are the dimensions if nC=1 y nE=1
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \pgf at y=\ctikzvalof{tripoles/bjt/height}\pgf at circ@scaled at Rlen
+            \pgf at y=.5\pgf at y
+            \pgf at x=\ctikzvalof{tripoles/bjt/width}\pgf at circ@scaled at Rlen
+            \pgf at x=.5\pgf at x
+        }
+        \savedanchor\northeast{% upper right
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \pgfmathsetlength{\pgf at circ@res at step}{%
+                \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+                \ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+            \ifnum\cdir> 0
+                \edef\numup{\numC}\edef\numdown{\numE}
+            \else
+                \edef\numup{\numE}\edef\numdown{\numC}
+            \fi
+            \pgfmathsetlength{\pgf at y}{0.5*\ctikzvalof{tripoles/bjt/height}\pgf at circ@scaled at Rlen
+                + (\numup-1)*\pgf at circ@res at step+\pgfverticaltransformationadjustment*.5*\pgflinewidth
+                + \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+            \pgf at x=\ctikzvalof{tripoles/bjt/width}\pgf at circ@scaled at Rlen
+            \pgf at x=.5\pgf at x
+        }
+        \savedanchor\southeast{% lower right
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \pgfmathsetlength{\pgf at circ@res at step}{%
+                \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+                \ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+            \ifnum\cdir> 0
+                \edef\numup{\numC}\edef\numdown{\numE}
+            \else
+                \edef\numup{\numE}\edef\numdown{\numC}
+            \fi
+            \pgfmathsetlength{\pgf at y}{-0.5*\ctikzvalof{tripoles/bjt/height}\pgf at circ@scaled at Rlen
+                - (\numdown-1)*\pgf at circ@res at step-\pgfverticaltransformationadjustment*.5*\pgflinewidth
+                - \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+            \pgf at x=\ctikzvalof{tripoles/bjt/width}\pgf at circ@scaled at Rlen
+            \pgf at x=.5\pgf at x
+        }
+        \savedanchor\southwest{% lower left
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \pgfmathsetlength{\pgf at circ@res at step}{%
+                \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+                \ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+            \ifnum\cdir> 0
+                \edef\numup{\numC}\edef\numdown{\numE}
+            \else
+                \edef\numup{\numE}\edef\numdown{\numC}
+            \fi
+            \pgfmathsetlength{\pgf at y}{-0.5*\ctikzvalof{tripoles/bjt/height}\pgf at circ@scaled at Rlen
+                - (\numdown-1)*\pgf at circ@res at step-\pgfverticaltransformationadjustment*.5*\pgflinewidth
+                - \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+            \pgfmathsetlength{\pgf at x}{-0.5*\ctikzvalof{tripoles/bjt/width}*\pgf at circ@scaled at Rlen
+                - \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+        }
+        \anchor{center}{\pgfpointorigin}
+        \anchor{north}{\northeast\pgf at x=0cm\relax}
+        \anchor{east}{\northeast\pgf at y=0cm\relax}
+        \anchor{south}{\southwest\pgf at x=0cm\relax}
+        \anchor{west}{\southwest\pgf at y=0cm}
+        \anchor{north east}{\northeast}
+        \anchor{north west}{\northeast\pgf at ya=\pgf at y\southwest\pgf at y=\pgf at ya}
+        \anchor{south west}{\southwest}
+        \anchor{south east}{\southeast}
+
+        \anchor{text}{\northeast\pgf at y=\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax}
+        \anchor{B}{\northeast\pgf at y=0cm\pgf at x=-\pgf at x\advance\pgf at x by -\external}
+        \anchor{base}{\basedimension\pgf at y=0cm\pgf at x=-\pgf at x\advance\pgf at x by -\external}
+        \anchor{nobase}{\basedimension\pgf at y=0cm\pgf at x=-\pgf at x}
+        % center of the base "bar"
+        \anchor{cbase}{\basedimension\pgf at x=-\pgf at x
+            \pgfmathsetlength{\pgf at y}{\cdir*(\numC-\numE)*\multistep/2}%
+        }
+        % geometrical centers
+        \anchor{vcenter}{\pgf at x=0cm\relax
+            \pgfmathsetlength{\pgf at y}{\cdir*(\numC-\numE)*\multistep/2}%
+        }
+        \anchor{gcenter}{%
+            \northeast\pgf at xa=0.5\pgf at x
+            \southwest\advance\pgf at xa by 0.5\pgf at x
+            \pgf at x=\pgf at xa
+            \pgfmathsetlength{\pgf at y}{\cdir*(\numC-\numE)*\multistep/2}%
+        }
+        % external connections
+        \anchor{E}{
+            \ifnum\cdir>0% npn, emitter down
+            \southeast
+            \else
+            \northeast
+            \fi
+        }% first emitter
+        \anchor{emitter}{\ifnum\cdir>0\southeast\else\northeast\fi}% first emitter
+        \anchor{C}{\ifnum\cdir<0\southeast\else\northeast\fi}
+        \anchor{collector}{\ifnum\cdir<0\southeast\else\northeast\fi}
+
+        \backgroundpath{
+            \pgftransformationadjustments
+            \pgfsetcolor{\ctikzvalof{color}}
+            %
+            % set the type and up and down number of connections
+            %
+            \ifnum\cdir> 0
+                \pgf at circuit@trans at ntypetrue
+                \edef\numup{\numC}
+                \edef\numdown{\numE}
+            \else
+                \pgf at circuit@trans at ntypefalse
+                \edef\numup{\numE}
+                \edef\numdown{\numC}
+            \fi
+            \basedimension
+            \pgf at circ@res at up = \pgf at y
+            \pgf at circ@res at down = -\pgf at y
+            \pgf at circ@res at right = \pgf at x
+            \pgf at circ@res at left = -\pgf at x
+            \pgf at circ@scaled at Rlen=\scaledRlen
+            \pgf at circ@res at step=\multistep
+            %
+            % set arrow positions options
+            %
+            \edef\@@anchor{center}\edef\@@pos{\ctikzvalof{tripoles/#1/arrow pos}}
+            \ifpgf at circuit@trans at arrowatend
+                \edef\@@pos{1.0}
+                \ifpgf at circuit@trans at ntype % arrow is toward outside, push it a bit
+                    \edef\@@anchor{btip}
+                \else
+                    \edef\@@anchor{tip}
+                \fi
+            \fi
+            %
+            % Drawing upper connections
+            %
+            \pgfscope
+            \pgf at circ@count at a=\numup\relax
+            \pgfmathloop%
+            \ifnum\pgf at circ@count at a>0
+            \advance\pgf at circ@count at a-1\relax
+            \pgfmathsetlength{\pgf at circ@res at other}{\the\pgf at circ@count at a*\multistep}%
+            \ifnum\pgf at circ@count at a=\numexpr\numup-1\relax % draw the external pin connection
+            \pgfpathmoveto{\pgfpoint
+                {\pgf at circ@res at right}%
+                {\pgf at circ@res at up+\external+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf at circ@res at other}}%
+            \pgfpathlineto{\pgfpoint
+                {\pgf at circ@res at right}%
+                {\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf at circ@res at other}}%
+            \else
+            \pgfpathmoveto{\pgfpoint
+                {\pgf at circ@res at right}%
+                {\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf at circ@res at other}}%
+            \fi
+            \pgfpathlineto{\pgfpoint
+                {\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}%
+                {\ctikzvalof{tripoles/bjt/base height 2}\pgf at circ@res at up+\pgf at circ@res at other}}%
+            \pgfsetroundcap % better when connecting to sloped lines
+            \pgfusepath{draw}
+            \ifpgf at circuit@trans at ntype\else % it's a PNP; draw arrow
+            \pgfscope
+                \pgfslopedattimetrue
+                \pgfallowupsidedownattimetrue
+                \pgfresetnontranslationattimefalse
+                \pgftransformlineattime{\@@pos}{%
+                    \pgfpoint
+                        {\pgf at circ@res at right}%
+                        {\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf at circ@res at other}%
+                    }{\pgfpoint
+                        {\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}%
+                        {\ctikzvalof{tripoles/bjt/base height 2}\pgf at circ@res at up+\pgf at circ@res at other}%
+                    }
+                    \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+            \endpgfscope
+            \fi
+            \repeatpgfmathloop
+            \endpgfscope
+            %
+            % Drawing base
+            %
+            \pgfscope
+                \pgfpathmoveto{\pgfpoint
+                    {\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}
+                    {\ctikzvalof{tripoles/bjt/base height}\pgf at circ@res at up+(\numup-1)*\multistep}}
+                \pgfpathlineto{\pgfpoint
+                    {\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}
+                    {\ctikzvalof{tripoles/bjt/base height}\pgf at circ@res at down-(\numdown-1)*\multistep}}
+                \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+                \pgfsetroundcap % I like it more...
+                \pgfusepath{draw}
+            \endpgfscope
+            %
+            % draw base external connection
+            %
+            \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}{0pt}}
+            \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left-\external}{0pt}}
+            \pgfusepath{draw}
+            %
+            % Drawing lower connections
+            %
+            \pgfscope
+            \pgf at circ@count at a=\numdown\relax
+            \pgfmathloop%
+            \ifnum\pgf at circ@count at a>0
+            \advance\pgf at circ@count at a-1\relax
+            \pgfmathsetlength{\pgf at circ@res at other}{\the\pgf at circ@count at a*\multistep}%
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}
+                {\ctikzvalof{tripoles/bjt/base height 2}\pgf at circ@res at down-\pgf at circ@res at other}}
+            \pgfpathlineto{\pgfpoint
+                {\pgf at circ@res at right}
+                {\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth-\pgf at circ@res at other}}
+            \ifnum\pgf at circ@count at a=\numexpr\numdown-1\relax % draw the external pin connection
+            \pgfpathlineto{\pgfpoint
+                {\pgf at circ@res at right}
+                {\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth-\pgf at circ@res at other-\external}}
+            \fi
+            \pgfsetroundcap % better when connecting to sloped lines
+            \pgfusepath{draw}
+            \ifpgf at circuit@trans at ntype % it's a NPN; draw arrow
+            \pgfscope
+                \pgfslopedattimetrue
+                \pgfallowupsidedownattimetrue
+                \pgfresetnontranslationattimefalse
+                \pgftransformlineattime{\@@pos}{%
+                    \pgfpoint
+                        {\ctikzvalof{tripoles/bjt/base width}\pgf at circ@res at left}%
+                        {\ctikzvalof{tripoles/bjt/base height 2}\pgf at circ@res at down-\pgf at circ@res at other}%
+                    }{\pgfpoint
+                        {\pgf at circ@res at right}%
+                        {\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth-\pgf at circ@res at other}%
+                    }
+                    \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+            \endpgfscope
+            \fi
+            \repeatpgfmathloop
+            \endpgfscope
+        }
+        % \pgf at sh@s@<name of the shape here> contains all the code for the shape
+        % and is executed just before a node is drawn.
+        \expandafter\pgfutil at g@addto at macro\csname pgf at sh@s at bjt#1\endcsname{%
+            % Start with the maximum collector number and go backwards.
+            \pgf at circ@count at a=\numC\relax
+            \pgfmathloop%
+            \ifnum\pgf at circ@count at a>0
+                % we will create two anchors per pin: the "normal one" like `pin 1` for the
+                % electrical contact, and the "border one" like `bpin 1` for labels.
+                % they will coincide if `external pins width` is set to 0.
+                \expandafter\xdef\csname pgf at anchor@bjt#1 at C\the\pgf at circ@count at a\endcsname{%
+                    \noexpand\pgf at circ@bjt at C@anchor{\the\pgf at circ@count at a}%
+                }
+            \advance\pgf at circ@count at a by -1\relax%
+            \repeatpgfmathloop%
+            % and emitters
+            \pgf at circ@count at a=\numE\relax
+            \pgfmathloop%
+            \ifnum\pgf at circ@count at a>0
+                % we will create two anchors per pin: the "normal one" like `pin 1` for the
+                % electrical contact, and the "border one" like `bpin 1` for labels.
+                % they will coincide if `external pins width` is set to 0.
+                \expandafter\xdef\csname pgf at anchor@bjt#1 at E\the\pgf at circ@count at a\endcsname{%
+                    \noexpand\pgf at circ@bjt at E@anchor{\the\pgf at circ@count at a}%
+                }
+            \advance\pgf at circ@count at a by -1\relax%
+            \repeatpgfmathloop%
+            }%
+    }
+}
+
+\declarebjt{npn}
+\declarebjt{pnp}
+
+% end of multi-bjts
+
 \long\def\declareigbt#1{
-    \pgfcircdeclaretransistor{#1}{}
+    \pgfcircdeclaretransistor{#1}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/#1/gate height}\pgf at y
+        }
+    }
     {
         %draw upper connection
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
@@ -1694,7 +2035,11 @@
             \pgfallowupsidedownattimetrue
             \pgfresetnontranslationattimefalse
             \ifpgf at circuit@trans at arrowatend
-                \edef\@@anchor{tip}\edef\@@pos{1.0}
+                \ifpgf at circuit@trans at ntype
+                    \edef\@@anchor{btip}\edef\@@pos{1.0}
+                \else
+                    \edef\@@anchor{tip}\edef\@@pos{1.0}
+                \fi
             \else
                 \edef\@@anchor{center}\edef\@@pos{0.5}
             \fi
@@ -1716,7 +2061,7 @@
                     {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}%
                 }
             \fi
-            \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+            \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
         \endpgfscope
         %draw gate
         \ifpgf at circuit@trans at ntype
@@ -1741,7 +2086,16 @@
 \declareigbt{Lnigbt}
 \declareigbt{Lpigbt}
 
-\pgfcircdeclaretransistor{nmos}{}{%
+\pgfcircdeclaretransistor{nmos}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/nmos/gate height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/nmos/gate height}\pgf at y
+        }
+    }{%
     \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}}
@@ -1780,7 +2134,7 @@
                     {\pgf at circ@res at right}%
                     {\ctikzvalof{tripoles/pmos/gate height}\pgf at circ@res at down}%
                 }
-                \pgfnode{currarrow}{tip}{}{}{\pgfusepath{stroke}}
+                \pgfnode{trarrow}{btip}{}{}{\pgfusepath{stroke}}
             \else
                 \pgfslopedattimetrue
                 \pgfallowupsidedownattimetrue
@@ -1806,9 +2160,26 @@
         \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
         \pgfusepath{draw}
     \fi
+
+    \ifpgf at circuit@bpt at drawbulk % added by Burak Kelleci
+        \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/nmos/base width}\pgf at circ@res at left}
+                {\pgf at circ@res at up+\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+                {\pgf at circ@res at up+\pgf at circ@res at down}}
+        \pgfusepath{draw}
+    \fi
 }
 
-\pgfcircdeclaretransistor{pmos}{}{%
+\pgfcircdeclaretransistor{pmos}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/pmos/gate height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/pmos/gate height}\pgf at y
+        }
+    }{%
     \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}}
@@ -1825,7 +2196,7 @@
                     {\ctikzvalof{tripoles/pmos/gate height}\pgf at circ@res at up}%
                 }
                 \pgftransformrotate{180}
-                \pgfnode{currarrow}{tip}{}{}{\pgfusepath{stroke}}
+                \pgfnode{trarrow}{tip}{}{}{\pgfusepath{stroke}}
             \else
                 \pgfslopedattimetrue
                 \pgfallowupsidedownattimetrue
@@ -1877,7 +2248,16 @@
         \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
         \pgfusepath{draw}
     \fi
-        \ifpgf at circuit@pmos at nocircle\else
+
+    \ifpgf at circuit@bpt at drawbulk % added by Burak Kelleci
+        \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/pmos/base width}\pgf at circ@res at left}
+                {\pgf at circ@res at up+\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+                {\pgf at circ@res at up+\pgf at circ@res at down}}
+        \pgfusepath{draw}
+    \fi
+
+    \ifpgf at circuit@pmos at nocircle\else
         % we are not scaling the circle with the MOS --- I think it's better to have it
         % coherent with the poles/nodes of the rest of the circuit.
         \pgfpathcircle{\pgfpoint
@@ -1891,7 +2271,16 @@
 }
 
 %% HEMT FET Transistor
-\pgfcircdeclaretransistor{hemt}{}{%
+\pgfcircdeclaretransistor{hemt}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/hemt/gate height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/hemt/gate height}\pgf at y
+        }
+    }{%
     \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}}
@@ -1998,10 +2387,11 @@
         \pgfallowupsidedownattimetrue
         \pgfresetnontranslationattimefalse
         \ifpgf at circuit@trans at arrowatend
-            \edef\@@anchor{tip}
                 \ifpgf at circuit@trans at ntype
+                    \edef\@@anchor{tip}
                     \edef\@@pos{1.0}
                 \else
+                    \edef\@@anchor{btip}
                     \edef\@@pos{0.0}
                 \fi
         \else
@@ -2020,7 +2410,7 @@
         \else
             \pgftransformrotate{180}
         \fi
-        \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+        \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
     \endpgfscope
 
 % GATE CONNECTION
@@ -2045,6 +2435,14 @@
 {\pgfcircdeclaretransistor{#1}{
         \anchor{bulk}{\left\pgf at x=0pt}
         \anchor{B}{\left\pgf at x=0pt}%override Base anchor from npn&igbt
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/#1/gate height}\pgf at y
+        }
         #2
     }
     {#3}
@@ -2163,7 +2561,16 @@
     \fi
 }
 
-\pgfcircdeclaretransistor{njfet}{}{%
+\pgfcircdeclaretransistor{njfet}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/njfet/gate height 2}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/njfet/gate height 2}\pgf at y
+        }
+    }{%
     \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}}
@@ -2208,7 +2615,7 @@
             {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}%
             {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}%
         }
-        \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+        \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
     \endpgfscope
 
     \pgfpathmoveto{\pgfpoint
@@ -2219,7 +2626,16 @@
     \pgfusepath{draw}
 }
 
-\pgfcircdeclaretransistor{pjfet}{}{%
+\pgfcircdeclaretransistor{pjfet}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at y
+        }
+    }{%
     \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}}
@@ -2251,7 +2667,7 @@
         \pgfallowupsidedownattimetrue
         \pgfresetnontranslationattimefalse
         \ifpgf at circuit@trans at arrowatend
-            \edef\@@anchor{tip}\edef\@@pos{1.0}
+            \edef\@@anchor{btip}\edef\@@pos{1.0}
         \else
             \edef\@@anchor{center}\edef\@@pos{0.4}
         \fi
@@ -2263,7 +2679,7 @@
             \pgfpoint{\pgf at circ@res at left}%
             {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
         }
-        \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+        \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
     \endpgfscope
 
     \pgfpathmoveto{\pgfpoint
@@ -2342,7 +2758,7 @@
             {\ctikzvalof{tripoles/isfet/base width}\pgf at circ@res at left}%
             {\pgf at circ@res at up+\pgf at circ@res at down}%
         }
-        \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+        \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
     \endpgfscope
     \pgfusepath{draw}
 
@@ -2856,33 +3272,33 @@
             \pgf at circ@res at step=\pgf at circ@res at right
             \advance\pgf at circ@res at step by -\pgf at circ@res at left
             \pgf at circ@res at step=\ctikzvalof{tripoles/fd op amp/port width}\pgf at circ@res at step
-            
+
             % Initial point (right vertex)
             \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-            
+
             % Negative output terminal
             \pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf at circ@res at step}{0pt}}{\pgfpoint{0pt}{\pgf at circ@res at up}}}
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\ctikzvalof{tripoles/fd op amp/output height}\pgf at circ@res at up}}
             \pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf at circ@res at step}{0pt}}{\pgfpoint{0pt}{\pgf at circ@res at up}}}
-            
+
             % Top vertex
             \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-            
+
             % Bottom vertex
             \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-            
+
             % Positive output terminal
             \pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf at circ@res at step}{0pt}}{\pgfpoint{0pt}{\pgf at circ@res at down}}}
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\ctikzvalof{tripoles/fd op amp/output height}\pgf at circ@res at down}}
             \pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf at circ@res at step}{0pt}}{\pgfpoint{0pt}{\pgf at circ@res at down}}}
-            
+
             % Right vertex
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-            
+
             \pgfpathclose
             \pgf at circ@draworfill
         \endpgfscope
-        
+
         % Negative input terminal
         \pgfpathmoveto{\pgfpoint
             {\pgf at circ@res at left}
@@ -3092,7 +3508,7 @@
         \pgfscope
             \newdimen\pgf at circ@res at right@double
 						\pgf at circ@res at right@double=2\pgf at circ@res at right
-        
+
             \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
             \pgftransformxshift{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at left}
             \pgf at circ@res at step=\pgf at circ@res at right
@@ -3110,7 +3526,7 @@
             \pgfpathclose
             \pgf at circ@draworfill
         \endpgfscope
-        
+
         % input terminal up
         \pgfpathmoveto{\pgfpoint
             {\pgf at circ@res at left}
@@ -3131,12 +3547,12 @@
             {\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at left}
         {\ctikzvalof{tripoles/fd inst amp/input height}\pgf at circ@res at down}}
         \pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at left}{\ctikzvalof{tripoles/fd inst amp/input height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/fd inst amp/font} \ifpgf at circuit@oa at iplusup$-$\else$+$\fi}
-        
+
         % output leads down and up
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at down}}
         \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at down}} %
         \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf at circuit@oa at oplusup$-\;$\else$+\;$\fi}
-        
+
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at up}}
         \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at up}} %
         \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at up}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf at circuit@oa at oplusup$+\;$\else$-\;$\fi}
@@ -3260,8 +3676,8 @@
 
         \pgfscope
             \newdimen\pgf at circ@res at right@double
-						\pgf at circ@res at right@double=2\pgf at circ@res at right        
-        
+						\pgf at circ@res at right@double=2\pgf at circ@res at right
+
             \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
             \pgftransformxshift{\ctikzvalof{tripoles/gm amp/port width}\pgf at circ@res at left}
             \pgf at circ@res at step=\pgf at circ@res at right
@@ -3452,7 +3868,7 @@
         \pgfscope
             \newdimen\pgf at circ@res at right@double
 						\pgf at circ@res at right@double=2\pgf at circ@res at right
-						
+
             \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
             \pgftransformxshift{\ctikzvalof{tripoles/inst amp/port width}\pgf at circ@res at left}
             \pgf at circ@res at step=\pgf at circ@res at right
@@ -3470,7 +3886,7 @@
             \pgfpathclose
             \pgf at circ@draworfill
         \endpgfscope
-        
+
         % Negative input terminal
         \pgfpathmoveto{\pgfpoint
             {\pgf at circ@res at left}
@@ -3491,7 +3907,7 @@
             {\ctikzvalof{tripoles/inst amp/port width}\pgf at circ@res at left}
         {\ctikzvalof{tripoles/inst amp/input height}\pgf at circ@res at down}}
     \pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/inst amp/port width}\pgf at circ@res at left}{\ctikzvalof{tripoles/inst amp/input height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/inst amp/font} \ifpgf at circuit@oa at iplusup$-$\else$+$\fi}
-        
+
         % Output terminal
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
         \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/inst amp/port width}\pgf at circ@res at right}{0pt}} %
@@ -3675,7 +4091,7 @@
         \pgf at circ@res at right = -\pgf at x
         \pgf at circ@res at left = \pgf at x
         \pgf at circ@scaled at Rlen=\scaledRlen
-        
+
         \newdimen\pgf at circ@res at right@double
 				\pgf at circ@res at right@double=2\pgf at circ@res at right
 
@@ -3715,8 +4131,8 @@
         \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}}
-        
-        % Negative input terminal 
+
+        % Negative input terminal
         \pgfpathmoveto{\pgfpoint
             {\pgf at circ@res at left}
         {\ctikzvalof{tripoles/inst amp ra/input height}\pgf at circ@res at up}}
@@ -3736,7 +4152,7 @@
             {\ctikzvalof{tripoles/inst amp ra/port width}\pgf at circ@res at left}
         {\ctikzvalof{tripoles/inst amp ra/input height}\pgf at circ@res at down}}
         \pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/inst amp ra/port width}\pgf at circ@res at left}{\ctikzvalof{tripoles/inst amp ra/input height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/inst amp ra/font} \ifpgf at circuit@oa at iplusup$-$\else$+$\fi}
-        
+
         % Output terminal
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
         \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/inst amp ra/port width}\pgf at circ@res at right}{0pt}} %

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex	2019-11-09 22:01:48 UTC (rev 52709)
@@ -262,11 +262,11 @@
             \else
             \ifpgf at circuit@bipole at voltage@backward
                 (pgfcirc at Vto) .. controls (pgfcirc at Vcont2)  and (pgfcirc at Vcont1) ..
-                node[currarrow, sloped,  allow upside down, pos=1] {}
+                node[currarrow, sloped,  allow upside down, pos=1, anchor=tip] {}
                 (pgfcirc at Vfrom)
             \else
                 (pgfcirc at Vfrom) .. controls (pgfcirc at Vcont1)  and (pgfcirc at Vcont2) ..
-                node[currarrow, sloped,  allow upside down, pos=1] {}
+                node[currarrow, sloped,  allow upside down, pos=1, anchor=tip] {}
                 (pgfcirc at Vto)
             \fi
         \fi
@@ -320,9 +320,9 @@
     coordinate (pgfcirc at Vcont2) at (pgfcirc at Vfrom)
     \ifpgf at circuit@europeanvoltage
         \ifpgf at circuit@bipole at voltage@backward
-            (pgfcirc at Vto)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vfrom)
+            (pgfcirc at Vto)  -- node[currarrow, sloped,  allow upside down, pos=1, anchor=tip] {} (pgfcirc at Vfrom)
         \else
-            (pgfcirc at Vfrom)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vto)
+            (pgfcirc at Vfrom)  -- node[currarrow, sloped,  allow upside down, pos=1, anchor=tip] {} (pgfcirc at Vto)
         \fi
         \else% american voltage
         \ifpgf at circuit@bipole at voltageoutsideofsymbol

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2019-11-09 18:20:38 UTC (rev 52708)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2019-11-09 22:01:48 UTC (rev 52709)
@@ -9,8 +9,8 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\pgfcircversion{0.9.5}
-\def\pgfcircversiondate{2019/10/12}
+\def\pgfcircversion{0.9.6}
+\def\pgfcircversiondate{2019/11/09}
 
 \ProvidesPackage{circuitikz}%
 [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]



More information about the tex-live-commits mailing list